@cerios/openapi-to-zod 1.6.0 → 1.7.0
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.
- package/README.md +30 -0
- package/dist/cli.js +21 -2
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +21 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +40 -1
- package/dist/index.d.ts +40 -1
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.5.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js","../../../node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/action.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/strip.js","../../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/clear.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/figures.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/style.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/lines.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/wrap.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/entriesToDisplay.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/prompt.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/text.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/select.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/toggle.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/datepart.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/meridiem.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/day.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/hours.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/milliseconds.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/minutes.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/month.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/seconds.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/year.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/date.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/number.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/multiselect.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/autocomplete.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/autocompleteMultiselect.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/confirm.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/prompts.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/action.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/strip.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/clear.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/figures.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/style.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/lines.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/wrap.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/entriesToDisplay.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/prompt.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/text.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/select.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/toggle.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/datepart.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/meridiem.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/day.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/hours.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/milliseconds.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/minutes.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/month.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/seconds.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/year.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/date.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/number.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/multiselect.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocomplete.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocompleteMultiselect.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/confirm.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/prompts.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/index.js","../src/generators/enum-generator.ts","../src/generators/jsdoc-generator.ts","../src/utils/string-utils.ts","../src/validators/array-validator.ts","../src/validators/composition-validator.ts","../src/validators/number-validator.ts","../src/validators/conditional-validator.ts","../src/validators/object-validator.ts","../src/validators/string-validator.ts","../src/generators/property-generator.ts","../src/openapi-generator.ts","../src/utils/config-loader.ts","../src/cli.ts"],"sourcesContent":["// Shim globals in esm bundle\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","'use strict';\n\nconst { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env;\n\nconst $ = {\n\tenabled: !NODE_DISABLE_COLORS && TERM !== 'dumb' && FORCE_COLOR !== '0',\n\n\t// modifiers\n\treset: init(0, 0),\n\tbold: init(1, 22),\n\tdim: init(2, 22),\n\titalic: init(3, 23),\n\tunderline: init(4, 24),\n\tinverse: init(7, 27),\n\thidden: init(8, 28),\n\tstrikethrough: init(9, 29),\n\n\t// colors\n\tblack: init(30, 39),\n\tred: init(31, 39),\n\tgreen: init(32, 39),\n\tyellow: init(33, 39),\n\tblue: init(34, 39),\n\tmagenta: init(35, 39),\n\tcyan: init(36, 39),\n\twhite: init(37, 39),\n\tgray: init(90, 39),\n\tgrey: init(90, 39),\n\n\t// background colors\n\tbgBlack: init(40, 49),\n\tbgRed: init(41, 49),\n\tbgGreen: init(42, 49),\n\tbgYellow: init(43, 49),\n\tbgBlue: init(44, 49),\n\tbgMagenta: init(45, 49),\n\tbgCyan: init(46, 49),\n\tbgWhite: init(47, 49)\n};\n\nfunction run(arr, str) {\n\tlet i=0, tmp, beg='', end='';\n\tfor (; i < arr.length; i++) {\n\t\ttmp = arr[i];\n\t\tbeg += tmp.open;\n\t\tend += tmp.close;\n\t\tif (str.includes(tmp.close)) {\n\t\t\tstr = str.replace(tmp.rgx, tmp.close + tmp.open);\n\t\t}\n\t}\n\treturn beg + str + end;\n}\n\nfunction chain(has, keys) {\n\tlet ctx = { has, keys };\n\n\tctx.reset = $.reset.bind(ctx);\n\tctx.bold = $.bold.bind(ctx);\n\tctx.dim = $.dim.bind(ctx);\n\tctx.italic = $.italic.bind(ctx);\n\tctx.underline = $.underline.bind(ctx);\n\tctx.inverse = $.inverse.bind(ctx);\n\tctx.hidden = $.hidden.bind(ctx);\n\tctx.strikethrough = $.strikethrough.bind(ctx);\n\n\tctx.black = $.black.bind(ctx);\n\tctx.red = $.red.bind(ctx);\n\tctx.green = $.green.bind(ctx);\n\tctx.yellow = $.yellow.bind(ctx);\n\tctx.blue = $.blue.bind(ctx);\n\tctx.magenta = $.magenta.bind(ctx);\n\tctx.cyan = $.cyan.bind(ctx);\n\tctx.white = $.white.bind(ctx);\n\tctx.gray = $.gray.bind(ctx);\n\tctx.grey = $.grey.bind(ctx);\n\n\tctx.bgBlack = $.bgBlack.bind(ctx);\n\tctx.bgRed = $.bgRed.bind(ctx);\n\tctx.bgGreen = $.bgGreen.bind(ctx);\n\tctx.bgYellow = $.bgYellow.bind(ctx);\n\tctx.bgBlue = $.bgBlue.bind(ctx);\n\tctx.bgMagenta = $.bgMagenta.bind(ctx);\n\tctx.bgCyan = $.bgCyan.bind(ctx);\n\tctx.bgWhite = $.bgWhite.bind(ctx);\n\n\treturn ctx;\n}\n\nfunction init(open, close) {\n\tlet blk = {\n\t\topen: `\\x1b[${open}m`,\n\t\tclose: `\\x1b[${close}m`,\n\t\trgx: new RegExp(`\\\\x1b\\\\[${close}m`, 'g')\n\t};\n\treturn function (txt) {\n\t\tif (this !== void 0 && this.has !== void 0) {\n\t\t\tthis.has.includes(open) || (this.has.push(open),this.keys.push(blk));\n\t\t\treturn txt === void 0 ? this : $.enabled ? run(this.keys, txt+'') : txt+'';\n\t\t}\n\t\treturn txt === void 0 ? chain([open], [blk]) : $.enabled ? run([blk], txt+'') : txt+'';\n\t};\n}\n\nmodule.exports = $;\n","'use strict';\n\nmodule.exports = (key, isSelect) => {\n if (key.meta && key.name !== 'escape') return;\n\n if (key.ctrl) {\n if (key.name === 'a') return 'first';\n if (key.name === 'c') return 'abort';\n if (key.name === 'd') return 'abort';\n if (key.name === 'e') return 'last';\n if (key.name === 'g') return 'reset';\n }\n\n if (isSelect) {\n if (key.name === 'j') return 'down';\n if (key.name === 'k') return 'up';\n }\n\n if (key.name === 'return') return 'submit';\n if (key.name === 'enter') return 'submit'; // ctrl + J\n\n if (key.name === 'backspace') return 'delete';\n if (key.name === 'delete') return 'deleteForward';\n if (key.name === 'abort') return 'abort';\n if (key.name === 'escape') return 'exit';\n if (key.name === 'tab') return 'next';\n if (key.name === 'pagedown') return 'nextPage';\n if (key.name === 'pageup') return 'prevPage'; // TODO create home() in prompt types (e.g. TextPrompt)\n\n if (key.name === 'home') return 'home'; // TODO create end() in prompt types (e.g. TextPrompt)\n\n if (key.name === 'end') return 'end';\n if (key.name === 'up') return 'up';\n if (key.name === 'down') return 'down';\n if (key.name === 'right') return 'right';\n if (key.name === 'left') return 'left';\n return false;\n};","'use strict';\n\nmodule.exports = str => {\n const pattern = ['[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)', '(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PRZcf-ntqry=><~]))'].join('|');\n const RGX = new RegExp(pattern, 'g');\n return typeof str === 'string' ? str.replace(RGX, '') : str;\n};","'use strict';\n\nconst ESC = '\\x1B';\nconst CSI = `${ESC}[`;\nconst beep = '\\u0007';\n\nconst cursor = {\n to(x, y) {\n if (!y) return `${CSI}${x + 1}G`;\n return `${CSI}${y + 1};${x + 1}H`;\n },\n move(x, y) {\n let ret = '';\n\n if (x < 0) ret += `${CSI}${-x}D`;\n else if (x > 0) ret += `${CSI}${x}C`;\n\n if (y < 0) ret += `${CSI}${-y}A`;\n else if (y > 0) ret += `${CSI}${y}B`;\n\n return ret;\n },\n up: (count = 1) => `${CSI}${count}A`,\n down: (count = 1) => `${CSI}${count}B`,\n forward: (count = 1) => `${CSI}${count}C`,\n backward: (count = 1) => `${CSI}${count}D`,\n nextLine: (count = 1) => `${CSI}E`.repeat(count),\n prevLine: (count = 1) => `${CSI}F`.repeat(count),\n left: `${CSI}G`,\n hide: `${CSI}?25l`,\n show: `${CSI}?25h`,\n save: `${ESC}7`,\n restore: `${ESC}8`\n}\n\nconst scroll = {\n up: (count = 1) => `${CSI}S`.repeat(count),\n down: (count = 1) => `${CSI}T`.repeat(count)\n}\n\nconst erase = {\n screen: `${CSI}2J`,\n up: (count = 1) => `${CSI}1J`.repeat(count),\n down: (count = 1) => `${CSI}J`.repeat(count),\n line: `${CSI}2K`,\n lineEnd: `${CSI}K`,\n lineStart: `${CSI}1K`,\n lines(count) {\n let clear = '';\n for (let i = 0; i < count; i++)\n clear += this.line + (i < count - 1 ? cursor.up() : '');\n if (count)\n clear += cursor.left;\n return clear;\n }\n}\n\nmodule.exports = { cursor, scroll, erase, beep };\n","'use strict';\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nconst strip = require('./strip');\n\nconst _require = require('sisteransi'),\n erase = _require.erase,\n cursor = _require.cursor;\n\nconst width = str => [...strip(str)].length;\n/**\n * @param {string} prompt\n * @param {number} perLine\n */\n\n\nmodule.exports = function (prompt, perLine) {\n if (!perLine) return erase.line + cursor.to(0);\n let rows = 0;\n const lines = prompt.split(/\\r?\\n/);\n\n var _iterator = _createForOfIteratorHelper(lines),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n let line = _step.value;\n rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / perLine);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return erase.lines(rows);\n};","'use strict';\n\nconst main = {\n arrowUp: '↑',\n arrowDown: '↓',\n arrowLeft: '←',\n arrowRight: '→',\n radioOn: '◉',\n radioOff: '◯',\n tick: '✔',\n cross: '✖',\n ellipsis: '…',\n pointerSmall: '›',\n line: '─',\n pointer: '❯'\n};\nconst win = {\n arrowUp: main.arrowUp,\n arrowDown: main.arrowDown,\n arrowLeft: main.arrowLeft,\n arrowRight: main.arrowRight,\n radioOn: '(*)',\n radioOff: '( )',\n tick: '√',\n cross: '×',\n ellipsis: '...',\n pointerSmall: '»',\n line: '─',\n pointer: '>'\n};\nconst figures = process.platform === 'win32' ? win : main;\nmodule.exports = figures;","'use strict';\n\nconst c = require('kleur');\n\nconst figures = require('./figures'); // rendering user input.\n\n\nconst styles = Object.freeze({\n password: {\n scale: 1,\n render: input => '*'.repeat(input.length)\n },\n emoji: {\n scale: 2,\n render: input => '😃'.repeat(input.length)\n },\n invisible: {\n scale: 0,\n render: input => ''\n },\n default: {\n scale: 1,\n render: input => `${input}`\n }\n});\n\nconst render = type => styles[type] || styles.default; // icon to signalize a prompt.\n\n\nconst symbols = Object.freeze({\n aborted: c.red(figures.cross),\n done: c.green(figures.tick),\n exited: c.yellow(figures.cross),\n default: c.cyan('?')\n});\n\nconst symbol = (done, aborted, exited) => aborted ? symbols.aborted : exited ? symbols.exited : done ? symbols.done : symbols.default; // between the question and the user's input.\n\n\nconst delimiter = completing => c.gray(completing ? figures.ellipsis : figures.pointerSmall);\n\nconst item = (expandable, expanded) => c.gray(expandable ? expanded ? figures.pointerSmall : '+' : figures.line);\n\nmodule.exports = {\n styles,\n render,\n symbols,\n symbol,\n delimiter,\n item\n};","'use strict';\n\nconst strip = require('./strip');\n/**\n * @param {string} msg\n * @param {number} perLine\n */\n\n\nmodule.exports = function (msg, perLine) {\n let lines = String(strip(msg) || '').split(/\\r?\\n/);\n if (!perLine) return lines.length;\n return lines.map(l => Math.ceil(l.length / perLine)).reduce((a, b) => a + b);\n};","'use strict';\n/**\n * @param {string} msg The message to wrap\n * @param {object} opts\n * @param {number|string} [opts.margin] Left margin\n * @param {number} opts.width Maximum characters per line including the margin\n */\n\nmodule.exports = (msg, opts = {}) => {\n const tab = Number.isSafeInteger(parseInt(opts.margin)) ? new Array(parseInt(opts.margin)).fill(' ').join('') : opts.margin || '';\n const width = opts.width;\n return (msg || '').split(/\\r?\\n/g).map(line => line.split(/\\s+/g).reduce((arr, w) => {\n if (w.length + tab.length >= width || arr[arr.length - 1].length + w.length + 1 < width) arr[arr.length - 1] += ` ${w}`;else arr.push(`${tab}${w}`);\n return arr;\n }, [tab]).join('\\n')).join('\\n');\n};","'use strict';\n/**\n * Determine what entries should be displayed on the screen, based on the\n * currently selected index and the maximum visible. Used in list-based\n * prompts like `select` and `multiselect`.\n *\n * @param {number} cursor the currently selected entry\n * @param {number} total the total entries available to display\n * @param {number} [maxVisible] the number of entries that can be displayed\n */\n\nmodule.exports = (cursor, total, maxVisible) => {\n maxVisible = maxVisible || total;\n let startIndex = Math.min(total - maxVisible, cursor - Math.floor(maxVisible / 2));\n if (startIndex < 0) startIndex = 0;\n let endIndex = Math.min(startIndex + maxVisible, total);\n return {\n startIndex,\n endIndex\n };\n};","'use strict';\n\nmodule.exports = {\n action: require('./action'),\n clear: require('./clear'),\n style: require('./style'),\n strip: require('./strip'),\n figures: require('./figures'),\n lines: require('./lines'),\n wrap: require('./wrap'),\n entriesToDisplay: require('./entriesToDisplay')\n};","'use strict';\n\nconst readline = require('readline');\n\nconst _require = require('../util'),\n action = _require.action;\n\nconst EventEmitter = require('events');\n\nconst _require2 = require('sisteransi'),\n beep = _require2.beep,\n cursor = _require2.cursor;\n\nconst color = require('kleur');\n/**\n * Base prompt skeleton\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\n\n\nclass Prompt extends EventEmitter {\n constructor(opts = {}) {\n super();\n this.firstRender = true;\n this.in = opts.stdin || process.stdin;\n this.out = opts.stdout || process.stdout;\n\n this.onRender = (opts.onRender || (() => void 0)).bind(this);\n\n const rl = readline.createInterface({\n input: this.in,\n escapeCodeTimeout: 50\n });\n readline.emitKeypressEvents(this.in, rl);\n if (this.in.isTTY) this.in.setRawMode(true);\n const isSelect = ['SelectPrompt', 'MultiselectPrompt'].indexOf(this.constructor.name) > -1;\n\n const keypress = (str, key) => {\n let a = action(key, isSelect);\n\n if (a === false) {\n this._ && this._(str, key);\n } else if (typeof this[a] === 'function') {\n this[a](key);\n } else {\n this.bell();\n }\n };\n\n this.close = () => {\n this.out.write(cursor.show);\n this.in.removeListener('keypress', keypress);\n if (this.in.isTTY) this.in.setRawMode(false);\n rl.close();\n this.emit(this.aborted ? 'abort' : this.exited ? 'exit' : 'submit', this.value);\n this.closed = true;\n };\n\n this.in.on('keypress', keypress);\n }\n\n fire() {\n this.emit('state', {\n value: this.value,\n aborted: !!this.aborted,\n exited: !!this.exited\n });\n }\n\n bell() {\n this.out.write(beep);\n }\n\n render() {\n this.onRender(color);\n if (this.firstRender) this.firstRender = false;\n }\n\n}\n\nmodule.exports = Prompt;","\"use strict\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nconst color = require('kleur');\n\nconst Prompt = require('./prompt');\n\nconst _require = require('sisteransi'),\n erase = _require.erase,\n cursor = _require.cursor;\n\nconst _require2 = require('../util'),\n style = _require2.style,\n clear = _require2.clear,\n lines = _require2.lines,\n figures = _require2.figures;\n/**\n * TextPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {String} [opts.style='default'] Render style\n * @param {String} [opts.initial] Default value\n * @param {Function} [opts.validate] Validate function\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.error] The invalid error label\n */\n\n\nclass TextPrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.transform = style.render(opts.style);\n this.scale = this.transform.scale;\n this.msg = opts.message;\n this.initial = opts.initial || ``;\n\n this.validator = opts.validate || (() => true);\n\n this.value = ``;\n this.errorMsg = opts.error || `Please Enter A Valid Value`;\n this.cursor = Number(!!this.initial);\n this.cursorOffset = 0;\n this.clear = clear(``, this.out.columns);\n this.render();\n }\n\n set value(v) {\n if (!v && this.initial) {\n this.placeholder = true;\n this.rendered = color.gray(this.transform.render(this.initial));\n } else {\n this.placeholder = false;\n this.rendered = this.transform.render(v);\n }\n\n this._value = v;\n this.fire();\n }\n\n get value() {\n return this._value;\n }\n\n reset() {\n this.value = ``;\n this.cursor = Number(!!this.initial);\n this.cursorOffset = 0;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.value = this.value || this.initial;\n this.done = this.aborted = true;\n this.error = false;\n this.red = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n validate() {\n var _this = this;\n\n return _asyncToGenerator(function* () {\n let valid = yield _this.validator(_this.value);\n\n if (typeof valid === `string`) {\n _this.errorMsg = valid;\n valid = false;\n }\n\n _this.error = !valid;\n })();\n }\n\n submit() {\n var _this2 = this;\n\n return _asyncToGenerator(function* () {\n _this2.value = _this2.value || _this2.initial;\n _this2.cursorOffset = 0;\n _this2.cursor = _this2.rendered.length;\n yield _this2.validate();\n\n if (_this2.error) {\n _this2.red = true;\n\n _this2.fire();\n\n _this2.render();\n\n return;\n }\n\n _this2.done = true;\n _this2.aborted = false;\n\n _this2.fire();\n\n _this2.render();\n\n _this2.out.write('\\n');\n\n _this2.close();\n })();\n }\n\n next() {\n if (!this.placeholder) return this.bell();\n this.value = this.initial;\n this.cursor = this.rendered.length;\n this.fire();\n this.render();\n }\n\n moveCursor(n) {\n if (this.placeholder) return;\n this.cursor = this.cursor + n;\n this.cursorOffset += n;\n }\n\n _(c, key) {\n let s1 = this.value.slice(0, this.cursor);\n let s2 = this.value.slice(this.cursor);\n this.value = `${s1}${c}${s2}`;\n this.red = false;\n this.cursor = this.placeholder ? 0 : s1.length + 1;\n this.render();\n }\n\n delete() {\n if (this.isCursorAtStart()) return this.bell();\n let s1 = this.value.slice(0, this.cursor - 1);\n let s2 = this.value.slice(this.cursor);\n this.value = `${s1}${s2}`;\n this.red = false;\n\n if (this.isCursorAtStart()) {\n this.cursorOffset = 0;\n } else {\n this.cursorOffset++;\n this.moveCursor(-1);\n }\n\n this.render();\n }\n\n deleteForward() {\n if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell();\n let s1 = this.value.slice(0, this.cursor);\n let s2 = this.value.slice(this.cursor + 1);\n this.value = `${s1}${s2}`;\n this.red = false;\n\n if (this.isCursorAtEnd()) {\n this.cursorOffset = 0;\n } else {\n this.cursorOffset++;\n }\n\n this.render();\n }\n\n first() {\n this.cursor = 0;\n this.render();\n }\n\n last() {\n this.cursor = this.value.length;\n this.render();\n }\n\n left() {\n if (this.cursor <= 0 || this.placeholder) return this.bell();\n this.moveCursor(-1);\n this.render();\n }\n\n right() {\n if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell();\n this.moveCursor(1);\n this.render();\n }\n\n isCursorAtStart() {\n return this.cursor === 0 || this.placeholder && this.cursor === 1;\n }\n\n isCursorAtEnd() {\n return this.cursor === this.rendered.length || this.placeholder && this.cursor === this.rendered.length + 1;\n }\n\n render() {\n if (this.closed) return;\n\n if (!this.firstRender) {\n if (this.outputError) this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));\n this.out.write(clear(this.outputText, this.out.columns));\n }\n\n super.render();\n this.outputError = '';\n this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.red ? color.red(this.rendered) : this.rendered].join(` `);\n\n if (this.error) {\n this.outputError += this.errorMsg.split(`\\n`).reduce((a, l, i) => a + `\\n${i ? ' ' : figures.pointerSmall} ${color.red().italic(l)}`, ``);\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0));\n }\n\n}\n\nmodule.exports = TextPrompt;","'use strict';\n\nconst color = require('kleur');\n\nconst Prompt = require('./prompt');\n\nconst _require = require('../util'),\n style = _require.style,\n clear = _require.clear,\n figures = _require.figures,\n wrap = _require.wrap,\n entriesToDisplay = _require.entriesToDisplay;\n\nconst _require2 = require('sisteransi'),\n cursor = _require2.cursor;\n/**\n * SelectPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of choice objects\n * @param {String} [opts.hint] Hint to display\n * @param {Number} [opts.initial] Index of default value\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {Number} [opts.optionsPerPage=10] Max options to display at once\n */\n\n\nclass SelectPrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.msg = opts.message;\n this.hint = opts.hint || '- Use arrow-keys. Return to submit.';\n this.warn = opts.warn || '- This option is disabled';\n this.cursor = opts.initial || 0;\n this.choices = opts.choices.map((ch, idx) => {\n if (typeof ch === 'string') ch = {\n title: ch,\n value: idx\n };\n return {\n title: ch && (ch.title || ch.value || ch),\n value: ch && (ch.value === undefined ? idx : ch.value),\n description: ch && ch.description,\n selected: ch && ch.selected,\n disabled: ch && ch.disabled\n };\n });\n this.optionsPerPage = opts.optionsPerPage || 10;\n this.value = (this.choices[this.cursor] || {}).value;\n this.clear = clear('', this.out.columns);\n this.render();\n }\n\n moveCursor(n) {\n this.cursor = n;\n this.value = this.choices[n].value;\n this.fire();\n }\n\n reset() {\n this.moveCursor(0);\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n if (!this.selection.disabled) {\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n } else this.bell();\n }\n\n first() {\n this.moveCursor(0);\n this.render();\n }\n\n last() {\n this.moveCursor(this.choices.length - 1);\n this.render();\n }\n\n up() {\n if (this.cursor === 0) {\n this.moveCursor(this.choices.length - 1);\n } else {\n this.moveCursor(this.cursor - 1);\n }\n\n this.render();\n }\n\n down() {\n if (this.cursor === this.choices.length - 1) {\n this.moveCursor(0);\n } else {\n this.moveCursor(this.cursor + 1);\n }\n\n this.render();\n }\n\n next() {\n this.moveCursor((this.cursor + 1) % this.choices.length);\n this.render();\n }\n\n _(c, key) {\n if (c === ' ') return this.submit();\n }\n\n get selection() {\n return this.choices[this.cursor];\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n\n let _entriesToDisplay = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage),\n startIndex = _entriesToDisplay.startIndex,\n endIndex = _entriesToDisplay.endIndex; // Print prompt\n\n\n this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.done ? this.selection.title : this.selection.disabled ? color.yellow(this.warn) : color.gray(this.hint)].join(' '); // Print choices\n\n if (!this.done) {\n this.outputText += '\\n';\n\n for (let i = startIndex; i < endIndex; i++) {\n let title,\n prefix,\n desc = '',\n v = this.choices[i]; // Determine whether to display \"more choices\" indicators\n\n if (i === startIndex && startIndex > 0) {\n prefix = figures.arrowUp;\n } else if (i === endIndex - 1 && endIndex < this.choices.length) {\n prefix = figures.arrowDown;\n } else {\n prefix = ' ';\n }\n\n if (v.disabled) {\n title = this.cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);\n prefix = (this.cursor === i ? color.bold().gray(figures.pointer) + ' ' : ' ') + prefix;\n } else {\n title = this.cursor === i ? color.cyan().underline(v.title) : v.title;\n prefix = (this.cursor === i ? color.cyan(figures.pointer) + ' ' : ' ') + prefix;\n\n if (v.description && this.cursor === i) {\n desc = ` - ${v.description}`;\n\n if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\\r?\\n/).length > 1) {\n desc = '\\n' + wrap(v.description, {\n margin: 3,\n width: this.out.columns\n });\n }\n }\n }\n\n this.outputText += `${prefix} ${title}${color.gray(desc)}\\n`;\n }\n }\n\n this.out.write(this.outputText);\n }\n\n}\n\nmodule.exports = SelectPrompt;","\"use strict\";\n\nconst color = require('kleur');\n\nconst Prompt = require('./prompt');\n\nconst _require = require('../util'),\n style = _require.style,\n clear = _require.clear;\n\nconst _require2 = require('sisteransi'),\n cursor = _require2.cursor,\n erase = _require2.erase;\n/**\n * TogglePrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Boolean} [opts.initial=false] Default value\n * @param {String} [opts.active='no'] Active label\n * @param {String} [opts.inactive='off'] Inactive label\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\n\n\nclass TogglePrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.msg = opts.message;\n this.value = !!opts.initial;\n this.active = opts.active || 'on';\n this.inactive = opts.inactive || 'off';\n this.initialValue = this.value;\n this.render();\n }\n\n reset() {\n this.value = this.initialValue;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n deactivate() {\n if (this.value === false) return this.bell();\n this.value = false;\n this.render();\n }\n\n activate() {\n if (this.value === true) return this.bell();\n this.value = true;\n this.render();\n }\n\n delete() {\n this.deactivate();\n }\n\n left() {\n this.deactivate();\n }\n\n right() {\n this.activate();\n }\n\n down() {\n this.deactivate();\n }\n\n up() {\n this.activate();\n }\n\n next() {\n this.value = !this.value;\n this.fire();\n this.render();\n }\n\n _(c, key) {\n if (c === ' ') {\n this.value = !this.value;\n } else if (c === '1') {\n this.value = true;\n } else if (c === '0') {\n this.value = false;\n } else return this.bell();\n\n this.render();\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.value ? this.inactive : color.cyan().underline(this.inactive), color.gray('/'), this.value ? color.cyan().underline(this.active) : this.active].join(' ');\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n\n}\n\nmodule.exports = TogglePrompt;","'use strict';\n\nclass DatePart {\n constructor({\n token,\n date,\n parts,\n locales\n }) {\n this.token = token;\n this.date = date || new Date();\n this.parts = parts || [this];\n this.locales = locales || {};\n }\n\n up() {}\n\n down() {}\n\n next() {\n const currentIdx = this.parts.indexOf(this);\n return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);\n }\n\n setTo(val) {}\n\n prev() {\n let parts = [].concat(this.parts).reverse();\n const currentIdx = parts.indexOf(this);\n return parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);\n }\n\n toString() {\n return String(this.date);\n }\n\n}\n\nmodule.exports = DatePart;","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Meridiem extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setHours((this.date.getHours() + 12) % 24);\n }\n\n down() {\n this.up();\n }\n\n toString() {\n let meridiem = this.date.getHours() > 12 ? 'pm' : 'am';\n return /\\A/.test(this.token) ? meridiem.toUpperCase() : meridiem;\n }\n\n}\n\nmodule.exports = Meridiem;","'use strict';\n\nconst DatePart = require('./datepart');\n\nconst pos = n => {\n n = n % 10;\n return n === 1 ? 'st' : n === 2 ? 'nd' : n === 3 ? 'rd' : 'th';\n};\n\nclass Day extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setDate(this.date.getDate() + 1);\n }\n\n down() {\n this.date.setDate(this.date.getDate() - 1);\n }\n\n setTo(val) {\n this.date.setDate(parseInt(val.substr(-2)));\n }\n\n toString() {\n let date = this.date.getDate();\n let day = this.date.getDay();\n return this.token === 'DD' ? String(date).padStart(2, '0') : this.token === 'Do' ? date + pos(date) : this.token === 'd' ? day + 1 : this.token === 'ddd' ? this.locales.weekdaysShort[day] : this.token === 'dddd' ? this.locales.weekdays[day] : date;\n }\n\n}\n\nmodule.exports = Day;","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Hours extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setHours(this.date.getHours() + 1);\n }\n\n down() {\n this.date.setHours(this.date.getHours() - 1);\n }\n\n setTo(val) {\n this.date.setHours(parseInt(val.substr(-2)));\n }\n\n toString() {\n let hours = this.date.getHours();\n if (/h/.test(this.token)) hours = hours % 12 || 12;\n return this.token.length > 1 ? String(hours).padStart(2, '0') : hours;\n }\n\n}\n\nmodule.exports = Hours;","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Milliseconds extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setMilliseconds(this.date.getMilliseconds() + 1);\n }\n\n down() {\n this.date.setMilliseconds(this.date.getMilliseconds() - 1);\n }\n\n setTo(val) {\n this.date.setMilliseconds(parseInt(val.substr(-this.token.length)));\n }\n\n toString() {\n return String(this.date.getMilliseconds()).padStart(4, '0').substr(0, this.token.length);\n }\n\n}\n\nmodule.exports = Milliseconds;","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Minutes extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setMinutes(this.date.getMinutes() + 1);\n }\n\n down() {\n this.date.setMinutes(this.date.getMinutes() - 1);\n }\n\n setTo(val) {\n this.date.setMinutes(parseInt(val.substr(-2)));\n }\n\n toString() {\n let m = this.date.getMinutes();\n return this.token.length > 1 ? String(m).padStart(2, '0') : m;\n }\n\n}\n\nmodule.exports = Minutes;","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Month extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setMonth(this.date.getMonth() + 1);\n }\n\n down() {\n this.date.setMonth(this.date.getMonth() - 1);\n }\n\n setTo(val) {\n val = parseInt(val.substr(-2)) - 1;\n this.date.setMonth(val < 0 ? 0 : val);\n }\n\n toString() {\n let month = this.date.getMonth();\n let tl = this.token.length;\n return tl === 2 ? String(month + 1).padStart(2, '0') : tl === 3 ? this.locales.monthsShort[month] : tl === 4 ? this.locales.months[month] : String(month + 1);\n }\n\n}\n\nmodule.exports = Month;","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Seconds extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setSeconds(this.date.getSeconds() + 1);\n }\n\n down() {\n this.date.setSeconds(this.date.getSeconds() - 1);\n }\n\n setTo(val) {\n this.date.setSeconds(parseInt(val.substr(-2)));\n }\n\n toString() {\n let s = this.date.getSeconds();\n return this.token.length > 1 ? String(s).padStart(2, '0') : s;\n }\n\n}\n\nmodule.exports = Seconds;","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Year extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setFullYear(this.date.getFullYear() + 1);\n }\n\n down() {\n this.date.setFullYear(this.date.getFullYear() - 1);\n }\n\n setTo(val) {\n this.date.setFullYear(val.substr(-4));\n }\n\n toString() {\n let year = String(this.date.getFullYear()).padStart(4, '0');\n return this.token.length === 2 ? year.substr(-2) : year;\n }\n\n}\n\nmodule.exports = Year;","'use strict';\n\nmodule.exports = {\n DatePart: require('./datepart'),\n Meridiem: require('./meridiem'),\n Day: require('./day'),\n Hours: require('./hours'),\n Milliseconds: require('./milliseconds'),\n Minutes: require('./minutes'),\n Month: require('./month'),\n Seconds: require('./seconds'),\n Year: require('./year')\n};","'use strict';\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nconst color = require('kleur');\n\nconst Prompt = require('./prompt');\n\nconst _require = require('../util'),\n style = _require.style,\n clear = _require.clear,\n figures = _require.figures;\n\nconst _require2 = require('sisteransi'),\n erase = _require2.erase,\n cursor = _require2.cursor;\n\nconst _require3 = require('../dateparts'),\n DatePart = _require3.DatePart,\n Meridiem = _require3.Meridiem,\n Day = _require3.Day,\n Hours = _require3.Hours,\n Milliseconds = _require3.Milliseconds,\n Minutes = _require3.Minutes,\n Month = _require3.Month,\n Seconds = _require3.Seconds,\n Year = _require3.Year;\n\nconst regex = /\\\\(.)|\"((?:\\\\[\"\\\\]|[^\"])+)\"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;\nconst regexGroups = {\n 1: ({\n token\n }) => token.replace(/\\\\(.)/g, '$1'),\n 2: opts => new Day(opts),\n // Day // TODO\n 3: opts => new Month(opts),\n // Month\n 4: opts => new Year(opts),\n // Year\n 5: opts => new Meridiem(opts),\n // AM/PM // TODO (special)\n 6: opts => new Hours(opts),\n // Hours\n 7: opts => new Minutes(opts),\n // Minutes\n 8: opts => new Seconds(opts),\n // Seconds\n 9: opts => new Milliseconds(opts) // Fractional seconds\n\n};\nconst dfltLocales = {\n months: 'January,February,March,April,May,June,July,August,September,October,November,December'.split(','),\n monthsShort: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),\n weekdays: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),\n weekdaysShort: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(',')\n};\n/**\n * DatePrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Number} [opts.initial] Index of default value\n * @param {String} [opts.mask] The format mask\n * @param {object} [opts.locales] The date locales\n * @param {String} [opts.error] The error message shown on invalid value\n * @param {Function} [opts.validate] Function to validate the submitted value\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\n\nclass DatePrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.msg = opts.message;\n this.cursor = 0;\n this.typed = '';\n this.locales = Object.assign(dfltLocales, opts.locales);\n this._date = opts.initial || new Date();\n this.errorMsg = opts.error || 'Please Enter A Valid Value';\n\n this.validator = opts.validate || (() => true);\n\n this.mask = opts.mask || 'YYYY-MM-DD HH:mm:ss';\n this.clear = clear('', this.out.columns);\n this.render();\n }\n\n get value() {\n return this.date;\n }\n\n get date() {\n return this._date;\n }\n\n set date(date) {\n if (date) this._date.setTime(date.getTime());\n }\n\n set mask(mask) {\n let result;\n this.parts = [];\n\n while (result = regex.exec(mask)) {\n let match = result.shift();\n let idx = result.findIndex(gr => gr != null);\n this.parts.push(idx in regexGroups ? regexGroups[idx]({\n token: result[idx] || match,\n date: this.date,\n parts: this.parts,\n locales: this.locales\n }) : result[idx] || match);\n }\n\n let parts = this.parts.reduce((arr, i) => {\n if (typeof i === 'string' && typeof arr[arr.length - 1] === 'string') arr[arr.length - 1] += i;else arr.push(i);\n return arr;\n }, []);\n this.parts.splice(0);\n this.parts.push(...parts);\n this.reset();\n }\n\n moveCursor(n) {\n this.typed = '';\n this.cursor = n;\n this.fire();\n }\n\n reset() {\n this.moveCursor(this.parts.findIndex(p => p instanceof DatePart));\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.error = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n validate() {\n var _this = this;\n\n return _asyncToGenerator(function* () {\n let valid = yield _this.validator(_this.value);\n\n if (typeof valid === 'string') {\n _this.errorMsg = valid;\n valid = false;\n }\n\n _this.error = !valid;\n })();\n }\n\n submit() {\n var _this2 = this;\n\n return _asyncToGenerator(function* () {\n yield _this2.validate();\n\n if (_this2.error) {\n _this2.color = 'red';\n\n _this2.fire();\n\n _this2.render();\n\n return;\n }\n\n _this2.done = true;\n _this2.aborted = false;\n\n _this2.fire();\n\n _this2.render();\n\n _this2.out.write('\\n');\n\n _this2.close();\n })();\n }\n\n up() {\n this.typed = '';\n this.parts[this.cursor].up();\n this.render();\n }\n\n down() {\n this.typed = '';\n this.parts[this.cursor].down();\n this.render();\n }\n\n left() {\n let prev = this.parts[this.cursor].prev();\n if (prev == null) return this.bell();\n this.moveCursor(this.parts.indexOf(prev));\n this.render();\n }\n\n right() {\n let next = this.parts[this.cursor].next();\n if (next == null) return this.bell();\n this.moveCursor(this.parts.indexOf(next));\n this.render();\n }\n\n next() {\n let next = this.parts[this.cursor].next();\n this.moveCursor(next ? this.parts.indexOf(next) : this.parts.findIndex(part => part instanceof DatePart));\n this.render();\n }\n\n _(c) {\n if (/\\d/.test(c)) {\n this.typed += c;\n this.parts[this.cursor].setTo(this.typed);\n this.render();\n }\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns));\n super.render(); // Print prompt\n\n this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), []).join('')].join(' '); // Print error\n\n if (this.error) {\n this.outputText += this.errorMsg.split('\\n').reduce((a, l, i) => a + `\\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n\n}\n\nmodule.exports = DatePrompt;","\"use strict\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nconst color = require('kleur');\n\nconst Prompt = require('./prompt');\n\nconst _require = require('sisteransi'),\n cursor = _require.cursor,\n erase = _require.erase;\n\nconst _require2 = require('../util'),\n style = _require2.style,\n figures = _require2.figures,\n clear = _require2.clear,\n lines = _require2.lines;\n\nconst isNumber = /[0-9]/;\n\nconst isDef = any => any !== undefined;\n\nconst round = (number, precision) => {\n let factor = Math.pow(10, precision);\n return Math.round(number * factor) / factor;\n};\n/**\n * NumberPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {String} [opts.style='default'] Render style\n * @param {Number} [opts.initial] Default value\n * @param {Number} [opts.max=+Infinity] Max value\n * @param {Number} [opts.min=-Infinity] Min value\n * @param {Boolean} [opts.float=false] Parse input as floats\n * @param {Number} [opts.round=2] Round floats to x decimals\n * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys\n * @param {Function} [opts.validate] Validate function\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.error] The invalid error label\n */\n\n\nclass NumberPrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.transform = style.render(opts.style);\n this.msg = opts.message;\n this.initial = isDef(opts.initial) ? opts.initial : '';\n this.float = !!opts.float;\n this.round = opts.round || 2;\n this.inc = opts.increment || 1;\n this.min = isDef(opts.min) ? opts.min : -Infinity;\n this.max = isDef(opts.max) ? opts.max : Infinity;\n this.errorMsg = opts.error || `Please Enter A Valid Value`;\n\n this.validator = opts.validate || (() => true);\n\n this.color = `cyan`;\n this.value = ``;\n this.typed = ``;\n this.lastHit = 0;\n this.render();\n }\n\n set value(v) {\n if (!v && v !== 0) {\n this.placeholder = true;\n this.rendered = color.gray(this.transform.render(`${this.initial}`));\n this._value = ``;\n } else {\n this.placeholder = false;\n this.rendered = this.transform.render(`${round(v, this.round)}`);\n this._value = round(v, this.round);\n }\n\n this.fire();\n }\n\n get value() {\n return this._value;\n }\n\n parse(x) {\n return this.float ? parseFloat(x) : parseInt(x);\n }\n\n valid(c) {\n return c === `-` || c === `.` && this.float || isNumber.test(c);\n }\n\n reset() {\n this.typed = ``;\n this.value = ``;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n let x = this.value;\n this.value = x !== `` ? x : this.initial;\n this.done = this.aborted = true;\n this.error = false;\n this.fire();\n this.render();\n this.out.write(`\\n`);\n this.close();\n }\n\n validate() {\n var _this = this;\n\n return _asyncToGenerator(function* () {\n let valid = yield _this.validator(_this.value);\n\n if (typeof valid === `string`) {\n _this.errorMsg = valid;\n valid = false;\n }\n\n _this.error = !valid;\n })();\n }\n\n submit() {\n var _this2 = this;\n\n return _asyncToGenerator(function* () {\n yield _this2.validate();\n\n if (_this2.error) {\n _this2.color = `red`;\n\n _this2.fire();\n\n _this2.render();\n\n return;\n }\n\n let x = _this2.value;\n _this2.value = x !== `` ? x : _this2.initial;\n _this2.done = true;\n _this2.aborted = false;\n _this2.error = false;\n\n _this2.fire();\n\n _this2.render();\n\n _this2.out.write(`\\n`);\n\n _this2.close();\n })();\n }\n\n up() {\n this.typed = ``;\n\n if (this.value === '') {\n this.value = this.min - this.inc;\n }\n\n if (this.value >= this.max) return this.bell();\n this.value += this.inc;\n this.color = `cyan`;\n this.fire();\n this.render();\n }\n\n down() {\n this.typed = ``;\n\n if (this.value === '') {\n this.value = this.min + this.inc;\n }\n\n if (this.value <= this.min) return this.bell();\n this.value -= this.inc;\n this.color = `cyan`;\n this.fire();\n this.render();\n }\n\n delete() {\n let val = this.value.toString();\n if (val.length === 0) return this.bell();\n this.value = this.parse(val = val.slice(0, -1)) || ``;\n\n if (this.value !== '' && this.value < this.min) {\n this.value = this.min;\n }\n\n this.color = `cyan`;\n this.fire();\n this.render();\n }\n\n next() {\n this.value = this.initial;\n this.fire();\n this.render();\n }\n\n _(c, key) {\n if (!this.valid(c)) return this.bell();\n const now = Date.now();\n if (now - this.lastHit > 1000) this.typed = ``; // 1s elapsed\n\n this.typed += c;\n this.lastHit = now;\n this.color = `cyan`;\n if (c === `.`) return this.fire();\n this.value = Math.min(this.parse(this.typed), this.max);\n if (this.value > this.max) this.value = this.max;\n if (this.value < this.min) this.value = this.min;\n this.fire();\n this.render();\n }\n\n render() {\n if (this.closed) return;\n\n if (!this.firstRender) {\n if (this.outputError) this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));\n this.out.write(clear(this.outputText, this.out.columns));\n }\n\n super.render();\n this.outputError = ''; // Print prompt\n\n this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), !this.done || !this.done && !this.placeholder ? color[this.color]().underline(this.rendered) : this.rendered].join(` `); // Print error\n\n if (this.error) {\n this.outputError += this.errorMsg.split(`\\n`).reduce((a, l, i) => a + `\\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore);\n }\n\n}\n\nmodule.exports = NumberPrompt;","'use strict';\n\nconst color = require('kleur');\n\nconst _require = require('sisteransi'),\n cursor = _require.cursor;\n\nconst Prompt = require('./prompt');\n\nconst _require2 = require('../util'),\n clear = _require2.clear,\n figures = _require2.figures,\n style = _require2.style,\n wrap = _require2.wrap,\n entriesToDisplay = _require2.entriesToDisplay;\n/**\n * MultiselectPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of choice objects\n * @param {String} [opts.hint] Hint to display\n * @param {String} [opts.warn] Hint shown for disabled choices\n * @param {Number} [opts.max] Max choices\n * @param {Number} [opts.cursor=0] Cursor start position\n * @param {Number} [opts.optionsPerPage=10] Max options to display at once\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\n\n\nclass MultiselectPrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.msg = opts.message;\n this.cursor = opts.cursor || 0;\n this.scrollIndex = opts.cursor || 0;\n this.hint = opts.hint || '';\n this.warn = opts.warn || '- This option is disabled -';\n this.minSelected = opts.min;\n this.showMinError = false;\n this.maxChoices = opts.max;\n this.instructions = opts.instructions;\n this.optionsPerPage = opts.optionsPerPage || 10;\n this.value = opts.choices.map((ch, idx) => {\n if (typeof ch === 'string') ch = {\n title: ch,\n value: idx\n };\n return {\n title: ch && (ch.title || ch.value || ch),\n description: ch && ch.description,\n value: ch && (ch.value === undefined ? idx : ch.value),\n selected: ch && ch.selected,\n disabled: ch && ch.disabled\n };\n });\n this.clear = clear('', this.out.columns);\n\n if (!opts.overrideRender) {\n this.render();\n }\n }\n\n reset() {\n this.value.map(v => !v.selected);\n this.cursor = 0;\n this.fire();\n this.render();\n }\n\n selected() {\n return this.value.filter(v => v.selected);\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n const selected = this.value.filter(e => e.selected);\n\n if (this.minSelected && selected.length < this.minSelected) {\n this.showMinError = true;\n this.render();\n } else {\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n }\n\n first() {\n this.cursor = 0;\n this.render();\n }\n\n last() {\n this.cursor = this.value.length - 1;\n this.render();\n }\n\n next() {\n this.cursor = (this.cursor + 1) % this.value.length;\n this.render();\n }\n\n up() {\n if (this.cursor === 0) {\n this.cursor = this.value.length - 1;\n } else {\n this.cursor--;\n }\n\n this.render();\n }\n\n down() {\n if (this.cursor === this.value.length - 1) {\n this.cursor = 0;\n } else {\n this.cursor++;\n }\n\n this.render();\n }\n\n left() {\n this.value[this.cursor].selected = false;\n this.render();\n }\n\n right() {\n if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell();\n this.value[this.cursor].selected = true;\n this.render();\n }\n\n handleSpaceToggle() {\n const v = this.value[this.cursor];\n\n if (v.selected) {\n v.selected = false;\n this.render();\n } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) {\n return this.bell();\n } else {\n v.selected = true;\n this.render();\n }\n }\n\n toggleAll() {\n if (this.maxChoices !== undefined || this.value[this.cursor].disabled) {\n return this.bell();\n }\n\n const newSelected = !this.value[this.cursor].selected;\n this.value.filter(v => !v.disabled).forEach(v => v.selected = newSelected);\n this.render();\n }\n\n _(c, key) {\n if (c === ' ') {\n this.handleSpaceToggle();\n } else if (c === 'a') {\n this.toggleAll();\n } else {\n return this.bell();\n }\n }\n\n renderInstructions() {\n if (this.instructions === undefined || this.instructions) {\n if (typeof this.instructions === 'string') {\n return this.instructions;\n }\n\n return '\\nInstructions:\\n' + ` ${figures.arrowUp}/${figures.arrowDown}: Highlight option\\n` + ` ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection\\n` + (this.maxChoices === undefined ? ` a: Toggle all\\n` : '') + ` enter/return: Complete answer`;\n }\n\n return '';\n }\n\n renderOption(cursor, v, i, arrowIndicator) {\n const prefix = (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + arrowIndicator + ' ';\n let title, desc;\n\n if (v.disabled) {\n title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);\n } else {\n title = cursor === i ? color.cyan().underline(v.title) : v.title;\n\n if (cursor === i && v.description) {\n desc = ` - ${v.description}`;\n\n if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\\r?\\n/).length > 1) {\n desc = '\\n' + wrap(v.description, {\n margin: prefix.length,\n width: this.out.columns\n });\n }\n }\n }\n\n return prefix + title + color.gray(desc || '');\n } // shared with autocompleteMultiselect\n\n\n paginateOptions(options) {\n if (options.length === 0) {\n return color.red('No matches for this query.');\n }\n\n let _entriesToDisplay = entriesToDisplay(this.cursor, options.length, this.optionsPerPage),\n startIndex = _entriesToDisplay.startIndex,\n endIndex = _entriesToDisplay.endIndex;\n\n let prefix,\n styledOptions = [];\n\n for (let i = startIndex; i < endIndex; i++) {\n if (i === startIndex && startIndex > 0) {\n prefix = figures.arrowUp;\n } else if (i === endIndex - 1 && endIndex < options.length) {\n prefix = figures.arrowDown;\n } else {\n prefix = ' ';\n }\n\n styledOptions.push(this.renderOption(this.cursor, options[i], i, prefix));\n }\n\n return '\\n' + styledOptions.join('\\n');\n } // shared with autocomleteMultiselect\n\n\n renderOptions(options) {\n if (!this.done) {\n return this.paginateOptions(options);\n }\n\n return '';\n }\n\n renderDoneOrInstructions() {\n if (this.done) {\n return this.value.filter(e => e.selected).map(v => v.title).join(', ');\n }\n\n const output = [color.gray(this.hint), this.renderInstructions()];\n\n if (this.value[this.cursor].disabled) {\n output.push(color.yellow(this.warn));\n }\n\n return output.join(' ');\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n super.render(); // print prompt\n\n let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(' ');\n\n if (this.showMinError) {\n prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);\n this.showMinError = false;\n }\n\n prompt += this.renderOptions(this.value);\n this.out.write(this.clear + prompt);\n this.clear = clear(prompt, this.out.columns);\n }\n\n}\n\nmodule.exports = MultiselectPrompt;","'use strict';\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nconst color = require('kleur');\n\nconst Prompt = require('./prompt');\n\nconst _require = require('sisteransi'),\n erase = _require.erase,\n cursor = _require.cursor;\n\nconst _require2 = require('../util'),\n style = _require2.style,\n clear = _require2.clear,\n figures = _require2.figures,\n wrap = _require2.wrap,\n entriesToDisplay = _require2.entriesToDisplay;\n\nconst getVal = (arr, i) => arr[i] && (arr[i].value || arr[i].title || arr[i]);\n\nconst getTitle = (arr, i) => arr[i] && (arr[i].title || arr[i].value || arr[i]);\n\nconst getIndex = (arr, valOrTitle) => {\n const index = arr.findIndex(el => el.value === valOrTitle || el.title === valOrTitle);\n return index > -1 ? index : undefined;\n};\n/**\n * TextPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of auto-complete choices objects\n * @param {Function} [opts.suggest] Filter function. Defaults to sort by title\n * @param {Number} [opts.limit=10] Max number of results to show\n * @param {Number} [opts.cursor=0] Cursor start position\n * @param {String} [opts.style='default'] Render style\n * @param {String} [opts.fallback] Fallback message - initial to default value\n * @param {String} [opts.initial] Index of the default value\n * @param {Boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.noMatches] The no matches found label\n */\n\n\nclass AutocompletePrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.msg = opts.message;\n this.suggest = opts.suggest;\n this.choices = opts.choices;\n this.initial = typeof opts.initial === 'number' ? opts.initial : getIndex(opts.choices, opts.initial);\n this.select = this.initial || opts.cursor || 0;\n this.i18n = {\n noMatches: opts.noMatches || 'no matches found'\n };\n this.fallback = opts.fallback || this.initial;\n this.clearFirst = opts.clearFirst || false;\n this.suggestions = [];\n this.input = '';\n this.limit = opts.limit || 10;\n this.cursor = 0;\n this.transform = style.render(opts.style);\n this.scale = this.transform.scale;\n this.render = this.render.bind(this);\n this.complete = this.complete.bind(this);\n this.clear = clear('', this.out.columns);\n this.complete(this.render);\n this.render();\n }\n\n set fallback(fb) {\n this._fb = Number.isSafeInteger(parseInt(fb)) ? parseInt(fb) : fb;\n }\n\n get fallback() {\n let choice;\n if (typeof this._fb === 'number') choice = this.choices[this._fb];else if (typeof this._fb === 'string') choice = {\n title: this._fb\n };\n return choice || this._fb || {\n title: this.i18n.noMatches\n };\n }\n\n moveSelect(i) {\n this.select = i;\n if (this.suggestions.length > 0) this.value = getVal(this.suggestions, i);else this.value = this.fallback.value;\n this.fire();\n }\n\n complete(cb) {\n var _this = this;\n\n return _asyncToGenerator(function* () {\n const p = _this.completing = _this.suggest(_this.input, _this.choices);\n\n const suggestions = yield p;\n if (_this.completing !== p) return;\n _this.suggestions = suggestions.map((s, i, arr) => ({\n title: getTitle(arr, i),\n value: getVal(arr, i),\n description: s.description\n }));\n _this.completing = false;\n const l = Math.max(suggestions.length - 1, 0);\n\n _this.moveSelect(Math.min(l, _this.select));\n\n cb && cb();\n })();\n }\n\n reset() {\n this.input = '';\n this.complete(() => {\n this.moveSelect(this.initial !== void 0 ? this.initial : 0);\n this.render();\n });\n this.render();\n }\n\n exit() {\n if (this.clearFirst && this.input.length > 0) {\n this.reset();\n } else {\n this.done = this.exited = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n }\n\n abort() {\n this.done = this.aborted = true;\n this.exited = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n this.done = true;\n this.aborted = this.exited = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n _(c, key) {\n let s1 = this.input.slice(0, this.cursor);\n let s2 = this.input.slice(this.cursor);\n this.input = `${s1}${c}${s2}`;\n this.cursor = s1.length + 1;\n this.complete(this.render);\n this.render();\n }\n\n delete() {\n if (this.cursor === 0) return this.bell();\n let s1 = this.input.slice(0, this.cursor - 1);\n let s2 = this.input.slice(this.cursor);\n this.input = `${s1}${s2}`;\n this.complete(this.render);\n this.cursor = this.cursor - 1;\n this.render();\n }\n\n deleteForward() {\n if (this.cursor * this.scale >= this.rendered.length) return this.bell();\n let s1 = this.input.slice(0, this.cursor);\n let s2 = this.input.slice(this.cursor + 1);\n this.input = `${s1}${s2}`;\n this.complete(this.render);\n this.render();\n }\n\n first() {\n this.moveSelect(0);\n this.render();\n }\n\n last() {\n this.moveSelect(this.suggestions.length - 1);\n this.render();\n }\n\n up() {\n if (this.select === 0) {\n this.moveSelect(this.suggestions.length - 1);\n } else {\n this.moveSelect(this.select - 1);\n }\n\n this.render();\n }\n\n down() {\n if (this.select === this.suggestions.length - 1) {\n this.moveSelect(0);\n } else {\n this.moveSelect(this.select + 1);\n }\n\n this.render();\n }\n\n next() {\n if (this.select === this.suggestions.length - 1) {\n this.moveSelect(0);\n } else this.moveSelect(this.select + 1);\n\n this.render();\n }\n\n nextPage() {\n this.moveSelect(Math.min(this.select + this.limit, this.suggestions.length - 1));\n this.render();\n }\n\n prevPage() {\n this.moveSelect(Math.max(this.select - this.limit, 0));\n this.render();\n }\n\n left() {\n if (this.cursor <= 0) return this.bell();\n this.cursor = this.cursor - 1;\n this.render();\n }\n\n right() {\n if (this.cursor * this.scale >= this.rendered.length) return this.bell();\n this.cursor = this.cursor + 1;\n this.render();\n }\n\n renderOption(v, hovered, isStart, isEnd) {\n let desc;\n let prefix = isStart ? figures.arrowUp : isEnd ? figures.arrowDown : ' ';\n let title = hovered ? color.cyan().underline(v.title) : v.title;\n prefix = (hovered ? color.cyan(figures.pointer) + ' ' : ' ') + prefix;\n\n if (v.description) {\n desc = ` - ${v.description}`;\n\n if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\\r?\\n/).length > 1) {\n desc = '\\n' + wrap(v.description, {\n margin: 3,\n width: this.out.columns\n });\n }\n }\n\n return prefix + ' ' + title + color.gray(desc || '');\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n\n let _entriesToDisplay = entriesToDisplay(this.select, this.choices.length, this.limit),\n startIndex = _entriesToDisplay.startIndex,\n endIndex = _entriesToDisplay.endIndex;\n\n this.outputText = [style.symbol(this.done, this.aborted, this.exited), color.bold(this.msg), style.delimiter(this.completing), this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)].join(' ');\n\n if (!this.done) {\n const suggestions = this.suggestions.slice(startIndex, endIndex).map((item, i) => this.renderOption(item, this.select === i + startIndex, i === 0 && startIndex > 0, i + startIndex === endIndex - 1 && endIndex < this.choices.length)).join('\\n');\n this.outputText += `\\n` + (suggestions || color.gray(this.fallback.title));\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n\n}\n\nmodule.exports = AutocompletePrompt;","'use strict';\n\nconst color = require('kleur');\n\nconst _require = require('sisteransi'),\n cursor = _require.cursor;\n\nconst MultiselectPrompt = require('./multiselect');\n\nconst _require2 = require('../util'),\n clear = _require2.clear,\n style = _require2.style,\n figures = _require2.figures;\n/**\n * MultiselectPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of choice objects\n * @param {String} [opts.hint] Hint to display\n * @param {String} [opts.warn] Hint shown for disabled choices\n * @param {Number} [opts.max] Max choices\n * @param {Number} [opts.cursor=0] Cursor start position\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\n\n\nclass AutocompleteMultiselectPrompt extends MultiselectPrompt {\n constructor(opts = {}) {\n opts.overrideRender = true;\n super(opts);\n this.inputValue = '';\n this.clear = clear('', this.out.columns);\n this.filteredOptions = this.value;\n this.render();\n }\n\n last() {\n this.cursor = this.filteredOptions.length - 1;\n this.render();\n }\n\n next() {\n this.cursor = (this.cursor + 1) % this.filteredOptions.length;\n this.render();\n }\n\n up() {\n if (this.cursor === 0) {\n this.cursor = this.filteredOptions.length - 1;\n } else {\n this.cursor--;\n }\n\n this.render();\n }\n\n down() {\n if (this.cursor === this.filteredOptions.length - 1) {\n this.cursor = 0;\n } else {\n this.cursor++;\n }\n\n this.render();\n }\n\n left() {\n this.filteredOptions[this.cursor].selected = false;\n this.render();\n }\n\n right() {\n if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell();\n this.filteredOptions[this.cursor].selected = true;\n this.render();\n }\n\n delete() {\n if (this.inputValue.length) {\n this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1);\n this.updateFilteredOptions();\n }\n }\n\n updateFilteredOptions() {\n const currentHighlight = this.filteredOptions[this.cursor];\n this.filteredOptions = this.value.filter(v => {\n if (this.inputValue) {\n if (typeof v.title === 'string') {\n if (v.title.toLowerCase().includes(this.inputValue.toLowerCase())) {\n return true;\n }\n }\n\n if (typeof v.value === 'string') {\n if (v.value.toLowerCase().includes(this.inputValue.toLowerCase())) {\n return true;\n }\n }\n\n return false;\n }\n\n return true;\n });\n const newHighlightIndex = this.filteredOptions.findIndex(v => v === currentHighlight);\n this.cursor = newHighlightIndex < 0 ? 0 : newHighlightIndex;\n this.render();\n }\n\n handleSpaceToggle() {\n const v = this.filteredOptions[this.cursor];\n\n if (v.selected) {\n v.selected = false;\n this.render();\n } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) {\n return this.bell();\n } else {\n v.selected = true;\n this.render();\n }\n }\n\n handleInputChange(c) {\n this.inputValue = this.inputValue + c;\n this.updateFilteredOptions();\n }\n\n _(c, key) {\n if (c === ' ') {\n this.handleSpaceToggle();\n } else {\n this.handleInputChange(c);\n }\n }\n\n renderInstructions() {\n if (this.instructions === undefined || this.instructions) {\n if (typeof this.instructions === 'string') {\n return this.instructions;\n }\n\n return `\nInstructions:\n ${figures.arrowUp}/${figures.arrowDown}: Highlight option\n ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`;\n }\n\n return '';\n }\n\n renderCurrentInput() {\n return `\nFiltered results for: ${this.inputValue ? this.inputValue : color.gray('Enter something to filter')}\\n`;\n }\n\n renderOption(cursor, v, i) {\n let title;\n if (v.disabled) title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);else title = cursor === i ? color.cyan().underline(v.title) : v.title;\n return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + title;\n }\n\n renderDoneOrInstructions() {\n if (this.done) {\n return this.value.filter(e => e.selected).map(v => v.title).join(', ');\n }\n\n const output = [color.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()];\n\n if (this.filteredOptions.length && this.filteredOptions[this.cursor].disabled) {\n output.push(color.yellow(this.warn));\n }\n\n return output.join(' ');\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n super.render(); // print prompt\n\n let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(' ');\n\n if (this.showMinError) {\n prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);\n this.showMinError = false;\n }\n\n prompt += this.renderOptions(this.filteredOptions);\n this.out.write(this.clear + prompt);\n this.clear = clear(prompt, this.out.columns);\n }\n\n}\n\nmodule.exports = AutocompleteMultiselectPrompt;","\"use strict\";\n\nconst color = require('kleur');\n\nconst Prompt = require('./prompt');\n\nconst _require = require('../util'),\n style = _require.style,\n clear = _require.clear;\n\nconst _require2 = require('sisteransi'),\n erase = _require2.erase,\n cursor = _require2.cursor;\n/**\n * ConfirmPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Boolean} [opts.initial] Default value (true/false)\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.yes] The \"Yes\" label\n * @param {String} [opts.yesOption] The \"Yes\" option when choosing between yes/no\n * @param {String} [opts.no] The \"No\" label\n * @param {String} [opts.noOption] The \"No\" option when choosing between yes/no\n */\n\n\nclass ConfirmPrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.msg = opts.message;\n this.value = opts.initial;\n this.initialValue = !!opts.initial;\n this.yesMsg = opts.yes || 'yes';\n this.yesOption = opts.yesOption || '(Y/n)';\n this.noMsg = opts.no || 'no';\n this.noOption = opts.noOption || '(y/N)';\n this.render();\n }\n\n reset() {\n this.value = this.initialValue;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n this.value = this.value || false;\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n _(c, key) {\n if (c.toLowerCase() === 'y') {\n this.value = true;\n return this.submit();\n }\n\n if (c.toLowerCase() === 'n') {\n this.value = false;\n return this.submit();\n }\n\n return this.bell();\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.done ? this.value ? this.yesMsg : this.noMsg : color.gray(this.initialValue ? this.yesOption : this.noOption)].join(' ');\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n\n}\n\nmodule.exports = ConfirmPrompt;","'use strict';\n\nmodule.exports = {\n TextPrompt: require('./text'),\n SelectPrompt: require('./select'),\n TogglePrompt: require('./toggle'),\n DatePrompt: require('./date'),\n NumberPrompt: require('./number'),\n MultiselectPrompt: require('./multiselect'),\n AutocompletePrompt: require('./autocomplete'),\n AutocompleteMultiselectPrompt: require('./autocompleteMultiselect'),\n ConfirmPrompt: require('./confirm')\n};","'use strict';\n\nconst $ = exports;\n\nconst el = require('./elements');\n\nconst noop = v => v;\n\nfunction toPrompt(type, args, opts = {}) {\n return new Promise((res, rej) => {\n const p = new el[type](args);\n const onAbort = opts.onAbort || noop;\n const onSubmit = opts.onSubmit || noop;\n const onExit = opts.onExit || noop;\n p.on('state', args.onState || noop);\n p.on('submit', x => res(onSubmit(x)));\n p.on('exit', x => res(onExit(x)));\n p.on('abort', x => rej(onAbort(x)));\n });\n}\n/**\n * Text prompt\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {function} [args.onState] On state change callback\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.text = args => toPrompt('TextPrompt', args);\n/**\n * Password prompt with masked input\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {function} [args.onState] On state change callback\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.password = args => {\n args.style = 'password';\n return $.text(args);\n};\n/**\n * Prompt where input is invisible, like sudo\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {function} [args.onState] On state change callback\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.invisible = args => {\n args.style = 'invisible';\n return $.text(args);\n};\n/**\n * Number prompt\n * @param {string} args.message Prompt message to display\n * @param {number} args.initial Default number value\n * @param {function} [args.onState] On state change callback\n * @param {number} [args.max] Max value\n * @param {number} [args.min] Min value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {Boolean} [opts.float=false] Parse input as floats\n * @param {Number} [opts.round=2] Round floats to x decimals\n * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.number = args => toPrompt('NumberPrompt', args);\n/**\n * Date prompt\n * @param {string} args.message Prompt message to display\n * @param {number} args.initial Default number value\n * @param {function} [args.onState] On state change callback\n * @param {number} [args.max] Max value\n * @param {number} [args.min] Min value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {Boolean} [opts.float=false] Parse input as floats\n * @param {Number} [opts.round=2] Round floats to x decimals\n * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.date = args => toPrompt('DatePrompt', args);\n/**\n * Classic yes/no prompt\n * @param {string} args.message Prompt message to display\n * @param {boolean} [args.initial=false] Default value\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.confirm = args => toPrompt('ConfirmPrompt', args);\n/**\n * List prompt, split intput string by `seperator`\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {string} [args.separator] String separator\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input, in form of an `Array`\n */\n\n\n$.list = args => {\n const sep = args.separator || ',';\n return toPrompt('TextPrompt', args, {\n onSubmit: str => str.split(sep).map(s => s.trim())\n });\n};\n/**\n * Toggle/switch prompt\n * @param {string} args.message Prompt message to display\n * @param {boolean} [args.initial=false] Default value\n * @param {string} [args.active=\"on\"] Text for `active` state\n * @param {string} [args.inactive=\"off\"] Text for `inactive` state\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.toggle = args => toPrompt('TogglePrompt', args);\n/**\n * Interactive select prompt\n * @param {string} args.message Prompt message to display\n * @param {Array} args.choices Array of choices objects `[{ title, value }, ...]`\n * @param {number} [args.initial] Index of default value\n * @param {String} [args.hint] Hint to display\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.select = args => toPrompt('SelectPrompt', args);\n/**\n * Interactive multi-select / autocompleteMultiselect prompt\n * @param {string} args.message Prompt message to display\n * @param {Array} args.choices Array of choices objects `[{ title, value, [selected] }, ...]`\n * @param {number} [args.max] Max select\n * @param {string} [args.hint] Hint to display user\n * @param {Number} [args.cursor=0] Cursor start position\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.multiselect = args => {\n args.choices = [].concat(args.choices || []);\n\n const toSelected = items => items.filter(item => item.selected).map(item => item.value);\n\n return toPrompt('MultiselectPrompt', args, {\n onAbort: toSelected,\n onSubmit: toSelected\n });\n};\n\n$.autocompleteMultiselect = args => {\n args.choices = [].concat(args.choices || []);\n\n const toSelected = items => items.filter(item => item.selected).map(item => item.value);\n\n return toPrompt('AutocompleteMultiselectPrompt', args, {\n onAbort: toSelected,\n onSubmit: toSelected\n });\n};\n\nconst byTitle = (input, choices) => Promise.resolve(choices.filter(item => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase()));\n/**\n * Interactive auto-complete prompt\n * @param {string} args.message Prompt message to display\n * @param {Array} args.choices Array of auto-complete choices objects `[{ title, value }, ...]`\n * @param {Function} [args.suggest] Function to filter results based on user input. Defaults to sort by `title`\n * @param {number} [args.limit=10] Max number of results to show\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {String} [args.initial] Index of the default value\n * @param {boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input\n * @param {String} [args.fallback] Fallback message - defaults to initial value\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.autocomplete = args => {\n args.suggest = args.suggest || byTitle;\n args.choices = [].concat(args.choices || []);\n return toPrompt('AutocompletePrompt', args);\n};","'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nconst prompts = require('./prompts');\n\nconst passOn = ['suggest', 'format', 'onState', 'validate', 'onRender', 'type'];\n\nconst noop = () => {};\n/**\n * Prompt for a series of questions\n * @param {Array|Object} questions Single question object or Array of question objects\n * @param {Function} [onSubmit] Callback function called on prompt submit\n * @param {Function} [onCancel] Callback function called on cancel/abort\n * @returns {Object} Object with values from user input\n */\n\n\nfunction prompt() {\n return _prompt.apply(this, arguments);\n}\n\nfunction _prompt() {\n _prompt = _asyncToGenerator(function* (questions = [], {\n onSubmit = noop,\n onCancel = noop\n } = {}) {\n const answers = {};\n const override = prompt._override || {};\n questions = [].concat(questions);\n let answer, question, quit, name, type, lastPrompt;\n\n const getFormattedAnswer = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (question, answer, skipValidation = false) {\n if (!skipValidation && question.validate && question.validate(answer) !== true) {\n return;\n }\n\n return question.format ? yield question.format(answer, answers) : answer;\n });\n\n return function getFormattedAnswer(_x, _x2) {\n return _ref.apply(this, arguments);\n };\n }();\n\n var _iterator = _createForOfIteratorHelper(questions),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n question = _step.value;\n var _question = question;\n name = _question.name;\n type = _question.type;\n\n // evaluate type first and skip if type is a falsy value\n if (typeof type === 'function') {\n type = yield type(answer, _objectSpread({}, answers), question);\n question['type'] = type;\n }\n\n if (!type) continue; // if property is a function, invoke it unless it's a special function\n\n for (let key in question) {\n if (passOn.includes(key)) continue;\n let value = question[key];\n question[key] = typeof value === 'function' ? yield value(answer, _objectSpread({}, answers), lastPrompt) : value;\n }\n\n lastPrompt = question;\n\n if (typeof question.message !== 'string') {\n throw new Error('prompt message is required');\n } // update vars in case they changed\n\n\n var _question2 = question;\n name = _question2.name;\n type = _question2.type;\n\n if (prompts[type] === void 0) {\n throw new Error(`prompt type (${type}) is not defined`);\n }\n\n if (override[question.name] !== undefined) {\n answer = yield getFormattedAnswer(question, override[question.name]);\n\n if (answer !== undefined) {\n answers[name] = answer;\n continue;\n }\n }\n\n try {\n // Get the injected answer if there is one or prompt the user\n answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : yield prompts[type](question);\n answers[name] = answer = yield getFormattedAnswer(question, answer, true);\n quit = yield onSubmit(question, answer, answers);\n } catch (err) {\n quit = !(yield onCancel(question, answers));\n }\n\n if (quit) return answers;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return answers;\n });\n return _prompt.apply(this, arguments);\n}\n\nfunction getInjectedAnswer(injected, deafultValue) {\n const answer = injected.shift();\n\n if (answer instanceof Error) {\n throw answer;\n }\n\n return answer === undefined ? deafultValue : answer;\n}\n\nfunction inject(answers) {\n prompt._injected = (prompt._injected || []).concat(answers);\n}\n\nfunction override(answers) {\n prompt._override = Object.assign({}, answers);\n}\n\nmodule.exports = Object.assign(prompt, {\n prompt,\n prompts,\n inject,\n override\n});","'use strict';\n\nmodule.exports = (key, isSelect) => {\n if (key.meta && key.name !== 'escape') return;\n \n if (key.ctrl) {\n if (key.name === 'a') return 'first';\n if (key.name === 'c') return 'abort';\n if (key.name === 'd') return 'abort';\n if (key.name === 'e') return 'last';\n if (key.name === 'g') return 'reset';\n }\n \n if (isSelect) {\n if (key.name === 'j') return 'down';\n if (key.name === 'k') return 'up';\n }\n\n if (key.name === 'return') return 'submit';\n if (key.name === 'enter') return 'submit'; // ctrl + J\n if (key.name === 'backspace') return 'delete';\n if (key.name === 'delete') return 'deleteForward';\n if (key.name === 'abort') return 'abort';\n if (key.name === 'escape') return 'exit';\n if (key.name === 'tab') return 'next';\n if (key.name === 'pagedown') return 'nextPage';\n if (key.name === 'pageup') return 'prevPage';\n // TODO create home() in prompt types (e.g. TextPrompt)\n if (key.name === 'home') return 'home';\n // TODO create end() in prompt types (e.g. TextPrompt)\n if (key.name === 'end') return 'end';\n\n if (key.name === 'up') return 'up';\n if (key.name === 'down') return 'down';\n if (key.name === 'right') return 'right';\n if (key.name === 'left') return 'left';\n\n return false;\n};\n","'use strict';\n\nmodule.exports = str => {\n const pattern = [\n '[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)',\n '(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PRZcf-ntqry=><~]))'\n ].join('|');\n\n const RGX = new RegExp(pattern, 'g');\n return typeof str === 'string' ? str.replace(RGX, '') : str;\n};\n","'use strict';\n\nconst strip = require('./strip');\nconst { erase, cursor } = require('sisteransi');\n\nconst width = str => [...strip(str)].length;\n\n/**\n * @param {string} prompt\n * @param {number} perLine\n */\nmodule.exports = function(prompt, perLine) {\n if (!perLine) return erase.line + cursor.to(0);\n\n let rows = 0;\n const lines = prompt.split(/\\r?\\n/);\n for (let line of lines) {\n rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / perLine);\n }\n\n return erase.lines(rows);\n};\n","'use strict';\t\n\n const main = {\n arrowUp: '↑',\n arrowDown: '↓',\n arrowLeft: '←',\n arrowRight: '→',\n radioOn: '◉',\n radioOff: '◯',\n tick: '✔',\t\n cross: '✖',\t\n ellipsis: '…',\t\n pointerSmall: '›',\t\n line: '─',\t\n pointer: '❯'\t\n};\t\nconst win = {\n arrowUp: main.arrowUp,\n arrowDown: main.arrowDown,\n arrowLeft: main.arrowLeft,\n arrowRight: main.arrowRight,\n radioOn: '(*)',\n radioOff: '( )',\t\n tick: '√',\t\n cross: '×',\t\n ellipsis: '...',\t\n pointerSmall: '»',\t\n line: '─',\t\n pointer: '>'\t\n};\t\nconst figures = process.platform === 'win32' ? win : main;\t\n\n module.exports = figures;\n","'use strict';\n\nconst c = require('kleur');\nconst figures = require('./figures');\n\n// rendering user input.\nconst styles = Object.freeze({\n password: { scale: 1, render: input => '*'.repeat(input.length) },\n emoji: { scale: 2, render: input => '😃'.repeat(input.length) },\n invisible: { scale: 0, render: input => '' },\n default: { scale: 1, render: input => `${input}` }\n});\nconst render = type => styles[type] || styles.default;\n\n// icon to signalize a prompt.\nconst symbols = Object.freeze({\n aborted: c.red(figures.cross),\n done: c.green(figures.tick),\n exited: c.yellow(figures.cross),\n default: c.cyan('?')\n});\n\nconst symbol = (done, aborted, exited) =>\n aborted ? symbols.aborted : exited ? symbols.exited : done ? symbols.done : symbols.default;\n\n// between the question and the user's input.\nconst delimiter = completing =>\n c.gray(completing ? figures.ellipsis : figures.pointerSmall);\n\nconst item = (expandable, expanded) =>\n c.gray(expandable ? (expanded ? figures.pointerSmall : '+') : figures.line);\n\nmodule.exports = {\n styles,\n render,\n symbols,\n symbol,\n delimiter,\n item\n};\n","'use strict';\n\nconst strip = require('./strip');\n\n/**\n * @param {string} msg\n * @param {number} perLine\n */\nmodule.exports = function (msg, perLine) {\n let lines = String(strip(msg) || '').split(/\\r?\\n/);\n\n if (!perLine) return lines.length;\n return lines.map(l => Math.ceil(l.length / perLine))\n .reduce((a, b) => a + b);\n};\n","'use strict';\n\n/**\n * @param {string} msg The message to wrap\n * @param {object} opts\n * @param {number|string} [opts.margin] Left margin\n * @param {number} opts.width Maximum characters per line including the margin\n */\nmodule.exports = (msg, opts = {}) => {\n const tab = Number.isSafeInteger(parseInt(opts.margin))\n ? new Array(parseInt(opts.margin)).fill(' ').join('')\n : (opts.margin || '');\n\n const width = opts.width;\n\n return (msg || '').split(/\\r?\\n/g)\n .map(line => line\n .split(/\\s+/g)\n .reduce((arr, w) => {\n if (w.length + tab.length >= width || arr[arr.length - 1].length + w.length + 1 < width)\n arr[arr.length - 1] += ` ${w}`;\n else arr.push(`${tab}${w}`);\n return arr;\n }, [ tab ])\n .join('\\n'))\n .join('\\n');\n};\n","'use strict';\n\n/**\n * Determine what entries should be displayed on the screen, based on the\n * currently selected index and the maximum visible. Used in list-based\n * prompts like `select` and `multiselect`.\n *\n * @param {number} cursor the currently selected entry\n * @param {number} total the total entries available to display\n * @param {number} [maxVisible] the number of entries that can be displayed\n */\nmodule.exports = (cursor, total, maxVisible) => {\n maxVisible = maxVisible || total;\n\n let startIndex = Math.min(total- maxVisible, cursor - Math.floor(maxVisible / 2));\n if (startIndex < 0) startIndex = 0;\n\n let endIndex = Math.min(startIndex + maxVisible, total);\n\n return { startIndex, endIndex };\n};\n","'use strict';\n\nmodule.exports = {\n action: require('./action'),\n clear: require('./clear'),\n style: require('./style'),\n strip: require('./strip'),\n figures: require('./figures'),\n lines: require('./lines'),\n wrap: require('./wrap'),\n entriesToDisplay: require('./entriesToDisplay')\n};\n","'use strict';\n\nconst readline = require('readline');\nconst { action } = require('../util');\nconst EventEmitter = require('events');\nconst { beep, cursor } = require('sisteransi');\nconst color = require('kleur');\n\n/**\n * Base prompt skeleton\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\nclass Prompt extends EventEmitter {\n constructor(opts={}) {\n super();\n\n this.firstRender = true;\n this.in = opts.stdin || process.stdin;\n this.out = opts.stdout || process.stdout;\n this.onRender = (opts.onRender || (() => void 0)).bind(this);\n const rl = readline.createInterface({ input:this.in, escapeCodeTimeout:50 });\n readline.emitKeypressEvents(this.in, rl);\n\n if (this.in.isTTY) this.in.setRawMode(true);\n const isSelect = [ 'SelectPrompt', 'MultiselectPrompt' ].indexOf(this.constructor.name) > -1;\n const keypress = (str, key) => {\n let a = action(key, isSelect);\n if (a === false) {\n this._ && this._(str, key);\n } else if (typeof this[a] === 'function') {\n this[a](key);\n } else {\n this.bell();\n }\n };\n\n this.close = () => {\n this.out.write(cursor.show);\n this.in.removeListener('keypress', keypress);\n if (this.in.isTTY) this.in.setRawMode(false);\n rl.close();\n this.emit(this.aborted ? 'abort' : this.exited ? 'exit' : 'submit', this.value);\n this.closed = true;\n };\n\n this.in.on('keypress', keypress);\n }\n\n fire() {\n this.emit('state', {\n value: this.value,\n aborted: !!this.aborted,\n exited: !!this.exited\n });\n }\n\n bell() {\n this.out.write(beep);\n }\n\n render() {\n this.onRender(color);\n if (this.firstRender) this.firstRender = false;\n }\n}\n\nmodule.exports = Prompt;\n","const color = require('kleur');\nconst Prompt = require('./prompt');\nconst { erase, cursor } = require('sisteransi');\nconst { style, clear, lines, figures } = require('../util');\n\n/**\n * TextPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {String} [opts.style='default'] Render style\n * @param {String} [opts.initial] Default value\n * @param {Function} [opts.validate] Validate function\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.error] The invalid error label\n */\nclass TextPrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.transform = style.render(opts.style);\n this.scale = this.transform.scale;\n this.msg = opts.message;\n this.initial = opts.initial || ``;\n this.validator = opts.validate || (() => true);\n this.value = ``;\n this.errorMsg = opts.error || `Please Enter A Valid Value`;\n this.cursor = Number(!!this.initial);\n this.cursorOffset = 0;\n this.clear = clear(``, this.out.columns);\n this.render();\n }\n\n set value(v) {\n if (!v && this.initial) {\n this.placeholder = true;\n this.rendered = color.gray(this.transform.render(this.initial));\n } else {\n this.placeholder = false;\n this.rendered = this.transform.render(v);\n }\n this._value = v;\n this.fire();\n }\n\n get value() {\n return this._value;\n }\n\n reset() {\n this.value = ``;\n this.cursor = Number(!!this.initial);\n this.cursorOffset = 0;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.value = this.value || this.initial;\n this.done = this.aborted = true;\n this.error = false;\n this.red = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n async validate() {\n let valid = await this.validator(this.value);\n if (typeof valid === `string`) {\n this.errorMsg = valid;\n valid = false;\n }\n this.error = !valid;\n }\n\n async submit() {\n this.value = this.value || this.initial;\n this.cursorOffset = 0;\n this.cursor = this.rendered.length;\n await this.validate();\n if (this.error) {\n this.red = true;\n this.fire();\n this.render();\n return;\n }\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n next() {\n if (!this.placeholder) return this.bell();\n this.value = this.initial;\n this.cursor = this.rendered.length;\n this.fire();\n this.render();\n }\n\n moveCursor(n) {\n if (this.placeholder) return;\n this.cursor = this.cursor+n;\n this.cursorOffset += n;\n }\n\n _(c, key) {\n let s1 = this.value.slice(0, this.cursor);\n let s2 = this.value.slice(this.cursor);\n this.value = `${s1}${c}${s2}`;\n this.red = false;\n this.cursor = this.placeholder ? 0 : s1.length+1;\n this.render();\n }\n\n delete() {\n if (this.isCursorAtStart()) return this.bell();\n let s1 = this.value.slice(0, this.cursor-1);\n let s2 = this.value.slice(this.cursor);\n this.value = `${s1}${s2}`;\n this.red = false;\n if (this.isCursorAtStart()) {\n this.cursorOffset = 0\n } else {\n this.cursorOffset++;\n this.moveCursor(-1);\n }\n this.render();\n }\n\n deleteForward() {\n if(this.cursor*this.scale >= this.rendered.length || this.placeholder) return this.bell();\n let s1 = this.value.slice(0, this.cursor);\n let s2 = this.value.slice(this.cursor+1);\n this.value = `${s1}${s2}`;\n this.red = false;\n if (this.isCursorAtEnd()) {\n this.cursorOffset = 0;\n } else {\n this.cursorOffset++;\n }\n this.render();\n }\n\n first() {\n this.cursor = 0;\n this.render();\n }\n\n last() {\n this.cursor = this.value.length;\n this.render();\n }\n\n left() {\n if (this.cursor <= 0 || this.placeholder) return this.bell();\n this.moveCursor(-1);\n this.render();\n }\n\n right() {\n if (this.cursor*this.scale >= this.rendered.length || this.placeholder) return this.bell();\n this.moveCursor(1);\n this.render();\n }\n\n isCursorAtStart() {\n return this.cursor === 0 || (this.placeholder && this.cursor === 1);\n }\n\n isCursorAtEnd() {\n return this.cursor === this.rendered.length || (this.placeholder && this.cursor === this.rendered.length + 1)\n }\n\n render() {\n if (this.closed) return;\n if (!this.firstRender) {\n if (this.outputError)\n this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));\n this.out.write(clear(this.outputText, this.out.columns));\n }\n super.render();\n this.outputError = '';\n\n this.outputText = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(this.done),\n this.red ? color.red(this.rendered) : this.rendered\n ].join(` `);\n\n if (this.error) {\n this.outputError += this.errorMsg.split(`\\n`)\n .reduce((a, l, i) => a + `\\n${i ? ' ' : figures.pointerSmall} ${color.red().italic(l)}`, ``);\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0));\n }\n}\n\nmodule.exports = TextPrompt;","'use strict';\n\nconst color = require('kleur');\nconst Prompt = require('./prompt');\nconst { style, clear, figures, wrap, entriesToDisplay } = require('../util');\nconst { cursor } = require('sisteransi');\n\n/**\n * SelectPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of choice objects\n * @param {String} [opts.hint] Hint to display\n * @param {Number} [opts.initial] Index of default value\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {Number} [opts.optionsPerPage=10] Max options to display at once\n */\nclass SelectPrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.msg = opts.message;\n this.hint = opts.hint || '- Use arrow-keys. Return to submit.';\n this.warn = opts.warn || '- This option is disabled';\n this.cursor = opts.initial || 0;\n this.choices = opts.choices.map((ch, idx) => {\n if (typeof ch === 'string')\n ch = {title: ch, value: idx};\n return {\n title: ch && (ch.title || ch.value || ch),\n value: ch && (ch.value === undefined ? idx : ch.value),\n description: ch && ch.description,\n selected: ch && ch.selected,\n disabled: ch && ch.disabled\n };\n });\n this.optionsPerPage = opts.optionsPerPage || 10;\n this.value = (this.choices[this.cursor] || {}).value;\n this.clear = clear('', this.out.columns);\n this.render();\n }\n\n moveCursor(n) {\n this.cursor = n;\n this.value = this.choices[n].value;\n this.fire();\n }\n\n reset() {\n this.moveCursor(0);\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n if (!this.selection.disabled) {\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n } else\n this.bell();\n }\n\n first() {\n this.moveCursor(0);\n this.render();\n }\n\n last() {\n this.moveCursor(this.choices.length - 1);\n this.render();\n }\n\n up() {\n if (this.cursor === 0) {\n this.moveCursor(this.choices.length - 1);\n } else {\n this.moveCursor(this.cursor - 1);\n }\n this.render();\n }\n\n down() {\n if (this.cursor === this.choices.length - 1) {\n this.moveCursor(0);\n } else {\n this.moveCursor(this.cursor + 1);\n }\n this.render();\n }\n\n next() {\n this.moveCursor((this.cursor + 1) % this.choices.length);\n this.render();\n }\n\n _(c, key) {\n if (c === ' ') return this.submit();\n }\n\n get selection() {\n return this.choices[this.cursor];\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n\n let { startIndex, endIndex } = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage);\n\n // Print prompt\n this.outputText = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(false),\n this.done ? this.selection.title : this.selection.disabled\n ? color.yellow(this.warn) : color.gray(this.hint)\n ].join(' ');\n\n // Print choices\n if (!this.done) {\n this.outputText += '\\n';\n for (let i = startIndex; i < endIndex; i++) {\n let title, prefix, desc = '', v = this.choices[i];\n\n // Determine whether to display \"more choices\" indicators\n if (i === startIndex && startIndex > 0) {\n prefix = figures.arrowUp;\n } else if (i === endIndex - 1 && endIndex < this.choices.length) {\n prefix = figures.arrowDown;\n } else {\n prefix = ' ';\n }\n\n if (v.disabled) {\n title = this.cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);\n prefix = (this.cursor === i ? color.bold().gray(figures.pointer) + ' ' : ' ') + prefix;\n } else {\n title = this.cursor === i ? color.cyan().underline(v.title) : v.title;\n prefix = (this.cursor === i ? color.cyan(figures.pointer) + ' ' : ' ') + prefix;\n if (v.description && this.cursor === i) {\n desc = ` - ${v.description}`;\n if (prefix.length + title.length + desc.length >= this.out.columns\n || v.description.split(/\\r?\\n/).length > 1) {\n desc = '\\n' + wrap(v.description, { margin: 3, width: this.out.columns });\n }\n }\n }\n\n this.outputText += `${prefix} ${title}${color.gray(desc)}\\n`;\n }\n }\n\n this.out.write(this.outputText);\n }\n}\n\nmodule.exports = SelectPrompt;\n","const color = require('kleur');\nconst Prompt = require('./prompt');\nconst { style, clear } = require('../util');\nconst { cursor, erase } = require('sisteransi');\n\n/**\n * TogglePrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Boolean} [opts.initial=false] Default value\n * @param {String} [opts.active='no'] Active label\n * @param {String} [opts.inactive='off'] Inactive label\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\nclass TogglePrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.msg = opts.message;\n this.value = !!opts.initial;\n this.active = opts.active || 'on';\n this.inactive = opts.inactive || 'off';\n this.initialValue = this.value;\n this.render();\n }\n\n reset() {\n this.value = this.initialValue;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n deactivate() {\n if (this.value === false) return this.bell();\n this.value = false;\n this.render();\n }\n\n activate() {\n if (this.value === true) return this.bell();\n this.value = true;\n this.render();\n }\n\n delete() {\n this.deactivate();\n }\n left() {\n this.deactivate();\n }\n right() {\n this.activate();\n }\n down() {\n this.deactivate();\n }\n up() {\n this.activate();\n }\n\n next() {\n this.value = !this.value;\n this.fire();\n this.render();\n }\n\n _(c, key) {\n if (c === ' ') {\n this.value = !this.value;\n } else if (c === '1') {\n this.value = true;\n } else if (c === '0') {\n this.value = false;\n } else return this.bell();\n this.render();\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n\n this.outputText = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(this.done),\n this.value ? this.inactive : color.cyan().underline(this.inactive),\n color.gray('/'),\n this.value ? color.cyan().underline(this.active) : this.active\n ].join(' ');\n\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n}\n\nmodule.exports = TogglePrompt;\n","'use strict';\n\nclass DatePart {\n constructor({token, date, parts, locales}) {\n this.token = token;\n this.date = date || new Date();\n this.parts = parts || [this];\n this.locales = locales || {};\n }\n\n up() {}\n\n down() {}\n\n next() {\n const currentIdx = this.parts.indexOf(this);\n return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);\n }\n\n setTo(val) {}\n\n prev() {\n let parts = [].concat(this.parts).reverse();\n const currentIdx = parts.indexOf(this);\n return parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);\n }\n\n toString() {\n return String(this.date);\n }\n}\n\nmodule.exports = DatePart;\n\n\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Meridiem extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setHours((this.date.getHours() + 12) % 24);\n }\n\n down() {\n this.up();\n }\n\n toString() {\n let meridiem = this.date.getHours() > 12 ? 'pm' : 'am';\n return /\\A/.test(this.token) ? meridiem.toUpperCase() : meridiem;\n }\n}\n\nmodule.exports = Meridiem;\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nconst pos = n => {\n n = n % 10;\n return n === 1 ? 'st'\n : n === 2 ? 'nd'\n : n === 3 ? 'rd'\n : 'th';\n}\n\nclass Day extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setDate(this.date.getDate() + 1);\n }\n\n down() {\n this.date.setDate(this.date.getDate() - 1);\n }\n\n setTo(val) {\n this.date.setDate(parseInt(val.substr(-2)));\n }\n\n toString() {\n let date = this.date.getDate();\n let day = this.date.getDay();\n return this.token === 'DD' ? String(date).padStart(2, '0')\n : this.token === 'Do' ? date + pos(date)\n : this.token === 'd' ? day + 1\n : this.token === 'ddd' ? this.locales.weekdaysShort[day]\n : this.token === 'dddd' ? this.locales.weekdays[day]\n : date;\n }\n}\n\nmodule.exports = Day;\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Hours extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setHours(this.date.getHours() + 1);\n }\n\n down() {\n this.date.setHours(this.date.getHours() - 1);\n }\n\n setTo(val) {\n this.date.setHours(parseInt(val.substr(-2)));\n }\n\n toString() {\n let hours = this.date.getHours();\n if (/h/.test(this.token))\n hours = (hours % 12) || 12;\n return this.token.length > 1 ? String(hours).padStart(2, '0') : hours;\n }\n}\n\nmodule.exports = Hours;\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Milliseconds extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setMilliseconds(this.date.getMilliseconds() + 1);\n }\n\n down() {\n this.date.setMilliseconds(this.date.getMilliseconds() - 1);\n }\n\n setTo(val) {\n this.date.setMilliseconds(parseInt(val.substr(-(this.token.length))));\n }\n\n toString() {\n return String(this.date.getMilliseconds()).padStart(4, '0')\n .substr(0, this.token.length);\n }\n}\n\nmodule.exports = Milliseconds;\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Minutes extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setMinutes(this.date.getMinutes() + 1);\n }\n\n down() {\n this.date.setMinutes(this.date.getMinutes() - 1);\n }\n\n setTo(val) {\n this.date.setMinutes(parseInt(val.substr(-2)));\n }\n\n toString() {\n let m = this.date.getMinutes();\n return this.token.length > 1 ? String(m).padStart(2, '0') : m;\n }\n}\n\nmodule.exports = Minutes;\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Month extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setMonth(this.date.getMonth() + 1);\n }\n\n down() {\n this.date.setMonth(this.date.getMonth() - 1);\n }\n\n setTo(val) {\n val = parseInt(val.substr(-2)) - 1;\n this.date.setMonth(val < 0 ? 0 : val);\n }\n\n toString() {\n let month = this.date.getMonth();\n let tl = this.token.length;\n return tl === 2 ? String(month + 1).padStart(2, '0')\n : tl === 3 ? this.locales.monthsShort[month]\n : tl === 4 ? this.locales.months[month]\n : String(month + 1);\n }\n}\n\nmodule.exports = Month;\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Seconds extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setSeconds(this.date.getSeconds() + 1);\n }\n\n down() {\n this.date.setSeconds(this.date.getSeconds() - 1);\n }\n\n setTo(val) {\n this.date.setSeconds(parseInt(val.substr(-2)));\n }\n\n toString() {\n let s = this.date.getSeconds();\n return this.token.length > 1 ? String(s).padStart(2, '0') : s;\n }\n}\n\nmodule.exports = Seconds;\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Year extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setFullYear(this.date.getFullYear() + 1);\n }\n\n down() {\n this.date.setFullYear(this.date.getFullYear() - 1);\n }\n\n setTo(val) {\n this.date.setFullYear(val.substr(-4));\n }\n\n toString() {\n let year = String(this.date.getFullYear()).padStart(4, '0');\n return this.token.length === 2 ? year.substr(-2) : year;\n }\n}\n\nmodule.exports = Year;\n","'use strict';\n\nmodule.exports = {\n DatePart: require('./datepart'),\n Meridiem: require('./meridiem'),\n Day: require('./day'),\n Hours: require('./hours'),\n Milliseconds: require('./milliseconds'),\n Minutes: require('./minutes'),\n Month: require('./month'),\n Seconds: require('./seconds'),\n Year: require('./year'),\n}\n","'use strict';\n\nconst color = require('kleur');\nconst Prompt = require('./prompt');\nconst { style, clear, figures } = require('../util');\nconst { erase, cursor } = require('sisteransi');\nconst { DatePart, Meridiem, Day, Hours, Milliseconds, Minutes, Month, Seconds, Year } = require('../dateparts');\n\nconst regex = /\\\\(.)|\"((?:\\\\[\"\\\\]|[^\"])+)\"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;\nconst regexGroups = {\n 1: ({token}) => token.replace(/\\\\(.)/g, '$1'),\n 2: (opts) => new Day(opts), // Day // TODO\n 3: (opts) => new Month(opts), // Month\n 4: (opts) => new Year(opts), // Year\n 5: (opts) => new Meridiem(opts), // AM/PM // TODO (special)\n 6: (opts) => new Hours(opts), // Hours\n 7: (opts) => new Minutes(opts), // Minutes\n 8: (opts) => new Seconds(opts), // Seconds\n 9: (opts) => new Milliseconds(opts), // Fractional seconds\n}\n\nconst dfltLocales = {\n months: 'January,February,March,April,May,June,July,August,September,October,November,December'.split(','),\n monthsShort: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),\n weekdays: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),\n weekdaysShort: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(',')\n}\n\n\n/**\n * DatePrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Number} [opts.initial] Index of default value\n * @param {String} [opts.mask] The format mask\n * @param {object} [opts.locales] The date locales\n * @param {String} [opts.error] The error message shown on invalid value\n * @param {Function} [opts.validate] Function to validate the submitted value\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\nclass DatePrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.msg = opts.message;\n this.cursor = 0;\n this.typed = '';\n this.locales = Object.assign(dfltLocales, opts.locales);\n this._date = opts.initial || new Date();\n this.errorMsg = opts.error || 'Please Enter A Valid Value';\n this.validator = opts.validate || (() => true);\n this.mask = opts.mask || 'YYYY-MM-DD HH:mm:ss';\n this.clear = clear('', this.out.columns);\n this.render();\n }\n\n get value() {\n return this.date\n }\n\n get date() {\n return this._date;\n }\n\n set date(date) {\n if (date) this._date.setTime(date.getTime());\n }\n\n set mask(mask) {\n let result;\n this.parts = [];\n while(result = regex.exec(mask)) {\n let match = result.shift();\n let idx = result.findIndex(gr => gr != null);\n this.parts.push(idx in regexGroups\n ? regexGroups[idx]({ token: result[idx] || match, date: this.date, parts: this.parts, locales: this.locales })\n : result[idx] || match);\n }\n\n let parts = this.parts.reduce((arr, i) => {\n if (typeof i === 'string' && typeof arr[arr.length - 1] === 'string')\n arr[arr.length - 1] += i;\n else arr.push(i);\n return arr;\n }, []);\n\n this.parts.splice(0);\n this.parts.push(...parts);\n this.reset();\n }\n\n moveCursor(n) {\n this.typed = '';\n this.cursor = n;\n this.fire();\n }\n\n reset() {\n this.moveCursor(this.parts.findIndex(p => p instanceof DatePart));\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.error = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n async validate() {\n let valid = await this.validator(this.value);\n if (typeof valid === 'string') {\n this.errorMsg = valid;\n valid = false;\n }\n this.error = !valid;\n }\n\n async submit() {\n await this.validate();\n if (this.error) {\n this.color = 'red';\n this.fire();\n this.render();\n return;\n }\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n up() {\n this.typed = '';\n this.parts[this.cursor].up();\n this.render();\n }\n\n down() {\n this.typed = '';\n this.parts[this.cursor].down();\n this.render();\n }\n\n left() {\n let prev = this.parts[this.cursor].prev();\n if (prev == null) return this.bell();\n this.moveCursor(this.parts.indexOf(prev));\n this.render();\n }\n\n right() {\n let next = this.parts[this.cursor].next();\n if (next == null) return this.bell();\n this.moveCursor(this.parts.indexOf(next));\n this.render();\n }\n\n next() {\n let next = this.parts[this.cursor].next();\n this.moveCursor(next\n ? this.parts.indexOf(next)\n : this.parts.findIndex((part) => part instanceof DatePart));\n this.render();\n }\n\n _(c) {\n if (/\\d/.test(c)) {\n this.typed += c;\n this.parts[this.cursor].setTo(this.typed);\n this.render();\n }\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n\n // Print prompt\n this.outputText = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(false),\n this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), [])\n .join('')\n ].join(' ');\n\n // Print error\n if (this.error) {\n this.outputText += this.errorMsg.split('\\n').reduce(\n (a, l, i) => a + `\\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n}\n\nmodule.exports = DatePrompt;\n","const color = require('kleur');\nconst Prompt = require('./prompt');\nconst { cursor, erase } = require('sisteransi');\nconst { style, figures, clear, lines } = require('../util');\n\nconst isNumber = /[0-9]/;\nconst isDef = any => any !== undefined;\nconst round = (number, precision) => {\n let factor = Math.pow(10, precision);\n return Math.round(number * factor) / factor;\n}\n\n/**\n * NumberPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {String} [opts.style='default'] Render style\n * @param {Number} [opts.initial] Default value\n * @param {Number} [opts.max=+Infinity] Max value\n * @param {Number} [opts.min=-Infinity] Min value\n * @param {Boolean} [opts.float=false] Parse input as floats\n * @param {Number} [opts.round=2] Round floats to x decimals\n * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys\n * @param {Function} [opts.validate] Validate function\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.error] The invalid error label\n */\nclass NumberPrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.transform = style.render(opts.style);\n this.msg = opts.message;\n this.initial = isDef(opts.initial) ? opts.initial : '';\n this.float = !!opts.float;\n this.round = opts.round || 2;\n this.inc = opts.increment || 1;\n this.min = isDef(opts.min) ? opts.min : -Infinity;\n this.max = isDef(opts.max) ? opts.max : Infinity;\n this.errorMsg = opts.error || `Please Enter A Valid Value`;\n this.validator = opts.validate || (() => true);\n this.color = `cyan`;\n this.value = ``;\n this.typed = ``;\n this.lastHit = 0;\n this.render();\n }\n\n set value(v) {\n if (!v && v !== 0) {\n this.placeholder = true;\n this.rendered = color.gray(this.transform.render(`${this.initial}`));\n this._value = ``;\n } else {\n this.placeholder = false;\n this.rendered = this.transform.render(`${round(v, this.round)}`);\n this._value = round(v, this.round);\n }\n this.fire();\n }\n\n get value() {\n return this._value;\n }\n\n parse(x) {\n return this.float ? parseFloat(x) : parseInt(x);\n }\n\n valid(c) {\n return c === `-` || c === `.` && this.float || isNumber.test(c)\n }\n\n reset() {\n this.typed = ``;\n this.value = ``;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n let x = this.value;\n this.value = x !== `` ? x : this.initial;\n this.done = this.aborted = true;\n this.error = false;\n this.fire();\n this.render();\n this.out.write(`\\n`);\n this.close();\n }\n\n async validate() {\n let valid = await this.validator(this.value);\n if (typeof valid === `string`) {\n this.errorMsg = valid;\n valid = false;\n }\n this.error = !valid;\n }\n\n async submit() {\n await this.validate();\n if (this.error) {\n this.color = `red`;\n this.fire();\n this.render();\n return;\n }\n let x = this.value;\n this.value = x !== `` ? x : this.initial;\n this.done = true;\n this.aborted = false;\n this.error = false;\n this.fire();\n this.render();\n this.out.write(`\\n`);\n this.close();\n }\n\n up() {\n this.typed = ``;\n if(this.value === '') {\n this.value = this.min - this.inc;\n }\n if (this.value >= this.max) return this.bell();\n this.value += this.inc;\n this.color = `cyan`;\n this.fire();\n this.render();\n }\n\n down() {\n this.typed = ``;\n if(this.value === '') {\n this.value = this.min + this.inc;\n }\n if (this.value <= this.min) return this.bell();\n this.value -= this.inc;\n this.color = `cyan`;\n this.fire();\n this.render();\n }\n\n delete() {\n let val = this.value.toString();\n if (val.length === 0) return this.bell();\n this.value = this.parse((val = val.slice(0, -1))) || ``;\n if (this.value !== '' && this.value < this.min) {\n this.value = this.min;\n }\n this.color = `cyan`;\n this.fire();\n this.render();\n }\n\n next() {\n this.value = this.initial;\n this.fire();\n this.render();\n }\n\n _(c, key) {\n if (!this.valid(c)) return this.bell();\n\n const now = Date.now();\n if (now - this.lastHit > 1000) this.typed = ``; // 1s elapsed\n this.typed += c;\n this.lastHit = now;\n this.color = `cyan`;\n\n if (c === `.`) return this.fire();\n\n this.value = Math.min(this.parse(this.typed), this.max);\n if (this.value > this.max) this.value = this.max;\n if (this.value < this.min) this.value = this.min;\n this.fire();\n this.render();\n }\n\n render() {\n if (this.closed) return;\n if (!this.firstRender) {\n if (this.outputError)\n this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));\n this.out.write(clear(this.outputText, this.out.columns));\n }\n super.render();\n this.outputError = '';\n\n // Print prompt\n this.outputText = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(this.done),\n !this.done || (!this.done && !this.placeholder)\n ? color[this.color]().underline(this.rendered) : this.rendered\n ].join(` `);\n\n // Print error\n if (this.error) {\n this.outputError += this.errorMsg.split(`\\n`)\n .reduce((a, l, i) => a + `\\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore);\n }\n}\n\nmodule.exports = NumberPrompt;\n","'use strict';\n\nconst color = require('kleur');\nconst { cursor } = require('sisteransi');\nconst Prompt = require('./prompt');\nconst { clear, figures, style, wrap, entriesToDisplay } = require('../util');\n\n/**\n * MultiselectPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of choice objects\n * @param {String} [opts.hint] Hint to display\n * @param {String} [opts.warn] Hint shown for disabled choices\n * @param {Number} [opts.max] Max choices\n * @param {Number} [opts.cursor=0] Cursor start position\n * @param {Number} [opts.optionsPerPage=10] Max options to display at once\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\nclass MultiselectPrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.msg = opts.message;\n this.cursor = opts.cursor || 0;\n this.scrollIndex = opts.cursor || 0;\n this.hint = opts.hint || '';\n this.warn = opts.warn || '- This option is disabled -';\n this.minSelected = opts.min;\n this.showMinError = false;\n this.maxChoices = opts.max;\n this.instructions = opts.instructions;\n this.optionsPerPage = opts.optionsPerPage || 10;\n this.value = opts.choices.map((ch, idx) => {\n if (typeof ch === 'string')\n ch = {title: ch, value: idx};\n return {\n title: ch && (ch.title || ch.value || ch),\n description: ch && ch.description,\n value: ch && (ch.value === undefined ? idx : ch.value),\n selected: ch && ch.selected,\n disabled: ch && ch.disabled\n };\n });\n this.clear = clear('', this.out.columns);\n if (!opts.overrideRender) {\n this.render();\n }\n }\n\n reset() {\n this.value.map(v => !v.selected);\n this.cursor = 0;\n this.fire();\n this.render();\n }\n\n selected() {\n return this.value.filter(v => v.selected);\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n const selected = this.value\n .filter(e => e.selected);\n if (this.minSelected && selected.length < this.minSelected) {\n this.showMinError = true;\n this.render();\n } else {\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n }\n\n first() {\n this.cursor = 0;\n this.render();\n }\n\n last() {\n this.cursor = this.value.length - 1;\n this.render();\n }\n next() {\n this.cursor = (this.cursor + 1) % this.value.length;\n this.render();\n }\n\n up() {\n if (this.cursor === 0) {\n this.cursor = this.value.length - 1;\n } else {\n this.cursor--;\n }\n this.render();\n }\n\n down() {\n if (this.cursor === this.value.length - 1) {\n this.cursor = 0;\n } else {\n this.cursor++;\n }\n this.render();\n }\n\n left() {\n this.value[this.cursor].selected = false;\n this.render();\n }\n\n right() {\n if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell();\n this.value[this.cursor].selected = true;\n this.render();\n }\n\n handleSpaceToggle() {\n const v = this.value[this.cursor];\n\n if (v.selected) {\n v.selected = false;\n this.render();\n } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) {\n return this.bell();\n } else {\n v.selected = true;\n this.render();\n }\n }\n\n toggleAll() {\n if (this.maxChoices !== undefined || this.value[this.cursor].disabled) {\n return this.bell();\n }\n\n const newSelected = !this.value[this.cursor].selected;\n this.value.filter(v => !v.disabled).forEach(v => v.selected = newSelected);\n this.render();\n }\n\n _(c, key) {\n if (c === ' ') {\n this.handleSpaceToggle();\n } else if (c === 'a') {\n this.toggleAll();\n } else {\n return this.bell();\n }\n }\n\n renderInstructions() {\n if (this.instructions === undefined || this.instructions) {\n if (typeof this.instructions === 'string') {\n return this.instructions;\n }\n return '\\nInstructions:\\n'\n + ` ${figures.arrowUp}/${figures.arrowDown}: Highlight option\\n`\n + ` ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection\\n`\n + (this.maxChoices === undefined ? ` a: Toggle all\\n` : '')\n + ` enter/return: Complete answer`;\n }\n return '';\n }\n\n renderOption(cursor, v, i, arrowIndicator) {\n const prefix = (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + arrowIndicator + ' ';\n let title, desc;\n\n if (v.disabled) {\n title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);\n } else {\n title = cursor === i ? color.cyan().underline(v.title) : v.title;\n if (cursor === i && v.description) {\n desc = ` - ${v.description}`;\n if (prefix.length + title.length + desc.length >= this.out.columns\n || v.description.split(/\\r?\\n/).length > 1) {\n desc = '\\n' + wrap(v.description, { margin: prefix.length, width: this.out.columns });\n }\n }\n }\n\n return prefix + title + color.gray(desc || '');\n }\n\n // shared with autocompleteMultiselect\n paginateOptions(options) {\n if (options.length === 0) {\n return color.red('No matches for this query.');\n }\n\n let { startIndex, endIndex } = entriesToDisplay(this.cursor, options.length, this.optionsPerPage);\n let prefix, styledOptions = [];\n\n for (let i = startIndex; i < endIndex; i++) {\n if (i === startIndex && startIndex > 0) {\n prefix = figures.arrowUp;\n } else if (i === endIndex - 1 && endIndex < options.length) {\n prefix = figures.arrowDown;\n } else {\n prefix = ' ';\n }\n styledOptions.push(this.renderOption(this.cursor, options[i], i, prefix));\n }\n\n return '\\n' + styledOptions.join('\\n');\n }\n\n // shared with autocomleteMultiselect\n renderOptions(options) {\n if (!this.done) {\n return this.paginateOptions(options);\n }\n return '';\n }\n\n renderDoneOrInstructions() {\n if (this.done) {\n return this.value\n .filter(e => e.selected)\n .map(v => v.title)\n .join(', ');\n }\n\n const output = [color.gray(this.hint), this.renderInstructions()];\n\n if (this.value[this.cursor].disabled) {\n output.push(color.yellow(this.warn));\n }\n return output.join(' ');\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n super.render();\n\n // print prompt\n let prompt = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(false),\n this.renderDoneOrInstructions()\n ].join(' ');\n if (this.showMinError) {\n prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);\n this.showMinError = false;\n }\n prompt += this.renderOptions(this.value);\n\n this.out.write(this.clear + prompt);\n this.clear = clear(prompt, this.out.columns);\n }\n}\n\nmodule.exports = MultiselectPrompt;\n","'use strict';\n\nconst color = require('kleur');\nconst Prompt = require('./prompt');\nconst { erase, cursor } = require('sisteransi');\nconst { style, clear, figures, wrap, entriesToDisplay } = require('../util');\n\nconst getVal = (arr, i) => arr[i] && (arr[i].value || arr[i].title || arr[i]);\nconst getTitle = (arr, i) => arr[i] && (arr[i].title || arr[i].value || arr[i]);\nconst getIndex = (arr, valOrTitle) => {\n const index = arr.findIndex(el => el.value === valOrTitle || el.title === valOrTitle);\n return index > -1 ? index : undefined;\n};\n\n/**\n * TextPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of auto-complete choices objects\n * @param {Function} [opts.suggest] Filter function. Defaults to sort by title\n * @param {Number} [opts.limit=10] Max number of results to show\n * @param {Number} [opts.cursor=0] Cursor start position\n * @param {String} [opts.style='default'] Render style\n * @param {String} [opts.fallback] Fallback message - initial to default value\n * @param {String} [opts.initial] Index of the default value\n * @param {Boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.noMatches] The no matches found label\n */\nclass AutocompletePrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.msg = opts.message;\n this.suggest = opts.suggest;\n this.choices = opts.choices;\n this.initial = typeof opts.initial === 'number'\n ? opts.initial\n : getIndex(opts.choices, opts.initial);\n this.select = this.initial || opts.cursor || 0;\n this.i18n = { noMatches: opts.noMatches || 'no matches found' };\n this.fallback = opts.fallback || this.initial;\n this.clearFirst = opts.clearFirst || false;\n this.suggestions = [];\n this.input = '';\n this.limit = opts.limit || 10;\n this.cursor = 0;\n this.transform = style.render(opts.style);\n this.scale = this.transform.scale;\n this.render = this.render.bind(this);\n this.complete = this.complete.bind(this);\n this.clear = clear('', this.out.columns);\n this.complete(this.render);\n this.render();\n }\n\n set fallback(fb) {\n this._fb = Number.isSafeInteger(parseInt(fb)) ? parseInt(fb) : fb;\n }\n\n get fallback() {\n let choice;\n if (typeof this._fb === 'number')\n choice = this.choices[this._fb];\n else if (typeof this._fb === 'string')\n choice = { title: this._fb };\n return choice || this._fb || { title: this.i18n.noMatches };\n }\n\n moveSelect(i) {\n this.select = i;\n if (this.suggestions.length > 0)\n this.value = getVal(this.suggestions, i);\n else this.value = this.fallback.value;\n this.fire();\n }\n\n async complete(cb) {\n const p = (this.completing = this.suggest(this.input, this.choices));\n const suggestions = await p;\n\n if (this.completing !== p) return;\n this.suggestions = suggestions\n .map((s, i, arr) => ({ title: getTitle(arr, i), value: getVal(arr, i), description: s.description }));\n this.completing = false;\n const l = Math.max(suggestions.length - 1, 0);\n this.moveSelect(Math.min(l, this.select));\n\n cb && cb();\n }\n\n reset() {\n this.input = '';\n this.complete(() => {\n this.moveSelect(this.initial !== void 0 ? this.initial : 0);\n this.render();\n });\n this.render();\n }\n\n exit() {\n if (this.clearFirst && this.input.length > 0) {\n this.reset();\n } else {\n this.done = this.exited = true; \n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n }\n\n abort() {\n this.done = this.aborted = true;\n this.exited = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n this.done = true;\n this.aborted = this.exited = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n _(c, key) {\n let s1 = this.input.slice(0, this.cursor);\n let s2 = this.input.slice(this.cursor);\n this.input = `${s1}${c}${s2}`;\n this.cursor = s1.length+1;\n this.complete(this.render);\n this.render();\n }\n\n delete() {\n if (this.cursor === 0) return this.bell();\n let s1 = this.input.slice(0, this.cursor-1);\n let s2 = this.input.slice(this.cursor);\n this.input = `${s1}${s2}`;\n this.complete(this.render);\n this.cursor = this.cursor-1;\n this.render();\n }\n\n deleteForward() {\n if(this.cursor*this.scale >= this.rendered.length) return this.bell();\n let s1 = this.input.slice(0, this.cursor);\n let s2 = this.input.slice(this.cursor+1);\n this.input = `${s1}${s2}`;\n this.complete(this.render);\n this.render();\n }\n\n first() {\n this.moveSelect(0);\n this.render();\n }\n\n last() {\n this.moveSelect(this.suggestions.length - 1);\n this.render();\n }\n\n up() {\n if (this.select === 0) {\n this.moveSelect(this.suggestions.length - 1);\n } else {\n this.moveSelect(this.select - 1);\n }\n this.render();\n }\n\n down() {\n if (this.select === this.suggestions.length - 1) {\n this.moveSelect(0);\n } else {\n this.moveSelect(this.select + 1);\n }\n this.render();\n }\n\n next() {\n if (this.select === this.suggestions.length - 1) {\n this.moveSelect(0);\n } else this.moveSelect(this.select + 1);\n this.render();\n }\n\n nextPage() {\n this.moveSelect(Math.min(this.select + this.limit, this.suggestions.length - 1));\n this.render();\n }\n\n prevPage() {\n this.moveSelect(Math.max(this.select - this.limit, 0));\n this.render();\n }\n\n left() {\n if (this.cursor <= 0) return this.bell();\n this.cursor = this.cursor-1;\n this.render();\n }\n\n right() {\n if (this.cursor*this.scale >= this.rendered.length) return this.bell();\n this.cursor = this.cursor+1;\n this.render();\n }\n\n renderOption(v, hovered, isStart, isEnd) {\n let desc;\n let prefix = isStart ? figures.arrowUp : isEnd ? figures.arrowDown : ' ';\n let title = hovered ? color.cyan().underline(v.title) : v.title;\n prefix = (hovered ? color.cyan(figures.pointer) + ' ' : ' ') + prefix;\n if (v.description) {\n desc = ` - ${v.description}`;\n if (prefix.length + title.length + desc.length >= this.out.columns\n || v.description.split(/\\r?\\n/).length > 1) {\n desc = '\\n' + wrap(v.description, { margin: 3, width: this.out.columns })\n }\n }\n return prefix + ' ' + title + color.gray(desc || '');\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n\n let { startIndex, endIndex } = entriesToDisplay(this.select, this.choices.length, this.limit);\n\n this.outputText = [\n style.symbol(this.done, this.aborted, this.exited),\n color.bold(this.msg),\n style.delimiter(this.completing),\n this.done && this.suggestions[this.select]\n ? this.suggestions[this.select].title\n : this.rendered = this.transform.render(this.input)\n ].join(' ');\n\n if (!this.done) {\n const suggestions = this.suggestions\n .slice(startIndex, endIndex)\n .map((item, i) => this.renderOption(item,\n this.select === i + startIndex,\n i === 0 && startIndex > 0,\n i + startIndex === endIndex - 1 && endIndex < this.choices.length))\n .join('\\n');\n this.outputText += `\\n` + (suggestions || color.gray(this.fallback.title));\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n}\n\nmodule.exports = AutocompletePrompt;\n","'use strict';\n\nconst color = require('kleur');\nconst { cursor } = require('sisteransi');\nconst MultiselectPrompt = require('./multiselect');\nconst { clear, style, figures } = require('../util');\n/**\n * MultiselectPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of choice objects\n * @param {String} [opts.hint] Hint to display\n * @param {String} [opts.warn] Hint shown for disabled choices\n * @param {Number} [opts.max] Max choices\n * @param {Number} [opts.cursor=0] Cursor start position\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\nclass AutocompleteMultiselectPrompt extends MultiselectPrompt {\n constructor(opts={}) {\n opts.overrideRender = true;\n super(opts);\n this.inputValue = '';\n this.clear = clear('', this.out.columns);\n this.filteredOptions = this.value;\n this.render();\n }\n\n last() {\n this.cursor = this.filteredOptions.length - 1;\n this.render();\n }\n next() {\n this.cursor = (this.cursor + 1) % this.filteredOptions.length;\n this.render();\n }\n\n up() {\n if (this.cursor === 0) {\n this.cursor = this.filteredOptions.length - 1;\n } else {\n this.cursor--;\n }\n this.render();\n }\n\n down() {\n if (this.cursor === this.filteredOptions.length - 1) {\n this.cursor = 0;\n } else {\n this.cursor++;\n }\n this.render();\n }\n\n left() {\n this.filteredOptions[this.cursor].selected = false;\n this.render();\n }\n\n right() {\n if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell();\n this.filteredOptions[this.cursor].selected = true;\n this.render();\n }\n\n delete() {\n if (this.inputValue.length) {\n this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1);\n this.updateFilteredOptions();\n }\n }\n\n updateFilteredOptions() {\n const currentHighlight = this.filteredOptions[this.cursor];\n this.filteredOptions = this.value\n .filter(v => {\n if (this.inputValue) {\n if (typeof v.title === 'string') {\n if (v.title.toLowerCase().includes(this.inputValue.toLowerCase())) {\n return true;\n }\n }\n if (typeof v.value === 'string') {\n if (v.value.toLowerCase().includes(this.inputValue.toLowerCase())) {\n return true;\n }\n }\n return false;\n }\n return true;\n });\n const newHighlightIndex = this.filteredOptions.findIndex(v => v === currentHighlight)\n this.cursor = newHighlightIndex < 0 ? 0 : newHighlightIndex;\n this.render();\n }\n\n handleSpaceToggle() {\n const v = this.filteredOptions[this.cursor];\n\n if (v.selected) {\n v.selected = false;\n this.render();\n } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) {\n return this.bell();\n } else {\n v.selected = true;\n this.render();\n }\n }\n\n handleInputChange(c) {\n this.inputValue = this.inputValue + c;\n this.updateFilteredOptions();\n }\n\n _(c, key) {\n if (c === ' ') {\n this.handleSpaceToggle();\n } else {\n this.handleInputChange(c);\n }\n }\n\n renderInstructions() {\n if (this.instructions === undefined || this.instructions) {\n if (typeof this.instructions === 'string') {\n return this.instructions;\n }\n return `\nInstructions:\n ${figures.arrowUp}/${figures.arrowDown}: Highlight option\n ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`;\n }\n return '';\n }\n\n renderCurrentInput() {\n return `\nFiltered results for: ${this.inputValue ? this.inputValue : color.gray('Enter something to filter')}\\n`;\n }\n\n renderOption(cursor, v, i) {\n let title;\n if (v.disabled) title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);\n else title = cursor === i ? color.cyan().underline(v.title) : v.title;\n return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + title\n }\n\n renderDoneOrInstructions() {\n if (this.done) {\n return this.value\n .filter(e => e.selected)\n .map(v => v.title)\n .join(', ');\n }\n\n const output = [color.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()];\n\n if (this.filteredOptions.length && this.filteredOptions[this.cursor].disabled) {\n output.push(color.yellow(this.warn));\n }\n return output.join(' ');\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n super.render();\n\n // print prompt\n\n let prompt = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(false),\n this.renderDoneOrInstructions()\n ].join(' ');\n\n if (this.showMinError) {\n prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);\n this.showMinError = false;\n }\n prompt += this.renderOptions(this.filteredOptions);\n\n this.out.write(this.clear + prompt);\n this.clear = clear(prompt, this.out.columns);\n }\n}\n\nmodule.exports = AutocompleteMultiselectPrompt;\n","const color = require('kleur');\nconst Prompt = require('./prompt');\nconst { style, clear } = require('../util');\nconst { erase, cursor } = require('sisteransi');\n\n/**\n * ConfirmPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Boolean} [opts.initial] Default value (true/false)\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.yes] The \"Yes\" label\n * @param {String} [opts.yesOption] The \"Yes\" option when choosing between yes/no\n * @param {String} [opts.no] The \"No\" label\n * @param {String} [opts.noOption] The \"No\" option when choosing between yes/no\n */\nclass ConfirmPrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.msg = opts.message;\n this.value = opts.initial;\n this.initialValue = !!opts.initial;\n this.yesMsg = opts.yes || 'yes';\n this.yesOption = opts.yesOption || '(Y/n)';\n this.noMsg = opts.no || 'no';\n this.noOption = opts.noOption || '(y/N)';\n this.render();\n }\n\n reset() {\n this.value = this.initialValue;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n this.value = this.value || false;\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n _(c, key) {\n if (c.toLowerCase() === 'y') {\n this.value = true;\n return this.submit();\n }\n if (c.toLowerCase() === 'n') {\n this.value = false;\n return this.submit();\n }\n return this.bell();\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n\n this.outputText = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(this.done),\n this.done ? (this.value ? this.yesMsg : this.noMsg)\n : color.gray(this.initialValue ? this.yesOption : this.noOption)\n ].join(' ');\n\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n}\n\nmodule.exports = ConfirmPrompt;\n","'use strict';\n\nmodule.exports = {\n TextPrompt: require('./text'),\n SelectPrompt: require('./select'),\n TogglePrompt: require('./toggle'),\n DatePrompt: require('./date'),\n NumberPrompt: require('./number'),\n MultiselectPrompt: require('./multiselect'),\n AutocompletePrompt: require('./autocomplete'),\n AutocompleteMultiselectPrompt: require('./autocompleteMultiselect'),\n ConfirmPrompt: require('./confirm')\n};\n","'use strict';\nconst $ = exports;\nconst el = require('./elements');\nconst noop = v => v;\n\nfunction toPrompt(type, args, opts={}) {\n return new Promise((res, rej) => {\n const p = new el[type](args);\n const onAbort = opts.onAbort || noop;\n const onSubmit = opts.onSubmit || noop;\n const onExit = opts.onExit || noop;\n p.on('state', args.onState || noop);\n p.on('submit', x => res(onSubmit(x)));\n p.on('exit', x => res(onExit(x)));\n p.on('abort', x => rej(onAbort(x)));\n });\n}\n\n/**\n * Text prompt\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {function} [args.onState] On state change callback\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.text = args => toPrompt('TextPrompt', args);\n\n/**\n * Password prompt with masked input\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {function} [args.onState] On state change callback\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.password = args => {\n args.style = 'password';\n return $.text(args);\n};\n\n/**\n * Prompt where input is invisible, like sudo\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {function} [args.onState] On state change callback\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.invisible = args => {\n args.style = 'invisible';\n return $.text(args);\n};\n\n/**\n * Number prompt\n * @param {string} args.message Prompt message to display\n * @param {number} args.initial Default number value\n * @param {function} [args.onState] On state change callback\n * @param {number} [args.max] Max value\n * @param {number} [args.min] Min value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {Boolean} [opts.float=false] Parse input as floats\n * @param {Number} [opts.round=2] Round floats to x decimals\n * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.number = args => toPrompt('NumberPrompt', args);\n\n/**\n * Date prompt\n * @param {string} args.message Prompt message to display\n * @param {number} args.initial Default number value\n * @param {function} [args.onState] On state change callback\n * @param {number} [args.max] Max value\n * @param {number} [args.min] Min value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {Boolean} [opts.float=false] Parse input as floats\n * @param {Number} [opts.round=2] Round floats to x decimals\n * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.date = args => toPrompt('DatePrompt', args);\n\n/**\n * Classic yes/no prompt\n * @param {string} args.message Prompt message to display\n * @param {boolean} [args.initial=false] Default value\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.confirm = args => toPrompt('ConfirmPrompt', args);\n\n/**\n * List prompt, split intput string by `seperator`\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {string} [args.separator] String separator\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input, in form of an `Array`\n */\n$.list = args => {\n const sep = args.separator || ',';\n return toPrompt('TextPrompt', args, {\n onSubmit: str => str.split(sep).map(s => s.trim())\n });\n};\n\n/**\n * Toggle/switch prompt\n * @param {string} args.message Prompt message to display\n * @param {boolean} [args.initial=false] Default value\n * @param {string} [args.active=\"on\"] Text for `active` state\n * @param {string} [args.inactive=\"off\"] Text for `inactive` state\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.toggle = args => toPrompt('TogglePrompt', args);\n\n/**\n * Interactive select prompt\n * @param {string} args.message Prompt message to display\n * @param {Array} args.choices Array of choices objects `[{ title, value }, ...]`\n * @param {number} [args.initial] Index of default value\n * @param {String} [args.hint] Hint to display\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.select = args => toPrompt('SelectPrompt', args);\n\n/**\n * Interactive multi-select / autocompleteMultiselect prompt\n * @param {string} args.message Prompt message to display\n * @param {Array} args.choices Array of choices objects `[{ title, value, [selected] }, ...]`\n * @param {number} [args.max] Max select\n * @param {string} [args.hint] Hint to display user\n * @param {Number} [args.cursor=0] Cursor start position\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.multiselect = args => {\n args.choices = [].concat(args.choices || []);\n const toSelected = items => items.filter(item => item.selected).map(item => item.value);\n return toPrompt('MultiselectPrompt', args, {\n onAbort: toSelected,\n onSubmit: toSelected\n });\n};\n\n$.autocompleteMultiselect = args => {\n args.choices = [].concat(args.choices || []);\n const toSelected = items => items.filter(item => item.selected).map(item => item.value);\n return toPrompt('AutocompleteMultiselectPrompt', args, {\n onAbort: toSelected,\n onSubmit: toSelected\n });\n};\n\nconst byTitle = (input, choices) => Promise.resolve(\n choices.filter(item => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase())\n);\n\n/**\n * Interactive auto-complete prompt\n * @param {string} args.message Prompt message to display\n * @param {Array} args.choices Array of auto-complete choices objects `[{ title, value }, ...]`\n * @param {Function} [args.suggest] Function to filter results based on user input. Defaults to sort by `title`\n * @param {number} [args.limit=10] Max number of results to show\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {String} [args.initial] Index of the default value\n * @param {boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input\n * @param {String} [args.fallback] Fallback message - defaults to initial value\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.autocomplete = args => {\n args.suggest = args.suggest || byTitle;\n args.choices = [].concat(args.choices || []);\n return toPrompt('AutocompletePrompt', args);\n};\n","'use strict';\n\nconst prompts = require('./prompts');\n\nconst passOn = ['suggest', 'format', 'onState', 'validate', 'onRender', 'type'];\nconst noop = () => {};\n\n/**\n * Prompt for a series of questions\n * @param {Array|Object} questions Single question object or Array of question objects\n * @param {Function} [onSubmit] Callback function called on prompt submit\n * @param {Function} [onCancel] Callback function called on cancel/abort\n * @returns {Object} Object with values from user input\n */\nasync function prompt(questions=[], { onSubmit=noop, onCancel=noop }={}) {\n const answers = {};\n const override = prompt._override || {};\n questions = [].concat(questions);\n let answer, question, quit, name, type, lastPrompt;\n\n const getFormattedAnswer = async (question, answer, skipValidation = false) => {\n if (!skipValidation && question.validate && question.validate(answer) !== true) {\n return;\n }\n return question.format ? await question.format(answer, answers) : answer\n };\n\n for (question of questions) {\n ({ name, type } = question);\n\n // evaluate type first and skip if type is a falsy value\n if (typeof type === 'function') {\n type = await type(answer, { ...answers }, question)\n question['type'] = type\n }\n if (!type) continue;\n\n // if property is a function, invoke it unless it's a special function\n for (let key in question) {\n if (passOn.includes(key)) continue;\n let value = question[key];\n question[key] = typeof value === 'function' ? await value(answer, { ...answers }, lastPrompt) : value;\n }\n\n lastPrompt = question;\n\n if (typeof question.message !== 'string') {\n throw new Error('prompt message is required');\n }\n\n // update vars in case they changed\n ({ name, type } = question);\n\n if (prompts[type] === void 0) {\n throw new Error(`prompt type (${type}) is not defined`);\n }\n\n if (override[question.name] !== undefined) {\n answer = await getFormattedAnswer(question, override[question.name]);\n if (answer !== undefined) {\n answers[name] = answer;\n continue;\n }\n }\n\n try {\n // Get the injected answer if there is one or prompt the user\n answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts[type](question);\n answers[name] = answer = await getFormattedAnswer(question, answer, true);\n quit = await onSubmit(question, answer, answers);\n } catch (err) {\n quit = !(await onCancel(question, answers));\n }\n\n if (quit) return answers;\n }\n\n return answers;\n}\n\nfunction getInjectedAnswer(injected, deafultValue) {\n const answer = injected.shift();\n if (answer instanceof Error) {\n throw answer;\n }\n\n return (answer === undefined) ? deafultValue : answer;\n}\n\nfunction inject(answers) {\n prompt._injected = (prompt._injected || []).concat(answers);\n}\n\nfunction override(answers) {\n prompt._override = Object.assign({}, answers);\n}\n\nmodule.exports = Object.assign(prompt, { prompt, prompts, inject, override });\n","function isNodeLT(tar) {\n tar = (Array.isArray(tar) ? tar : tar.split('.')).map(Number);\n let i=0, src=process.versions.node.split('.').map(Number);\n for (; i < tar.length; i++) {\n if (src[i] > tar[i]) return false;\n if (tar[i] > src[i]) return true;\n }\n return false;\n}\n\nmodule.exports =\n isNodeLT('8.6.0')\n ? require('./dist/index.js')\n : require('./lib/index.js');\n","import { type NamingOptions, toCamelCase, toPascalCase } from \"@cerios/openapi-core\";\n\nexport interface EnumOpenApiGeneratorOptions extends NamingOptions {}\n\nexport interface EnumResult {\n\tschemaCode: string;\n\ttypeCode: string;\n}\n\n/**\n * Generate Zod enum schema\n * - String-only enums: z.enum()\n * - Numeric enums: z.union([z.literal(), ...])\n * - Boolean enums: z.boolean()\n * - Mixed enums: z.union([z.literal(), ...])\n */\nexport function generateEnum(\n\tname: string,\n\tvalues: (string | number | boolean)[],\n\toptions: EnumOpenApiGeneratorOptions\n): EnumResult {\n\tconst schemaName = `${toCamelCase(name, options)}Schema`;\n\tconst typeName = toPascalCase(name);\n\n\t// Check if all values are booleans\n\tconst allBooleans = values.every(v => typeof v === \"boolean\");\n\tif (allBooleans) {\n\t\t// For boolean enums, use z.boolean()\n\t\tconst schemaCode = `export const ${schemaName} = z.boolean();`;\n\t\tconst typeCode = `export type ${typeName} = z.infer<typeof ${schemaName}>;`;\n\t\treturn { schemaCode, typeCode };\n\t}\n\n\t// Check if all values are strings\n\tconst allStrings = values.every(v => typeof v === \"string\");\n\tif (allStrings) {\n\t\t// z.enum only accepts string values\n\t\tconst enumValues = values.map(v => `\"${v}\"`).join(\", \");\n\t\tconst schemaCode = `export const ${schemaName} = z.enum([${enumValues}]);`;\n\t\tconst typeCode = `export type ${typeName} = z.infer<typeof ${schemaName}>;`;\n\t\treturn { schemaCode, typeCode };\n\t}\n\n\t// For numeric or mixed enums, use z.union with z.literal\n\tconst literalValues = values\n\t\t.map(v => {\n\t\t\tif (typeof v === \"string\") {\n\t\t\t\treturn `z.literal(\"${v}\")`;\n\t\t\t}\n\t\t\treturn `z.literal(${v})`;\n\t\t})\n\t\t.join(\", \");\n\n\tconst schemaCode = `export const ${schemaName} = z.union([${literalValues}]);`;\n\tconst typeCode = `export type ${typeName} = z.infer<typeof ${schemaName}>;`;\n\n\treturn { schemaCode, typeCode };\n}\n","import { escapeJSDoc } from \"@cerios/openapi-core\";\n\nimport type { OpenAPISchema } from \"../types\";\n\nexport interface JSDocOptions {\n\tincludeDescriptions: boolean;\n}\n\n/**\n * Generate JSDoc comment for a schema or property\n * Type-safe with input validation to prevent JSDoc injection\n */\nexport function generateJSDoc(\n\tschema: OpenAPISchema,\n\tname?: string,\n\toptions: JSDocOptions = { includeDescriptions: true }\n): string {\n\t// Type safety: Validate schema input\n\tif (!schema || typeof schema !== \"object\") {\n\t\treturn \"\";\n\t}\n\n\tif (!options.includeDescriptions) {\n\t\t// Only add @deprecated if descriptions are disabled\n\t\tif (schema.deprecated) {\n\t\t\treturn \"/** @deprecated */\\n\";\n\t\t}\n\t\treturn \"\";\n\t}\n\n\t// Check if we have anything to document\n\tif (!schema.description && !schema.title && !schema.deprecated && !schema.examples && schema.example === undefined) {\n\t\treturn \"\";\n\t}\n\n\tconst parts: string[] = [];\n\n\t// Add title if different from name (sanitized)\n\tif (schema.title && typeof schema.title === \"string\" && (!name || schema.title !== name)) {\n\t\t// Sanitize title to prevent JSDoc injection\n\t\tparts.push(escapeJSDoc(schema.title));\n\t}\n\n\t// Add description (sanitized to prevent injection)\n\tif (schema.description && typeof schema.description === \"string\") {\n\t\t// Escape @ symbols and other JSDoc tags to prevent injection\n\t\tparts.push(escapeJSDoc(schema.description));\n\t}\n\n\t// Add examples (with type safety)\n\tif (schema.examples && Array.isArray(schema.examples) && schema.examples.length > 0) {\n\t\ttry {\n\t\t\tconst examplesStr = schema.examples.map(ex => JSON.stringify(ex)).join(\", \");\n\t\t\tparts.push(`@example ${examplesStr}`);\n\t\t} catch (error) {\n\t\t\t// Skip examples that can't be serialized\n\t\t\tconsole.warn(\"Warning: Could not serialize schema examples\", error);\n\t\t}\n\t} else if (schema.example !== undefined) {\n\t\ttry {\n\t\t\tparts.push(`@example ${JSON.stringify(schema.example)}`);\n\t\t} catch (error) {\n\t\t\t// Skip example that can't be serialized\n\t\t\tconsole.warn(\"Warning: Could not serialize schema example\", error);\n\t\t}\n\t}\n\n\t// Add deprecated\n\tif (schema.deprecated) {\n\t\tparts.push(\"@deprecated\");\n\t}\n\n\tif (parts.length === 0) {\n\t\treturn \"\";\n\t}\n\n\tconst fullComment = parts.join(\" \");\n\treturn `/** ${fullComment} */\\n`;\n}\n","/**\n * Zod-specific string utility functions\n *\n * For core utilities (escapeDescription, etc.), import from @cerios/openapi-core\n */\n\nimport { escapeDescription } from \"@cerios/openapi-core\";\n\n/**\n * Wrap validation with .nullable() if needed\n */\nexport function wrapNullable(validation: string, nullable: boolean): string {\n\treturn nullable ? `${validation}.nullable()` : validation;\n}\n\n/**\n * Add description to a schema validation string\n */\nexport function addDescription(validation: string, description: string | undefined, useDescribe: boolean): string {\n\tif (!description || !useDescribe) return validation;\n\n\tconst escapedDesc = escapeDescription(description);\n\treturn `${validation}.describe(\"${escapedDesc}\")`;\n}\n","import type { OpenAPISchema } from \"../types\";\nimport { addDescription } from \"../utils/string-utils\";\n\nexport interface ArrayValidatorContext {\n\tgeneratePropertySchema: (schema: OpenAPISchema, currentSchema?: string) => string;\n\tuseDescribe: boolean;\n\tcurrentSchema?: string;\n}\n\n/**\n * Generate array or tuple validation\n */\nexport function generateArrayValidation(schema: OpenAPISchema, context: ArrayValidatorContext): string {\n\tlet validation: string;\n\n\t// Handle prefixItems (tuple validation - OpenAPI 3.1)\n\tif (schema.prefixItems && schema.prefixItems.length > 0) {\n\t\tconst tupleItems = schema.prefixItems.map(item => context.generatePropertySchema(item, context.currentSchema));\n\t\tvalidation = `z.tuple([${tupleItems.join(\", \")}])`;\n\n\t\t// Add rest items if specified (items after the fixed prefix)\n\t\t// items takes precedence over unevaluatedItems\n\t\tif (schema.items) {\n\t\t\tconst restSchema = context.generatePropertySchema(schema.items, context.currentSchema);\n\t\t\tvalidation += `.rest(${restSchema})`;\n\t\t} else if (schema.unevaluatedItems && typeof schema.unevaluatedItems === \"object\") {\n\t\t\t// Use unevaluatedItems as rest schema if items not specified\n\t\t\tconst restSchema = context.generatePropertySchema(schema.unevaluatedItems, context.currentSchema);\n\t\t\tvalidation += `.rest(${restSchema})`;\n\t\t}\n\t\t// If unevaluatedItems is false (or undefined), tuple has fixed length by default\n\t} else if (schema.items) {\n\t\tconst itemSchema = context.generatePropertySchema(schema.items, context.currentSchema);\n\t\tvalidation = `z.array(${itemSchema})`;\n\n\t\t// Add array constraints\n\t\tif (schema.minItems !== undefined) {\n\t\t\tvalidation += `.min(${schema.minItems})`;\n\t\t}\n\t\tif (schema.maxItems !== undefined) {\n\t\t\tvalidation += `.max(${schema.maxItems})`;\n\t\t}\n\n\t\t// Add uniqueItems constraint\n\t\tif (schema.uniqueItems === true) {\n\t\t\tvalidation += `.refine((items) => new Set(items).size === items.length, { message: \"Array items must be unique\" })`;\n\t\t}\n\t} else {\n\t\tvalidation = \"z.array(z.unknown())\";\n\t}\n\n\t// Handle contains with min/max constraints\n\tif (schema.contains) {\n\t\tconst containsSchema = context.generatePropertySchema(schema.contains, context.currentSchema);\n\t\tconst minCount = schema.minContains ?? 1;\n\t\tconst maxCount = schema.maxContains;\n\n\t\tif (maxCount !== undefined) {\n\t\t\t// Both min and max\n\t\t\tvalidation += `.refine((arr) => { const matches = arr.filter(item => ${containsSchema}.safeParse(item).success); return matches.length >= ${minCount} && matches.length <= ${maxCount}; }, { message: \"Array must contain between ${minCount} and ${maxCount} items matching the schema\" })`;\n\t\t} else {\n\t\t\t// Just min\n\t\t\tvalidation += `.refine((arr) => arr.filter(item => ${containsSchema}.safeParse(item).success).length >= ${minCount}, { message: \"Array must contain at least ${minCount} item(s) matching the schema\" })`;\n\t\t}\n\t}\n\n\t// Handle unevaluatedItems (OpenAPI 3.1) - only applies to prefixItems scenarios\n\t// Note: unevaluatedItems with prefixItems should use .rest() which was already handled above\n\t// This section handles the false case which needs to restrict the length\n\tif (schema.unevaluatedItems === false && schema.prefixItems && schema.prefixItems.length > 0 && !schema.items) {\n\t\t// No items beyond prefixItems allowed - add length restriction\n\t\tconst prefixCount = schema.prefixItems.length;\n\t\tvalidation += `.refine((arr) => arr.length <= ${prefixCount}, { message: \"No unevaluated items allowed beyond prefix items\" })`;\n\t}\n\n\t// Add description if useDescribe is enabled\n\treturn addDescription(validation, schema.description, context.useDescribe);\n}\n","import type { OpenAPISchema } from \"../types\";\nimport { wrapNullable } from \"../utils/string-utils\";\n\nexport interface CompositionValidatorContext {\n\tgeneratePropertySchema: (\n\t\tschema: OpenAPISchema,\n\t\tcurrentSchema?: string,\n\t\tisTopLevel?: boolean,\n\t\tsuppressDefaultNullable?: boolean\n\t) => string;\n\t/**\n\t * Generate inline object shape for use with .extend()\n\t * Returns just the shape object literal: { prop1: z.string(), prop2: z.number() }\n\t * This avoids the .nullable().shape bug when inline objects have nullable: true\n\t */\n\tgenerateInlineObjectShape?: (schema: OpenAPISchema, currentSchema?: string) => string;\n\tresolveDiscriminatorMapping?: (mapping: Record<string, string>, schemas: OpenAPISchema[]) => OpenAPISchema[];\n\tresolveSchemaRef?: (ref: string) => OpenAPISchema | undefined;\n\t/**\n\t * Warning function for non-fatal issues during composition validation\n\t * If not provided, warnings are silently ignored\n\t */\n\twarn?: (message: string) => void;\n}\n\nexport interface UnionOptions {\n\tpassthrough?: boolean;\n\tdiscriminatorMapping?: Record<string, string>;\n}\n\n/**\n * Result from generateAllOf containing the schema and any conflicts detected\n */\nexport interface AllOfResult {\n\t/** The generated Zod schema string */\n\tschema: string;\n\t/** Array of conflict descriptions (property names are NOT escaped - consumer should escape for their use case) */\n\tconflicts: string[];\n}\n\n/**\n * Check if discriminator property is required in all schemas\n */\nfunction isDiscriminatorRequired(\n\tschemas: OpenAPISchema[],\n\tdiscriminator: string,\n\tcontext: CompositionValidatorContext\n): { valid: boolean; invalidSchemas: string[] } {\n\tconst invalidSchemas: string[] = [];\n\n\tfor (const schema of schemas) {\n\t\tconst resolved = resolveSchema(schema, context);\n\t\tconst required = resolved.required || [];\n\n\t\tif (!required.includes(discriminator)) {\n\t\t\tconst schemaName = schema.$ref ? schema.$ref.split(\"/\").pop() || \"inline\" : \"inline\";\n\t\t\tinvalidSchemas.push(schemaName);\n\t\t}\n\t}\n\n\treturn {\n\t\tvalid: invalidSchemas.length === 0,\n\t\tinvalidSchemas,\n\t};\n}\n\n/**\n * Generate union validation\n */\nexport function generateUnion(\n\tschemas: OpenAPISchema[],\n\tdiscriminator: string | undefined,\n\tisNullable: boolean,\n\tcontext: CompositionValidatorContext,\n\toptions?: UnionOptions,\n\tcurrentSchema?: string\n): string {\n\t// Handle empty oneOf/anyOf - malformed spec, warn and return z.never()\n\tif (schemas.length === 0) {\n\t\tcontext.warn?.(\n\t\t\t\"Empty oneOf/anyOf array encountered. This is likely a malformed OpenAPI spec. Generating z.never() as fallback.\"\n\t\t);\n\t\treturn wrapNullable(\n\t\t\t'z.never().describe(\"Empty oneOf/anyOf in OpenAPI spec - no valid schema defined\")',\n\t\t\tisNullable\n\t\t);\n\t}\n\n\t// Simplify single-item oneOf/anyOf - no union needed\n\tif (schemas.length === 1) {\n\t\t// Suppress defaultNullable - this is a schema definition, not a property value\n\t\tlet singleSchema = context.generatePropertySchema(schemas[0], currentSchema, false, true);\n\t\tif (options?.passthrough && !singleSchema.includes(\".catchall(\")) {\n\t\t\tsingleSchema = `${singleSchema}.catchall(z.unknown())`;\n\t\t}\n\t\treturn wrapNullable(singleSchema, isNullable);\n\t}\n\n\tif (discriminator) {\n\t\t// Apply discriminator mapping if provided\n\t\tlet resolvedSchemas = schemas;\n\t\tif (options?.discriminatorMapping && context.resolveDiscriminatorMapping) {\n\t\t\tresolvedSchemas = context.resolveDiscriminatorMapping(options.discriminatorMapping, schemas);\n\t\t}\n\n\t\t// Check if discriminator is required in all schemas\n\t\tconst discriminatorCheck = isDiscriminatorRequired(resolvedSchemas, discriminator, context);\n\n\t\tif (!discriminatorCheck.valid) {\n\t\t\t// Discriminator is not required in all schemas - fallback to z.union()\n\t\t\tcontext.warn?.(\n\t\t\t\t`Discriminator \"${discriminator}\" is not required in schemas: ${discriminatorCheck.invalidSchemas.join(\", \")}. ` +\n\t\t\t\t\t\"Falling back to z.union() instead of z.discriminatedUnion().\"\n\t\t\t);\n\n\t\t\t// Suppress defaultNullable on each variant - they are schema definitions, not property values\n\t\t\tlet schemaStrings = resolvedSchemas.map(s => context.generatePropertySchema(s, currentSchema, false, true));\n\t\t\tif (options?.passthrough) {\n\t\t\t\tschemaStrings = schemaStrings.map(s => (s.includes(\".catchall(\") ? s : `${s}.catchall(z.unknown())`));\n\t\t\t}\n\n\t\t\tconst fallbackDescription = `Discriminator \"${discriminator}\" is optional in some schemas (${discriminatorCheck.invalidSchemas.join(\", \")}), using z.union() instead of z.discriminatedUnion()`;\n\t\t\tconst union = `z.union([${schemaStrings.join(\", \")}]).describe(\"${fallbackDescription}\")`;\n\t\t\treturn wrapNullable(union, isNullable);\n\t\t}\n\n\t\t// Use discriminated union for better type inference\n\t\t// Suppress defaultNullable on each variant - they are schema definitions, not property values\n\t\tlet schemaStrings = resolvedSchemas.map(s => context.generatePropertySchema(s, currentSchema, false, true));\n\t\tif (options?.passthrough) {\n\t\t\tschemaStrings = schemaStrings.map(s => (s.includes(\".catchall(\") ? s : `${s}.catchall(z.unknown())`));\n\t\t}\n\t\tconst union = `z.discriminatedUnion(\"${discriminator}\", [${schemaStrings.join(\", \")}])`;\n\t\treturn wrapNullable(union, isNullable);\n\t}\n\n\t// Suppress defaultNullable on each variant - they are schema definitions, not property values\n\tlet schemaStrings = schemas.map(s => context.generatePropertySchema(s, currentSchema, false, true));\n\tif (options?.passthrough) {\n\t\tschemaStrings = schemaStrings.map(s => (s.includes(\".catchall(\") ? s : `${s}.catchall(z.unknown())`));\n\t}\n\tconst union = `z.union([${schemaStrings.join(\", \")}])`;\n\treturn wrapNullable(union, isNullable);\n}\n\n/**\n * Helper to resolve schema (follows $ref if needed)\n */\nfunction resolveSchema(schema: OpenAPISchema, context: CompositionValidatorContext): OpenAPISchema {\n\tif (schema.$ref && context.resolveSchemaRef) {\n\t\tconst resolved = context.resolveSchemaRef(schema.$ref);\n\t\tif (resolved) {\n\t\t\treturn resolved;\n\t\t}\n\t}\n\treturn schema;\n}\n\n/**\n * Collect properties from a schema (including nested allOf)\n */\nfunction collectProperties(\n\tschema: OpenAPISchema,\n\tcontext: CompositionValidatorContext\n): Map<string, { schema: OpenAPISchema; source: string }> {\n\tconst resolved = resolveSchema(schema, context);\n\tconst props = new Map<string, { schema: OpenAPISchema; source: string }>();\n\n\t// Get source name for error messages\n\tconst sourceName = schema.$ref ? schema.$ref.split(\"/\").pop() || \"unknown\" : \"inline\";\n\n\t// Collect direct properties\n\tif (resolved.properties) {\n\t\tfor (const [key, value] of Object.entries(resolved.properties)) {\n\t\t\tprops.set(key, { schema: value, source: sourceName });\n\t\t}\n\t}\n\n\t// Recursively collect from nested allOf\n\tif (resolved.allOf) {\n\t\tfor (const subSchema of resolved.allOf) {\n\t\t\tconst subProps = collectProperties(subSchema, context);\n\t\t\tfor (const [key, value] of subProps) {\n\t\t\t\tif (!props.has(key)) {\n\t\t\t\t\tprops.set(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn props;\n}\n\n/**\n * Check if two schemas are semantically equivalent\n */\nfunction schemasMatch(a: OpenAPISchema, b: OpenAPISchema): boolean {\n\t// Simple deep comparison for common cases\n\treturn JSON.stringify(a) === JSON.stringify(b);\n}\n\n/**\n * Detect conflicting properties across allOf schemas\n */\nfunction detectConflictingProperties(schemas: OpenAPISchema[], context: CompositionValidatorContext): string[] {\n\tconst conflicts: string[] = [];\n\tconst propertyMap = new Map<string, { schema: OpenAPISchema; source: string }>();\n\n\tfor (const schema of schemas) {\n\t\tconst schemaProps = collectProperties(schema, context);\n\n\t\tfor (const [propName, propInfo] of schemaProps) {\n\t\t\tconst existing = propertyMap.get(propName);\n\t\t\tif (existing) {\n\t\t\t\t// Check if the definitions match\n\t\t\t\tif (!schemasMatch(existing.schema, propInfo.schema)) {\n\t\t\t\t\tconflicts.push(\n\t\t\t\t\t\t`Property \"${propName}\" has conflicting definitions in ${existing.source} and ${propInfo.source}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpropertyMap.set(propName, propInfo);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn conflicts;\n}\n\n/**\n * Generate allOf validation\n *\n * Key fix: For inline objects in allOf, we generate the shape directly as an object literal\n * (e.g., { prop: z.string() }) instead of using z.object({...}).shape.\n * This avoids the invalid .nullable().shape pattern that occurs when inline objects\n * have nullable: true set.\n *\n * According to Zod docs (https://zod.dev/api?id=extend):\n * - .extend() accepts an object of shape definitions OR another schema's .shape\n * - For $refs: use baseSchema.extend(otherSchema.shape)\n * - For inline objects: use baseSchema.extend({ prop: z.string() })\n * - .nullable() must be applied AFTER all .extend() calls\n * - defaultNullable should NOT apply to schemas in allOf - they are schema shapes, not property values\n */\nexport function generateAllOf(\n\tschemas: OpenAPISchema[],\n\tisNullable: boolean,\n\tcontext: CompositionValidatorContext,\n\tcurrentSchema?: string\n): AllOfResult {\n\tif (schemas.length === 1) {\n\t\t// Single-item allOf is essentially an alias - suppress defaultNullable\n\t\t// because this is a schema definition, not a property value\n\t\tconst singleSchema = context.generatePropertySchema(schemas[0], currentSchema, false, true);\n\t\treturn { schema: wrapNullable(singleSchema, isNullable), conflicts: [] };\n\t}\n\n\t// Detect conflicting properties and warn\n\tconst conflicts = detectConflictingProperties(schemas, context);\n\tconst uniqueConflicts = [...new Set(conflicts)];\n\tif (uniqueConflicts.length > 0) {\n\t\tfor (const conflict of uniqueConflicts) {\n\t\t\tcontext.warn?.(`allOf composition conflict - ${conflict}`);\n\t\t}\n\t}\n\n\t// Check if all schemas are objects (for .extend() support)\n\tconst allObjects = schemas.every(s => s.type === \"object\" || s.properties || s.$ref || s.allOf);\n\n\tlet result: string;\n\tif (allObjects) {\n\t\t// Use .extend() for object schemas (Zod v4 compliant - .merge() is deprecated)\n\t\t// First schema is the base - generate with suppressDefaultNullable=true\n\t\t// because this is a schema shape, not a property value\n\t\tlet merged = context.generatePropertySchema(schemas[0], currentSchema, false, true);\n\n\t\t// For subsequent schemas, determine how to extend\n\t\tfor (let i = 1; i < schemas.length; i++) {\n\t\t\tconst schema = schemas[i];\n\n\t\t\tif (schema.$ref) {\n\t\t\t\t// For $ref schemas, use .extend(refSchema.shape)\n\t\t\t\t// Suppress defaultNullable - this is a schema shape, not a property value\n\t\t\t\tconst refSchema = context.generatePropertySchema(schema, currentSchema, false, true);\n\t\t\t\tmerged = `${merged}.extend(${refSchema}.shape)`;\n\t\t\t} else if (context.generateInlineObjectShape && (schema.properties || schema.type === \"object\")) {\n\t\t\t\t// For inline objects, generate shape directly as object literal\n\t\t\t\t// This avoids the .nullable().shape bug - we pass { prop: z.string() }\n\t\t\t\t// directly to .extend() instead of z.object({...}).nullable().shape\n\t\t\t\t// Note: generateInlineObjectShape respects defaultNullable for properties INSIDE the object\n\t\t\t\tconst inlineShape = context.generateInlineObjectShape(schema, currentSchema);\n\t\t\t\tmerged = `${merged}.extend(${inlineShape})`;\n\t\t\t} else {\n\t\t\t\t// Fallback for schemas without properties (e.g., just has allOf)\n\t\t\t\t// Generate full schema with suppressDefaultNullable and use .shape\n\t\t\t\tconst schemaString = context.generatePropertySchema(schema, currentSchema, false, true);\n\t\t\t\tmerged = `${merged}.extend(${schemaString}.shape)`;\n\t\t\t}\n\t\t}\n\t\tresult = merged;\n\t} else {\n\t\t// Use .and() for non-object schemas (intersection)\n\t\t// Suppress defaultNullable on each schema in the intersection\n\t\tconst schemaStrings = schemas.map(s => context.generatePropertySchema(s, currentSchema, false, true));\n\t\tlet merged = schemaStrings[0];\n\t\tfor (let i = 1; i < schemaStrings.length; i++) {\n\t\t\tmerged = `${merged}.and(${schemaStrings[i]})`;\n\t\t}\n\t\tresult = merged;\n\t}\n\n\t// Apply nullable at the END, after all .extend() calls\n\t// This is critical - .nullable() must come after .extend(), not before\n\treturn { schema: wrapNullable(result, isNullable), conflicts: uniqueConflicts };\n}\n","import type { OpenAPISchema } from \"../types\";\nimport { addDescription } from \"../utils/string-utils\";\n\n/**\n * Generate Zod validation for number\n */\nexport function generateNumberValidation(schema: OpenAPISchema, isInt: boolean, useDescribe: boolean): string {\n\tlet validation = isInt ? \"z.number().int()\" : \"z.number()\";\n\n\t// Handle minimum with exclusive bounds\n\tif (schema.minimum !== undefined) {\n\t\tconst isExclusive = schema.exclusiveMinimum === true;\n\t\tvalidation += isExclusive ? `.gt(${schema.minimum})` : `.gte(${schema.minimum})`;\n\t} else if (typeof schema.exclusiveMinimum === \"number\") {\n\t\t// OpenAPI 3.1 style: exclusiveMinimum as number\n\t\tvalidation += `.gt(${schema.exclusiveMinimum})`;\n\t}\n\n\t// Handle maximum with exclusive bounds\n\tif (schema.maximum !== undefined) {\n\t\tconst isExclusive = schema.exclusiveMaximum === true;\n\t\tvalidation += isExclusive ? `.lt(${schema.maximum})` : `.lte(${schema.maximum})`;\n\t} else if (typeof schema.exclusiveMaximum === \"number\") {\n\t\t// OpenAPI 3.1 style: exclusiveMaximum as number\n\t\tvalidation += `.lt(${schema.exclusiveMaximum})`;\n\t}\n\n\tif (schema.multipleOf !== undefined) {\n\t\tvalidation += `.multipleOf(${schema.multipleOf})`;\n\t}\n\n\t// Add description if useDescribe is enabled\n\treturn addDescription(validation, schema.description, useDescribe);\n}\n","import type { OpenAPISchema } from \"../types\";\n\n/**\n * Generate property access expression (use dot notation for valid identifiers, bracket notation otherwise)\n */\nfunction generatePropertyAccess(propName: string): string {\n\t// Valid identifier: starts with letter/underscore/$, followed by letters/digits/underscores/$\n\tconst validIdentifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;\n\treturn validIdentifier.test(propName) ? `obj.${propName}` : `obj[\"${propName}\"]`;\n}\n\n/**\n * Generate validation for dependencies (OpenAPI 3.0)\n * Generates detailed error messages showing which specific fields are missing\n */\nexport function generateDependencies(\n\tschema: OpenAPISchema,\n\tgeneratePropertySchema?: (schema: OpenAPISchema, currentSchema?: string) => string,\n\tcurrentSchema?: string\n): string {\n\tif (!schema.dependencies) {\n\t\treturn \"\";\n\t}\n\n\tlet result = \"\";\n\tfor (const [prop, dependency] of Object.entries(schema.dependencies)) {\n\t\tif (Array.isArray(dependency)) {\n\t\t\t// Skip empty dependency arrays (no dependencies to enforce)\n\t\t\tif (dependency.length === 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Property dependency - show specific missing properties in error message\n\t\t\tconst propAccess = generatePropertyAccess(prop);\n\t\t\tconst checkLogic = dependency\n\t\t\t\t.map(p => {\n\t\t\t\t\tconst pAccess = generatePropertyAccess(p);\n\t\t\t\t\treturn `if (${pAccess} === undefined) missing.push('${p}');`;\n\t\t\t\t})\n\t\t\t\t.join(\"\\n\\t\\t\");\n\n\t\t\tresult += `.superRefine((obj, ctx) => {\n\t\t\t\tif (${propAccess} === undefined) return;\n\t\t\t\tconst missing: string[] = [];\n\t\t\t\t${checkLogic}\n\t\t\t\tif (missing.length > 0) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tmessage: \\`When '${prop}' is present, the following properties are required: \\${missing.join(', ')}\\`,\n\t\t\t\t\t\tpath: []\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})`;\n\t\t} else if (generatePropertySchema) {\n\t\t\t// Schema dependency - show detailed validation errors\n\t\t\tconst depSchema: OpenAPISchema = { ...dependency, type: dependency.type || \"object\" };\n\t\t\tconst depSchemaValidation = generatePropertySchema(depSchema, currentSchema);\n\t\t\tconst propAccess = generatePropertyAccess(prop);\n\n\t\t\tresult += `.superRefine((obj, ctx) => {\n\t\t\t\tif (${propAccess} === undefined) return;\n\t\t\t\tconst validation = ${depSchemaValidation}.safeParse(obj);\n\t\t\t\tif (!validation.success) {\n\t\t\t\t\tconst errors = validation.error.issues.map(i => \\` - \\${i.path.join('.')}: \\${i.message}\\`).join('\\\\n');\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tmessage: \\`When '${prop}' is present, object must satisfy additional constraints:\\\\n\\${errors}\\`,\n\t\t\t\t\t\tpath: []\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})`;\n\t\t}\n\t}\n\treturn result;\n}\n\n/**\n * Generate condition check for if/then/else\n */\nexport function generateConditionalCheck(schema: OpenAPISchema): string {\n\tconst conditions: string[] = [];\n\n\t// Check properties\n\tif (schema.properties) {\n\t\tfor (const [prop, propSchema] of Object.entries(schema.properties)) {\n\t\t\tconst propAccess = generatePropertyAccess(prop);\n\t\t\tif (propSchema.type) {\n\t\t\t\tconst schemaType = Array.isArray(propSchema.type) ? propSchema.type[0] : propSchema.type;\n\t\t\t\tconditions.push(`typeof ${propAccess} === \"${schemaType}\"`);\n\t\t\t}\n\t\t\tif (propSchema.const !== undefined) {\n\t\t\t\tconst value = typeof propSchema.const === \"string\" ? `\"${propSchema.const}\"` : propSchema.const;\n\t\t\t\tconditions.push(`${propAccess} === ${value}`);\n\t\t\t}\n\t\t\tif (propSchema.minimum !== undefined) {\n\t\t\t\tconditions.push(`${propAccess} >= ${propSchema.minimum}`);\n\t\t\t}\n\t\t\tif (propSchema.maximum !== undefined) {\n\t\t\t\tconditions.push(`${propAccess} <= ${propSchema.maximum}`);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check required properties\n\tif (schema.required) {\n\t\tfor (const prop of schema.required) {\n\t\t\tconditions.push(`${generatePropertyAccess(prop)} !== undefined`);\n\t\t}\n\t}\n\n\treturn conditions.length > 0 ? conditions.join(\" && \") : \"true\";\n}\n\n/**\n * Generate validation for then/else clauses\n */\nexport function generateConditionalValidation(schema: OpenAPISchema): string {\n\tconst checks: string[] = [];\n\n\t// Check required properties\n\tif (schema.required) {\n\t\tfor (const prop of schema.required) {\n\t\t\tchecks.push(`${generatePropertyAccess(prop)} !== undefined`);\n\t\t}\n\t}\n\n\t// Check properties constraints\n\tif (schema.properties) {\n\t\tfor (const [prop, propSchema] of Object.entries(schema.properties)) {\n\t\t\tconst propAccess = generatePropertyAccess(prop);\n\t\t\tif (propSchema.minimum !== undefined) {\n\t\t\t\tchecks.push(`${propAccess} === undefined || ${propAccess} >= ${propSchema.minimum}`);\n\t\t\t}\n\t\t\tif (propSchema.maximum !== undefined) {\n\t\t\t\tchecks.push(`${propAccess} === undefined || ${propAccess} <= ${propSchema.maximum}`);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn checks.length > 0 ? checks.join(\" && \") : \"true\";\n}\n\n/**\n * Generate if/then/else conditional validation with better error messages\n * Uses superRefine with detailed error messages for complex cases\n */\nexport function generateIfThenElse(schema: OpenAPISchema): string {\n\tif (!schema.if || (!schema.then && !schema.else)) {\n\t\treturn \"\";\n\t}\n\n\tconst ifCondition = generateConditionalCheck(schema.if);\n\n\tif (schema.then && schema.else) {\n\t\t// Both then and else - provide detailed error messages\n\t\tconst thenValidation = generateConditionalValidation(schema.then);\n\t\tconst elseValidation = generateConditionalValidation(schema.else);\n\n\t\t// Try to detect which specific validations failed\n\t\tconst thenRequiredProps = schema.then.required || [];\n\t\tconst elseRequiredProps = schema.else.required || [];\n\n\t\treturn `.superRefine((obj, ctx) => {\n\t\t\tconst ifConditionMet = ${ifCondition};\n\t\t\tif (ifConditionMet) {\n\t\t\t\t// Then branch\n\t\t\t\tconst thenValid = ${thenValidation};\n\t\t\t\tif (!thenValid) {\n\t\t\t\t\t${\n\t\t\t\t\t\tthenRequiredProps.length > 0\n\t\t\t\t\t\t\t? `\n\t\t\t\t\tconst missingThenProps = ${JSON.stringify(thenRequiredProps)}.filter(p => obj[p] === undefined);\n\t\t\t\t\tconst message = missingThenProps.length > 0\n\t\t\t\t\t\t? \\`When condition is met, required properties are missing: \\${missingThenProps.join(', ')}\\`\n\t\t\t\t\t\t: \"When condition is met, validation constraints failed\";\n\t\t\t\t\t`\n\t\t\t\t\t\t\t: `\n\t\t\t\t\tconst message = \"When condition is met, validation constraints failed\";\n\t\t\t\t\t`\n\t\t\t\t\t}\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tmessage: message,\n\t\t\t\t\t\tpath: []\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Else branch\n\t\t\t\tconst elseValid = ${elseValidation};\n\t\t\t\tif (!elseValid) {\n\t\t\t\t\t${\n\t\t\t\t\t\telseRequiredProps.length > 0\n\t\t\t\t\t\t\t? `\n\t\t\t\t\tconst missingElseProps = ${JSON.stringify(elseRequiredProps)}.filter(p => obj[p] === undefined);\n\t\t\t\t\tconst message = missingElseProps.length > 0\n\t\t\t\t\t\t? \\`When condition is not met, required properties are missing: \\${missingElseProps.join(', ')}\\`\n\t\t\t\t\t\t: \"When condition is not met, validation constraints failed\";\n\t\t\t\t\t`\n\t\t\t\t\t\t\t: `\n\t\t\t\t\tconst message = \"When condition is not met, validation constraints failed\";\n\t\t\t\t\t`\n\t\t\t\t\t}\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tmessage: message,\n\t\t\t\t\t\tpath: []\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t})`;\n\t}\n\n\tif (schema.then) {\n\t\t// Only then - provide detailed error message\n\t\tconst thenValidation = generateConditionalValidation(schema.then);\n\t\tconst thenRequiredProps = schema.then.required || [];\n\n\t\treturn `.superRefine((obj, ctx) => {\n\t\t\tconst ifConditionMet = ${ifCondition};\n\t\t\tif (ifConditionMet) {\n\t\t\t\tconst thenValid = ${thenValidation};\n\t\t\t\tif (!thenValid) {\n\t\t\t\t\t${\n\t\t\t\t\t\tthenRequiredProps.length > 0\n\t\t\t\t\t\t\t? `\n\t\t\t\t\tconst missingProps = ${JSON.stringify(thenRequiredProps)}.filter(p => obj[p] === undefined);\n\t\t\t\t\tconst message = missingProps.length > 0\n\t\t\t\t\t\t? \\`When condition is met, required properties are missing: \\${missingProps.join(', ')}\\`\n\t\t\t\t\t\t: \"When condition is met, validation constraints failed\";\n\t\t\t\t\t`\n\t\t\t\t\t\t\t: `\n\t\t\t\t\tconst message = \"When condition is met, validation constraints failed\";\n\t\t\t\t\t`\n\t\t\t\t\t}\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tmessage: message,\n\t\t\t\t\t\tpath: []\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t})`;\n\t}\n\n\t// Only else - provide detailed error message\n\tif (!schema.else) return \"\";\n\tconst elseValidation = generateConditionalValidation(schema.else);\n\tconst elseRequiredProps = schema.else.required || [];\n\n\treturn `.superRefine((obj, ctx) => {\n\t\tconst ifConditionMet = ${ifCondition};\n\t\tif (!ifConditionMet) {\n\t\t\tconst elseValid = ${elseValidation};\n\t\t\tif (!elseValid) {\n\t\t\t\t${\n\t\t\t\t\telseRequiredProps.length > 0\n\t\t\t\t\t\t? `\n\t\t\t\tconst missingProps = ${JSON.stringify(elseRequiredProps)}.filter(p => obj[p] === undefined);\n\t\t\t\tconst message = missingProps.length > 0\n\t\t\t\t\t? \\`When condition is not met, required properties are missing: \\${missingProps.join(', ')}\\`\n\t\t\t\t\t: \"When condition is not met, validation constraints failed\";\n\t\t\t\t`\n\t\t\t\t\t\t: `\n\t\t\t\tconst message = \"When condition is not met, validation constraints failed\";\n\t\t\t\t`\n\t\t\t\t}\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tmessage: message,\n\t\t\t\t\tpath: []\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t})`;\n}\n\n/**\n * Generate dependent required validation (OpenAPI 3.1)\n * Generates detailed error messages showing which specific fields are missing\n */\nexport function generateDependentRequired(schema: OpenAPISchema): string {\n\tif (!schema.dependentRequired) {\n\t\treturn \"\";\n\t}\n\n\tlet result = \"\";\n\tfor (const [prop, requiredProps] of Object.entries(schema.dependentRequired)) {\n\t\t// Skip empty required arrays (no dependencies to enforce)\n\t\tif (requiredProps.length === 0) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst propAccess = generatePropertyAccess(prop);\n\t\tconst checkLogic = requiredProps\n\t\t\t.map(rp => {\n\t\t\t\tconst rpAccess = generatePropertyAccess(rp);\n\t\t\t\treturn `if (${rpAccess} === undefined) missing.push('${rp}');`;\n\t\t\t})\n\t\t\t.join(\"\\n\\t\\t\");\n\n\t\tresult += `.superRefine((obj, ctx) => {\n\t\t\tif (${propAccess} === undefined) return;\n\t\t\tconst missing: string[] = [];\n\t\t\t${checkLogic}\n\t\t\tif (missing.length > 0) {\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tmessage: \\`When '${prop}' is present, the following properties are required: \\${missing.join(', ')}\\`,\n\t\t\t\t\tpath: []\n\t\t\t\t});\n\t\t\t}\n\t\t})`;\n\t}\n\n\treturn result;\n}\n\n/**\n * Generate dependent schemas validation (JSON Schema 2019-09 / OpenAPI 3.1)\n * This is the modern replacement for schema-based dependencies\n * Generates detailed error messages showing validation failures\n */\nexport function generateDependentSchemas(\n\tschema: OpenAPISchema & { dependentSchemas?: Record<string, OpenAPISchema> },\n\tgeneratePropertySchema?: (schema: OpenAPISchema, currentSchema?: string) => string,\n\tcurrentSchema?: string\n): string {\n\tif (!schema.dependentSchemas || !generatePropertySchema) {\n\t\treturn \"\";\n\t}\n\n\tlet result = \"\";\n\tfor (const [prop, depSchema] of Object.entries(schema.dependentSchemas)) {\n\t\tconst depSchemaValidation = generatePropertySchema(depSchema, currentSchema);\n\t\tconst propAccess = generatePropertyAccess(prop);\n\n\t\tresult += `.superRefine((obj, ctx) => {\n\t\t\tif (${propAccess} === undefined) return;\n\t\t\tconst validation = ${depSchemaValidation}.safeParse(obj);\n\t\t\tif (!validation.success) {\n\t\t\t\tconst errors = validation.error.issues.map(i => \\` - \\${i.path.join('.')}: \\${i.message}\\`).join('\\\\n');\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tmessage: \\`When '${prop}' is present, dependent schema validation failed:\\\\n\\${errors}\\`,\n\t\t\t\t\tpath: []\n\t\t\t\t});\n\t\t\t}\n\t\t})`;\n\t}\n\treturn result;\n}\n\n/**\n * Validate dependency graph for circular dependencies\n * Returns validation result with any detected circular dependency errors\n */\nexport function validateDependencyGraph(\n\tschema: OpenAPISchema,\n\tschemaName: string\n): { valid: boolean; errors: string[] } {\n\tconst errors: string[] = [];\n\n\tif (!schema.dependencies && !schema.dependentRequired) {\n\t\treturn { valid: true, errors: [] };\n\t}\n\n\t// Build dependency graph\n\tconst graph = new Map<string, Set<string>>();\n\n\t// Add dependentRequired edges\n\tif (schema.dependentRequired) {\n\t\tfor (const [prop, deps] of Object.entries(schema.dependentRequired)) {\n\t\t\tif (!graph.has(prop)) {\n\t\t\t\tgraph.set(prop, new Set());\n\t\t\t}\n\t\t\tconst propDeps = graph.get(prop);\n\t\t\tif (propDeps) {\n\t\t\t\tfor (const dep of deps) {\n\t\t\t\t\tpropDeps.add(dep);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Add dependencies (array type) edges\n\tif (schema.dependencies) {\n\t\tfor (const [prop, dep] of Object.entries(schema.dependencies)) {\n\t\t\tif (Array.isArray(dep)) {\n\t\t\t\tif (!graph.has(prop)) {\n\t\t\t\t\tgraph.set(prop, new Set());\n\t\t\t\t}\n\t\t\t\tconst propDeps = graph.get(prop);\n\t\t\t\tif (propDeps) {\n\t\t\t\t\tfor (const d of dep) {\n\t\t\t\t\t\tpropDeps.add(d);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Detect cycles using DFS\n\tconst visited = new Set<string>();\n\tconst recStack = new Set<string>();\n\tconst path: string[] = [];\n\n\tfunction detectCycle(prop: string): boolean {\n\t\tvisited.add(prop);\n\t\trecStack.add(prop);\n\t\tpath.push(prop);\n\n\t\tconst deps = graph.get(prop) || new Set();\n\t\tfor (const dep of deps) {\n\t\t\tif (!visited.has(dep)) {\n\t\t\t\tif (detectCycle(dep)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else if (recStack.has(dep)) {\n\t\t\t\t// Cycle detected\n\t\t\t\tconst cycleStart = path.indexOf(dep);\n\t\t\t\tconst cycle = [...path.slice(cycleStart), dep];\n\t\t\t\terrors.push(`Circular dependency detected in schema '${schemaName}': ${cycle.join(\" -> \")}`);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\trecStack.delete(prop);\n\t\tpath.pop();\n\t\treturn false;\n\t}\n\n\t// Check all roots\n\tfor (const prop of graph.keys()) {\n\t\tif (!visited.has(prop)) {\n\t\t\tdetectCycle(prop);\n\t\t}\n\t}\n\n\treturn { valid: errors.length === 0, errors };\n}\n\n/**\n * Extract schema dependencies as reusable schemas\n * Useful for code generation and schema reuse\n */\nexport function extractSchemaDependencies(schema: OpenAPISchema, schemaName: string): Map<string, OpenAPISchema> {\n\tconst extracted = new Map<string, OpenAPISchema>();\n\n\tif (!schema.dependencies) {\n\t\treturn extracted;\n\t}\n\n\tfor (const [prop, dependency] of Object.entries(schema.dependencies)) {\n\t\tif (!Array.isArray(dependency)) {\n\t\t\t// This is a schema dependency\n\t\t\tconst depSchemaName = `${schemaName}_${prop}_Dependency`;\n\t\t\tconst depSchema: OpenAPISchema = {\n\t\t\t\t...dependency,\n\t\t\t\ttype: dependency.type || \"object\",\n\t\t\t};\n\t\t\textracted.set(depSchemaName, depSchema);\n\t\t}\n\t}\n\n\treturn extracted;\n}\n","import { generateJSDoc } from \"../generators/jsdoc-generator\";\nimport type { OpenAPISchema } from \"../types\";\n\nimport { generateDependencies, generateDependentRequired, generateIfThenElse } from \"./conditional-validator\";\n\n/**\n * Check if a property name needs to be quoted in TypeScript object literal\n */\nfunction needsQuoting(propName: string): boolean {\n\t// Valid identifier: starts with letter/underscore/$, followed by letters/digits/underscores/$\n\tconst validIdentifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;\n\treturn !validIdentifier.test(propName);\n}\n\n/**\n * Generate property access expression (use dot notation for valid identifiers, bracket notation otherwise)\n */\nfunction generatePropertyAccess(propName: string): string {\n\treturn needsQuoting(propName) ? `obj[\"${propName}\"]` : `obj.${propName}`;\n}\n\nexport type ObjectMode = \"strict\" | \"normal\" | \"loose\";\n\nexport interface ObjectValidatorContext {\n\tgeneratePropertySchema: (schema: OpenAPISchema, currentSchema?: string) => string;\n\tshouldIncludeProperty: (schema: OpenAPISchema) => boolean;\n\tmode: ObjectMode;\n\tincludeDescriptions: boolean;\n\tuseDescribe: boolean;\n}\n\n/**\n * Generate object schema\n */\nexport function generateObjectSchema(\n\tschema: OpenAPISchema,\n\tcontext: ObjectValidatorContext,\n\tcurrentSchema?: string\n): string {\n\tconst required = new Set(schema.required || []);\n\tconst properties: string[] = [];\n\n\t// Process properties if they exist\n\tif (schema.properties) {\n\t\tfor (const [propName, propSchema] of Object.entries(schema.properties)) {\n\t\t\t// Skip properties based on readOnly/writeOnly and schemaType\n\t\t\tif (!context.shouldIncludeProperty(propSchema)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst isRequired = required.has(propName);\n\t\t\tconst zodSchema = context.generatePropertySchema(propSchema, currentSchema);\n\n\t\t\t// Quote property name if it contains special characters\n\t\t\tconst quotedPropName = needsQuoting(propName) ? `\"${propName}\"` : propName;\n\t\t\tlet propertyDef = ` ${quotedPropName}: ${zodSchema}`;\n\t\t\tif (!isRequired) {\n\t\t\t\tpropertyDef += \".optional()\";\n\t\t\t}\n\n\t\t\t// Add JSDoc for property if enabled\n\t\t\tconst jsdoc = generateJSDoc(propSchema, propName, { includeDescriptions: context.includeDescriptions });\n\t\t\tif (jsdoc) {\n\t\t\t\tproperties.push(`${jsdoc.trimEnd()}\\n${propertyDef}`);\n\t\t\t} else {\n\t\t\t\tproperties.push(propertyDef);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Determine object method based on mode and additionalProperties\n\tlet objectMethod: string;\n\n\t// additionalProperties: false always uses strictObject\n\tif (schema.additionalProperties === false) {\n\t\tobjectMethod = \"z.strictObject\";\n\t} else {\n\t\t// Otherwise respect the mode setting\n\t\tswitch (context.mode) {\n\t\t\tcase \"strict\":\n\t\t\t\tobjectMethod = \"z.strictObject\";\n\t\t\t\tbreak;\n\t\t\tcase \"loose\":\n\t\t\t\tobjectMethod = \"z.looseObject\";\n\t\t\t\tbreak;\n\t\t\tcase \"normal\":\n\t\t\t\tobjectMethod = \"z.object\";\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tlet objectDef = `${objectMethod}({\\n${properties.join(\",\\n\")}\\n})`;\n\n\t// Handle additionalProperties for typed catchall\n\tif (schema.additionalProperties !== undefined) {\n\t\tif (typeof schema.additionalProperties === \"object\") {\n\t\t\t// Additional properties with specific schema\n\t\t\tconst additionalSchema = context.generatePropertySchema(schema.additionalProperties, currentSchema);\n\t\t\tobjectDef += `.catchall(${additionalSchema})`;\n\t\t} else if (schema.additionalProperties) {\n\t\t\t// Any additional properties allowed\n\t\t\tobjectDef += \".catchall(z.unknown())\";\n\t\t}\n\t\t// Note: additionalProperties: false is handled by using z.strictObject\n\t} else if (schema.patternProperties) {\n\t\t// If pattern properties are defined but additionalProperties is not, allow properties through\n\t\t// so they can be validated by pattern property refinements\n\t\tobjectDef += \".catchall(z.unknown())\";\n\t}\n\n\t// Handle minProperties and maxProperties\n\tif (schema.minProperties !== undefined || schema.maxProperties !== undefined) {\n\t\tconst conditions: string[] = [];\n\t\tif (schema.minProperties !== undefined) {\n\t\t\tconditions.push(`Object.keys(obj).length >= ${schema.minProperties}`);\n\t\t}\n\t\tif (schema.maxProperties !== undefined) {\n\t\t\tconditions.push(`Object.keys(obj).length <= ${schema.maxProperties}`);\n\t\t}\n\t\tconst condition = conditions.join(\" && \");\n\t\tlet message = \"Object \";\n\t\tif (schema.minProperties !== undefined && schema.maxProperties !== undefined) {\n\t\t\tmessage += `must have between ${schema.minProperties} and ${schema.maxProperties} properties`;\n\t\t} else if (schema.minProperties !== undefined) {\n\t\t\tmessage += `must have at least ${schema.minProperties} ${schema.minProperties === 1 ? \"property\" : \"properties\"}`;\n\t\t} else {\n\t\t\tmessage += `must have at most ${schema.maxProperties} ${schema.maxProperties === 1 ? \"property\" : \"properties\"}`;\n\t\t}\n\t\tobjectDef += `.refine((obj) => ${condition}, { message: \"${message}\" })`;\n\t}\n\n\t// Handle required fields that aren't in properties (common in schema dependencies)\n\tconst definedProps = new Set(Object.keys(schema.properties || {}));\n\tconst undefinedRequired = (schema.required || []).filter(prop => !definedProps.has(prop));\n\tif (undefinedRequired.length > 0) {\n\t\t// Need catchall to allow required fields that aren't in properties\n\t\tif (!objectDef.includes(\".catchall(\")) {\n\t\t\tobjectDef += \".catchall(z.unknown())\";\n\t\t}\n\t\tconst requiredChecks = undefinedRequired.map(prop => `${generatePropertyAccess(prop)} !== undefined`).join(\" && \");\n\t\tconst propList = undefinedRequired.join(\", \");\n\t\tobjectDef += `.refine((obj) => ${requiredChecks}, { message: \"Missing required fields: ${propList}\" })`;\n\t}\n\n\t// Handle pattern properties with first-match-wins priority\n\tif (schema.patternProperties) {\n\t\tconst definedProps = Object.keys(schema.properties || {});\n\t\tconst definedPropsSet = `new Set(${JSON.stringify(definedProps)})`;\n\t\tconst patterns = Object.entries(schema.patternProperties);\n\n\t\t// Generate schemas for all patterns\n\t\tconst patternSchemas = patterns.map(([pattern, patternSchema]) => ({\n\t\t\tpattern,\n\t\t\tescapedPattern: pattern.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\"),\n\t\t\tzodSchema: context.generatePropertySchema(patternSchema, currentSchema),\n\t\t}));\n\n\t\t// Single superRefine for all patterns (more efficient)\n\t\tobjectDef += `.superRefine((obj, ctx) => {\n\t\t\tconst definedPropsSet = ${definedPropsSet};\n\t\t\tconst patterns = ${JSON.stringify(patternSchemas.map(p => ({ pattern: p.escapedPattern })))};\n\t\t\tconst schemas = [${patternSchemas.map(p => p.zodSchema).join(\", \")}];\n\t\t\tconst regexps = patterns.map(p => new RegExp(p.pattern));\n\n\t\t\t// Check all object keys\n\t\t\tfor (const key of Object.keys(obj)) {\n\t\t\t\t// Skip properties that are explicitly defined\n\t\t\t\tif (definedPropsSet.has(key)) continue;\n\n\t\t\t\t// Find first matching pattern (first-match-wins priority)\n\t\t\t\tfor (let i = 0; i < regexps.length; i++) {\n\t\t\t\t\tif (regexps[i].test(key)) {\n\t\t\t\t\t\tconst validation = schemas[i].safeParse(obj[key]);\n\t\t\t\t\t\tif (!validation.success) {\n\t\t\t\t\t\t\t// Add detailed error messages with property name and pattern\n\t\t\t\t\t\t\tfor (const issue of validation.error.issues) {\n\t\t\t\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\t\t\t\t...issue,\n\t\t\t\t\t\t\t\t\tpath: [key, ...issue.path],\n\t\t\t\t\t\t\t\t\tmessage: \\`Property '\\${key}' (pattern '\\${patterns[i].pattern}'): \\${issue.message}\\`\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak; // First match wins, stop checking other patterns\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})`;\n\t}\n\n\t// Handle property names validation (consolidated for efficiency)\n\tif (schema.propertyNames) {\n\t\tconst hasPattern = schema.propertyNames.pattern !== undefined;\n\t\tconst hasMinLength = schema.propertyNames.minLength !== undefined;\n\t\tconst hasMaxLength = schema.propertyNames.maxLength !== undefined;\n\n\t\tif (hasPattern || hasMinLength || hasMaxLength) {\n\t\t\tconst escapedPattern =\n\t\t\t\thasPattern && schema.propertyNames.pattern\n\t\t\t\t\t? schema.propertyNames.pattern.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\")\n\t\t\t\t\t: null;\n\t\t\tconst minLen = schema.propertyNames.minLength;\n\t\t\tconst maxLen = schema.propertyNames.maxLength;\n\n\t\t\tobjectDef += `.superRefine((obj, ctx) => {\n\t\t\t\t${escapedPattern ? `const pattern = /${escapedPattern}/;` : \"\"}\n\n\t\t\t\tfor (const key of Object.keys(obj)) {\n\t\t\t\t\tconst failures: string[] = [];\n\n\t\t\t\t\t${\n\t\t\t\t\t\thasPattern\n\t\t\t\t\t\t\t? `\n\t\t\t\t\tif (!pattern.test(key)) {\n\t\t\t\t\t\tfailures.push(\"must match pattern '${schema.propertyNames.pattern}'\");\n\t\t\t\t\t}\n\t\t\t\t\t`\n\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t}\n\n\t\t\t\t\t${\n\t\t\t\t\t\thasMinLength\n\t\t\t\t\t\t\t? `\n\t\t\t\t\tif (key.length < ${minLen}) {\n\t\t\t\t\t\tfailures.push(\"must be at least ${minLen} characters\");\n\t\t\t\t\t}\n\t\t\t\t\t`\n\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t}\n\n\t\t\t\t\t${\n\t\t\t\t\t\thasMaxLength\n\t\t\t\t\t\t\t? `\n\t\t\t\t\tif (key.length > ${maxLen}) {\n\t\t\t\t\t\tfailures.push(\"must be at most ${maxLen} characters\");\n\t\t\t\t\t}\n\t\t\t\t\t`\n\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t}\n\n\t\t\t\t\tif (failures.length > 0) {\n\t\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\t\tmessage: \\`Property name '\\${key}' \\${failures.join(\", \")}\\`,\n\t\t\t\t\t\t\tpath: [key]\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})`;\n\t\t}\n\t}\n\n\t// Handle dependencies (OpenAPI 3.0)\n\tobjectDef += generateDependencies(schema, context.generatePropertySchema, currentSchema);\n\n\t// Handle dependentRequired\n\tobjectDef += generateDependentRequired(schema);\n\n\t// Handle if/then/else conditionals\n\tobjectDef += generateIfThenElse(schema);\n\n\treturn objectDef;\n}\n","import { escapePattern, type LRUCache } from \"@cerios/openapi-core\";\n\nimport type { OpenAPISchema } from \"../types\";\nimport { addDescription } from \"../utils/string-utils\";\n\n/**\n * Context for string validation generation (parallel-safe)\n */\nexport interface StringValidatorContext {\n\t/**\n\t * Zod validation string for date-time format fields\n\t */\n\tdateTimeValidation: string;\n\t/**\n\t * Instance-level cache for escaped regex patterns\n\t */\n\tpatternCache: LRUCache<string, string>;\n}\n\n// Default format map (immutable, without date-time which is passed via context)\nconst DEFAULT_FORMAT_MAP: Record<string, string> = {\n\tuuid: \"z.uuid()\",\n\temail: \"z.email()\",\n\turi: \"z.url()\",\n\turl: \"z.url()\",\n\t\"uri-reference\": 'z.string().refine((val) => !/\\\\s/.test(val), { message: \"Must be a valid URI reference\" })',\n\thostname:\n\t\t'z.string().refine((val) => /^(?=.{1,253}$)(?:(?!-)[A-Za-z0-9-]{1,63}(?<!-)\\\\.)*(?!-)[A-Za-z0-9-]{1,63}(?<!-)$/.test(val), { message: \"Must be a valid hostname\" })',\n\tbyte: \"z.base64()\",\n\tbinary: \"z.string()\",\n\tdate: \"z.iso.date()\",\n\ttime: \"z.iso.time()\",\n\tduration:\n\t\t'z.string().refine((val) => /^P(?:(?:\\\\d+Y)?(?:\\\\d+M)?(?:\\\\d+D)?(?:T(?:\\\\d+H)?(?:\\\\d+M)?(?:\\\\d+(?:\\\\.\\\\d+)?S)?)?|\\\\d+W)$/.test(val) && !/^PT?$/.test(val), { message: \"Must be a valid ISO 8601 duration\" })',\n\tipv4: \"z.ipv4()\",\n\tipv6: \"z.ipv6()\",\n\temoji: \"z.emoji()\",\n\tbase64: \"z.base64()\",\n\tbase64url: \"z.base64url()\",\n\tnanoid: \"z.nanoid()\",\n\tcuid: \"z.cuid()\",\n\tcuid2: \"z.cuid2()\",\n\tulid: \"z.ulid()\",\n\tcidr: \"z.cidrv4()\", // Default to v4\n\tcidrv4: \"z.cidrv4()\",\n\tcidrv6: \"z.cidrv6()\",\n\t\"json-pointer\":\n\t\t'z.string().refine((val) => val === \"\" || /^(\\\\/([^~/]|~0|~1)+)+$/.test(val), { message: \"Must be a valid JSON Pointer (RFC 6901)\" })',\n\t\"relative-json-pointer\":\n\t\t'z.string().refine((val) => /^(0|[1-9]\\\\d*)(#|(\\\\/([^~/]|~0|~1)+)*)$/.test(val), { message: \"Must be a valid relative JSON Pointer\" })',\n};\n\n/**\n * Build the Zod validation string for date-time format\n * Pure function that returns the validation string without side effects\n *\n * @param pattern - Optional regex pattern (string or RegExp) for date-time validation\n * @returns Zod validation string (either \"z.iso.datetime()\" or custom regex)\n * @throws {Error} If the provided pattern is not a valid regular expression\n *\n * @example\n * // Default (no pattern)\n * buildDateTimeValidation() // Returns \"z.iso.datetime()\"\n *\n * @example\n * // String pattern (for JSON/YAML configs)\n * buildDateTimeValidation('^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}$')\n *\n * @example\n * // RegExp literal (TypeScript configs)\n * buildDateTimeValidation(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$/)\n */\nexport function buildDateTimeValidation(pattern?: string | RegExp): string {\n\tif (!pattern) {\n\t\treturn \"z.iso.datetime()\";\n\t}\n\n\t// Convert RegExp to string if needed\n\tconst patternStr = pattern instanceof RegExp ? pattern.source : pattern;\n\n\t// Empty string returns default\n\tif (patternStr === \"\") {\n\t\treturn \"z.iso.datetime()\";\n\t}\n\n\t// Validate the regex pattern\n\ttry {\n\t\tnew RegExp(patternStr);\n\t} catch (error) {\n\t\tthrow new Error(\n\t\t\t`Invalid regular expression pattern for customDateTimeFormatRegex: ${patternStr}. ${\n\t\t\t\terror instanceof Error ? error.message : \"Pattern is malformed\"\n\t\t\t}`\n\t\t);\n\t}\n\n\t// Escape the pattern for use in generated code\n\tconst escapedPattern = escapePattern(patternStr);\n\n\treturn `z.string().regex(/${escapedPattern}/)`;\n}\n\n/**\n * Generate Zod validation for string with format (Zod v4 compatible)\n * Thread-safe: uses context for date-time validation and pattern cache\n *\n * @param schema - OpenAPI schema to generate validation for\n * @param useDescribe - Whether to add .describe() calls\n * @param context - Context containing dateTimeValidation and patternCache (parallel-safe)\n */\nexport function generateStringValidation(\n\tschema: OpenAPISchema,\n\tuseDescribe: boolean,\n\tcontext: StringValidatorContext\n): string {\n\t// Handle format with Zod v4 top-level functions\n\t// Use context.dateTimeValidation for date-time format, DEFAULT_FORMAT_MAP for others\n\tlet validation: string;\n\tconst format = schema.format || \"\";\n\n\tif (format === \"date-time\") {\n\t\tvalidation = context.dateTimeValidation;\n\t} else {\n\t\tvalidation = DEFAULT_FORMAT_MAP[format] || \"z.string()\";\n\t}\n\n\t// Add length constraints\n\tif (schema.minLength !== undefined) {\n\t\tvalidation += `.min(${schema.minLength})`;\n\t}\n\tif (schema.maxLength !== undefined) {\n\t\tvalidation += `.max(${schema.maxLength})`;\n\t}\n\n\t// Add pattern (with cached escaping for performance using context.patternCache)\n\tif (schema.pattern) {\n\t\tlet escapedPattern = context.patternCache.get(schema.pattern);\n\t\tif (escapedPattern === undefined) {\n\t\t\tescapedPattern = escapePattern(schema.pattern);\n\t\t\tcontext.patternCache.set(schema.pattern, escapedPattern);\n\t\t}\n\t\tvalidation += `.regex(/${escapedPattern}/)`;\n\t}\n\n\t// Handle content encoding (OpenAPI 3.1)\n\tif (schema.contentEncoding && !schema.format) {\n\t\tswitch (schema.contentEncoding) {\n\t\t\tcase \"base64\":\n\t\t\t\tvalidation = \"z.base64()\";\n\t\t\t\tbreak;\n\t\t\tcase \"base64url\":\n\t\t\t\tvalidation = \"z.base64url()\";\n\t\t\t\tbreak;\n\t\t\tcase \"quoted-printable\":\n\t\t\t\t// Quoted-printable validation\n\t\t\t\tvalidation =\n\t\t\t\t\t'z.string().refine((val) => /^[\\\\x20-\\\\x7E\\\\r\\\\n=]*$/.test(val), { message: \"Must be valid quoted-printable encoding\" })';\n\t\t\t\tbreak;\n\t\t\tcase \"7bit\":\n\t\t\tcase \"8bit\":\n\t\t\tcase \"binary\":\n\t\t\t\t// Basic string validation for these encodings\n\t\t\t\tvalidation = \"z.string()\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Unknown encoding, use string with refinement note\n\t\t\t\tvalidation = `z.string().describe(\"Content encoding: ${schema.contentEncoding}\")`;\n\t\t}\n\n\t\t// Re-apply constraints after encoding\n\t\tif (schema.minLength !== undefined) {\n\t\t\tvalidation += `.min(${schema.minLength})`;\n\t\t}\n\t\tif (schema.maxLength !== undefined) {\n\t\t\tvalidation += `.max(${schema.maxLength})`;\n\t\t}\n\t\tif (schema.pattern) {\n\t\t\tlet escapedPattern = context.patternCache.get(schema.pattern);\n\t\t\tif (escapedPattern === undefined) {\n\t\t\t\tescapedPattern = escapePattern(schema.pattern);\n\t\t\t\tcontext.patternCache.set(schema.pattern, escapedPattern);\n\t\t\t}\n\t\t\tvalidation += `.regex(/${escapedPattern}/)`;\n\t\t}\n\t} else if (schema.contentMediaType) {\n\t\t// Add refinement for media type validation\n\t\tconst mediaType = schema.contentMediaType;\n\t\tif (mediaType === \"application/json\") {\n\t\t\tvalidation += `.refine((val) => { try { JSON.parse(val); return true; } catch { return false; } }, { message: \"Must be valid JSON\" })`;\n\t\t} else if (mediaType === \"application/xml\" || mediaType === \"text/xml\") {\n\t\t\t// Basic XML validation - check for well-formed XML structure\n\t\t\tvalidation += `.refine((val) => { try { if (typeof DOMParser !== \"undefined\") { const parser = new DOMParser(); const doc = parser.parseFromString(val, \"text/xml\"); return !doc.querySelector(\"parsererror\"); } return /^\\\\s*<[^>]+>/.test(val); } catch { return false; } }, { message: \"Must be valid XML\" })`;\n\t\t} else if (mediaType === \"application/yaml\" || mediaType === \"application/x-yaml\" || mediaType === \"text/yaml\") {\n\t\t\t// Basic YAML validation - check for basic YAML structure\n\t\t\tvalidation += `.refine((val) => { try { return val.trim().length > 0 && !/^[[{]/.test(val.trim()); } catch { return false; } }, { message: \"Must be valid YAML\" })`;\n\t\t} else if (mediaType === \"text/html\") {\n\t\t\t// Basic HTML validation - check for HTML tags\n\t\t\tvalidation += `.refine((val) => /<[^>]+>/.test(val), { message: \"Must contain HTML tags\" })`;\n\t\t} else if (mediaType === \"text/plain\") {\n\t\t\t// Plain text - no special validation needed, but mark it\n\t\t\tvalidation += `.refine(() => true, { message: \"Plain text content\" })`;\n\t\t}\n\t\t// Other media types default to no validation beyond string\n\t}\n\n\t// Add description if useDescribe is enabled\n\treturn addDescription(validation, schema.description, useDescribe);\n}\n","import {\n\tgetPrimaryType,\n\thasMultipleTypes,\n\tisNullable,\n\tLRUCache,\n\ttype NamingOptions,\n\tresolveRefName,\n\tstripPrefix,\n\ttoCamelCase,\n\ttoPascalCase,\n} from \"@cerios/openapi-core\";\n\nimport type { OpenAPISchema, OpenAPISpec } from \"../types\";\nimport { addDescription, wrapNullable } from \"../utils/string-utils\";\nimport { generateArrayValidation } from \"../validators/array-validator\";\nimport { generateAllOf, generateUnion } from \"../validators/composition-validator\";\nimport { generateNumberValidation } from \"../validators/number-validator\";\nimport type { ObjectMode } from \"../validators/object-validator\";\nimport { generateObjectSchema } from \"../validators/object-validator\";\nimport { generateStringValidation } from \"../validators/string-validator\";\n\nexport interface PropertyGeneratorContext {\n\tspec: OpenAPISpec;\n\tschemaDependencies: Map<string, Set<string>>;\n\tschemaType: \"all\" | \"request\" | \"response\";\n\tmode: ObjectMode;\n\tincludeDescriptions: boolean;\n\tuseDescribe: boolean;\n\tnamingOptions: NamingOptions;\n\tstripSchemaPrefix?: string | string[];\n\t/**\n\t * Default nullable behavior when not explicitly specified\n\t * @default false\n\t */\n\tdefaultNullable: boolean;\n\t/**\n\t * Behavior for empty object schemas (objects with no properties defined)\n\t * @default 'loose'\n\t */\n\temptyObjectBehavior: \"strict\" | \"loose\" | \"record\";\n\t/**\n\t * Zod validation string for date-time format fields\n\t * @default \"z.iso.datetime()\"\n\t */\n\tdateTimeValidation: string;\n\t/**\n\t * Instance-level cache for escaped regex patterns (parallel-safe)\n\t */\n\tpatternCache: LRUCache<string, string>;\n\t/**\n\t * Whether types are generated in a separate file (imported) vs inline (z.infer)\n\t * When true, z.lazy uses z.ZodType<TypeName> for proper type inference\n\t * When false, z.lazy uses z.ZodTypeAny to avoid circular type references\n\t * @default false\n\t */\n\tseparateTypesFile: boolean;\n\t/**\n\t * Warning function for non-fatal issues during schema generation\n\t * If not provided, warnings are silently ignored\n\t */\n\twarn?: (message: string) => void;\n}\n\n/**\n * Property schema generator with memoization for performance\n */\nexport class PropertyGenerator {\n\tprivate context: PropertyGeneratorContext;\n\t// Performance optimization: Memoize filtered property results\n\tprivate filteredPropsCache = new Map<string, OpenAPISchema>();\n\t// Performance optimization: LRU cache for generated schemas\n\tprivate schemaCache = new LRUCache<string, string>(500);\n\t// Track allOf conflicts detected during schema generation\n\tprivate allOfConflicts: string[] = [];\n\t// Schemas that are part of circular dependency chains (need z.lazy for forward refs)\n\tprivate circularDependencies: Set<string> = new Set();\n\n\t// Performance optimization: Lookup table for faster inclusion checks\n\tstatic readonly INCLUSION_RULES = {\n\t\trequest: (schema: OpenAPISchema) => !schema.readOnly,\n\t\tresponse: (schema: OpenAPISchema) => !schema.writeOnly,\n\t\tall: () => true,\n\t} as const;\n\n\tconstructor(context: PropertyGeneratorContext) {\n\t\tthis.context = context;\n\t}\n\n\t/**\n\t * Set the schemas that are involved in circular dependency chains.\n\t * These schemas will use z.lazy() for forward references.\n\t */\n\tsetCircularDependencies(deps: Set<string>): void {\n\t\tthis.circularDependencies = deps;\n\t}\n\n\t/**\n\t * Get allOf conflicts detected during the last schema generation\n\t * @returns Array of conflict description strings\n\t */\n\tgetAllOfConflicts(): string[] {\n\t\treturn [...this.allOfConflicts];\n\t}\n\n\t/**\n\t * Clear tracked allOf conflicts (call before generating a new schema)\n\t */\n\tclearAllOfConflicts(): void {\n\t\tthis.allOfConflicts = [];\n\t}\n\n\t/**\n\t * Check if a property should be included based on schemaType and readOnly/writeOnly flags\n\t */\n\tshouldIncludeProperty(schema: OpenAPISchema): boolean {\n\t\tconst rule = PropertyGenerator.INCLUSION_RULES[this.context.schemaType];\n\t\treturn rule(schema);\n\t}\n\n\t/**\n\t * Recursively filter any schema type (helper for composition schemas)\n\t */\n\tprivate filterSchemaRecursive(schema: OpenAPISchema): OpenAPISchema {\n\t\tif (schema.$ref) {\n\t\t\t// Don't filter refs, they'll be filtered when resolved\n\t\t\treturn schema;\n\t\t}\n\n\t\tif (schema.properties) {\n\t\t\treturn this.filterNestedProperties(schema);\n\t\t}\n\n\t\tif (schema.type === \"array\" && schema.items && typeof schema.items === \"object\" && schema.items.properties) {\n\t\t\treturn {\n\t\t\t\t...schema,\n\t\t\t\titems: this.filterNestedProperties(schema.items),\n\t\t\t};\n\t\t}\n\n\t\treturn schema;\n\t}\n\n\t/**\n\t * Recursively filter properties in nested objects based on readOnly/writeOnly\n\t * Performance optimized with memoization\n\t */\n\tprivate filterNestedProperties(schema: OpenAPISchema): OpenAPISchema {\n\t\t// Performance optimization: More efficient cache key generation\n\t\tconst propKeys = schema.properties ? Object.keys(schema.properties).sort().join(\",\") : \"\";\n\t\tconst requiredKeys = Array.isArray(schema.required) ? schema.required.join(\",\") : String(schema.required ?? \"\");\n\t\tconst schemaType = Array.isArray(schema.type) ? schema.type.join(\"|\") : schema.type || \"unknown\";\n\t\tconst cacheKey = `${this.context.schemaType}:${schemaType}:${propKeys}:${requiredKeys}`;\n\t\tconst cached = this.filteredPropsCache.get(cacheKey);\n\t\tif (cached) {\n\t\t\treturn cached;\n\t\t}\n\n\t\tif (!schema.properties) {\n\t\t\treturn schema;\n\t\t}\n\n\t\tconst filteredProperties: Record<string, OpenAPISchema> = {};\n\t\tconst filteredRequired: string[] = [];\n\n\t\tfor (const [propName, propSchema] of Object.entries(schema.properties)) {\n\t\t\tif (!this.shouldIncludeProperty(propSchema)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Recursively filter nested structures\n\t\t\tlet filteredPropSchema = propSchema;\n\n\t\t\tif (propSchema.type === \"object\" && propSchema.properties) {\n\t\t\t\t// Nested object\n\t\t\t\tfilteredPropSchema = this.filterNestedProperties(propSchema);\n\t\t\t} else if (\n\t\t\t\tpropSchema.type === \"array\" &&\n\t\t\t\tpropSchema.items &&\n\t\t\t\ttypeof propSchema.items === \"object\" &&\n\t\t\t\tpropSchema.items.properties\n\t\t\t) {\n\t\t\t\t// Array of objects\n\t\t\t\tfilteredPropSchema = {\n\t\t\t\t\t...propSchema,\n\t\t\t\t\titems: this.filterNestedProperties(propSchema.items),\n\t\t\t\t};\n\t\t\t} else if (propSchema.allOf || propSchema.oneOf || propSchema.anyOf) {\n\t\t\t\t// Composition schemas - filter each branch\n\t\t\t\tif (propSchema.allOf) {\n\t\t\t\t\tfilteredPropSchema = {\n\t\t\t\t\t\t...propSchema,\n\t\t\t\t\t\tallOf: propSchema.allOf.map(s => this.filterSchemaRecursive(s)),\n\t\t\t\t\t};\n\t\t\t\t} else if (propSchema.oneOf) {\n\t\t\t\t\tfilteredPropSchema = {\n\t\t\t\t\t\t...propSchema,\n\t\t\t\t\t\toneOf: propSchema.oneOf.map(s => this.filterSchemaRecursive(s)),\n\t\t\t\t\t};\n\t\t\t\t} else if (propSchema.anyOf) {\n\t\t\t\t\tfilteredPropSchema = {\n\t\t\t\t\t\t...propSchema,\n\t\t\t\t\t\tanyOf: propSchema.anyOf.map(s => this.filterSchemaRecursive(s)),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfilteredProperties[propName] = filteredPropSchema;\n\n\t\t\t// Keep required status if property is included\n\t\t\tif (schema.required?.includes(propName)) {\n\t\t\t\tfilteredRequired.push(propName);\n\t\t\t}\n\t\t}\n\n\t\tconst result = {\n\t\t\t...schema,\n\t\t\tproperties: filteredProperties,\n\t\t\trequired: filteredRequired.length > 0 ? filteredRequired : undefined,\n\t\t};\n\n\t\t// Cache the result\n\t\tthis.filteredPropsCache.set(cacheKey, result);\n\t\treturn result;\n\t}\n\n\t/**\n\t * Resolve discriminator mapping to actual schema references\n\t */\n\tprivate resolveDiscriminatorMapping(mapping: Record<string, string>, schemas: OpenAPISchema[]): OpenAPISchema[] {\n\t\t// If mapping is provided, use it to reorder/filter schemas\n\t\t// The mapping maps discriminator values to schema references\n\t\tconst mappedSchemas: OpenAPISchema[] = [];\n\n\t\tfor (const [_, schemaRef] of Object.entries(mapping)) {\n\t\t\t// Find the schema that matches this reference\n\t\t\tconst matchingSchema = schemas.find(s => {\n\t\t\t\tif (s.$ref) {\n\t\t\t\t\t// Check if the ref matches\n\t\t\t\t\treturn s.$ref === schemaRef || s.$ref.endsWith(schemaRef);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\tif (matchingSchema) {\n\t\t\t\tmappedSchemas.push(matchingSchema);\n\t\t\t} else {\n\t\t\t\t// Schema not found in oneOf/anyOf, create a reference\n\t\t\t\tmappedSchemas.push({ $ref: schemaRef });\n\t\t\t}\n\t\t}\n\n\t\t// Include any schemas that weren't in the mapping\n\t\tfor (const schema of schemas) {\n\t\t\tif (!mappedSchemas.includes(schema)) {\n\t\t\t\tmappedSchemas.push(schema);\n\t\t\t}\n\t\t}\n\n\t\treturn mappedSchemas;\n\t}\n\n\t/**\n\t * Resolve a $ref string to the actual schema\n\t */\n\tprivate resolveSchemaRef(ref: string): OpenAPISchema | undefined {\n\t\tconst schemaName = ref.split(\"/\").pop();\n\t\tif (!schemaName) return undefined;\n\t\treturn this.context.spec.components?.schemas?.[schemaName];\n\t}\n\n\t/**\n\t * Resolve a schema name through any aliases to get the actual schema name\n\t * If the schema is an alias (allOf with single $ref), return the target name\n\t */\n\tprivate resolveSchemaAlias(schemaName: string): string {\n\t\tconst schema = this.context.spec.components?.schemas?.[schemaName];\n\t\tif (!schema) return schemaName;\n\n\t\t// Check if this is a simple alias (allOf with single $ref and nothing else)\n\t\tif (\n\t\t\tschema.allOf &&\n\t\t\tschema.allOf.length === 1 &&\n\t\t\tschema.allOf[0].$ref &&\n\t\t\t!schema.properties &&\n\t\t\t!schema.oneOf &&\n\t\t\t!schema.anyOf\n\t\t) {\n\t\t\tconst targetName = resolveRefName(schema.allOf[0].$ref);\n\t\t\t// Recursively resolve in case of chained aliases\n\t\t\treturn this.resolveSchemaAlias(targetName);\n\t\t}\n\n\t\treturn schemaName;\n\t}\n\n\t/**\n\t * Check if this is a circular dependency through aliases\n\t */\n\tprivate isCircularThroughAlias(fromSchema: string, toSchema: string): boolean {\n\t\tconst toSchemaSpec = this.context.spec.components?.schemas?.[toSchema];\n\t\tif (!toSchemaSpec) return false;\n\n\t\t// Check if toSchema is a simple alias (allOf with single $ref)\n\t\tif (toSchemaSpec.allOf && toSchemaSpec.allOf.length === 1 && toSchemaSpec.allOf[0].$ref) {\n\t\t\tconst aliasTarget = resolveRefName(toSchemaSpec.allOf[0].$ref);\n\t\t\t// If the alias points back to the original schema, it's circular\n\t\t\treturn aliasTarget === fromSchema;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Generate union for multiple types (OpenAPI 3.1)\n\t */\n\tprivate generateMultiTypeUnion(schema: OpenAPISchema, currentSchema?: string): string {\n\t\tif (!Array.isArray(schema.type)) {\n\t\t\treturn \"z.unknown()\";\n\t\t}\n\t\tconst nonNullTypes = schema.type.filter(t => t !== \"null\");\n\t\tconst schemas = nonNullTypes.map(type => {\n\t\t\tconst typeSchema = { ...schema, type };\n\t\t\treturn this.generatePropertySchema(typeSchema, currentSchema);\n\t\t});\n\t\treturn `z.union([${schemas.join(\", \")}])`;\n\t}\n\n\t/**\n\t * Apply unevaluatedProperties validation to a schema\n\t */\n\tprivate applyUnevaluatedProperties(baseSchema: string, schema: OpenAPISchema): string {\n\t\t// Collect all evaluated properties from the schema and its composition\n\t\tconst evaluatedProps = new Set<string>();\n\n\t\t// Add properties from this schema\n\t\tif (schema.properties) {\n\t\t\tfor (const propName of Object.keys(schema.properties)) {\n\t\t\t\tevaluatedProps.add(propName);\n\t\t\t}\n\t\t}\n\n\t\t// Add properties from allOf/oneOf/anyOf (shallow scan)\n\t\tconst collectPropsFromComposition = (schemas?: OpenAPISchema[]) => {\n\t\t\tif (!schemas) return;\n\t\t\tfor (const subSchema of schemas) {\n\t\t\t\tif (subSchema.properties) {\n\t\t\t\t\tfor (const propName of Object.keys(subSchema.properties)) {\n\t\t\t\t\t\tevaluatedProps.add(propName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Also check $ref schemas\n\t\t\t\tif (subSchema.$ref) {\n\t\t\t\t\tconst refSchema = this.context.spec.components?.schemas?.[subSchema.$ref.split(\"/\").pop() || \"\"];\n\t\t\t\t\tif (refSchema?.properties) {\n\t\t\t\t\t\tfor (const propName of Object.keys(refSchema.properties)) {\n\t\t\t\t\t\t\tevaluatedProps.add(propName);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcollectPropsFromComposition(schema.allOf);\n\t\tcollectPropsFromComposition(schema.oneOf);\n\t\tcollectPropsFromComposition(schema.anyOf);\n\n\t\tconst evaluatedPropsSet = `new Set(${JSON.stringify([...evaluatedProps])})`;\n\n\t\t// For unions (oneOf/anyOf), we need to add .catchall(z.unknown()) to EACH branch\n\t\t// For allOf with extend(), add catchall to the final result\n\t\tlet schemaWithCatchall = baseSchema;\n\t\tif (baseSchema.includes(\".union([\") || baseSchema.includes(\".discriminatedUnion(\")) {\n\t\t\t// For unions, we need to make each branch allow additional properties\n\t\t\t// This is complex, so we'll apply refinement and let the refinement check the raw input\n\t\t\t// The union will have already validated structure, refinement checks extra props\n\t\t\tschemaWithCatchall = baseSchema;\n\t\t} else if (baseSchema.includes(\".extend(\")) {\n\t\t\t// Wrap in catchall - apply to final result\n\t\t\tschemaWithCatchall = `${baseSchema}.catchall(z.unknown())`;\n\t\t}\n\n\t\tif (schema.unevaluatedProperties === false) {\n\t\t\t// No unevaluated properties allowed\n\t\t\treturn `${schemaWithCatchall}.refine((obj) => Object.keys(obj).every(key => ${evaluatedPropsSet}.has(key)), { message: \"No unevaluated properties allowed\" })`;\n\t\t} else if (typeof schema.unevaluatedProperties === \"object\") {\n\t\t\t// Unevaluated properties must match schema\n\t\t\tconst unevalSchema = this.generatePropertySchema(schema.unevaluatedProperties);\n\t\t\treturn `${schemaWithCatchall}.refine((obj) => Object.keys(obj).filter(key => !${evaluatedPropsSet}.has(key)).every(key => ${unevalSchema}.safeParse(obj[key]).success), { message: \"Unevaluated properties must match the schema\" })`;\n\t\t}\n\n\t\treturn baseSchema;\n\t}\n\n\t/**\n\t * Generate Zod schema for a property\n\t * @param schema - The OpenAPI schema to generate\n\t * @param currentSchema - The name of the current schema being processed (for circular ref detection)\n\t * @param isTopLevel - Whether this is a top-level schema definition\n\t * @param suppressDefaultNullable - When true, don't apply defaultNullable (used when outer schema has explicit nullable: false)\n\t */\n\tgeneratePropertySchema(\n\t\tschema: OpenAPISchema,\n\t\tcurrentSchema?: string,\n\t\tisTopLevel = false,\n\t\tsuppressDefaultNullable = false\n\t): string {\n\t\t// Performance optimization: Check cache for simple schemas\n\t\t// Only cache schemas without $ref or complex compositions to avoid stale circular refs\n\t\tconst isCacheable = !schema.$ref && !schema.allOf && !schema.oneOf && !schema.anyOf && !currentSchema;\n\t\tif (isCacheable) {\n\t\t\tconst cacheKey = JSON.stringify({\n\t\t\t\tschema,\n\t\t\t\ttype: this.context.schemaType,\n\t\t\t\tmode: this.context.mode,\n\t\t\t\tsuppressDefaultNullable,\n\t\t\t});\n\t\t\tconst cached = this.schemaCache.get(cacheKey);\n\t\t\tif (cached) {\n\t\t\t\treturn cached;\n\t\t\t}\n\t\t}\n\n\t\t// Apply nested property filtering if needed\n\t\tif ((this.context.schemaType === \"request\" || this.context.schemaType === \"response\") && schema.properties) {\n\t\t\tschema = this.filterNestedProperties(schema);\n\t\t}\n\n\t\t// Determine if defaultNullable should apply to this schema.\n\t\t// defaultNullable should apply to property values within objects, NOT to:\n\t\t// 1. Top-level schema definitions (isTopLevel = true)\n\t\t// 2. Enum values - enums define discrete values and shouldn't be nullable by default\n\t\t// 3. Const/literal values - these are exact values and shouldn't be nullable by default\n\t\t// 4. When suppressDefaultNullable is true (outer schema has explicit nullable: false)\n\t\t//\n\t\t// Note: $ref properties DO respect defaultNullable. If you want a non-nullable\n\t\t// reference when defaultNullable is true, you must explicitly add `nullable: false`\n\t\t// to the schema containing the $ref.\n\t\tconst isEnum = !!schema.enum;\n\t\tconst isConst = schema.const !== undefined;\n\t\tconst shouldApplyDefaultNullable = !isTopLevel && !isEnum && !isConst && !suppressDefaultNullable;\n\t\tconst effectiveDefaultNullable = shouldApplyDefaultNullable ? this.context.defaultNullable : false;\n\t\tconst nullable = isNullable(schema, effectiveDefaultNullable);\n\n\t\t// Handle multiple types (OpenAPI 3.1)\n\t\tif (hasMultipleTypes(schema)) {\n\t\t\tconst union = this.generateMultiTypeUnion(schema, currentSchema);\n\t\t\treturn wrapNullable(union, nullable);\n\t\t}\n\n\t\t// Handle $ref\n\t\tif (schema.$ref) {\n\t\t\tconst refName = resolveRefName(schema.$ref);\n\t\t\t// Resolve through any aliases to get the actual schema\n\t\t\tconst resolvedRefName = this.resolveSchemaAlias(refName);\n\n\t\t\t// Track dependency (but not if it's just an alias at top level)\n\t\t\tif (currentSchema && refName !== currentSchema && !isTopLevel) {\n\t\t\t\tif (!this.context.schemaDependencies.has(currentSchema)) {\n\t\t\t\t\tthis.context.schemaDependencies.set(currentSchema, new Set());\n\t\t\t\t}\n\t\t\t\tthis.context.schemaDependencies.get(currentSchema)?.add(refName);\n\t\t\t}\n\t\t\t// Use the resolved name for the schema reference\n\t\t\t// Apply stripSchemaPrefix to get consistent schema names\n\t\t\tconst strippedRefName = stripPrefix(resolvedRefName, this.context.stripSchemaPrefix);\n\t\t\tconst schemaName = `${toCamelCase(strippedRefName, this.context.namingOptions)}Schema`;\n\t\t\tconst typeName = toPascalCase(strippedRefName);\n\n\t\t\t// Check for direct self-reference, circular dependency through alias,\n\t\t\t// or mutual circular dependency (both schemas are part of a circular chain)\n\t\t\tconst isDirectSelfRef = currentSchema && refName === currentSchema;\n\t\t\tconst isCircularAlias = currentSchema && this.isCircularThroughAlias(currentSchema, refName);\n\t\t\t// Only use lazy for refs within a circular chain when BOTH schemas are circular.\n\t\t\t// If only the target is circular (e.g., self-referencing), the current schema\n\t\t\t// referencing it doesn't need lazy because the target is defined first in\n\t\t\t// topological sort order.\n\t\t\tconst isMutuallyCircular =\n\t\t\t\tcurrentSchema && this.circularDependencies.has(currentSchema) && this.circularDependencies.has(refName);\n\n\t\t\tif (isDirectSelfRef || isCircularAlias || isMutuallyCircular) {\n\t\t\t\t// Use lazy evaluation for circular references\n\t\t\t\t// When types are in a separate file (imported), use z.ZodType<TypeName> for proper type inference\n\t\t\t\t// When types are inline (z.infer), use z.ZodTypeAny to avoid circular type references\n\t\t\t\tconst lazyTypeAnnotation = this.context.separateTypesFile ? `z.ZodType<${typeName}>` : \"z.ZodTypeAny\";\n\t\t\t\tconst lazySchema = `z.lazy((): ${lazyTypeAnnotation} => ${schemaName})`;\n\t\t\t\treturn wrapNullable(lazySchema, nullable);\n\t\t\t}\n\n\t\t\treturn wrapNullable(schemaName, nullable);\n\t\t}\n\n\t\t// Handle const (literal values)\n\t\tif (schema.const !== undefined) {\n\t\t\tconst literalValue = typeof schema.const === \"string\" ? `\"${schema.const}\"` : schema.const;\n\t\t\tconst zodLiteral = `z.literal(${literalValue})`;\n\t\t\treturn wrapNullable(zodLiteral, nullable);\n\t\t}\n\n\t\t// Handle enum\n\t\tif (schema.enum) {\n\t\t\t// Check if all values are booleans\n\t\t\tconst allBooleans = schema.enum.every(v => typeof v === \"boolean\");\n\t\t\tif (allBooleans) {\n\t\t\t\tconst zodBoolean = \"z.boolean()\";\n\t\t\t\treturn wrapNullable(zodBoolean, nullable);\n\t\t\t}\n\n\t\t\t// Check if all values are strings\n\t\t\tconst allStrings = schema.enum.every(v => typeof v === \"string\");\n\t\t\tif (allStrings) {\n\t\t\t\tconst enumValues = schema.enum.map(v => `\"${v}\"`).join(\", \");\n\t\t\t\tconst zodEnum = `z.enum([${enumValues}])`;\n\t\t\t\treturn wrapNullable(zodEnum, nullable);\n\t\t\t}\n\n\t\t\t// For numeric or mixed enums, use z.union with z.literal\n\t\t\tconst literalValues = schema.enum\n\t\t\t\t.map(v => {\n\t\t\t\t\tif (typeof v === \"string\") {\n\t\t\t\t\t\treturn `z.literal(\"${v}\")`;\n\t\t\t\t\t}\n\t\t\t\t\treturn `z.literal(${v})`;\n\t\t\t\t})\n\t\t\t\t.join(\", \");\n\t\t\tconst zodUnion = `z.union([${literalValues}])`;\n\t\t\treturn wrapNullable(zodUnion, nullable);\n\t\t}\n\n\t\t// Handle allOf\n\t\tif (schema.allOf) {\n\t\t\t// For allOf compositions, only apply nullable if explicitly set on the schema.\n\t\t\t// defaultNullable should NOT apply to composition results - they define schema shapes,\n\t\t\t// not property values. The .nullable() on individual properties inside the composition\n\t\t\t// is handled by generateInlineObjectShape which respects defaultNullable.\n\t\t\tconst compositionNullable = isNullable(schema, false);\n\t\t\tconst allOfResult = generateAllOf(\n\t\t\t\tschema.allOf,\n\t\t\t\tcompositionNullable,\n\t\t\t\t{\n\t\t\t\t\tgeneratePropertySchema: this.generatePropertySchema.bind(this),\n\t\t\t\t\tgenerateInlineObjectShape: this.generateInlineObjectShape.bind(this),\n\t\t\t\t\tresolveSchemaRef: this.resolveSchemaRef.bind(this),\n\t\t\t\t\twarn: this.context.warn,\n\t\t\t\t},\n\t\t\t\tcurrentSchema\n\t\t\t);\n\n\t\t\t// Track any conflicts detected\n\t\t\tif (allOfResult.conflicts.length > 0) {\n\t\t\t\tthis.allOfConflicts.push(...allOfResult.conflicts);\n\t\t\t}\n\n\t\t\tlet composition = allOfResult.schema;\n\n\t\t\t// Apply unevaluatedProperties if specified\n\t\t\tif (schema.unevaluatedProperties !== undefined) {\n\t\t\t\tcomposition = this.applyUnevaluatedProperties(composition, schema);\n\t\t\t}\n\n\t\t\treturn composition;\n\t\t}\n\n\t\t// Handle oneOf with discriminator support\n\t\tif (schema.oneOf) {\n\t\t\t// For oneOf compositions, only apply nullable if explicitly set on the schema.\n\t\t\t// defaultNullable should NOT apply to composition results.\n\t\t\tconst compositionNullable = isNullable(schema, false);\n\t\t\tconst needsPassthrough = schema.unevaluatedProperties !== undefined;\n\t\t\tlet composition = generateUnion(\n\t\t\t\tschema.oneOf,\n\t\t\t\tschema.discriminator?.propertyName,\n\t\t\t\tcompositionNullable,\n\t\t\t\t{\n\t\t\t\t\tgeneratePropertySchema: this.generatePropertySchema.bind(this),\n\t\t\t\t\tresolveDiscriminatorMapping: this.resolveDiscriminatorMapping.bind(this),\n\t\t\t\t\tresolveSchemaRef: this.resolveSchemaRef.bind(this),\n\t\t\t\t\twarn: this.context.warn,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpassthrough: needsPassthrough,\n\t\t\t\t\tdiscriminatorMapping: schema.discriminator?.mapping,\n\t\t\t\t},\n\t\t\t\tcurrentSchema\n\t\t\t);\n\n\t\t\t// Apply unevaluatedProperties if specified\n\t\t\tif (schema.unevaluatedProperties !== undefined) {\n\t\t\t\tcomposition = this.applyUnevaluatedProperties(composition, schema);\n\t\t\t}\n\n\t\t\treturn composition;\n\t\t}\n\n\t\t// Handle anyOf with discriminator support\n\t\tif (schema.anyOf) {\n\t\t\t// For anyOf compositions, only apply nullable if explicitly set on the schema.\n\t\t\t// defaultNullable should NOT apply to composition results.\n\t\t\tconst compositionNullable = isNullable(schema, false);\n\t\t\tconst needsPassthrough = schema.unevaluatedProperties !== undefined;\n\t\t\tlet composition = generateUnion(\n\t\t\t\tschema.anyOf,\n\t\t\t\tschema.discriminator?.propertyName,\n\t\t\t\tcompositionNullable,\n\t\t\t\t{\n\t\t\t\t\tgeneratePropertySchema: this.generatePropertySchema.bind(this),\n\t\t\t\t\tresolveDiscriminatorMapping: this.resolveDiscriminatorMapping.bind(this),\n\t\t\t\t\tresolveSchemaRef: this.resolveSchemaRef.bind(this),\n\t\t\t\t\twarn: this.context.warn,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpassthrough: needsPassthrough,\n\t\t\t\t\tdiscriminatorMapping: schema.discriminator?.mapping,\n\t\t\t\t},\n\t\t\t\tcurrentSchema\n\t\t\t);\n\n\t\t\t// Apply unevaluatedProperties if specified\n\t\t\tif (schema.unevaluatedProperties !== undefined) {\n\t\t\t\tcomposition = this.applyUnevaluatedProperties(composition, schema);\n\t\t\t}\n\n\t\t\treturn composition;\n\t\t}\n\n\t\t// Handle not keyword (must be after compositions)\n\t\tif (schema.not) {\n\t\t\tconst notSchema = this.generatePropertySchema(schema.not, currentSchema);\n\t\t\tlet baseValidation: string;\n\n\t\t\t// If schema has a type, generate validation for that type first\n\t\t\tif (schema.type || schema.properties || schema.items) {\n\t\t\t\t// Create a copy without 'not' to generate base validation\n\t\t\t\tconst { not: _, ...baseSchema } = schema;\n\t\t\t\tbaseValidation = this.generatePropertySchema(baseSchema, currentSchema);\n\t\t\t} else {\n\t\t\t\t// No specific type, use unknown\n\t\t\t\tbaseValidation = \"z.unknown()\";\n\t\t\t}\n\n\t\t\tconst refined = `${baseValidation}.refine((val) => !${notSchema}.safeParse(val).success, { message: \"Value must not match the excluded schema\" })`;\n\t\t\treturn wrapNullable(refined, nullable);\n\t\t}\n\n\t\tlet validation = \"\";\n\t\tconst primaryType = getPrimaryType(schema);\n\n\t\tswitch (primaryType) {\n\t\t\tcase \"string\":\n\t\t\t\tvalidation = generateStringValidation(schema, this.context.useDescribe, {\n\t\t\t\t\tdateTimeValidation: this.context.dateTimeValidation,\n\t\t\t\t\tpatternCache: this.context.patternCache,\n\t\t\t\t});\n\t\t\t\tbreak;\n\n\t\t\tcase \"number\":\n\t\t\t\tvalidation = generateNumberValidation(schema, false, this.context.useDescribe);\n\t\t\t\tbreak;\n\n\t\t\tcase \"integer\":\n\t\t\t\tvalidation = generateNumberValidation(schema, true, this.context.useDescribe);\n\t\t\t\tbreak;\n\n\t\t\tcase \"boolean\":\n\t\t\t\tvalidation = \"z.boolean()\";\n\t\t\t\tvalidation = addDescription(validation, schema.description, this.context.useDescribe);\n\t\t\t\tbreak;\n\n\t\t\tcase \"array\":\n\t\t\t\tvalidation = generateArrayValidation(schema, {\n\t\t\t\t\tgeneratePropertySchema: this.generatePropertySchema.bind(this),\n\t\t\t\t\tuseDescribe: this.context.useDescribe,\n\t\t\t\t\tcurrentSchema,\n\t\t\t\t});\n\t\t\t\tbreak;\n\n\t\t\tcase \"object\":\n\t\t\t\tif (\n\t\t\t\t\tschema.properties ||\n\t\t\t\t\tschema.required ||\n\t\t\t\t\tschema.minProperties !== undefined ||\n\t\t\t\t\tschema.maxProperties !== undefined ||\n\t\t\t\t\tschema.patternProperties ||\n\t\t\t\t\tschema.propertyNames\n\t\t\t\t) {\n\t\t\t\t\tvalidation = generateObjectSchema(\n\t\t\t\t\t\tschema,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeneratePropertySchema: this.generatePropertySchema.bind(this),\n\t\t\t\t\t\t\tshouldIncludeProperty: this.shouldIncludeProperty.bind(this),\n\t\t\t\t\t\t\tmode: this.context.mode,\n\t\t\t\t\t\t\tincludeDescriptions: this.context.includeDescriptions,\n\t\t\t\t\t\t\tuseDescribe: this.context.useDescribe,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcurrentSchema\n\t\t\t\t\t);\n\t\t\t\t\tvalidation = addDescription(validation, schema.description, this.context.useDescribe);\n\t\t\t\t} else {\n\t\t\t\t\t// Empty object schema - behavior controlled by emptyObjectBehavior option\n\t\t\t\t\tswitch (this.context.emptyObjectBehavior) {\n\t\t\t\t\t\tcase \"strict\":\n\t\t\t\t\t\t\tvalidation = \"z.strictObject({})\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"loose\":\n\t\t\t\t\t\t\tvalidation = \"z.looseObject({})\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"record\":\n\t\t\t\t\t\t\tvalidation = \"z.record(z.string(), z.unknown())\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tvalidation = addDescription(validation, schema.description, this.context.useDescribe);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase undefined:\n\t\t\tdefault:\n\t\t\t\tvalidation = \"z.unknown()\";\n\t\t\t\tvalidation = addDescription(validation, schema.description, this.context.useDescribe);\n\t\t}\n\n\t\tconst result = wrapNullable(validation, nullable);\n\n\t\t// Store in cache if cacheable\n\t\tif (isCacheable) {\n\t\t\tconst cacheKey = JSON.stringify({ schema, type: this.context.schemaType, mode: this.context.mode });\n\t\t\tthis.schemaCache.set(cacheKey, result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Generate inline object shape for use with .extend()\n\t * Returns just the shape object literal: { prop1: z.string(), prop2: z.number() }\n\t *\n\t * This method is specifically for allOf compositions where we need to pass\n\t * the shape directly to .extend() instead of using z.object({...}).shape.\n\t * This avoids the .nullable().shape bug when inline objects have nullable: true.\n\t *\n\t * According to Zod docs (https://zod.dev/api?id=extend):\n\t * - .extend() accepts an object of shape definitions\n\t * - e.g., baseSchema.extend({ prop: z.string() })\n\t */\n\tgenerateInlineObjectShape(schema: OpenAPISchema, currentSchema?: string): string {\n\t\tconst required = new Set(schema.required || []);\n\t\tconst properties: string[] = [];\n\n\t\tif (schema.properties) {\n\t\t\tfor (const [propName, propSchema] of Object.entries(schema.properties)) {\n\t\t\t\t// Skip properties based on readOnly/writeOnly\n\t\t\t\tif (!this.shouldIncludeProperty(propSchema)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst isRequired = required.has(propName);\n\t\t\t\tconst zodSchema = this.generatePropertySchema(propSchema, currentSchema);\n\n\t\t\t\t// Quote property name if it contains special characters\n\t\t\t\tconst validIdentifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;\n\t\t\t\tconst quotedPropName = validIdentifier.test(propName) ? propName : `\"${propName}\"`;\n\n\t\t\t\tlet propertyDef = `${quotedPropName}: ${zodSchema}`;\n\t\t\t\tif (!isRequired) {\n\t\t\t\t\tpropertyDef += \".optional()\";\n\t\t\t\t}\n\n\t\t\t\tproperties.push(propertyDef);\n\t\t\t}\n\t\t}\n\n\t\t// Return the shape as an object literal\n\t\tif (properties.length === 0) {\n\t\t\treturn \"{}\";\n\t\t}\n\n\t\treturn `{\\n${properties.map(p => `\\t${p}`).join(\",\\n\")}\\n}`;\n\t}\n}\n","import { existsSync, mkdirSync, writeFileSync } from \"node:fs\";\nimport { dirname, normalize, relative } from \"node:path\";\n\nimport {\n\tanalyzeSchemaUsage,\n\tConfigurationError,\n\tcreateFilterStatistics,\n\tdetectCircularReferences,\n\texpandTransitiveReferences,\n\textractSchemaRefs,\n\ttype FilterStatistics,\n\tformatFilterStatistics,\n\tgenerateCustomFileHeader,\n\tgenerateFileHeader,\n\tgetOperationName,\n\tLRUCache,\n\tloadOpenAPISpec,\n\tmergeParameters,\n\tresolveRefName,\n\ttype SchemaContext,\n\tSchemaGenerationError,\n\tSpecValidationError,\n\tshouldIncludeOperation,\n\tstripPathPrefix,\n\tstripPrefix,\n\ttoCamelCase,\n\ttoPascalCase,\n\tvalidateFilters,\n\tWarningCollector,\n} from \"@cerios/openapi-core\";\nimport { type InternalTypeScriptGeneratorOptions, TypeScriptGenerator } from \"@cerios/openapi-to-typescript\";\nimport { minimatch } from \"minimatch\";\n\nimport { generateEnum } from \"./generators/enum-generator\";\nimport { generateJSDoc } from \"./generators/jsdoc-generator\";\nimport { PropertyGenerator } from \"./generators/property-generator\";\nimport type {\n\tInternalOpenApiGeneratorOptions,\n\tOpenAPISchema,\n\tOpenAPISpec,\n\tOpenApiGeneratorOptions,\n\tResolvedOptions,\n} from \"./types\";\nimport { buildDateTimeValidation } from \"./validators/string-validator\";\n\n/**\n * OpenAPI operation structure for path methods\n */\ninterface OpenAPIOperation {\n\toperationId?: string;\n\tparameters?: unknown[];\n\trequestBody?: {\n\t\tcontent?: Record<string, { schema?: unknown }>;\n\t};\n\tresponses?: Record<\n\t\tstring,\n\t\t{\n\t\t\tcontent?: Record<string, { schema?: unknown }>;\n\t\t}\n\t>;\n\t[key: string]: unknown;\n}\n\n/**\n * OpenAPI path item with HTTP method operations\n */\ninterface OpenAPIPathItem {\n\tparameters?: unknown[];\n\tget?: OpenAPIOperation;\n\tpost?: OpenAPIOperation;\n\tput?: OpenAPIOperation;\n\tpatch?: OpenAPIOperation;\n\tdelete?: OpenAPIOperation;\n\thead?: OpenAPIOperation;\n\toptions?: OpenAPIOperation;\n\t[key: string]: unknown;\n}\n\n/** HTTP methods that can have operations */\ntype HttpMethod = \"get\" | \"post\" | \"put\" | \"patch\" | \"delete\" | \"head\" | \"options\";\n\n/** Array of HTTP methods for iteration */\nconst HTTP_METHODS: HttpMethod[] = [\"get\", \"post\", \"put\", \"patch\", \"delete\", \"head\", \"options\"];\n\n/**\n * Resolved parameter after $ref resolution - matches OpenAPIParameter structure\n */\ninterface ResolvedParameter {\n\tname: string;\n\tin: \"query\" | \"header\" | \"path\" | \"cookie\";\n\tdescription?: string;\n\trequired?: boolean;\n\tschema?: OpenAPISchema & { $ref?: string };\n\tdeprecated?: boolean;\n\tstyle?: string;\n\texplode?: boolean;\n}\n\n/**\n * Type guard to check if a value is a valid resolved parameter\n */\nfunction isResolvedParameter(param: unknown): param is ResolvedParameter {\n\treturn (\n\t\ttypeof param === \"object\" &&\n\t\tparam !== null &&\n\t\t\"name\" in param &&\n\t\ttypeof (param as Record<string, unknown>).name === \"string\" &&\n\t\t\"in\" in param\n\t);\n}\n\n/**\n * Type guard to check if a value is a valid OpenAPIPathItem\n */\nfunction isOpenAPIPathItem(value: unknown): value is OpenAPIPathItem {\n\treturn typeof value === \"object\" && value !== null;\n}\n\nexport class OpenApiGenerator {\n\tprivate schemas: Map<string, string> = new Map();\n\tprivate types: Map<string, string> = new Map();\n\tprivate schemaDependencies: Map<string, Set<string>> = new Map();\n\tprivate options: InternalOpenApiGeneratorOptions;\n\tprivate spec: OpenAPISpec;\n\tprivate propertyGenerator: PropertyGenerator;\n\tprivate schemaUsageMap: Map<string, SchemaContext> = new Map();\n\tprivate requestOptions: ResolvedOptions;\n\tprivate responseOptions: ResolvedOptions;\n\tprivate needsZodImport = true;\n\tprivate filterStats: FilterStatistics = createFilterStatistics();\n\t/** Instance-level pattern cache for parallel-safe execution */\n\tprivate patternCache: LRUCache<string, string>;\n\t/** Instance-level date-time validation string for parallel-safe execution */\n\tprivate dateTimeValidation: string;\n\t/** Track schemas involved in circular dependency chains */\n\tprivate circularDependencies: Set<string> = new Set();\n\t/** Separate schemas mode - when outputZodSchemas is specified */\n\tprivate separateSchemasMode: boolean;\n\t/** Warning collector for deferred output */\n\tprivate readonly warningCollector: WarningCollector;\n\n\tconstructor(options: OpenApiGeneratorOptions | InternalOpenApiGeneratorOptions) {\n\t\t// Validate input path early\n\t\tif (!options.input) {\n\t\t\tthrow new ConfigurationError(\"Input path is required\", { providedOptions: options });\n\t\t}\n\n\t\t// Determine if we're in separate schemas mode\n\t\tthis.separateSchemasMode = Boolean(options.outputZodSchemas);\n\n\t\tconst showWarnings = options.showWarnings !== false;\n\t\tthis.warningCollector = new WarningCollector({\n\t\t\tpackageName: \"@cerios/openapi-to-zod\",\n\t\t\tenabled: showWarnings,\n\t\t});\n\n\t\tthis.options = {\n\t\t\tmode: options.mode || \"normal\",\n\t\t\tinput: options.input,\n\t\t\toutputTypes: options.outputTypes,\n\t\t\toutputZodSchemas: options.outputZodSchemas,\n\t\t\tenumFormat: options.enumFormat,\n\t\t\ttypeAssertionThreshold: options.typeAssertionThreshold ?? 0,\n\t\t\tincludeDescriptions: options.includeDescriptions ?? true,\n\t\t\tuseDescribe: options.useDescribe ?? false,\n\t\t\tdefaultNullable: options.defaultNullable ?? false,\n\t\t\temptyObjectBehavior: options.emptyObjectBehavior ?? \"loose\",\n\t\t\tschemaType: options.schemaType || \"all\",\n\t\t\tprefix: options.prefix,\n\t\t\tsuffix: options.suffix,\n\t\t\tstripSchemaPrefix: options.stripSchemaPrefix,\n\t\t\tstripPathPrefix: options.stripPathPrefix,\n\t\t\tuseOperationId: options.useOperationId ?? true,\n\t\t\tshowStats: options.showStats ?? true,\n\t\t\tshowWarnings,\n\t\t\trequest: options.request,\n\t\t\tresponse: options.response,\n\t\t\toperationFilters: options.operationFilters,\n\t\t\tignoreHeaders: options.ignoreHeaders,\n\t\t\tcacheSize: options.cacheSize ?? 1000,\n\t\t\tbatchSize: options.batchSize ?? 10,\n\t\t\tcustomDateTimeFormatRegex: options.customDateTimeFormatRegex,\n\t\t\tincludeHeader: (options as InternalOpenApiGeneratorOptions).includeHeader,\n\t\t\tfileHeader: options.fileHeader,\n\t\t};\n\n\t\t// Create instance-level pattern cache (parallel-safe)\n\t\tthis.patternCache = new LRUCache<string, string>(this.options.cacheSize ?? 1000);\n\n\t\t// Build date-time validation string (parallel-safe, no global state)\n\t\tthis.dateTimeValidation = buildDateTimeValidation(this.options.customDateTimeFormatRegex);\n\n\t\t// Load and parse the OpenAPI specification using core utility\n\t\tthis.spec = loadOpenAPISpec(this.options.input);\n\n\t\tthis.validateSpec();\n\n\t\t// Resolve options for request and response contexts\n\t\tthis.requestOptions = this.resolveOptionsForContext(\"request\");\n\t\tthis.responseOptions = this.resolveOptionsForContext(\"response\");\n\n\t\t// Analyze schema usage to determine context (request/response/both)\n\t\tthis.initializeSchemaUsage();\n\n\t\t// Initialize property generator with context\n\t\t// We'll update this dynamically based on schema context during generation\n\t\tthis.propertyGenerator = new PropertyGenerator({\n\t\t\tspec: this.spec,\n\t\t\tschemaDependencies: this.schemaDependencies,\n\t\t\tschemaType: this.options.schemaType || \"all\",\n\t\t\tmode: this.requestOptions.mode,\n\t\t\tincludeDescriptions: this.requestOptions.includeDescriptions,\n\t\t\tuseDescribe: this.requestOptions.useDescribe,\n\t\t\tdefaultNullable: this.options.defaultNullable ?? false,\n\t\t\temptyObjectBehavior: this.options.emptyObjectBehavior ?? \"loose\",\n\t\t\tnamingOptions: {\n\t\t\t\tprefix: this.options.prefix,\n\t\t\t\tsuffix: this.options.suffix,\n\t\t\t},\n\t\t\tstripSchemaPrefix: this.options.stripSchemaPrefix,\n\t\t\tdateTimeValidation: this.dateTimeValidation,\n\t\t\tpatternCache: this.patternCache,\n\t\t\tseparateTypesFile: this.separateSchemasMode,\n\t\t\twarn: msg => {\n\t\t\t\tthis.warningCollector.add(msg);\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Generate schemas as a string (without writing to file)\n\t * When separateSchemasMode is active, generates Zod schemas with explicit type annotations\n\t * @returns The generated TypeScript code as a string\n\t */\n\tgenerateString(): string {\n\t\tif (!this.spec.components?.schemas) {\n\t\t\tthrow new SpecValidationError(\"No schemas found in OpenAPI spec\", { filePath: this.options.input });\n\t\t}\n\n\t\t// When outputZodSchemas is specified, generate Zod schemas with explicit type annotations\n\t\tif (this.separateSchemasMode) {\n\t\t\treturn this.generateSeparateSchemasString();\n\t\t}\n\n\t\t// Pre-analyze schemas to detect circular dependencies BEFORE generation\n\t\t// This allows us to use z.lazy() for references to circular deps\n\t\tthis.analyzeCircularDependencies();\n\n\t\t// Update property generator context with circular dependencies\n\t\tthis.propertyGenerator.setCircularDependencies(this.circularDependencies);\n\n\t\t// Generate schemas and track dependencies\n\t\tfor (const [name, schema] of Object.entries(this.spec.components.schemas)) {\n\t\t\t// Skip schemas not referenced by filtered operations when operation filters are active\n\t\t\tif (this.options.operationFilters && this.schemaUsageMap.size > 0 && !this.schemaUsageMap.has(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.generateComponentSchema(name, schema);\n\t\t}\n\n\t\t// Generate query parameter schemas from path operations\n\t\tthis.generateQueryParameterSchemas();\n\n\t\t// Generate header parameter schemas from path operations\n\t\tthis.generateHeaderParameterSchemas();\n\n\t\t// Validate filters and emit warnings if needed\n\t\tvalidateFilters(this.filterStats, this.options.operationFilters, msg => {\n\t\t\tthis.warningCollector.add(msg);\n\t\t});\n\n\t\t// Sort schemas by dependencies\n\t\tconst orderedSchemaNames = this.topologicalSort();\n\n\t\t// Build output\n\t\tconst output: string[] = [];\n\n\t\t// Add custom file header comments first (at very top)\n\t\tconst customHeader = generateCustomFileHeader(this.options.fileHeader);\n\t\tif (customHeader) {\n\t\t\toutput.push(customHeader.trimEnd());\n\t\t\toutput.push(\"\");\n\t\t}\n\n\t\t// Add header comment if enabled (default: true)\n\t\tif (this.options.includeHeader !== false) {\n\t\t\toutput.push(\n\t\t\t\tgenerateFileHeader({\n\t\t\t\t\tpackageName: \"@cerios/openapi-to-zod\",\n\t\t\t\t\tapiTitle: this.spec.info?.title,\n\t\t\t\t\tapiVersion: this.spec.info?.version,\n\t\t\t\t}).trimEnd()\n\t\t\t);\n\t\t\toutput.push(\"\");\n\t\t}\n\n\t\t// Add statistics if enabled (must be explicitly true)\n\t\tif (this.options.showStats === true) {\n\t\t\toutput.push(...this.generateStats());\n\t\t\toutput.push(\"\");\n\t\t}\n\n\t\t// Conditionally import Zod only if needed\n\t\tif (this.needsZodImport) {\n\t\t\toutput.push('import { z } from \"zod\";');\n\t\t\toutput.push(\"\");\n\t\t}\n\n\t\t// Add schemas and types in dependency order\n\t\toutput.push(\"// Schemas and Types\");\n\t\tfor (const name of orderedSchemaNames) {\n\t\t\tconst schemaCode = this.schemas.get(name);\n\t\t\tconst typeCode = this.types.get(name);\n\n\t\t\tif (schemaCode) {\n\t\t\t\t// Zod schema with inferred type\n\t\t\t\toutput.push(schemaCode);\n\n\t\t\t\t// Add type immediately after schema (if not already included)\n\t\t\t\t// Convert schema name to valid TypeScript type name (handles dotted names)\n\t\t\t\t// Apply stripSchemaPrefix before type name generation\n\t\t\t\tconst strippedName = stripPrefix(name, this.options.stripSchemaPrefix);\n\t\t\t\tconst typeName = toPascalCase(strippedName);\n\t\t\t\tif (!schemaCode.includes(`export type ${typeName}`)) {\n\t\t\t\t\tconst schemaName = `${toCamelCase(strippedName, { prefix: this.options.prefix, suffix: this.options.suffix })}Schema`;\n\t\t\t\t\toutput.push(`export type ${typeName} = z.infer<typeof ${schemaName}>;`);\n\t\t\t\t}\n\t\t\t\toutput.push(\"\");\n\t\t\t} else if (typeCode) {\n\t\t\t\t// Type only (shouldn't happen in Zod-only mode, but kept for safety)\n\t\t\t\toutput.push(typeCode);\n\t\t\t\toutput.push(\"\");\n\t\t\t}\n\t\t}\n\n\t\t// Flush warnings when generating standalone string\n\t\tthis.warningCollector.flush();\n\n\t\treturn output.join(\"\\n\");\n\t}\n\n\t/**\n\t * Ensure directory exists for a file path\n\t */\n\tprivate ensureDirectoryExists(filePath: string): void {\n\t\tconst normalizedPath = normalize(filePath);\n\t\tconst dir = dirname(normalizedPath);\n\t\tif (!existsSync(dir)) {\n\t\t\tmkdirSync(dir, { recursive: true });\n\t\t}\n\t}\n\n\t/**\n\t * Generate the complete output file(s)\n\t * When separateSchemasMode is active, generates both types and schemas files\n\t */\n\tgenerate(): void {\n\t\tif (this.separateSchemasMode) {\n\t\t\t// Generate both types and schemas files\n\t\t\tconst typesContent = this.generateTypesString();\n\t\t\tconst schemasContent = this.generateString();\n\n\t\t\t// Write types file\n\t\t\tconst normalizedTypes = normalize(this.options.outputTypes);\n\t\t\tthis.ensureDirectoryExists(normalizedTypes);\n\t\t\twriteFileSync(normalizedTypes, typesContent, \"utf-8\");\n\t\t\tconsole.log(` ✓ Generated ${normalizedTypes}`);\n\n\t\t\t// Write schemas file (outputZodSchemas is guaranteed by separateSchemasMode check)\n\t\t\tif (!this.options.outputZodSchemas) {\n\t\t\t\tthrow new Error(\"Internal error: outputZodSchemas should be defined in separateSchemasMode\");\n\t\t\t}\n\t\t\tconst outputZodSchemas = this.options.outputZodSchemas;\n\t\t\tconst normalizedSchemas = normalize(outputZodSchemas);\n\t\t\tthis.ensureDirectoryExists(normalizedSchemas);\n\t\t\twriteFileSync(normalizedSchemas, schemasContent, \"utf-8\");\n\t\t\tconsole.log(` ✓ Generated ${normalizedSchemas}`);\n\t\t} else {\n\t\t\t// Original behavior - single file with z.infer\n\t\t\tconst output = this.generateString();\n\t\t\tconst normalizedOutput = normalize(this.options.outputTypes);\n\t\t\tthis.ensureDirectoryExists(normalizedOutput);\n\t\t\twriteFileSync(normalizedOutput, output);\n\t\t\tconsole.log(` ✓ Generated ${normalizedOutput}`);\n\t\t}\n\n\t\t// Flush all collected warnings at the end\n\t\tthis.warningCollector.flush();\n\t}\n\n\t/**\n\t * Generate Zod schemas with explicit type annotations (for outputZodSchemas mode)\n\t * Generates schemas like: `export const userSchema: z.ZodType<User> = z.object({...})`\n\t * @returns The generated Zod schemas TypeScript code\n\t */\n\tprivate generateSeparateSchemasString(): string {\n\t\t// Guard: schemas must exist (checked in generateString before calling this)\n\t\tconst schemas = this.spec.components?.schemas;\n\t\tif (!schemas) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\t// Guard: outputZodSchemas must exist (we're in separateSchemasMode)\n\t\tif (!this.options.outputZodSchemas) {\n\t\t\tthrow new Error(\"Internal error: outputZodSchemas should be defined in separateSchemasMode\");\n\t\t}\n\t\tconst outputZodSchemas = this.options.outputZodSchemas;\n\n\t\t// Pre-analyze schemas to detect circular dependencies\n\t\tthis.analyzeCircularDependencies();\n\t\tthis.propertyGenerator.setCircularDependencies(this.circularDependencies);\n\n\t\t// Generate schemas and track dependencies\n\t\tfor (const [name, schema] of Object.entries(schemas)) {\n\t\t\tif (this.options.operationFilters && this.schemaUsageMap.size > 0 && !this.schemaUsageMap.has(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.generateComponentSchema(name, schema);\n\t\t}\n\n\t\t// Generate query and header parameter schemas\n\t\tthis.generateQueryParameterSchemas();\n\t\tthis.generateHeaderParameterSchemas();\n\n\t\t// Validate filters\n\t\tvalidateFilters(this.filterStats, this.options.operationFilters, msg => {\n\t\t\tthis.warningCollector.add(msg);\n\t\t});\n\n\t\t// Sort schemas\n\t\tconst orderedSchemaNames = this.topologicalSort();\n\n\t\t// Build output\n\t\tconst output: string[] = [];\n\n\t\t// Add custom file header comments first (at very top)\n\t\tconst customHeader = generateCustomFileHeader(this.options.fileHeader);\n\t\tif (customHeader) {\n\t\t\toutput.push(customHeader.trimEnd());\n\t\t\toutput.push(\"\");\n\t\t}\n\n\t\toutput.push(\n\t\t\tgenerateFileHeader({\n\t\t\t\tpackageName: \"@cerios/openapi-to-zod\",\n\t\t\t\tapiTitle: this.spec.info?.title,\n\t\t\t\tapiVersion: this.spec.info?.version,\n\t\t\t}).trimEnd()\n\t\t);\n\t\toutput.push(\"\");\n\n\t\t// Add statistics\n\t\tif (this.options.showStats === true) {\n\t\t\toutput.push(...this.generateStats());\n\t\t\toutput.push(\"\");\n\t\t}\n\n\t\t// Add Zod import\n\t\toutput.push('import { z } from \"zod\";');\n\n\t\t// Calculate relative import path for types\n\t\tconst typesImportPath = this.calculateRelativeImportPath(outputZodSchemas, this.options.outputTypes);\n\n\t\t// Collect all type names that need to be imported\n\t\tconst typeNames: string[] = [];\n\t\tfor (const name of orderedSchemaNames) {\n\t\t\tconst strippedName = stripPrefix(name, this.options.stripSchemaPrefix);\n\t\t\tconst typeName = toPascalCase(strippedName);\n\t\t\ttypeNames.push(typeName);\n\t\t}\n\n\t\t// Add type imports\n\t\tif (typeNames.length > 0) {\n\t\t\toutput.push(`import type { ${typeNames.join(\", \")} } from \"${typesImportPath}\";`);\n\t\t}\n\t\toutput.push(\"\");\n\n\t\t// Add schemas with explicit type annotations\n\t\toutput.push(\"// Schemas\");\n\t\tfor (const name of orderedSchemaNames) {\n\t\t\tconst schemaCode = this.schemas.get(name);\n\t\t\tif (schemaCode) {\n\t\t\t\tconst strippedName = stripPrefix(name, this.options.stripSchemaPrefix);\n\t\t\t\tconst typeName = toPascalCase(strippedName);\n\t\t\t\tconst schemaName = `${toCamelCase(strippedName, { prefix: this.options.prefix, suffix: this.options.suffix })}Schema`;\n\n\t\t\t\t// Pass schema definition for complexity calculation (may be undefined for query/header schemas)\n\t\t\t\tconst schemaDefinition = this.isRecordObject(schemas[name]) ? schemas[name] : undefined;\n\t\t\t\tconst transformedCode = this.addExplicitTypeAnnotation(schemaCode, schemaName, typeName, schemaDefinition);\n\t\t\t\toutput.push(transformedCode);\n\t\t\t\toutput.push(\"\");\n\t\t\t}\n\t\t}\n\n\t\treturn output.join(\"\\n\");\n\t}\n\n\t/**\n\t * Generate TypeScript types as a string (for outputZodSchemas mode)\n\t * Uses @cerios/openapi-to-typescript internally\n\t * @returns The generated TypeScript types code\n\t */\n\tgenerateTypesString(): string {\n\t\tconst internalOptions: InternalTypeScriptGeneratorOptions = {\n\t\t\tinput: this.options.input,\n\t\t\toutputTypes: this.options.outputTypes,\n\t\t\tincludeDescriptions: this.options.includeDescriptions,\n\t\t\tdefaultNullable: this.options.defaultNullable,\n\t\t\tprefix: this.options.prefix,\n\t\t\tsuffix: this.options.suffix,\n\t\t\tstripSchemaPrefix: this.options.stripSchemaPrefix,\n\t\t\tstripPathPrefix: this.options.stripPathPrefix,\n\t\t\toperationFilters: this.options.operationFilters,\n\t\t\tshowStats: this.options.showStats,\n\t\t\tenumFormat: this.options.enumFormat ?? \"const-object\",\n\t\t\tincludeHeader: false, // We add our own header for consistent branding\n\t\t\tshowWarnings: false, // We handle warnings ourselves\n\t\t};\n\t\tconst tsGenerator = new TypeScriptGenerator(internalOptions);\n\n\t\t// Add custom file header comments first (at very top)\n\t\tconst customHeader = generateCustomFileHeader(this.options.fileHeader);\n\n\t\tconst header = generateFileHeader({\n\t\t\tpackageName: \"@cerios/openapi-to-zod\",\n\t\t\tapiTitle: this.spec.info?.title,\n\t\t\tapiVersion: this.spec.info?.version,\n\t\t});\n\t\treturn customHeader + header + tsGenerator.generateString();\n\t}\n\n\t/**\n\t * Add explicit type annotation to a schema declaration\n\t * Transforms: `export const userSchema = z.object({...})`\n\t * To: `export const userSchema: z.ZodType<User> = z.object({...})` (annotation)\n\t * Or: `export const userSchema = z.object({...}) as unknown as z.ZodType<User>` (double assertion)\n\t *\n\t * Uses double assertion via `unknown` when typeAssertionThreshold is set and schema complexity\n\t * meets or exceeds the threshold. This completely bypasses TypeScript's structural checking\n\t * to avoid \"Type instantiation is excessively deep\" errors on very large schemas.\n\t *\n\t * Also removes any `export type X = z.infer<...>` lines since types\n\t * are imported from the separate types file.\n\t */\n\tprivate addExplicitTypeAnnotation(\n\t\tschemaCode: string,\n\t\tschemaName: string,\n\t\ttypeName: string,\n\t\tschemaDefinition?: Record<string, unknown>\n\t): string {\n\t\t// Remove any z.infer type exports since types come from the types file\n\t\tconst code = schemaCode.replace(/\\nexport type \\w+ = z\\.infer<typeof \\w+>;/g, \"\");\n\n\t\t// Handle JSDoc comments - they should come before the export\n\t\tconst jsdocMatch = code.match(/^(\\/\\*\\*[\\s\\S]*?\\*\\/\\n)?/);\n\t\tconst jsdoc = jsdocMatch?.[1] || \"\";\n\t\tconst codeWithoutJsdoc = code.slice(jsdoc.length);\n\n\t\t// Determine if we should use assertion syntax based on complexity threshold\n\t\tconst threshold = this.options.typeAssertionThreshold ?? 0;\n\t\tconst useAssertion =\n\t\t\tthreshold > 0 && schemaDefinition && this.calculateSchemaComplexity(schemaDefinition) >= threshold;\n\n\t\t// Standard pattern - replace export with typed version\n\t\t// This works for both regular schemas and enum schemas\n\t\tconst pattern = new RegExp(`export const ${schemaName} = `);\n\t\tif (pattern.test(codeWithoutJsdoc)) {\n\t\t\tlet schemaBody = codeWithoutJsdoc.replace(pattern, \"\");\n\t\t\tif (useAssertion) {\n\t\t\t\t// Remove trailing semicolon for assertion syntax\n\t\t\t\tschemaBody = schemaBody.replace(/;$/, \"\");\n\t\t\t\t// Double assertion via unknown: completely bypasses TypeScript's structural checking\n\t\t\t\t// This avoids \"Type instantiation is excessively deep\" even for very large schemas\n\t\t\t\treturn `${jsdoc}export const ${schemaName} = ${schemaBody} as unknown as z.ZodType<${typeName}>;`;\n\t\t\t}\n\t\t\t// Annotation syntax: export const xSchema: z.ZodType<X> = z.object({...})\n\t\t\treturn `${jsdoc}export const ${schemaName}: z.ZodType<${typeName}> = ${schemaBody}`;\n\t\t}\n\n\t\treturn code;\n\t}\n\n\t/**\n\t * Type guard to check if a value is a Record<string, unknown>\n\t */\n\tprivate isRecordObject(value: unknown): value is Record<string, unknown> {\n\t\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n\t}\n\n\t/**\n\t * Calculate the complexity of a schema for threshold comparison\n\t * Complexity formula: properties + (nested levels * 10) + (array/union members * 2)\n\t */\n\tprivate calculateSchemaComplexity(schema: Record<string, unknown>, depth = 0): number {\n\t\tif (!schema || typeof schema !== \"object\") {\n\t\t\treturn 0;\n\t\t}\n\n\t\tlet complexity = depth * 10; // Base cost for nesting\n\n\t\t// Handle $ref\n\t\tif (schema.$ref) {\n\t\t\t// Referenced schemas contribute fixed complexity (avoid infinite recursion)\n\t\t\treturn complexity + 5;\n\t\t}\n\n\t\t// Count properties\n\t\tconst properties = schema.properties;\n\t\tif (this.isRecordObject(properties)) {\n\t\t\tconst propCount = Object.keys(properties).length;\n\t\t\tcomplexity += propCount;\n\n\t\t\t// Recursively calculate nested property complexity\n\t\t\tfor (const prop of Object.values(properties)) {\n\t\t\t\tif (this.isRecordObject(prop)) {\n\t\t\t\t\tcomplexity += this.calculateSchemaComplexity(prop, depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Handle allOf\n\t\tconst allOf = schema.allOf;\n\t\tif (Array.isArray(allOf)) {\n\t\t\tcomplexity += allOf.length * 2;\n\t\t\tfor (const subSchema of allOf) {\n\t\t\t\tif (this.isRecordObject(subSchema)) {\n\t\t\t\t\tcomplexity += this.calculateSchemaComplexity(subSchema, depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Handle oneOf\n\t\tconst oneOf = schema.oneOf;\n\t\tif (Array.isArray(oneOf)) {\n\t\t\tcomplexity += oneOf.length * 2;\n\t\t\tfor (const subSchema of oneOf) {\n\t\t\t\tif (this.isRecordObject(subSchema)) {\n\t\t\t\t\tcomplexity += this.calculateSchemaComplexity(subSchema, depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Handle anyOf\n\t\tconst anyOf = schema.anyOf;\n\t\tif (Array.isArray(anyOf)) {\n\t\t\tcomplexity += anyOf.length * 2;\n\t\t\tfor (const subSchema of anyOf) {\n\t\t\t\tif (this.isRecordObject(subSchema)) {\n\t\t\t\t\tcomplexity += this.calculateSchemaComplexity(subSchema, depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Handle array items\n\t\tconst items = schema.items;\n\t\tif (this.isRecordObject(items)) {\n\t\t\tcomplexity += 2; // Array cost\n\t\t\tcomplexity += this.calculateSchemaComplexity(items, depth + 1);\n\t\t}\n\n\t\t// Handle additionalProperties\n\t\tconst additionalProps = schema.additionalProperties;\n\t\tif (this.isRecordObject(additionalProps)) {\n\t\t\tcomplexity += 2; // Record cost\n\t\t\tcomplexity += this.calculateSchemaComplexity(additionalProps, depth + 1);\n\t\t}\n\n\t\treturn complexity;\n\t}\n\n\t/**\n\t * Calculate relative import path from schema file to types file\n\t */\n\tprivate calculateRelativeImportPath(fromPath: string, toPath: string): string {\n\t\tconst fromDir = dirname(normalize(fromPath));\n\t\tconst toFile = normalize(toPath).replace(/\\.[tj]s$/, \"\"); // Remove extension\n\n\t\tlet relativePath = relative(fromDir, toFile);\n\n\t\t// Ensure path starts with ./ or ../\n\t\tif (!relativePath.startsWith(\".\") && !relativePath.startsWith(\"..\")) {\n\t\t\trelativePath = `./${relativePath}`;\n\t\t}\n\n\t\t// Normalize path separators for cross-platform compatibility\n\t\treturn relativePath.replace(/\\\\/g, \"/\");\n\t}\n\n\t/**\n\t * Resolve options for a specific context (request or response)\n\t * Nested options silently override root-level options\n\t */\n\tprivate resolveOptionsForContext(context: \"request\" | \"response\"): ResolvedOptions {\n\t\tconst contextOptions = context === \"request\" ? this.options.request : this.options.response;\n\n\t\treturn {\n\t\t\tmode: contextOptions?.mode ?? this.options.mode ?? \"normal\",\n\t\t\tuseDescribe: contextOptions?.useDescribe ?? this.options.useDescribe ?? false,\n\t\t\tincludeDescriptions: contextOptions?.includeDescriptions ?? this.options.includeDescriptions ?? true,\n\t\t};\n\t}\n\n\t/**\n\t * Initialize schema usage map using core utilities with operation filtering\n\t * This is a wrapper around core's analyzeSchemaUsage that adds operation filtering\n\t */\n\tprivate initializeSchemaUsage(): void {\n\t\t// If we have operation filters, we need to track stats and filter manually\n\t\tif (this.options.operationFilters && this.spec.paths) {\n\t\t\tconst requestSchemas = new Set<string>();\n\t\t\tconst responseSchemas = new Set<string>();\n\n\t\t\tfor (const [path, pathItem] of Object.entries(this.spec.paths)) {\n\t\t\t\tif (!isOpenAPIPathItem(pathItem)) continue;\n\t\t\t\tfor (const method of HTTP_METHODS) {\n\t\t\t\t\tconst operation = pathItem[method];\n\t\t\t\t\tif (!operation) continue;\n\n\t\t\t\t\t// Track total operations\n\t\t\t\t\tthis.filterStats.totalOperations++;\n\n\t\t\t\t\t// Apply operation filters\n\t\t\t\t\tif (!shouldIncludeOperation(operation, path, method, this.options.operationFilters, this.filterStats)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Count included operation\n\t\t\t\t\tthis.filterStats.includedOperations++;\n\n\t\t\t\t\t// Check request bodies\n\t\t\t\t\tif (operation.requestBody && typeof operation.requestBody === \"object\") {\n\t\t\t\t\t\tconst reqBody = operation.requestBody;\n\t\t\t\t\t\tif (reqBody.content && typeof reqBody.content === \"object\") {\n\t\t\t\t\t\t\tfor (const mediaType of Object.values(reqBody.content)) {\n\t\t\t\t\t\t\t\tif (mediaType && typeof mediaType === \"object\" && \"schema\" in mediaType && mediaType.schema) {\n\t\t\t\t\t\t\t\t\textractSchemaRefs(mediaType.schema as OpenAPISchema, requestSchemas);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check responses\n\t\t\t\t\tif (operation.responses && typeof operation.responses === \"object\") {\n\t\t\t\t\t\tfor (const response of Object.values(operation.responses)) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tresponse &&\n\t\t\t\t\t\t\t\ttypeof response === \"object\" &&\n\t\t\t\t\t\t\t\t\"content\" in response &&\n\t\t\t\t\t\t\t\tresponse.content &&\n\t\t\t\t\t\t\t\ttypeof response.content === \"object\"\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tfor (const mediaType of Object.values(response.content)) {\n\t\t\t\t\t\t\t\t\tif (mediaType && typeof mediaType === \"object\" && \"schema\" in mediaType && mediaType.schema) {\n\t\t\t\t\t\t\t\t\t\textractSchemaRefs(mediaType.schema as OpenAPISchema, responseSchemas);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check parameters\n\t\t\t\t\tif (operation.parameters && Array.isArray(operation.parameters)) {\n\t\t\t\t\t\tfor (const param of operation.parameters) {\n\t\t\t\t\t\t\tif (isResolvedParameter(param) && param.schema) {\n\t\t\t\t\t\t\t\textractSchemaRefs(param.schema as OpenAPISchema, requestSchemas);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Expand transitive references to include all indirectly referenced schemas\n\t\t\texpandTransitiveReferences(requestSchemas, this.spec);\n\t\t\texpandTransitiveReferences(responseSchemas, this.spec);\n\n\t\t\t// Build usage map from filtered operations\n\t\t\tfor (const [name] of Object.entries(this.spec.components?.schemas || {})) {\n\t\t\t\tif (requestSchemas.has(name) && responseSchemas.has(name)) {\n\t\t\t\t\tthis.schemaUsageMap.set(name, \"both\");\n\t\t\t\t} else if (requestSchemas.has(name)) {\n\t\t\t\t\tthis.schemaUsageMap.set(name, \"request\");\n\t\t\t\t} else if (responseSchemas.has(name)) {\n\t\t\t\t\tthis.schemaUsageMap.set(name, \"response\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Detect circular references and mark as \"both\"\n\t\t\tconst circularSchemas = detectCircularReferences(this.spec);\n\t\t\tfor (const name of circularSchemas) {\n\t\t\t\tthis.schemaUsageMap.set(name, \"both\");\n\t\t\t}\n\t\t} else {\n\t\t\t// Use core's analyzeSchemaUsage when no operation filters\n\t\t\tconst analysis = analyzeSchemaUsage(this.spec);\n\t\t\tthis.schemaUsageMap = analysis.usageMap;\n\n\t\t\t// Track operation stats when no filters\n\t\t\tif (this.spec.paths) {\n\t\t\t\tfor (const pathItem of Object.values(this.spec.paths)) {\n\t\t\t\t\tif (!isOpenAPIPathItem(pathItem)) continue;\n\t\t\t\t\tfor (const method of HTTP_METHODS) {\n\t\t\t\t\t\tconst operation = pathItem[method];\n\t\t\t\t\t\tif (typeof operation === \"object\" && operation) {\n\t\t\t\t\t\t\tthis.filterStats.totalOperations++;\n\t\t\t\t\t\t\tthis.filterStats.includedOperations++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Validate the OpenAPI specification\n\t */\n\tprivate validateSpec(): void {\n\t\tif (!this.spec.components?.schemas) {\n\t\t\tthrow new SpecValidationError(\n\t\t\t\t`No schemas found in OpenAPI spec at ${this.options.input}. Expected to find schemas at components.schemas`,\n\t\t\t\t{ filePath: this.options.input }\n\t\t\t);\n\t\t}\n\n\t\t// Validate all $refs can be resolved\n\t\tconst allSchemas = Object.keys(this.spec.components.schemas);\n\t\tfor (const [name, schema] of Object.entries(this.spec.components.schemas)) {\n\t\t\ttry {\n\t\t\t\tthis.validateSchemaRefs(name, schema, allSchemas);\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof Error) {\n\t\t\t\t\tthrow new SchemaGenerationError(`Invalid schema '${name}': ${error.message}`, name, {\n\t\t\t\t\t\toriginalError: error.message,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Validate all $ref references in a schema\n\t */\n\tprivate validateSchemaRefs(schemaName: string, schema: OpenAPISchema, allSchemas: string[], path = \"\"): void {\n\t\tif (schema.$ref) {\n\t\t\tconst refName = resolveRefName(schema.$ref);\n\t\t\tif (!allSchemas.includes(refName)) {\n\t\t\t\tthrow new SpecValidationError(\n\t\t\t\t\t`Invalid reference${path ? ` at '${path}'` : \"\"}: ` +\n\t\t\t\t\t\t`'${schema.$ref}' points to non-existent schema '${refName}'`,\n\t\t\t\t\t{ schemaName, path, ref: schema.$ref, refName }\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Recursively validate nested schemas\n\t\tif (schema.properties) {\n\t\t\tfor (const [propName, propSchema] of Object.entries(schema.properties)) {\n\t\t\t\tthis.validateSchemaRefs(schemaName, propSchema, allSchemas, path ? `${path}.${propName}` : propName);\n\t\t\t}\n\t\t}\n\n\t\tif (schema.items) {\n\t\t\tthis.validateSchemaRefs(schemaName, schema.items, allSchemas, `${path}[]`);\n\t\t}\n\n\t\tif (schema.prefixItems) {\n\t\t\tschema.prefixItems.forEach((s, i) => {\n\t\t\t\tthis.validateSchemaRefs(schemaName, s, allSchemas, `${path}.prefixItems[${i}]`);\n\t\t\t});\n\t\t}\n\n\t\tif (schema.allOf) {\n\t\t\tschema.allOf.forEach((s, i) => {\n\t\t\t\tthis.validateSchemaRefs(schemaName, s, allSchemas, `${path}.allOf[${i}]`);\n\t\t\t});\n\t\t}\n\n\t\tif (schema.oneOf) {\n\t\t\tschema.oneOf.forEach((s, i) => {\n\t\t\t\tthis.validateSchemaRefs(schemaName, s, allSchemas, `${path}.oneOf[${i}]`);\n\t\t\t});\n\t\t}\n\n\t\tif (schema.anyOf) {\n\t\t\tschema.anyOf.forEach((s, i) => {\n\t\t\t\tthis.validateSchemaRefs(schemaName, s, allSchemas, `${path}.anyOf[${i}]`);\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Generate schema for a component\n\t */\n\tprivate generateComponentSchema(name: string, schema: OpenAPISchema): void {\n\t\t// Initialize dependencies for this schema\n\t\tif (!this.schemaDependencies.has(name)) {\n\t\t\tthis.schemaDependencies.set(name, new Set());\n\t\t}\n\n\t\tconst context = this.schemaUsageMap.get(name);\n\t\tconst resolvedOptions = context === \"response\" ? this.responseOptions : this.requestOptions;\n\n\t\t// Handle enums at the top level\n\t\tif (schema.enum) {\n\t\t\tconst jsdoc = generateJSDoc(schema, name, { includeDescriptions: resolvedOptions.includeDescriptions });\n\n\t\t\t// Apply stripSchemaPrefix before generating enum\n\t\t\tconst strippedName = stripPrefix(name, this.options.stripSchemaPrefix);\n\n\t\t\t// Generate Zod enum\n\t\t\tconst { schemaCode, typeCode } = generateEnum(strippedName, schema.enum, {\n\t\t\t\tprefix: this.options.prefix,\n\t\t\t\tsuffix: this.options.suffix,\n\t\t\t});\n\n\t\t\tconst enumSchemaCode = `${jsdoc}${schemaCode}\\n${typeCode}`;\n\t\t\tthis.schemas.set(name, enumSchemaCode);\n\t\t\treturn;\n\t\t}\n\n\t\t// Generate Zod schema\n\t\t// Apply stripSchemaPrefix to get cleaner schema names\n\t\tconst strippedName = stripPrefix(name, this.options.stripSchemaPrefix);\n\t\tconst schemaName = `${toCamelCase(strippedName, { prefix: this.options.prefix, suffix: this.options.suffix })}Schema`;\n\t\tlet jsdoc = generateJSDoc(schema, name, { includeDescriptions: resolvedOptions.includeDescriptions });\n\n\t\t// For allOf with single $ref, track dependency manually since we simplify it\n\t\tif (schema.allOf && schema.allOf.length === 1 && schema.allOf[0].$ref) {\n\t\t\tconst refName = resolveRefName(schema.allOf[0].$ref);\n\t\t\tthis.schemaDependencies.get(name)?.add(refName);\n\t\t}\n\n\t\t// Update property generator context for this schema\n\t\tthis.propertyGenerator = new PropertyGenerator({\n\t\t\tspec: this.spec,\n\t\t\tschemaDependencies: this.schemaDependencies,\n\t\t\tschemaType: this.options.schemaType || \"all\",\n\t\t\tmode: resolvedOptions.mode,\n\t\t\tincludeDescriptions: resolvedOptions.includeDescriptions,\n\t\t\tuseDescribe: resolvedOptions.useDescribe,\n\t\t\tdefaultNullable: this.options.defaultNullable ?? false,\n\t\t\temptyObjectBehavior: this.options.emptyObjectBehavior ?? \"loose\",\n\t\t\tnamingOptions: {\n\t\t\t\tprefix: this.options.prefix,\n\t\t\t\tsuffix: this.options.suffix,\n\t\t\t},\n\t\t\tstripSchemaPrefix: this.options.stripSchemaPrefix,\n\t\t\tdateTimeValidation: this.dateTimeValidation,\n\t\t\tpatternCache: this.patternCache,\n\t\t\tseparateTypesFile: this.separateSchemasMode,\n\t\t\twarn: msg => {\n\t\t\t\tthis.warningCollector.add(msg);\n\t\t\t},\n\t\t});\n\n\t\t// Set circular dependencies for the new property generator instance\n\t\tthis.propertyGenerator.setCircularDependencies(this.circularDependencies);\n\n\t\t// Clear conflicts before generating to track per-schema conflicts\n\t\tthis.propertyGenerator.clearAllOfConflicts();\n\n\t\t// Check if this is just a simple $ref (alias)\n\t\t// Pass isTopLevel=true for top-level schema generation to prevent defaultNullable from applying\n\t\tconst zodSchema = this.propertyGenerator.generatePropertySchema(schema, name, true);\n\n\t\t// Check for allOf conflicts and add JSDoc warning if any\n\t\tconst allOfConflicts = this.propertyGenerator.getAllOfConflicts();\n\t\tif (allOfConflicts.length > 0) {\n\t\t\t// Add warning JSDoc for conflicts\n\t\t\tconst conflictWarning = this.generateConflictJSDoc(allOfConflicts);\n\t\t\tif (jsdoc) {\n\t\t\t\t// Append to existing JSDoc - insert before closing */\n\t\t\t\tjsdoc = jsdoc.replace(/ \\*\\/\\n$/, `\\n${conflictWarning} */\\n`);\n\t\t\t} else {\n\t\t\t\t// Create new JSDoc block with just the warning\n\t\t\t\tjsdoc = `/**\\n${conflictWarning} */\\n`;\n\t\t\t}\n\t\t}\n\n\t\tconst zodSchemaCode = `${jsdoc}export const ${schemaName} = ${zodSchema};`;\n\n\t\t// Track dependencies from discriminated unions\n\t\t// Extract schema references like \"carSchema, truckSchema\" from discriminatedUnion calls\n\t\tif (zodSchema.includes(\"z.discriminatedUnion(\")) {\n\t\t\tconst match = zodSchema.match(/z\\.discriminatedUnion\\([^,]+,\\s*\\[([^\\]]+)\\]/);\n\t\t\tif (match) {\n\t\t\t\tconst refs = match[1].split(\",\").map(ref => ref.trim());\n\t\t\t\tfor (const ref of refs) {\n\t\t\t\t\t// Extract schema name from camelCase reference (e.g., \"carSchema\" -> \"Car\")\n\t\t\t\t\tconst depMatch = ref.match(/^([a-z][a-zA-Z0-9]*?)Schema$/);\n\t\t\t\t\tif (depMatch) {\n\t\t\t\t\t\t// Convert camelCase to PascalCase (carSchema -> Car)\n\t\t\t\t\t\tconst depName = depMatch[1].charAt(0).toUpperCase() + depMatch[1].slice(1);\n\t\t\t\t\t\tthis.schemaDependencies.get(name)?.add(depName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.schemas.set(name, zodSchemaCode);\n\t}\n\n\t/**\n\t * Generate query parameter schemas for each operation\n\t */\n\tprivate generateQueryParameterSchemas(): void {\n\t\tif (!this.spec.paths) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const [path, pathItem] of Object.entries(this.spec.paths)) {\n\t\t\tif (!isOpenAPIPathItem(pathItem)) continue;\n\n\t\t\tfor (const method of HTTP_METHODS) {\n\t\t\t\tconst operation = pathItem[method];\n\t\t\t\tif (!operation) continue;\n\n\t\t\t\t// Apply operation filters (stats already tracked in analyzeSchemaUsage)\n\t\t\t\tif (!shouldIncludeOperation(operation, path, method, this.options.operationFilters)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Merge path-level and operation-level parameters, resolving $refs\n\t\t\t\tconst allParams = mergeParameters(pathItem.parameters, operation.parameters, this.spec);\n\n\t\t\t\t// Filter for query parameters only\n\t\t\t\tconst queryParams = allParams.filter(\n\t\t\t\t\t(param): param is ResolvedParameter => isResolvedParameter(param) && param.in === \"query\"\n\t\t\t\t);\n\n\t\t\t\tif (queryParams.length === 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst strippedPath = stripPathPrefix(path, this.options.stripPathPrefix);\n\t\t\t\tconst pascalOperationId = getOperationName(\n\t\t\t\t\toperation.operationId,\n\t\t\t\t\tmethod,\n\t\t\t\t\tstrippedPath,\n\t\t\t\t\tthis.options.useOperationId\n\t\t\t\t);\n\t\t\t\tconst schemaName = `${pascalOperationId}QueryParams`; // Initialize dependencies for this schema\n\t\t\t\tif (!this.schemaDependencies.has(schemaName)) {\n\t\t\t\t\tthis.schemaDependencies.set(schemaName, new Set());\n\t\t\t\t}\n\n\t\t\t\t// Build object schema properties\n\t\t\t\tconst properties: Record<string, string> = {};\n\t\t\t\tconst required: string[] = [];\n\n\t\t\t\tfor (const param of queryParams) {\n\t\t\t\t\tconst paramName = param.name;\n\t\t\t\t\tconst isRequired = param.required === true;\n\t\t\t\t\tconst paramSchema = param.schema;\n\n\t\t\t\t\tif (!paramSchema) continue;\n\n\t\t\t\t\t// Generate Zod schema for this parameter\n\t\t\t\t\tlet zodType = this.generateQueryParamType(paramSchema, param);\n\n\t\t\t\t\t// Handle arrays with serialization styles\n\t\t\t\t\tif (paramSchema.type === \"array\" && paramSchema.items) {\n\t\t\t\t\t\tconst itemType = this.generateQueryParamType(paramSchema.items, param);\n\n\t\t\t\t\t\t// Note: Query param arrays are sent as strings and need to be split on the client side\n\t\t\t\t\t\t// The style is documented but validation is for the array type\n\t\t\t\t\t\tzodType = `z.array(${itemType})`;\n\n\t\t\t\t\t\t// Description is handled by addDescription below\n\t\t\t\t\t} // Add description if available (before .optional())\n\t\t\t\t\tif (param.description && this.requestOptions.includeDescriptions) {\n\t\t\t\t\t\tif (this.requestOptions.useDescribe) {\n\t\t\t\t\t\t\tzodType = `${zodType}.describe(${JSON.stringify(param.description)})`;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Make optional if not required (don't add defaults)\n\t\t\t\t\tif (!isRequired) {\n\t\t\t\t\t\tzodType = `${zodType}.optional()`;\n\t\t\t\t\t}\n\n\t\t\t\t\tproperties[paramName] = zodType;\n\t\t\t\t\tif (isRequired) {\n\t\t\t\t\t\trequired.push(paramName);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Track dependencies from schema references\n\t\t\t\t\tif (paramSchema.$ref) {\n\t\t\t\t\t\tconst refName = resolveRefName(paramSchema.$ref);\n\t\t\t\t\t\tthis.schemaDependencies.get(schemaName)?.add(refName);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Generate the object schema code\n\t\t\t\tconst objectMode = this.requestOptions.mode;\n\t\t\t\tconst zodMethod = objectMode === \"strict\" ? \"strictObject\" : objectMode === \"loose\" ? \"looseObject\" : \"object\";\n\n\t\t\t\tconst propsCode = Object.entries(properties)\n\t\t\t\t\t.map(([key, value]) => {\n\t\t\t\t\t\t// Quote property names that contain special characters or are not valid identifiers\n\t\t\t\t\t\tconst needsQuotes = !/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key);\n\t\t\t\t\t\tconst quotedKey = needsQuotes ? `\"${key}\"` : key;\n\t\t\t\t\t\treturn ` ${quotedKey}: ${value}`;\n\t\t\t\t\t})\n\t\t\t\t\t.join(\",\\n\");\n\n\t\t\t\tconst schemaCode = `z.${zodMethod}({\\n${propsCode}\\n})`;\n\t\t\t\t// Apply prefix/suffix using toCamelCase for consistent naming with how generateString generates the type inference\n\t\t\t\tconst operationName = pascalOperationId;\n\t\t\t\tconst camelCaseSchemaName = `${toCamelCase(operationName, { prefix: this.options.prefix, suffix: this.options.suffix })}QueryParamsSchema`;\n\n\t\t\t\t// Generate JSDoc - use operationId if available, otherwise use method + path\n\t\t\t\tconst jsdocOperationName = operation.operationId || `${method.toUpperCase()} ${path}`;\n\t\t\t\tconst jsdoc = `/**\\n * Query parameters for ${jsdocOperationName}\\n */\\n`;\n\t\t\t\tconst fullSchemaCode = `${jsdoc}export const ${camelCaseSchemaName} = ${schemaCode};`;\n\n\t\t\t\tthis.schemas.set(schemaName, fullSchemaCode);\n\t\t\t\tthis.needsZodImport = true;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Check if a header should be ignored based on filter patterns\n\t * @internal\n\t */\n\tprivate shouldIgnoreHeader(headerName: string): boolean {\n\t\tconst ignorePatterns = this.options.ignoreHeaders;\n\t\tif (!ignorePatterns || ignorePatterns.length === 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (ignorePatterns.includes(\"*\")) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst headerLower = headerName.toLowerCase();\n\n\t\treturn ignorePatterns.some((pattern: string) => {\n\t\t\tconst patternLower = pattern.toLowerCase();\n\t\t\treturn minimatch(headerLower, patternLower);\n\t\t});\n\t}\n\n\t/**\n\t * Generate header parameter schemas for each operation\n\t * Header parameters are always string type (HTTP header semantics)\n\t */\n\tprivate generateHeaderParameterSchemas(): void {\n\t\tif (!this.spec.paths) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const [path, pathItem] of Object.entries(this.spec.paths)) {\n\t\t\tif (!isOpenAPIPathItem(pathItem)) continue;\n\n\t\t\tfor (const method of HTTP_METHODS) {\n\t\t\t\tconst operation = pathItem[method];\n\t\t\t\tif (!operation) continue;\n\n\t\t\t\t// Apply operation filters\n\t\t\t\tif (!shouldIncludeOperation(operation, path, method, this.options.operationFilters)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Merge path-level and operation-level parameters, resolving $refs\n\t\t\t\tconst allParams = mergeParameters(pathItem.parameters, operation.parameters, this.spec);\n\n\t\t\t\t// Filter for header parameters only, excluding ignored ones\n\t\t\t\tconst headerParams = allParams.filter(\n\t\t\t\t\t(param): param is ResolvedParameter =>\n\t\t\t\t\t\tisResolvedParameter(param) && param.in === \"header\" && !this.shouldIgnoreHeader(param.name)\n\t\t\t\t);\n\n\t\t\t\tif (headerParams.length === 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst strippedPath = stripPathPrefix(path, this.options.stripPathPrefix);\n\t\t\t\tconst pascalOperationId = getOperationName(\n\t\t\t\t\toperation.operationId,\n\t\t\t\t\tmethod,\n\t\t\t\t\tstrippedPath,\n\t\t\t\t\tthis.options.useOperationId\n\t\t\t\t);\n\t\t\t\tconst schemaName = `${pascalOperationId}HeaderParams`;\n\n\t\t\t\t// Initialize dependencies for this schema\n\t\t\t\tif (!this.schemaDependencies.has(schemaName)) {\n\t\t\t\t\tthis.schemaDependencies.set(schemaName, new Set());\n\t\t\t\t}\n\n\t\t\t\t// Build object schema properties (headers are always strings)\n\t\t\t\tconst properties: Record<string, string> = {};\n\n\t\t\t\tfor (const param of headerParams) {\n\t\t\t\t\tconst paramName = param.name;\n\t\t\t\t\tconst paramSchema = param.schema;\n\n\t\t\t\t\tif (!paramSchema) continue;\n\n\t\t\t\t\t// Headers are always strings in HTTP, regardless of schema type\n\t\t\t\t\tlet zodType = \"z.string()\";\n\n\t\t\t\t\t// Add description if available\n\t\t\t\t\tif (param.description && this.requestOptions.includeDescriptions) {\n\t\t\t\t\t\tif (this.requestOptions.useDescribe) {\n\t\t\t\t\t\t\tzodType = `${zodType}.describe(${JSON.stringify(param.description)})`;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Headers are always optional in service layer (as per requirements)\n\t\t\t\t\tzodType = `${zodType}.optional()`;\n\n\t\t\t\t\tproperties[paramName] = zodType;\n\n\t\t\t\t\t// Track dependencies from schema references (if any)\n\t\t\t\t\tif (paramSchema.$ref) {\n\t\t\t\t\t\tconst refName = resolveRefName(paramSchema.$ref);\n\t\t\t\t\t\tthis.schemaDependencies.get(schemaName)?.add(refName);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Generate the object schema code\n\t\t\t\tconst objectMode = this.requestOptions.mode;\n\t\t\t\tconst zodMethod = objectMode === \"strict\" ? \"strictObject\" : objectMode === \"loose\" ? \"looseObject\" : \"object\";\n\n\t\t\t\tconst propsCode = Object.entries(properties)\n\t\t\t\t\t.map(([key, value]) => {\n\t\t\t\t\t\t// Quote property names that contain special characters or are not valid identifiers\n\t\t\t\t\t\tconst needsQuotes = !/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key);\n\t\t\t\t\t\tconst quotedKey = needsQuotes ? `\"${key}\"` : key;\n\t\t\t\t\t\treturn ` ${quotedKey}: ${value}`;\n\t\t\t\t\t})\n\t\t\t\t\t.join(\",\\n\");\n\n\t\t\t\tconst schemaCode = `z.${zodMethod}({\\n${propsCode}\\n})`;\n\n\t\t\t\t// Apply prefix/suffix to the operation name only, then add HeaderParams and Schema\n\t\t\t\t// Use toCamelCase for consistent naming with how generateString generates the type inference\n\t\t\t\tconst operationName = pascalOperationId;\n\t\t\t\tconst camelCaseSchemaName = `${toCamelCase(operationName, { prefix: this.options.prefix, suffix: this.options.suffix })}HeaderParamsSchema`;\n\n\t\t\t\t// Generate JSDoc - use operationId if available, otherwise use method + path\n\t\t\t\tconst jsdocOperationName = operation.operationId || `${method.toUpperCase()} ${path}`;\n\t\t\t\tconst jsdoc = `/**\\n * Header parameters for ${jsdocOperationName}\\n */\\n`;\n\t\t\t\tconst fullSchemaCode = `${jsdoc}export const ${camelCaseSchemaName} = ${schemaCode};`;\n\n\t\t\t\tthis.schemas.set(schemaName, fullSchemaCode);\n\t\t\t\tthis.needsZodImport = true;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Generate Zod type for a query parameter schema\n\t */\n\tprivate generateQueryParamType(schema: OpenAPISchema, param: ResolvedParameter): string {\n\t\t// Handle references\n\t\tif (schema.$ref) {\n\t\t\tconst refName = resolveRefName(schema.$ref);\n\t\t\t// Apply stripSchemaPrefix to referenced schema names\n\t\t\tconst strippedRefName = stripPrefix(refName, this.options.stripSchemaPrefix);\n\t\t\tconst schemaName = toCamelCase(strippedRefName, { prefix: this.options.prefix, suffix: this.options.suffix });\n\t\t\treturn `${schemaName}Schema`;\n\t\t}\n\n\t\t// Handle enums\n\t\tif (schema.enum) {\n\t\t\t// Check if all values are booleans\n\t\t\tconst allBooleans = schema.enum.every((v: unknown) => typeof v === \"boolean\");\n\t\t\tif (allBooleans) {\n\t\t\t\treturn \"z.boolean()\";\n\t\t\t}\n\n\t\t\t// Check if all values are strings\n\t\t\tconst allStrings = schema.enum.every((v: unknown) => typeof v === \"string\");\n\t\t\tif (allStrings) {\n\t\t\t\tconst enumValues = schema.enum.map(v => `\"${v}\"`).join(\", \");\n\t\t\t\treturn `z.enum([${enumValues}])`;\n\t\t\t}\n\n\t\t\t// For numeric or mixed enums, use z.union with z.literal\n\t\t\tconst literalValues = schema.enum\n\t\t\t\t.map((v: unknown) => {\n\t\t\t\t\tif (typeof v === \"string\") {\n\t\t\t\t\t\treturn `z.literal(\"${v}\")`;\n\t\t\t\t\t}\n\t\t\t\t\treturn `z.literal(${String(v)})`;\n\t\t\t\t})\n\t\t\t\t.join(\", \");\n\t\t\treturn `z.union([${literalValues}])`;\n\t\t}\n\n\t\t// Handle primitive types\n\t\tconst type = schema.type;\n\n\t\tif (type === \"string\") {\n\t\t\t// Use Zod v4 top-level format validators for known formats\n\t\t\tconst formatMap: Record<string, string> = {\n\t\t\t\temail: \"z.email()\",\n\t\t\t\turi: \"z.url()\",\n\t\t\t\turl: \"z.url()\",\n\t\t\t\tuuid: \"z.uuid()\",\n\t\t\t};\n\n\t\t\t// Check if format has a dedicated Zod v4 validator\n\t\t\tif (schema.format && formatMap[schema.format]) {\n\t\t\t\tlet zodType = formatMap[schema.format];\n\t\t\t\t// Add string validations (these still work on format types)\n\t\t\t\tif (schema.minLength !== undefined) zodType = `${zodType}.min(${schema.minLength})`;\n\t\t\t\tif (schema.maxLength !== undefined) zodType = `${zodType}.max(${schema.maxLength})`;\n\t\t\t\tif (schema.pattern) zodType = `${zodType}.regex(/${schema.pattern}/)`;\n\t\t\t\treturn zodType;\n\t\t\t}\n\n\t\t\t// Fallback to z.string() for unknown formats or no format\n\t\t\tlet zodType = \"z.string()\";\n\t\t\tif (schema.minLength !== undefined) zodType = `${zodType}.min(${schema.minLength})`;\n\t\t\tif (schema.maxLength !== undefined) zodType = `${zodType}.max(${schema.maxLength})`;\n\t\t\tif (schema.pattern) zodType = `${zodType}.regex(/${schema.pattern}/)`;\n\t\t\treturn zodType;\n\t\t}\n\n\t\tif (type === \"number\" || type === \"integer\") {\n\t\t\tlet zodType = type === \"integer\" ? \"z.number().int()\" : \"z.number()\";\n\t\t\t// Add number validations\n\t\t\tif (schema.minimum !== undefined) {\n\t\t\t\tzodType = schema.exclusiveMinimum ? `${zodType}.gt(${schema.minimum})` : `${zodType}.gte(${schema.minimum})`;\n\t\t\t}\n\t\t\tif (schema.maximum !== undefined) {\n\t\t\t\tzodType = schema.exclusiveMaximum ? `${zodType}.lt(${schema.maximum})` : `${zodType}.lte(${schema.maximum})`;\n\t\t\t}\n\t\t\treturn zodType;\n\t\t}\n\n\t\tif (type === \"boolean\") {\n\t\t\treturn \"z.boolean()\";\n\t\t}\n\n\t\tif (type === \"array\" && schema.items) {\n\t\t\tconst itemType = this.generateQueryParamType(schema.items, param);\n\t\t\tlet arrayType = `z.array(${itemType})`;\n\t\t\t// Add array validations\n\t\t\tif (schema.minItems !== undefined) arrayType = `${arrayType}.min(${schema.minItems})`;\n\t\t\tif (schema.maxItems !== undefined) arrayType = `${arrayType}.max(${schema.maxItems})`;\n\t\t\treturn arrayType;\n\t\t}\n\n\t\t// Fallback to z.unknown() for unhandled types\n\t\treturn \"z.unknown()\";\n\t}\n\n\t/**\n\t * Topological sort for schema dependencies\n\t * Returns schemas in the order they should be declared\n\t */\n\tprivate topologicalSort(): string[] {\n\t\tconst sorted: string[] = [];\n\t\tconst visited = new Set<string>();\n\t\tconst visiting = new Set<string>();\n\t\tconst aliases: string[] = [];\n\t\tconst circularDeps = new Set<string>(); // Track schemas involved in circular dependencies\n\n\t\t// Performance optimization: Cache schema and type code lookups\n\t\tconst codeCache = new Map<string, string>();\n\t\tfor (const [name, code] of this.schemas) {\n\t\t\tcodeCache.set(name, code);\n\t\t}\n\t\tfor (const [name, code] of this.types) {\n\t\t\tcodeCache.set(name, code);\n\t\t}\n\n\t\tconst visit = (name: string): void => {\n\t\t\tif (visited.has(name)) return;\n\n\t\t\t// Detect circular dependencies\n\t\t\tif (visiting.has(name)) {\n\t\t\t\t// Mark this as a circular dependency but don't add it yet\n\t\t\t\tcircularDeps.add(name);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvisiting.add(name);\n\n\t\t\t// Check if this is a simple alias (just assigns another schema directly)\n\t\t\tconst code = codeCache.get(name) || \"\";\n\t\t\tconst isSimpleAlias =\n\t\t\t\tcode.match(/= (\\w+Schema);$/) !== null &&\n\t\t\t\t!code.includes(\"z.object\") &&\n\t\t\t\t!code.includes(\"z.enum\") &&\n\t\t\t\t!code.includes(\"z.union\") &&\n\t\t\t\t!code.includes(\"z.array\") &&\n\t\t\t\t!code.includes(\".and(\");\n\n\t\t\tif (isSimpleAlias) {\n\t\t\t\t// For simple aliases, just mark as visited and add to aliases list\n\t\t\t\tvisiting.delete(name);\n\t\t\t\tvisited.add(name);\n\t\t\t\taliases.push(name);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Visit dependencies first for non-alias schemas\n\t\t\tconst deps = this.schemaDependencies.get(name);\n\t\t\tlet dependsOnCircular = false;\n\t\t\tif (deps && deps.size > 0) {\n\t\t\t\tfor (const dep of deps) {\n\t\t\t\t\tif (this.schemas.has(dep) || this.types.has(dep)) {\n\t\t\t\t\t\tvisit(dep);\n\t\t\t\t\t\t// If this dependency is circular, we also need to be deferred\n\t\t\t\t\t\tif (circularDeps.has(dep)) {\n\t\t\t\t\t\t\tdependsOnCircular = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvisiting.delete(name);\n\t\t\tvisited.add(name);\n\n\t\t\t// Don't add circular dependencies or schemas that depend on them yet\n\t\t\t// They need special handling and will be added at the end\n\t\t\tif (!circularDeps.has(name) && !dependsOnCircular) {\n\t\t\t\tsorted.push(name);\n\t\t\t} else if (dependsOnCircular && !circularDeps.has(name)) {\n\t\t\t\t// Mark schemas that depend on circular deps as needing to be deferred\n\t\t\t\tcircularDeps.add(name);\n\t\t\t}\n\t\t};\n\n\t\t// Visit all schemas and types\n\t\tconst allNames = new Set([...this.schemas.keys(), ...this.types.keys()]);\n\t\tfor (const name of allNames) {\n\t\t\tvisit(name);\n\t\t}\n\n\t\t// Add circular dependencies at the end (before aliases)\n\t\t// This ensures they come after their non-circular dependencies\n\t\t// Note: circular deps ARE in visited (they complete their visit cycle),\n\t\t// but they were excluded from sorted. We need to add them now.\n\t\tfor (const name of circularDeps) {\n\t\t\tif (!sorted.includes(name)) {\n\t\t\t\tsorted.push(name);\n\t\t\t}\n\t\t}\n\n\t\t// Add aliases at the end\n\t\treturn [...sorted, ...aliases];\n\t}\n\n\t/**\n\t * Generate statistics about the generated schemas\n\t */\n\tprivate generateStats(): string[] {\n\t\tconst stats = {\n\t\t\ttotalSchemas: this.schemas.size,\n\t\t\twithCircularRefs: 0,\n\t\t\twithDiscriminators: 0,\n\t\t\twithConstraints: 0,\n\t\t};\n\n\t\t// Count schemas with special features\n\t\tfor (const code of this.schemas.values()) {\n\t\t\tif (code.includes(\"z.lazy(\")) stats.withCircularRefs++;\n\t\t\tif (code.includes(\"z.discriminatedUnion\")) stats.withDiscriminators++;\n\t\t\tif (code.includes(\".min(\") || code.includes(\".max(\") || code.includes(\".gte(\")) {\n\t\t\t\tstats.withConstraints++;\n\t\t\t}\n\t\t}\n\n\t\tconst output = [\n\t\t\t\"// Generation Statistics:\",\n\t\t\t`// Total schemas: ${stats.totalSchemas}`,\n\t\t\t`// Circular references: ${stats.withCircularRefs}`,\n\t\t\t`// Discriminated unions: ${stats.withDiscriminators}`,\n\t\t\t`// With constraints: ${stats.withConstraints}`,\n\t\t];\n\n\t\t// Add filter statistics if filtering was used\n\t\tif (this.options.operationFilters && this.filterStats.totalOperations > 0) {\n\t\t\toutput.push(\"//\");\n\t\t\tconst filterStatsStr = formatFilterStatistics(this.filterStats);\n\t\t\tfor (const line of filterStatsStr.split(\"\\n\")) {\n\t\t\t\toutput.push(`// ${line}`);\n\t\t\t}\n\t\t}\n\n\t\toutput.push(`// Generated at: ${new Date().toISOString()}`);\n\n\t\treturn output;\n\t}\n\n\t/**\n\t * Pre-analyze schemas to detect circular dependencies before code generation.\n\t * This allows the property generator to use z.lazy() for forward references.\n\t */\n\tprivate analyzeCircularDependencies(): void {\n\t\tif (!this.spec.components?.schemas) return;\n\n\t\t// First pass: collect all schema dependencies without generating code\n\t\tconst dependencies = new Map<string, Set<string>>();\n\n\t\tconst collectDependencies = (name: string, schema: OpenAPISchema, visited = new Set<string>()): Set<string> => {\n\t\t\tif (visited.has(name)) return new Set();\n\t\t\tvisited.add(name);\n\n\t\t\tconst deps = new Set<string>();\n\n\t\t\t// Handle $ref\n\t\t\tif (schema.$ref) {\n\t\t\t\tconst refName = resolveRefName(schema.$ref);\n\t\t\t\tdeps.add(refName);\n\t\t\t}\n\n\t\t\t// Handle allOf\n\t\t\tif (schema.allOf) {\n\t\t\t\tfor (const item of schema.allOf) {\n\t\t\t\t\tconst itemDeps = collectDependencies(`${name}_allOf`, item, new Set(visited));\n\t\t\t\t\tfor (const dep of itemDeps) deps.add(dep);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle oneOf\n\t\t\tif (schema.oneOf) {\n\t\t\t\tfor (const item of schema.oneOf) {\n\t\t\t\t\tconst itemDeps = collectDependencies(`${name}_oneOf`, item, new Set(visited));\n\t\t\t\t\tfor (const dep of itemDeps) deps.add(dep);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle anyOf\n\t\t\tif (schema.anyOf) {\n\t\t\t\tfor (const item of schema.anyOf) {\n\t\t\t\t\tconst itemDeps = collectDependencies(`${name}_anyOf`, item, new Set(visited));\n\t\t\t\t\tfor (const dep of itemDeps) deps.add(dep);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle properties\n\t\t\tif (schema.properties) {\n\t\t\t\tfor (const propSchema of Object.values(schema.properties)) {\n\t\t\t\t\tconst propDeps = collectDependencies(`${name}_prop`, propSchema, new Set(visited));\n\t\t\t\t\tfor (const dep of propDeps) deps.add(dep);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle array items\n\t\t\tif (schema.items) {\n\t\t\t\tconst itemDeps = collectDependencies(`${name}_items`, schema.items, new Set(visited));\n\t\t\t\tfor (const dep of itemDeps) deps.add(dep);\n\t\t\t}\n\n\t\t\t// Handle additionalProperties\n\t\t\tif (schema.additionalProperties && typeof schema.additionalProperties === \"object\") {\n\t\t\t\tconst addDeps = collectDependencies(`${name}_additional`, schema.additionalProperties, new Set(visited));\n\t\t\t\tfor (const dep of addDeps) deps.add(dep);\n\t\t\t}\n\n\t\t\treturn deps;\n\t\t};\n\n\t\t// Collect dependencies for all schemas\n\t\tfor (const [name, schema] of Object.entries(this.spec.components.schemas)) {\n\t\t\t// Skip schemas not referenced by filtered operations when operation filters are active\n\t\t\tif (this.options.operationFilters && this.schemaUsageMap.size > 0 && !this.schemaUsageMap.has(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdependencies.set(name, collectDependencies(name, schema));\n\t\t}\n\n\t\t// Second pass: detect circular dependencies using DFS\n\t\tconst visited = new Set<string>();\n\t\tconst visiting = new Set<string>();\n\n\t\tconst detectCircular = (name: string, path: string[] = []): void => {\n\t\t\tif (visited.has(name)) return;\n\n\t\t\tif (visiting.has(name)) {\n\t\t\t\t// Found a cycle - mark all schemas in the cycle as circular\n\t\t\t\tconst cycleStart = path.indexOf(name);\n\t\t\t\tif (cycleStart >= 0) {\n\t\t\t\t\tfor (let i = cycleStart; i < path.length; i++) {\n\t\t\t\t\t\tthis.circularDependencies.add(path[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.circularDependencies.add(name);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvisiting.add(name);\n\t\t\tpath.push(name);\n\n\t\t\tconst deps = dependencies.get(name);\n\t\t\tif (deps) {\n\t\t\t\tfor (const dep of deps) {\n\t\t\t\t\tif (dependencies.has(dep)) {\n\t\t\t\t\t\tdetectCircular(dep, [...path]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvisiting.delete(name);\n\t\t\tvisited.add(name);\n\t\t};\n\n\t\tfor (const name of dependencies.keys()) {\n\t\t\tdetectCircular(name, []);\n\t\t}\n\t}\n\n\t/**\n\t * Generate JSDoc warning for allOf conflicts\n\t * @param conflicts Array of conflict description strings\n\t * @returns JSDoc formatted warning string\n\t */\n\tprivate generateConflictJSDoc(conflicts: string[]): string {\n\t\tconst lines = [\" * @warning allOf property conflicts detected:\"];\n\t\tfor (const conflict of conflicts) {\n\t\t\tlines.push(` * - ${conflict}`);\n\t\t}\n\t\treturn `${lines.join(\"\\n\")}\\n`;\n\t}\n}\n","import {\n\tBaseDefaultsSchema,\n\tBaseGeneratorOptionsSchema,\n\tmergeCliWithConfig as coreMergeCliWithConfig,\n\tcreateConfigLoader,\n\tExecutionModeSchema,\n\ttype FormatZodErrorsOptions,\n\tRegexPatternSchema,\n\tRequestResponseOptionsSchema,\n} from \"@cerios/openapi-core\";\nimport { z } from \"zod\";\n\nimport type { ConfigFile, OpenApiGeneratorOptions } from \"../types\";\n\n/**\n * Zod-specific options schema - extends base generator options\n */\nconst ZodSpecificOptionsSchema = z.strictObject({\n\tmode: z.enum([\"strict\", \"normal\", \"loose\"]).optional(),\n\tuseDescribe: z.boolean().optional(),\n\temptyObjectBehavior: z.enum([\"strict\", \"loose\", \"record\"]).optional(),\n\tschemaType: z.enum([\"all\", \"request\", \"response\"]).optional(),\n\trequest: RequestResponseOptionsSchema.optional(),\n\tresponse: RequestResponseOptionsSchema.optional(),\n\tcustomDateTimeFormatRegex: RegexPatternSchema.optional(),\n\toutputZodSchemas: z.string().optional(),\n\tenumFormat: z.enum([\"union\", \"const-object\"]).optional(),\n\ttypeAssertionThreshold: z.number().int().gte(0).optional(),\n});\n\n/**\n * Full generator options schema - base + Zod-specific\n * Uses .extend() instead of deprecated .merge() for Zod v4 compatibility\n */\nconst OpenApiGeneratorOptionsSchema = BaseGeneratorOptionsSchema.extend({\n\t...ZodSpecificOptionsSchema.shape,\n\toutputTypes: z.string().optional(),\n\toutput: z.string().optional(),\n}).superRefine((spec, ctx) => {\n\tconst hasOutputTypes = Boolean(spec.outputTypes);\n\tconst hasOutput = Boolean(spec.output);\n\tconst hasOutputZodSchemas = Boolean(spec.outputZodSchemas);\n\n\t// When outputZodSchemas is specified, outputTypes is required for TypeScript types\n\tif (hasOutputZodSchemas && !hasOutputTypes && !hasOutput) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tpath: [\"outputTypes\"],\n\t\t\tmessage: \"When 'outputZodSchemas' is specified, 'outputTypes' is required for TypeScript type definitions.\",\n\t\t});\n\t}\n\n\t// Standard validation when outputZodSchemas is not used\n\tif (!hasOutputZodSchemas && !hasOutputTypes && !hasOutput) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tpath: [\"outputTypes\"],\n\t\t\tmessage: \"Each spec must specify an output file path using 'outputTypes' (preferred) or deprecated 'output'.\",\n\t\t});\n\t}\n\n\tif (hasOutputTypes && hasOutput && spec.outputTypes !== spec.output) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tpath: [\"output\"],\n\t\t\tmessage: \"Invalid configuration: 'outputTypes' and deprecated 'output' are both set but have different values.\",\n\t\t});\n\t}\n});\n\n/**\n * Defaults schema - base defaults + Zod-specific options (no input/outputTypes/name)\n * Uses .extend() instead of deprecated .merge() for Zod v4 compatibility\n */\nconst ZodDefaultsSchema = BaseDefaultsSchema.extend({\n\t...ZodSpecificOptionsSchema.shape,\n});\n\n/**\n * Config file schema\n */\nconst ConfigFileSchema = z.strictObject({\n\tdefaults: ZodDefaultsSchema.optional(),\n\tspecs: z.array(OpenApiGeneratorOptionsSchema).min(1, {\n\t\tmessage:\n\t\t\t\"Configuration must include at least one specification. Each specification should have 'input' and 'outputTypes' paths.\",\n\t}),\n\texecutionMode: ExecutionModeSchema.optional(),\n});\n\n// Custom error messages for user-friendly validation errors\nconst errorMessages: FormatZodErrorsOptions = {\n\tmissingFieldMessages: {\n\t\tinput: \"Each spec must specify the path to your OpenAPI specification file.\",\n\t\toutputTypes: \"Each spec must specify an output file path for generated Zod schemas.\",\n\t},\n\tunrecognizedKeyMessages: {},\n\trequiredFieldsHelp: \"All required fields are present (specs array with input/outputTypes)\",\n};\n\n// Create config loader using factory from core\nconst configLoader = createConfigLoader<ConfigFile>(\n\t{\n\t\tpackageName: \"openapi-to-zod\",\n\t\terrorMessages,\n\t},\n\tConfigFileSchema\n);\n\n/**\n * Load and validate configuration file\n * Supports: openapi-to-zod.config.{ts,json}, package.json under \"openapi-to-zod\" key\n *\n * @param configPath - Optional explicit path to config file. If not provided, searches automatically\n * @returns Validated ConfigFile object\n * @throws Error if config file not found, invalid, or contains unknown properties\n */\nexport const loadConfig = configLoader.loadConfig;\n\n/**\n * Merge global defaults with per-spec configuration\n * CLI arguments have highest precedence and are merged separately in CLI layer\n *\n * @param config - Validated configuration file\n * @returns Array of fully resolved OpenApiGeneratorOptions objects\n */\nexport function mergeConfigWithDefaults(config: ConfigFile): OpenApiGeneratorOptions[] {\n\tif (!config?.specs || !Array.isArray(config.specs)) {\n\t\tthrow new Error(\"Invalid config: specs array is required\");\n\t}\n\n\tconst defaults = config.defaults || {};\n\tlet warnedDeprecatedOutput = false;\n\n\treturn config.specs.map(spec => {\n\t\t// oxlint-disable-next-line typescript/no-deprecated\n\t\tconst output = spec.output;\n\t\tconst outputTypes = spec.outputTypes;\n\t\tconst resolvedOutputTypes = outputTypes ?? output;\n\t\tconst hasOutputZodSchemas = Boolean(spec.outputZodSchemas);\n\n\t\t// When outputZodSchemas is specified, outputTypes is required\n\t\tif (hasOutputZodSchemas && resolvedOutputTypes === undefined) {\n\t\t\tthrow new Error(\n\t\t\t\t\"When 'outputZodSchemas' is specified, 'outputTypes' is required for TypeScript type definitions.\"\n\t\t\t);\n\t\t}\n\n\t\t// Standard validation when outputZodSchemas is not used\n\t\tif (!hasOutputZodSchemas && resolvedOutputTypes === undefined) {\n\t\t\tthrow new Error(\"Each spec must define 'outputTypes' (preferred) or deprecated 'output'.\");\n\t\t}\n\n\t\tif (output && outputTypes && output !== outputTypes) {\n\t\t\tthrow new Error(\"Invalid configuration: 'outputTypes' and deprecated 'output' cannot have different values.\");\n\t\t}\n\n\t\t// Type guard: resolvedOutputTypes is guaranteed non-undefined by validation checks above\n\t\tif (!resolvedOutputTypes) {\n\t\t\tthrow new Error(\"Internal error: outputTypes should be defined after validation\");\n\t\t}\n\n\t\tif (output && !warnedDeprecatedOutput) {\n\t\t\tconsole.warn(\n\t\t\t\t\"[openapi-to-zod] Deprecation warning: 'output' is deprecated and will be removed in a future release. Use 'outputTypes' instead.\"\n\t\t\t);\n\t\t\twarnedDeprecatedOutput = true;\n\t\t}\n\n\t\t// oxlint-disable-next-line typescript/no-deprecated\n\t\tconst { output: _deprecatedOutput, ...specWithoutDeprecatedOutput } = spec;\n\n\t\t// Deep merge: spec options override defaults\n\t\tconst merged: OpenApiGeneratorOptions = {\n\t\t\t// Apply defaults first\n\t\t\tmode: defaults.mode,\n\t\t\tincludeDescriptions: defaults.includeDescriptions,\n\t\t\tuseDescribe: defaults.useDescribe,\n\t\t\tdefaultNullable: defaults.defaultNullable,\n\t\t\tuseOperationId: defaults.useOperationId,\n\t\t\temptyObjectBehavior: defaults.emptyObjectBehavior,\n\t\t\tschemaType: defaults.schemaType,\n\t\t\tprefix: defaults.prefix,\n\t\t\tsuffix: defaults.suffix,\n\t\t\tshowStats: defaults.showStats,\n\t\t\tcustomDateTimeFormatRegex: defaults.customDateTimeFormatRegex,\n\t\t\tenumFormat: defaults.enumFormat,\n\t\t\tfileHeader: defaults.fileHeader,\n\n\t\t\t// Override with spec-specific values\n\t\t\t...specWithoutDeprecatedOutput,\n\t\t\toutputTypes: resolvedOutputTypes,\n\t\t};\n\t\treturn merged;\n\t});\n}\n\n/**\n * Merge CLI options with config options\n * CLI options have highest precedence and override both spec and default config\n *\n * @param specConfig - Configuration from config file (with defaults already applied)\n * @param cliOptions - Options provided via CLI arguments\n * @returns Merged OpenApiGeneratorOptions with CLI taking precedence\n */\nexport function mergeCliWithConfig(\n\tspecConfig: OpenApiGeneratorOptions,\n\tcliOptions: Partial<OpenApiGeneratorOptions>\n): OpenApiGeneratorOptions {\n\treturn coreMergeCliWithConfig(specConfig, cliOptions);\n}\n","#!/usr/bin/env node\nimport { existsSync, writeFileSync } from \"node:fs\";\n\nimport {\n\tCliOptionsError,\n\tConfigValidationError,\n\texecuteBatch,\n\tfindSpecFiles,\n\tgetBatchExitCode,\n\tgetRandomCeriosMessage,\n} from \"@cerios/openapi-core\";\nimport { Command } from \"commander\";\nimport prompts from \"prompts\";\n\nimport { OpenApiGenerator } from \"./openapi-generator\";\nimport type { ExecutionMode } from \"./types\";\nimport { loadConfig, mergeConfigWithDefaults } from \"./utils/config-loader\";\n\nconst program = new Command();\n\nprogram\n\t.name(\"openapi-to-zod\")\n\t.description(\"Generate Zod v4 schemas from OpenAPI specifications\")\n\t.version(\"1.0.0\")\n\t.option(\"-c, --config <path>\", \"Path to config file (openapi-to-zod.config.{ts,json})\")\n\t.addHelpText(\n\t\t\"after\",\n\t\t`\nExamples:\n # Create a new config file\n $ openapi-to-zod init\n\n # Generate with auto-discovered config\n $ openapi-to-zod\n\n # Generate with custom config path\n $ openapi-to-zod --config custom.config.ts\n`\n\t)\n\t.action(async (options: { config?: string }) => {\n\t\ttry {\n\t\t\tawait executeConfigMode(options);\n\t\t} catch (error) {\n\t\t\tif (error instanceof CliOptionsError || error instanceof ConfigValidationError) {\n\t\t\t\tconsole.error(error.message);\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\t\tconsole.error(\"Error:\", error instanceof Error ? error.message : String(error));\n\t\t\tif (error instanceof Error && error.stack) {\n\t\t\t\tconsole.error(\"\\nStack trace:\", error.stack);\n\t\t\t}\n\t\t\tprocess.exit(1);\n\t\t}\n\t});\n\n// Add init command\nprogram\n\t.command(\"init\")\n\t.description(\"Initialize a new openapi-to-zod configuration file\")\n\t.action(async () => {\n\t\ttry {\n\t\t\tawait initConfigFile();\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Error:\", error instanceof Error ? error.message : String(error));\n\t\t\tprocess.exit(1);\n\t\t}\n\t});\n\nprogram.parse();\n\n/**\n * Execute config mode (only mode available)\n */\nasync function executeConfigMode(options: { config?: string }): Promise<void> {\n\t// Load config file\n\tconst config = await loadConfig(options.config);\n\n\t// Merge defaults with specs\n\tconst specs = mergeConfigWithDefaults(config);\n\n\t// Determine execution mode\n\tconst executionMode: ExecutionMode = config.executionMode || \"parallel\";\n\n\t// Extract batchSize from first spec's options or use default\n\tconst batchSize = specs[0]?.batchSize ?? 10;\n\n\t// Execute batch with generator factory\n\tconst summary = await executeBatch(specs, executionMode, spec => new OpenApiGenerator(spec), batchSize);\n\n\t// Exit with appropriate code\n\tconst exitCode = getBatchExitCode(summary);\n\tif (exitCode !== 0) {\n\t\tprocess.exit(exitCode);\n\t}\n} /**\n * Initialize a new config file with prompts\n */\nasync function initConfigFile(): Promise<void> {\n\tconsole.log(\"Welcome to openapi-to-zod configuration setup!\\n\");\n\n\t// Check for existing config files\n\tconst configFiles = [\"openapi-to-zod.config.ts\", \"openapi-to-zod.config.json\"];\n\n\tconst existingConfig = configFiles.find(f => existsSync(f));\n\tif (existingConfig) {\n\t\tconst result = await prompts({\n\t\t\ttype: \"confirm\",\n\t\t\tname: \"overwrite\",\n\t\t\tmessage: `Config file '${existingConfig}' already exists. Overwrite?`,\n\t\t\tinitial: false,\n\t\t});\n\t\tconst overwrite = Boolean((result as Record<string, unknown>).overwrite);\n\n\t\tif (!overwrite) {\n\t\t\tconsole.log(\"Initialization cancelled.\");\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Discover spec files\n\tconst { files, totalCount } = findSpecFiles();\n\n\t// Show pagination message if needed\n\tif (totalCount > 20) {\n\t\tconsole.log(`Showing first 20 of ${totalCount} files found. Use manual entry to specify others.\\n`);\n\t}\n\n\tlet inputPath: string;\n\n\tif (files.length > 0) {\n\t\t// Show file selection\n\t\tconst choices = [\n\t\t\t...files.map(f => ({ title: `${f.path} (${f.size})`, value: f.path })),\n\t\t\t{ title: \"→ Enter manually...\", value: \"__MANUAL__\" },\n\t\t];\n\n\t\tconst inputResponse: { input?: string } = await prompts({\n\t\t\ttype: \"select\",\n\t\t\tname: \"input\",\n\t\t\tmessage: \"Select OpenAPI spec file (YAML or JSON):\",\n\t\t\tchoices,\n\t\t});\n\n\t\tif (!inputResponse.input) {\n\t\t\tconsole.log(\"\\nInitialization cancelled.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (inputResponse.input === \"__MANUAL__\") {\n\t\t\t// Manual entry\n\t\t\tconst manualResponse: { input?: string } = await prompts({\n\t\t\t\ttype: \"text\",\n\t\t\t\tname: \"input\",\n\t\t\t\tmessage: \"Input OpenAPI file path (YAML or JSON):\",\n\t\t\t\tinitial: \"openapi.{yaml,yml,json}\",\n\t\t\t\tvalidate: (value: string) => {\n\t\t\t\t\tif (value.length === 0) return \"Input path is required\";\n\t\t\t\t\tif (!existsSync(value)) return \"⚠️ File does not exist. Continue anyway?\";\n\t\t\t\t\treturn true;\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tif (!manualResponse.input) {\n\t\t\t\tconsole.log(\"\\nInitialization cancelled.\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinputPath = manualResponse.input;\n\t\t} else {\n\t\t\tinputPath = inputResponse.input;\n\t\t}\n\t} else {\n\t\t// No files found, fall back to text input\n\t\tconst manualResponse: { input?: string } = await prompts({\n\t\t\ttype: \"text\",\n\t\t\tname: \"input\",\n\t\t\tmessage: \"Input OpenAPI file path (YAML or JSON):\",\n\t\t\tinitial: \"openapi.{yaml,yml,json}\",\n\t\t\tvalidate: (value: string) => {\n\t\t\t\tif (value.length === 0) return \"Input path is required\";\n\t\t\t\tif (!existsSync(value)) return \"⚠️ File does not exist. Continue anyway?\";\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\n\t\tif (!manualResponse.input) {\n\t\t\tconsole.log(\"\\nInitialization cancelled.\");\n\t\t\treturn;\n\t\t}\n\n\t\tinputPath = manualResponse.input;\n\t}\n\n\tconst response: { output?: string; format?: \"ts\" | \"json\"; includeDefaults?: boolean } = await prompts([\n\t\t{\n\t\t\ttype: \"text\",\n\t\t\tname: \"output\",\n\t\t\tmessage: \"Output TypeScript file path:\",\n\t\t\tinitial: \"src/schemas.ts\",\n\t\t\tvalidate: (value: string) => value.length > 0 || \"Output path is required\",\n\t\t},\n\t\t{\n\t\t\ttype: \"select\",\n\t\t\tname: \"format\",\n\t\t\tmessage: \"Config file format:\",\n\t\t\tchoices: [\n\t\t\t\t{ title: \"TypeScript (recommended)\", value: \"ts\" },\n\t\t\t\t{ title: \"JSON\", value: \"json\" },\n\t\t\t],\n\t\t\tinitial: 0,\n\t\t},\n\t\t{\n\t\t\ttype: \"confirm\",\n\t\t\tname: \"includeDefaults\",\n\t\t\tmessage: \"Include commonly-used recommended defaults?\",\n\t\t\tinitial: true,\n\t\t},\n\t]);\n\n\t// Handle user cancellation (Ctrl+C)\n\tif (!response.output || !response.format) {\n\t\tconsole.log(\"\\nInitialization cancelled.\");\n\t\treturn;\n\t}\n\n\tconst { output, format, includeDefaults } = response;\n\tconst input = inputPath;\n\n\t// Generate config content\n\tlet configContent: string;\n\tlet configFilename: string;\n\n\tif (format === \"ts\") {\n\t\tconfigFilename = \"openapi-to-zod.config.ts\";\n\t\tif (includeDefaults) {\n\t\t\tconfigContent = `import { defineConfig } from '@cerios/openapi-to-zod';\n\nexport default defineConfig({\n defaults: {\n mode: 'strict',\n includeDescriptions: true,\n\tuseDescribe: false,\n showStats: true,\n\tschemaType: 'all',\n },\n specs: [\n {\n input: '${input}',\n outputTypes: '${output}',\n },\n ],\n});\n`;\n\t\t} else {\n\t\t\tconfigContent = `import { defineConfig } from '@cerios/openapi-to-zod';\n\nexport default defineConfig({\n specs: [\n {\n input: '${input}',\n outputTypes: '${output}',\n },\n ],\n});\n`;\n\t\t}\n\t} else {\n\t\tconfigFilename = \"openapi-to-zod.config.json\";\n\t\tconst jsonConfig: {\n\t\t\tspecs: Array<{ input: string; outputTypes: string | undefined }>;\n\t\t\tdefaults?: { mode: string; includeDescriptions: boolean; showStats: boolean };\n\t\t} = {\n\t\t\tspecs: [\n\t\t\t\t{\n\t\t\t\t\tinput,\n\t\t\t\t\toutputTypes: output,\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\n\t\tif (includeDefaults) {\n\t\t\tjsonConfig.defaults = {\n\t\t\t\tmode: \"strict\",\n\t\t\t\tincludeDescriptions: true,\n\t\t\t\tshowStats: false,\n\t\t\t};\n\t\t}\n\n\t\tconfigContent = `${JSON.stringify(jsonConfig, null, 2)}\\n`;\n\t}\n\n\t// Write config file\n\twriteFileSync(configFilename, configContent, \"utf-8\");\n\n\tconsole.log(`\\n✓ Created ${configFilename}`);\n\tconsole.log(\"\\nNext steps:\");\n\tconsole.log(\" 1. Review and customize your config file if needed\");\n\tconsole.log(\" 2. Run 'openapi-to-zod' to generate schemas\\n\");\n\n\t// Random fun message\n\tconsole.log(`${getRandomCeriosMessage()}\\n`);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAF9B;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAEA,QAAM,EAAE,aAAa,qBAAqB,KAAK,IAAI,QAAQ;AAE3D,QAAM,IAAI;AAAA,MACT,SAAS,CAAC,uBAAuB,SAAS,UAAU,gBAAgB;AAAA;AAAA,MAGpE,OAAO,KAAK,GAAG,CAAC;AAAA,MAChB,MAAM,KAAK,GAAG,EAAE;AAAA,MAChB,KAAK,KAAK,GAAG,EAAE;AAAA,MACf,QAAQ,KAAK,GAAG,EAAE;AAAA,MAClB,WAAW,KAAK,GAAG,EAAE;AAAA,MACrB,SAAS,KAAK,GAAG,EAAE;AAAA,MACnB,QAAQ,KAAK,GAAG,EAAE;AAAA,MAClB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H,KAAK;AAAA,sBACC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,QAK1B;AAAA,MACD,OAAO;AACN,yBAAiB;AACjB,cAAM,aAGF;AAAA,UACH,OAAO;AAAA,YACN;AAAA,cACC;AAAA,cACA,aAAa;AAAA,YACd;AAAA,UACD;AAAA,QACD;AAEA,YAAI,iBAAiB;AACpB,qBAAW,WAAW;AAAA,YACrB,MAAM;AAAA,YACN,qBAAqB;AAAA,YACrB,WAAW;AAAA,UACZ;AAAA,QACD;AAEA,wBAAgB,GAAG,KAAK,UAAU,YAAY,MAAM,CAAC,CAAC;AAAA;AAAA,MACvD;AAGA,MAAAD,eAAc,gBAAgB,eAAe,OAAO;AAEpD,cAAQ,IAAI;AAAA,iBAAe,cAAc,EAAE;AAC3C,cAAQ,IAAI,eAAe;AAC3B,cAAQ,IAAI,sDAAsD;AAClE,cAAQ,IAAI,iDAAiD;AAG7D,cAAQ,IAAI,GAAG,uBAAuB,CAAC;AAAA,CAAI;AAAA,IAC5C;AAAA;AAAA;","names":["F","cursor","cursor","F","override","question","answer","getFormattedAnswer","require_action","require_strip","require_clear","require_figures","require_style","require_lines","require_wrap","require_entriesToDisplay","require_util","require_prompt","require_text","require_select","require_toggle","require_datepart","require_meridiem","require_day","require_hours","require_milliseconds","require_minutes","require_month","require_seconds","require_year","require_dateparts","require_date","require_number","require_multiselect","cursor","require_autocomplete","require_autocompleteMultiselect","cursor","require_confirm","require_elements","require_prompts","override","question","answer","require_prompts","schemaCode","typeCode","isNullable","schemaStrings","union","elseValidation","elseRequiredProps","generatePropertyAccess","definedProps","toCamelCase","toPascalCase","LRUCache","resolveRefName","stripPrefix","toCamelCase","toPascalCase","path","jsdoc","strippedName","zodType","visited","existsSync","writeFileSync","prompts"]}
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.5.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js","../../../node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/action.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/strip.js","../../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/clear.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/figures.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/style.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/lines.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/wrap.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/entriesToDisplay.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/prompt.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/text.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/select.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/toggle.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/datepart.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/meridiem.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/day.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/hours.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/milliseconds.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/minutes.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/month.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/seconds.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/year.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/date.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/number.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/multiselect.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/autocomplete.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/autocompleteMultiselect.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/confirm.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/prompts.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/action.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/strip.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/clear.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/figures.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/style.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/lines.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/wrap.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/entriesToDisplay.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/prompt.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/text.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/select.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/toggle.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/datepart.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/meridiem.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/day.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/hours.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/milliseconds.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/minutes.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/month.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/seconds.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/year.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/date.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/number.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/multiselect.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocomplete.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocompleteMultiselect.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/confirm.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/prompts.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/index.js","../../../node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/index.js","../src/generators/enum-generator.ts","../src/generators/jsdoc-generator.ts","../src/utils/string-utils.ts","../src/validators/array-validator.ts","../src/validators/composition-validator.ts","../src/validators/number-validator.ts","../src/validators/conditional-validator.ts","../src/validators/object-validator.ts","../src/validators/string-validator.ts","../src/generators/property-generator.ts","../src/openapi-generator.ts","../src/utils/config-loader.ts","../src/cli.ts"],"sourcesContent":["// Shim globals in esm bundle\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","'use strict';\n\nconst { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env;\n\nconst $ = {\n\tenabled: !NODE_DISABLE_COLORS && TERM !== 'dumb' && FORCE_COLOR !== '0',\n\n\t// modifiers\n\treset: init(0, 0),\n\tbold: init(1, 22),\n\tdim: init(2, 22),\n\titalic: init(3, 23),\n\tunderline: init(4, 24),\n\tinverse: init(7, 27),\n\thidden: init(8, 28),\n\tstrikethrough: init(9, 29),\n\n\t// colors\n\tblack: init(30, 39),\n\tred: init(31, 39),\n\tgreen: init(32, 39),\n\tyellow: init(33, 39),\n\tblue: init(34, 39),\n\tmagenta: init(35, 39),\n\tcyan: init(36, 39),\n\twhite: init(37, 39),\n\tgray: init(90, 39),\n\tgrey: init(90, 39),\n\n\t// background colors\n\tbgBlack: init(40, 49),\n\tbgRed: init(41, 49),\n\tbgGreen: init(42, 49),\n\tbgYellow: init(43, 49),\n\tbgBlue: init(44, 49),\n\tbgMagenta: init(45, 49),\n\tbgCyan: init(46, 49),\n\tbgWhite: init(47, 49)\n};\n\nfunction run(arr, str) {\n\tlet i=0, tmp, beg='', end='';\n\tfor (; i < arr.length; i++) {\n\t\ttmp = arr[i];\n\t\tbeg += tmp.open;\n\t\tend += tmp.close;\n\t\tif (str.includes(tmp.close)) {\n\t\t\tstr = str.replace(tmp.rgx, tmp.close + tmp.open);\n\t\t}\n\t}\n\treturn beg + str + end;\n}\n\nfunction chain(has, keys) {\n\tlet ctx = { has, keys };\n\n\tctx.reset = $.reset.bind(ctx);\n\tctx.bold = $.bold.bind(ctx);\n\tctx.dim = $.dim.bind(ctx);\n\tctx.italic = $.italic.bind(ctx);\n\tctx.underline = $.underline.bind(ctx);\n\tctx.inverse = $.inverse.bind(ctx);\n\tctx.hidden = $.hidden.bind(ctx);\n\tctx.strikethrough = $.strikethrough.bind(ctx);\n\n\tctx.black = $.black.bind(ctx);\n\tctx.red = $.red.bind(ctx);\n\tctx.green = $.green.bind(ctx);\n\tctx.yellow = $.yellow.bind(ctx);\n\tctx.blue = $.blue.bind(ctx);\n\tctx.magenta = $.magenta.bind(ctx);\n\tctx.cyan = $.cyan.bind(ctx);\n\tctx.white = $.white.bind(ctx);\n\tctx.gray = $.gray.bind(ctx);\n\tctx.grey = $.grey.bind(ctx);\n\n\tctx.bgBlack = $.bgBlack.bind(ctx);\n\tctx.bgRed = $.bgRed.bind(ctx);\n\tctx.bgGreen = $.bgGreen.bind(ctx);\n\tctx.bgYellow = $.bgYellow.bind(ctx);\n\tctx.bgBlue = $.bgBlue.bind(ctx);\n\tctx.bgMagenta = $.bgMagenta.bind(ctx);\n\tctx.bgCyan = $.bgCyan.bind(ctx);\n\tctx.bgWhite = $.bgWhite.bind(ctx);\n\n\treturn ctx;\n}\n\nfunction init(open, close) {\n\tlet blk = {\n\t\topen: `\\x1b[${open}m`,\n\t\tclose: `\\x1b[${close}m`,\n\t\trgx: new RegExp(`\\\\x1b\\\\[${close}m`, 'g')\n\t};\n\treturn function (txt) {\n\t\tif (this !== void 0 && this.has !== void 0) {\n\t\t\tthis.has.includes(open) || (this.has.push(open),this.keys.push(blk));\n\t\t\treturn txt === void 0 ? this : $.enabled ? run(this.keys, txt+'') : txt+'';\n\t\t}\n\t\treturn txt === void 0 ? chain([open], [blk]) : $.enabled ? run([blk], txt+'') : txt+'';\n\t};\n}\n\nmodule.exports = $;\n","'use strict';\n\nmodule.exports = (key, isSelect) => {\n if (key.meta && key.name !== 'escape') return;\n\n if (key.ctrl) {\n if (key.name === 'a') return 'first';\n if (key.name === 'c') return 'abort';\n if (key.name === 'd') return 'abort';\n if (key.name === 'e') return 'last';\n if (key.name === 'g') return 'reset';\n }\n\n if (isSelect) {\n if (key.name === 'j') return 'down';\n if (key.name === 'k') return 'up';\n }\n\n if (key.name === 'return') return 'submit';\n if (key.name === 'enter') return 'submit'; // ctrl + J\n\n if (key.name === 'backspace') return 'delete';\n if (key.name === 'delete') return 'deleteForward';\n if (key.name === 'abort') return 'abort';\n if (key.name === 'escape') return 'exit';\n if (key.name === 'tab') return 'next';\n if (key.name === 'pagedown') return 'nextPage';\n if (key.name === 'pageup') return 'prevPage'; // TODO create home() in prompt types (e.g. TextPrompt)\n\n if (key.name === 'home') return 'home'; // TODO create end() in prompt types (e.g. TextPrompt)\n\n if (key.name === 'end') return 'end';\n if (key.name === 'up') return 'up';\n if (key.name === 'down') return 'down';\n if (key.name === 'right') return 'right';\n if (key.name === 'left') return 'left';\n return false;\n};","'use strict';\n\nmodule.exports = str => {\n const pattern = ['[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)', '(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PRZcf-ntqry=><~]))'].join('|');\n const RGX = new RegExp(pattern, 'g');\n return typeof str === 'string' ? str.replace(RGX, '') : str;\n};","'use strict';\n\nconst ESC = '\\x1B';\nconst CSI = `${ESC}[`;\nconst beep = '\\u0007';\n\nconst cursor = {\n to(x, y) {\n if (!y) return `${CSI}${x + 1}G`;\n return `${CSI}${y + 1};${x + 1}H`;\n },\n move(x, y) {\n let ret = '';\n\n if (x < 0) ret += `${CSI}${-x}D`;\n else if (x > 0) ret += `${CSI}${x}C`;\n\n if (y < 0) ret += `${CSI}${-y}A`;\n else if (y > 0) ret += `${CSI}${y}B`;\n\n return ret;\n },\n up: (count = 1) => `${CSI}${count}A`,\n down: (count = 1) => `${CSI}${count}B`,\n forward: (count = 1) => `${CSI}${count}C`,\n backward: (count = 1) => `${CSI}${count}D`,\n nextLine: (count = 1) => `${CSI}E`.repeat(count),\n prevLine: (count = 1) => `${CSI}F`.repeat(count),\n left: `${CSI}G`,\n hide: `${CSI}?25l`,\n show: `${CSI}?25h`,\n save: `${ESC}7`,\n restore: `${ESC}8`\n}\n\nconst scroll = {\n up: (count = 1) => `${CSI}S`.repeat(count),\n down: (count = 1) => `${CSI}T`.repeat(count)\n}\n\nconst erase = {\n screen: `${CSI}2J`,\n up: (count = 1) => `${CSI}1J`.repeat(count),\n down: (count = 1) => `${CSI}J`.repeat(count),\n line: `${CSI}2K`,\n lineEnd: `${CSI}K`,\n lineStart: `${CSI}1K`,\n lines(count) {\n let clear = '';\n for (let i = 0; i < count; i++)\n clear += this.line + (i < count - 1 ? cursor.up() : '');\n if (count)\n clear += cursor.left;\n return clear;\n }\n}\n\nmodule.exports = { cursor, scroll, erase, beep };\n","'use strict';\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nconst strip = require('./strip');\n\nconst _require = require('sisteransi'),\n erase = _require.erase,\n cursor = _require.cursor;\n\nconst width = str => [...strip(str)].length;\n/**\n * @param {string} prompt\n * @param {number} perLine\n */\n\n\nmodule.exports = function (prompt, perLine) {\n if (!perLine) return erase.line + cursor.to(0);\n let rows = 0;\n const lines = prompt.split(/\\r?\\n/);\n\n var _iterator = _createForOfIteratorHelper(lines),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n let line = _step.value;\n rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / perLine);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return erase.lines(rows);\n};","'use strict';\n\nconst main = {\n arrowUp: '↑',\n arrowDown: '↓',\n arrowLeft: '←',\n arrowRight: '→',\n radioOn: '◉',\n radioOff: '◯',\n tick: '✔',\n cross: '✖',\n ellipsis: '…',\n pointerSmall: '›',\n line: '─',\n pointer: '❯'\n};\nconst win = {\n arrowUp: main.arrowUp,\n arrowDown: main.arrowDown,\n arrowLeft: main.arrowLeft,\n arrowRight: main.arrowRight,\n radioOn: '(*)',\n radioOff: '( )',\n tick: '√',\n cross: '×',\n ellipsis: '...',\n pointerSmall: '»',\n line: '─',\n pointer: '>'\n};\nconst figures = process.platform === 'win32' ? win : main;\nmodule.exports = figures;","'use strict';\n\nconst c = require('kleur');\n\nconst figures = require('./figures'); // rendering user input.\n\n\nconst styles = Object.freeze({\n password: {\n scale: 1,\n render: input => '*'.repeat(input.length)\n },\n emoji: {\n scale: 2,\n render: input => '😃'.repeat(input.length)\n },\n invisible: {\n scale: 0,\n render: input => ''\n },\n default: {\n scale: 1,\n render: input => `${input}`\n }\n});\n\nconst render = type => styles[type] || styles.default; // icon to signalize a prompt.\n\n\nconst symbols = Object.freeze({\n aborted: c.red(figures.cross),\n done: c.green(figures.tick),\n exited: c.yellow(figures.cross),\n default: c.cyan('?')\n});\n\nconst symbol = (done, aborted, exited) => aborted ? symbols.aborted : exited ? symbols.exited : done ? symbols.done : symbols.default; // between the question and the user's input.\n\n\nconst delimiter = completing => c.gray(completing ? figures.ellipsis : figures.pointerSmall);\n\nconst item = (expandable, expanded) => c.gray(expandable ? expanded ? figures.pointerSmall : '+' : figures.line);\n\nmodule.exports = {\n styles,\n render,\n symbols,\n symbol,\n delimiter,\n item\n};","'use strict';\n\nconst strip = require('./strip');\n/**\n * @param {string} msg\n * @param {number} perLine\n */\n\n\nmodule.exports = function (msg, perLine) {\n let lines = String(strip(msg) || '').split(/\\r?\\n/);\n if (!perLine) return lines.length;\n return lines.map(l => Math.ceil(l.length / perLine)).reduce((a, b) => a + b);\n};","'use strict';\n/**\n * @param {string} msg The message to wrap\n * @param {object} opts\n * @param {number|string} [opts.margin] Left margin\n * @param {number} opts.width Maximum characters per line including the margin\n */\n\nmodule.exports = (msg, opts = {}) => {\n const tab = Number.isSafeInteger(parseInt(opts.margin)) ? new Array(parseInt(opts.margin)).fill(' ').join('') : opts.margin || '';\n const width = opts.width;\n return (msg || '').split(/\\r?\\n/g).map(line => line.split(/\\s+/g).reduce((arr, w) => {\n if (w.length + tab.length >= width || arr[arr.length - 1].length + w.length + 1 < width) arr[arr.length - 1] += ` ${w}`;else arr.push(`${tab}${w}`);\n return arr;\n }, [tab]).join('\\n')).join('\\n');\n};","'use strict';\n/**\n * Determine what entries should be displayed on the screen, based on the\n * currently selected index and the maximum visible. Used in list-based\n * prompts like `select` and `multiselect`.\n *\n * @param {number} cursor the currently selected entry\n * @param {number} total the total entries available to display\n * @param {number} [maxVisible] the number of entries that can be displayed\n */\n\nmodule.exports = (cursor, total, maxVisible) => {\n maxVisible = maxVisible || total;\n let startIndex = Math.min(total - maxVisible, cursor - Math.floor(maxVisible / 2));\n if (startIndex < 0) startIndex = 0;\n let endIndex = Math.min(startIndex + maxVisible, total);\n return {\n startIndex,\n endIndex\n };\n};","'use strict';\n\nmodule.exports = {\n action: require('./action'),\n clear: require('./clear'),\n style: require('./style'),\n strip: require('./strip'),\n figures: require('./figures'),\n lines: require('./lines'),\n wrap: require('./wrap'),\n entriesToDisplay: require('./entriesToDisplay')\n};","'use strict';\n\nconst readline = require('readline');\n\nconst _require = require('../util'),\n action = _require.action;\n\nconst EventEmitter = require('events');\n\nconst _require2 = require('sisteransi'),\n beep = _require2.beep,\n cursor = _require2.cursor;\n\nconst color = require('kleur');\n/**\n * Base prompt skeleton\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\n\n\nclass Prompt extends EventEmitter {\n constructor(opts = {}) {\n super();\n this.firstRender = true;\n this.in = opts.stdin || process.stdin;\n this.out = opts.stdout || process.stdout;\n\n this.onRender = (opts.onRender || (() => void 0)).bind(this);\n\n const rl = readline.createInterface({\n input: this.in,\n escapeCodeTimeout: 50\n });\n readline.emitKeypressEvents(this.in, rl);\n if (this.in.isTTY) this.in.setRawMode(true);\n const isSelect = ['SelectPrompt', 'MultiselectPrompt'].indexOf(this.constructor.name) > -1;\n\n const keypress = (str, key) => {\n let a = action(key, isSelect);\n\n if (a === false) {\n this._ && this._(str, key);\n } else if (typeof this[a] === 'function') {\n this[a](key);\n } else {\n this.bell();\n }\n };\n\n this.close = () => {\n this.out.write(cursor.show);\n this.in.removeListener('keypress', keypress);\n if (this.in.isTTY) this.in.setRawMode(false);\n rl.close();\n this.emit(this.aborted ? 'abort' : this.exited ? 'exit' : 'submit', this.value);\n this.closed = true;\n };\n\n this.in.on('keypress', keypress);\n }\n\n fire() {\n this.emit('state', {\n value: this.value,\n aborted: !!this.aborted,\n exited: !!this.exited\n });\n }\n\n bell() {\n this.out.write(beep);\n }\n\n render() {\n this.onRender(color);\n if (this.firstRender) this.firstRender = false;\n }\n\n}\n\nmodule.exports = Prompt;","\"use strict\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nconst color = require('kleur');\n\nconst Prompt = require('./prompt');\n\nconst _require = require('sisteransi'),\n erase = _require.erase,\n cursor = _require.cursor;\n\nconst _require2 = require('../util'),\n style = _require2.style,\n clear = _require2.clear,\n lines = _require2.lines,\n figures = _require2.figures;\n/**\n * TextPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {String} [opts.style='default'] Render style\n * @param {String} [opts.initial] Default value\n * @param {Function} [opts.validate] Validate function\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.error] The invalid error label\n */\n\n\nclass TextPrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.transform = style.render(opts.style);\n this.scale = this.transform.scale;\n this.msg = opts.message;\n this.initial = opts.initial || ``;\n\n this.validator = opts.validate || (() => true);\n\n this.value = ``;\n this.errorMsg = opts.error || `Please Enter A Valid Value`;\n this.cursor = Number(!!this.initial);\n this.cursorOffset = 0;\n this.clear = clear(``, this.out.columns);\n this.render();\n }\n\n set value(v) {\n if (!v && this.initial) {\n this.placeholder = true;\n this.rendered = color.gray(this.transform.render(this.initial));\n } else {\n this.placeholder = false;\n this.rendered = this.transform.render(v);\n }\n\n this._value = v;\n this.fire();\n }\n\n get value() {\n return this._value;\n }\n\n reset() {\n this.value = ``;\n this.cursor = Number(!!this.initial);\n this.cursorOffset = 0;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.value = this.value || this.initial;\n this.done = this.aborted = true;\n this.error = false;\n this.red = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n validate() {\n var _this = this;\n\n return _asyncToGenerator(function* () {\n let valid = yield _this.validator(_this.value);\n\n if (typeof valid === `string`) {\n _this.errorMsg = valid;\n valid = false;\n }\n\n _this.error = !valid;\n })();\n }\n\n submit() {\n var _this2 = this;\n\n return _asyncToGenerator(function* () {\n _this2.value = _this2.value || _this2.initial;\n _this2.cursorOffset = 0;\n _this2.cursor = _this2.rendered.length;\n yield _this2.validate();\n\n if (_this2.error) {\n _this2.red = true;\n\n _this2.fire();\n\n _this2.render();\n\n return;\n }\n\n _this2.done = true;\n _this2.aborted = false;\n\n _this2.fire();\n\n _this2.render();\n\n _this2.out.write('\\n');\n\n _this2.close();\n })();\n }\n\n next() {\n if (!this.placeholder) return this.bell();\n this.value = this.initial;\n this.cursor = this.rendered.length;\n this.fire();\n this.render();\n }\n\n moveCursor(n) {\n if (this.placeholder) return;\n this.cursor = this.cursor + n;\n this.cursorOffset += n;\n }\n\n _(c, key) {\n let s1 = this.value.slice(0, this.cursor);\n let s2 = this.value.slice(this.cursor);\n this.value = `${s1}${c}${s2}`;\n this.red = false;\n this.cursor = this.placeholder ? 0 : s1.length + 1;\n this.render();\n }\n\n delete() {\n if (this.isCursorAtStart()) return this.bell();\n let s1 = this.value.slice(0, this.cursor - 1);\n let s2 = this.value.slice(this.cursor);\n this.value = `${s1}${s2}`;\n this.red = false;\n\n if (this.isCursorAtStart()) {\n this.cursorOffset = 0;\n } else {\n this.cursorOffset++;\n this.moveCursor(-1);\n }\n\n this.render();\n }\n\n deleteForward() {\n if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell();\n let s1 = this.value.slice(0, this.cursor);\n let s2 = this.value.slice(this.cursor + 1);\n this.value = `${s1}${s2}`;\n this.red = false;\n\n if (this.isCursorAtEnd()) {\n this.cursorOffset = 0;\n } else {\n this.cursorOffset++;\n }\n\n this.render();\n }\n\n first() {\n this.cursor = 0;\n this.render();\n }\n\n last() {\n this.cursor = this.value.length;\n this.render();\n }\n\n left() {\n if (this.cursor <= 0 || this.placeholder) return this.bell();\n this.moveCursor(-1);\n this.render();\n }\n\n right() {\n if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell();\n this.moveCursor(1);\n this.render();\n }\n\n isCursorAtStart() {\n return this.cursor === 0 || this.placeholder && this.cursor === 1;\n }\n\n isCursorAtEnd() {\n return this.cursor === this.rendered.length || this.placeholder && this.cursor === this.rendered.length + 1;\n }\n\n render() {\n if (this.closed) return;\n\n if (!this.firstRender) {\n if (this.outputError) this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));\n this.out.write(clear(this.outputText, this.out.columns));\n }\n\n super.render();\n this.outputError = '';\n this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.red ? color.red(this.rendered) : this.rendered].join(` `);\n\n if (this.error) {\n this.outputError += this.errorMsg.split(`\\n`).reduce((a, l, i) => a + `\\n${i ? ' ' : figures.pointerSmall} ${color.red().italic(l)}`, ``);\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0));\n }\n\n}\n\nmodule.exports = TextPrompt;","'use strict';\n\nconst color = require('kleur');\n\nconst Prompt = require('./prompt');\n\nconst _require = require('../util'),\n style = _require.style,\n clear = _require.clear,\n figures = _require.figures,\n wrap = _require.wrap,\n entriesToDisplay = _require.entriesToDisplay;\n\nconst _require2 = require('sisteransi'),\n cursor = _require2.cursor;\n/**\n * SelectPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of choice objects\n * @param {String} [opts.hint] Hint to display\n * @param {Number} [opts.initial] Index of default value\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {Number} [opts.optionsPerPage=10] Max options to display at once\n */\n\n\nclass SelectPrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.msg = opts.message;\n this.hint = opts.hint || '- Use arrow-keys. Return to submit.';\n this.warn = opts.warn || '- This option is disabled';\n this.cursor = opts.initial || 0;\n this.choices = opts.choices.map((ch, idx) => {\n if (typeof ch === 'string') ch = {\n title: ch,\n value: idx\n };\n return {\n title: ch && (ch.title || ch.value || ch),\n value: ch && (ch.value === undefined ? idx : ch.value),\n description: ch && ch.description,\n selected: ch && ch.selected,\n disabled: ch && ch.disabled\n };\n });\n this.optionsPerPage = opts.optionsPerPage || 10;\n this.value = (this.choices[this.cursor] || {}).value;\n this.clear = clear('', this.out.columns);\n this.render();\n }\n\n moveCursor(n) {\n this.cursor = n;\n this.value = this.choices[n].value;\n this.fire();\n }\n\n reset() {\n this.moveCursor(0);\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n if (!this.selection.disabled) {\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n } else this.bell();\n }\n\n first() {\n this.moveCursor(0);\n this.render();\n }\n\n last() {\n this.moveCursor(this.choices.length - 1);\n this.render();\n }\n\n up() {\n if (this.cursor === 0) {\n this.moveCursor(this.choices.length - 1);\n } else {\n this.moveCursor(this.cursor - 1);\n }\n\n this.render();\n }\n\n down() {\n if (this.cursor === this.choices.length - 1) {\n this.moveCursor(0);\n } else {\n this.moveCursor(this.cursor + 1);\n }\n\n this.render();\n }\n\n next() {\n this.moveCursor((this.cursor + 1) % this.choices.length);\n this.render();\n }\n\n _(c, key) {\n if (c === ' ') return this.submit();\n }\n\n get selection() {\n return this.choices[this.cursor];\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n\n let _entriesToDisplay = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage),\n startIndex = _entriesToDisplay.startIndex,\n endIndex = _entriesToDisplay.endIndex; // Print prompt\n\n\n this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.done ? this.selection.title : this.selection.disabled ? color.yellow(this.warn) : color.gray(this.hint)].join(' '); // Print choices\n\n if (!this.done) {\n this.outputText += '\\n';\n\n for (let i = startIndex; i < endIndex; i++) {\n let title,\n prefix,\n desc = '',\n v = this.choices[i]; // Determine whether to display \"more choices\" indicators\n\n if (i === startIndex && startIndex > 0) {\n prefix = figures.arrowUp;\n } else if (i === endIndex - 1 && endIndex < this.choices.length) {\n prefix = figures.arrowDown;\n } else {\n prefix = ' ';\n }\n\n if (v.disabled) {\n title = this.cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);\n prefix = (this.cursor === i ? color.bold().gray(figures.pointer) + ' ' : ' ') + prefix;\n } else {\n title = this.cursor === i ? color.cyan().underline(v.title) : v.title;\n prefix = (this.cursor === i ? color.cyan(figures.pointer) + ' ' : ' ') + prefix;\n\n if (v.description && this.cursor === i) {\n desc = ` - ${v.description}`;\n\n if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\\r?\\n/).length > 1) {\n desc = '\\n' + wrap(v.description, {\n margin: 3,\n width: this.out.columns\n });\n }\n }\n }\n\n this.outputText += `${prefix} ${title}${color.gray(desc)}\\n`;\n }\n }\n\n this.out.write(this.outputText);\n }\n\n}\n\nmodule.exports = SelectPrompt;","\"use strict\";\n\nconst color = require('kleur');\n\nconst Prompt = require('./prompt');\n\nconst _require = require('../util'),\n style = _require.style,\n clear = _require.clear;\n\nconst _require2 = require('sisteransi'),\n cursor = _require2.cursor,\n erase = _require2.erase;\n/**\n * TogglePrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Boolean} [opts.initial=false] Default value\n * @param {String} [opts.active='no'] Active label\n * @param {String} [opts.inactive='off'] Inactive label\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\n\n\nclass TogglePrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.msg = opts.message;\n this.value = !!opts.initial;\n this.active = opts.active || 'on';\n this.inactive = opts.inactive || 'off';\n this.initialValue = this.value;\n this.render();\n }\n\n reset() {\n this.value = this.initialValue;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n deactivate() {\n if (this.value === false) return this.bell();\n this.value = false;\n this.render();\n }\n\n activate() {\n if (this.value === true) return this.bell();\n this.value = true;\n this.render();\n }\n\n delete() {\n this.deactivate();\n }\n\n left() {\n this.deactivate();\n }\n\n right() {\n this.activate();\n }\n\n down() {\n this.deactivate();\n }\n\n up() {\n this.activate();\n }\n\n next() {\n this.value = !this.value;\n this.fire();\n this.render();\n }\n\n _(c, key) {\n if (c === ' ') {\n this.value = !this.value;\n } else if (c === '1') {\n this.value = true;\n } else if (c === '0') {\n this.value = false;\n } else return this.bell();\n\n this.render();\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.value ? this.inactive : color.cyan().underline(this.inactive), color.gray('/'), this.value ? color.cyan().underline(this.active) : this.active].join(' ');\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n\n}\n\nmodule.exports = TogglePrompt;","'use strict';\n\nclass DatePart {\n constructor({\n token,\n date,\n parts,\n locales\n }) {\n this.token = token;\n this.date = date || new Date();\n this.parts = parts || [this];\n this.locales = locales || {};\n }\n\n up() {}\n\n down() {}\n\n next() {\n const currentIdx = this.parts.indexOf(this);\n return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);\n }\n\n setTo(val) {}\n\n prev() {\n let parts = [].concat(this.parts).reverse();\n const currentIdx = parts.indexOf(this);\n return parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);\n }\n\n toString() {\n return String(this.date);\n }\n\n}\n\nmodule.exports = DatePart;","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Meridiem extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setHours((this.date.getHours() + 12) % 24);\n }\n\n down() {\n this.up();\n }\n\n toString() {\n let meridiem = this.date.getHours() > 12 ? 'pm' : 'am';\n return /\\A/.test(this.token) ? meridiem.toUpperCase() : meridiem;\n }\n\n}\n\nmodule.exports = Meridiem;","'use strict';\n\nconst DatePart = require('./datepart');\n\nconst pos = n => {\n n = n % 10;\n return n === 1 ? 'st' : n === 2 ? 'nd' : n === 3 ? 'rd' : 'th';\n};\n\nclass Day extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setDate(this.date.getDate() + 1);\n }\n\n down() {\n this.date.setDate(this.date.getDate() - 1);\n }\n\n setTo(val) {\n this.date.setDate(parseInt(val.substr(-2)));\n }\n\n toString() {\n let date = this.date.getDate();\n let day = this.date.getDay();\n return this.token === 'DD' ? String(date).padStart(2, '0') : this.token === 'Do' ? date + pos(date) : this.token === 'd' ? day + 1 : this.token === 'ddd' ? this.locales.weekdaysShort[day] : this.token === 'dddd' ? this.locales.weekdays[day] : date;\n }\n\n}\n\nmodule.exports = Day;","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Hours extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setHours(this.date.getHours() + 1);\n }\n\n down() {\n this.date.setHours(this.date.getHours() - 1);\n }\n\n setTo(val) {\n this.date.setHours(parseInt(val.substr(-2)));\n }\n\n toString() {\n let hours = this.date.getHours();\n if (/h/.test(this.token)) hours = hours % 12 || 12;\n return this.token.length > 1 ? String(hours).padStart(2, '0') : hours;\n }\n\n}\n\nmodule.exports = Hours;","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Milliseconds extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setMilliseconds(this.date.getMilliseconds() + 1);\n }\n\n down() {\n this.date.setMilliseconds(this.date.getMilliseconds() - 1);\n }\n\n setTo(val) {\n this.date.setMilliseconds(parseInt(val.substr(-this.token.length)));\n }\n\n toString() {\n return String(this.date.getMilliseconds()).padStart(4, '0').substr(0, this.token.length);\n }\n\n}\n\nmodule.exports = Milliseconds;","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Minutes extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setMinutes(this.date.getMinutes() + 1);\n }\n\n down() {\n this.date.setMinutes(this.date.getMinutes() - 1);\n }\n\n setTo(val) {\n this.date.setMinutes(parseInt(val.substr(-2)));\n }\n\n toString() {\n let m = this.date.getMinutes();\n return this.token.length > 1 ? String(m).padStart(2, '0') : m;\n }\n\n}\n\nmodule.exports = Minutes;","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Month extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setMonth(this.date.getMonth() + 1);\n }\n\n down() {\n this.date.setMonth(this.date.getMonth() - 1);\n }\n\n setTo(val) {\n val = parseInt(val.substr(-2)) - 1;\n this.date.setMonth(val < 0 ? 0 : val);\n }\n\n toString() {\n let month = this.date.getMonth();\n let tl = this.token.length;\n return tl === 2 ? String(month + 1).padStart(2, '0') : tl === 3 ? this.locales.monthsShort[month] : tl === 4 ? this.locales.months[month] : String(month + 1);\n }\n\n}\n\nmodule.exports = Month;","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Seconds extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setSeconds(this.date.getSeconds() + 1);\n }\n\n down() {\n this.date.setSeconds(this.date.getSeconds() - 1);\n }\n\n setTo(val) {\n this.date.setSeconds(parseInt(val.substr(-2)));\n }\n\n toString() {\n let s = this.date.getSeconds();\n return this.token.length > 1 ? String(s).padStart(2, '0') : s;\n }\n\n}\n\nmodule.exports = Seconds;","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Year extends DatePart {\n constructor(opts = {}) {\n super(opts);\n }\n\n up() {\n this.date.setFullYear(this.date.getFullYear() + 1);\n }\n\n down() {\n this.date.setFullYear(this.date.getFullYear() - 1);\n }\n\n setTo(val) {\n this.date.setFullYear(val.substr(-4));\n }\n\n toString() {\n let year = String(this.date.getFullYear()).padStart(4, '0');\n return this.token.length === 2 ? year.substr(-2) : year;\n }\n\n}\n\nmodule.exports = Year;","'use strict';\n\nmodule.exports = {\n DatePart: require('./datepart'),\n Meridiem: require('./meridiem'),\n Day: require('./day'),\n Hours: require('./hours'),\n Milliseconds: require('./milliseconds'),\n Minutes: require('./minutes'),\n Month: require('./month'),\n Seconds: require('./seconds'),\n Year: require('./year')\n};","'use strict';\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nconst color = require('kleur');\n\nconst Prompt = require('./prompt');\n\nconst _require = require('../util'),\n style = _require.style,\n clear = _require.clear,\n figures = _require.figures;\n\nconst _require2 = require('sisteransi'),\n erase = _require2.erase,\n cursor = _require2.cursor;\n\nconst _require3 = require('../dateparts'),\n DatePart = _require3.DatePart,\n Meridiem = _require3.Meridiem,\n Day = _require3.Day,\n Hours = _require3.Hours,\n Milliseconds = _require3.Milliseconds,\n Minutes = _require3.Minutes,\n Month = _require3.Month,\n Seconds = _require3.Seconds,\n Year = _require3.Year;\n\nconst regex = /\\\\(.)|\"((?:\\\\[\"\\\\]|[^\"])+)\"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;\nconst regexGroups = {\n 1: ({\n token\n }) => token.replace(/\\\\(.)/g, '$1'),\n 2: opts => new Day(opts),\n // Day // TODO\n 3: opts => new Month(opts),\n // Month\n 4: opts => new Year(opts),\n // Year\n 5: opts => new Meridiem(opts),\n // AM/PM // TODO (special)\n 6: opts => new Hours(opts),\n // Hours\n 7: opts => new Minutes(opts),\n // Minutes\n 8: opts => new Seconds(opts),\n // Seconds\n 9: opts => new Milliseconds(opts) // Fractional seconds\n\n};\nconst dfltLocales = {\n months: 'January,February,March,April,May,June,July,August,September,October,November,December'.split(','),\n monthsShort: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),\n weekdays: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),\n weekdaysShort: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(',')\n};\n/**\n * DatePrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Number} [opts.initial] Index of default value\n * @param {String} [opts.mask] The format mask\n * @param {object} [opts.locales] The date locales\n * @param {String} [opts.error] The error message shown on invalid value\n * @param {Function} [opts.validate] Function to validate the submitted value\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\n\nclass DatePrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.msg = opts.message;\n this.cursor = 0;\n this.typed = '';\n this.locales = Object.assign(dfltLocales, opts.locales);\n this._date = opts.initial || new Date();\n this.errorMsg = opts.error || 'Please Enter A Valid Value';\n\n this.validator = opts.validate || (() => true);\n\n this.mask = opts.mask || 'YYYY-MM-DD HH:mm:ss';\n this.clear = clear('', this.out.columns);\n this.render();\n }\n\n get value() {\n return this.date;\n }\n\n get date() {\n return this._date;\n }\n\n set date(date) {\n if (date) this._date.setTime(date.getTime());\n }\n\n set mask(mask) {\n let result;\n this.parts = [];\n\n while (result = regex.exec(mask)) {\n let match = result.shift();\n let idx = result.findIndex(gr => gr != null);\n this.parts.push(idx in regexGroups ? regexGroups[idx]({\n token: result[idx] || match,\n date: this.date,\n parts: this.parts,\n locales: this.locales\n }) : result[idx] || match);\n }\n\n let parts = this.parts.reduce((arr, i) => {\n if (typeof i === 'string' && typeof arr[arr.length - 1] === 'string') arr[arr.length - 1] += i;else arr.push(i);\n return arr;\n }, []);\n this.parts.splice(0);\n this.parts.push(...parts);\n this.reset();\n }\n\n moveCursor(n) {\n this.typed = '';\n this.cursor = n;\n this.fire();\n }\n\n reset() {\n this.moveCursor(this.parts.findIndex(p => p instanceof DatePart));\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.error = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n validate() {\n var _this = this;\n\n return _asyncToGenerator(function* () {\n let valid = yield _this.validator(_this.value);\n\n if (typeof valid === 'string') {\n _this.errorMsg = valid;\n valid = false;\n }\n\n _this.error = !valid;\n })();\n }\n\n submit() {\n var _this2 = this;\n\n return _asyncToGenerator(function* () {\n yield _this2.validate();\n\n if (_this2.error) {\n _this2.color = 'red';\n\n _this2.fire();\n\n _this2.render();\n\n return;\n }\n\n _this2.done = true;\n _this2.aborted = false;\n\n _this2.fire();\n\n _this2.render();\n\n _this2.out.write('\\n');\n\n _this2.close();\n })();\n }\n\n up() {\n this.typed = '';\n this.parts[this.cursor].up();\n this.render();\n }\n\n down() {\n this.typed = '';\n this.parts[this.cursor].down();\n this.render();\n }\n\n left() {\n let prev = this.parts[this.cursor].prev();\n if (prev == null) return this.bell();\n this.moveCursor(this.parts.indexOf(prev));\n this.render();\n }\n\n right() {\n let next = this.parts[this.cursor].next();\n if (next == null) return this.bell();\n this.moveCursor(this.parts.indexOf(next));\n this.render();\n }\n\n next() {\n let next = this.parts[this.cursor].next();\n this.moveCursor(next ? this.parts.indexOf(next) : this.parts.findIndex(part => part instanceof DatePart));\n this.render();\n }\n\n _(c) {\n if (/\\d/.test(c)) {\n this.typed += c;\n this.parts[this.cursor].setTo(this.typed);\n this.render();\n }\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns));\n super.render(); // Print prompt\n\n this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), []).join('')].join(' '); // Print error\n\n if (this.error) {\n this.outputText += this.errorMsg.split('\\n').reduce((a, l, i) => a + `\\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n\n}\n\nmodule.exports = DatePrompt;","\"use strict\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nconst color = require('kleur');\n\nconst Prompt = require('./prompt');\n\nconst _require = require('sisteransi'),\n cursor = _require.cursor,\n erase = _require.erase;\n\nconst _require2 = require('../util'),\n style = _require2.style,\n figures = _require2.figures,\n clear = _require2.clear,\n lines = _require2.lines;\n\nconst isNumber = /[0-9]/;\n\nconst isDef = any => any !== undefined;\n\nconst round = (number, precision) => {\n let factor = Math.pow(10, precision);\n return Math.round(number * factor) / factor;\n};\n/**\n * NumberPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {String} [opts.style='default'] Render style\n * @param {Number} [opts.initial] Default value\n * @param {Number} [opts.max=+Infinity] Max value\n * @param {Number} [opts.min=-Infinity] Min value\n * @param {Boolean} [opts.float=false] Parse input as floats\n * @param {Number} [opts.round=2] Round floats to x decimals\n * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys\n * @param {Function} [opts.validate] Validate function\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.error] The invalid error label\n */\n\n\nclass NumberPrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.transform = style.render(opts.style);\n this.msg = opts.message;\n this.initial = isDef(opts.initial) ? opts.initial : '';\n this.float = !!opts.float;\n this.round = opts.round || 2;\n this.inc = opts.increment || 1;\n this.min = isDef(opts.min) ? opts.min : -Infinity;\n this.max = isDef(opts.max) ? opts.max : Infinity;\n this.errorMsg = opts.error || `Please Enter A Valid Value`;\n\n this.validator = opts.validate || (() => true);\n\n this.color = `cyan`;\n this.value = ``;\n this.typed = ``;\n this.lastHit = 0;\n this.render();\n }\n\n set value(v) {\n if (!v && v !== 0) {\n this.placeholder = true;\n this.rendered = color.gray(this.transform.render(`${this.initial}`));\n this._value = ``;\n } else {\n this.placeholder = false;\n this.rendered = this.transform.render(`${round(v, this.round)}`);\n this._value = round(v, this.round);\n }\n\n this.fire();\n }\n\n get value() {\n return this._value;\n }\n\n parse(x) {\n return this.float ? parseFloat(x) : parseInt(x);\n }\n\n valid(c) {\n return c === `-` || c === `.` && this.float || isNumber.test(c);\n }\n\n reset() {\n this.typed = ``;\n this.value = ``;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n let x = this.value;\n this.value = x !== `` ? x : this.initial;\n this.done = this.aborted = true;\n this.error = false;\n this.fire();\n this.render();\n this.out.write(`\\n`);\n this.close();\n }\n\n validate() {\n var _this = this;\n\n return _asyncToGenerator(function* () {\n let valid = yield _this.validator(_this.value);\n\n if (typeof valid === `string`) {\n _this.errorMsg = valid;\n valid = false;\n }\n\n _this.error = !valid;\n })();\n }\n\n submit() {\n var _this2 = this;\n\n return _asyncToGenerator(function* () {\n yield _this2.validate();\n\n if (_this2.error) {\n _this2.color = `red`;\n\n _this2.fire();\n\n _this2.render();\n\n return;\n }\n\n let x = _this2.value;\n _this2.value = x !== `` ? x : _this2.initial;\n _this2.done = true;\n _this2.aborted = false;\n _this2.error = false;\n\n _this2.fire();\n\n _this2.render();\n\n _this2.out.write(`\\n`);\n\n _this2.close();\n })();\n }\n\n up() {\n this.typed = ``;\n\n if (this.value === '') {\n this.value = this.min - this.inc;\n }\n\n if (this.value >= this.max) return this.bell();\n this.value += this.inc;\n this.color = `cyan`;\n this.fire();\n this.render();\n }\n\n down() {\n this.typed = ``;\n\n if (this.value === '') {\n this.value = this.min + this.inc;\n }\n\n if (this.value <= this.min) return this.bell();\n this.value -= this.inc;\n this.color = `cyan`;\n this.fire();\n this.render();\n }\n\n delete() {\n let val = this.value.toString();\n if (val.length === 0) return this.bell();\n this.value = this.parse(val = val.slice(0, -1)) || ``;\n\n if (this.value !== '' && this.value < this.min) {\n this.value = this.min;\n }\n\n this.color = `cyan`;\n this.fire();\n this.render();\n }\n\n next() {\n this.value = this.initial;\n this.fire();\n this.render();\n }\n\n _(c, key) {\n if (!this.valid(c)) return this.bell();\n const now = Date.now();\n if (now - this.lastHit > 1000) this.typed = ``; // 1s elapsed\n\n this.typed += c;\n this.lastHit = now;\n this.color = `cyan`;\n if (c === `.`) return this.fire();\n this.value = Math.min(this.parse(this.typed), this.max);\n if (this.value > this.max) this.value = this.max;\n if (this.value < this.min) this.value = this.min;\n this.fire();\n this.render();\n }\n\n render() {\n if (this.closed) return;\n\n if (!this.firstRender) {\n if (this.outputError) this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));\n this.out.write(clear(this.outputText, this.out.columns));\n }\n\n super.render();\n this.outputError = ''; // Print prompt\n\n this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), !this.done || !this.done && !this.placeholder ? color[this.color]().underline(this.rendered) : this.rendered].join(` `); // Print error\n\n if (this.error) {\n this.outputError += this.errorMsg.split(`\\n`).reduce((a, l, i) => a + `\\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore);\n }\n\n}\n\nmodule.exports = NumberPrompt;","'use strict';\n\nconst color = require('kleur');\n\nconst _require = require('sisteransi'),\n cursor = _require.cursor;\n\nconst Prompt = require('./prompt');\n\nconst _require2 = require('../util'),\n clear = _require2.clear,\n figures = _require2.figures,\n style = _require2.style,\n wrap = _require2.wrap,\n entriesToDisplay = _require2.entriesToDisplay;\n/**\n * MultiselectPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of choice objects\n * @param {String} [opts.hint] Hint to display\n * @param {String} [opts.warn] Hint shown for disabled choices\n * @param {Number} [opts.max] Max choices\n * @param {Number} [opts.cursor=0] Cursor start position\n * @param {Number} [opts.optionsPerPage=10] Max options to display at once\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\n\n\nclass MultiselectPrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.msg = opts.message;\n this.cursor = opts.cursor || 0;\n this.scrollIndex = opts.cursor || 0;\n this.hint = opts.hint || '';\n this.warn = opts.warn || '- This option is disabled -';\n this.minSelected = opts.min;\n this.showMinError = false;\n this.maxChoices = opts.max;\n this.instructions = opts.instructions;\n this.optionsPerPage = opts.optionsPerPage || 10;\n this.value = opts.choices.map((ch, idx) => {\n if (typeof ch === 'string') ch = {\n title: ch,\n value: idx\n };\n return {\n title: ch && (ch.title || ch.value || ch),\n description: ch && ch.description,\n value: ch && (ch.value === undefined ? idx : ch.value),\n selected: ch && ch.selected,\n disabled: ch && ch.disabled\n };\n });\n this.clear = clear('', this.out.columns);\n\n if (!opts.overrideRender) {\n this.render();\n }\n }\n\n reset() {\n this.value.map(v => !v.selected);\n this.cursor = 0;\n this.fire();\n this.render();\n }\n\n selected() {\n return this.value.filter(v => v.selected);\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n const selected = this.value.filter(e => e.selected);\n\n if (this.minSelected && selected.length < this.minSelected) {\n this.showMinError = true;\n this.render();\n } else {\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n }\n\n first() {\n this.cursor = 0;\n this.render();\n }\n\n last() {\n this.cursor = this.value.length - 1;\n this.render();\n }\n\n next() {\n this.cursor = (this.cursor + 1) % this.value.length;\n this.render();\n }\n\n up() {\n if (this.cursor === 0) {\n this.cursor = this.value.length - 1;\n } else {\n this.cursor--;\n }\n\n this.render();\n }\n\n down() {\n if (this.cursor === this.value.length - 1) {\n this.cursor = 0;\n } else {\n this.cursor++;\n }\n\n this.render();\n }\n\n left() {\n this.value[this.cursor].selected = false;\n this.render();\n }\n\n right() {\n if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell();\n this.value[this.cursor].selected = true;\n this.render();\n }\n\n handleSpaceToggle() {\n const v = this.value[this.cursor];\n\n if (v.selected) {\n v.selected = false;\n this.render();\n } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) {\n return this.bell();\n } else {\n v.selected = true;\n this.render();\n }\n }\n\n toggleAll() {\n if (this.maxChoices !== undefined || this.value[this.cursor].disabled) {\n return this.bell();\n }\n\n const newSelected = !this.value[this.cursor].selected;\n this.value.filter(v => !v.disabled).forEach(v => v.selected = newSelected);\n this.render();\n }\n\n _(c, key) {\n if (c === ' ') {\n this.handleSpaceToggle();\n } else if (c === 'a') {\n this.toggleAll();\n } else {\n return this.bell();\n }\n }\n\n renderInstructions() {\n if (this.instructions === undefined || this.instructions) {\n if (typeof this.instructions === 'string') {\n return this.instructions;\n }\n\n return '\\nInstructions:\\n' + ` ${figures.arrowUp}/${figures.arrowDown}: Highlight option\\n` + ` ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection\\n` + (this.maxChoices === undefined ? ` a: Toggle all\\n` : '') + ` enter/return: Complete answer`;\n }\n\n return '';\n }\n\n renderOption(cursor, v, i, arrowIndicator) {\n const prefix = (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + arrowIndicator + ' ';\n let title, desc;\n\n if (v.disabled) {\n title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);\n } else {\n title = cursor === i ? color.cyan().underline(v.title) : v.title;\n\n if (cursor === i && v.description) {\n desc = ` - ${v.description}`;\n\n if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\\r?\\n/).length > 1) {\n desc = '\\n' + wrap(v.description, {\n margin: prefix.length,\n width: this.out.columns\n });\n }\n }\n }\n\n return prefix + title + color.gray(desc || '');\n } // shared with autocompleteMultiselect\n\n\n paginateOptions(options) {\n if (options.length === 0) {\n return color.red('No matches for this query.');\n }\n\n let _entriesToDisplay = entriesToDisplay(this.cursor, options.length, this.optionsPerPage),\n startIndex = _entriesToDisplay.startIndex,\n endIndex = _entriesToDisplay.endIndex;\n\n let prefix,\n styledOptions = [];\n\n for (let i = startIndex; i < endIndex; i++) {\n if (i === startIndex && startIndex > 0) {\n prefix = figures.arrowUp;\n } else if (i === endIndex - 1 && endIndex < options.length) {\n prefix = figures.arrowDown;\n } else {\n prefix = ' ';\n }\n\n styledOptions.push(this.renderOption(this.cursor, options[i], i, prefix));\n }\n\n return '\\n' + styledOptions.join('\\n');\n } // shared with autocomleteMultiselect\n\n\n renderOptions(options) {\n if (!this.done) {\n return this.paginateOptions(options);\n }\n\n return '';\n }\n\n renderDoneOrInstructions() {\n if (this.done) {\n return this.value.filter(e => e.selected).map(v => v.title).join(', ');\n }\n\n const output = [color.gray(this.hint), this.renderInstructions()];\n\n if (this.value[this.cursor].disabled) {\n output.push(color.yellow(this.warn));\n }\n\n return output.join(' ');\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n super.render(); // print prompt\n\n let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(' ');\n\n if (this.showMinError) {\n prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);\n this.showMinError = false;\n }\n\n prompt += this.renderOptions(this.value);\n this.out.write(this.clear + prompt);\n this.clear = clear(prompt, this.out.columns);\n }\n\n}\n\nmodule.exports = MultiselectPrompt;","'use strict';\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nconst color = require('kleur');\n\nconst Prompt = require('./prompt');\n\nconst _require = require('sisteransi'),\n erase = _require.erase,\n cursor = _require.cursor;\n\nconst _require2 = require('../util'),\n style = _require2.style,\n clear = _require2.clear,\n figures = _require2.figures,\n wrap = _require2.wrap,\n entriesToDisplay = _require2.entriesToDisplay;\n\nconst getVal = (arr, i) => arr[i] && (arr[i].value || arr[i].title || arr[i]);\n\nconst getTitle = (arr, i) => arr[i] && (arr[i].title || arr[i].value || arr[i]);\n\nconst getIndex = (arr, valOrTitle) => {\n const index = arr.findIndex(el => el.value === valOrTitle || el.title === valOrTitle);\n return index > -1 ? index : undefined;\n};\n/**\n * TextPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of auto-complete choices objects\n * @param {Function} [opts.suggest] Filter function. Defaults to sort by title\n * @param {Number} [opts.limit=10] Max number of results to show\n * @param {Number} [opts.cursor=0] Cursor start position\n * @param {String} [opts.style='default'] Render style\n * @param {String} [opts.fallback] Fallback message - initial to default value\n * @param {String} [opts.initial] Index of the default value\n * @param {Boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.noMatches] The no matches found label\n */\n\n\nclass AutocompletePrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.msg = opts.message;\n this.suggest = opts.suggest;\n this.choices = opts.choices;\n this.initial = typeof opts.initial === 'number' ? opts.initial : getIndex(opts.choices, opts.initial);\n this.select = this.initial || opts.cursor || 0;\n this.i18n = {\n noMatches: opts.noMatches || 'no matches found'\n };\n this.fallback = opts.fallback || this.initial;\n this.clearFirst = opts.clearFirst || false;\n this.suggestions = [];\n this.input = '';\n this.limit = opts.limit || 10;\n this.cursor = 0;\n this.transform = style.render(opts.style);\n this.scale = this.transform.scale;\n this.render = this.render.bind(this);\n this.complete = this.complete.bind(this);\n this.clear = clear('', this.out.columns);\n this.complete(this.render);\n this.render();\n }\n\n set fallback(fb) {\n this._fb = Number.isSafeInteger(parseInt(fb)) ? parseInt(fb) : fb;\n }\n\n get fallback() {\n let choice;\n if (typeof this._fb === 'number') choice = this.choices[this._fb];else if (typeof this._fb === 'string') choice = {\n title: this._fb\n };\n return choice || this._fb || {\n title: this.i18n.noMatches\n };\n }\n\n moveSelect(i) {\n this.select = i;\n if (this.suggestions.length > 0) this.value = getVal(this.suggestions, i);else this.value = this.fallback.value;\n this.fire();\n }\n\n complete(cb) {\n var _this = this;\n\n return _asyncToGenerator(function* () {\n const p = _this.completing = _this.suggest(_this.input, _this.choices);\n\n const suggestions = yield p;\n if (_this.completing !== p) return;\n _this.suggestions = suggestions.map((s, i, arr) => ({\n title: getTitle(arr, i),\n value: getVal(arr, i),\n description: s.description\n }));\n _this.completing = false;\n const l = Math.max(suggestions.length - 1, 0);\n\n _this.moveSelect(Math.min(l, _this.select));\n\n cb && cb();\n })();\n }\n\n reset() {\n this.input = '';\n this.complete(() => {\n this.moveSelect(this.initial !== void 0 ? this.initial : 0);\n this.render();\n });\n this.render();\n }\n\n exit() {\n if (this.clearFirst && this.input.length > 0) {\n this.reset();\n } else {\n this.done = this.exited = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n }\n\n abort() {\n this.done = this.aborted = true;\n this.exited = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n this.done = true;\n this.aborted = this.exited = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n _(c, key) {\n let s1 = this.input.slice(0, this.cursor);\n let s2 = this.input.slice(this.cursor);\n this.input = `${s1}${c}${s2}`;\n this.cursor = s1.length + 1;\n this.complete(this.render);\n this.render();\n }\n\n delete() {\n if (this.cursor === 0) return this.bell();\n let s1 = this.input.slice(0, this.cursor - 1);\n let s2 = this.input.slice(this.cursor);\n this.input = `${s1}${s2}`;\n this.complete(this.render);\n this.cursor = this.cursor - 1;\n this.render();\n }\n\n deleteForward() {\n if (this.cursor * this.scale >= this.rendered.length) return this.bell();\n let s1 = this.input.slice(0, this.cursor);\n let s2 = this.input.slice(this.cursor + 1);\n this.input = `${s1}${s2}`;\n this.complete(this.render);\n this.render();\n }\n\n first() {\n this.moveSelect(0);\n this.render();\n }\n\n last() {\n this.moveSelect(this.suggestions.length - 1);\n this.render();\n }\n\n up() {\n if (this.select === 0) {\n this.moveSelect(this.suggestions.length - 1);\n } else {\n this.moveSelect(this.select - 1);\n }\n\n this.render();\n }\n\n down() {\n if (this.select === this.suggestions.length - 1) {\n this.moveSelect(0);\n } else {\n this.moveSelect(this.select + 1);\n }\n\n this.render();\n }\n\n next() {\n if (this.select === this.suggestions.length - 1) {\n this.moveSelect(0);\n } else this.moveSelect(this.select + 1);\n\n this.render();\n }\n\n nextPage() {\n this.moveSelect(Math.min(this.select + this.limit, this.suggestions.length - 1));\n this.render();\n }\n\n prevPage() {\n this.moveSelect(Math.max(this.select - this.limit, 0));\n this.render();\n }\n\n left() {\n if (this.cursor <= 0) return this.bell();\n this.cursor = this.cursor - 1;\n this.render();\n }\n\n right() {\n if (this.cursor * this.scale >= this.rendered.length) return this.bell();\n this.cursor = this.cursor + 1;\n this.render();\n }\n\n renderOption(v, hovered, isStart, isEnd) {\n let desc;\n let prefix = isStart ? figures.arrowUp : isEnd ? figures.arrowDown : ' ';\n let title = hovered ? color.cyan().underline(v.title) : v.title;\n prefix = (hovered ? color.cyan(figures.pointer) + ' ' : ' ') + prefix;\n\n if (v.description) {\n desc = ` - ${v.description}`;\n\n if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\\r?\\n/).length > 1) {\n desc = '\\n' + wrap(v.description, {\n margin: 3,\n width: this.out.columns\n });\n }\n }\n\n return prefix + ' ' + title + color.gray(desc || '');\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n\n let _entriesToDisplay = entriesToDisplay(this.select, this.choices.length, this.limit),\n startIndex = _entriesToDisplay.startIndex,\n endIndex = _entriesToDisplay.endIndex;\n\n this.outputText = [style.symbol(this.done, this.aborted, this.exited), color.bold(this.msg), style.delimiter(this.completing), this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)].join(' ');\n\n if (!this.done) {\n const suggestions = this.suggestions.slice(startIndex, endIndex).map((item, i) => this.renderOption(item, this.select === i + startIndex, i === 0 && startIndex > 0, i + startIndex === endIndex - 1 && endIndex < this.choices.length)).join('\\n');\n this.outputText += `\\n` + (suggestions || color.gray(this.fallback.title));\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n\n}\n\nmodule.exports = AutocompletePrompt;","'use strict';\n\nconst color = require('kleur');\n\nconst _require = require('sisteransi'),\n cursor = _require.cursor;\n\nconst MultiselectPrompt = require('./multiselect');\n\nconst _require2 = require('../util'),\n clear = _require2.clear,\n style = _require2.style,\n figures = _require2.figures;\n/**\n * MultiselectPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of choice objects\n * @param {String} [opts.hint] Hint to display\n * @param {String} [opts.warn] Hint shown for disabled choices\n * @param {Number} [opts.max] Max choices\n * @param {Number} [opts.cursor=0] Cursor start position\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\n\n\nclass AutocompleteMultiselectPrompt extends MultiselectPrompt {\n constructor(opts = {}) {\n opts.overrideRender = true;\n super(opts);\n this.inputValue = '';\n this.clear = clear('', this.out.columns);\n this.filteredOptions = this.value;\n this.render();\n }\n\n last() {\n this.cursor = this.filteredOptions.length - 1;\n this.render();\n }\n\n next() {\n this.cursor = (this.cursor + 1) % this.filteredOptions.length;\n this.render();\n }\n\n up() {\n if (this.cursor === 0) {\n this.cursor = this.filteredOptions.length - 1;\n } else {\n this.cursor--;\n }\n\n this.render();\n }\n\n down() {\n if (this.cursor === this.filteredOptions.length - 1) {\n this.cursor = 0;\n } else {\n this.cursor++;\n }\n\n this.render();\n }\n\n left() {\n this.filteredOptions[this.cursor].selected = false;\n this.render();\n }\n\n right() {\n if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell();\n this.filteredOptions[this.cursor].selected = true;\n this.render();\n }\n\n delete() {\n if (this.inputValue.length) {\n this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1);\n this.updateFilteredOptions();\n }\n }\n\n updateFilteredOptions() {\n const currentHighlight = this.filteredOptions[this.cursor];\n this.filteredOptions = this.value.filter(v => {\n if (this.inputValue) {\n if (typeof v.title === 'string') {\n if (v.title.toLowerCase().includes(this.inputValue.toLowerCase())) {\n return true;\n }\n }\n\n if (typeof v.value === 'string') {\n if (v.value.toLowerCase().includes(this.inputValue.toLowerCase())) {\n return true;\n }\n }\n\n return false;\n }\n\n return true;\n });\n const newHighlightIndex = this.filteredOptions.findIndex(v => v === currentHighlight);\n this.cursor = newHighlightIndex < 0 ? 0 : newHighlightIndex;\n this.render();\n }\n\n handleSpaceToggle() {\n const v = this.filteredOptions[this.cursor];\n\n if (v.selected) {\n v.selected = false;\n this.render();\n } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) {\n return this.bell();\n } else {\n v.selected = true;\n this.render();\n }\n }\n\n handleInputChange(c) {\n this.inputValue = this.inputValue + c;\n this.updateFilteredOptions();\n }\n\n _(c, key) {\n if (c === ' ') {\n this.handleSpaceToggle();\n } else {\n this.handleInputChange(c);\n }\n }\n\n renderInstructions() {\n if (this.instructions === undefined || this.instructions) {\n if (typeof this.instructions === 'string') {\n return this.instructions;\n }\n\n return `\nInstructions:\n ${figures.arrowUp}/${figures.arrowDown}: Highlight option\n ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`;\n }\n\n return '';\n }\n\n renderCurrentInput() {\n return `\nFiltered results for: ${this.inputValue ? this.inputValue : color.gray('Enter something to filter')}\\n`;\n }\n\n renderOption(cursor, v, i) {\n let title;\n if (v.disabled) title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);else title = cursor === i ? color.cyan().underline(v.title) : v.title;\n return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + title;\n }\n\n renderDoneOrInstructions() {\n if (this.done) {\n return this.value.filter(e => e.selected).map(v => v.title).join(', ');\n }\n\n const output = [color.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()];\n\n if (this.filteredOptions.length && this.filteredOptions[this.cursor].disabled) {\n output.push(color.yellow(this.warn));\n }\n\n return output.join(' ');\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n super.render(); // print prompt\n\n let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(' ');\n\n if (this.showMinError) {\n prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);\n this.showMinError = false;\n }\n\n prompt += this.renderOptions(this.filteredOptions);\n this.out.write(this.clear + prompt);\n this.clear = clear(prompt, this.out.columns);\n }\n\n}\n\nmodule.exports = AutocompleteMultiselectPrompt;","\"use strict\";\n\nconst color = require('kleur');\n\nconst Prompt = require('./prompt');\n\nconst _require = require('../util'),\n style = _require.style,\n clear = _require.clear;\n\nconst _require2 = require('sisteransi'),\n erase = _require2.erase,\n cursor = _require2.cursor;\n/**\n * ConfirmPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Boolean} [opts.initial] Default value (true/false)\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.yes] The \"Yes\" label\n * @param {String} [opts.yesOption] The \"Yes\" option when choosing between yes/no\n * @param {String} [opts.no] The \"No\" label\n * @param {String} [opts.noOption] The \"No\" option when choosing between yes/no\n */\n\n\nclass ConfirmPrompt extends Prompt {\n constructor(opts = {}) {\n super(opts);\n this.msg = opts.message;\n this.value = opts.initial;\n this.initialValue = !!opts.initial;\n this.yesMsg = opts.yes || 'yes';\n this.yesOption = opts.yesOption || '(Y/n)';\n this.noMsg = opts.no || 'no';\n this.noOption = opts.noOption || '(y/N)';\n this.render();\n }\n\n reset() {\n this.value = this.initialValue;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n this.value = this.value || false;\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n _(c, key) {\n if (c.toLowerCase() === 'y') {\n this.value = true;\n return this.submit();\n }\n\n if (c.toLowerCase() === 'n') {\n this.value = false;\n return this.submit();\n }\n\n return this.bell();\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.done ? this.value ? this.yesMsg : this.noMsg : color.gray(this.initialValue ? this.yesOption : this.noOption)].join(' ');\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n\n}\n\nmodule.exports = ConfirmPrompt;","'use strict';\n\nmodule.exports = {\n TextPrompt: require('./text'),\n SelectPrompt: require('./select'),\n TogglePrompt: require('./toggle'),\n DatePrompt: require('./date'),\n NumberPrompt: require('./number'),\n MultiselectPrompt: require('./multiselect'),\n AutocompletePrompt: require('./autocomplete'),\n AutocompleteMultiselectPrompt: require('./autocompleteMultiselect'),\n ConfirmPrompt: require('./confirm')\n};","'use strict';\n\nconst $ = exports;\n\nconst el = require('./elements');\n\nconst noop = v => v;\n\nfunction toPrompt(type, args, opts = {}) {\n return new Promise((res, rej) => {\n const p = new el[type](args);\n const onAbort = opts.onAbort || noop;\n const onSubmit = opts.onSubmit || noop;\n const onExit = opts.onExit || noop;\n p.on('state', args.onState || noop);\n p.on('submit', x => res(onSubmit(x)));\n p.on('exit', x => res(onExit(x)));\n p.on('abort', x => rej(onAbort(x)));\n });\n}\n/**\n * Text prompt\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {function} [args.onState] On state change callback\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.text = args => toPrompt('TextPrompt', args);\n/**\n * Password prompt with masked input\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {function} [args.onState] On state change callback\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.password = args => {\n args.style = 'password';\n return $.text(args);\n};\n/**\n * Prompt where input is invisible, like sudo\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {function} [args.onState] On state change callback\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.invisible = args => {\n args.style = 'invisible';\n return $.text(args);\n};\n/**\n * Number prompt\n * @param {string} args.message Prompt message to display\n * @param {number} args.initial Default number value\n * @param {function} [args.onState] On state change callback\n * @param {number} [args.max] Max value\n * @param {number} [args.min] Min value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {Boolean} [opts.float=false] Parse input as floats\n * @param {Number} [opts.round=2] Round floats to x decimals\n * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.number = args => toPrompt('NumberPrompt', args);\n/**\n * Date prompt\n * @param {string} args.message Prompt message to display\n * @param {number} args.initial Default number value\n * @param {function} [args.onState] On state change callback\n * @param {number} [args.max] Max value\n * @param {number} [args.min] Min value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {Boolean} [opts.float=false] Parse input as floats\n * @param {Number} [opts.round=2] Round floats to x decimals\n * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.date = args => toPrompt('DatePrompt', args);\n/**\n * Classic yes/no prompt\n * @param {string} args.message Prompt message to display\n * @param {boolean} [args.initial=false] Default value\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.confirm = args => toPrompt('ConfirmPrompt', args);\n/**\n * List prompt, split intput string by `seperator`\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {string} [args.separator] String separator\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input, in form of an `Array`\n */\n\n\n$.list = args => {\n const sep = args.separator || ',';\n return toPrompt('TextPrompt', args, {\n onSubmit: str => str.split(sep).map(s => s.trim())\n });\n};\n/**\n * Toggle/switch prompt\n * @param {string} args.message Prompt message to display\n * @param {boolean} [args.initial=false] Default value\n * @param {string} [args.active=\"on\"] Text for `active` state\n * @param {string} [args.inactive=\"off\"] Text for `inactive` state\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.toggle = args => toPrompt('TogglePrompt', args);\n/**\n * Interactive select prompt\n * @param {string} args.message Prompt message to display\n * @param {Array} args.choices Array of choices objects `[{ title, value }, ...]`\n * @param {number} [args.initial] Index of default value\n * @param {String} [args.hint] Hint to display\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.select = args => toPrompt('SelectPrompt', args);\n/**\n * Interactive multi-select / autocompleteMultiselect prompt\n * @param {string} args.message Prompt message to display\n * @param {Array} args.choices Array of choices objects `[{ title, value, [selected] }, ...]`\n * @param {number} [args.max] Max select\n * @param {string} [args.hint] Hint to display user\n * @param {Number} [args.cursor=0] Cursor start position\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.multiselect = args => {\n args.choices = [].concat(args.choices || []);\n\n const toSelected = items => items.filter(item => item.selected).map(item => item.value);\n\n return toPrompt('MultiselectPrompt', args, {\n onAbort: toSelected,\n onSubmit: toSelected\n });\n};\n\n$.autocompleteMultiselect = args => {\n args.choices = [].concat(args.choices || []);\n\n const toSelected = items => items.filter(item => item.selected).map(item => item.value);\n\n return toPrompt('AutocompleteMultiselectPrompt', args, {\n onAbort: toSelected,\n onSubmit: toSelected\n });\n};\n\nconst byTitle = (input, choices) => Promise.resolve(choices.filter(item => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase()));\n/**\n * Interactive auto-complete prompt\n * @param {string} args.message Prompt message to display\n * @param {Array} args.choices Array of auto-complete choices objects `[{ title, value }, ...]`\n * @param {Function} [args.suggest] Function to filter results based on user input. Defaults to sort by `title`\n * @param {number} [args.limit=10] Max number of results to show\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {String} [args.initial] Index of the default value\n * @param {boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input\n * @param {String} [args.fallback] Fallback message - defaults to initial value\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n\n\n$.autocomplete = args => {\n args.suggest = args.suggest || byTitle;\n args.choices = [].concat(args.choices || []);\n return toPrompt('AutocompletePrompt', args);\n};","'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nconst prompts = require('./prompts');\n\nconst passOn = ['suggest', 'format', 'onState', 'validate', 'onRender', 'type'];\n\nconst noop = () => {};\n/**\n * Prompt for a series of questions\n * @param {Array|Object} questions Single question object or Array of question objects\n * @param {Function} [onSubmit] Callback function called on prompt submit\n * @param {Function} [onCancel] Callback function called on cancel/abort\n * @returns {Object} Object with values from user input\n */\n\n\nfunction prompt() {\n return _prompt.apply(this, arguments);\n}\n\nfunction _prompt() {\n _prompt = _asyncToGenerator(function* (questions = [], {\n onSubmit = noop,\n onCancel = noop\n } = {}) {\n const answers = {};\n const override = prompt._override || {};\n questions = [].concat(questions);\n let answer, question, quit, name, type, lastPrompt;\n\n const getFormattedAnswer = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (question, answer, skipValidation = false) {\n if (!skipValidation && question.validate && question.validate(answer) !== true) {\n return;\n }\n\n return question.format ? yield question.format(answer, answers) : answer;\n });\n\n return function getFormattedAnswer(_x, _x2) {\n return _ref.apply(this, arguments);\n };\n }();\n\n var _iterator = _createForOfIteratorHelper(questions),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n question = _step.value;\n var _question = question;\n name = _question.name;\n type = _question.type;\n\n // evaluate type first and skip if type is a falsy value\n if (typeof type === 'function') {\n type = yield type(answer, _objectSpread({}, answers), question);\n question['type'] = type;\n }\n\n if (!type) continue; // if property is a function, invoke it unless it's a special function\n\n for (let key in question) {\n if (passOn.includes(key)) continue;\n let value = question[key];\n question[key] = typeof value === 'function' ? yield value(answer, _objectSpread({}, answers), lastPrompt) : value;\n }\n\n lastPrompt = question;\n\n if (typeof question.message !== 'string') {\n throw new Error('prompt message is required');\n } // update vars in case they changed\n\n\n var _question2 = question;\n name = _question2.name;\n type = _question2.type;\n\n if (prompts[type] === void 0) {\n throw new Error(`prompt type (${type}) is not defined`);\n }\n\n if (override[question.name] !== undefined) {\n answer = yield getFormattedAnswer(question, override[question.name]);\n\n if (answer !== undefined) {\n answers[name] = answer;\n continue;\n }\n }\n\n try {\n // Get the injected answer if there is one or prompt the user\n answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : yield prompts[type](question);\n answers[name] = answer = yield getFormattedAnswer(question, answer, true);\n quit = yield onSubmit(question, answer, answers);\n } catch (err) {\n quit = !(yield onCancel(question, answers));\n }\n\n if (quit) return answers;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return answers;\n });\n return _prompt.apply(this, arguments);\n}\n\nfunction getInjectedAnswer(injected, deafultValue) {\n const answer = injected.shift();\n\n if (answer instanceof Error) {\n throw answer;\n }\n\n return answer === undefined ? deafultValue : answer;\n}\n\nfunction inject(answers) {\n prompt._injected = (prompt._injected || []).concat(answers);\n}\n\nfunction override(answers) {\n prompt._override = Object.assign({}, answers);\n}\n\nmodule.exports = Object.assign(prompt, {\n prompt,\n prompts,\n inject,\n override\n});","'use strict';\n\nmodule.exports = (key, isSelect) => {\n if (key.meta && key.name !== 'escape') return;\n \n if (key.ctrl) {\n if (key.name === 'a') return 'first';\n if (key.name === 'c') return 'abort';\n if (key.name === 'd') return 'abort';\n if (key.name === 'e') return 'last';\n if (key.name === 'g') return 'reset';\n }\n \n if (isSelect) {\n if (key.name === 'j') return 'down';\n if (key.name === 'k') return 'up';\n }\n\n if (key.name === 'return') return 'submit';\n if (key.name === 'enter') return 'submit'; // ctrl + J\n if (key.name === 'backspace') return 'delete';\n if (key.name === 'delete') return 'deleteForward';\n if (key.name === 'abort') return 'abort';\n if (key.name === 'escape') return 'exit';\n if (key.name === 'tab') return 'next';\n if (key.name === 'pagedown') return 'nextPage';\n if (key.name === 'pageup') return 'prevPage';\n // TODO create home() in prompt types (e.g. TextPrompt)\n if (key.name === 'home') return 'home';\n // TODO create end() in prompt types (e.g. TextPrompt)\n if (key.name === 'end') return 'end';\n\n if (key.name === 'up') return 'up';\n if (key.name === 'down') return 'down';\n if (key.name === 'right') return 'right';\n if (key.name === 'left') return 'left';\n\n return false;\n};\n","'use strict';\n\nmodule.exports = str => {\n const pattern = [\n '[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)',\n '(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PRZcf-ntqry=><~]))'\n ].join('|');\n\n const RGX = new RegExp(pattern, 'g');\n return typeof str === 'string' ? str.replace(RGX, '') : str;\n};\n","'use strict';\n\nconst strip = require('./strip');\nconst { erase, cursor } = require('sisteransi');\n\nconst width = str => [...strip(str)].length;\n\n/**\n * @param {string} prompt\n * @param {number} perLine\n */\nmodule.exports = function(prompt, perLine) {\n if (!perLine) return erase.line + cursor.to(0);\n\n let rows = 0;\n const lines = prompt.split(/\\r?\\n/);\n for (let line of lines) {\n rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / perLine);\n }\n\n return erase.lines(rows);\n};\n","'use strict';\t\n\n const main = {\n arrowUp: '↑',\n arrowDown: '↓',\n arrowLeft: '←',\n arrowRight: '→',\n radioOn: '◉',\n radioOff: '◯',\n tick: '✔',\t\n cross: '✖',\t\n ellipsis: '…',\t\n pointerSmall: '›',\t\n line: '─',\t\n pointer: '❯'\t\n};\t\nconst win = {\n arrowUp: main.arrowUp,\n arrowDown: main.arrowDown,\n arrowLeft: main.arrowLeft,\n arrowRight: main.arrowRight,\n radioOn: '(*)',\n radioOff: '( )',\t\n tick: '√',\t\n cross: '×',\t\n ellipsis: '...',\t\n pointerSmall: '»',\t\n line: '─',\t\n pointer: '>'\t\n};\t\nconst figures = process.platform === 'win32' ? win : main;\t\n\n module.exports = figures;\n","'use strict';\n\nconst c = require('kleur');\nconst figures = require('./figures');\n\n// rendering user input.\nconst styles = Object.freeze({\n password: { scale: 1, render: input => '*'.repeat(input.length) },\n emoji: { scale: 2, render: input => '😃'.repeat(input.length) },\n invisible: { scale: 0, render: input => '' },\n default: { scale: 1, render: input => `${input}` }\n});\nconst render = type => styles[type] || styles.default;\n\n// icon to signalize a prompt.\nconst symbols = Object.freeze({\n aborted: c.red(figures.cross),\n done: c.green(figures.tick),\n exited: c.yellow(figures.cross),\n default: c.cyan('?')\n});\n\nconst symbol = (done, aborted, exited) =>\n aborted ? symbols.aborted : exited ? symbols.exited : done ? symbols.done : symbols.default;\n\n// between the question and the user's input.\nconst delimiter = completing =>\n c.gray(completing ? figures.ellipsis : figures.pointerSmall);\n\nconst item = (expandable, expanded) =>\n c.gray(expandable ? (expanded ? figures.pointerSmall : '+') : figures.line);\n\nmodule.exports = {\n styles,\n render,\n symbols,\n symbol,\n delimiter,\n item\n};\n","'use strict';\n\nconst strip = require('./strip');\n\n/**\n * @param {string} msg\n * @param {number} perLine\n */\nmodule.exports = function (msg, perLine) {\n let lines = String(strip(msg) || '').split(/\\r?\\n/);\n\n if (!perLine) return lines.length;\n return lines.map(l => Math.ceil(l.length / perLine))\n .reduce((a, b) => a + b);\n};\n","'use strict';\n\n/**\n * @param {string} msg The message to wrap\n * @param {object} opts\n * @param {number|string} [opts.margin] Left margin\n * @param {number} opts.width Maximum characters per line including the margin\n */\nmodule.exports = (msg, opts = {}) => {\n const tab = Number.isSafeInteger(parseInt(opts.margin))\n ? new Array(parseInt(opts.margin)).fill(' ').join('')\n : (opts.margin || '');\n\n const width = opts.width;\n\n return (msg || '').split(/\\r?\\n/g)\n .map(line => line\n .split(/\\s+/g)\n .reduce((arr, w) => {\n if (w.length + tab.length >= width || arr[arr.length - 1].length + w.length + 1 < width)\n arr[arr.length - 1] += ` ${w}`;\n else arr.push(`${tab}${w}`);\n return arr;\n }, [ tab ])\n .join('\\n'))\n .join('\\n');\n};\n","'use strict';\n\n/**\n * Determine what entries should be displayed on the screen, based on the\n * currently selected index and the maximum visible. Used in list-based\n * prompts like `select` and `multiselect`.\n *\n * @param {number} cursor the currently selected entry\n * @param {number} total the total entries available to display\n * @param {number} [maxVisible] the number of entries that can be displayed\n */\nmodule.exports = (cursor, total, maxVisible) => {\n maxVisible = maxVisible || total;\n\n let startIndex = Math.min(total- maxVisible, cursor - Math.floor(maxVisible / 2));\n if (startIndex < 0) startIndex = 0;\n\n let endIndex = Math.min(startIndex + maxVisible, total);\n\n return { startIndex, endIndex };\n};\n","'use strict';\n\nmodule.exports = {\n action: require('./action'),\n clear: require('./clear'),\n style: require('./style'),\n strip: require('./strip'),\n figures: require('./figures'),\n lines: require('./lines'),\n wrap: require('./wrap'),\n entriesToDisplay: require('./entriesToDisplay')\n};\n","'use strict';\n\nconst readline = require('readline');\nconst { action } = require('../util');\nconst EventEmitter = require('events');\nconst { beep, cursor } = require('sisteransi');\nconst color = require('kleur');\n\n/**\n * Base prompt skeleton\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\nclass Prompt extends EventEmitter {\n constructor(opts={}) {\n super();\n\n this.firstRender = true;\n this.in = opts.stdin || process.stdin;\n this.out = opts.stdout || process.stdout;\n this.onRender = (opts.onRender || (() => void 0)).bind(this);\n const rl = readline.createInterface({ input:this.in, escapeCodeTimeout:50 });\n readline.emitKeypressEvents(this.in, rl);\n\n if (this.in.isTTY) this.in.setRawMode(true);\n const isSelect = [ 'SelectPrompt', 'MultiselectPrompt' ].indexOf(this.constructor.name) > -1;\n const keypress = (str, key) => {\n let a = action(key, isSelect);\n if (a === false) {\n this._ && this._(str, key);\n } else if (typeof this[a] === 'function') {\n this[a](key);\n } else {\n this.bell();\n }\n };\n\n this.close = () => {\n this.out.write(cursor.show);\n this.in.removeListener('keypress', keypress);\n if (this.in.isTTY) this.in.setRawMode(false);\n rl.close();\n this.emit(this.aborted ? 'abort' : this.exited ? 'exit' : 'submit', this.value);\n this.closed = true;\n };\n\n this.in.on('keypress', keypress);\n }\n\n fire() {\n this.emit('state', {\n value: this.value,\n aborted: !!this.aborted,\n exited: !!this.exited\n });\n }\n\n bell() {\n this.out.write(beep);\n }\n\n render() {\n this.onRender(color);\n if (this.firstRender) this.firstRender = false;\n }\n}\n\nmodule.exports = Prompt;\n","const color = require('kleur');\nconst Prompt = require('./prompt');\nconst { erase, cursor } = require('sisteransi');\nconst { style, clear, lines, figures } = require('../util');\n\n/**\n * TextPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {String} [opts.style='default'] Render style\n * @param {String} [opts.initial] Default value\n * @param {Function} [opts.validate] Validate function\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.error] The invalid error label\n */\nclass TextPrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.transform = style.render(opts.style);\n this.scale = this.transform.scale;\n this.msg = opts.message;\n this.initial = opts.initial || ``;\n this.validator = opts.validate || (() => true);\n this.value = ``;\n this.errorMsg = opts.error || `Please Enter A Valid Value`;\n this.cursor = Number(!!this.initial);\n this.cursorOffset = 0;\n this.clear = clear(``, this.out.columns);\n this.render();\n }\n\n set value(v) {\n if (!v && this.initial) {\n this.placeholder = true;\n this.rendered = color.gray(this.transform.render(this.initial));\n } else {\n this.placeholder = false;\n this.rendered = this.transform.render(v);\n }\n this._value = v;\n this.fire();\n }\n\n get value() {\n return this._value;\n }\n\n reset() {\n this.value = ``;\n this.cursor = Number(!!this.initial);\n this.cursorOffset = 0;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.value = this.value || this.initial;\n this.done = this.aborted = true;\n this.error = false;\n this.red = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n async validate() {\n let valid = await this.validator(this.value);\n if (typeof valid === `string`) {\n this.errorMsg = valid;\n valid = false;\n }\n this.error = !valid;\n }\n\n async submit() {\n this.value = this.value || this.initial;\n this.cursorOffset = 0;\n this.cursor = this.rendered.length;\n await this.validate();\n if (this.error) {\n this.red = true;\n this.fire();\n this.render();\n return;\n }\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n next() {\n if (!this.placeholder) return this.bell();\n this.value = this.initial;\n this.cursor = this.rendered.length;\n this.fire();\n this.render();\n }\n\n moveCursor(n) {\n if (this.placeholder) return;\n this.cursor = this.cursor+n;\n this.cursorOffset += n;\n }\n\n _(c, key) {\n let s1 = this.value.slice(0, this.cursor);\n let s2 = this.value.slice(this.cursor);\n this.value = `${s1}${c}${s2}`;\n this.red = false;\n this.cursor = this.placeholder ? 0 : s1.length+1;\n this.render();\n }\n\n delete() {\n if (this.isCursorAtStart()) return this.bell();\n let s1 = this.value.slice(0, this.cursor-1);\n let s2 = this.value.slice(this.cursor);\n this.value = `${s1}${s2}`;\n this.red = false;\n if (this.isCursorAtStart()) {\n this.cursorOffset = 0\n } else {\n this.cursorOffset++;\n this.moveCursor(-1);\n }\n this.render();\n }\n\n deleteForward() {\n if(this.cursor*this.scale >= this.rendered.length || this.placeholder) return this.bell();\n let s1 = this.value.slice(0, this.cursor);\n let s2 = this.value.slice(this.cursor+1);\n this.value = `${s1}${s2}`;\n this.red = false;\n if (this.isCursorAtEnd()) {\n this.cursorOffset = 0;\n } else {\n this.cursorOffset++;\n }\n this.render();\n }\n\n first() {\n this.cursor = 0;\n this.render();\n }\n\n last() {\n this.cursor = this.value.length;\n this.render();\n }\n\n left() {\n if (this.cursor <= 0 || this.placeholder) return this.bell();\n this.moveCursor(-1);\n this.render();\n }\n\n right() {\n if (this.cursor*this.scale >= this.rendered.length || this.placeholder) return this.bell();\n this.moveCursor(1);\n this.render();\n }\n\n isCursorAtStart() {\n return this.cursor === 0 || (this.placeholder && this.cursor === 1);\n }\n\n isCursorAtEnd() {\n return this.cursor === this.rendered.length || (this.placeholder && this.cursor === this.rendered.length + 1)\n }\n\n render() {\n if (this.closed) return;\n if (!this.firstRender) {\n if (this.outputError)\n this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));\n this.out.write(clear(this.outputText, this.out.columns));\n }\n super.render();\n this.outputError = '';\n\n this.outputText = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(this.done),\n this.red ? color.red(this.rendered) : this.rendered\n ].join(` `);\n\n if (this.error) {\n this.outputError += this.errorMsg.split(`\\n`)\n .reduce((a, l, i) => a + `\\n${i ? ' ' : figures.pointerSmall} ${color.red().italic(l)}`, ``);\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore + cursor.move(this.cursorOffset, 0));\n }\n}\n\nmodule.exports = TextPrompt;","'use strict';\n\nconst color = require('kleur');\nconst Prompt = require('./prompt');\nconst { style, clear, figures, wrap, entriesToDisplay } = require('../util');\nconst { cursor } = require('sisteransi');\n\n/**\n * SelectPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of choice objects\n * @param {String} [opts.hint] Hint to display\n * @param {Number} [opts.initial] Index of default value\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {Number} [opts.optionsPerPage=10] Max options to display at once\n */\nclass SelectPrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.msg = opts.message;\n this.hint = opts.hint || '- Use arrow-keys. Return to submit.';\n this.warn = opts.warn || '- This option is disabled';\n this.cursor = opts.initial || 0;\n this.choices = opts.choices.map((ch, idx) => {\n if (typeof ch === 'string')\n ch = {title: ch, value: idx};\n return {\n title: ch && (ch.title || ch.value || ch),\n value: ch && (ch.value === undefined ? idx : ch.value),\n description: ch && ch.description,\n selected: ch && ch.selected,\n disabled: ch && ch.disabled\n };\n });\n this.optionsPerPage = opts.optionsPerPage || 10;\n this.value = (this.choices[this.cursor] || {}).value;\n this.clear = clear('', this.out.columns);\n this.render();\n }\n\n moveCursor(n) {\n this.cursor = n;\n this.value = this.choices[n].value;\n this.fire();\n }\n\n reset() {\n this.moveCursor(0);\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n if (!this.selection.disabled) {\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n } else\n this.bell();\n }\n\n first() {\n this.moveCursor(0);\n this.render();\n }\n\n last() {\n this.moveCursor(this.choices.length - 1);\n this.render();\n }\n\n up() {\n if (this.cursor === 0) {\n this.moveCursor(this.choices.length - 1);\n } else {\n this.moveCursor(this.cursor - 1);\n }\n this.render();\n }\n\n down() {\n if (this.cursor === this.choices.length - 1) {\n this.moveCursor(0);\n } else {\n this.moveCursor(this.cursor + 1);\n }\n this.render();\n }\n\n next() {\n this.moveCursor((this.cursor + 1) % this.choices.length);\n this.render();\n }\n\n _(c, key) {\n if (c === ' ') return this.submit();\n }\n\n get selection() {\n return this.choices[this.cursor];\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n\n let { startIndex, endIndex } = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage);\n\n // Print prompt\n this.outputText = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(false),\n this.done ? this.selection.title : this.selection.disabled\n ? color.yellow(this.warn) : color.gray(this.hint)\n ].join(' ');\n\n // Print choices\n if (!this.done) {\n this.outputText += '\\n';\n for (let i = startIndex; i < endIndex; i++) {\n let title, prefix, desc = '', v = this.choices[i];\n\n // Determine whether to display \"more choices\" indicators\n if (i === startIndex && startIndex > 0) {\n prefix = figures.arrowUp;\n } else if (i === endIndex - 1 && endIndex < this.choices.length) {\n prefix = figures.arrowDown;\n } else {\n prefix = ' ';\n }\n\n if (v.disabled) {\n title = this.cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);\n prefix = (this.cursor === i ? color.bold().gray(figures.pointer) + ' ' : ' ') + prefix;\n } else {\n title = this.cursor === i ? color.cyan().underline(v.title) : v.title;\n prefix = (this.cursor === i ? color.cyan(figures.pointer) + ' ' : ' ') + prefix;\n if (v.description && this.cursor === i) {\n desc = ` - ${v.description}`;\n if (prefix.length + title.length + desc.length >= this.out.columns\n || v.description.split(/\\r?\\n/).length > 1) {\n desc = '\\n' + wrap(v.description, { margin: 3, width: this.out.columns });\n }\n }\n }\n\n this.outputText += `${prefix} ${title}${color.gray(desc)}\\n`;\n }\n }\n\n this.out.write(this.outputText);\n }\n}\n\nmodule.exports = SelectPrompt;\n","const color = require('kleur');\nconst Prompt = require('./prompt');\nconst { style, clear } = require('../util');\nconst { cursor, erase } = require('sisteransi');\n\n/**\n * TogglePrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Boolean} [opts.initial=false] Default value\n * @param {String} [opts.active='no'] Active label\n * @param {String} [opts.inactive='off'] Inactive label\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\nclass TogglePrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.msg = opts.message;\n this.value = !!opts.initial;\n this.active = opts.active || 'on';\n this.inactive = opts.inactive || 'off';\n this.initialValue = this.value;\n this.render();\n }\n\n reset() {\n this.value = this.initialValue;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n deactivate() {\n if (this.value === false) return this.bell();\n this.value = false;\n this.render();\n }\n\n activate() {\n if (this.value === true) return this.bell();\n this.value = true;\n this.render();\n }\n\n delete() {\n this.deactivate();\n }\n left() {\n this.deactivate();\n }\n right() {\n this.activate();\n }\n down() {\n this.deactivate();\n }\n up() {\n this.activate();\n }\n\n next() {\n this.value = !this.value;\n this.fire();\n this.render();\n }\n\n _(c, key) {\n if (c === ' ') {\n this.value = !this.value;\n } else if (c === '1') {\n this.value = true;\n } else if (c === '0') {\n this.value = false;\n } else return this.bell();\n this.render();\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n\n this.outputText = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(this.done),\n this.value ? this.inactive : color.cyan().underline(this.inactive),\n color.gray('/'),\n this.value ? color.cyan().underline(this.active) : this.active\n ].join(' ');\n\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n}\n\nmodule.exports = TogglePrompt;\n","'use strict';\n\nclass DatePart {\n constructor({token, date, parts, locales}) {\n this.token = token;\n this.date = date || new Date();\n this.parts = parts || [this];\n this.locales = locales || {};\n }\n\n up() {}\n\n down() {}\n\n next() {\n const currentIdx = this.parts.indexOf(this);\n return this.parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);\n }\n\n setTo(val) {}\n\n prev() {\n let parts = [].concat(this.parts).reverse();\n const currentIdx = parts.indexOf(this);\n return parts.find((part, idx) => idx > currentIdx && part instanceof DatePart);\n }\n\n toString() {\n return String(this.date);\n }\n}\n\nmodule.exports = DatePart;\n\n\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Meridiem extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setHours((this.date.getHours() + 12) % 24);\n }\n\n down() {\n this.up();\n }\n\n toString() {\n let meridiem = this.date.getHours() > 12 ? 'pm' : 'am';\n return /\\A/.test(this.token) ? meridiem.toUpperCase() : meridiem;\n }\n}\n\nmodule.exports = Meridiem;\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nconst pos = n => {\n n = n % 10;\n return n === 1 ? 'st'\n : n === 2 ? 'nd'\n : n === 3 ? 'rd'\n : 'th';\n}\n\nclass Day extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setDate(this.date.getDate() + 1);\n }\n\n down() {\n this.date.setDate(this.date.getDate() - 1);\n }\n\n setTo(val) {\n this.date.setDate(parseInt(val.substr(-2)));\n }\n\n toString() {\n let date = this.date.getDate();\n let day = this.date.getDay();\n return this.token === 'DD' ? String(date).padStart(2, '0')\n : this.token === 'Do' ? date + pos(date)\n : this.token === 'd' ? day + 1\n : this.token === 'ddd' ? this.locales.weekdaysShort[day]\n : this.token === 'dddd' ? this.locales.weekdays[day]\n : date;\n }\n}\n\nmodule.exports = Day;\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Hours extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setHours(this.date.getHours() + 1);\n }\n\n down() {\n this.date.setHours(this.date.getHours() - 1);\n }\n\n setTo(val) {\n this.date.setHours(parseInt(val.substr(-2)));\n }\n\n toString() {\n let hours = this.date.getHours();\n if (/h/.test(this.token))\n hours = (hours % 12) || 12;\n return this.token.length > 1 ? String(hours).padStart(2, '0') : hours;\n }\n}\n\nmodule.exports = Hours;\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Milliseconds extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setMilliseconds(this.date.getMilliseconds() + 1);\n }\n\n down() {\n this.date.setMilliseconds(this.date.getMilliseconds() - 1);\n }\n\n setTo(val) {\n this.date.setMilliseconds(parseInt(val.substr(-(this.token.length))));\n }\n\n toString() {\n return String(this.date.getMilliseconds()).padStart(4, '0')\n .substr(0, this.token.length);\n }\n}\n\nmodule.exports = Milliseconds;\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Minutes extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setMinutes(this.date.getMinutes() + 1);\n }\n\n down() {\n this.date.setMinutes(this.date.getMinutes() - 1);\n }\n\n setTo(val) {\n this.date.setMinutes(parseInt(val.substr(-2)));\n }\n\n toString() {\n let m = this.date.getMinutes();\n return this.token.length > 1 ? String(m).padStart(2, '0') : m;\n }\n}\n\nmodule.exports = Minutes;\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Month extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setMonth(this.date.getMonth() + 1);\n }\n\n down() {\n this.date.setMonth(this.date.getMonth() - 1);\n }\n\n setTo(val) {\n val = parseInt(val.substr(-2)) - 1;\n this.date.setMonth(val < 0 ? 0 : val);\n }\n\n toString() {\n let month = this.date.getMonth();\n let tl = this.token.length;\n return tl === 2 ? String(month + 1).padStart(2, '0')\n : tl === 3 ? this.locales.monthsShort[month]\n : tl === 4 ? this.locales.months[month]\n : String(month + 1);\n }\n}\n\nmodule.exports = Month;\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Seconds extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setSeconds(this.date.getSeconds() + 1);\n }\n\n down() {\n this.date.setSeconds(this.date.getSeconds() - 1);\n }\n\n setTo(val) {\n this.date.setSeconds(parseInt(val.substr(-2)));\n }\n\n toString() {\n let s = this.date.getSeconds();\n return this.token.length > 1 ? String(s).padStart(2, '0') : s;\n }\n}\n\nmodule.exports = Seconds;\n","'use strict';\n\nconst DatePart = require('./datepart');\n\nclass Year extends DatePart {\n constructor(opts={}) {\n super(opts);\n }\n\n up() {\n this.date.setFullYear(this.date.getFullYear() + 1);\n }\n\n down() {\n this.date.setFullYear(this.date.getFullYear() - 1);\n }\n\n setTo(val) {\n this.date.setFullYear(val.substr(-4));\n }\n\n toString() {\n let year = String(this.date.getFullYear()).padStart(4, '0');\n return this.token.length === 2 ? year.substr(-2) : year;\n }\n}\n\nmodule.exports = Year;\n","'use strict';\n\nmodule.exports = {\n DatePart: require('./datepart'),\n Meridiem: require('./meridiem'),\n Day: require('./day'),\n Hours: require('./hours'),\n Milliseconds: require('./milliseconds'),\n Minutes: require('./minutes'),\n Month: require('./month'),\n Seconds: require('./seconds'),\n Year: require('./year'),\n}\n","'use strict';\n\nconst color = require('kleur');\nconst Prompt = require('./prompt');\nconst { style, clear, figures } = require('../util');\nconst { erase, cursor } = require('sisteransi');\nconst { DatePart, Meridiem, Day, Hours, Milliseconds, Minutes, Month, Seconds, Year } = require('../dateparts');\n\nconst regex = /\\\\(.)|\"((?:\\\\[\"\\\\]|[^\"])+)\"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;\nconst regexGroups = {\n 1: ({token}) => token.replace(/\\\\(.)/g, '$1'),\n 2: (opts) => new Day(opts), // Day // TODO\n 3: (opts) => new Month(opts), // Month\n 4: (opts) => new Year(opts), // Year\n 5: (opts) => new Meridiem(opts), // AM/PM // TODO (special)\n 6: (opts) => new Hours(opts), // Hours\n 7: (opts) => new Minutes(opts), // Minutes\n 8: (opts) => new Seconds(opts), // Seconds\n 9: (opts) => new Milliseconds(opts), // Fractional seconds\n}\n\nconst dfltLocales = {\n months: 'January,February,March,April,May,June,July,August,September,October,November,December'.split(','),\n monthsShort: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),\n weekdays: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),\n weekdaysShort: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(',')\n}\n\n\n/**\n * DatePrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Number} [opts.initial] Index of default value\n * @param {String} [opts.mask] The format mask\n * @param {object} [opts.locales] The date locales\n * @param {String} [opts.error] The error message shown on invalid value\n * @param {Function} [opts.validate] Function to validate the submitted value\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\nclass DatePrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.msg = opts.message;\n this.cursor = 0;\n this.typed = '';\n this.locales = Object.assign(dfltLocales, opts.locales);\n this._date = opts.initial || new Date();\n this.errorMsg = opts.error || 'Please Enter A Valid Value';\n this.validator = opts.validate || (() => true);\n this.mask = opts.mask || 'YYYY-MM-DD HH:mm:ss';\n this.clear = clear('', this.out.columns);\n this.render();\n }\n\n get value() {\n return this.date\n }\n\n get date() {\n return this._date;\n }\n\n set date(date) {\n if (date) this._date.setTime(date.getTime());\n }\n\n set mask(mask) {\n let result;\n this.parts = [];\n while(result = regex.exec(mask)) {\n let match = result.shift();\n let idx = result.findIndex(gr => gr != null);\n this.parts.push(idx in regexGroups\n ? regexGroups[idx]({ token: result[idx] || match, date: this.date, parts: this.parts, locales: this.locales })\n : result[idx] || match);\n }\n\n let parts = this.parts.reduce((arr, i) => {\n if (typeof i === 'string' && typeof arr[arr.length - 1] === 'string')\n arr[arr.length - 1] += i;\n else arr.push(i);\n return arr;\n }, []);\n\n this.parts.splice(0);\n this.parts.push(...parts);\n this.reset();\n }\n\n moveCursor(n) {\n this.typed = '';\n this.cursor = n;\n this.fire();\n }\n\n reset() {\n this.moveCursor(this.parts.findIndex(p => p instanceof DatePart));\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.error = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n async validate() {\n let valid = await this.validator(this.value);\n if (typeof valid === 'string') {\n this.errorMsg = valid;\n valid = false;\n }\n this.error = !valid;\n }\n\n async submit() {\n await this.validate();\n if (this.error) {\n this.color = 'red';\n this.fire();\n this.render();\n return;\n }\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n up() {\n this.typed = '';\n this.parts[this.cursor].up();\n this.render();\n }\n\n down() {\n this.typed = '';\n this.parts[this.cursor].down();\n this.render();\n }\n\n left() {\n let prev = this.parts[this.cursor].prev();\n if (prev == null) return this.bell();\n this.moveCursor(this.parts.indexOf(prev));\n this.render();\n }\n\n right() {\n let next = this.parts[this.cursor].next();\n if (next == null) return this.bell();\n this.moveCursor(this.parts.indexOf(next));\n this.render();\n }\n\n next() {\n let next = this.parts[this.cursor].next();\n this.moveCursor(next\n ? this.parts.indexOf(next)\n : this.parts.findIndex((part) => part instanceof DatePart));\n this.render();\n }\n\n _(c) {\n if (/\\d/.test(c)) {\n this.typed += c;\n this.parts[this.cursor].setTo(this.typed);\n this.render();\n }\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n\n // Print prompt\n this.outputText = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(false),\n this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), [])\n .join('')\n ].join(' ');\n\n // Print error\n if (this.error) {\n this.outputText += this.errorMsg.split('\\n').reduce(\n (a, l, i) => a + `\\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n}\n\nmodule.exports = DatePrompt;\n","const color = require('kleur');\nconst Prompt = require('./prompt');\nconst { cursor, erase } = require('sisteransi');\nconst { style, figures, clear, lines } = require('../util');\n\nconst isNumber = /[0-9]/;\nconst isDef = any => any !== undefined;\nconst round = (number, precision) => {\n let factor = Math.pow(10, precision);\n return Math.round(number * factor) / factor;\n}\n\n/**\n * NumberPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {String} [opts.style='default'] Render style\n * @param {Number} [opts.initial] Default value\n * @param {Number} [opts.max=+Infinity] Max value\n * @param {Number} [opts.min=-Infinity] Min value\n * @param {Boolean} [opts.float=false] Parse input as floats\n * @param {Number} [opts.round=2] Round floats to x decimals\n * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys\n * @param {Function} [opts.validate] Validate function\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.error] The invalid error label\n */\nclass NumberPrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.transform = style.render(opts.style);\n this.msg = opts.message;\n this.initial = isDef(opts.initial) ? opts.initial : '';\n this.float = !!opts.float;\n this.round = opts.round || 2;\n this.inc = opts.increment || 1;\n this.min = isDef(opts.min) ? opts.min : -Infinity;\n this.max = isDef(opts.max) ? opts.max : Infinity;\n this.errorMsg = opts.error || `Please Enter A Valid Value`;\n this.validator = opts.validate || (() => true);\n this.color = `cyan`;\n this.value = ``;\n this.typed = ``;\n this.lastHit = 0;\n this.render();\n }\n\n set value(v) {\n if (!v && v !== 0) {\n this.placeholder = true;\n this.rendered = color.gray(this.transform.render(`${this.initial}`));\n this._value = ``;\n } else {\n this.placeholder = false;\n this.rendered = this.transform.render(`${round(v, this.round)}`);\n this._value = round(v, this.round);\n }\n this.fire();\n }\n\n get value() {\n return this._value;\n }\n\n parse(x) {\n return this.float ? parseFloat(x) : parseInt(x);\n }\n\n valid(c) {\n return c === `-` || c === `.` && this.float || isNumber.test(c)\n }\n\n reset() {\n this.typed = ``;\n this.value = ``;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n let x = this.value;\n this.value = x !== `` ? x : this.initial;\n this.done = this.aborted = true;\n this.error = false;\n this.fire();\n this.render();\n this.out.write(`\\n`);\n this.close();\n }\n\n async validate() {\n let valid = await this.validator(this.value);\n if (typeof valid === `string`) {\n this.errorMsg = valid;\n valid = false;\n }\n this.error = !valid;\n }\n\n async submit() {\n await this.validate();\n if (this.error) {\n this.color = `red`;\n this.fire();\n this.render();\n return;\n }\n let x = this.value;\n this.value = x !== `` ? x : this.initial;\n this.done = true;\n this.aborted = false;\n this.error = false;\n this.fire();\n this.render();\n this.out.write(`\\n`);\n this.close();\n }\n\n up() {\n this.typed = ``;\n if(this.value === '') {\n this.value = this.min - this.inc;\n }\n if (this.value >= this.max) return this.bell();\n this.value += this.inc;\n this.color = `cyan`;\n this.fire();\n this.render();\n }\n\n down() {\n this.typed = ``;\n if(this.value === '') {\n this.value = this.min + this.inc;\n }\n if (this.value <= this.min) return this.bell();\n this.value -= this.inc;\n this.color = `cyan`;\n this.fire();\n this.render();\n }\n\n delete() {\n let val = this.value.toString();\n if (val.length === 0) return this.bell();\n this.value = this.parse((val = val.slice(0, -1))) || ``;\n if (this.value !== '' && this.value < this.min) {\n this.value = this.min;\n }\n this.color = `cyan`;\n this.fire();\n this.render();\n }\n\n next() {\n this.value = this.initial;\n this.fire();\n this.render();\n }\n\n _(c, key) {\n if (!this.valid(c)) return this.bell();\n\n const now = Date.now();\n if (now - this.lastHit > 1000) this.typed = ``; // 1s elapsed\n this.typed += c;\n this.lastHit = now;\n this.color = `cyan`;\n\n if (c === `.`) return this.fire();\n\n this.value = Math.min(this.parse(this.typed), this.max);\n if (this.value > this.max) this.value = this.max;\n if (this.value < this.min) this.value = this.min;\n this.fire();\n this.render();\n }\n\n render() {\n if (this.closed) return;\n if (!this.firstRender) {\n if (this.outputError)\n this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));\n this.out.write(clear(this.outputText, this.out.columns));\n }\n super.render();\n this.outputError = '';\n\n // Print prompt\n this.outputText = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(this.done),\n !this.done || (!this.done && !this.placeholder)\n ? color[this.color]().underline(this.rendered) : this.rendered\n ].join(` `);\n\n // Print error\n if (this.error) {\n this.outputError += this.errorMsg.split(`\\n`)\n .reduce((a, l, i) => a + `\\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText + cursor.save + this.outputError + cursor.restore);\n }\n}\n\nmodule.exports = NumberPrompt;\n","'use strict';\n\nconst color = require('kleur');\nconst { cursor } = require('sisteransi');\nconst Prompt = require('./prompt');\nconst { clear, figures, style, wrap, entriesToDisplay } = require('../util');\n\n/**\n * MultiselectPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of choice objects\n * @param {String} [opts.hint] Hint to display\n * @param {String} [opts.warn] Hint shown for disabled choices\n * @param {Number} [opts.max] Max choices\n * @param {Number} [opts.cursor=0] Cursor start position\n * @param {Number} [opts.optionsPerPage=10] Max options to display at once\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\nclass MultiselectPrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.msg = opts.message;\n this.cursor = opts.cursor || 0;\n this.scrollIndex = opts.cursor || 0;\n this.hint = opts.hint || '';\n this.warn = opts.warn || '- This option is disabled -';\n this.minSelected = opts.min;\n this.showMinError = false;\n this.maxChoices = opts.max;\n this.instructions = opts.instructions;\n this.optionsPerPage = opts.optionsPerPage || 10;\n this.value = opts.choices.map((ch, idx) => {\n if (typeof ch === 'string')\n ch = {title: ch, value: idx};\n return {\n title: ch && (ch.title || ch.value || ch),\n description: ch && ch.description,\n value: ch && (ch.value === undefined ? idx : ch.value),\n selected: ch && ch.selected,\n disabled: ch && ch.disabled\n };\n });\n this.clear = clear('', this.out.columns);\n if (!opts.overrideRender) {\n this.render();\n }\n }\n\n reset() {\n this.value.map(v => !v.selected);\n this.cursor = 0;\n this.fire();\n this.render();\n }\n\n selected() {\n return this.value.filter(v => v.selected);\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n const selected = this.value\n .filter(e => e.selected);\n if (this.minSelected && selected.length < this.minSelected) {\n this.showMinError = true;\n this.render();\n } else {\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n }\n\n first() {\n this.cursor = 0;\n this.render();\n }\n\n last() {\n this.cursor = this.value.length - 1;\n this.render();\n }\n next() {\n this.cursor = (this.cursor + 1) % this.value.length;\n this.render();\n }\n\n up() {\n if (this.cursor === 0) {\n this.cursor = this.value.length - 1;\n } else {\n this.cursor--;\n }\n this.render();\n }\n\n down() {\n if (this.cursor === this.value.length - 1) {\n this.cursor = 0;\n } else {\n this.cursor++;\n }\n this.render();\n }\n\n left() {\n this.value[this.cursor].selected = false;\n this.render();\n }\n\n right() {\n if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell();\n this.value[this.cursor].selected = true;\n this.render();\n }\n\n handleSpaceToggle() {\n const v = this.value[this.cursor];\n\n if (v.selected) {\n v.selected = false;\n this.render();\n } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) {\n return this.bell();\n } else {\n v.selected = true;\n this.render();\n }\n }\n\n toggleAll() {\n if (this.maxChoices !== undefined || this.value[this.cursor].disabled) {\n return this.bell();\n }\n\n const newSelected = !this.value[this.cursor].selected;\n this.value.filter(v => !v.disabled).forEach(v => v.selected = newSelected);\n this.render();\n }\n\n _(c, key) {\n if (c === ' ') {\n this.handleSpaceToggle();\n } else if (c === 'a') {\n this.toggleAll();\n } else {\n return this.bell();\n }\n }\n\n renderInstructions() {\n if (this.instructions === undefined || this.instructions) {\n if (typeof this.instructions === 'string') {\n return this.instructions;\n }\n return '\\nInstructions:\\n'\n + ` ${figures.arrowUp}/${figures.arrowDown}: Highlight option\\n`\n + ` ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection\\n`\n + (this.maxChoices === undefined ? ` a: Toggle all\\n` : '')\n + ` enter/return: Complete answer`;\n }\n return '';\n }\n\n renderOption(cursor, v, i, arrowIndicator) {\n const prefix = (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + arrowIndicator + ' ';\n let title, desc;\n\n if (v.disabled) {\n title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);\n } else {\n title = cursor === i ? color.cyan().underline(v.title) : v.title;\n if (cursor === i && v.description) {\n desc = ` - ${v.description}`;\n if (prefix.length + title.length + desc.length >= this.out.columns\n || v.description.split(/\\r?\\n/).length > 1) {\n desc = '\\n' + wrap(v.description, { margin: prefix.length, width: this.out.columns });\n }\n }\n }\n\n return prefix + title + color.gray(desc || '');\n }\n\n // shared with autocompleteMultiselect\n paginateOptions(options) {\n if (options.length === 0) {\n return color.red('No matches for this query.');\n }\n\n let { startIndex, endIndex } = entriesToDisplay(this.cursor, options.length, this.optionsPerPage);\n let prefix, styledOptions = [];\n\n for (let i = startIndex; i < endIndex; i++) {\n if (i === startIndex && startIndex > 0) {\n prefix = figures.arrowUp;\n } else if (i === endIndex - 1 && endIndex < options.length) {\n prefix = figures.arrowDown;\n } else {\n prefix = ' ';\n }\n styledOptions.push(this.renderOption(this.cursor, options[i], i, prefix));\n }\n\n return '\\n' + styledOptions.join('\\n');\n }\n\n // shared with autocomleteMultiselect\n renderOptions(options) {\n if (!this.done) {\n return this.paginateOptions(options);\n }\n return '';\n }\n\n renderDoneOrInstructions() {\n if (this.done) {\n return this.value\n .filter(e => e.selected)\n .map(v => v.title)\n .join(', ');\n }\n\n const output = [color.gray(this.hint), this.renderInstructions()];\n\n if (this.value[this.cursor].disabled) {\n output.push(color.yellow(this.warn));\n }\n return output.join(' ');\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n super.render();\n\n // print prompt\n let prompt = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(false),\n this.renderDoneOrInstructions()\n ].join(' ');\n if (this.showMinError) {\n prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);\n this.showMinError = false;\n }\n prompt += this.renderOptions(this.value);\n\n this.out.write(this.clear + prompt);\n this.clear = clear(prompt, this.out.columns);\n }\n}\n\nmodule.exports = MultiselectPrompt;\n","'use strict';\n\nconst color = require('kleur');\nconst Prompt = require('./prompt');\nconst { erase, cursor } = require('sisteransi');\nconst { style, clear, figures, wrap, entriesToDisplay } = require('../util');\n\nconst getVal = (arr, i) => arr[i] && (arr[i].value || arr[i].title || arr[i]);\nconst getTitle = (arr, i) => arr[i] && (arr[i].title || arr[i].value || arr[i]);\nconst getIndex = (arr, valOrTitle) => {\n const index = arr.findIndex(el => el.value === valOrTitle || el.title === valOrTitle);\n return index > -1 ? index : undefined;\n};\n\n/**\n * TextPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of auto-complete choices objects\n * @param {Function} [opts.suggest] Filter function. Defaults to sort by title\n * @param {Number} [opts.limit=10] Max number of results to show\n * @param {Number} [opts.cursor=0] Cursor start position\n * @param {String} [opts.style='default'] Render style\n * @param {String} [opts.fallback] Fallback message - initial to default value\n * @param {String} [opts.initial] Index of the default value\n * @param {Boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.noMatches] The no matches found label\n */\nclass AutocompletePrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.msg = opts.message;\n this.suggest = opts.suggest;\n this.choices = opts.choices;\n this.initial = typeof opts.initial === 'number'\n ? opts.initial\n : getIndex(opts.choices, opts.initial);\n this.select = this.initial || opts.cursor || 0;\n this.i18n = { noMatches: opts.noMatches || 'no matches found' };\n this.fallback = opts.fallback || this.initial;\n this.clearFirst = opts.clearFirst || false;\n this.suggestions = [];\n this.input = '';\n this.limit = opts.limit || 10;\n this.cursor = 0;\n this.transform = style.render(opts.style);\n this.scale = this.transform.scale;\n this.render = this.render.bind(this);\n this.complete = this.complete.bind(this);\n this.clear = clear('', this.out.columns);\n this.complete(this.render);\n this.render();\n }\n\n set fallback(fb) {\n this._fb = Number.isSafeInteger(parseInt(fb)) ? parseInt(fb) : fb;\n }\n\n get fallback() {\n let choice;\n if (typeof this._fb === 'number')\n choice = this.choices[this._fb];\n else if (typeof this._fb === 'string')\n choice = { title: this._fb };\n return choice || this._fb || { title: this.i18n.noMatches };\n }\n\n moveSelect(i) {\n this.select = i;\n if (this.suggestions.length > 0)\n this.value = getVal(this.suggestions, i);\n else this.value = this.fallback.value;\n this.fire();\n }\n\n async complete(cb) {\n const p = (this.completing = this.suggest(this.input, this.choices));\n const suggestions = await p;\n\n if (this.completing !== p) return;\n this.suggestions = suggestions\n .map((s, i, arr) => ({ title: getTitle(arr, i), value: getVal(arr, i), description: s.description }));\n this.completing = false;\n const l = Math.max(suggestions.length - 1, 0);\n this.moveSelect(Math.min(l, this.select));\n\n cb && cb();\n }\n\n reset() {\n this.input = '';\n this.complete(() => {\n this.moveSelect(this.initial !== void 0 ? this.initial : 0);\n this.render();\n });\n this.render();\n }\n\n exit() {\n if (this.clearFirst && this.input.length > 0) {\n this.reset();\n } else {\n this.done = this.exited = true; \n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n }\n\n abort() {\n this.done = this.aborted = true;\n this.exited = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n this.done = true;\n this.aborted = this.exited = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n _(c, key) {\n let s1 = this.input.slice(0, this.cursor);\n let s2 = this.input.slice(this.cursor);\n this.input = `${s1}${c}${s2}`;\n this.cursor = s1.length+1;\n this.complete(this.render);\n this.render();\n }\n\n delete() {\n if (this.cursor === 0) return this.bell();\n let s1 = this.input.slice(0, this.cursor-1);\n let s2 = this.input.slice(this.cursor);\n this.input = `${s1}${s2}`;\n this.complete(this.render);\n this.cursor = this.cursor-1;\n this.render();\n }\n\n deleteForward() {\n if(this.cursor*this.scale >= this.rendered.length) return this.bell();\n let s1 = this.input.slice(0, this.cursor);\n let s2 = this.input.slice(this.cursor+1);\n this.input = `${s1}${s2}`;\n this.complete(this.render);\n this.render();\n }\n\n first() {\n this.moveSelect(0);\n this.render();\n }\n\n last() {\n this.moveSelect(this.suggestions.length - 1);\n this.render();\n }\n\n up() {\n if (this.select === 0) {\n this.moveSelect(this.suggestions.length - 1);\n } else {\n this.moveSelect(this.select - 1);\n }\n this.render();\n }\n\n down() {\n if (this.select === this.suggestions.length - 1) {\n this.moveSelect(0);\n } else {\n this.moveSelect(this.select + 1);\n }\n this.render();\n }\n\n next() {\n if (this.select === this.suggestions.length - 1) {\n this.moveSelect(0);\n } else this.moveSelect(this.select + 1);\n this.render();\n }\n\n nextPage() {\n this.moveSelect(Math.min(this.select + this.limit, this.suggestions.length - 1));\n this.render();\n }\n\n prevPage() {\n this.moveSelect(Math.max(this.select - this.limit, 0));\n this.render();\n }\n\n left() {\n if (this.cursor <= 0) return this.bell();\n this.cursor = this.cursor-1;\n this.render();\n }\n\n right() {\n if (this.cursor*this.scale >= this.rendered.length) return this.bell();\n this.cursor = this.cursor+1;\n this.render();\n }\n\n renderOption(v, hovered, isStart, isEnd) {\n let desc;\n let prefix = isStart ? figures.arrowUp : isEnd ? figures.arrowDown : ' ';\n let title = hovered ? color.cyan().underline(v.title) : v.title;\n prefix = (hovered ? color.cyan(figures.pointer) + ' ' : ' ') + prefix;\n if (v.description) {\n desc = ` - ${v.description}`;\n if (prefix.length + title.length + desc.length >= this.out.columns\n || v.description.split(/\\r?\\n/).length > 1) {\n desc = '\\n' + wrap(v.description, { margin: 3, width: this.out.columns })\n }\n }\n return prefix + ' ' + title + color.gray(desc || '');\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n\n let { startIndex, endIndex } = entriesToDisplay(this.select, this.choices.length, this.limit);\n\n this.outputText = [\n style.symbol(this.done, this.aborted, this.exited),\n color.bold(this.msg),\n style.delimiter(this.completing),\n this.done && this.suggestions[this.select]\n ? this.suggestions[this.select].title\n : this.rendered = this.transform.render(this.input)\n ].join(' ');\n\n if (!this.done) {\n const suggestions = this.suggestions\n .slice(startIndex, endIndex)\n .map((item, i) => this.renderOption(item,\n this.select === i + startIndex,\n i === 0 && startIndex > 0,\n i + startIndex === endIndex - 1 && endIndex < this.choices.length))\n .join('\\n');\n this.outputText += `\\n` + (suggestions || color.gray(this.fallback.title));\n }\n\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n}\n\nmodule.exports = AutocompletePrompt;\n","'use strict';\n\nconst color = require('kleur');\nconst { cursor } = require('sisteransi');\nconst MultiselectPrompt = require('./multiselect');\nconst { clear, style, figures } = require('../util');\n/**\n * MultiselectPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Array} opts.choices Array of choice objects\n * @param {String} [opts.hint] Hint to display\n * @param {String} [opts.warn] Hint shown for disabled choices\n * @param {Number} [opts.max] Max choices\n * @param {Number} [opts.cursor=0] Cursor start position\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n */\nclass AutocompleteMultiselectPrompt extends MultiselectPrompt {\n constructor(opts={}) {\n opts.overrideRender = true;\n super(opts);\n this.inputValue = '';\n this.clear = clear('', this.out.columns);\n this.filteredOptions = this.value;\n this.render();\n }\n\n last() {\n this.cursor = this.filteredOptions.length - 1;\n this.render();\n }\n next() {\n this.cursor = (this.cursor + 1) % this.filteredOptions.length;\n this.render();\n }\n\n up() {\n if (this.cursor === 0) {\n this.cursor = this.filteredOptions.length - 1;\n } else {\n this.cursor--;\n }\n this.render();\n }\n\n down() {\n if (this.cursor === this.filteredOptions.length - 1) {\n this.cursor = 0;\n } else {\n this.cursor++;\n }\n this.render();\n }\n\n left() {\n this.filteredOptions[this.cursor].selected = false;\n this.render();\n }\n\n right() {\n if (this.value.filter(e => e.selected).length >= this.maxChoices) return this.bell();\n this.filteredOptions[this.cursor].selected = true;\n this.render();\n }\n\n delete() {\n if (this.inputValue.length) {\n this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1);\n this.updateFilteredOptions();\n }\n }\n\n updateFilteredOptions() {\n const currentHighlight = this.filteredOptions[this.cursor];\n this.filteredOptions = this.value\n .filter(v => {\n if (this.inputValue) {\n if (typeof v.title === 'string') {\n if (v.title.toLowerCase().includes(this.inputValue.toLowerCase())) {\n return true;\n }\n }\n if (typeof v.value === 'string') {\n if (v.value.toLowerCase().includes(this.inputValue.toLowerCase())) {\n return true;\n }\n }\n return false;\n }\n return true;\n });\n const newHighlightIndex = this.filteredOptions.findIndex(v => v === currentHighlight)\n this.cursor = newHighlightIndex < 0 ? 0 : newHighlightIndex;\n this.render();\n }\n\n handleSpaceToggle() {\n const v = this.filteredOptions[this.cursor];\n\n if (v.selected) {\n v.selected = false;\n this.render();\n } else if (v.disabled || this.value.filter(e => e.selected).length >= this.maxChoices) {\n return this.bell();\n } else {\n v.selected = true;\n this.render();\n }\n }\n\n handleInputChange(c) {\n this.inputValue = this.inputValue + c;\n this.updateFilteredOptions();\n }\n\n _(c, key) {\n if (c === ' ') {\n this.handleSpaceToggle();\n } else {\n this.handleInputChange(c);\n }\n }\n\n renderInstructions() {\n if (this.instructions === undefined || this.instructions) {\n if (typeof this.instructions === 'string') {\n return this.instructions;\n }\n return `\nInstructions:\n ${figures.arrowUp}/${figures.arrowDown}: Highlight option\n ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`;\n }\n return '';\n }\n\n renderCurrentInput() {\n return `\nFiltered results for: ${this.inputValue ? this.inputValue : color.gray('Enter something to filter')}\\n`;\n }\n\n renderOption(cursor, v, i) {\n let title;\n if (v.disabled) title = cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);\n else title = cursor === i ? color.cyan().underline(v.title) : v.title;\n return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + ' ' + title\n }\n\n renderDoneOrInstructions() {\n if (this.done) {\n return this.value\n .filter(e => e.selected)\n .map(v => v.title)\n .join(', ');\n }\n\n const output = [color.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()];\n\n if (this.filteredOptions.length && this.filteredOptions[this.cursor].disabled) {\n output.push(color.yellow(this.warn));\n }\n return output.join(' ');\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n super.render();\n\n // print prompt\n\n let prompt = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(false),\n this.renderDoneOrInstructions()\n ].join(' ');\n\n if (this.showMinError) {\n prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);\n this.showMinError = false;\n }\n prompt += this.renderOptions(this.filteredOptions);\n\n this.out.write(this.clear + prompt);\n this.clear = clear(prompt, this.out.columns);\n }\n}\n\nmodule.exports = AutocompleteMultiselectPrompt;\n","const color = require('kleur');\nconst Prompt = require('./prompt');\nconst { style, clear } = require('../util');\nconst { erase, cursor } = require('sisteransi');\n\n/**\n * ConfirmPrompt Base Element\n * @param {Object} opts Options\n * @param {String} opts.message Message\n * @param {Boolean} [opts.initial] Default value (true/false)\n * @param {Stream} [opts.stdin] The Readable stream to listen to\n * @param {Stream} [opts.stdout] The Writable stream to write readline data to\n * @param {String} [opts.yes] The \"Yes\" label\n * @param {String} [opts.yesOption] The \"Yes\" option when choosing between yes/no\n * @param {String} [opts.no] The \"No\" label\n * @param {String} [opts.noOption] The \"No\" option when choosing between yes/no\n */\nclass ConfirmPrompt extends Prompt {\n constructor(opts={}) {\n super(opts);\n this.msg = opts.message;\n this.value = opts.initial;\n this.initialValue = !!opts.initial;\n this.yesMsg = opts.yes || 'yes';\n this.yesOption = opts.yesOption || '(Y/n)';\n this.noMsg = opts.no || 'no';\n this.noOption = opts.noOption || '(y/N)';\n this.render();\n }\n\n reset() {\n this.value = this.initialValue;\n this.fire();\n this.render();\n }\n\n exit() {\n this.abort();\n }\n\n abort() {\n this.done = this.aborted = true;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n submit() {\n this.value = this.value || false;\n this.done = true;\n this.aborted = false;\n this.fire();\n this.render();\n this.out.write('\\n');\n this.close();\n }\n\n _(c, key) {\n if (c.toLowerCase() === 'y') {\n this.value = true;\n return this.submit();\n }\n if (c.toLowerCase() === 'n') {\n this.value = false;\n return this.submit();\n }\n return this.bell();\n }\n\n render() {\n if (this.closed) return;\n if (this.firstRender) this.out.write(cursor.hide);\n else this.out.write(clear(this.outputText, this.out.columns));\n super.render();\n\n this.outputText = [\n style.symbol(this.done, this.aborted),\n color.bold(this.msg),\n style.delimiter(this.done),\n this.done ? (this.value ? this.yesMsg : this.noMsg)\n : color.gray(this.initialValue ? this.yesOption : this.noOption)\n ].join(' ');\n\n this.out.write(erase.line + cursor.to(0) + this.outputText);\n }\n}\n\nmodule.exports = ConfirmPrompt;\n","'use strict';\n\nmodule.exports = {\n TextPrompt: require('./text'),\n SelectPrompt: require('./select'),\n TogglePrompt: require('./toggle'),\n DatePrompt: require('./date'),\n NumberPrompt: require('./number'),\n MultiselectPrompt: require('./multiselect'),\n AutocompletePrompt: require('./autocomplete'),\n AutocompleteMultiselectPrompt: require('./autocompleteMultiselect'),\n ConfirmPrompt: require('./confirm')\n};\n","'use strict';\nconst $ = exports;\nconst el = require('./elements');\nconst noop = v => v;\n\nfunction toPrompt(type, args, opts={}) {\n return new Promise((res, rej) => {\n const p = new el[type](args);\n const onAbort = opts.onAbort || noop;\n const onSubmit = opts.onSubmit || noop;\n const onExit = opts.onExit || noop;\n p.on('state', args.onState || noop);\n p.on('submit', x => res(onSubmit(x)));\n p.on('exit', x => res(onExit(x)));\n p.on('abort', x => rej(onAbort(x)));\n });\n}\n\n/**\n * Text prompt\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {function} [args.onState] On state change callback\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.text = args => toPrompt('TextPrompt', args);\n\n/**\n * Password prompt with masked input\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {function} [args.onState] On state change callback\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.password = args => {\n args.style = 'password';\n return $.text(args);\n};\n\n/**\n * Prompt where input is invisible, like sudo\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {function} [args.onState] On state change callback\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.invisible = args => {\n args.style = 'invisible';\n return $.text(args);\n};\n\n/**\n * Number prompt\n * @param {string} args.message Prompt message to display\n * @param {number} args.initial Default number value\n * @param {function} [args.onState] On state change callback\n * @param {number} [args.max] Max value\n * @param {number} [args.min] Min value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {Boolean} [opts.float=false] Parse input as floats\n * @param {Number} [opts.round=2] Round floats to x decimals\n * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.number = args => toPrompt('NumberPrompt', args);\n\n/**\n * Date prompt\n * @param {string} args.message Prompt message to display\n * @param {number} args.initial Default number value\n * @param {function} [args.onState] On state change callback\n * @param {number} [args.max] Max value\n * @param {number} [args.min] Min value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {Boolean} [opts.float=false] Parse input as floats\n * @param {Number} [opts.round=2] Round floats to x decimals\n * @param {Number} [opts.increment=1] Number to increment by when using arrow-keys\n * @param {function} [args.validate] Function to validate user input\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.date = args => toPrompt('DatePrompt', args);\n\n/**\n * Classic yes/no prompt\n * @param {string} args.message Prompt message to display\n * @param {boolean} [args.initial=false] Default value\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.confirm = args => toPrompt('ConfirmPrompt', args);\n\n/**\n * List prompt, split intput string by `seperator`\n * @param {string} args.message Prompt message to display\n * @param {string} [args.initial] Default string value\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {string} [args.separator] String separator\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input, in form of an `Array`\n */\n$.list = args => {\n const sep = args.separator || ',';\n return toPrompt('TextPrompt', args, {\n onSubmit: str => str.split(sep).map(s => s.trim())\n });\n};\n\n/**\n * Toggle/switch prompt\n * @param {string} args.message Prompt message to display\n * @param {boolean} [args.initial=false] Default value\n * @param {string} [args.active=\"on\"] Text for `active` state\n * @param {string} [args.inactive=\"off\"] Text for `inactive` state\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.toggle = args => toPrompt('TogglePrompt', args);\n\n/**\n * Interactive select prompt\n * @param {string} args.message Prompt message to display\n * @param {Array} args.choices Array of choices objects `[{ title, value }, ...]`\n * @param {number} [args.initial] Index of default value\n * @param {String} [args.hint] Hint to display\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.select = args => toPrompt('SelectPrompt', args);\n\n/**\n * Interactive multi-select / autocompleteMultiselect prompt\n * @param {string} args.message Prompt message to display\n * @param {Array} args.choices Array of choices objects `[{ title, value, [selected] }, ...]`\n * @param {number} [args.max] Max select\n * @param {string} [args.hint] Hint to display user\n * @param {Number} [args.cursor=0] Cursor start position\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.multiselect = args => {\n args.choices = [].concat(args.choices || []);\n const toSelected = items => items.filter(item => item.selected).map(item => item.value);\n return toPrompt('MultiselectPrompt', args, {\n onAbort: toSelected,\n onSubmit: toSelected\n });\n};\n\n$.autocompleteMultiselect = args => {\n args.choices = [].concat(args.choices || []);\n const toSelected = items => items.filter(item => item.selected).map(item => item.value);\n return toPrompt('AutocompleteMultiselectPrompt', args, {\n onAbort: toSelected,\n onSubmit: toSelected\n });\n};\n\nconst byTitle = (input, choices) => Promise.resolve(\n choices.filter(item => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase())\n);\n\n/**\n * Interactive auto-complete prompt\n * @param {string} args.message Prompt message to display\n * @param {Array} args.choices Array of auto-complete choices objects `[{ title, value }, ...]`\n * @param {Function} [args.suggest] Function to filter results based on user input. Defaults to sort by `title`\n * @param {number} [args.limit=10] Max number of results to show\n * @param {string} [args.style=\"default\"] Render style ('default', 'password', 'invisible')\n * @param {String} [args.initial] Index of the default value\n * @param {boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input\n * @param {String} [args.fallback] Fallback message - defaults to initial value\n * @param {function} [args.onState] On state change callback\n * @param {Stream} [args.stdin] The Readable stream to listen to\n * @param {Stream} [args.stdout] The Writable stream to write readline data to\n * @returns {Promise} Promise with user input\n */\n$.autocomplete = args => {\n args.suggest = args.suggest || byTitle;\n args.choices = [].concat(args.choices || []);\n return toPrompt('AutocompletePrompt', args);\n};\n","'use strict';\n\nconst prompts = require('./prompts');\n\nconst passOn = ['suggest', 'format', 'onState', 'validate', 'onRender', 'type'];\nconst noop = () => {};\n\n/**\n * Prompt for a series of questions\n * @param {Array|Object} questions Single question object or Array of question objects\n * @param {Function} [onSubmit] Callback function called on prompt submit\n * @param {Function} [onCancel] Callback function called on cancel/abort\n * @returns {Object} Object with values from user input\n */\nasync function prompt(questions=[], { onSubmit=noop, onCancel=noop }={}) {\n const answers = {};\n const override = prompt._override || {};\n questions = [].concat(questions);\n let answer, question, quit, name, type, lastPrompt;\n\n const getFormattedAnswer = async (question, answer, skipValidation = false) => {\n if (!skipValidation && question.validate && question.validate(answer) !== true) {\n return;\n }\n return question.format ? await question.format(answer, answers) : answer\n };\n\n for (question of questions) {\n ({ name, type } = question);\n\n // evaluate type first and skip if type is a falsy value\n if (typeof type === 'function') {\n type = await type(answer, { ...answers }, question)\n question['type'] = type\n }\n if (!type) continue;\n\n // if property is a function, invoke it unless it's a special function\n for (let key in question) {\n if (passOn.includes(key)) continue;\n let value = question[key];\n question[key] = typeof value === 'function' ? await value(answer, { ...answers }, lastPrompt) : value;\n }\n\n lastPrompt = question;\n\n if (typeof question.message !== 'string') {\n throw new Error('prompt message is required');\n }\n\n // update vars in case they changed\n ({ name, type } = question);\n\n if (prompts[type] === void 0) {\n throw new Error(`prompt type (${type}) is not defined`);\n }\n\n if (override[question.name] !== undefined) {\n answer = await getFormattedAnswer(question, override[question.name]);\n if (answer !== undefined) {\n answers[name] = answer;\n continue;\n }\n }\n\n try {\n // Get the injected answer if there is one or prompt the user\n answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts[type](question);\n answers[name] = answer = await getFormattedAnswer(question, answer, true);\n quit = await onSubmit(question, answer, answers);\n } catch (err) {\n quit = !(await onCancel(question, answers));\n }\n\n if (quit) return answers;\n }\n\n return answers;\n}\n\nfunction getInjectedAnswer(injected, deafultValue) {\n const answer = injected.shift();\n if (answer instanceof Error) {\n throw answer;\n }\n\n return (answer === undefined) ? deafultValue : answer;\n}\n\nfunction inject(answers) {\n prompt._injected = (prompt._injected || []).concat(answers);\n}\n\nfunction override(answers) {\n prompt._override = Object.assign({}, answers);\n}\n\nmodule.exports = Object.assign(prompt, { prompt, prompts, inject, override });\n","function isNodeLT(tar) {\n tar = (Array.isArray(tar) ? tar : tar.split('.')).map(Number);\n let i=0, src=process.versions.node.split('.').map(Number);\n for (; i < tar.length; i++) {\n if (src[i] > tar[i]) return false;\n if (tar[i] > src[i]) return true;\n }\n return false;\n}\n\nmodule.exports =\n isNodeLT('8.6.0')\n ? require('./dist/index.js')\n : require('./lib/index.js');\n","import { type NamingOptions, toCamelCase, toPascalCase } from \"@cerios/openapi-core\";\n\nexport interface EnumOpenApiGeneratorOptions extends NamingOptions {}\n\nexport interface EnumResult {\n\tschemaCode: string;\n\ttypeCode: string;\n}\n\n/**\n * Generate Zod enum schema\n * - String-only enums: z.enum()\n * - Numeric enums: z.union([z.literal(), ...])\n * - Boolean enums: z.boolean()\n * - Mixed enums: z.union([z.literal(), ...])\n */\nexport function generateEnum(\n\tname: string,\n\tvalues: (string | number | boolean)[],\n\toptions: EnumOpenApiGeneratorOptions\n): EnumResult {\n\tconst schemaName = `${toCamelCase(name, options)}Schema`;\n\tconst typeName = toPascalCase(name);\n\n\t// Check if all values are booleans\n\tconst allBooleans = values.every(v => typeof v === \"boolean\");\n\tif (allBooleans) {\n\t\t// For boolean enums, use z.boolean()\n\t\tconst schemaCode = `export const ${schemaName} = z.boolean();`;\n\t\tconst typeCode = `export type ${typeName} = z.infer<typeof ${schemaName}>;`;\n\t\treturn { schemaCode, typeCode };\n\t}\n\n\t// Check if all values are strings\n\tconst allStrings = values.every(v => typeof v === \"string\");\n\tif (allStrings) {\n\t\t// z.enum only accepts string values\n\t\tconst enumValues = values.map(v => `\"${v}\"`).join(\", \");\n\t\tconst schemaCode = `export const ${schemaName} = z.enum([${enumValues}]);`;\n\t\tconst typeCode = `export type ${typeName} = z.infer<typeof ${schemaName}>;`;\n\t\treturn { schemaCode, typeCode };\n\t}\n\n\t// For numeric or mixed enums, use z.union with z.literal\n\tconst literalValues = values\n\t\t.map(v => {\n\t\t\tif (typeof v === \"string\") {\n\t\t\t\treturn `z.literal(\"${v}\")`;\n\t\t\t}\n\t\t\treturn `z.literal(${v})`;\n\t\t})\n\t\t.join(\", \");\n\n\tconst schemaCode = `export const ${schemaName} = z.union([${literalValues}]);`;\n\tconst typeCode = `export type ${typeName} = z.infer<typeof ${schemaName}>;`;\n\n\treturn { schemaCode, typeCode };\n}\n","import { escapeJSDoc } from \"@cerios/openapi-core\";\n\nimport type { OpenAPISchema } from \"../types\";\n\nexport interface JSDocOptions {\n\tincludeDescriptions: boolean;\n}\n\n/**\n * Generate JSDoc comment for a schema or property\n * Type-safe with input validation to prevent JSDoc injection\n */\nexport function generateJSDoc(\n\tschema: OpenAPISchema,\n\tname?: string,\n\toptions: JSDocOptions = { includeDescriptions: true }\n): string {\n\t// Type safety: Validate schema input\n\tif (!schema || typeof schema !== \"object\") {\n\t\treturn \"\";\n\t}\n\n\tif (!options.includeDescriptions) {\n\t\t// Only add @deprecated if descriptions are disabled\n\t\tif (schema.deprecated) {\n\t\t\treturn \"/** @deprecated */\\n\";\n\t\t}\n\t\treturn \"\";\n\t}\n\n\t// Check if we have anything to document\n\tif (!schema.description && !schema.title && !schema.deprecated && !schema.examples && schema.example === undefined) {\n\t\treturn \"\";\n\t}\n\n\tconst parts: string[] = [];\n\n\t// Add title if different from name (sanitized)\n\tif (schema.title && typeof schema.title === \"string\" && (!name || schema.title !== name)) {\n\t\t// Sanitize title to prevent JSDoc injection\n\t\tparts.push(escapeJSDoc(schema.title));\n\t}\n\n\t// Add description (sanitized to prevent injection)\n\tif (schema.description && typeof schema.description === \"string\") {\n\t\t// Escape @ symbols and other JSDoc tags to prevent injection\n\t\tparts.push(escapeJSDoc(schema.description));\n\t}\n\n\t// Add examples (with type safety)\n\tif (schema.examples && Array.isArray(schema.examples) && schema.examples.length > 0) {\n\t\ttry {\n\t\t\tconst examplesStr = schema.examples.map(ex => JSON.stringify(ex)).join(\", \");\n\t\t\tparts.push(`@example ${examplesStr}`);\n\t\t} catch (error) {\n\t\t\t// Skip examples that can't be serialized\n\t\t\tconsole.warn(\"Warning: Could not serialize schema examples\", error);\n\t\t}\n\t} else if (schema.example !== undefined) {\n\t\ttry {\n\t\t\tparts.push(`@example ${JSON.stringify(schema.example)}`);\n\t\t} catch (error) {\n\t\t\t// Skip example that can't be serialized\n\t\t\tconsole.warn(\"Warning: Could not serialize schema example\", error);\n\t\t}\n\t}\n\n\t// Add deprecated\n\tif (schema.deprecated) {\n\t\tparts.push(\"@deprecated\");\n\t}\n\n\tif (parts.length === 0) {\n\t\treturn \"\";\n\t}\n\n\tconst fullComment = parts.join(\" \");\n\treturn `/** ${fullComment} */\\n`;\n}\n","/**\n * Zod-specific string utility functions\n *\n * For core utilities (escapeDescription, etc.), import from @cerios/openapi-core\n */\n\nimport { escapeDescription } from \"@cerios/openapi-core\";\n\n/**\n * Wrap validation with .nullable() if needed\n */\nexport function wrapNullable(validation: string, nullable: boolean): string {\n\treturn nullable ? `${validation}.nullable()` : validation;\n}\n\n/**\n * Add description to a schema validation string\n */\nexport function addDescription(validation: string, description: string | undefined, useDescribe: boolean): string {\n\tif (!description || !useDescribe) return validation;\n\n\tconst escapedDesc = escapeDescription(description);\n\treturn `${validation}.describe(\"${escapedDesc}\")`;\n}\n","import type { OpenAPISchema } from \"../types\";\nimport { addDescription } from \"../utils/string-utils\";\n\nexport interface ArrayValidatorContext {\n\tgeneratePropertySchema: (schema: OpenAPISchema, currentSchema?: string) => string;\n\tuseDescribe: boolean;\n\tcurrentSchema?: string;\n}\n\n/**\n * Generate array or tuple validation\n */\nexport function generateArrayValidation(schema: OpenAPISchema, context: ArrayValidatorContext): string {\n\tlet validation: string;\n\n\t// Handle prefixItems (tuple validation - OpenAPI 3.1)\n\tif (schema.prefixItems && schema.prefixItems.length > 0) {\n\t\tconst tupleItems = schema.prefixItems.map(item => context.generatePropertySchema(item, context.currentSchema));\n\t\tvalidation = `z.tuple([${tupleItems.join(\", \")}])`;\n\n\t\t// Add rest items if specified (items after the fixed prefix)\n\t\t// items takes precedence over unevaluatedItems\n\t\tif (schema.items) {\n\t\t\tconst restSchema = context.generatePropertySchema(schema.items, context.currentSchema);\n\t\t\tvalidation += `.rest(${restSchema})`;\n\t\t} else if (schema.unevaluatedItems && typeof schema.unevaluatedItems === \"object\") {\n\t\t\t// Use unevaluatedItems as rest schema if items not specified\n\t\t\tconst restSchema = context.generatePropertySchema(schema.unevaluatedItems, context.currentSchema);\n\t\t\tvalidation += `.rest(${restSchema})`;\n\t\t}\n\t\t// If unevaluatedItems is false (or undefined), tuple has fixed length by default\n\t} else if (schema.items) {\n\t\tconst itemSchema = context.generatePropertySchema(schema.items, context.currentSchema);\n\t\tvalidation = `z.array(${itemSchema})`;\n\n\t\t// Add array constraints\n\t\tif (schema.minItems !== undefined) {\n\t\t\tvalidation += `.min(${schema.minItems})`;\n\t\t}\n\t\tif (schema.maxItems !== undefined) {\n\t\t\tvalidation += `.max(${schema.maxItems})`;\n\t\t}\n\n\t\t// Add uniqueItems constraint\n\t\tif (schema.uniqueItems === true) {\n\t\t\tvalidation += `.refine((items) => new Set(items).size === items.length, { message: \"Array items must be unique\" })`;\n\t\t}\n\t} else {\n\t\tvalidation = \"z.array(z.unknown())\";\n\t}\n\n\t// Handle contains with min/max constraints\n\tif (schema.contains) {\n\t\tconst containsSchema = context.generatePropertySchema(schema.contains, context.currentSchema);\n\t\tconst minCount = schema.minContains ?? 1;\n\t\tconst maxCount = schema.maxContains;\n\n\t\tif (maxCount !== undefined) {\n\t\t\t// Both min and max\n\t\t\tvalidation += `.refine((arr) => { const matches = arr.filter(item => ${containsSchema}.safeParse(item).success); return matches.length >= ${minCount} && matches.length <= ${maxCount}; }, { message: \"Array must contain between ${minCount} and ${maxCount} items matching the schema\" })`;\n\t\t} else {\n\t\t\t// Just min\n\t\t\tvalidation += `.refine((arr) => arr.filter(item => ${containsSchema}.safeParse(item).success).length >= ${minCount}, { message: \"Array must contain at least ${minCount} item(s) matching the schema\" })`;\n\t\t}\n\t}\n\n\t// Handle unevaluatedItems (OpenAPI 3.1) - only applies to prefixItems scenarios\n\t// Note: unevaluatedItems with prefixItems should use .rest() which was already handled above\n\t// This section handles the false case which needs to restrict the length\n\tif (schema.unevaluatedItems === false && schema.prefixItems && schema.prefixItems.length > 0 && !schema.items) {\n\t\t// No items beyond prefixItems allowed - add length restriction\n\t\tconst prefixCount = schema.prefixItems.length;\n\t\tvalidation += `.refine((arr) => arr.length <= ${prefixCount}, { message: \"No unevaluated items allowed beyond prefix items\" })`;\n\t}\n\n\t// Add description if useDescribe is enabled\n\treturn addDescription(validation, schema.description, context.useDescribe);\n}\n","import type { OpenAPISchema } from \"../types\";\nimport { wrapNullable } from \"../utils/string-utils\";\n\nexport interface CompositionValidatorContext {\n\tgeneratePropertySchema: (\n\t\tschema: OpenAPISchema,\n\t\tcurrentSchema?: string,\n\t\tisTopLevel?: boolean,\n\t\tsuppressDefaultNullable?: boolean\n\t) => string;\n\t/**\n\t * Generate inline object shape for use with .extend()\n\t * Returns just the shape object literal: { prop1: z.string(), prop2: z.number() }\n\t * This avoids the .nullable().shape bug when inline objects have nullable: true\n\t */\n\tgenerateInlineObjectShape?: (schema: OpenAPISchema, currentSchema?: string) => string;\n\tresolveDiscriminatorMapping?: (mapping: Record<string, string>, schemas: OpenAPISchema[]) => OpenAPISchema[];\n\tresolveSchemaRef?: (ref: string) => OpenAPISchema | undefined;\n\t/**\n\t * Warning function for non-fatal issues during composition validation\n\t * If not provided, warnings are silently ignored\n\t */\n\twarn?: (message: string) => void;\n}\n\nexport interface UnionOptions {\n\tpassthrough?: boolean;\n\tdiscriminatorMapping?: Record<string, string>;\n}\n\n/**\n * Result from generateAllOf containing the schema and any conflicts detected\n */\nexport interface AllOfResult {\n\t/** The generated Zod schema string */\n\tschema: string;\n\t/** Array of conflict descriptions (property names are NOT escaped - consumer should escape for their use case) */\n\tconflicts: string[];\n}\n\n/**\n * Check if discriminator property is required in all schemas\n */\nfunction isDiscriminatorRequired(\n\tschemas: OpenAPISchema[],\n\tdiscriminator: string,\n\tcontext: CompositionValidatorContext\n): { valid: boolean; invalidSchemas: string[] } {\n\tconst invalidSchemas: string[] = [];\n\n\tfor (const schema of schemas) {\n\t\tconst resolved = resolveSchema(schema, context);\n\t\tconst required = resolved.required || [];\n\n\t\tif (!required.includes(discriminator)) {\n\t\t\tconst schemaName = schema.$ref ? schema.$ref.split(\"/\").pop() || \"inline\" : \"inline\";\n\t\t\tinvalidSchemas.push(schemaName);\n\t\t}\n\t}\n\n\treturn {\n\t\tvalid: invalidSchemas.length === 0,\n\t\tinvalidSchemas,\n\t};\n}\n\n/**\n * Generate union validation\n */\nexport function generateUnion(\n\tschemas: OpenAPISchema[],\n\tdiscriminator: string | undefined,\n\tisNullable: boolean,\n\tcontext: CompositionValidatorContext,\n\toptions?: UnionOptions,\n\tcurrentSchema?: string\n): string {\n\t// Handle empty oneOf/anyOf - malformed spec, warn and return z.never()\n\tif (schemas.length === 0) {\n\t\tcontext.warn?.(\n\t\t\t\"Empty oneOf/anyOf array encountered. This is likely a malformed OpenAPI spec. Generating z.never() as fallback.\"\n\t\t);\n\t\treturn wrapNullable(\n\t\t\t'z.never().describe(\"Empty oneOf/anyOf in OpenAPI spec - no valid schema defined\")',\n\t\t\tisNullable\n\t\t);\n\t}\n\n\t// Simplify single-item oneOf/anyOf - no union needed\n\tif (schemas.length === 1) {\n\t\t// Suppress defaultNullable - this is a schema definition, not a property value\n\t\tlet singleSchema = context.generatePropertySchema(schemas[0], currentSchema, false, true);\n\t\tif (options?.passthrough && !singleSchema.includes(\".catchall(\")) {\n\t\t\tsingleSchema = `${singleSchema}.catchall(z.unknown())`;\n\t\t}\n\t\treturn wrapNullable(singleSchema, isNullable);\n\t}\n\n\tif (discriminator) {\n\t\t// Apply discriminator mapping if provided\n\t\tlet resolvedSchemas = schemas;\n\t\tif (options?.discriminatorMapping && context.resolveDiscriminatorMapping) {\n\t\t\tresolvedSchemas = context.resolveDiscriminatorMapping(options.discriminatorMapping, schemas);\n\t\t}\n\n\t\t// Check if discriminator is required in all schemas\n\t\tconst discriminatorCheck = isDiscriminatorRequired(resolvedSchemas, discriminator, context);\n\n\t\tif (!discriminatorCheck.valid) {\n\t\t\t// Discriminator is not required in all schemas - fallback to z.union()\n\t\t\tcontext.warn?.(\n\t\t\t\t`Discriminator \"${discriminator}\" is not required in schemas: ${discriminatorCheck.invalidSchemas.join(\", \")}. ` +\n\t\t\t\t\t\"Falling back to z.union() instead of z.discriminatedUnion().\"\n\t\t\t);\n\n\t\t\t// Suppress defaultNullable on each variant - they are schema definitions, not property values\n\t\t\tlet schemaStrings = resolvedSchemas.map(s => context.generatePropertySchema(s, currentSchema, false, true));\n\t\t\tif (options?.passthrough) {\n\t\t\t\tschemaStrings = schemaStrings.map(s => (s.includes(\".catchall(\") ? s : `${s}.catchall(z.unknown())`));\n\t\t\t}\n\n\t\t\tconst fallbackDescription = `Discriminator \"${discriminator}\" is optional in some schemas (${discriminatorCheck.invalidSchemas.join(\", \")}), using z.union() instead of z.discriminatedUnion()`;\n\t\t\tconst union = `z.union([${schemaStrings.join(\", \")}]).describe(\"${fallbackDescription}\")`;\n\t\t\treturn wrapNullable(union, isNullable);\n\t\t}\n\n\t\t// Use discriminated union for better type inference\n\t\t// Suppress defaultNullable on each variant - they are schema definitions, not property values\n\t\tlet schemaStrings = resolvedSchemas.map(s => context.generatePropertySchema(s, currentSchema, false, true));\n\t\tif (options?.passthrough) {\n\t\t\tschemaStrings = schemaStrings.map(s => (s.includes(\".catchall(\") ? s : `${s}.catchall(z.unknown())`));\n\t\t}\n\t\tconst union = `z.discriminatedUnion(\"${discriminator}\", [${schemaStrings.join(\", \")}])`;\n\t\treturn wrapNullable(union, isNullable);\n\t}\n\n\t// Suppress defaultNullable on each variant - they are schema definitions, not property values\n\tlet schemaStrings = schemas.map(s => context.generatePropertySchema(s, currentSchema, false, true));\n\tif (options?.passthrough) {\n\t\tschemaStrings = schemaStrings.map(s => (s.includes(\".catchall(\") ? s : `${s}.catchall(z.unknown())`));\n\t}\n\tconst union = `z.union([${schemaStrings.join(\", \")}])`;\n\treturn wrapNullable(union, isNullable);\n}\n\n/**\n * Helper to resolve schema (follows $ref if needed)\n */\nfunction resolveSchema(schema: OpenAPISchema, context: CompositionValidatorContext): OpenAPISchema {\n\tif (schema.$ref && context.resolveSchemaRef) {\n\t\tconst resolved = context.resolveSchemaRef(schema.$ref);\n\t\tif (resolved) {\n\t\t\treturn resolved;\n\t\t}\n\t}\n\treturn schema;\n}\n\n/**\n * Collect properties from a schema (including nested allOf)\n */\nfunction collectProperties(\n\tschema: OpenAPISchema,\n\tcontext: CompositionValidatorContext\n): Map<string, { schema: OpenAPISchema; source: string }> {\n\tconst resolved = resolveSchema(schema, context);\n\tconst props = new Map<string, { schema: OpenAPISchema; source: string }>();\n\n\t// Get source name for error messages\n\tconst sourceName = schema.$ref ? schema.$ref.split(\"/\").pop() || \"unknown\" : \"inline\";\n\n\t// Collect direct properties\n\tif (resolved.properties) {\n\t\tfor (const [key, value] of Object.entries(resolved.properties)) {\n\t\t\tprops.set(key, { schema: value, source: sourceName });\n\t\t}\n\t}\n\n\t// Recursively collect from nested allOf\n\tif (resolved.allOf) {\n\t\tfor (const subSchema of resolved.allOf) {\n\t\t\tconst subProps = collectProperties(subSchema, context);\n\t\t\tfor (const [key, value] of subProps) {\n\t\t\t\tif (!props.has(key)) {\n\t\t\t\t\tprops.set(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn props;\n}\n\n/**\n * Check if two schemas are semantically equivalent\n */\nfunction schemasMatch(a: OpenAPISchema, b: OpenAPISchema): boolean {\n\t// Simple deep comparison for common cases\n\treturn JSON.stringify(a) === JSON.stringify(b);\n}\n\n/**\n * Detect conflicting properties across allOf schemas\n */\nfunction detectConflictingProperties(schemas: OpenAPISchema[], context: CompositionValidatorContext): string[] {\n\tconst conflicts: string[] = [];\n\tconst propertyMap = new Map<string, { schema: OpenAPISchema; source: string }>();\n\n\tfor (const schema of schemas) {\n\t\tconst schemaProps = collectProperties(schema, context);\n\n\t\tfor (const [propName, propInfo] of schemaProps) {\n\t\t\tconst existing = propertyMap.get(propName);\n\t\t\tif (existing) {\n\t\t\t\t// Check if the definitions match\n\t\t\t\tif (!schemasMatch(existing.schema, propInfo.schema)) {\n\t\t\t\t\tconflicts.push(\n\t\t\t\t\t\t`Property \"${propName}\" has conflicting definitions in ${existing.source} and ${propInfo.source}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpropertyMap.set(propName, propInfo);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn conflicts;\n}\n\n/**\n * Generate allOf validation\n *\n * Key fix: For inline objects in allOf, we generate the shape directly as an object literal\n * (e.g., { prop: z.string() }) instead of using z.object({...}).shape.\n * This avoids the invalid .nullable().shape pattern that occurs when inline objects\n * have nullable: true set.\n *\n * According to Zod docs (https://zod.dev/api?id=extend):\n * - .extend() accepts an object of shape definitions OR another schema's .shape\n * - For $refs: use baseSchema.extend(otherSchema.shape)\n * - For inline objects: use baseSchema.extend({ prop: z.string() })\n * - .nullable() must be applied AFTER all .extend() calls\n * - defaultNullable should NOT apply to schemas in allOf - they are schema shapes, not property values\n */\nexport function generateAllOf(\n\tschemas: OpenAPISchema[],\n\tisNullable: boolean,\n\tcontext: CompositionValidatorContext,\n\tcurrentSchema?: string\n): AllOfResult {\n\tif (schemas.length === 1) {\n\t\t// Single-item allOf is essentially an alias - suppress defaultNullable\n\t\t// because this is a schema definition, not a property value\n\t\tconst singleSchema = context.generatePropertySchema(schemas[0], currentSchema, false, true);\n\t\treturn { schema: wrapNullable(singleSchema, isNullable), conflicts: [] };\n\t}\n\n\t// Detect conflicting properties and warn\n\tconst conflicts = detectConflictingProperties(schemas, context);\n\tconst uniqueConflicts = [...new Set(conflicts)];\n\tif (uniqueConflicts.length > 0) {\n\t\tfor (const conflict of uniqueConflicts) {\n\t\t\tcontext.warn?.(`allOf composition conflict - ${conflict}`);\n\t\t}\n\t}\n\n\t// Check if all schemas are objects (for .extend() support)\n\tconst allObjects = schemas.every(s => s.type === \"object\" || s.properties || s.$ref || s.allOf);\n\n\tlet result: string;\n\tif (allObjects) {\n\t\t// Use .extend() for object schemas (Zod v4 compliant - .merge() is deprecated)\n\t\t// First schema is the base - generate with suppressDefaultNullable=true\n\t\t// because this is a schema shape, not a property value\n\t\tlet merged = context.generatePropertySchema(schemas[0], currentSchema, false, true);\n\n\t\t// For subsequent schemas, determine how to extend\n\t\tfor (let i = 1; i < schemas.length; i++) {\n\t\t\tconst schema = schemas[i];\n\n\t\t\tif (schema.$ref) {\n\t\t\t\t// For $ref schemas, use .extend(refSchema.shape)\n\t\t\t\t// Suppress defaultNullable - this is a schema shape, not a property value\n\t\t\t\tconst refSchema = context.generatePropertySchema(schema, currentSchema, false, true);\n\t\t\t\tmerged = `${merged}.extend(${refSchema}.shape)`;\n\t\t\t} else if (context.generateInlineObjectShape && (schema.properties || schema.type === \"object\")) {\n\t\t\t\t// For inline objects, generate shape directly as object literal\n\t\t\t\t// This avoids the .nullable().shape bug - we pass { prop: z.string() }\n\t\t\t\t// directly to .extend() instead of z.object({...}).nullable().shape\n\t\t\t\t// Note: generateInlineObjectShape respects defaultNullable for properties INSIDE the object\n\t\t\t\tconst inlineShape = context.generateInlineObjectShape(schema, currentSchema);\n\t\t\t\tmerged = `${merged}.extend(${inlineShape})`;\n\t\t\t} else {\n\t\t\t\t// Fallback for schemas without properties (e.g., just has allOf)\n\t\t\t\t// Generate full schema with suppressDefaultNullable and use .shape\n\t\t\t\tconst schemaString = context.generatePropertySchema(schema, currentSchema, false, true);\n\t\t\t\tmerged = `${merged}.extend(${schemaString}.shape)`;\n\t\t\t}\n\t\t}\n\t\tresult = merged;\n\t} else {\n\t\t// Use .and() for non-object schemas (intersection)\n\t\t// Suppress defaultNullable on each schema in the intersection\n\t\tconst schemaStrings = schemas.map(s => context.generatePropertySchema(s, currentSchema, false, true));\n\t\tlet merged = schemaStrings[0];\n\t\tfor (let i = 1; i < schemaStrings.length; i++) {\n\t\t\tmerged = `${merged}.and(${schemaStrings[i]})`;\n\t\t}\n\t\tresult = merged;\n\t}\n\n\t// Apply nullable at the END, after all .extend() calls\n\t// This is critical - .nullable() must come after .extend(), not before\n\treturn { schema: wrapNullable(result, isNullable), conflicts: uniqueConflicts };\n}\n","import type { OpenAPISchema } from \"../types\";\nimport { addDescription } from \"../utils/string-utils\";\n\n/**\n * Generate Zod validation for number\n */\nexport function generateNumberValidation(schema: OpenAPISchema, isInt: boolean, useDescribe: boolean): string {\n\tlet validation = isInt ? \"z.number().int()\" : \"z.number()\";\n\n\t// Handle minimum with exclusive bounds\n\tif (schema.minimum !== undefined) {\n\t\tconst isExclusive = schema.exclusiveMinimum === true;\n\t\tvalidation += isExclusive ? `.gt(${schema.minimum})` : `.gte(${schema.minimum})`;\n\t} else if (typeof schema.exclusiveMinimum === \"number\") {\n\t\t// OpenAPI 3.1 style: exclusiveMinimum as number\n\t\tvalidation += `.gt(${schema.exclusiveMinimum})`;\n\t}\n\n\t// Handle maximum with exclusive bounds\n\tif (schema.maximum !== undefined) {\n\t\tconst isExclusive = schema.exclusiveMaximum === true;\n\t\tvalidation += isExclusive ? `.lt(${schema.maximum})` : `.lte(${schema.maximum})`;\n\t} else if (typeof schema.exclusiveMaximum === \"number\") {\n\t\t// OpenAPI 3.1 style: exclusiveMaximum as number\n\t\tvalidation += `.lt(${schema.exclusiveMaximum})`;\n\t}\n\n\tif (schema.multipleOf !== undefined) {\n\t\tvalidation += `.multipleOf(${schema.multipleOf})`;\n\t}\n\n\t// Add description if useDescribe is enabled\n\treturn addDescription(validation, schema.description, useDescribe);\n}\n","import type { OpenAPISchema } from \"../types\";\n\n/**\n * Generate property access expression (use dot notation for valid identifiers, bracket notation otherwise)\n */\nfunction generatePropertyAccess(propName: string): string {\n\t// Valid identifier: starts with letter/underscore/$, followed by letters/digits/underscores/$\n\tconst validIdentifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;\n\treturn validIdentifier.test(propName) ? `obj.${propName}` : `obj[\"${propName}\"]`;\n}\n\n/**\n * Generate validation for dependencies (OpenAPI 3.0)\n * Generates detailed error messages showing which specific fields are missing\n */\nexport function generateDependencies(\n\tschema: OpenAPISchema,\n\tgeneratePropertySchema?: (schema: OpenAPISchema, currentSchema?: string) => string,\n\tcurrentSchema?: string\n): string {\n\tif (!schema.dependencies) {\n\t\treturn \"\";\n\t}\n\n\tlet result = \"\";\n\tfor (const [prop, dependency] of Object.entries(schema.dependencies)) {\n\t\tif (Array.isArray(dependency)) {\n\t\t\t// Skip empty dependency arrays (no dependencies to enforce)\n\t\t\tif (dependency.length === 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Property dependency - show specific missing properties in error message\n\t\t\tconst propAccess = generatePropertyAccess(prop);\n\t\t\tconst checkLogic = dependency\n\t\t\t\t.map(p => {\n\t\t\t\t\tconst pAccess = generatePropertyAccess(p);\n\t\t\t\t\treturn `if (${pAccess} === undefined) missing.push('${p}');`;\n\t\t\t\t})\n\t\t\t\t.join(\"\\n\\t\\t\");\n\n\t\t\tresult += `.superRefine((obj, ctx) => {\n\t\t\t\tif (${propAccess} === undefined) return;\n\t\t\t\tconst missing: string[] = [];\n\t\t\t\t${checkLogic}\n\t\t\t\tif (missing.length > 0) {\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tmessage: \\`When '${prop}' is present, the following properties are required: \\${missing.join(', ')}\\`,\n\t\t\t\t\t\tpath: []\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})`;\n\t\t} else if (generatePropertySchema) {\n\t\t\t// Schema dependency - show detailed validation errors\n\t\t\tconst depSchema: OpenAPISchema = { ...dependency, type: dependency.type || \"object\" };\n\t\t\tconst depSchemaValidation = generatePropertySchema(depSchema, currentSchema);\n\t\t\tconst propAccess = generatePropertyAccess(prop);\n\n\t\t\tresult += `.superRefine((obj, ctx) => {\n\t\t\t\tif (${propAccess} === undefined) return;\n\t\t\t\tconst validation = ${depSchemaValidation}.safeParse(obj);\n\t\t\t\tif (!validation.success) {\n\t\t\t\t\tconst errors = validation.error.issues.map(i => \\` - \\${i.path.join('.')}: \\${i.message}\\`).join('\\\\n');\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tmessage: \\`When '${prop}' is present, object must satisfy additional constraints:\\\\n\\${errors}\\`,\n\t\t\t\t\t\tpath: []\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})`;\n\t\t}\n\t}\n\treturn result;\n}\n\n/**\n * Generate condition check for if/then/else\n */\nexport function generateConditionalCheck(schema: OpenAPISchema): string {\n\tconst conditions: string[] = [];\n\n\t// Check properties\n\tif (schema.properties) {\n\t\tfor (const [prop, propSchema] of Object.entries(schema.properties)) {\n\t\t\tconst propAccess = generatePropertyAccess(prop);\n\t\t\tif (propSchema.type) {\n\t\t\t\tconst schemaType = Array.isArray(propSchema.type) ? propSchema.type[0] : propSchema.type;\n\t\t\t\tconditions.push(`typeof ${propAccess} === \"${schemaType}\"`);\n\t\t\t}\n\t\t\tif (propSchema.const !== undefined) {\n\t\t\t\tconst value = typeof propSchema.const === \"string\" ? `\"${propSchema.const}\"` : propSchema.const;\n\t\t\t\tconditions.push(`${propAccess} === ${value}`);\n\t\t\t}\n\t\t\tif (propSchema.minimum !== undefined) {\n\t\t\t\tconditions.push(`${propAccess} >= ${propSchema.minimum}`);\n\t\t\t}\n\t\t\tif (propSchema.maximum !== undefined) {\n\t\t\t\tconditions.push(`${propAccess} <= ${propSchema.maximum}`);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check required properties\n\tif (schema.required) {\n\t\tfor (const prop of schema.required) {\n\t\t\tconditions.push(`${generatePropertyAccess(prop)} !== undefined`);\n\t\t}\n\t}\n\n\treturn conditions.length > 0 ? conditions.join(\" && \") : \"true\";\n}\n\n/**\n * Generate validation for then/else clauses\n */\nexport function generateConditionalValidation(schema: OpenAPISchema): string {\n\tconst checks: string[] = [];\n\n\t// Check required properties\n\tif (schema.required) {\n\t\tfor (const prop of schema.required) {\n\t\t\tchecks.push(`${generatePropertyAccess(prop)} !== undefined`);\n\t\t}\n\t}\n\n\t// Check properties constraints\n\tif (schema.properties) {\n\t\tfor (const [prop, propSchema] of Object.entries(schema.properties)) {\n\t\t\tconst propAccess = generatePropertyAccess(prop);\n\t\t\tif (propSchema.minimum !== undefined) {\n\t\t\t\tchecks.push(`${propAccess} === undefined || ${propAccess} >= ${propSchema.minimum}`);\n\t\t\t}\n\t\t\tif (propSchema.maximum !== undefined) {\n\t\t\t\tchecks.push(`${propAccess} === undefined || ${propAccess} <= ${propSchema.maximum}`);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn checks.length > 0 ? checks.join(\" && \") : \"true\";\n}\n\n/**\n * Generate if/then/else conditional validation with better error messages\n * Uses superRefine with detailed error messages for complex cases\n */\nexport function generateIfThenElse(schema: OpenAPISchema): string {\n\tif (!schema.if || (!schema.then && !schema.else)) {\n\t\treturn \"\";\n\t}\n\n\tconst ifCondition = generateConditionalCheck(schema.if);\n\n\tif (schema.then && schema.else) {\n\t\t// Both then and else - provide detailed error messages\n\t\tconst thenValidation = generateConditionalValidation(schema.then);\n\t\tconst elseValidation = generateConditionalValidation(schema.else);\n\n\t\t// Try to detect which specific validations failed\n\t\tconst thenRequiredProps = schema.then.required || [];\n\t\tconst elseRequiredProps = schema.else.required || [];\n\n\t\treturn `.superRefine((obj, ctx) => {\n\t\t\tconst ifConditionMet = ${ifCondition};\n\t\t\tif (ifConditionMet) {\n\t\t\t\t// Then branch\n\t\t\t\tconst thenValid = ${thenValidation};\n\t\t\t\tif (!thenValid) {\n\t\t\t\t\t${\n\t\t\t\t\t\tthenRequiredProps.length > 0\n\t\t\t\t\t\t\t? `\n\t\t\t\t\tconst missingThenProps = ${JSON.stringify(thenRequiredProps)}.filter(p => obj[p] === undefined);\n\t\t\t\t\tconst message = missingThenProps.length > 0\n\t\t\t\t\t\t? \\`When condition is met, required properties are missing: \\${missingThenProps.join(', ')}\\`\n\t\t\t\t\t\t: \"When condition is met, validation constraints failed\";\n\t\t\t\t\t`\n\t\t\t\t\t\t\t: `\n\t\t\t\t\tconst message = \"When condition is met, validation constraints failed\";\n\t\t\t\t\t`\n\t\t\t\t\t}\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tmessage: message,\n\t\t\t\t\t\tpath: []\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Else branch\n\t\t\t\tconst elseValid = ${elseValidation};\n\t\t\t\tif (!elseValid) {\n\t\t\t\t\t${\n\t\t\t\t\t\telseRequiredProps.length > 0\n\t\t\t\t\t\t\t? `\n\t\t\t\t\tconst missingElseProps = ${JSON.stringify(elseRequiredProps)}.filter(p => obj[p] === undefined);\n\t\t\t\t\tconst message = missingElseProps.length > 0\n\t\t\t\t\t\t? \\`When condition is not met, required properties are missing: \\${missingElseProps.join(', ')}\\`\n\t\t\t\t\t\t: \"When condition is not met, validation constraints failed\";\n\t\t\t\t\t`\n\t\t\t\t\t\t\t: `\n\t\t\t\t\tconst message = \"When condition is not met, validation constraints failed\";\n\t\t\t\t\t`\n\t\t\t\t\t}\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tmessage: message,\n\t\t\t\t\t\tpath: []\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t})`;\n\t}\n\n\tif (schema.then) {\n\t\t// Only then - provide detailed error message\n\t\tconst thenValidation = generateConditionalValidation(schema.then);\n\t\tconst thenRequiredProps = schema.then.required || [];\n\n\t\treturn `.superRefine((obj, ctx) => {\n\t\t\tconst ifConditionMet = ${ifCondition};\n\t\t\tif (ifConditionMet) {\n\t\t\t\tconst thenValid = ${thenValidation};\n\t\t\t\tif (!thenValid) {\n\t\t\t\t\t${\n\t\t\t\t\t\tthenRequiredProps.length > 0\n\t\t\t\t\t\t\t? `\n\t\t\t\t\tconst missingProps = ${JSON.stringify(thenRequiredProps)}.filter(p => obj[p] === undefined);\n\t\t\t\t\tconst message = missingProps.length > 0\n\t\t\t\t\t\t? \\`When condition is met, required properties are missing: \\${missingProps.join(', ')}\\`\n\t\t\t\t\t\t: \"When condition is met, validation constraints failed\";\n\t\t\t\t\t`\n\t\t\t\t\t\t\t: `\n\t\t\t\t\tconst message = \"When condition is met, validation constraints failed\";\n\t\t\t\t\t`\n\t\t\t\t\t}\n\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\tmessage: message,\n\t\t\t\t\t\tpath: []\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t})`;\n\t}\n\n\t// Only else - provide detailed error message\n\tif (!schema.else) return \"\";\n\tconst elseValidation = generateConditionalValidation(schema.else);\n\tconst elseRequiredProps = schema.else.required || [];\n\n\treturn `.superRefine((obj, ctx) => {\n\t\tconst ifConditionMet = ${ifCondition};\n\t\tif (!ifConditionMet) {\n\t\t\tconst elseValid = ${elseValidation};\n\t\t\tif (!elseValid) {\n\t\t\t\t${\n\t\t\t\t\telseRequiredProps.length > 0\n\t\t\t\t\t\t? `\n\t\t\t\tconst missingProps = ${JSON.stringify(elseRequiredProps)}.filter(p => obj[p] === undefined);\n\t\t\t\tconst message = missingProps.length > 0\n\t\t\t\t\t? \\`When condition is not met, required properties are missing: \\${missingProps.join(', ')}\\`\n\t\t\t\t\t: \"When condition is not met, validation constraints failed\";\n\t\t\t\t`\n\t\t\t\t\t\t: `\n\t\t\t\tconst message = \"When condition is not met, validation constraints failed\";\n\t\t\t\t`\n\t\t\t\t}\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tmessage: message,\n\t\t\t\t\tpath: []\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t})`;\n}\n\n/**\n * Generate dependent required validation (OpenAPI 3.1)\n * Generates detailed error messages showing which specific fields are missing\n */\nexport function generateDependentRequired(schema: OpenAPISchema): string {\n\tif (!schema.dependentRequired) {\n\t\treturn \"\";\n\t}\n\n\tlet result = \"\";\n\tfor (const [prop, requiredProps] of Object.entries(schema.dependentRequired)) {\n\t\t// Skip empty required arrays (no dependencies to enforce)\n\t\tif (requiredProps.length === 0) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst propAccess = generatePropertyAccess(prop);\n\t\tconst checkLogic = requiredProps\n\t\t\t.map(rp => {\n\t\t\t\tconst rpAccess = generatePropertyAccess(rp);\n\t\t\t\treturn `if (${rpAccess} === undefined) missing.push('${rp}');`;\n\t\t\t})\n\t\t\t.join(\"\\n\\t\\t\");\n\n\t\tresult += `.superRefine((obj, ctx) => {\n\t\t\tif (${propAccess} === undefined) return;\n\t\t\tconst missing: string[] = [];\n\t\t\t${checkLogic}\n\t\t\tif (missing.length > 0) {\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tmessage: \\`When '${prop}' is present, the following properties are required: \\${missing.join(', ')}\\`,\n\t\t\t\t\tpath: []\n\t\t\t\t});\n\t\t\t}\n\t\t})`;\n\t}\n\n\treturn result;\n}\n\n/**\n * Generate dependent schemas validation (JSON Schema 2019-09 / OpenAPI 3.1)\n * This is the modern replacement for schema-based dependencies\n * Generates detailed error messages showing validation failures\n */\nexport function generateDependentSchemas(\n\tschema: OpenAPISchema & { dependentSchemas?: Record<string, OpenAPISchema> },\n\tgeneratePropertySchema?: (schema: OpenAPISchema, currentSchema?: string) => string,\n\tcurrentSchema?: string\n): string {\n\tif (!schema.dependentSchemas || !generatePropertySchema) {\n\t\treturn \"\";\n\t}\n\n\tlet result = \"\";\n\tfor (const [prop, depSchema] of Object.entries(schema.dependentSchemas)) {\n\t\tconst depSchemaValidation = generatePropertySchema(depSchema, currentSchema);\n\t\tconst propAccess = generatePropertyAccess(prop);\n\n\t\tresult += `.superRefine((obj, ctx) => {\n\t\t\tif (${propAccess} === undefined) return;\n\t\t\tconst validation = ${depSchemaValidation}.safeParse(obj);\n\t\t\tif (!validation.success) {\n\t\t\t\tconst errors = validation.error.issues.map(i => \\` - \\${i.path.join('.')}: \\${i.message}\\`).join('\\\\n');\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tmessage: \\`When '${prop}' is present, dependent schema validation failed:\\\\n\\${errors}\\`,\n\t\t\t\t\tpath: []\n\t\t\t\t});\n\t\t\t}\n\t\t})`;\n\t}\n\treturn result;\n}\n\n/**\n * Validate dependency graph for circular dependencies\n * Returns validation result with any detected circular dependency errors\n */\nexport function validateDependencyGraph(\n\tschema: OpenAPISchema,\n\tschemaName: string\n): { valid: boolean; errors: string[] } {\n\tconst errors: string[] = [];\n\n\tif (!schema.dependencies && !schema.dependentRequired) {\n\t\treturn { valid: true, errors: [] };\n\t}\n\n\t// Build dependency graph\n\tconst graph = new Map<string, Set<string>>();\n\n\t// Add dependentRequired edges\n\tif (schema.dependentRequired) {\n\t\tfor (const [prop, deps] of Object.entries(schema.dependentRequired)) {\n\t\t\tif (!graph.has(prop)) {\n\t\t\t\tgraph.set(prop, new Set());\n\t\t\t}\n\t\t\tconst propDeps = graph.get(prop);\n\t\t\tif (propDeps) {\n\t\t\t\tfor (const dep of deps) {\n\t\t\t\t\tpropDeps.add(dep);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Add dependencies (array type) edges\n\tif (schema.dependencies) {\n\t\tfor (const [prop, dep] of Object.entries(schema.dependencies)) {\n\t\t\tif (Array.isArray(dep)) {\n\t\t\t\tif (!graph.has(prop)) {\n\t\t\t\t\tgraph.set(prop, new Set());\n\t\t\t\t}\n\t\t\t\tconst propDeps = graph.get(prop);\n\t\t\t\tif (propDeps) {\n\t\t\t\t\tfor (const d of dep) {\n\t\t\t\t\t\tpropDeps.add(d);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Detect cycles using DFS\n\tconst visited = new Set<string>();\n\tconst recStack = new Set<string>();\n\tconst path: string[] = [];\n\n\tfunction detectCycle(prop: string): boolean {\n\t\tvisited.add(prop);\n\t\trecStack.add(prop);\n\t\tpath.push(prop);\n\n\t\tconst deps = graph.get(prop) || new Set();\n\t\tfor (const dep of deps) {\n\t\t\tif (!visited.has(dep)) {\n\t\t\t\tif (detectCycle(dep)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else if (recStack.has(dep)) {\n\t\t\t\t// Cycle detected\n\t\t\t\tconst cycleStart = path.indexOf(dep);\n\t\t\t\tconst cycle = [...path.slice(cycleStart), dep];\n\t\t\t\terrors.push(`Circular dependency detected in schema '${schemaName}': ${cycle.join(\" -> \")}`);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\trecStack.delete(prop);\n\t\tpath.pop();\n\t\treturn false;\n\t}\n\n\t// Check all roots\n\tfor (const prop of graph.keys()) {\n\t\tif (!visited.has(prop)) {\n\t\t\tdetectCycle(prop);\n\t\t}\n\t}\n\n\treturn { valid: errors.length === 0, errors };\n}\n\n/**\n * Extract schema dependencies as reusable schemas\n * Useful for code generation and schema reuse\n */\nexport function extractSchemaDependencies(schema: OpenAPISchema, schemaName: string): Map<string, OpenAPISchema> {\n\tconst extracted = new Map<string, OpenAPISchema>();\n\n\tif (!schema.dependencies) {\n\t\treturn extracted;\n\t}\n\n\tfor (const [prop, dependency] of Object.entries(schema.dependencies)) {\n\t\tif (!Array.isArray(dependency)) {\n\t\t\t// This is a schema dependency\n\t\t\tconst depSchemaName = `${schemaName}_${prop}_Dependency`;\n\t\t\tconst depSchema: OpenAPISchema = {\n\t\t\t\t...dependency,\n\t\t\t\ttype: dependency.type || \"object\",\n\t\t\t};\n\t\t\textracted.set(depSchemaName, depSchema);\n\t\t}\n\t}\n\n\treturn extracted;\n}\n","import { generateJSDoc } from \"../generators/jsdoc-generator\";\nimport type { OpenAPISchema } from \"../types\";\n\nimport { generateDependencies, generateDependentRequired, generateIfThenElse } from \"./conditional-validator\";\n\n/**\n * Check if a property name needs to be quoted in TypeScript object literal\n */\nfunction needsQuoting(propName: string): boolean {\n\t// Valid identifier: starts with letter/underscore/$, followed by letters/digits/underscores/$\n\tconst validIdentifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;\n\treturn !validIdentifier.test(propName);\n}\n\n/**\n * Generate property access expression (use dot notation for valid identifiers, bracket notation otherwise)\n */\nfunction generatePropertyAccess(propName: string): string {\n\treturn needsQuoting(propName) ? `obj[\"${propName}\"]` : `obj.${propName}`;\n}\n\nexport type ObjectMode = \"strict\" | \"normal\" | \"loose\";\n\nexport interface ObjectValidatorContext {\n\tgeneratePropertySchema: (schema: OpenAPISchema, currentSchema?: string) => string;\n\tshouldIncludeProperty: (schema: OpenAPISchema) => boolean;\n\tmode: ObjectMode;\n\tincludeDescriptions: boolean;\n\tuseDescribe: boolean;\n}\n\n/**\n * Generate object schema\n */\nexport function generateObjectSchema(\n\tschema: OpenAPISchema,\n\tcontext: ObjectValidatorContext,\n\tcurrentSchema?: string\n): string {\n\tconst required = new Set(schema.required || []);\n\tconst properties: string[] = [];\n\n\t// Process properties if they exist\n\tif (schema.properties) {\n\t\tfor (const [propName, propSchema] of Object.entries(schema.properties)) {\n\t\t\t// Skip properties based on readOnly/writeOnly and schemaType\n\t\t\tif (!context.shouldIncludeProperty(propSchema)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst isRequired = required.has(propName);\n\t\t\tconst zodSchema = context.generatePropertySchema(propSchema, currentSchema);\n\n\t\t\t// Quote property name if it contains special characters\n\t\t\tconst quotedPropName = needsQuoting(propName) ? `\"${propName}\"` : propName;\n\t\t\tlet propertyDef = ` ${quotedPropName}: ${zodSchema}`;\n\t\t\tif (!isRequired) {\n\t\t\t\tpropertyDef += \".optional()\";\n\t\t\t}\n\n\t\t\t// Add JSDoc for property if enabled\n\t\t\tconst jsdoc = generateJSDoc(propSchema, propName, { includeDescriptions: context.includeDescriptions });\n\t\t\tif (jsdoc) {\n\t\t\t\tproperties.push(`${jsdoc.trimEnd()}\\n${propertyDef}`);\n\t\t\t} else {\n\t\t\t\tproperties.push(propertyDef);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Determine object method based on mode and additionalProperties\n\tlet objectMethod: string;\n\n\t// additionalProperties: false always uses strictObject\n\tif (schema.additionalProperties === false) {\n\t\tobjectMethod = \"z.strictObject\";\n\t} else {\n\t\t// Otherwise respect the mode setting\n\t\tswitch (context.mode) {\n\t\t\tcase \"strict\":\n\t\t\t\tobjectMethod = \"z.strictObject\";\n\t\t\t\tbreak;\n\t\t\tcase \"loose\":\n\t\t\t\tobjectMethod = \"z.looseObject\";\n\t\t\t\tbreak;\n\t\t\tcase \"normal\":\n\t\t\t\tobjectMethod = \"z.object\";\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tlet objectDef = `${objectMethod}({\\n${properties.join(\",\\n\")}\\n})`;\n\n\t// Handle additionalProperties for typed catchall\n\tif (schema.additionalProperties !== undefined) {\n\t\tif (typeof schema.additionalProperties === \"object\") {\n\t\t\t// Additional properties with specific schema\n\t\t\tconst additionalSchema = context.generatePropertySchema(schema.additionalProperties, currentSchema);\n\t\t\tobjectDef += `.catchall(${additionalSchema})`;\n\t\t} else if (schema.additionalProperties) {\n\t\t\t// Any additional properties allowed\n\t\t\tobjectDef += \".catchall(z.unknown())\";\n\t\t}\n\t\t// Note: additionalProperties: false is handled by using z.strictObject\n\t} else if (schema.patternProperties) {\n\t\t// If pattern properties are defined but additionalProperties is not, allow properties through\n\t\t// so they can be validated by pattern property refinements\n\t\tobjectDef += \".catchall(z.unknown())\";\n\t}\n\n\t// Handle minProperties and maxProperties\n\tif (schema.minProperties !== undefined || schema.maxProperties !== undefined) {\n\t\tconst conditions: string[] = [];\n\t\tif (schema.minProperties !== undefined) {\n\t\t\tconditions.push(`Object.keys(obj).length >= ${schema.minProperties}`);\n\t\t}\n\t\tif (schema.maxProperties !== undefined) {\n\t\t\tconditions.push(`Object.keys(obj).length <= ${schema.maxProperties}`);\n\t\t}\n\t\tconst condition = conditions.join(\" && \");\n\t\tlet message = \"Object \";\n\t\tif (schema.minProperties !== undefined && schema.maxProperties !== undefined) {\n\t\t\tmessage += `must have between ${schema.minProperties} and ${schema.maxProperties} properties`;\n\t\t} else if (schema.minProperties !== undefined) {\n\t\t\tmessage += `must have at least ${schema.minProperties} ${schema.minProperties === 1 ? \"property\" : \"properties\"}`;\n\t\t} else {\n\t\t\tmessage += `must have at most ${schema.maxProperties} ${schema.maxProperties === 1 ? \"property\" : \"properties\"}`;\n\t\t}\n\t\tobjectDef += `.refine((obj) => ${condition}, { message: \"${message}\" })`;\n\t}\n\n\t// Handle required fields that aren't in properties (common in schema dependencies)\n\tconst definedProps = new Set(Object.keys(schema.properties || {}));\n\tconst undefinedRequired = (schema.required || []).filter(prop => !definedProps.has(prop));\n\tif (undefinedRequired.length > 0) {\n\t\t// Need catchall to allow required fields that aren't in properties\n\t\tif (!objectDef.includes(\".catchall(\")) {\n\t\t\tobjectDef += \".catchall(z.unknown())\";\n\t\t}\n\t\tconst requiredChecks = undefinedRequired.map(prop => `${generatePropertyAccess(prop)} !== undefined`).join(\" && \");\n\t\tconst propList = undefinedRequired.join(\", \");\n\t\tobjectDef += `.refine((obj) => ${requiredChecks}, { message: \"Missing required fields: ${propList}\" })`;\n\t}\n\n\t// Handle pattern properties with first-match-wins priority\n\tif (schema.patternProperties) {\n\t\tconst definedProps = Object.keys(schema.properties || {});\n\t\tconst definedPropsSet = `new Set(${JSON.stringify(definedProps)})`;\n\t\tconst patterns = Object.entries(schema.patternProperties);\n\n\t\t// Generate schemas for all patterns\n\t\tconst patternSchemas = patterns.map(([pattern, patternSchema]) => ({\n\t\t\tpattern,\n\t\t\tescapedPattern: pattern.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\"),\n\t\t\tzodSchema: context.generatePropertySchema(patternSchema, currentSchema),\n\t\t}));\n\n\t\t// Single superRefine for all patterns (more efficient)\n\t\tobjectDef += `.superRefine((obj, ctx) => {\n\t\t\tconst definedPropsSet = ${definedPropsSet};\n\t\t\tconst patterns = ${JSON.stringify(patternSchemas.map(p => ({ pattern: p.escapedPattern })))};\n\t\t\tconst schemas = [${patternSchemas.map(p => p.zodSchema).join(\", \")}];\n\t\t\tconst regexps = patterns.map(p => new RegExp(p.pattern));\n\n\t\t\t// Check all object keys\n\t\t\tfor (const key of Object.keys(obj)) {\n\t\t\t\t// Skip properties that are explicitly defined\n\t\t\t\tif (definedPropsSet.has(key)) continue;\n\n\t\t\t\t// Find first matching pattern (first-match-wins priority)\n\t\t\t\tfor (let i = 0; i < regexps.length; i++) {\n\t\t\t\t\tif (regexps[i].test(key)) {\n\t\t\t\t\t\tconst validation = schemas[i].safeParse(obj[key]);\n\t\t\t\t\t\tif (!validation.success) {\n\t\t\t\t\t\t\t// Add detailed error messages with property name and pattern\n\t\t\t\t\t\t\tfor (const issue of validation.error.issues) {\n\t\t\t\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\t\t\t\t...issue,\n\t\t\t\t\t\t\t\t\tpath: [key, ...issue.path],\n\t\t\t\t\t\t\t\t\tmessage: \\`Property '\\${key}' (pattern '\\${patterns[i].pattern}'): \\${issue.message}\\`\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak; // First match wins, stop checking other patterns\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})`;\n\t}\n\n\t// Handle property names validation (consolidated for efficiency)\n\tif (schema.propertyNames) {\n\t\tconst hasPattern = schema.propertyNames.pattern !== undefined;\n\t\tconst hasMinLength = schema.propertyNames.minLength !== undefined;\n\t\tconst hasMaxLength = schema.propertyNames.maxLength !== undefined;\n\n\t\tif (hasPattern || hasMinLength || hasMaxLength) {\n\t\t\tconst escapedPattern =\n\t\t\t\thasPattern && schema.propertyNames.pattern\n\t\t\t\t\t? schema.propertyNames.pattern.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\")\n\t\t\t\t\t: null;\n\t\t\tconst minLen = schema.propertyNames.minLength;\n\t\t\tconst maxLen = schema.propertyNames.maxLength;\n\n\t\t\tobjectDef += `.superRefine((obj, ctx) => {\n\t\t\t\t${escapedPattern ? `const pattern = /${escapedPattern}/;` : \"\"}\n\n\t\t\t\tfor (const key of Object.keys(obj)) {\n\t\t\t\t\tconst failures: string[] = [];\n\n\t\t\t\t\t${\n\t\t\t\t\t\thasPattern\n\t\t\t\t\t\t\t? `\n\t\t\t\t\tif (!pattern.test(key)) {\n\t\t\t\t\t\tfailures.push(\"must match pattern '${schema.propertyNames.pattern}'\");\n\t\t\t\t\t}\n\t\t\t\t\t`\n\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t}\n\n\t\t\t\t\t${\n\t\t\t\t\t\thasMinLength\n\t\t\t\t\t\t\t? `\n\t\t\t\t\tif (key.length < ${minLen}) {\n\t\t\t\t\t\tfailures.push(\"must be at least ${minLen} characters\");\n\t\t\t\t\t}\n\t\t\t\t\t`\n\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t}\n\n\t\t\t\t\t${\n\t\t\t\t\t\thasMaxLength\n\t\t\t\t\t\t\t? `\n\t\t\t\t\tif (key.length > ${maxLen}) {\n\t\t\t\t\t\tfailures.push(\"must be at most ${maxLen} characters\");\n\t\t\t\t\t}\n\t\t\t\t\t`\n\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t}\n\n\t\t\t\t\tif (failures.length > 0) {\n\t\t\t\t\t\tctx.addIssue({\n\t\t\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\t\t\tmessage: \\`Property name '\\${key}' \\${failures.join(\", \")}\\`,\n\t\t\t\t\t\t\tpath: [key]\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})`;\n\t\t}\n\t}\n\n\t// Handle dependencies (OpenAPI 3.0)\n\tobjectDef += generateDependencies(schema, context.generatePropertySchema, currentSchema);\n\n\t// Handle dependentRequired\n\tobjectDef += generateDependentRequired(schema);\n\n\t// Handle if/then/else conditionals\n\tobjectDef += generateIfThenElse(schema);\n\n\treturn objectDef;\n}\n","import { escapePattern, type LRUCache } from \"@cerios/openapi-core\";\n\nimport type { OpenAPISchema, UuidFormat } from \"../types\";\nimport { addDescription } from \"../utils/string-utils\";\n\n/**\n * Context for string validation generation (parallel-safe)\n */\nexport interface StringValidatorContext {\n\t/**\n\t * Zod validation string for date-time format fields\n\t */\n\tdateTimeValidation: string;\n\t/**\n\t * Zod validation string for uuid/guid format fields\n\t */\n\tuuidValidation: string;\n\t/**\n\t * Instance-level cache for escaped regex patterns\n\t */\n\tpatternCache: LRUCache<string, string>;\n}\n\n// Default format map (immutable, without date-time and uuid/guid which are passed via context)\nconst DEFAULT_FORMAT_MAP: Record<string, string> = {\n\temail: \"z.email()\",\n\turi: \"z.url()\",\n\turl: \"z.url()\",\n\t\"uri-reference\": 'z.string().refine((val) => !/\\\\s/.test(val), { message: \"Must be a valid URI reference\" })',\n\thostname:\n\t\t'z.string().refine((val) => /^(?=.{1,253}$)(?:(?!-)[A-Za-z0-9-]{1,63}(?<!-)\\\\.)*(?!-)[A-Za-z0-9-]{1,63}(?<!-)$/.test(val), { message: \"Must be a valid hostname\" })',\n\tbyte: \"z.base64()\",\n\tbinary: \"z.string()\",\n\tdate: \"z.iso.date()\",\n\ttime: \"z.iso.time()\",\n\tduration:\n\t\t'z.string().refine((val) => /^P(?:(?:\\\\d+Y)?(?:\\\\d+M)?(?:\\\\d+D)?(?:T(?:\\\\d+H)?(?:\\\\d+M)?(?:\\\\d+(?:\\\\.\\\\d+)?S)?)?|\\\\d+W)$/.test(val) && !/^PT?$/.test(val), { message: \"Must be a valid ISO 8601 duration\" })',\n\tipv4: \"z.ipv4()\",\n\tipv6: \"z.ipv6()\",\n\temoji: \"z.emoji()\",\n\tbase64: \"z.base64()\",\n\tbase64url: \"z.base64url()\",\n\tnanoid: \"z.nanoid()\",\n\tcuid: \"z.cuid()\",\n\tcuid2: \"z.cuid2()\",\n\tulid: \"z.ulid()\",\n\tcidr: \"z.cidrv4()\", // Default to v4\n\tcidrv4: \"z.cidrv4()\",\n\tcidrv6: \"z.cidrv6()\",\n\t\"json-pointer\":\n\t\t'z.string().refine((val) => val === \"\" || /^(\\\\/([^~/]|~0|~1)+)+$/.test(val), { message: \"Must be a valid JSON Pointer (RFC 6901)\" })',\n\t\"relative-json-pointer\":\n\t\t'z.string().refine((val) => /^(0|[1-9]\\\\d*)(#|(\\\\/([^~/]|~0|~1)+)*)$/.test(val), { message: \"Must be a valid relative JSON Pointer\" })',\n};\n\n/**\n * Build the Zod validation string for date-time format\n * Pure function that returns the validation string without side effects\n *\n * @param pattern - Optional regex pattern (string or RegExp) for date-time validation\n * @returns Zod validation string (either \"z.iso.datetime()\" or custom regex)\n * @throws {Error} If the provided pattern is not a valid regular expression\n *\n * @example\n * // Default (no pattern)\n * buildDateTimeValidation() // Returns \"z.iso.datetime()\"\n *\n * @example\n * // String pattern (for JSON/YAML configs)\n * buildDateTimeValidation('^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}$')\n *\n * @example\n * // RegExp literal (TypeScript configs)\n * buildDateTimeValidation(/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$/)\n */\n/**\n * Build the Zod validation string for uuid/guid format\n * Pure function that returns the validation string without side effects\n *\n * @param format - UUID format option\n * @returns Zod validation string\n *\n * @example\n * buildUuidValidation() // Returns \"z.uuid()\"\n * buildUuidValidation(\"guid\") // Returns \"z.guid()\"\n * buildUuidValidation(\"uuidv4\") // Returns 'z.uuid({ version: \"v4\" })'\n */\nexport function buildUuidValidation(format?: UuidFormat): string {\n\tif (!format || format === \"uuid\") {\n\t\treturn \"z.uuid()\";\n\t}\n\n\tif (format === \"guid\") {\n\t\treturn \"z.guid()\";\n\t}\n\n\t// Extract version number from \"uuidv1\" through \"uuidv8\"\n\tconst version = format.replace(\"uuid\", \"\");\n\treturn `z.uuid({ version: \"${version}\" })`;\n}\n\nexport function buildDateTimeValidation(pattern?: string | RegExp): string {\n\tif (!pattern) {\n\t\treturn \"z.iso.datetime()\";\n\t}\n\n\t// Convert RegExp to string if needed\n\tconst patternStr = pattern instanceof RegExp ? pattern.source : pattern;\n\n\t// Empty string returns default\n\tif (patternStr === \"\") {\n\t\treturn \"z.iso.datetime()\";\n\t}\n\n\t// Validate the regex pattern\n\ttry {\n\t\tnew RegExp(patternStr);\n\t} catch (error) {\n\t\tthrow new Error(\n\t\t\t`Invalid regular expression pattern for customDateTimeFormatRegex: ${patternStr}. ${\n\t\t\t\terror instanceof Error ? error.message : \"Pattern is malformed\"\n\t\t\t}`\n\t\t);\n\t}\n\n\t// Escape the pattern for use in generated code\n\tconst escapedPattern = escapePattern(patternStr);\n\n\treturn `z.string().regex(/${escapedPattern}/)`;\n}\n\n/**\n * Generate Zod validation for string with format (Zod v4 compatible)\n * Thread-safe: uses context for date-time validation and pattern cache\n *\n * @param schema - OpenAPI schema to generate validation for\n * @param useDescribe - Whether to add .describe() calls\n * @param context - Context containing dateTimeValidation and patternCache (parallel-safe)\n */\nexport function generateStringValidation(\n\tschema: OpenAPISchema,\n\tuseDescribe: boolean,\n\tcontext: StringValidatorContext\n): string {\n\t// Handle format with Zod v4 top-level functions\n\t// Use context.dateTimeValidation for date-time format, DEFAULT_FORMAT_MAP for others\n\tlet validation: string;\n\tconst format = schema.format || \"\";\n\n\tif (format === \"date-time\") {\n\t\tvalidation = context.dateTimeValidation;\n\t} else if (format === \"uuid\" || format === \"guid\") {\n\t\tvalidation = context.uuidValidation;\n\t} else {\n\t\tvalidation = DEFAULT_FORMAT_MAP[format] || \"z.string()\";\n\t}\n\n\t// Add length constraints\n\tif (schema.minLength !== undefined) {\n\t\tvalidation += `.min(${schema.minLength})`;\n\t}\n\tif (schema.maxLength !== undefined) {\n\t\tvalidation += `.max(${schema.maxLength})`;\n\t}\n\n\t// Add pattern (with cached escaping for performance using context.patternCache)\n\tif (schema.pattern) {\n\t\tlet escapedPattern = context.patternCache.get(schema.pattern);\n\t\tif (escapedPattern === undefined) {\n\t\t\tescapedPattern = escapePattern(schema.pattern);\n\t\t\tcontext.patternCache.set(schema.pattern, escapedPattern);\n\t\t}\n\t\tvalidation += `.regex(/${escapedPattern}/)`;\n\t}\n\n\t// Handle content encoding (OpenAPI 3.1)\n\tif (schema.contentEncoding && !schema.format) {\n\t\tswitch (schema.contentEncoding) {\n\t\t\tcase \"base64\":\n\t\t\t\tvalidation = \"z.base64()\";\n\t\t\t\tbreak;\n\t\t\tcase \"base64url\":\n\t\t\t\tvalidation = \"z.base64url()\";\n\t\t\t\tbreak;\n\t\t\tcase \"quoted-printable\":\n\t\t\t\t// Quoted-printable validation\n\t\t\t\tvalidation =\n\t\t\t\t\t'z.string().refine((val) => /^[\\\\x20-\\\\x7E\\\\r\\\\n=]*$/.test(val), { message: \"Must be valid quoted-printable encoding\" })';\n\t\t\t\tbreak;\n\t\t\tcase \"7bit\":\n\t\t\tcase \"8bit\":\n\t\t\tcase \"binary\":\n\t\t\t\t// Basic string validation for these encodings\n\t\t\t\tvalidation = \"z.string()\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Unknown encoding, use string with refinement note\n\t\t\t\tvalidation = `z.string().describe(\"Content encoding: ${schema.contentEncoding}\")`;\n\t\t}\n\n\t\t// Re-apply constraints after encoding\n\t\tif (schema.minLength !== undefined) {\n\t\t\tvalidation += `.min(${schema.minLength})`;\n\t\t}\n\t\tif (schema.maxLength !== undefined) {\n\t\t\tvalidation += `.max(${schema.maxLength})`;\n\t\t}\n\t\tif (schema.pattern) {\n\t\t\tlet escapedPattern = context.patternCache.get(schema.pattern);\n\t\t\tif (escapedPattern === undefined) {\n\t\t\t\tescapedPattern = escapePattern(schema.pattern);\n\t\t\t\tcontext.patternCache.set(schema.pattern, escapedPattern);\n\t\t\t}\n\t\t\tvalidation += `.regex(/${escapedPattern}/)`;\n\t\t}\n\t} else if (schema.contentMediaType) {\n\t\t// Add refinement for media type validation\n\t\tconst mediaType = schema.contentMediaType;\n\t\tif (mediaType === \"application/json\") {\n\t\t\tvalidation += `.refine((val) => { try { JSON.parse(val); return true; } catch { return false; } }, { message: \"Must be valid JSON\" })`;\n\t\t} else if (mediaType === \"application/xml\" || mediaType === \"text/xml\") {\n\t\t\t// Basic XML validation - check for well-formed XML structure\n\t\t\tvalidation += `.refine((val) => { try { if (typeof DOMParser !== \"undefined\") { const parser = new DOMParser(); const doc = parser.parseFromString(val, \"text/xml\"); return !doc.querySelector(\"parsererror\"); } return /^\\\\s*<[^>]+>/.test(val); } catch { return false; } }, { message: \"Must be valid XML\" })`;\n\t\t} else if (mediaType === \"application/yaml\" || mediaType === \"application/x-yaml\" || mediaType === \"text/yaml\") {\n\t\t\t// Basic YAML validation - check for basic YAML structure\n\t\t\tvalidation += `.refine((val) => { try { return val.trim().length > 0 && !/^[[{]/.test(val.trim()); } catch { return false; } }, { message: \"Must be valid YAML\" })`;\n\t\t} else if (mediaType === \"text/html\") {\n\t\t\t// Basic HTML validation - check for HTML tags\n\t\t\tvalidation += `.refine((val) => /<[^>]+>/.test(val), { message: \"Must contain HTML tags\" })`;\n\t\t} else if (mediaType === \"text/plain\") {\n\t\t\t// Plain text - no special validation needed, but mark it\n\t\t\tvalidation += `.refine(() => true, { message: \"Plain text content\" })`;\n\t\t}\n\t\t// Other media types default to no validation beyond string\n\t}\n\n\t// Add description if useDescribe is enabled\n\treturn addDescription(validation, schema.description, useDescribe);\n}\n","import {\n\tgetPrimaryType,\n\thasMultipleTypes,\n\tisNullable,\n\tLRUCache,\n\ttype NamingOptions,\n\tresolveRefName,\n\tstripPrefix,\n\ttoCamelCase,\n\ttoPascalCase,\n} from \"@cerios/openapi-core\";\n\nimport type { OpenAPISchema, OpenAPISpec } from \"../types\";\nimport { addDescription, wrapNullable } from \"../utils/string-utils\";\nimport { generateArrayValidation } from \"../validators/array-validator\";\nimport { generateAllOf, generateUnion } from \"../validators/composition-validator\";\nimport { generateNumberValidation } from \"../validators/number-validator\";\nimport type { ObjectMode } from \"../validators/object-validator\";\nimport { generateObjectSchema } from \"../validators/object-validator\";\nimport { generateStringValidation } from \"../validators/string-validator\";\n\nexport interface PropertyGeneratorContext {\n\tspec: OpenAPISpec;\n\tschemaDependencies: Map<string, Set<string>>;\n\tschemaType: \"all\" | \"request\" | \"response\";\n\tmode: ObjectMode;\n\tincludeDescriptions: boolean;\n\tuseDescribe: boolean;\n\tnamingOptions: NamingOptions;\n\tstripSchemaPrefix?: string | string[];\n\t/**\n\t * Default nullable behavior when not explicitly specified\n\t * @default false\n\t */\n\tdefaultNullable: boolean;\n\t/**\n\t * Behavior for empty object schemas (objects with no properties defined)\n\t * @default 'loose'\n\t */\n\temptyObjectBehavior: \"strict\" | \"loose\" | \"record\";\n\t/**\n\t * Zod validation string for date-time format fields\n\t * @default \"z.iso.datetime()\"\n\t */\n\tdateTimeValidation: string;\n\t/**\n\t * Zod validation string for uuid/guid format fields\n\t * @default \"z.uuid()\"\n\t */\n\tuuidValidation: string;\n\t/**\n\t * Instance-level cache for escaped regex patterns (parallel-safe)\n\t */\n\tpatternCache: LRUCache<string, string>;\n\t/**\n\t * Whether types are generated in a separate file (imported) vs inline (z.infer)\n\t * When true, z.lazy uses z.ZodType<TypeName> for proper type inference\n\t * When false, z.lazy uses z.ZodTypeAny to avoid circular type references\n\t * @default false\n\t */\n\tseparateTypesFile: boolean;\n\t/**\n\t * Warning function for non-fatal issues during schema generation\n\t * If not provided, warnings are silently ignored\n\t */\n\twarn?: (message: string) => void;\n}\n\n/**\n * Property schema generator with memoization for performance\n */\nexport class PropertyGenerator {\n\tprivate context: PropertyGeneratorContext;\n\t// Performance optimization: Memoize filtered property results\n\tprivate filteredPropsCache = new Map<string, OpenAPISchema>();\n\t// Performance optimization: LRU cache for generated schemas\n\tprivate schemaCache = new LRUCache<string, string>(500);\n\t// Track allOf conflicts detected during schema generation\n\tprivate allOfConflicts: string[] = [];\n\t// Schemas that are part of circular dependency chains (need z.lazy for forward refs)\n\tprivate circularDependencies: Set<string> = new Set();\n\n\t// Performance optimization: Lookup table for faster inclusion checks\n\tstatic readonly INCLUSION_RULES = {\n\t\trequest: (schema: OpenAPISchema) => !schema.readOnly,\n\t\tresponse: (schema: OpenAPISchema) => !schema.writeOnly,\n\t\tall: () => true,\n\t} as const;\n\n\tconstructor(context: PropertyGeneratorContext) {\n\t\tthis.context = context;\n\t}\n\n\t/**\n\t * Set the schemas that are involved in circular dependency chains.\n\t * These schemas will use z.lazy() for forward references.\n\t */\n\tsetCircularDependencies(deps: Set<string>): void {\n\t\tthis.circularDependencies = deps;\n\t}\n\n\t/**\n\t * Get allOf conflicts detected during the last schema generation\n\t * @returns Array of conflict description strings\n\t */\n\tgetAllOfConflicts(): string[] {\n\t\treturn [...this.allOfConflicts];\n\t}\n\n\t/**\n\t * Clear tracked allOf conflicts (call before generating a new schema)\n\t */\n\tclearAllOfConflicts(): void {\n\t\tthis.allOfConflicts = [];\n\t}\n\n\t/**\n\t * Check if a property should be included based on schemaType and readOnly/writeOnly flags\n\t */\n\tshouldIncludeProperty(schema: OpenAPISchema): boolean {\n\t\tconst rule = PropertyGenerator.INCLUSION_RULES[this.context.schemaType];\n\t\treturn rule(schema);\n\t}\n\n\t/**\n\t * Recursively filter any schema type (helper for composition schemas)\n\t */\n\tprivate filterSchemaRecursive(schema: OpenAPISchema): OpenAPISchema {\n\t\tif (schema.$ref) {\n\t\t\t// Don't filter refs, they'll be filtered when resolved\n\t\t\treturn schema;\n\t\t}\n\n\t\tif (schema.properties) {\n\t\t\treturn this.filterNestedProperties(schema);\n\t\t}\n\n\t\tif (schema.type === \"array\" && schema.items && typeof schema.items === \"object\" && schema.items.properties) {\n\t\t\treturn {\n\t\t\t\t...schema,\n\t\t\t\titems: this.filterNestedProperties(schema.items),\n\t\t\t};\n\t\t}\n\n\t\treturn schema;\n\t}\n\n\t/**\n\t * Recursively filter properties in nested objects based on readOnly/writeOnly\n\t * Performance optimized with memoization\n\t */\n\tprivate filterNestedProperties(schema: OpenAPISchema): OpenAPISchema {\n\t\t// Performance optimization: More efficient cache key generation\n\t\tconst propKeys = schema.properties ? Object.keys(schema.properties).sort().join(\",\") : \"\";\n\t\tconst requiredKeys = Array.isArray(schema.required) ? schema.required.join(\",\") : String(schema.required ?? \"\");\n\t\tconst schemaType = Array.isArray(schema.type) ? schema.type.join(\"|\") : schema.type || \"unknown\";\n\t\tconst cacheKey = `${this.context.schemaType}:${schemaType}:${propKeys}:${requiredKeys}`;\n\t\tconst cached = this.filteredPropsCache.get(cacheKey);\n\t\tif (cached) {\n\t\t\treturn cached;\n\t\t}\n\n\t\tif (!schema.properties) {\n\t\t\treturn schema;\n\t\t}\n\n\t\tconst filteredProperties: Record<string, OpenAPISchema> = {};\n\t\tconst filteredRequired: string[] = [];\n\n\t\tfor (const [propName, propSchema] of Object.entries(schema.properties)) {\n\t\t\tif (!this.shouldIncludeProperty(propSchema)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Recursively filter nested structures\n\t\t\tlet filteredPropSchema = propSchema;\n\n\t\t\tif (propSchema.type === \"object\" && propSchema.properties) {\n\t\t\t\t// Nested object\n\t\t\t\tfilteredPropSchema = this.filterNestedProperties(propSchema);\n\t\t\t} else if (\n\t\t\t\tpropSchema.type === \"array\" &&\n\t\t\t\tpropSchema.items &&\n\t\t\t\ttypeof propSchema.items === \"object\" &&\n\t\t\t\tpropSchema.items.properties\n\t\t\t) {\n\t\t\t\t// Array of objects\n\t\t\t\tfilteredPropSchema = {\n\t\t\t\t\t...propSchema,\n\t\t\t\t\titems: this.filterNestedProperties(propSchema.items),\n\t\t\t\t};\n\t\t\t} else if (propSchema.allOf || propSchema.oneOf || propSchema.anyOf) {\n\t\t\t\t// Composition schemas - filter each branch\n\t\t\t\tif (propSchema.allOf) {\n\t\t\t\t\tfilteredPropSchema = {\n\t\t\t\t\t\t...propSchema,\n\t\t\t\t\t\tallOf: propSchema.allOf.map(s => this.filterSchemaRecursive(s)),\n\t\t\t\t\t};\n\t\t\t\t} else if (propSchema.oneOf) {\n\t\t\t\t\tfilteredPropSchema = {\n\t\t\t\t\t\t...propSchema,\n\t\t\t\t\t\toneOf: propSchema.oneOf.map(s => this.filterSchemaRecursive(s)),\n\t\t\t\t\t};\n\t\t\t\t} else if (propSchema.anyOf) {\n\t\t\t\t\tfilteredPropSchema = {\n\t\t\t\t\t\t...propSchema,\n\t\t\t\t\t\tanyOf: propSchema.anyOf.map(s => this.filterSchemaRecursive(s)),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfilteredProperties[propName] = filteredPropSchema;\n\n\t\t\t// Keep required status if property is included\n\t\t\tif (schema.required?.includes(propName)) {\n\t\t\t\tfilteredRequired.push(propName);\n\t\t\t}\n\t\t}\n\n\t\tconst result = {\n\t\t\t...schema,\n\t\t\tproperties: filteredProperties,\n\t\t\trequired: filteredRequired.length > 0 ? filteredRequired : undefined,\n\t\t};\n\n\t\t// Cache the result\n\t\tthis.filteredPropsCache.set(cacheKey, result);\n\t\treturn result;\n\t}\n\n\t/**\n\t * Resolve discriminator mapping to actual schema references\n\t */\n\tprivate resolveDiscriminatorMapping(mapping: Record<string, string>, schemas: OpenAPISchema[]): OpenAPISchema[] {\n\t\t// If mapping is provided, use it to reorder/filter schemas\n\t\t// The mapping maps discriminator values to schema references\n\t\tconst mappedSchemas: OpenAPISchema[] = [];\n\n\t\tfor (const [_, schemaRef] of Object.entries(mapping)) {\n\t\t\t// Find the schema that matches this reference\n\t\t\tconst matchingSchema = schemas.find(s => {\n\t\t\t\tif (s.$ref) {\n\t\t\t\t\t// Check if the ref matches\n\t\t\t\t\treturn s.$ref === schemaRef || s.$ref.endsWith(schemaRef);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\tif (matchingSchema) {\n\t\t\t\tmappedSchemas.push(matchingSchema);\n\t\t\t} else {\n\t\t\t\t// Schema not found in oneOf/anyOf, create a reference\n\t\t\t\tmappedSchemas.push({ $ref: schemaRef });\n\t\t\t}\n\t\t}\n\n\t\t// Include any schemas that weren't in the mapping\n\t\tfor (const schema of schemas) {\n\t\t\tif (!mappedSchemas.includes(schema)) {\n\t\t\t\tmappedSchemas.push(schema);\n\t\t\t}\n\t\t}\n\n\t\treturn mappedSchemas;\n\t}\n\n\t/**\n\t * Resolve a $ref string to the actual schema\n\t */\n\tprivate resolveSchemaRef(ref: string): OpenAPISchema | undefined {\n\t\tconst schemaName = ref.split(\"/\").pop();\n\t\tif (!schemaName) return undefined;\n\t\treturn this.context.spec.components?.schemas?.[schemaName];\n\t}\n\n\t/**\n\t * Resolve a schema name through any aliases to get the actual schema name\n\t * If the schema is an alias (allOf with single $ref), return the target name\n\t */\n\tprivate resolveSchemaAlias(schemaName: string): string {\n\t\tconst schema = this.context.spec.components?.schemas?.[schemaName];\n\t\tif (!schema) return schemaName;\n\n\t\t// Check if this is a simple alias (allOf with single $ref and nothing else)\n\t\tif (\n\t\t\tschema.allOf &&\n\t\t\tschema.allOf.length === 1 &&\n\t\t\tschema.allOf[0].$ref &&\n\t\t\t!schema.properties &&\n\t\t\t!schema.oneOf &&\n\t\t\t!schema.anyOf\n\t\t) {\n\t\t\tconst targetName = resolveRefName(schema.allOf[0].$ref);\n\t\t\t// Recursively resolve in case of chained aliases\n\t\t\treturn this.resolveSchemaAlias(targetName);\n\t\t}\n\n\t\treturn schemaName;\n\t}\n\n\t/**\n\t * Check if this is a circular dependency through aliases\n\t */\n\tprivate isCircularThroughAlias(fromSchema: string, toSchema: string): boolean {\n\t\tconst toSchemaSpec = this.context.spec.components?.schemas?.[toSchema];\n\t\tif (!toSchemaSpec) return false;\n\n\t\t// Check if toSchema is a simple alias (allOf with single $ref)\n\t\tif (toSchemaSpec.allOf && toSchemaSpec.allOf.length === 1 && toSchemaSpec.allOf[0].$ref) {\n\t\t\tconst aliasTarget = resolveRefName(toSchemaSpec.allOf[0].$ref);\n\t\t\t// If the alias points back to the original schema, it's circular\n\t\t\treturn aliasTarget === fromSchema;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Generate union for multiple types (OpenAPI 3.1)\n\t */\n\tprivate generateMultiTypeUnion(schema: OpenAPISchema, currentSchema?: string): string {\n\t\tif (!Array.isArray(schema.type)) {\n\t\t\treturn \"z.unknown()\";\n\t\t}\n\t\tconst nonNullTypes = schema.type.filter(t => t !== \"null\");\n\t\tconst schemas = nonNullTypes.map(type => {\n\t\t\tconst typeSchema = { ...schema, type };\n\t\t\treturn this.generatePropertySchema(typeSchema, currentSchema);\n\t\t});\n\t\treturn `z.union([${schemas.join(\", \")}])`;\n\t}\n\n\t/**\n\t * Apply unevaluatedProperties validation to a schema\n\t */\n\tprivate applyUnevaluatedProperties(baseSchema: string, schema: OpenAPISchema): string {\n\t\t// Collect all evaluated properties from the schema and its composition\n\t\tconst evaluatedProps = new Set<string>();\n\n\t\t// Add properties from this schema\n\t\tif (schema.properties) {\n\t\t\tfor (const propName of Object.keys(schema.properties)) {\n\t\t\t\tevaluatedProps.add(propName);\n\t\t\t}\n\t\t}\n\n\t\t// Add properties from allOf/oneOf/anyOf (shallow scan)\n\t\tconst collectPropsFromComposition = (schemas?: OpenAPISchema[]) => {\n\t\t\tif (!schemas) return;\n\t\t\tfor (const subSchema of schemas) {\n\t\t\t\tif (subSchema.properties) {\n\t\t\t\t\tfor (const propName of Object.keys(subSchema.properties)) {\n\t\t\t\t\t\tevaluatedProps.add(propName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Also check $ref schemas\n\t\t\t\tif (subSchema.$ref) {\n\t\t\t\t\tconst refSchema = this.context.spec.components?.schemas?.[subSchema.$ref.split(\"/\").pop() || \"\"];\n\t\t\t\t\tif (refSchema?.properties) {\n\t\t\t\t\t\tfor (const propName of Object.keys(refSchema.properties)) {\n\t\t\t\t\t\t\tevaluatedProps.add(propName);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcollectPropsFromComposition(schema.allOf);\n\t\tcollectPropsFromComposition(schema.oneOf);\n\t\tcollectPropsFromComposition(schema.anyOf);\n\n\t\tconst evaluatedPropsSet = `new Set(${JSON.stringify([...evaluatedProps])})`;\n\n\t\t// For unions (oneOf/anyOf), we need to add .catchall(z.unknown()) to EACH branch\n\t\t// For allOf with extend(), add catchall to the final result\n\t\tlet schemaWithCatchall = baseSchema;\n\t\tif (baseSchema.includes(\".union([\") || baseSchema.includes(\".discriminatedUnion(\")) {\n\t\t\t// For unions, we need to make each branch allow additional properties\n\t\t\t// This is complex, so we'll apply refinement and let the refinement check the raw input\n\t\t\t// The union will have already validated structure, refinement checks extra props\n\t\t\tschemaWithCatchall = baseSchema;\n\t\t} else if (baseSchema.includes(\".extend(\")) {\n\t\t\t// Wrap in catchall - apply to final result\n\t\t\tschemaWithCatchall = `${baseSchema}.catchall(z.unknown())`;\n\t\t}\n\n\t\tif (schema.unevaluatedProperties === false) {\n\t\t\t// No unevaluated properties allowed\n\t\t\treturn `${schemaWithCatchall}.refine((obj) => Object.keys(obj).every(key => ${evaluatedPropsSet}.has(key)), { message: \"No unevaluated properties allowed\" })`;\n\t\t} else if (typeof schema.unevaluatedProperties === \"object\") {\n\t\t\t// Unevaluated properties must match schema\n\t\t\tconst unevalSchema = this.generatePropertySchema(schema.unevaluatedProperties);\n\t\t\treturn `${schemaWithCatchall}.refine((obj) => Object.keys(obj).filter(key => !${evaluatedPropsSet}.has(key)).every(key => ${unevalSchema}.safeParse(obj[key]).success), { message: \"Unevaluated properties must match the schema\" })`;\n\t\t}\n\n\t\treturn baseSchema;\n\t}\n\n\t/**\n\t * Generate Zod schema for a property\n\t * @param schema - The OpenAPI schema to generate\n\t * @param currentSchema - The name of the current schema being processed (for circular ref detection)\n\t * @param isTopLevel - Whether this is a top-level schema definition\n\t * @param suppressDefaultNullable - When true, don't apply defaultNullable (used when outer schema has explicit nullable: false)\n\t */\n\tgeneratePropertySchema(\n\t\tschema: OpenAPISchema,\n\t\tcurrentSchema?: string,\n\t\tisTopLevel = false,\n\t\tsuppressDefaultNullable = false\n\t): string {\n\t\t// Performance optimization: Check cache for simple schemas\n\t\t// Only cache schemas without $ref or complex compositions to avoid stale circular refs\n\t\tconst isCacheable = !schema.$ref && !schema.allOf && !schema.oneOf && !schema.anyOf && !currentSchema;\n\t\tif (isCacheable) {\n\t\t\tconst cacheKey = JSON.stringify({\n\t\t\t\tschema,\n\t\t\t\ttype: this.context.schemaType,\n\t\t\t\tmode: this.context.mode,\n\t\t\t\tsuppressDefaultNullable,\n\t\t\t});\n\t\t\tconst cached = this.schemaCache.get(cacheKey);\n\t\t\tif (cached) {\n\t\t\t\treturn cached;\n\t\t\t}\n\t\t}\n\n\t\t// Apply nested property filtering if needed\n\t\tif ((this.context.schemaType === \"request\" || this.context.schemaType === \"response\") && schema.properties) {\n\t\t\tschema = this.filterNestedProperties(schema);\n\t\t}\n\n\t\t// Determine if defaultNullable should apply to this schema.\n\t\t// defaultNullable should apply to property values within objects, NOT to:\n\t\t// 1. Top-level schema definitions (isTopLevel = true)\n\t\t// 2. Enum values - enums define discrete values and shouldn't be nullable by default\n\t\t// 3. Const/literal values - these are exact values and shouldn't be nullable by default\n\t\t// 4. When suppressDefaultNullable is true (outer schema has explicit nullable: false)\n\t\t//\n\t\t// Note: $ref properties DO respect defaultNullable. If you want a non-nullable\n\t\t// reference when defaultNullable is true, you must explicitly add `nullable: false`\n\t\t// to the schema containing the $ref.\n\t\tconst isEnum = !!schema.enum;\n\t\tconst isConst = schema.const !== undefined;\n\t\tconst shouldApplyDefaultNullable = !isTopLevel && !isEnum && !isConst && !suppressDefaultNullable;\n\t\tconst effectiveDefaultNullable = shouldApplyDefaultNullable ? this.context.defaultNullable : false;\n\t\tconst nullable = isNullable(schema, effectiveDefaultNullable);\n\n\t\t// Handle multiple types (OpenAPI 3.1)\n\t\tif (hasMultipleTypes(schema)) {\n\t\t\tconst union = this.generateMultiTypeUnion(schema, currentSchema);\n\t\t\treturn wrapNullable(union, nullable);\n\t\t}\n\n\t\t// Handle $ref\n\t\tif (schema.$ref) {\n\t\t\tconst refName = resolveRefName(schema.$ref);\n\t\t\t// Resolve through any aliases to get the actual schema\n\t\t\tconst resolvedRefName = this.resolveSchemaAlias(refName);\n\n\t\t\t// Track dependency (but not if it's just an alias at top level)\n\t\t\tif (currentSchema && refName !== currentSchema && !isTopLevel) {\n\t\t\t\tif (!this.context.schemaDependencies.has(currentSchema)) {\n\t\t\t\t\tthis.context.schemaDependencies.set(currentSchema, new Set());\n\t\t\t\t}\n\t\t\t\tthis.context.schemaDependencies.get(currentSchema)?.add(refName);\n\t\t\t}\n\t\t\t// Use the resolved name for the schema reference\n\t\t\t// Apply stripSchemaPrefix to get consistent schema names\n\t\t\tconst strippedRefName = stripPrefix(resolvedRefName, this.context.stripSchemaPrefix);\n\t\t\tconst schemaName = `${toCamelCase(strippedRefName, this.context.namingOptions)}Schema`;\n\t\t\tconst typeName = toPascalCase(strippedRefName);\n\n\t\t\t// Check for direct self-reference, circular dependency through alias,\n\t\t\t// or mutual circular dependency (both schemas are part of a circular chain)\n\t\t\tconst isDirectSelfRef = currentSchema && refName === currentSchema;\n\t\t\tconst isCircularAlias = currentSchema && this.isCircularThroughAlias(currentSchema, refName);\n\t\t\t// Only use lazy for refs within a circular chain when BOTH schemas are circular.\n\t\t\t// If only the target is circular (e.g., self-referencing), the current schema\n\t\t\t// referencing it doesn't need lazy because the target is defined first in\n\t\t\t// topological sort order.\n\t\t\tconst isMutuallyCircular =\n\t\t\t\tcurrentSchema && this.circularDependencies.has(currentSchema) && this.circularDependencies.has(refName);\n\n\t\t\tif (isDirectSelfRef || isCircularAlias || isMutuallyCircular) {\n\t\t\t\t// Use lazy evaluation for circular references\n\t\t\t\t// When types are in a separate file (imported), use z.ZodType<TypeName> for proper type inference\n\t\t\t\t// When types are inline (z.infer), use z.ZodTypeAny to avoid circular type references\n\t\t\t\tconst lazyTypeAnnotation = this.context.separateTypesFile ? `z.ZodType<${typeName}>` : \"z.ZodTypeAny\";\n\t\t\t\tconst lazySchema = `z.lazy((): ${lazyTypeAnnotation} => ${schemaName})`;\n\t\t\t\treturn wrapNullable(lazySchema, nullable);\n\t\t\t}\n\n\t\t\treturn wrapNullable(schemaName, nullable);\n\t\t}\n\n\t\t// Handle const (literal values)\n\t\tif (schema.const !== undefined) {\n\t\t\tconst literalValue = typeof schema.const === \"string\" ? `\"${schema.const}\"` : schema.const;\n\t\t\tconst zodLiteral = `z.literal(${literalValue})`;\n\t\t\treturn wrapNullable(zodLiteral, nullable);\n\t\t}\n\n\t\t// Handle enum\n\t\tif (schema.enum) {\n\t\t\t// Check if all values are booleans\n\t\t\tconst allBooleans = schema.enum.every(v => typeof v === \"boolean\");\n\t\t\tif (allBooleans) {\n\t\t\t\tconst zodBoolean = \"z.boolean()\";\n\t\t\t\treturn wrapNullable(zodBoolean, nullable);\n\t\t\t}\n\n\t\t\t// Check if all values are strings\n\t\t\tconst allStrings = schema.enum.every(v => typeof v === \"string\");\n\t\t\tif (allStrings) {\n\t\t\t\tconst enumValues = schema.enum.map(v => `\"${v}\"`).join(\", \");\n\t\t\t\tconst zodEnum = `z.enum([${enumValues}])`;\n\t\t\t\treturn wrapNullable(zodEnum, nullable);\n\t\t\t}\n\n\t\t\t// For numeric or mixed enums, use z.union with z.literal\n\t\t\tconst literalValues = schema.enum\n\t\t\t\t.map(v => {\n\t\t\t\t\tif (typeof v === \"string\") {\n\t\t\t\t\t\treturn `z.literal(\"${v}\")`;\n\t\t\t\t\t}\n\t\t\t\t\treturn `z.literal(${v})`;\n\t\t\t\t})\n\t\t\t\t.join(\", \");\n\t\t\tconst zodUnion = `z.union([${literalValues}])`;\n\t\t\treturn wrapNullable(zodUnion, nullable);\n\t\t}\n\n\t\t// Handle allOf\n\t\tif (schema.allOf) {\n\t\t\t// For allOf compositions, only apply nullable if explicitly set on the schema.\n\t\t\t// defaultNullable should NOT apply to composition results - they define schema shapes,\n\t\t\t// not property values. The .nullable() on individual properties inside the composition\n\t\t\t// is handled by generateInlineObjectShape which respects defaultNullable.\n\t\t\tconst compositionNullable = isNullable(schema, false);\n\t\t\tconst allOfResult = generateAllOf(\n\t\t\t\tschema.allOf,\n\t\t\t\tcompositionNullable,\n\t\t\t\t{\n\t\t\t\t\tgeneratePropertySchema: this.generatePropertySchema.bind(this),\n\t\t\t\t\tgenerateInlineObjectShape: this.generateInlineObjectShape.bind(this),\n\t\t\t\t\tresolveSchemaRef: this.resolveSchemaRef.bind(this),\n\t\t\t\t\twarn: this.context.warn,\n\t\t\t\t},\n\t\t\t\tcurrentSchema\n\t\t\t);\n\n\t\t\t// Track any conflicts detected\n\t\t\tif (allOfResult.conflicts.length > 0) {\n\t\t\t\tthis.allOfConflicts.push(...allOfResult.conflicts);\n\t\t\t}\n\n\t\t\tlet composition = allOfResult.schema;\n\n\t\t\t// Apply unevaluatedProperties if specified\n\t\t\tif (schema.unevaluatedProperties !== undefined) {\n\t\t\t\tcomposition = this.applyUnevaluatedProperties(composition, schema);\n\t\t\t}\n\n\t\t\treturn composition;\n\t\t}\n\n\t\t// Handle oneOf with discriminator support\n\t\tif (schema.oneOf) {\n\t\t\t// For oneOf compositions, only apply nullable if explicitly set on the schema.\n\t\t\t// defaultNullable should NOT apply to composition results.\n\t\t\tconst compositionNullable = isNullable(schema, false);\n\t\t\tconst needsPassthrough = schema.unevaluatedProperties !== undefined;\n\t\t\tlet composition = generateUnion(\n\t\t\t\tschema.oneOf,\n\t\t\t\tschema.discriminator?.propertyName,\n\t\t\t\tcompositionNullable,\n\t\t\t\t{\n\t\t\t\t\tgeneratePropertySchema: this.generatePropertySchema.bind(this),\n\t\t\t\t\tresolveDiscriminatorMapping: this.resolveDiscriminatorMapping.bind(this),\n\t\t\t\t\tresolveSchemaRef: this.resolveSchemaRef.bind(this),\n\t\t\t\t\twarn: this.context.warn,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpassthrough: needsPassthrough,\n\t\t\t\t\tdiscriminatorMapping: schema.discriminator?.mapping,\n\t\t\t\t},\n\t\t\t\tcurrentSchema\n\t\t\t);\n\n\t\t\t// Apply unevaluatedProperties if specified\n\t\t\tif (schema.unevaluatedProperties !== undefined) {\n\t\t\t\tcomposition = this.applyUnevaluatedProperties(composition, schema);\n\t\t\t}\n\n\t\t\treturn composition;\n\t\t}\n\n\t\t// Handle anyOf with discriminator support\n\t\tif (schema.anyOf) {\n\t\t\t// For anyOf compositions, only apply nullable if explicitly set on the schema.\n\t\t\t// defaultNullable should NOT apply to composition results.\n\t\t\tconst compositionNullable = isNullable(schema, false);\n\t\t\tconst needsPassthrough = schema.unevaluatedProperties !== undefined;\n\t\t\tlet composition = generateUnion(\n\t\t\t\tschema.anyOf,\n\t\t\t\tschema.discriminator?.propertyName,\n\t\t\t\tcompositionNullable,\n\t\t\t\t{\n\t\t\t\t\tgeneratePropertySchema: this.generatePropertySchema.bind(this),\n\t\t\t\t\tresolveDiscriminatorMapping: this.resolveDiscriminatorMapping.bind(this),\n\t\t\t\t\tresolveSchemaRef: this.resolveSchemaRef.bind(this),\n\t\t\t\t\twarn: this.context.warn,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tpassthrough: needsPassthrough,\n\t\t\t\t\tdiscriminatorMapping: schema.discriminator?.mapping,\n\t\t\t\t},\n\t\t\t\tcurrentSchema\n\t\t\t);\n\n\t\t\t// Apply unevaluatedProperties if specified\n\t\t\tif (schema.unevaluatedProperties !== undefined) {\n\t\t\t\tcomposition = this.applyUnevaluatedProperties(composition, schema);\n\t\t\t}\n\n\t\t\treturn composition;\n\t\t}\n\n\t\t// Handle not keyword (must be after compositions)\n\t\tif (schema.not) {\n\t\t\tconst notSchema = this.generatePropertySchema(schema.not, currentSchema);\n\t\t\tlet baseValidation: string;\n\n\t\t\t// If schema has a type, generate validation for that type first\n\t\t\tif (schema.type || schema.properties || schema.items) {\n\t\t\t\t// Create a copy without 'not' to generate base validation\n\t\t\t\tconst { not: _, ...baseSchema } = schema;\n\t\t\t\tbaseValidation = this.generatePropertySchema(baseSchema, currentSchema);\n\t\t\t} else {\n\t\t\t\t// No specific type, use unknown\n\t\t\t\tbaseValidation = \"z.unknown()\";\n\t\t\t}\n\n\t\t\tconst refined = `${baseValidation}.refine((val) => !${notSchema}.safeParse(val).success, { message: \"Value must not match the excluded schema\" })`;\n\t\t\treturn wrapNullable(refined, nullable);\n\t\t}\n\n\t\tlet validation = \"\";\n\t\tconst primaryType = getPrimaryType(schema);\n\n\t\tswitch (primaryType) {\n\t\t\tcase \"string\":\n\t\t\t\tvalidation = generateStringValidation(schema, this.context.useDescribe, {\n\t\t\t\t\tdateTimeValidation: this.context.dateTimeValidation,\n\t\t\t\t\tuuidValidation: this.context.uuidValidation,\n\t\t\t\t\tpatternCache: this.context.patternCache,\n\t\t\t\t});\n\t\t\t\tbreak;\n\n\t\t\tcase \"number\":\n\t\t\t\tvalidation = generateNumberValidation(schema, false, this.context.useDescribe);\n\t\t\t\tbreak;\n\n\t\t\tcase \"integer\":\n\t\t\t\tvalidation = generateNumberValidation(schema, true, this.context.useDescribe);\n\t\t\t\tbreak;\n\n\t\t\tcase \"boolean\":\n\t\t\t\tvalidation = \"z.boolean()\";\n\t\t\t\tvalidation = addDescription(validation, schema.description, this.context.useDescribe);\n\t\t\t\tbreak;\n\n\t\t\tcase \"array\":\n\t\t\t\tvalidation = generateArrayValidation(schema, {\n\t\t\t\t\tgeneratePropertySchema: this.generatePropertySchema.bind(this),\n\t\t\t\t\tuseDescribe: this.context.useDescribe,\n\t\t\t\t\tcurrentSchema,\n\t\t\t\t});\n\t\t\t\tbreak;\n\n\t\t\tcase \"object\":\n\t\t\t\tif (\n\t\t\t\t\tschema.properties ||\n\t\t\t\t\tschema.required ||\n\t\t\t\t\tschema.minProperties !== undefined ||\n\t\t\t\t\tschema.maxProperties !== undefined ||\n\t\t\t\t\tschema.patternProperties ||\n\t\t\t\t\tschema.propertyNames\n\t\t\t\t) {\n\t\t\t\t\tvalidation = generateObjectSchema(\n\t\t\t\t\t\tschema,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgeneratePropertySchema: this.generatePropertySchema.bind(this),\n\t\t\t\t\t\t\tshouldIncludeProperty: this.shouldIncludeProperty.bind(this),\n\t\t\t\t\t\t\tmode: this.context.mode,\n\t\t\t\t\t\t\tincludeDescriptions: this.context.includeDescriptions,\n\t\t\t\t\t\t\tuseDescribe: this.context.useDescribe,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcurrentSchema\n\t\t\t\t\t);\n\t\t\t\t\tvalidation = addDescription(validation, schema.description, this.context.useDescribe);\n\t\t\t\t} else {\n\t\t\t\t\t// Empty object schema - behavior controlled by emptyObjectBehavior option\n\t\t\t\t\tswitch (this.context.emptyObjectBehavior) {\n\t\t\t\t\t\tcase \"strict\":\n\t\t\t\t\t\t\tvalidation = \"z.strictObject({})\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"loose\":\n\t\t\t\t\t\t\tvalidation = \"z.looseObject({})\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"record\":\n\t\t\t\t\t\t\tvalidation = \"z.record(z.string(), z.unknown())\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tvalidation = addDescription(validation, schema.description, this.context.useDescribe);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase undefined:\n\t\t\tdefault:\n\t\t\t\tvalidation = \"z.unknown()\";\n\t\t\t\tvalidation = addDescription(validation, schema.description, this.context.useDescribe);\n\t\t}\n\n\t\tconst result = wrapNullable(validation, nullable);\n\n\t\t// Store in cache if cacheable\n\t\tif (isCacheable) {\n\t\t\tconst cacheKey = JSON.stringify({ schema, type: this.context.schemaType, mode: this.context.mode });\n\t\t\tthis.schemaCache.set(cacheKey, result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Generate inline object shape for use with .extend()\n\t * Returns just the shape object literal: { prop1: z.string(), prop2: z.number() }\n\t *\n\t * This method is specifically for allOf compositions where we need to pass\n\t * the shape directly to .extend() instead of using z.object({...}).shape.\n\t * This avoids the .nullable().shape bug when inline objects have nullable: true.\n\t *\n\t * According to Zod docs (https://zod.dev/api?id=extend):\n\t * - .extend() accepts an object of shape definitions\n\t * - e.g., baseSchema.extend({ prop: z.string() })\n\t */\n\tgenerateInlineObjectShape(schema: OpenAPISchema, currentSchema?: string): string {\n\t\tconst required = new Set(schema.required || []);\n\t\tconst properties: string[] = [];\n\n\t\tif (schema.properties) {\n\t\t\tfor (const [propName, propSchema] of Object.entries(schema.properties)) {\n\t\t\t\t// Skip properties based on readOnly/writeOnly\n\t\t\t\tif (!this.shouldIncludeProperty(propSchema)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst isRequired = required.has(propName);\n\t\t\t\tconst zodSchema = this.generatePropertySchema(propSchema, currentSchema);\n\n\t\t\t\t// Quote property name if it contains special characters\n\t\t\t\tconst validIdentifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;\n\t\t\t\tconst quotedPropName = validIdentifier.test(propName) ? propName : `\"${propName}\"`;\n\n\t\t\t\tlet propertyDef = `${quotedPropName}: ${zodSchema}`;\n\t\t\t\tif (!isRequired) {\n\t\t\t\t\tpropertyDef += \".optional()\";\n\t\t\t\t}\n\n\t\t\t\tproperties.push(propertyDef);\n\t\t\t}\n\t\t}\n\n\t\t// Return the shape as an object literal\n\t\tif (properties.length === 0) {\n\t\t\treturn \"{}\";\n\t\t}\n\n\t\treturn `{\\n${properties.map(p => `\\t${p}`).join(\",\\n\")}\\n}`;\n\t}\n}\n","import { existsSync, mkdirSync, writeFileSync } from \"node:fs\";\nimport { dirname, normalize, relative } from \"node:path\";\n\nimport {\n\tanalyzeSchemaUsage,\n\tConfigurationError,\n\tcreateFilterStatistics,\n\tdetectCircularReferences,\n\texpandTransitiveReferences,\n\textractSchemaRefs,\n\ttype FilterStatistics,\n\tformatFilterStatistics,\n\tgenerateCustomFileHeader,\n\tgenerateFileHeader,\n\tgetOperationName,\n\tLRUCache,\n\tloadOpenAPISpec,\n\tmergeParameters,\n\tresolveRefName,\n\ttype SchemaContext,\n\tSchemaGenerationError,\n\tSpecValidationError,\n\tshouldIncludeOperation,\n\tstripPathPrefix,\n\tstripPrefix,\n\ttoCamelCase,\n\ttoPascalCase,\n\tvalidateFilters,\n\tWarningCollector,\n} from \"@cerios/openapi-core\";\nimport { type InternalTypeScriptGeneratorOptions, TypeScriptGenerator } from \"@cerios/openapi-to-typescript\";\nimport { minimatch } from \"minimatch\";\n\nimport { generateEnum } from \"./generators/enum-generator\";\nimport { generateJSDoc } from \"./generators/jsdoc-generator\";\nimport { PropertyGenerator } from \"./generators/property-generator\";\nimport type {\n\tInternalOpenApiGeneratorOptions,\n\tOpenAPISchema,\n\tOpenAPISpec,\n\tOpenApiGeneratorOptions,\n\tResolvedOptions,\n} from \"./types\";\nimport { buildDateTimeValidation, buildUuidValidation } from \"./validators/string-validator\";\n\n/**\n * OpenAPI operation structure for path methods\n */\ninterface OpenAPIOperation {\n\toperationId?: string;\n\tparameters?: unknown[];\n\trequestBody?: {\n\t\tcontent?: Record<string, { schema?: unknown }>;\n\t};\n\tresponses?: Record<\n\t\tstring,\n\t\t{\n\t\t\tcontent?: Record<string, { schema?: unknown }>;\n\t\t}\n\t>;\n\t[key: string]: unknown;\n}\n\n/**\n * OpenAPI path item with HTTP method operations\n */\ninterface OpenAPIPathItem {\n\tparameters?: unknown[];\n\tget?: OpenAPIOperation;\n\tpost?: OpenAPIOperation;\n\tput?: OpenAPIOperation;\n\tpatch?: OpenAPIOperation;\n\tdelete?: OpenAPIOperation;\n\thead?: OpenAPIOperation;\n\toptions?: OpenAPIOperation;\n\t[key: string]: unknown;\n}\n\n/** HTTP methods that can have operations */\ntype HttpMethod = \"get\" | \"post\" | \"put\" | \"patch\" | \"delete\" | \"head\" | \"options\";\n\n/** Array of HTTP methods for iteration */\nconst HTTP_METHODS: HttpMethod[] = [\"get\", \"post\", \"put\", \"patch\", \"delete\", \"head\", \"options\"];\n\n/**\n * Resolved parameter after $ref resolution - matches OpenAPIParameter structure\n */\ninterface ResolvedParameter {\n\tname: string;\n\tin: \"query\" | \"header\" | \"path\" | \"cookie\";\n\tdescription?: string;\n\trequired?: boolean;\n\tschema?: OpenAPISchema & { $ref?: string };\n\tdeprecated?: boolean;\n\tstyle?: string;\n\texplode?: boolean;\n}\n\n/**\n * Type guard to check if a value is a valid resolved parameter\n */\nfunction isResolvedParameter(param: unknown): param is ResolvedParameter {\n\treturn (\n\t\ttypeof param === \"object\" &&\n\t\tparam !== null &&\n\t\t\"name\" in param &&\n\t\ttypeof (param as Record<string, unknown>).name === \"string\" &&\n\t\t\"in\" in param\n\t);\n}\n\n/**\n * Type guard to check if a value is a valid OpenAPIPathItem\n */\nfunction isOpenAPIPathItem(value: unknown): value is OpenAPIPathItem {\n\treturn typeof value === \"object\" && value !== null;\n}\n\nexport class OpenApiGenerator {\n\tprivate schemas: Map<string, string> = new Map();\n\tprivate types: Map<string, string> = new Map();\n\tprivate schemaDependencies: Map<string, Set<string>> = new Map();\n\tprivate options: InternalOpenApiGeneratorOptions;\n\tprivate spec: OpenAPISpec;\n\tprivate propertyGenerator: PropertyGenerator;\n\tprivate schemaUsageMap: Map<string, SchemaContext> = new Map();\n\tprivate requestOptions: ResolvedOptions;\n\tprivate responseOptions: ResolvedOptions;\n\tprivate needsZodImport = true;\n\tprivate filterStats: FilterStatistics = createFilterStatistics();\n\t/** Instance-level pattern cache for parallel-safe execution */\n\tprivate patternCache: LRUCache<string, string>;\n\t/** Instance-level date-time validation string for parallel-safe execution */\n\tprivate dateTimeValidation: string;\n\t/** Instance-level uuid validation string for parallel-safe execution */\n\tprivate uuidValidation: string;\n\t/** Track schemas involved in circular dependency chains */\n\tprivate circularDependencies: Set<string> = new Set();\n\t/** Separate schemas mode - when outputZodSchemas is specified */\n\tprivate separateSchemasMode: boolean;\n\t/** Warning collector for deferred output */\n\tprivate readonly warningCollector: WarningCollector;\n\n\tconstructor(options: OpenApiGeneratorOptions | InternalOpenApiGeneratorOptions) {\n\t\t// Validate input path early\n\t\tif (!options.input) {\n\t\t\tthrow new ConfigurationError(\"Input path is required\", { providedOptions: options });\n\t\t}\n\n\t\t// Determine if we're in separate schemas mode\n\t\tthis.separateSchemasMode = Boolean(options.outputZodSchemas);\n\n\t\tconst showWarnings = options.showWarnings !== false;\n\t\tthis.warningCollector = new WarningCollector({\n\t\t\tpackageName: \"@cerios/openapi-to-zod\",\n\t\t\tenabled: showWarnings,\n\t\t});\n\n\t\tthis.options = {\n\t\t\tmode: options.mode || \"normal\",\n\t\t\tinput: options.input,\n\t\t\toutputTypes: options.outputTypes,\n\t\t\toutputZodSchemas: options.outputZodSchemas,\n\t\t\tenumFormat: options.enumFormat,\n\t\t\ttypeAssertionThreshold: options.typeAssertionThreshold ?? 0,\n\t\t\tincludeDescriptions: options.includeDescriptions ?? true,\n\t\t\tuseDescribe: options.useDescribe ?? false,\n\t\t\tdefaultNullable: options.defaultNullable ?? false,\n\t\t\temptyObjectBehavior: options.emptyObjectBehavior ?? \"loose\",\n\t\t\tschemaType: options.schemaType || \"all\",\n\t\t\tprefix: options.prefix,\n\t\t\tsuffix: options.suffix,\n\t\t\tstripSchemaPrefix: options.stripSchemaPrefix,\n\t\t\tstripPathPrefix: options.stripPathPrefix,\n\t\t\tuseOperationId: options.useOperationId ?? true,\n\t\t\tshowStats: options.showStats ?? true,\n\t\t\tshowWarnings,\n\t\t\trequest: options.request,\n\t\t\tresponse: options.response,\n\t\t\toperationFilters: options.operationFilters,\n\t\t\tignoreHeaders: options.ignoreHeaders,\n\t\t\tcacheSize: options.cacheSize ?? 1000,\n\t\t\tbatchSize: options.batchSize ?? 10,\n\t\t\tcustomDateTimeFormatRegex: options.customDateTimeFormatRegex,\n\t\t\tuuidFormat: options.uuidFormat,\n\t\t\tincludeHeader: (options as InternalOpenApiGeneratorOptions).includeHeader,\n\t\t\tfileHeader: options.fileHeader,\n\t\t};\n\n\t\t// Create instance-level pattern cache (parallel-safe)\n\t\tthis.patternCache = new LRUCache<string, string>(this.options.cacheSize ?? 1000);\n\n\t\t// Build date-time validation string (parallel-safe, no global state)\n\t\tthis.dateTimeValidation = buildDateTimeValidation(this.options.customDateTimeFormatRegex);\n\n\t\t// Build uuid validation string (parallel-safe, no global state)\n\t\tthis.uuidValidation = buildUuidValidation(this.options.uuidFormat);\n\n\t\t// Load and parse the OpenAPI specification using core utility\n\t\tthis.spec = loadOpenAPISpec(this.options.input);\n\n\t\tthis.validateSpec();\n\n\t\t// Resolve options for request and response contexts\n\t\tthis.requestOptions = this.resolveOptionsForContext(\"request\");\n\t\tthis.responseOptions = this.resolveOptionsForContext(\"response\");\n\n\t\t// Analyze schema usage to determine context (request/response/both)\n\t\tthis.initializeSchemaUsage();\n\n\t\t// Initialize property generator with context\n\t\t// We'll update this dynamically based on schema context during generation\n\t\tthis.propertyGenerator = new PropertyGenerator({\n\t\t\tspec: this.spec,\n\t\t\tschemaDependencies: this.schemaDependencies,\n\t\t\tschemaType: this.options.schemaType || \"all\",\n\t\t\tmode: this.requestOptions.mode,\n\t\t\tincludeDescriptions: this.requestOptions.includeDescriptions,\n\t\t\tuseDescribe: this.requestOptions.useDescribe,\n\t\t\tdefaultNullable: this.options.defaultNullable ?? false,\n\t\t\temptyObjectBehavior: this.options.emptyObjectBehavior ?? \"loose\",\n\t\t\tnamingOptions: {\n\t\t\t\tprefix: this.options.prefix,\n\t\t\t\tsuffix: this.options.suffix,\n\t\t\t},\n\t\t\tstripSchemaPrefix: this.options.stripSchemaPrefix,\n\t\t\tdateTimeValidation: this.dateTimeValidation,\n\t\t\tuuidValidation: this.uuidValidation,\n\t\t\tpatternCache: this.patternCache,\n\t\t\tseparateTypesFile: this.separateSchemasMode,\n\t\t\twarn: msg => {\n\t\t\t\tthis.warningCollector.add(msg);\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Generate schemas as a string (without writing to file)\n\t * When separateSchemasMode is active, generates Zod schemas with explicit type annotations\n\t * @returns The generated TypeScript code as a string\n\t */\n\tgenerateString(): string {\n\t\tif (!this.spec.components?.schemas) {\n\t\t\tthrow new SpecValidationError(\"No schemas found in OpenAPI spec\", { filePath: this.options.input });\n\t\t}\n\n\t\t// When outputZodSchemas is specified, generate Zod schemas with explicit type annotations\n\t\tif (this.separateSchemasMode) {\n\t\t\treturn this.generateSeparateSchemasString();\n\t\t}\n\n\t\t// Pre-analyze schemas to detect circular dependencies BEFORE generation\n\t\t// This allows us to use z.lazy() for references to circular deps\n\t\tthis.analyzeCircularDependencies();\n\n\t\t// Update property generator context with circular dependencies\n\t\tthis.propertyGenerator.setCircularDependencies(this.circularDependencies);\n\n\t\t// Generate schemas and track dependencies\n\t\tfor (const [name, schema] of Object.entries(this.spec.components.schemas)) {\n\t\t\t// Skip schemas not referenced by filtered operations when operation filters are active\n\t\t\tif (this.options.operationFilters && this.schemaUsageMap.size > 0 && !this.schemaUsageMap.has(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.generateComponentSchema(name, schema);\n\t\t}\n\n\t\t// Generate query parameter schemas from path operations\n\t\tthis.generateQueryParameterSchemas();\n\n\t\t// Generate header parameter schemas from path operations\n\t\tthis.generateHeaderParameterSchemas();\n\n\t\t// Validate filters and emit warnings if needed\n\t\tvalidateFilters(this.filterStats, this.options.operationFilters, msg => {\n\t\t\tthis.warningCollector.add(msg);\n\t\t});\n\n\t\t// Sort schemas by dependencies\n\t\tconst orderedSchemaNames = this.topologicalSort();\n\n\t\t// Build output\n\t\tconst output: string[] = [];\n\n\t\t// Add custom file header comments first (at very top)\n\t\tconst customHeader = generateCustomFileHeader(this.options.fileHeader);\n\t\tif (customHeader) {\n\t\t\toutput.push(customHeader.trimEnd());\n\t\t\toutput.push(\"\");\n\t\t}\n\n\t\t// Add header comment if enabled (default: true)\n\t\tif (this.options.includeHeader !== false) {\n\t\t\toutput.push(\n\t\t\t\tgenerateFileHeader({\n\t\t\t\t\tpackageName: \"@cerios/openapi-to-zod\",\n\t\t\t\t\tapiTitle: this.spec.info?.title,\n\t\t\t\t\tapiVersion: this.spec.info?.version,\n\t\t\t\t}).trimEnd()\n\t\t\t);\n\t\t\toutput.push(\"\");\n\t\t}\n\n\t\t// Add statistics if enabled (must be explicitly true)\n\t\tif (this.options.showStats === true) {\n\t\t\toutput.push(...this.generateStats());\n\t\t\toutput.push(\"\");\n\t\t}\n\n\t\t// Conditionally import Zod only if needed\n\t\tif (this.needsZodImport) {\n\t\t\toutput.push('import { z } from \"zod\";');\n\t\t\toutput.push(\"\");\n\t\t}\n\n\t\t// Add schemas and types in dependency order\n\t\toutput.push(\"// Schemas and Types\");\n\t\tfor (const name of orderedSchemaNames) {\n\t\t\tconst schemaCode = this.schemas.get(name);\n\t\t\tconst typeCode = this.types.get(name);\n\n\t\t\tif (schemaCode) {\n\t\t\t\t// Zod schema with inferred type\n\t\t\t\toutput.push(schemaCode);\n\n\t\t\t\t// Add type immediately after schema (if not already included)\n\t\t\t\t// Convert schema name to valid TypeScript type name (handles dotted names)\n\t\t\t\t// Apply stripSchemaPrefix before type name generation\n\t\t\t\tconst strippedName = stripPrefix(name, this.options.stripSchemaPrefix);\n\t\t\t\tconst typeName = toPascalCase(strippedName);\n\t\t\t\tif (!schemaCode.includes(`export type ${typeName}`)) {\n\t\t\t\t\tconst schemaName = `${toCamelCase(strippedName, { prefix: this.options.prefix, suffix: this.options.suffix })}Schema`;\n\t\t\t\t\toutput.push(`export type ${typeName} = z.infer<typeof ${schemaName}>;`);\n\t\t\t\t}\n\t\t\t\toutput.push(\"\");\n\t\t\t} else if (typeCode) {\n\t\t\t\t// Type only (shouldn't happen in Zod-only mode, but kept for safety)\n\t\t\t\toutput.push(typeCode);\n\t\t\t\toutput.push(\"\");\n\t\t\t}\n\t\t}\n\n\t\t// Flush warnings when generating standalone string\n\t\tthis.warningCollector.flush();\n\n\t\treturn output.join(\"\\n\");\n\t}\n\n\t/**\n\t * Ensure directory exists for a file path\n\t */\n\tprivate ensureDirectoryExists(filePath: string): void {\n\t\tconst normalizedPath = normalize(filePath);\n\t\tconst dir = dirname(normalizedPath);\n\t\tif (!existsSync(dir)) {\n\t\t\tmkdirSync(dir, { recursive: true });\n\t\t}\n\t}\n\n\t/**\n\t * Generate the complete output file(s)\n\t * When separateSchemasMode is active, generates both types and schemas files\n\t */\n\tgenerate(): void {\n\t\tif (this.separateSchemasMode) {\n\t\t\t// Generate both types and schemas files\n\t\t\tconst typesContent = this.generateTypesString();\n\t\t\tconst schemasContent = this.generateString();\n\n\t\t\t// Write types file\n\t\t\tconst normalizedTypes = normalize(this.options.outputTypes);\n\t\t\tthis.ensureDirectoryExists(normalizedTypes);\n\t\t\twriteFileSync(normalizedTypes, typesContent, \"utf-8\");\n\t\t\tconsole.log(` ✓ Generated ${normalizedTypes}`);\n\n\t\t\t// Write schemas file (outputZodSchemas is guaranteed by separateSchemasMode check)\n\t\t\tif (!this.options.outputZodSchemas) {\n\t\t\t\tthrow new Error(\"Internal error: outputZodSchemas should be defined in separateSchemasMode\");\n\t\t\t}\n\t\t\tconst outputZodSchemas = this.options.outputZodSchemas;\n\t\t\tconst normalizedSchemas = normalize(outputZodSchemas);\n\t\t\tthis.ensureDirectoryExists(normalizedSchemas);\n\t\t\twriteFileSync(normalizedSchemas, schemasContent, \"utf-8\");\n\t\t\tconsole.log(` ✓ Generated ${normalizedSchemas}`);\n\t\t} else {\n\t\t\t// Original behavior - single file with z.infer\n\t\t\tconst output = this.generateString();\n\t\t\tconst normalizedOutput = normalize(this.options.outputTypes);\n\t\t\tthis.ensureDirectoryExists(normalizedOutput);\n\t\t\twriteFileSync(normalizedOutput, output);\n\t\t\tconsole.log(` ✓ Generated ${normalizedOutput}`);\n\t\t}\n\n\t\t// Flush all collected warnings at the end\n\t\tthis.warningCollector.flush();\n\t}\n\n\t/**\n\t * Generate Zod schemas with explicit type annotations (for outputZodSchemas mode)\n\t * Generates schemas like: `export const userSchema: z.ZodType<User> = z.object({...})`\n\t * @returns The generated Zod schemas TypeScript code\n\t */\n\tprivate generateSeparateSchemasString(): string {\n\t\t// Guard: schemas must exist (checked in generateString before calling this)\n\t\tconst schemas = this.spec.components?.schemas;\n\t\tif (!schemas) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\t// Guard: outputZodSchemas must exist (we're in separateSchemasMode)\n\t\tif (!this.options.outputZodSchemas) {\n\t\t\tthrow new Error(\"Internal error: outputZodSchemas should be defined in separateSchemasMode\");\n\t\t}\n\t\tconst outputZodSchemas = this.options.outputZodSchemas;\n\n\t\t// Pre-analyze schemas to detect circular dependencies\n\t\tthis.analyzeCircularDependencies();\n\t\tthis.propertyGenerator.setCircularDependencies(this.circularDependencies);\n\n\t\t// Generate schemas and track dependencies\n\t\tfor (const [name, schema] of Object.entries(schemas)) {\n\t\t\tif (this.options.operationFilters && this.schemaUsageMap.size > 0 && !this.schemaUsageMap.has(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.generateComponentSchema(name, schema);\n\t\t}\n\n\t\t// Generate query and header parameter schemas\n\t\tthis.generateQueryParameterSchemas();\n\t\tthis.generateHeaderParameterSchemas();\n\n\t\t// Validate filters\n\t\tvalidateFilters(this.filterStats, this.options.operationFilters, msg => {\n\t\t\tthis.warningCollector.add(msg);\n\t\t});\n\n\t\t// Sort schemas\n\t\tconst orderedSchemaNames = this.topologicalSort();\n\n\t\t// Build output\n\t\tconst output: string[] = [];\n\n\t\t// Add custom file header comments first (at very top)\n\t\tconst customHeader = generateCustomFileHeader(this.options.fileHeader);\n\t\tif (customHeader) {\n\t\t\toutput.push(customHeader.trimEnd());\n\t\t\toutput.push(\"\");\n\t\t}\n\n\t\toutput.push(\n\t\t\tgenerateFileHeader({\n\t\t\t\tpackageName: \"@cerios/openapi-to-zod\",\n\t\t\t\tapiTitle: this.spec.info?.title,\n\t\t\t\tapiVersion: this.spec.info?.version,\n\t\t\t}).trimEnd()\n\t\t);\n\t\toutput.push(\"\");\n\n\t\t// Add statistics\n\t\tif (this.options.showStats === true) {\n\t\t\toutput.push(...this.generateStats());\n\t\t\toutput.push(\"\");\n\t\t}\n\n\t\t// Add Zod import\n\t\toutput.push('import { z } from \"zod\";');\n\n\t\t// Calculate relative import path for types\n\t\tconst typesImportPath = this.calculateRelativeImportPath(outputZodSchemas, this.options.outputTypes);\n\n\t\t// Collect all type names that need to be imported\n\t\tconst typeNames: string[] = [];\n\t\tfor (const name of orderedSchemaNames) {\n\t\t\tconst strippedName = stripPrefix(name, this.options.stripSchemaPrefix);\n\t\t\tconst typeName = toPascalCase(strippedName);\n\t\t\ttypeNames.push(typeName);\n\t\t}\n\n\t\t// Add type imports\n\t\tif (typeNames.length > 0) {\n\t\t\toutput.push(`import type { ${typeNames.join(\", \")} } from \"${typesImportPath}\";`);\n\t\t}\n\t\toutput.push(\"\");\n\n\t\t// Add schemas with explicit type annotations\n\t\toutput.push(\"// Schemas\");\n\t\tfor (const name of orderedSchemaNames) {\n\t\t\tconst schemaCode = this.schemas.get(name);\n\t\t\tif (schemaCode) {\n\t\t\t\tconst strippedName = stripPrefix(name, this.options.stripSchemaPrefix);\n\t\t\t\tconst typeName = toPascalCase(strippedName);\n\t\t\t\tconst schemaName = `${toCamelCase(strippedName, { prefix: this.options.prefix, suffix: this.options.suffix })}Schema`;\n\n\t\t\t\t// Pass schema definition for complexity calculation (may be undefined for query/header schemas)\n\t\t\t\tconst schemaDefinition = this.isRecordObject(schemas[name]) ? schemas[name] : undefined;\n\t\t\t\tconst transformedCode = this.addExplicitTypeAnnotation(schemaCode, schemaName, typeName, schemaDefinition);\n\t\t\t\toutput.push(transformedCode);\n\t\t\t\toutput.push(\"\");\n\t\t\t}\n\t\t}\n\n\t\treturn output.join(\"\\n\");\n\t}\n\n\t/**\n\t * Generate TypeScript types as a string (for outputZodSchemas mode)\n\t * Uses @cerios/openapi-to-typescript internally\n\t * @returns The generated TypeScript types code\n\t */\n\tgenerateTypesString(): string {\n\t\tconst internalOptions: InternalTypeScriptGeneratorOptions = {\n\t\t\tinput: this.options.input,\n\t\t\toutputTypes: this.options.outputTypes,\n\t\t\tincludeDescriptions: this.options.includeDescriptions,\n\t\t\tdefaultNullable: this.options.defaultNullable,\n\t\t\tprefix: this.options.prefix,\n\t\t\tsuffix: this.options.suffix,\n\t\t\tstripSchemaPrefix: this.options.stripSchemaPrefix,\n\t\t\tstripPathPrefix: this.options.stripPathPrefix,\n\t\t\toperationFilters: this.options.operationFilters,\n\t\t\tshowStats: this.options.showStats,\n\t\t\tenumFormat: this.options.enumFormat ?? \"const-object\",\n\t\t\tincludeHeader: false, // We add our own header for consistent branding\n\t\t\tshowWarnings: false, // We handle warnings ourselves\n\t\t};\n\t\tconst tsGenerator = new TypeScriptGenerator(internalOptions);\n\n\t\t// Add custom file header comments first (at very top)\n\t\tconst customHeader = generateCustomFileHeader(this.options.fileHeader);\n\n\t\tconst header = generateFileHeader({\n\t\t\tpackageName: \"@cerios/openapi-to-zod\",\n\t\t\tapiTitle: this.spec.info?.title,\n\t\t\tapiVersion: this.spec.info?.version,\n\t\t});\n\t\treturn customHeader + header + tsGenerator.generateString();\n\t}\n\n\t/**\n\t * Add explicit type annotation to a schema declaration\n\t * Transforms: `export const userSchema = z.object({...})`\n\t * To: `export const userSchema: z.ZodType<User> = z.object({...})` (annotation)\n\t * Or: `export const userSchema = z.object({...}) as unknown as z.ZodType<User>` (double assertion)\n\t *\n\t * Uses double assertion via `unknown` when typeAssertionThreshold is set and schema complexity\n\t * meets or exceeds the threshold. This completely bypasses TypeScript's structural checking\n\t * to avoid \"Type instantiation is excessively deep\" errors on very large schemas.\n\t *\n\t * Also removes any `export type X = z.infer<...>` lines since types\n\t * are imported from the separate types file.\n\t */\n\tprivate addExplicitTypeAnnotation(\n\t\tschemaCode: string,\n\t\tschemaName: string,\n\t\ttypeName: string,\n\t\tschemaDefinition?: Record<string, unknown>\n\t): string {\n\t\t// Remove any z.infer type exports since types come from the types file\n\t\tconst code = schemaCode.replace(/\\nexport type \\w+ = z\\.infer<typeof \\w+>;/g, \"\");\n\n\t\t// Handle JSDoc comments - they should come before the export\n\t\tconst jsdocMatch = code.match(/^(\\/\\*\\*[\\s\\S]*?\\*\\/\\n)?/);\n\t\tconst jsdoc = jsdocMatch?.[1] || \"\";\n\t\tconst codeWithoutJsdoc = code.slice(jsdoc.length);\n\n\t\t// Determine if we should use assertion syntax based on complexity threshold\n\t\tconst threshold = this.options.typeAssertionThreshold ?? 0;\n\t\tconst useAssertion =\n\t\t\tthreshold > 0 && schemaDefinition && this.calculateSchemaComplexity(schemaDefinition) >= threshold;\n\n\t\t// Standard pattern - replace export with typed version\n\t\t// This works for both regular schemas and enum schemas\n\t\tconst pattern = new RegExp(`export const ${schemaName} = `);\n\t\tif (pattern.test(codeWithoutJsdoc)) {\n\t\t\tlet schemaBody = codeWithoutJsdoc.replace(pattern, \"\");\n\t\t\tif (useAssertion) {\n\t\t\t\t// Remove trailing semicolon for assertion syntax\n\t\t\t\tschemaBody = schemaBody.replace(/;$/, \"\");\n\t\t\t\t// Double assertion via unknown: completely bypasses TypeScript's structural checking\n\t\t\t\t// This avoids \"Type instantiation is excessively deep\" even for very large schemas\n\t\t\t\treturn `${jsdoc}export const ${schemaName} = ${schemaBody} as unknown as z.ZodType<${typeName}>;`;\n\t\t\t}\n\t\t\t// Annotation syntax: export const xSchema: z.ZodType<X> = z.object({...})\n\t\t\treturn `${jsdoc}export const ${schemaName}: z.ZodType<${typeName}> = ${schemaBody}`;\n\t\t}\n\n\t\treturn code;\n\t}\n\n\t/**\n\t * Type guard to check if a value is a Record<string, unknown>\n\t */\n\tprivate isRecordObject(value: unknown): value is Record<string, unknown> {\n\t\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n\t}\n\n\t/**\n\t * Calculate the complexity of a schema for threshold comparison\n\t * Complexity formula: properties + (nested levels * 10) + (array/union members * 2)\n\t */\n\tprivate calculateSchemaComplexity(schema: Record<string, unknown>, depth = 0): number {\n\t\tif (!schema || typeof schema !== \"object\") {\n\t\t\treturn 0;\n\t\t}\n\n\t\tlet complexity = depth * 10; // Base cost for nesting\n\n\t\t// Handle $ref\n\t\tif (schema.$ref) {\n\t\t\t// Referenced schemas contribute fixed complexity (avoid infinite recursion)\n\t\t\treturn complexity + 5;\n\t\t}\n\n\t\t// Count properties\n\t\tconst properties = schema.properties;\n\t\tif (this.isRecordObject(properties)) {\n\t\t\tconst propCount = Object.keys(properties).length;\n\t\t\tcomplexity += propCount;\n\n\t\t\t// Recursively calculate nested property complexity\n\t\t\tfor (const prop of Object.values(properties)) {\n\t\t\t\tif (this.isRecordObject(prop)) {\n\t\t\t\t\tcomplexity += this.calculateSchemaComplexity(prop, depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Handle allOf\n\t\tconst allOf = schema.allOf;\n\t\tif (Array.isArray(allOf)) {\n\t\t\tcomplexity += allOf.length * 2;\n\t\t\tfor (const subSchema of allOf) {\n\t\t\t\tif (this.isRecordObject(subSchema)) {\n\t\t\t\t\tcomplexity += this.calculateSchemaComplexity(subSchema, depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Handle oneOf\n\t\tconst oneOf = schema.oneOf;\n\t\tif (Array.isArray(oneOf)) {\n\t\t\tcomplexity += oneOf.length * 2;\n\t\t\tfor (const subSchema of oneOf) {\n\t\t\t\tif (this.isRecordObject(subSchema)) {\n\t\t\t\t\tcomplexity += this.calculateSchemaComplexity(subSchema, depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Handle anyOf\n\t\tconst anyOf = schema.anyOf;\n\t\tif (Array.isArray(anyOf)) {\n\t\t\tcomplexity += anyOf.length * 2;\n\t\t\tfor (const subSchema of anyOf) {\n\t\t\t\tif (this.isRecordObject(subSchema)) {\n\t\t\t\t\tcomplexity += this.calculateSchemaComplexity(subSchema, depth + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Handle array items\n\t\tconst items = schema.items;\n\t\tif (this.isRecordObject(items)) {\n\t\t\tcomplexity += 2; // Array cost\n\t\t\tcomplexity += this.calculateSchemaComplexity(items, depth + 1);\n\t\t}\n\n\t\t// Handle additionalProperties\n\t\tconst additionalProps = schema.additionalProperties;\n\t\tif (this.isRecordObject(additionalProps)) {\n\t\t\tcomplexity += 2; // Record cost\n\t\t\tcomplexity += this.calculateSchemaComplexity(additionalProps, depth + 1);\n\t\t}\n\n\t\treturn complexity;\n\t}\n\n\t/**\n\t * Calculate relative import path from schema file to types file\n\t */\n\tprivate calculateRelativeImportPath(fromPath: string, toPath: string): string {\n\t\tconst fromDir = dirname(normalize(fromPath));\n\t\tconst toFile = normalize(toPath).replace(/\\.[tj]s$/, \"\"); // Remove extension\n\n\t\tlet relativePath = relative(fromDir, toFile);\n\n\t\t// Ensure path starts with ./ or ../\n\t\tif (!relativePath.startsWith(\".\") && !relativePath.startsWith(\"..\")) {\n\t\t\trelativePath = `./${relativePath}`;\n\t\t}\n\n\t\t// Normalize path separators for cross-platform compatibility\n\t\treturn relativePath.replace(/\\\\/g, \"/\");\n\t}\n\n\t/**\n\t * Resolve options for a specific context (request or response)\n\t * Nested options silently override root-level options\n\t */\n\tprivate resolveOptionsForContext(context: \"request\" | \"response\"): ResolvedOptions {\n\t\tconst contextOptions = context === \"request\" ? this.options.request : this.options.response;\n\n\t\treturn {\n\t\t\tmode: contextOptions?.mode ?? this.options.mode ?? \"normal\",\n\t\t\tuseDescribe: contextOptions?.useDescribe ?? this.options.useDescribe ?? false,\n\t\t\tincludeDescriptions: contextOptions?.includeDescriptions ?? this.options.includeDescriptions ?? true,\n\t\t};\n\t}\n\n\t/**\n\t * Initialize schema usage map using core utilities with operation filtering\n\t * This is a wrapper around core's analyzeSchemaUsage that adds operation filtering\n\t */\n\tprivate initializeSchemaUsage(): void {\n\t\t// If we have operation filters, we need to track stats and filter manually\n\t\tif (this.options.operationFilters && this.spec.paths) {\n\t\t\tconst requestSchemas = new Set<string>();\n\t\t\tconst responseSchemas = new Set<string>();\n\n\t\t\tfor (const [path, pathItem] of Object.entries(this.spec.paths)) {\n\t\t\t\tif (!isOpenAPIPathItem(pathItem)) continue;\n\t\t\t\tfor (const method of HTTP_METHODS) {\n\t\t\t\t\tconst operation = pathItem[method];\n\t\t\t\t\tif (!operation) continue;\n\n\t\t\t\t\t// Track total operations\n\t\t\t\t\tthis.filterStats.totalOperations++;\n\n\t\t\t\t\t// Apply operation filters\n\t\t\t\t\tif (!shouldIncludeOperation(operation, path, method, this.options.operationFilters, this.filterStats)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Count included operation\n\t\t\t\t\tthis.filterStats.includedOperations++;\n\n\t\t\t\t\t// Check request bodies\n\t\t\t\t\tif (operation.requestBody && typeof operation.requestBody === \"object\") {\n\t\t\t\t\t\tconst reqBody = operation.requestBody;\n\t\t\t\t\t\tif (reqBody.content && typeof reqBody.content === \"object\") {\n\t\t\t\t\t\t\tfor (const mediaType of Object.values(reqBody.content)) {\n\t\t\t\t\t\t\t\tif (mediaType && typeof mediaType === \"object\" && \"schema\" in mediaType && mediaType.schema) {\n\t\t\t\t\t\t\t\t\textractSchemaRefs(mediaType.schema as OpenAPISchema, requestSchemas);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check responses\n\t\t\t\t\tif (operation.responses && typeof operation.responses === \"object\") {\n\t\t\t\t\t\tfor (const response of Object.values(operation.responses)) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tresponse &&\n\t\t\t\t\t\t\t\ttypeof response === \"object\" &&\n\t\t\t\t\t\t\t\t\"content\" in response &&\n\t\t\t\t\t\t\t\tresponse.content &&\n\t\t\t\t\t\t\t\ttypeof response.content === \"object\"\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tfor (const mediaType of Object.values(response.content)) {\n\t\t\t\t\t\t\t\t\tif (mediaType && typeof mediaType === \"object\" && \"schema\" in mediaType && mediaType.schema) {\n\t\t\t\t\t\t\t\t\t\textractSchemaRefs(mediaType.schema as OpenAPISchema, responseSchemas);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check parameters\n\t\t\t\t\tif (operation.parameters && Array.isArray(operation.parameters)) {\n\t\t\t\t\t\tfor (const param of operation.parameters) {\n\t\t\t\t\t\t\tif (isResolvedParameter(param) && param.schema) {\n\t\t\t\t\t\t\t\textractSchemaRefs(param.schema as OpenAPISchema, requestSchemas);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Expand transitive references to include all indirectly referenced schemas\n\t\t\texpandTransitiveReferences(requestSchemas, this.spec);\n\t\t\texpandTransitiveReferences(responseSchemas, this.spec);\n\n\t\t\t// Build usage map from filtered operations\n\t\t\tfor (const [name] of Object.entries(this.spec.components?.schemas || {})) {\n\t\t\t\tif (requestSchemas.has(name) && responseSchemas.has(name)) {\n\t\t\t\t\tthis.schemaUsageMap.set(name, \"both\");\n\t\t\t\t} else if (requestSchemas.has(name)) {\n\t\t\t\t\tthis.schemaUsageMap.set(name, \"request\");\n\t\t\t\t} else if (responseSchemas.has(name)) {\n\t\t\t\t\tthis.schemaUsageMap.set(name, \"response\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Detect circular references and mark as \"both\"\n\t\t\tconst circularSchemas = detectCircularReferences(this.spec);\n\t\t\tfor (const name of circularSchemas) {\n\t\t\t\tthis.schemaUsageMap.set(name, \"both\");\n\t\t\t}\n\t\t} else {\n\t\t\t// Use core's analyzeSchemaUsage when no operation filters\n\t\t\tconst analysis = analyzeSchemaUsage(this.spec);\n\t\t\tthis.schemaUsageMap = analysis.usageMap;\n\n\t\t\t// Track operation stats when no filters\n\t\t\tif (this.spec.paths) {\n\t\t\t\tfor (const pathItem of Object.values(this.spec.paths)) {\n\t\t\t\t\tif (!isOpenAPIPathItem(pathItem)) continue;\n\t\t\t\t\tfor (const method of HTTP_METHODS) {\n\t\t\t\t\t\tconst operation = pathItem[method];\n\t\t\t\t\t\tif (typeof operation === \"object\" && operation) {\n\t\t\t\t\t\t\tthis.filterStats.totalOperations++;\n\t\t\t\t\t\t\tthis.filterStats.includedOperations++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Validate the OpenAPI specification\n\t */\n\tprivate validateSpec(): void {\n\t\tif (!this.spec.components?.schemas) {\n\t\t\tthrow new SpecValidationError(\n\t\t\t\t`No schemas found in OpenAPI spec at ${this.options.input}. Expected to find schemas at components.schemas`,\n\t\t\t\t{ filePath: this.options.input }\n\t\t\t);\n\t\t}\n\n\t\t// Validate all $refs can be resolved\n\t\tconst allSchemas = Object.keys(this.spec.components.schemas);\n\t\tfor (const [name, schema] of Object.entries(this.spec.components.schemas)) {\n\t\t\ttry {\n\t\t\t\tthis.validateSchemaRefs(name, schema, allSchemas);\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof Error) {\n\t\t\t\t\tthrow new SchemaGenerationError(`Invalid schema '${name}': ${error.message}`, name, {\n\t\t\t\t\t\toriginalError: error.message,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Validate all $ref references in a schema\n\t */\n\tprivate validateSchemaRefs(schemaName: string, schema: OpenAPISchema, allSchemas: string[], path = \"\"): void {\n\t\tif (schema.$ref) {\n\t\t\tconst refName = resolveRefName(schema.$ref);\n\t\t\tif (!allSchemas.includes(refName)) {\n\t\t\t\tthrow new SpecValidationError(\n\t\t\t\t\t`Invalid reference${path ? ` at '${path}'` : \"\"}: ` +\n\t\t\t\t\t\t`'${schema.$ref}' points to non-existent schema '${refName}'`,\n\t\t\t\t\t{ schemaName, path, ref: schema.$ref, refName }\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Recursively validate nested schemas\n\t\tif (schema.properties) {\n\t\t\tfor (const [propName, propSchema] of Object.entries(schema.properties)) {\n\t\t\t\tthis.validateSchemaRefs(schemaName, propSchema, allSchemas, path ? `${path}.${propName}` : propName);\n\t\t\t}\n\t\t}\n\n\t\tif (schema.items) {\n\t\t\tthis.validateSchemaRefs(schemaName, schema.items, allSchemas, `${path}[]`);\n\t\t}\n\n\t\tif (schema.prefixItems) {\n\t\t\tschema.prefixItems.forEach((s, i) => {\n\t\t\t\tthis.validateSchemaRefs(schemaName, s, allSchemas, `${path}.prefixItems[${i}]`);\n\t\t\t});\n\t\t}\n\n\t\tif (schema.allOf) {\n\t\t\tschema.allOf.forEach((s, i) => {\n\t\t\t\tthis.validateSchemaRefs(schemaName, s, allSchemas, `${path}.allOf[${i}]`);\n\t\t\t});\n\t\t}\n\n\t\tif (schema.oneOf) {\n\t\t\tschema.oneOf.forEach((s, i) => {\n\t\t\t\tthis.validateSchemaRefs(schemaName, s, allSchemas, `${path}.oneOf[${i}]`);\n\t\t\t});\n\t\t}\n\n\t\tif (schema.anyOf) {\n\t\t\tschema.anyOf.forEach((s, i) => {\n\t\t\t\tthis.validateSchemaRefs(schemaName, s, allSchemas, `${path}.anyOf[${i}]`);\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Generate schema for a component\n\t */\n\tprivate generateComponentSchema(name: string, schema: OpenAPISchema): void {\n\t\t// Initialize dependencies for this schema\n\t\tif (!this.schemaDependencies.has(name)) {\n\t\t\tthis.schemaDependencies.set(name, new Set());\n\t\t}\n\n\t\tconst context = this.schemaUsageMap.get(name);\n\t\tconst resolvedOptions = context === \"response\" ? this.responseOptions : this.requestOptions;\n\n\t\t// Handle enums at the top level\n\t\tif (schema.enum) {\n\t\t\tconst jsdoc = generateJSDoc(schema, name, { includeDescriptions: resolvedOptions.includeDescriptions });\n\n\t\t\t// Apply stripSchemaPrefix before generating enum\n\t\t\tconst strippedName = stripPrefix(name, this.options.stripSchemaPrefix);\n\n\t\t\t// Generate Zod enum\n\t\t\tconst { schemaCode, typeCode } = generateEnum(strippedName, schema.enum, {\n\t\t\t\tprefix: this.options.prefix,\n\t\t\t\tsuffix: this.options.suffix,\n\t\t\t});\n\n\t\t\tconst enumSchemaCode = `${jsdoc}${schemaCode}\\n${typeCode}`;\n\t\t\tthis.schemas.set(name, enumSchemaCode);\n\t\t\treturn;\n\t\t}\n\n\t\t// Generate Zod schema\n\t\t// Apply stripSchemaPrefix to get cleaner schema names\n\t\tconst strippedName = stripPrefix(name, this.options.stripSchemaPrefix);\n\t\tconst schemaName = `${toCamelCase(strippedName, { prefix: this.options.prefix, suffix: this.options.suffix })}Schema`;\n\t\tlet jsdoc = generateJSDoc(schema, name, { includeDescriptions: resolvedOptions.includeDescriptions });\n\n\t\t// For allOf with single $ref, track dependency manually since we simplify it\n\t\tif (schema.allOf && schema.allOf.length === 1 && schema.allOf[0].$ref) {\n\t\t\tconst refName = resolveRefName(schema.allOf[0].$ref);\n\t\t\tthis.schemaDependencies.get(name)?.add(refName);\n\t\t}\n\n\t\t// Update property generator context for this schema\n\t\tthis.propertyGenerator = new PropertyGenerator({\n\t\t\tspec: this.spec,\n\t\t\tschemaDependencies: this.schemaDependencies,\n\t\t\tschemaType: this.options.schemaType || \"all\",\n\t\t\tmode: resolvedOptions.mode,\n\t\t\tincludeDescriptions: resolvedOptions.includeDescriptions,\n\t\t\tuseDescribe: resolvedOptions.useDescribe,\n\t\t\tdefaultNullable: this.options.defaultNullable ?? false,\n\t\t\temptyObjectBehavior: this.options.emptyObjectBehavior ?? \"loose\",\n\t\t\tnamingOptions: {\n\t\t\t\tprefix: this.options.prefix,\n\t\t\t\tsuffix: this.options.suffix,\n\t\t\t},\n\t\t\tstripSchemaPrefix: this.options.stripSchemaPrefix,\n\t\t\tdateTimeValidation: this.dateTimeValidation,\n\t\t\tuuidValidation: this.uuidValidation,\n\t\t\tpatternCache: this.patternCache,\n\t\t\tseparateTypesFile: this.separateSchemasMode,\n\t\t\twarn: msg => {\n\t\t\t\tthis.warningCollector.add(msg);\n\t\t\t},\n\t\t});\n\n\t\t// Set circular dependencies for the new property generator instance\n\t\tthis.propertyGenerator.setCircularDependencies(this.circularDependencies);\n\n\t\t// Clear conflicts before generating to track per-schema conflicts\n\t\tthis.propertyGenerator.clearAllOfConflicts();\n\n\t\t// Check if this is just a simple $ref (alias)\n\t\t// Pass isTopLevel=true for top-level schema generation to prevent defaultNullable from applying\n\t\tconst zodSchema = this.propertyGenerator.generatePropertySchema(schema, name, true);\n\n\t\t// Check for allOf conflicts and add JSDoc warning if any\n\t\tconst allOfConflicts = this.propertyGenerator.getAllOfConflicts();\n\t\tif (allOfConflicts.length > 0) {\n\t\t\t// Add warning JSDoc for conflicts\n\t\t\tconst conflictWarning = this.generateConflictJSDoc(allOfConflicts);\n\t\t\tif (jsdoc) {\n\t\t\t\t// Append to existing JSDoc - insert before closing */\n\t\t\t\tjsdoc = jsdoc.replace(/ \\*\\/\\n$/, `\\n${conflictWarning} */\\n`);\n\t\t\t} else {\n\t\t\t\t// Create new JSDoc block with just the warning\n\t\t\t\tjsdoc = `/**\\n${conflictWarning} */\\n`;\n\t\t\t}\n\t\t}\n\n\t\tconst zodSchemaCode = `${jsdoc}export const ${schemaName} = ${zodSchema};`;\n\n\t\t// Track dependencies from discriminated unions\n\t\t// Extract schema references like \"carSchema, truckSchema\" from discriminatedUnion calls\n\t\tif (zodSchema.includes(\"z.discriminatedUnion(\")) {\n\t\t\tconst match = zodSchema.match(/z\\.discriminatedUnion\\([^,]+,\\s*\\[([^\\]]+)\\]/);\n\t\t\tif (match) {\n\t\t\t\tconst refs = match[1].split(\",\").map(ref => ref.trim());\n\t\t\t\tfor (const ref of refs) {\n\t\t\t\t\t// Extract schema name from camelCase reference (e.g., \"carSchema\" -> \"Car\")\n\t\t\t\t\tconst depMatch = ref.match(/^([a-z][a-zA-Z0-9]*?)Schema$/);\n\t\t\t\t\tif (depMatch) {\n\t\t\t\t\t\t// Convert camelCase to PascalCase (carSchema -> Car)\n\t\t\t\t\t\tconst depName = depMatch[1].charAt(0).toUpperCase() + depMatch[1].slice(1);\n\t\t\t\t\t\tthis.schemaDependencies.get(name)?.add(depName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.schemas.set(name, zodSchemaCode);\n\t}\n\n\t/**\n\t * Generate query parameter schemas for each operation\n\t */\n\tprivate generateQueryParameterSchemas(): void {\n\t\tif (!this.spec.paths) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const [path, pathItem] of Object.entries(this.spec.paths)) {\n\t\t\tif (!isOpenAPIPathItem(pathItem)) continue;\n\n\t\t\tfor (const method of HTTP_METHODS) {\n\t\t\t\tconst operation = pathItem[method];\n\t\t\t\tif (!operation) continue;\n\n\t\t\t\t// Apply operation filters (stats already tracked in analyzeSchemaUsage)\n\t\t\t\tif (!shouldIncludeOperation(operation, path, method, this.options.operationFilters)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Merge path-level and operation-level parameters, resolving $refs\n\t\t\t\tconst allParams = mergeParameters(pathItem.parameters, operation.parameters, this.spec);\n\n\t\t\t\t// Filter for query parameters only\n\t\t\t\tconst queryParams = allParams.filter(\n\t\t\t\t\t(param): param is ResolvedParameter => isResolvedParameter(param) && param.in === \"query\"\n\t\t\t\t);\n\n\t\t\t\tif (queryParams.length === 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst strippedPath = stripPathPrefix(path, this.options.stripPathPrefix);\n\t\t\t\tconst pascalOperationId = getOperationName(\n\t\t\t\t\toperation.operationId,\n\t\t\t\t\tmethod,\n\t\t\t\t\tstrippedPath,\n\t\t\t\t\tthis.options.useOperationId\n\t\t\t\t);\n\t\t\t\tconst schemaName = `${pascalOperationId}QueryParams`; // Initialize dependencies for this schema\n\t\t\t\tif (!this.schemaDependencies.has(schemaName)) {\n\t\t\t\t\tthis.schemaDependencies.set(schemaName, new Set());\n\t\t\t\t}\n\n\t\t\t\t// Build object schema properties\n\t\t\t\tconst properties: Record<string, string> = {};\n\t\t\t\tconst required: string[] = [];\n\n\t\t\t\tfor (const param of queryParams) {\n\t\t\t\t\tconst paramName = param.name;\n\t\t\t\t\tconst isRequired = param.required === true;\n\t\t\t\t\tconst paramSchema = param.schema;\n\n\t\t\t\t\tif (!paramSchema) continue;\n\n\t\t\t\t\t// Generate Zod schema for this parameter\n\t\t\t\t\tlet zodType = this.generateQueryParamType(paramSchema, param);\n\n\t\t\t\t\t// Handle arrays with serialization styles\n\t\t\t\t\tif (paramSchema.type === \"array\" && paramSchema.items) {\n\t\t\t\t\t\tconst itemType = this.generateQueryParamType(paramSchema.items, param);\n\n\t\t\t\t\t\t// Note: Query param arrays are sent as strings and need to be split on the client side\n\t\t\t\t\t\t// The style is documented but validation is for the array type\n\t\t\t\t\t\tzodType = `z.array(${itemType})`;\n\n\t\t\t\t\t\t// Description is handled by addDescription below\n\t\t\t\t\t} // Add description if available (before .optional())\n\t\t\t\t\tif (param.description && this.requestOptions.includeDescriptions) {\n\t\t\t\t\t\tif (this.requestOptions.useDescribe) {\n\t\t\t\t\t\t\tzodType = `${zodType}.describe(${JSON.stringify(param.description)})`;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Make optional if not required (don't add defaults)\n\t\t\t\t\tif (!isRequired) {\n\t\t\t\t\t\tzodType = `${zodType}.optional()`;\n\t\t\t\t\t}\n\n\t\t\t\t\tproperties[paramName] = zodType;\n\t\t\t\t\tif (isRequired) {\n\t\t\t\t\t\trequired.push(paramName);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Track dependencies from schema references\n\t\t\t\t\tif (paramSchema.$ref) {\n\t\t\t\t\t\tconst refName = resolveRefName(paramSchema.$ref);\n\t\t\t\t\t\tthis.schemaDependencies.get(schemaName)?.add(refName);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Generate the object schema code\n\t\t\t\tconst objectMode = this.requestOptions.mode;\n\t\t\t\tconst zodMethod = objectMode === \"strict\" ? \"strictObject\" : objectMode === \"loose\" ? \"looseObject\" : \"object\";\n\n\t\t\t\tconst propsCode = Object.entries(properties)\n\t\t\t\t\t.map(([key, value]) => {\n\t\t\t\t\t\t// Quote property names that contain special characters or are not valid identifiers\n\t\t\t\t\t\tconst needsQuotes = !/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key);\n\t\t\t\t\t\tconst quotedKey = needsQuotes ? `\"${key}\"` : key;\n\t\t\t\t\t\treturn ` ${quotedKey}: ${value}`;\n\t\t\t\t\t})\n\t\t\t\t\t.join(\",\\n\");\n\n\t\t\t\tconst schemaCode = `z.${zodMethod}({\\n${propsCode}\\n})`;\n\t\t\t\t// Apply prefix/suffix using toCamelCase for consistent naming with how generateString generates the type inference\n\t\t\t\tconst operationName = pascalOperationId;\n\t\t\t\tconst camelCaseSchemaName = `${toCamelCase(operationName, { prefix: this.options.prefix, suffix: this.options.suffix })}QueryParamsSchema`;\n\n\t\t\t\t// Generate JSDoc - use operationId if available, otherwise use method + path\n\t\t\t\tconst jsdocOperationName = operation.operationId || `${method.toUpperCase()} ${path}`;\n\t\t\t\tconst jsdoc = `/**\\n * Query parameters for ${jsdocOperationName}\\n */\\n`;\n\t\t\t\tconst fullSchemaCode = `${jsdoc}export const ${camelCaseSchemaName} = ${schemaCode};`;\n\n\t\t\t\tthis.schemas.set(schemaName, fullSchemaCode);\n\t\t\t\tthis.needsZodImport = true;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Check if a header should be ignored based on filter patterns\n\t * @internal\n\t */\n\tprivate shouldIgnoreHeader(headerName: string): boolean {\n\t\tconst ignorePatterns = this.options.ignoreHeaders;\n\t\tif (!ignorePatterns || ignorePatterns.length === 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (ignorePatterns.includes(\"*\")) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst headerLower = headerName.toLowerCase();\n\n\t\treturn ignorePatterns.some((pattern: string) => {\n\t\t\tconst patternLower = pattern.toLowerCase();\n\t\t\treturn minimatch(headerLower, patternLower);\n\t\t});\n\t}\n\n\t/**\n\t * Generate header parameter schemas for each operation\n\t * Header parameters are always string type (HTTP header semantics)\n\t */\n\tprivate generateHeaderParameterSchemas(): void {\n\t\tif (!this.spec.paths) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const [path, pathItem] of Object.entries(this.spec.paths)) {\n\t\t\tif (!isOpenAPIPathItem(pathItem)) continue;\n\n\t\t\tfor (const method of HTTP_METHODS) {\n\t\t\t\tconst operation = pathItem[method];\n\t\t\t\tif (!operation) continue;\n\n\t\t\t\t// Apply operation filters\n\t\t\t\tif (!shouldIncludeOperation(operation, path, method, this.options.operationFilters)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Merge path-level and operation-level parameters, resolving $refs\n\t\t\t\tconst allParams = mergeParameters(pathItem.parameters, operation.parameters, this.spec);\n\n\t\t\t\t// Filter for header parameters only, excluding ignored ones\n\t\t\t\tconst headerParams = allParams.filter(\n\t\t\t\t\t(param): param is ResolvedParameter =>\n\t\t\t\t\t\tisResolvedParameter(param) && param.in === \"header\" && !this.shouldIgnoreHeader(param.name)\n\t\t\t\t);\n\n\t\t\t\tif (headerParams.length === 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst strippedPath = stripPathPrefix(path, this.options.stripPathPrefix);\n\t\t\t\tconst pascalOperationId = getOperationName(\n\t\t\t\t\toperation.operationId,\n\t\t\t\t\tmethod,\n\t\t\t\t\tstrippedPath,\n\t\t\t\t\tthis.options.useOperationId\n\t\t\t\t);\n\t\t\t\tconst schemaName = `${pascalOperationId}HeaderParams`;\n\n\t\t\t\t// Initialize dependencies for this schema\n\t\t\t\tif (!this.schemaDependencies.has(schemaName)) {\n\t\t\t\t\tthis.schemaDependencies.set(schemaName, new Set());\n\t\t\t\t}\n\n\t\t\t\t// Build object schema properties (headers are always strings)\n\t\t\t\tconst properties: Record<string, string> = {};\n\n\t\t\t\tfor (const param of headerParams) {\n\t\t\t\t\tconst paramName = param.name;\n\t\t\t\t\tconst paramSchema = param.schema;\n\n\t\t\t\t\tif (!paramSchema) continue;\n\n\t\t\t\t\t// Headers are always strings in HTTP, regardless of schema type\n\t\t\t\t\tlet zodType = \"z.string()\";\n\n\t\t\t\t\t// Add description if available\n\t\t\t\t\tif (param.description && this.requestOptions.includeDescriptions) {\n\t\t\t\t\t\tif (this.requestOptions.useDescribe) {\n\t\t\t\t\t\t\tzodType = `${zodType}.describe(${JSON.stringify(param.description)})`;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Headers are always optional in service layer (as per requirements)\n\t\t\t\t\tzodType = `${zodType}.optional()`;\n\n\t\t\t\t\tproperties[paramName] = zodType;\n\n\t\t\t\t\t// Track dependencies from schema references (if any)\n\t\t\t\t\tif (paramSchema.$ref) {\n\t\t\t\t\t\tconst refName = resolveRefName(paramSchema.$ref);\n\t\t\t\t\t\tthis.schemaDependencies.get(schemaName)?.add(refName);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Generate the object schema code\n\t\t\t\tconst objectMode = this.requestOptions.mode;\n\t\t\t\tconst zodMethod = objectMode === \"strict\" ? \"strictObject\" : objectMode === \"loose\" ? \"looseObject\" : \"object\";\n\n\t\t\t\tconst propsCode = Object.entries(properties)\n\t\t\t\t\t.map(([key, value]) => {\n\t\t\t\t\t\t// Quote property names that contain special characters or are not valid identifiers\n\t\t\t\t\t\tconst needsQuotes = !/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key);\n\t\t\t\t\t\tconst quotedKey = needsQuotes ? `\"${key}\"` : key;\n\t\t\t\t\t\treturn ` ${quotedKey}: ${value}`;\n\t\t\t\t\t})\n\t\t\t\t\t.join(\",\\n\");\n\n\t\t\t\tconst schemaCode = `z.${zodMethod}({\\n${propsCode}\\n})`;\n\n\t\t\t\t// Apply prefix/suffix to the operation name only, then add HeaderParams and Schema\n\t\t\t\t// Use toCamelCase for consistent naming with how generateString generates the type inference\n\t\t\t\tconst operationName = pascalOperationId;\n\t\t\t\tconst camelCaseSchemaName = `${toCamelCase(operationName, { prefix: this.options.prefix, suffix: this.options.suffix })}HeaderParamsSchema`;\n\n\t\t\t\t// Generate JSDoc - use operationId if available, otherwise use method + path\n\t\t\t\tconst jsdocOperationName = operation.operationId || `${method.toUpperCase()} ${path}`;\n\t\t\t\tconst jsdoc = `/**\\n * Header parameters for ${jsdocOperationName}\\n */\\n`;\n\t\t\t\tconst fullSchemaCode = `${jsdoc}export const ${camelCaseSchemaName} = ${schemaCode};`;\n\n\t\t\t\tthis.schemas.set(schemaName, fullSchemaCode);\n\t\t\t\tthis.needsZodImport = true;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Generate Zod type for a query parameter schema\n\t */\n\tprivate generateQueryParamType(schema: OpenAPISchema, param: ResolvedParameter): string {\n\t\t// Handle references\n\t\tif (schema.$ref) {\n\t\t\tconst refName = resolveRefName(schema.$ref);\n\t\t\t// Apply stripSchemaPrefix to referenced schema names\n\t\t\tconst strippedRefName = stripPrefix(refName, this.options.stripSchemaPrefix);\n\t\t\tconst schemaName = toCamelCase(strippedRefName, { prefix: this.options.prefix, suffix: this.options.suffix });\n\t\t\treturn `${schemaName}Schema`;\n\t\t}\n\n\t\t// Handle enums\n\t\tif (schema.enum) {\n\t\t\t// Check if all values are booleans\n\t\t\tconst allBooleans = schema.enum.every((v: unknown) => typeof v === \"boolean\");\n\t\t\tif (allBooleans) {\n\t\t\t\treturn \"z.boolean()\";\n\t\t\t}\n\n\t\t\t// Check if all values are strings\n\t\t\tconst allStrings = schema.enum.every((v: unknown) => typeof v === \"string\");\n\t\t\tif (allStrings) {\n\t\t\t\tconst enumValues = schema.enum.map(v => `\"${v}\"`).join(\", \");\n\t\t\t\treturn `z.enum([${enumValues}])`;\n\t\t\t}\n\n\t\t\t// For numeric or mixed enums, use z.union with z.literal\n\t\t\tconst literalValues = schema.enum\n\t\t\t\t.map((v: unknown) => {\n\t\t\t\t\tif (typeof v === \"string\") {\n\t\t\t\t\t\treturn `z.literal(\"${v}\")`;\n\t\t\t\t\t}\n\t\t\t\t\treturn `z.literal(${String(v)})`;\n\t\t\t\t})\n\t\t\t\t.join(\", \");\n\t\t\treturn `z.union([${literalValues}])`;\n\t\t}\n\n\t\t// Handle primitive types\n\t\tconst type = schema.type;\n\n\t\tif (type === \"string\") {\n\t\t\t// Use Zod v4 top-level format validators for known formats\n\t\t\tconst formatMap: Record<string, string> = {\n\t\t\t\temail: \"z.email()\",\n\t\t\t\turi: \"z.url()\",\n\t\t\t\turl: \"z.url()\",\n\t\t\t\tuuid: this.uuidValidation,\n\t\t\t\tguid: this.uuidValidation,\n\t\t\t};\n\n\t\t\t// Check if format has a dedicated Zod v4 validator\n\t\t\tif (schema.format && formatMap[schema.format]) {\n\t\t\t\tlet zodType = formatMap[schema.format];\n\t\t\t\t// Add string validations (these still work on format types)\n\t\t\t\tif (schema.minLength !== undefined) zodType = `${zodType}.min(${schema.minLength})`;\n\t\t\t\tif (schema.maxLength !== undefined) zodType = `${zodType}.max(${schema.maxLength})`;\n\t\t\t\tif (schema.pattern) zodType = `${zodType}.regex(/${schema.pattern}/)`;\n\t\t\t\treturn zodType;\n\t\t\t}\n\n\t\t\t// Fallback to z.string() for unknown formats or no format\n\t\t\tlet zodType = \"z.string()\";\n\t\t\tif (schema.minLength !== undefined) zodType = `${zodType}.min(${schema.minLength})`;\n\t\t\tif (schema.maxLength !== undefined) zodType = `${zodType}.max(${schema.maxLength})`;\n\t\t\tif (schema.pattern) zodType = `${zodType}.regex(/${schema.pattern}/)`;\n\t\t\treturn zodType;\n\t\t}\n\n\t\tif (type === \"number\" || type === \"integer\") {\n\t\t\tlet zodType = type === \"integer\" ? \"z.number().int()\" : \"z.number()\";\n\t\t\t// Add number validations\n\t\t\tif (schema.minimum !== undefined) {\n\t\t\t\tzodType = schema.exclusiveMinimum ? `${zodType}.gt(${schema.minimum})` : `${zodType}.gte(${schema.minimum})`;\n\t\t\t}\n\t\t\tif (schema.maximum !== undefined) {\n\t\t\t\tzodType = schema.exclusiveMaximum ? `${zodType}.lt(${schema.maximum})` : `${zodType}.lte(${schema.maximum})`;\n\t\t\t}\n\t\t\treturn zodType;\n\t\t}\n\n\t\tif (type === \"boolean\") {\n\t\t\treturn \"z.boolean()\";\n\t\t}\n\n\t\tif (type === \"array\" && schema.items) {\n\t\t\tconst itemType = this.generateQueryParamType(schema.items, param);\n\t\t\tlet arrayType = `z.array(${itemType})`;\n\t\t\t// Add array validations\n\t\t\tif (schema.minItems !== undefined) arrayType = `${arrayType}.min(${schema.minItems})`;\n\t\t\tif (schema.maxItems !== undefined) arrayType = `${arrayType}.max(${schema.maxItems})`;\n\t\t\treturn arrayType;\n\t\t}\n\n\t\t// Fallback to z.unknown() for unhandled types\n\t\treturn \"z.unknown()\";\n\t}\n\n\t/**\n\t * Topological sort for schema dependencies\n\t * Returns schemas in the order they should be declared\n\t */\n\tprivate topologicalSort(): string[] {\n\t\tconst sorted: string[] = [];\n\t\tconst visited = new Set<string>();\n\t\tconst visiting = new Set<string>();\n\t\tconst aliases: string[] = [];\n\t\tconst circularDeps = new Set<string>(); // Track schemas involved in circular dependencies\n\n\t\t// Performance optimization: Cache schema and type code lookups\n\t\tconst codeCache = new Map<string, string>();\n\t\tfor (const [name, code] of this.schemas) {\n\t\t\tcodeCache.set(name, code);\n\t\t}\n\t\tfor (const [name, code] of this.types) {\n\t\t\tcodeCache.set(name, code);\n\t\t}\n\n\t\tconst visit = (name: string): void => {\n\t\t\tif (visited.has(name)) return;\n\n\t\t\t// Detect circular dependencies\n\t\t\tif (visiting.has(name)) {\n\t\t\t\t// Mark this as a circular dependency but don't add it yet\n\t\t\t\tcircularDeps.add(name);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvisiting.add(name);\n\n\t\t\t// Check if this is a simple alias (just assigns another schema directly)\n\t\t\tconst code = codeCache.get(name) || \"\";\n\t\t\tconst isSimpleAlias =\n\t\t\t\tcode.match(/= (\\w+Schema);$/) !== null &&\n\t\t\t\t!code.includes(\"z.object\") &&\n\t\t\t\t!code.includes(\"z.enum\") &&\n\t\t\t\t!code.includes(\"z.union\") &&\n\t\t\t\t!code.includes(\"z.array\") &&\n\t\t\t\t!code.includes(\".and(\");\n\n\t\t\tif (isSimpleAlias) {\n\t\t\t\t// For simple aliases, just mark as visited and add to aliases list\n\t\t\t\tvisiting.delete(name);\n\t\t\t\tvisited.add(name);\n\t\t\t\taliases.push(name);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Visit dependencies first for non-alias schemas\n\t\t\tconst deps = this.schemaDependencies.get(name);\n\t\t\tlet dependsOnCircular = false;\n\t\t\tif (deps && deps.size > 0) {\n\t\t\t\tfor (const dep of deps) {\n\t\t\t\t\tif (this.schemas.has(dep) || this.types.has(dep)) {\n\t\t\t\t\t\tvisit(dep);\n\t\t\t\t\t\t// If this dependency is circular, we also need to be deferred\n\t\t\t\t\t\tif (circularDeps.has(dep)) {\n\t\t\t\t\t\t\tdependsOnCircular = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvisiting.delete(name);\n\t\t\tvisited.add(name);\n\n\t\t\t// Don't add circular dependencies or schemas that depend on them yet\n\t\t\t// They need special handling and will be added at the end\n\t\t\tif (!circularDeps.has(name) && !dependsOnCircular) {\n\t\t\t\tsorted.push(name);\n\t\t\t} else if (dependsOnCircular && !circularDeps.has(name)) {\n\t\t\t\t// Mark schemas that depend on circular deps as needing to be deferred\n\t\t\t\tcircularDeps.add(name);\n\t\t\t}\n\t\t};\n\n\t\t// Visit all schemas and types\n\t\tconst allNames = new Set([...this.schemas.keys(), ...this.types.keys()]);\n\t\tfor (const name of allNames) {\n\t\t\tvisit(name);\n\t\t}\n\n\t\t// Add circular dependencies at the end (before aliases)\n\t\t// This ensures they come after their non-circular dependencies\n\t\t// Note: circular deps ARE in visited (they complete their visit cycle),\n\t\t// but they were excluded from sorted. We need to add them now.\n\t\tfor (const name of circularDeps) {\n\t\t\tif (!sorted.includes(name)) {\n\t\t\t\tsorted.push(name);\n\t\t\t}\n\t\t}\n\n\t\t// Add aliases at the end\n\t\treturn [...sorted, ...aliases];\n\t}\n\n\t/**\n\t * Generate statistics about the generated schemas\n\t */\n\tprivate generateStats(): string[] {\n\t\tconst stats = {\n\t\t\ttotalSchemas: this.schemas.size,\n\t\t\twithCircularRefs: 0,\n\t\t\twithDiscriminators: 0,\n\t\t\twithConstraints: 0,\n\t\t};\n\n\t\t// Count schemas with special features\n\t\tfor (const code of this.schemas.values()) {\n\t\t\tif (code.includes(\"z.lazy(\")) stats.withCircularRefs++;\n\t\t\tif (code.includes(\"z.discriminatedUnion\")) stats.withDiscriminators++;\n\t\t\tif (code.includes(\".min(\") || code.includes(\".max(\") || code.includes(\".gte(\")) {\n\t\t\t\tstats.withConstraints++;\n\t\t\t}\n\t\t}\n\n\t\tconst output = [\n\t\t\t\"// Generation Statistics:\",\n\t\t\t`// Total schemas: ${stats.totalSchemas}`,\n\t\t\t`// Circular references: ${stats.withCircularRefs}`,\n\t\t\t`// Discriminated unions: ${stats.withDiscriminators}`,\n\t\t\t`// With constraints: ${stats.withConstraints}`,\n\t\t];\n\n\t\t// Add filter statistics if filtering was used\n\t\tif (this.options.operationFilters && this.filterStats.totalOperations > 0) {\n\t\t\toutput.push(\"//\");\n\t\t\tconst filterStatsStr = formatFilterStatistics(this.filterStats);\n\t\t\tfor (const line of filterStatsStr.split(\"\\n\")) {\n\t\t\t\toutput.push(`// ${line}`);\n\t\t\t}\n\t\t}\n\n\t\toutput.push(`// Generated at: ${new Date().toISOString()}`);\n\n\t\treturn output;\n\t}\n\n\t/**\n\t * Pre-analyze schemas to detect circular dependencies before code generation.\n\t * This allows the property generator to use z.lazy() for forward references.\n\t */\n\tprivate analyzeCircularDependencies(): void {\n\t\tif (!this.spec.components?.schemas) return;\n\n\t\t// First pass: collect all schema dependencies without generating code\n\t\tconst dependencies = new Map<string, Set<string>>();\n\n\t\tconst collectDependencies = (name: string, schema: OpenAPISchema, visited = new Set<string>()): Set<string> => {\n\t\t\tif (visited.has(name)) return new Set();\n\t\t\tvisited.add(name);\n\n\t\t\tconst deps = new Set<string>();\n\n\t\t\t// Handle $ref\n\t\t\tif (schema.$ref) {\n\t\t\t\tconst refName = resolveRefName(schema.$ref);\n\t\t\t\tdeps.add(refName);\n\t\t\t}\n\n\t\t\t// Handle allOf\n\t\t\tif (schema.allOf) {\n\t\t\t\tfor (const item of schema.allOf) {\n\t\t\t\t\tconst itemDeps = collectDependencies(`${name}_allOf`, item, new Set(visited));\n\t\t\t\t\tfor (const dep of itemDeps) deps.add(dep);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle oneOf\n\t\t\tif (schema.oneOf) {\n\t\t\t\tfor (const item of schema.oneOf) {\n\t\t\t\t\tconst itemDeps = collectDependencies(`${name}_oneOf`, item, new Set(visited));\n\t\t\t\t\tfor (const dep of itemDeps) deps.add(dep);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle anyOf\n\t\t\tif (schema.anyOf) {\n\t\t\t\tfor (const item of schema.anyOf) {\n\t\t\t\t\tconst itemDeps = collectDependencies(`${name}_anyOf`, item, new Set(visited));\n\t\t\t\t\tfor (const dep of itemDeps) deps.add(dep);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle properties\n\t\t\tif (schema.properties) {\n\t\t\t\tfor (const propSchema of Object.values(schema.properties)) {\n\t\t\t\t\tconst propDeps = collectDependencies(`${name}_prop`, propSchema, new Set(visited));\n\t\t\t\t\tfor (const dep of propDeps) deps.add(dep);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle array items\n\t\t\tif (schema.items) {\n\t\t\t\tconst itemDeps = collectDependencies(`${name}_items`, schema.items, new Set(visited));\n\t\t\t\tfor (const dep of itemDeps) deps.add(dep);\n\t\t\t}\n\n\t\t\t// Handle additionalProperties\n\t\t\tif (schema.additionalProperties && typeof schema.additionalProperties === \"object\") {\n\t\t\t\tconst addDeps = collectDependencies(`${name}_additional`, schema.additionalProperties, new Set(visited));\n\t\t\t\tfor (const dep of addDeps) deps.add(dep);\n\t\t\t}\n\n\t\t\treturn deps;\n\t\t};\n\n\t\t// Collect dependencies for all schemas\n\t\tfor (const [name, schema] of Object.entries(this.spec.components.schemas)) {\n\t\t\t// Skip schemas not referenced by filtered operations when operation filters are active\n\t\t\tif (this.options.operationFilters && this.schemaUsageMap.size > 0 && !this.schemaUsageMap.has(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdependencies.set(name, collectDependencies(name, schema));\n\t\t}\n\n\t\t// Second pass: detect circular dependencies using DFS\n\t\tconst visited = new Set<string>();\n\t\tconst visiting = new Set<string>();\n\n\t\tconst detectCircular = (name: string, path: string[] = []): void => {\n\t\t\tif (visited.has(name)) return;\n\n\t\t\tif (visiting.has(name)) {\n\t\t\t\t// Found a cycle - mark all schemas in the cycle as circular\n\t\t\t\tconst cycleStart = path.indexOf(name);\n\t\t\t\tif (cycleStart >= 0) {\n\t\t\t\t\tfor (let i = cycleStart; i < path.length; i++) {\n\t\t\t\t\t\tthis.circularDependencies.add(path[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.circularDependencies.add(name);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvisiting.add(name);\n\t\t\tpath.push(name);\n\n\t\t\tconst deps = dependencies.get(name);\n\t\t\tif (deps) {\n\t\t\t\tfor (const dep of deps) {\n\t\t\t\t\tif (dependencies.has(dep)) {\n\t\t\t\t\t\tdetectCircular(dep, [...path]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvisiting.delete(name);\n\t\t\tvisited.add(name);\n\t\t};\n\n\t\tfor (const name of dependencies.keys()) {\n\t\t\tdetectCircular(name, []);\n\t\t}\n\t}\n\n\t/**\n\t * Generate JSDoc warning for allOf conflicts\n\t * @param conflicts Array of conflict description strings\n\t * @returns JSDoc formatted warning string\n\t */\n\tprivate generateConflictJSDoc(conflicts: string[]): string {\n\t\tconst lines = [\" * @warning allOf property conflicts detected:\"];\n\t\tfor (const conflict of conflicts) {\n\t\t\tlines.push(` * - ${conflict}`);\n\t\t}\n\t\treturn `${lines.join(\"\\n\")}\\n`;\n\t}\n}\n","import {\n\tBaseDefaultsSchema,\n\tBaseGeneratorOptionsSchema,\n\tmergeCliWithConfig as coreMergeCliWithConfig,\n\tcreateConfigLoader,\n\tExecutionModeSchema,\n\ttype FormatZodErrorsOptions,\n\tRegexPatternSchema,\n\tRequestResponseOptionsSchema,\n} from \"@cerios/openapi-core\";\nimport { z } from \"zod\";\n\nimport type { ConfigFile, OpenApiGeneratorOptions } from \"../types\";\n\n/**\n * Zod-specific options schema - extends base generator options\n */\nconst ZodSpecificOptionsSchema = z.strictObject({\n\tmode: z.enum([\"strict\", \"normal\", \"loose\"]).optional(),\n\tuseDescribe: z.boolean().optional(),\n\temptyObjectBehavior: z.enum([\"strict\", \"loose\", \"record\"]).optional(),\n\tschemaType: z.enum([\"all\", \"request\", \"response\"]).optional(),\n\trequest: RequestResponseOptionsSchema.optional(),\n\tresponse: RequestResponseOptionsSchema.optional(),\n\tcustomDateTimeFormatRegex: RegexPatternSchema.optional(),\n\tuuidFormat: z\n\t\t.enum([\"uuid\", \"guid\", \"uuidv1\", \"uuidv2\", \"uuidv3\", \"uuidv4\", \"uuidv5\", \"uuidv6\", \"uuidv7\", \"uuidv8\"])\n\t\t.optional(),\n\toutputZodSchemas: z.string().optional(),\n\tenumFormat: z.enum([\"union\", \"const-object\"]).optional(),\n\ttypeAssertionThreshold: z.number().int().gte(0).optional(),\n});\n\n/**\n * Full generator options schema - base + Zod-specific\n * Uses .extend() instead of deprecated .merge() for Zod v4 compatibility\n */\nconst OpenApiGeneratorOptionsSchema = BaseGeneratorOptionsSchema.extend({\n\t...ZodSpecificOptionsSchema.shape,\n\toutputTypes: z.string().optional(),\n\toutput: z.string().optional(),\n}).superRefine((spec, ctx) => {\n\tconst hasOutputTypes = Boolean(spec.outputTypes);\n\tconst hasOutput = Boolean(spec.output);\n\tconst hasOutputZodSchemas = Boolean(spec.outputZodSchemas);\n\n\t// When outputZodSchemas is specified, outputTypes is required for TypeScript types\n\tif (hasOutputZodSchemas && !hasOutputTypes && !hasOutput) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tpath: [\"outputTypes\"],\n\t\t\tmessage: \"When 'outputZodSchemas' is specified, 'outputTypes' is required for TypeScript type definitions.\",\n\t\t});\n\t}\n\n\t// Standard validation when outputZodSchemas is not used\n\tif (!hasOutputZodSchemas && !hasOutputTypes && !hasOutput) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tpath: [\"outputTypes\"],\n\t\t\tmessage: \"Each spec must specify an output file path using 'outputTypes' (preferred) or deprecated 'output'.\",\n\t\t});\n\t}\n\n\tif (hasOutputTypes && hasOutput && spec.outputTypes !== spec.output) {\n\t\tctx.addIssue({\n\t\t\tcode: \"custom\",\n\t\t\tpath: [\"output\"],\n\t\t\tmessage: \"Invalid configuration: 'outputTypes' and deprecated 'output' are both set but have different values.\",\n\t\t});\n\t}\n});\n\n/**\n * Defaults schema - base defaults + Zod-specific options (no input/outputTypes/name)\n * Uses .extend() instead of deprecated .merge() for Zod v4 compatibility\n */\nconst ZodDefaultsSchema = BaseDefaultsSchema.extend({\n\t...ZodSpecificOptionsSchema.shape,\n});\n\n/**\n * Config file schema\n */\nconst ConfigFileSchema = z.strictObject({\n\tdefaults: ZodDefaultsSchema.optional(),\n\tspecs: z.array(OpenApiGeneratorOptionsSchema).min(1, {\n\t\tmessage:\n\t\t\t\"Configuration must include at least one specification. Each specification should have 'input' and 'outputTypes' paths.\",\n\t}),\n\texecutionMode: ExecutionModeSchema.optional(),\n});\n\n// Custom error messages for user-friendly validation errors\nconst errorMessages: FormatZodErrorsOptions = {\n\tmissingFieldMessages: {\n\t\tinput: \"Each spec must specify the path to your OpenAPI specification file.\",\n\t\toutputTypes: \"Each spec must specify an output file path for generated Zod schemas.\",\n\t},\n\tunrecognizedKeyMessages: {},\n\trequiredFieldsHelp: \"All required fields are present (specs array with input/outputTypes)\",\n};\n\n// Create config loader using factory from core\nconst configLoader = createConfigLoader<ConfigFile>(\n\t{\n\t\tpackageName: \"openapi-to-zod\",\n\t\terrorMessages,\n\t},\n\tConfigFileSchema\n);\n\n/**\n * Load and validate configuration file\n * Supports: openapi-to-zod.config.{ts,json}, package.json under \"openapi-to-zod\" key\n *\n * @param configPath - Optional explicit path to config file. If not provided, searches automatically\n * @returns Validated ConfigFile object\n * @throws Error if config file not found, invalid, or contains unknown properties\n */\nexport const loadConfig = configLoader.loadConfig;\n\n/**\n * Merge global defaults with per-spec configuration\n * CLI arguments have highest precedence and are merged separately in CLI layer\n *\n * @param config - Validated configuration file\n * @returns Array of fully resolved OpenApiGeneratorOptions objects\n */\nexport function mergeConfigWithDefaults(config: ConfigFile): OpenApiGeneratorOptions[] {\n\tif (!config?.specs || !Array.isArray(config.specs)) {\n\t\tthrow new Error(\"Invalid config: specs array is required\");\n\t}\n\n\tconst defaults = config.defaults || {};\n\tlet warnedDeprecatedOutput = false;\n\n\treturn config.specs.map(spec => {\n\t\t// oxlint-disable-next-line typescript/no-deprecated\n\t\tconst output = spec.output;\n\t\tconst outputTypes = spec.outputTypes;\n\t\tconst resolvedOutputTypes = outputTypes ?? output;\n\t\tconst hasOutputZodSchemas = Boolean(spec.outputZodSchemas);\n\n\t\t// When outputZodSchemas is specified, outputTypes is required\n\t\tif (hasOutputZodSchemas && resolvedOutputTypes === undefined) {\n\t\t\tthrow new Error(\n\t\t\t\t\"When 'outputZodSchemas' is specified, 'outputTypes' is required for TypeScript type definitions.\"\n\t\t\t);\n\t\t}\n\n\t\t// Standard validation when outputZodSchemas is not used\n\t\tif (!hasOutputZodSchemas && resolvedOutputTypes === undefined) {\n\t\t\tthrow new Error(\"Each spec must define 'outputTypes' (preferred) or deprecated 'output'.\");\n\t\t}\n\n\t\tif (output && outputTypes && output !== outputTypes) {\n\t\t\tthrow new Error(\"Invalid configuration: 'outputTypes' and deprecated 'output' cannot have different values.\");\n\t\t}\n\n\t\t// Type guard: resolvedOutputTypes is guaranteed non-undefined by validation checks above\n\t\tif (!resolvedOutputTypes) {\n\t\t\tthrow new Error(\"Internal error: outputTypes should be defined after validation\");\n\t\t}\n\n\t\tif (output && !warnedDeprecatedOutput) {\n\t\t\tconsole.warn(\n\t\t\t\t\"[openapi-to-zod] Deprecation warning: 'output' is deprecated and will be removed in a future release. Use 'outputTypes' instead.\"\n\t\t\t);\n\t\t\twarnedDeprecatedOutput = true;\n\t\t}\n\n\t\t// oxlint-disable-next-line typescript/no-deprecated\n\t\tconst { output: _deprecatedOutput, ...specWithoutDeprecatedOutput } = spec;\n\n\t\t// Deep merge: spec options override defaults\n\t\tconst merged: OpenApiGeneratorOptions = {\n\t\t\t// Apply defaults first\n\t\t\tmode: defaults.mode,\n\t\t\tincludeDescriptions: defaults.includeDescriptions,\n\t\t\tuseDescribe: defaults.useDescribe,\n\t\t\tdefaultNullable: defaults.defaultNullable,\n\t\t\tuseOperationId: defaults.useOperationId,\n\t\t\temptyObjectBehavior: defaults.emptyObjectBehavior,\n\t\t\tschemaType: defaults.schemaType,\n\t\t\tprefix: defaults.prefix,\n\t\t\tsuffix: defaults.suffix,\n\t\t\tshowStats: defaults.showStats,\n\t\t\tcustomDateTimeFormatRegex: defaults.customDateTimeFormatRegex,\n\t\t\tuuidFormat: defaults.uuidFormat,\n\t\t\tenumFormat: defaults.enumFormat,\n\t\t\tfileHeader: defaults.fileHeader,\n\n\t\t\t// Override with spec-specific values\n\t\t\t...specWithoutDeprecatedOutput,\n\t\t\toutputTypes: resolvedOutputTypes,\n\t\t};\n\t\treturn merged;\n\t});\n}\n\n/**\n * Merge CLI options with config options\n * CLI options have highest precedence and override both spec and default config\n *\n * @param specConfig - Configuration from config file (with defaults already applied)\n * @param cliOptions - Options provided via CLI arguments\n * @returns Merged OpenApiGeneratorOptions with CLI taking precedence\n */\nexport function mergeCliWithConfig(\n\tspecConfig: OpenApiGeneratorOptions,\n\tcliOptions: Partial<OpenApiGeneratorOptions>\n): OpenApiGeneratorOptions {\n\treturn coreMergeCliWithConfig(specConfig, cliOptions);\n}\n","#!/usr/bin/env node\nimport { existsSync, writeFileSync } from \"node:fs\";\n\nimport {\n\tCliOptionsError,\n\tConfigValidationError,\n\texecuteBatch,\n\tfindSpecFiles,\n\tgetBatchExitCode,\n\tgetRandomCeriosMessage,\n} from \"@cerios/openapi-core\";\nimport { Command } from \"commander\";\nimport prompts from \"prompts\";\n\nimport { OpenApiGenerator } from \"./openapi-generator\";\nimport type { ExecutionMode } from \"./types\";\nimport { loadConfig, mergeConfigWithDefaults } from \"./utils/config-loader\";\n\nconst program = new Command();\n\nprogram\n\t.name(\"openapi-to-zod\")\n\t.description(\"Generate Zod v4 schemas from OpenAPI specifications\")\n\t.version(\"1.0.0\")\n\t.option(\"-c, --config <path>\", \"Path to config file (openapi-to-zod.config.{ts,json})\")\n\t.addHelpText(\n\t\t\"after\",\n\t\t`\nExamples:\n # Create a new config file\n $ openapi-to-zod init\n\n # Generate with auto-discovered config\n $ openapi-to-zod\n\n # Generate with custom config path\n $ openapi-to-zod --config custom.config.ts\n`\n\t)\n\t.action(async (options: { config?: string }) => {\n\t\ttry {\n\t\t\tawait executeConfigMode(options);\n\t\t} catch (error) {\n\t\t\tif (error instanceof CliOptionsError || error instanceof ConfigValidationError) {\n\t\t\t\tconsole.error(error.message);\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\t\tconsole.error(\"Error:\", error instanceof Error ? error.message : String(error));\n\t\t\tif (error instanceof Error && error.stack) {\n\t\t\t\tconsole.error(\"\\nStack trace:\", error.stack);\n\t\t\t}\n\t\t\tprocess.exit(1);\n\t\t}\n\t});\n\n// Add init command\nprogram\n\t.command(\"init\")\n\t.description(\"Initialize a new openapi-to-zod configuration file\")\n\t.action(async () => {\n\t\ttry {\n\t\t\tawait initConfigFile();\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Error:\", error instanceof Error ? error.message : String(error));\n\t\t\tprocess.exit(1);\n\t\t}\n\t});\n\nprogram.parse();\n\n/**\n * Execute config mode (only mode available)\n */\nasync function executeConfigMode(options: { config?: string }): Promise<void> {\n\t// Load config file\n\tconst config = await loadConfig(options.config);\n\n\t// Merge defaults with specs\n\tconst specs = mergeConfigWithDefaults(config);\n\n\t// Determine execution mode\n\tconst executionMode: ExecutionMode = config.executionMode || \"parallel\";\n\n\t// Extract batchSize from first spec's options or use default\n\tconst batchSize = specs[0]?.batchSize ?? 10;\n\n\t// Execute batch with generator factory\n\tconst summary = await executeBatch(specs, executionMode, spec => new OpenApiGenerator(spec), batchSize);\n\n\t// Exit with appropriate code\n\tconst exitCode = getBatchExitCode(summary);\n\tif (exitCode !== 0) {\n\t\tprocess.exit(exitCode);\n\t}\n} /**\n * Initialize a new config file with prompts\n */\nasync function initConfigFile(): Promise<void> {\n\tconsole.log(\"Welcome to openapi-to-zod configuration setup!\\n\");\n\n\t// Check for existing config files\n\tconst configFiles = [\"openapi-to-zod.config.ts\", \"openapi-to-zod.config.json\"];\n\n\tconst existingConfig = configFiles.find(f => existsSync(f));\n\tif (existingConfig) {\n\t\tconst result = await prompts({\n\t\t\ttype: \"confirm\",\n\t\t\tname: \"overwrite\",\n\t\t\tmessage: `Config file '${existingConfig}' already exists. Overwrite?`,\n\t\t\tinitial: false,\n\t\t});\n\t\tconst overwrite = Boolean((result as Record<string, unknown>).overwrite);\n\n\t\tif (!overwrite) {\n\t\t\tconsole.log(\"Initialization cancelled.\");\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Discover spec files\n\tconst { files, totalCount } = findSpecFiles();\n\n\t// Show pagination message if needed\n\tif (totalCount > 20) {\n\t\tconsole.log(`Showing first 20 of ${totalCount} files found. Use manual entry to specify others.\\n`);\n\t}\n\n\tlet inputPath: string;\n\n\tif (files.length > 0) {\n\t\t// Show file selection\n\t\tconst choices = [\n\t\t\t...files.map(f => ({ title: `${f.path} (${f.size})`, value: f.path })),\n\t\t\t{ title: \"→ Enter manually...\", value: \"__MANUAL__\" },\n\t\t];\n\n\t\tconst inputResponse: { input?: string } = await prompts({\n\t\t\ttype: \"select\",\n\t\t\tname: \"input\",\n\t\t\tmessage: \"Select OpenAPI spec file (YAML or JSON):\",\n\t\t\tchoices,\n\t\t});\n\n\t\tif (!inputResponse.input) {\n\t\t\tconsole.log(\"\\nInitialization cancelled.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (inputResponse.input === \"__MANUAL__\") {\n\t\t\t// Manual entry\n\t\t\tconst manualResponse: { input?: string } = await prompts({\n\t\t\t\ttype: \"text\",\n\t\t\t\tname: \"input\",\n\t\t\t\tmessage: \"Input OpenAPI file path (YAML or JSON):\",\n\t\t\t\tinitial: \"openapi.{yaml,yml,json}\",\n\t\t\t\tvalidate: (value: string) => {\n\t\t\t\t\tif (value.length === 0) return \"Input path is required\";\n\t\t\t\t\tif (!existsSync(value)) return \"⚠️ File does not exist. Continue anyway?\";\n\t\t\t\t\treturn true;\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tif (!manualResponse.input) {\n\t\t\t\tconsole.log(\"\\nInitialization cancelled.\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinputPath = manualResponse.input;\n\t\t} else {\n\t\t\tinputPath = inputResponse.input;\n\t\t}\n\t} else {\n\t\t// No files found, fall back to text input\n\t\tconst manualResponse: { input?: string } = await prompts({\n\t\t\ttype: \"text\",\n\t\t\tname: \"input\",\n\t\t\tmessage: \"Input OpenAPI file path (YAML or JSON):\",\n\t\t\tinitial: \"openapi.{yaml,yml,json}\",\n\t\t\tvalidate: (value: string) => {\n\t\t\t\tif (value.length === 0) return \"Input path is required\";\n\t\t\t\tif (!existsSync(value)) return \"⚠️ File does not exist. Continue anyway?\";\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\n\t\tif (!manualResponse.input) {\n\t\t\tconsole.log(\"\\nInitialization cancelled.\");\n\t\t\treturn;\n\t\t}\n\n\t\tinputPath = manualResponse.input;\n\t}\n\n\tconst response: { output?: string; format?: \"ts\" | \"json\"; includeDefaults?: boolean } = await prompts([\n\t\t{\n\t\t\ttype: \"text\",\n\t\t\tname: \"output\",\n\t\t\tmessage: \"Output TypeScript file path:\",\n\t\t\tinitial: \"src/schemas.ts\",\n\t\t\tvalidate: (value: string) => value.length > 0 || \"Output path is required\",\n\t\t},\n\t\t{\n\t\t\ttype: \"select\",\n\t\t\tname: \"format\",\n\t\t\tmessage: \"Config file format:\",\n\t\t\tchoices: [\n\t\t\t\t{ title: \"TypeScript (recommended)\", value: \"ts\" },\n\t\t\t\t{ title: \"JSON\", value: \"json\" },\n\t\t\t],\n\t\t\tinitial: 0,\n\t\t},\n\t\t{\n\t\t\ttype: \"confirm\",\n\t\t\tname: \"includeDefaults\",\n\t\t\tmessage: \"Include commonly-used recommended defaults?\",\n\t\t\tinitial: true,\n\t\t},\n\t]);\n\n\t// Handle user cancellation (Ctrl+C)\n\tif (!response.output || !response.format) {\n\t\tconsole.log(\"\\nInitialization cancelled.\");\n\t\treturn;\n\t}\n\n\tconst { output, format, includeDefaults } = response;\n\tconst input = inputPath;\n\n\t// Generate config content\n\tlet configContent: string;\n\tlet configFilename: string;\n\n\tif (format === \"ts\") {\n\t\tconfigFilename = \"openapi-to-zod.config.ts\";\n\t\tif (includeDefaults) {\n\t\t\tconfigContent = `import { defineConfig } from '@cerios/openapi-to-zod';\n\nexport default defineConfig({\n defaults: {\n mode: 'strict',\n includeDescriptions: true,\n\tuseDescribe: false,\n showStats: true,\n\tschemaType: 'all',\n },\n specs: [\n {\n input: '${input}',\n outputTypes: '${output}',\n },\n ],\n});\n`;\n\t\t} else {\n\t\t\tconfigContent = `import { defineConfig } from '@cerios/openapi-to-zod';\n\nexport default defineConfig({\n specs: [\n {\n input: '${input}',\n outputTypes: '${output}',\n },\n ],\n});\n`;\n\t\t}\n\t} else {\n\t\tconfigFilename = \"openapi-to-zod.config.json\";\n\t\tconst jsonConfig: {\n\t\t\tspecs: Array<{ input: string; outputTypes: string | undefined }>;\n\t\t\tdefaults?: { mode: string; includeDescriptions: boolean; showStats: boolean };\n\t\t} = {\n\t\t\tspecs: [\n\t\t\t\t{\n\t\t\t\t\tinput,\n\t\t\t\t\toutputTypes: output,\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\n\t\tif (includeDefaults) {\n\t\t\tjsonConfig.defaults = {\n\t\t\t\tmode: \"strict\",\n\t\t\t\tincludeDescriptions: true,\n\t\t\t\tshowStats: false,\n\t\t\t};\n\t\t}\n\n\t\tconfigContent = `${JSON.stringify(jsonConfig, null, 2)}\\n`;\n\t}\n\n\t// Write config file\n\twriteFileSync(configFilename, configContent, \"utf-8\");\n\n\tconsole.log(`\\n✓ Created ${configFilename}`);\n\tconsole.log(\"\\nNext steps:\");\n\tconsole.log(\" 1. Review and customize your config file if needed\");\n\tconsole.log(\" 2. Run 'openapi-to-zod' to generate schemas\\n\");\n\n\t// Random fun message\n\tconsole.log(`${getRandomCeriosMessage()}\\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OAAO;AACN,yBAAiB;AACjB,cAAM,aAGF;AAAA,UACH,OAAO;AAAA,YACN;AAAA,cACC;AAAA,cACA,aAAa;AAAA,YACd;AAAA,UACD;AAAA,QACD;AAEA,YAAI,iBAAiB;AACpB,qBAAW,WAAW;AAAA,YACrB,MAAM;AAAA,YACN,qBAAqB;AAAA,YACrB,WAAW;AAAA,UACZ;AAAA,QACD;AAEA,wBAAgB,GAAG,KAAK,UAAU,YAAY,MAAM,CAAC,CAAC;AAAA;AAAA,MACvD;AAGA,MAAAD,eAAc,gBAAgB,eAAe,OAAO;AAEpD,cAAQ,IAAI;AAAA,iBAAe,cAAc,EAAE;AAC3C,cAAQ,IAAI,eAAe;AAC3B,cAAQ,IAAI,sDAAsD;AAClE,cAAQ,IAAI,iDAAiD;AAG7D,cAAQ,IAAI,GAAG,uBAAuB,CAAC;AAAA,CAAI;AAAA,IAC5C;AAAA;AAAA;","names":["F","cursor","cursor","F","override","question","answer","getFormattedAnswer","require_action","require_strip","require_clear","require_figures","require_style","require_lines","require_wrap","require_entriesToDisplay","require_util","require_prompt","require_text","require_select","require_toggle","require_datepart","require_meridiem","require_day","require_hours","require_milliseconds","require_minutes","require_month","require_seconds","require_year","require_dateparts","require_date","require_number","require_multiselect","cursor","require_autocomplete","require_autocompleteMultiselect","cursor","require_confirm","require_elements","require_prompts","override","question","answer","require_prompts","schemaCode","typeCode","isNullable","schemaStrings","union","elseValidation","elseRequiredProps","generatePropertyAccess","definedProps","toCamelCase","toPascalCase","LRUCache","resolveRefName","stripPrefix","toCamelCase","toPascalCase","path","jsdoc","strippedName","zodType","visited","existsSync","writeFileSync","prompts"]}
|