@learnosity/lib-qti-converter 0.12.6 → 0.12.8
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/package.json +10 -9
- package/packages/cli/dist/batchProcessors-CUJoQD8a.js +3753 -0
- package/packages/cli/dist/batchProcessors-CUJoQD8a.js.map +1 -0
- package/packages/cli/dist/batchWorker.js +1 -1
- package/packages/cli/dist/{create-prompt-DU9wLVhI.js → create-prompt-DyNnKXYU.js} +63 -53
- package/packages/cli/dist/create-prompt-DyNnKXYU.js.map +1 -0
- package/packages/cli/dist/{dist-DjpU2mIj.js → dist-D3v6G5F8.js} +6 -6
- package/packages/cli/dist/{dist-DjpU2mIj.js.map → dist-D3v6G5F8.js.map} +1 -1
- package/packages/cli/dist/{learnosityToQti-CXDJoJpl.js → learnosityToQti-CvfVQ6Kl.js} +4 -4
- package/packages/cli/dist/{learnosityToQti-CXDJoJpl.js.map → learnosityToQti-CvfVQ6Kl.js.map} +1 -1
- package/packages/cli/dist/{learnosityToQtiPackage-7v-s4ybk.js → learnosityToQtiPackage-CXMsJNQD.js} +7 -8
- package/packages/cli/dist/{learnosityToQtiPackage-7v-s4ybk.js.map → learnosityToQtiPackage-CXMsJNQD.js.map} +1 -1
- package/packages/cli/dist/main.js +7 -7
- package/packages/cli/dist/main.js.map +1 -1
- package/packages/cli/dist/nodeFileAccess-BhCoGDOi.js +294 -0
- package/packages/cli/dist/nodeFileAccess-BhCoGDOi.js.map +1 -0
- package/packages/cli/dist/{pathUtils-CgoDQyJk.js → pathUtils-DmtCfutO.js} +27 -167
- package/packages/cli/dist/pathUtils-DmtCfutO.js.map +1 -0
- package/packages/cli/dist/{qtiPackageToLearnosity-hT4QZ7YX.js → qtiPackageToLearnosity-FhfNr7gf.js} +5 -5
- package/packages/cli/dist/{qtiPackageToLearnosity-hT4QZ7YX.js.map → qtiPackageToLearnosity-FhfNr7gf.js.map} +1 -1
- package/packages/cli/dist/{qtiToLearnosity-BU7mHhIu.js → qtiToLearnosity-5lQ5f3-t.js} +5 -5
- package/packages/cli/dist/{qtiToLearnosity-BU7mHhIu.js.map → qtiToLearnosity-5lQ5f3-t.js.map} +1 -1
- package/packages/cli/dist/resolveOptions-lHxSyq9F.js +2879 -0
- package/packages/cli/dist/resolveOptions-lHxSyq9F.js.map +1 -0
- package/packages/cli/dist/{resolveOptions-ehwJSkQy.js → table-7b-8MN2z.js} +2520 -2883
- package/packages/cli/dist/table-7b-8MN2z.js.map +1 -0
- package/packages/core/dist/index.d.ts +184 -184
- package/packages/core/dist/index.js +90 -64
- package/packages/core/dist/node.d.ts +196 -196
- package/packages/core/dist/node.js +95 -66
- package/packages/cli/dist/batchProcessors-C8k2v0o_.js +0 -217
- package/packages/cli/dist/batchProcessors-C8k2v0o_.js.map +0 -1
- package/packages/cli/dist/create-prompt-DU9wLVhI.js.map +0 -1
- package/packages/cli/dist/pathUtils-CgoDQyJk.js.map +0 -1
- package/packages/cli/dist/resolveOptions-ehwJSkQy.js.map +0 -1
- package/packages/cli/dist/table-DYcNeyJ_.js +0 -2306
- package/packages/cli/dist/table-DYcNeyJ_.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pathUtils-DmtCfutO.js","names":["emojiRegex","ANSI_BACKGROUND_OFFSET","wrapAnsi16","wrapAnsi256","wrapAnsi16m","styles","modifierNames","foregroundColorNames","backgroundColorNames","colorNames","assembleStyles","ansiStyles","process","styles","ansiStyles","process","cliBoxes","ansiAlign","chalk"],"sources":["../../../node_modules/.pnpm/@inquirer+input@5.1.6_@types+node@26.6.2/node_modules/@inquirer/input/dist/index.js","../../../node_modules/.pnpm/ansi-regex@6.3.0/node_modules/ansi-regex/index.js","../../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js","../../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/lookup-data.js","../../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/utilities.js","../../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/lookup.js","../../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/index.js","../../../node_modules/.pnpm/emoji-regex@10.6.0/node_modules/emoji-regex/index.js","../../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js","../../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js","../../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js","../../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js","../../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js","../../../node_modules/.pnpm/widest-line@5.0.0/node_modules/widest-line/index.js","../../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/boxes.json","../../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/index.js","../../../node_modules/.pnpm/camelcase@8.0.0/node_modules/camelcase/index.js","../../../node_modules/.pnpm/ansi-align@3.0.1/node_modules/ansi-align/index.js","../../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js","../../../node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js","../../../node_modules/.pnpm/boxen@8.0.1/node_modules/boxen/index.js","../src/ux/banner.ts","../src/options/schema.ts","../src/options/loadConfig.ts","../src/utils/pathUtils.ts"],"sourcesContent":["import { createPrompt, useState, useKeypress, useEffect, usePrefix, isBackspaceKey, isEnterKey, isTabKey, makeTheme, } from '@inquirer/core';\nconst inputTheme = {\n validationFailureMode: 'keep',\n};\nexport default createPrompt((config, done) => {\n const { prefill = 'tab' } = config;\n const theme = makeTheme(inputTheme, config.theme);\n const [status, setStatus] = useState('idle');\n // Coerce to string to handle runtime values that may be numbers despite TypeScript types\n // oxlint-disable-next-line typescript/no-unnecessary-type-conversion\n const [defaultValue, setDefaultValue] = useState(String(config.default ?? ''));\n const [errorMsg, setError] = useState();\n const [value, setValue] = useState('');\n const prefix = usePrefix({ status, theme });\n async function validate(value) {\n const { required, pattern, patternError = 'Invalid input' } = config;\n if (required && !value) {\n return 'You must provide a value';\n }\n if (pattern && !pattern.test(value)) {\n return patternError;\n }\n if (typeof config.validate === 'function') {\n return (await config.validate(value)) || 'You must provide a valid value';\n }\n return true;\n }\n useKeypress(async (key, rl) => {\n // Ignore keypress while our prompt is doing other processing.\n if (status !== 'idle') {\n return;\n }\n if (isEnterKey(key)) {\n const answer = value || defaultValue;\n setStatus('loading');\n const isValid = await validate(answer);\n if (isValid === true) {\n setValue(answer);\n setStatus('done');\n done(answer);\n }\n else {\n if (theme.validationFailureMode === 'clear') {\n setValue('');\n }\n else {\n // Reset the readline line value to the previous value. On line event, the value\n // get cleared, forcing the user to re-enter the value instead of fixing it.\n rl.write(value);\n }\n setError(isValid);\n setStatus('idle');\n }\n }\n else if (isBackspaceKey(key) && !value) {\n setDefaultValue('');\n }\n else if (isTabKey(key) && !value) {\n setDefaultValue('');\n rl.clearLine(0); // Remove the tab character.\n rl.write(defaultValue);\n setValue(defaultValue);\n }\n else {\n setValue(rl.line);\n setError(undefined);\n }\n });\n // If prefill is set to 'editable' cut out the default value and paste into current state and the user's cli buffer\n // They can edit the value immediately instead of needing to press 'tab'\n useEffect((rl) => {\n if (prefill === 'editable' && defaultValue) {\n rl.write(defaultValue);\n setValue(defaultValue);\n }\n }, []);\n const message = theme.style.message(config.message, status);\n let formattedValue = value;\n if (typeof config.transformer === 'function') {\n formattedValue = config.transformer(value, { isFinal: status === 'done' });\n }\n else if (status === 'done') {\n formattedValue = theme.style.answer(value);\n }\n let defaultStr;\n if (defaultValue && status !== 'done' && !value) {\n defaultStr = theme.style.defaultAnswer(defaultValue);\n }\n let error = '';\n if (errorMsg) {\n error = theme.style.error(errorMsg);\n }\n return [\n [prefix, message, defaultStr, formattedValue]\n .filter((v) => v !== undefined)\n .join(' '),\n error,\n ];\n});\n","export default function ansiRegex({onlyFirst = false} = {}) {\n\t// Valid string terminator sequences are BEL, ESC\\, and 0x9c\n\tconst ST = '(?:\\\\u0007|\\\\u001B\\\\u005C|\\\\u009C)';\n\n\t// OSC sequences only: ESC ] ... ST\n\t// The payload stops at the first terminator character rather than scanning ahead for one, so an unterminated `ESC ]` cannot rescan the rest of the input. Terminals likewise abort a control string on an unexpected ESC.\n\tconst osc = `(?:\\\\u001B\\\\][^\\\\u0007\\\\u001B\\\\u009C]*${ST})`;\n\n\t// CSI and related: ESC/C1, optional intermediates, optional params (supports ; and :) then final byte\n\tconst csi = '[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:\\\\d{1,4}(?:[;:]\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]';\n\n\tconst pattern = `${osc}|${csi}`;\n\n\treturn new RegExp(pattern, onlyFirst ? undefined : 'g');\n}\n","import ansiRegex from 'ansi-regex';\n\nconst regex = ansiRegex();\n\nexport default function stripAnsi(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n\t}\n\n\t// Fast path: ANSI codes require ESC (7-bit) or CSI (8-bit) introducer\n\tif (!string.includes('\\u001B') && !string.includes('\\u009B')) {\n\t\treturn string;\n\t}\n\n\t// Even though the regex is global, we don't need to reset the `.lastIndex`\n\t// because unlike `.exec()` and `.test()`, `.replace()` does it automatically\n\t// and doing it manually has a performance penalty.\n\treturn string.replace(regex, '');\n}\n","// Generated by scripts/build.js\n\nexport const ambiguousMinimalCodePoint = 161;\nexport const ambiguousMaximumCodePoint = 1114109;\nexport const ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];\n\nexport const fullwidthMinimalCodePoint = 12288;\nexport const fullwidthMaximumCodePoint = 65510;\nexport const fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];\n\nexport const halfwidthMinimalCodePoint = 8361;\nexport const halfwidthMaximumCodePoint = 65518;\nexport const halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];\n\nexport const narrowMinimalCodePoint = 32;\nexport const narrowMaximumCodePoint = 10630;\nexport const narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];\n\nexport const wideMinimalCodePoint = 4352;\nexport const wideMaximumCodePoint = 262141;\nexport const wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101594, 101631, 101664, 101760, 101874, 101888, 102801, 102816, 102866, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110888, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110952, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127406, 127406, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128729, 128732, 128735, 128747, 128748, 128756, 128764, 128986, 128986, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129734, 129736, 129736, 129740, 129757, 129759, 129771, 129775, 129786, 131072, 196605, 196608, 262141];\n","/**\nBinary search on a sorted flat array of [start, end] pairs.\n\n@param {number[]} ranges - Flat array of inclusive [start, end] range pairs, e.g. [0, 5, 10, 20].\n@param {number} codePoint - The value to search for.\n@returns {boolean} Whether the value falls within any of the ranges.\n*/\nexport const isInRange = (ranges, codePoint) => {\n\tlet low = 0;\n\tlet high = Math.floor(ranges.length / 2) - 1;\n\twhile (low <= high) {\n\t\tconst mid = Math.floor((low + high) / 2);\n\t\tconst i = mid * 2;\n\t\tif (codePoint < ranges[i]) {\n\t\t\thigh = mid - 1;\n\t\t} else if (codePoint > ranges[i + 1]) {\n\t\t\tlow = mid + 1;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n};\n","import {\n\tambiguousMinimalCodePoint,\n\tambiguousMaximumCodePoint,\n\tambiguousRanges,\n\n\tfullwidthMinimalCodePoint,\n\tfullwidthMaximumCodePoint,\n\tfullwidthRanges,\n\n\thalfwidthMinimalCodePoint,\n\thalfwidthMaximumCodePoint,\n\thalfwidthRanges,\n\n\tnarrowMinimalCodePoint,\n\tnarrowMaximumCodePoint,\n\tnarrowRanges,\n\n\twideMinimalCodePoint,\n\twideMaximumCodePoint,\n\twideRanges,\n} from './lookup-data.js';\nimport {isInRange} from './utilities.js';\n\nconst commonCjkCodePoint = 0x4E_00;\nconst [wideFastPathStart, wideFastPathEnd] = /* #__PURE__ */ findWideFastPathRange(wideRanges);\n\n// Use a hot-path range so common `isWide` calls can skip binary search.\n// The range containing U+4E00 covers common CJK ideographs;\n// fallback to the largest range for resilience to Unicode table changes.\nfunction findWideFastPathRange(ranges) {\n\tlet fastPathStart = ranges[0];\n\tlet fastPathEnd = ranges[1];\n\n\tfor (let index = 0; index < ranges.length; index += 2) {\n\t\tconst start = ranges[index];\n\t\tconst end = ranges[index + 1];\n\n\t\tif (\n\t\t\tcommonCjkCodePoint >= start\n\t\t\t&& commonCjkCodePoint <= end\n\t\t) {\n\t\t\treturn [start, end];\n\t\t}\n\n\t\tif ((end - start) > (fastPathEnd - fastPathStart)) {\n\t\t\tfastPathStart = start;\n\t\t\tfastPathEnd = end;\n\t\t}\n\t}\n\n\treturn [fastPathStart, fastPathEnd];\n}\n\nexport const isAmbiguous = codePoint => {\n\tif (\n\t\tcodePoint < ambiguousMinimalCodePoint\n\t\t|| codePoint > ambiguousMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(ambiguousRanges, codePoint);\n};\n\nexport const isFullwidth = codePoint => {\n\tif (\n\t\tcodePoint < fullwidthMinimalCodePoint\n\t\t|| codePoint > fullwidthMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(fullwidthRanges, codePoint);\n};\n\nconst isHalfwidth = codePoint => {\n\tif (\n\t\tcodePoint < halfwidthMinimalCodePoint\n\t\t|| codePoint > halfwidthMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(halfwidthRanges, codePoint);\n};\n\nconst isNarrow = codePoint => {\n\tif (\n\t\tcodePoint < narrowMinimalCodePoint\n\t\t|| codePoint > narrowMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(narrowRanges, codePoint);\n};\n\nexport const isWide = codePoint => {\n\tif (\n\t\tcodePoint >= wideFastPathStart\n\t\t&& codePoint <= wideFastPathEnd\n\t) {\n\t\treturn true;\n\t}\n\n\tif (\n\t\tcodePoint < wideMinimalCodePoint\n\t\t|| codePoint > wideMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(wideRanges, codePoint);\n};\n\nexport function getCategory(codePoint) {\n\tif (isAmbiguous(codePoint)) {\n\t\treturn 'ambiguous';\n\t}\n\n\tif (isFullwidth(codePoint)) {\n\t\treturn 'fullwidth';\n\t}\n\n\tif (isHalfwidth(codePoint)) {\n\t\treturn 'halfwidth';\n\t}\n\n\tif (isNarrow(codePoint)) {\n\t\treturn 'narrow';\n\t}\n\n\tif (isWide(codePoint)) {\n\t\treturn 'wide';\n\t}\n\n\treturn 'neutral';\n}\n","import {getCategory, isAmbiguous, isFullwidth, isWide} from './lookup.js';\n\nfunction validate(codePoint) {\n\tif (!Number.isSafeInteger(codePoint)) {\n\t\tthrow new TypeError(`Expected a code point, got \\`${typeof codePoint}\\`.`);\n\t}\n}\n\nexport function eastAsianWidthType(codePoint) {\n\tvalidate(codePoint);\n\n\treturn getCategory(codePoint);\n}\n\nexport function eastAsianWidth(codePoint, {ambiguousAsWide = false} = {}) {\n\tvalidate(codePoint);\n\n\tif (\n\t\tisFullwidth(codePoint)\n\t\t|| isWide(codePoint)\n\t\t|| (ambiguousAsWide && isAmbiguous(codePoint))\n\t) {\n\t\treturn 2;\n\t}\n\n\treturn 1;\n}\n\n// Private exports for https://github.com/sindresorhus/is-fullwidth-code-point\nexport {\n\tisFullwidth as _isFullwidth,\n\t// TODO: Remove this in the next major version.\n\tisFullwidth as _isFullWidth,\n\tisWide as _isWide,\n} from './lookup.js';\n","module.exports = () => {\n\t// https://mths.be/emoji\n\treturn /[#*0-9]\\uFE0F?\\u20E3|[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23ED-\\u23EF\\u23F1\\u23F2\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB\\u25FC\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692\\u2694-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A7\\u26AA\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C8\\u26CF\\u26D1\\u26E9\\u26F0-\\u26F5\\u26F7\\u26F8\\u26FA\\u2702\\u2708\\u2709\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2733\\u2734\\u2744\\u2747\\u2757\\u2763\\u27A1\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B55\\u3030\\u303D\\u3297\\u3299]\\uFE0F?|[\\u261D\\u270C\\u270D](?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?|[\\u270A\\u270B](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u2693\\u26A1\\u26AB\\u26C5\\u26CE\\u26D4\\u26EA\\u26FD\\u2705\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2795-\\u2797\\u27B0\\u27BF\\u2B50]|\\u26D3\\uFE0F?(?:\\u200D\\uD83D\\uDCA5)?|\\u26F9(?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|\\u2764\\uFE0F?(?:\\u200D(?:\\uD83D\\uDD25|\\uD83E\\uDE79))?|\\uD83C(?:[\\uDC04\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDE02\\uDE37\\uDF21\\uDF24-\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\\uDC69]\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFC-\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFC-\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFD-\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFD\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFE])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFE]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?))?|\\uDC69(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?[\\uDC68\\uDC69]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?|\\uDC69\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?))|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFC-\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFC-\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFC-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFD-\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFD\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFE])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFE]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFE])))?))?|\\uDD75(?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|\\uDE2E(?:\\u200D\\uD83D\\uDCA8)?|\\uDE35(?:\\u200D\\uD83D\\uDCAB)?|\\uDE36(?:\\u200D\\uD83C\\uDF2B\\uFE0F?)?|\\uDE42(?:\\u200D[\\u2194\\u2195]\\uFE0F?)?|\\uDEB6(?:\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D(?:[\\u2640\\u2642]\\uFE0F?(?:\\u200D\\u27A1\\uFE0F?)?|\\u27A1\\uFE0F?))?)|\\uD83E(?:[\\uDD0C\\uDD0F\\uDD18-\\uDD1F\\uDD30-\\uDD34\\uDD36\\uDD77\\uDDB5\\uDDB6\\uDDBB\\uDDD2\\uDDD3\\uDDD5\\uDEC3-\\uDEC5\\uDEF0\\uDEF2-\\uDEF8](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\uDD26\\uDD35\\uDD37-\\uDD39\\uDD3C-\\uDD3E\\uDDB8\\uDDB9\\uDDCD\\uDDCF\\uDDD4\\uDDD6-\\uDDDD](?:\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|[\\uDDDE\\uDDDF](?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|[\\uDD0D\\uDD0E\\uDD10-\\uDD17\\uDD20-\\uDD25\\uDD27-\\uDD2F\\uDD3A\\uDD3F-\\uDD45\\uDD47-\\uDD76\\uDD78-\\uDDB4\\uDDB7\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FC\\uDFFE\\uDFFF])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFD\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3\\uDE70]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF]|\\uDEEF\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFE]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFE])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3\\uDE70]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF]|\\uDEEF\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFE])))?))?|\\uDEF1(?:\\uD83C(?:\\uDFFB(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFC-\\uDFFF])?|\\uDFFC(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])?|\\uDFFD(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])?|\\uDFFE(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])?|\\uDFFF(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB-\\uDFFE])?))?)/g;\n};\n","import stripAnsi from 'strip-ansi';\nimport {eastAsianWidth} from 'get-east-asian-width';\nimport emojiRegex from 'emoji-regex';\n\nconst segmenter = new Intl.Segmenter();\n\nconst defaultIgnorableCodePointRegex = /^\\p{Default_Ignorable_Code_Point}$/u;\n\nexport default function stringWidth(string, options = {}) {\n\tif (typeof string !== 'string' || string.length === 0) {\n\t\treturn 0;\n\t}\n\n\tconst {\n\t\tambiguousIsNarrow = true,\n\t\tcountAnsiEscapeCodes = false,\n\t} = options;\n\n\tif (!countAnsiEscapeCodes) {\n\t\tstring = stripAnsi(string);\n\t}\n\n\tif (string.length === 0) {\n\t\treturn 0;\n\t}\n\n\tlet width = 0;\n\tconst eastAsianWidthOptions = {ambiguousAsWide: !ambiguousIsNarrow};\n\n\tfor (const {segment: character} of segmenter.segment(string)) {\n\t\tconst codePoint = character.codePointAt(0);\n\n\t\t// Ignore control characters\n\t\tif (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore zero-width characters\n\t\tif (\n\t\t\t(codePoint >= 0x20_0B && codePoint <= 0x20_0F) // Zero-width space, non-joiner, joiner, left-to-right mark, right-to-left mark\n\t\t\t|| codePoint === 0xFE_FF // Zero-width no-break space\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore combining characters\n\t\tif (\n\t\t\t(codePoint >= 0x3_00 && codePoint <= 0x3_6F) // Combining diacritical marks\n\t\t\t|| (codePoint >= 0x1A_B0 && codePoint <= 0x1A_FF) // Combining diacritical marks extended\n\t\t\t|| (codePoint >= 0x1D_C0 && codePoint <= 0x1D_FF) // Combining diacritical marks supplement\n\t\t\t|| (codePoint >= 0x20_D0 && codePoint <= 0x20_FF) // Combining diacritical marks for symbols\n\t\t\t|| (codePoint >= 0xFE_20 && codePoint <= 0xFE_2F) // Combining half marks\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore surrogate pairs\n\t\tif (codePoint >= 0xD8_00 && codePoint <= 0xDF_FF) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore variation selectors\n\t\tif (codePoint >= 0xFE_00 && codePoint <= 0xFE_0F) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// This covers some of the above cases, but we still keep them for performance reasons.\n\t\tif (defaultIgnorableCodePointRegex.test(character)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// TODO: Use `/\\p{RGI_Emoji}/v` when targeting Node.js 20.\n\t\tif (emojiRegex().test(character)) {\n\t\t\twidth += 2;\n\t\t\tcontinue;\n\t\t}\n\n\t\twidth += eastAsianWidth(codePoint, eastAsianWidthOptions);\n\t}\n\n\treturn width;\n}\n","const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","import process from 'node:process';\nimport os from 'node:os';\nimport tty from 'node:tty';\n\n// From: https://github.com/sindresorhus/has-flag/blob/main/index.js\n/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {\nfunction hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n}\n\nconst {env} = process;\n\nlet flagForceColor;\nif (\n\thasFlag('no-color')\n\t|| hasFlag('no-colors')\n\t|| hasFlag('color=false')\n\t|| hasFlag('color=never')\n) {\n\tflagForceColor = 0;\n} else if (\n\thasFlag('color')\n\t|| hasFlag('colors')\n\t|| hasFlag('color=true')\n\t|| hasFlag('color=always')\n) {\n\tflagForceColor = 1;\n}\n\nfunction envForceColor() {\n\tif ('FORCE_COLOR' in env) {\n\t\tif (env.FORCE_COLOR === 'true') {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (env.FORCE_COLOR === 'false') {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3,\n\t};\n}\n\nfunction _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {\n\tconst noFlagForceColor = envForceColor();\n\tif (noFlagForceColor !== undefined) {\n\t\tflagForceColor = noFlagForceColor;\n\t}\n\n\tconst forceColor = sniffFlags ? flagForceColor : noFlagForceColor;\n\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (sniffFlags) {\n\t\tif (hasFlag('color=16m')\n\t\t\t|| hasFlag('color=full')\n\t\t\t|| hasFlag('color=truecolor')) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (hasFlag('color=256')) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\n\t// Check for Azure DevOps pipelines.\n\t// Has to be above the `!streamIsTTY` check.\n\tif ('TF_BUILD' in env && 'AGENT_NAME' in env) {\n\t\treturn 1;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10\n\t\t\t&& Number(osRelease[2]) >= 10_586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14_931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-kitty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-ghostty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'wezterm') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app': {\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\t}\n\n\t\t\tcase 'Apple_Terminal': {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nexport function createSupportsColor(stream, options = {}) {\n\tconst level = _supportsColor(stream, {\n\t\tstreamIsTTY: stream && stream.isTTY,\n\t\t...options,\n\t});\n\n\treturn translateLevel(level);\n}\n\nconst supportsColor = {\n\tstdout: createSupportsColor({isTTY: tty.isatty(1)}),\n\tstderr: createSupportsColor({isTTY: tty.isatty(2)}),\n};\n\nexport default supportsColor;\n","// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nexport function stringReplaceAll(string, substring, replacer) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.slice(endIndex, index) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nexport function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n","import ansiStyles from '#ansi-styles';\nimport supportsColor from '#supports-color';\nimport { // eslint-disable-line import/order\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex,\n} from './utilities.js';\n\nconst {stdout: stdoutColor, stderr: stderrColor} = supportsColor;\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m',\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nexport class Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\nconst getModelAnsi = (model, level, type, ...arguments_) => {\n\tif (model === 'rgb') {\n\t\tif (level === 'ansi16m') {\n\t\t\treturn ansiStyles[type].ansi16m(...arguments_);\n\t\t}\n\n\t\tif (level === 'ansi256') {\n\t\t\treturn ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));\n\t\t}\n\n\t\treturn ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));\n\t}\n\n\tif (model === 'hex') {\n\t\treturn getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));\n\t}\n\n\treturn ansiStyles[type][model](...arguments_);\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this[GENERATOR].level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis[GENERATOR].level = level;\n\t\t},\n\t},\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\t// eslint-disable-next-line no-implicit-coercion\n\tconst builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder[GENERATOR] = self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u001B')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nObject.defineProperties(createChalk.prototype, styles);\n\nconst chalk = createChalk();\nexport const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\nexport {\n\tmodifierNames,\n\tforegroundColorNames,\n\tbackgroundColorNames,\n\tcolorNames,\n\n\t// TODO: Remove these aliases in the next major version\n\tmodifierNames as modifiers,\n\tforegroundColorNames as foregroundColors,\n\tbackgroundColorNames as backgroundColors,\n\tcolorNames as colors,\n} from './vendor/ansi-styles/index.js';\n\nexport {\n\tstdoutColor as supportsColor,\n\tstderrColor as supportsColorStderr,\n};\n\nexport default chalk;\n","import stringWidth from 'string-width';\n\nexport default function widestLine(string) {\n\tlet lineWidth = 0;\n\n\tfor (const line of string.split('\\n')) {\n\t\tlineWidth = Math.max(lineWidth, stringWidth(line));\n\t}\n\n\treturn lineWidth;\n}\n","","'use strict';\nconst cliBoxes = require('./boxes.json');\n\nmodule.exports = cliBoxes;\n// TODO: Remove this for the next major release\nmodule.exports.default = cliBoxes;\n","const UPPERCASE = /[\\p{Lu}]/u;\nconst LOWERCASE = /[\\p{Ll}]/u;\nconst LEADING_CAPITAL = /^[\\p{Lu}](?![\\p{Lu}])/gu;\nconst IDENTIFIER = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst SEPARATORS = /[_.\\- ]+/;\n\nconst LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source);\nconst SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu');\nconst NUMBERS_AND_IDENTIFIER = new RegExp('\\\\d+' + IDENTIFIER.source, 'gu');\n\nconst preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase) => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\tlet isLastLastCharPreserved = false;\n\n\tfor (let index = 0; index < string.length; index++) {\n\t\tconst character = string[index];\n\t\tisLastLastCharPreserved = index > 2 ? string[index - 3] === '-' : true;\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, index) + '-' + string.slice(index);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\tindex++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase)) {\n\t\t\tstring = string.slice(0, index - 1) + '-' + string.slice(index - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replaceAll(LEADING_CAPITAL, match => toLowerCase(match));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input\n\t\t.replaceAll(NUMBERS_AND_IDENTIFIER, (match, pattern, offset) => ['_', '-'].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match))\n\t\t.replaceAll(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier));\n};\n\nexport default function camelCase(input, options) {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options,\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false\n\t\t? string => string.toLowerCase()\n\t\t: string => string.toLocaleLowerCase(options.locale);\n\n\tconst toUpperCase = options.locale === false\n\t\t? string => string.toUpperCase()\n\t\t: string => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\tif (SEPARATORS.test(input)) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\tinput = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n}\n","'use strict'\n\nconst stringWidth = require('string-width')\n\nfunction ansiAlign (text, opts) {\n if (!text) return text\n\n opts = opts || {}\n const align = opts.align || 'center'\n\n // short-circuit `align: 'left'` as no-op\n if (align === 'left') return text\n\n const split = opts.split || '\\n'\n const pad = opts.pad || ' '\n const widthDiffFn = align !== 'right' ? halfDiff : fullDiff\n\n let returnString = false\n if (!Array.isArray(text)) {\n returnString = true\n text = String(text).split(split)\n }\n\n let width\n let maxWidth = 0\n text = text.map(function (str) {\n str = String(str)\n width = stringWidth(str)\n maxWidth = Math.max(width, maxWidth)\n return {\n str,\n width\n }\n }).map(function (obj) {\n return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str\n })\n\n return returnString ? text.join(split) : text\n}\n\nansiAlign.left = function left (text) {\n return ansiAlign(text, { align: 'left' })\n}\n\nansiAlign.center = function center (text) {\n return ansiAlign(text, { align: 'center' })\n}\n\nansiAlign.right = function right (text) {\n return ansiAlign(text, { align: 'right' })\n}\n\nmodule.exports = ansiAlign\n\nfunction halfDiff (maxWidth, curWidth) {\n return Math.floor((maxWidth - curWidth) / 2)\n}\n\nfunction fullDiff (maxWidth, curWidth) {\n return maxWidth - curWidth\n}\n","const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","import stringWidth from 'string-width';\nimport stripAnsi from 'strip-ansi';\nimport ansiStyles from 'ansi-styles';\n\nconst ESCAPES = new Set([\n\t'\\u001B',\n\t'\\u009B',\n]);\n\nconst END_CODE = 39;\nconst ANSI_ESCAPE_BELL = '\\u0007';\nconst ANSI_CSI = '[';\nconst ANSI_OSC = ']';\nconst ANSI_SGR_TERMINATOR = 'm';\nconst ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;\n\nconst wrapAnsiCode = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;\nconst wrapAnsiHyperlink = url => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;\n\n// Calculate the length of words split on ' ', ignoring\n// the extra characters added by ansi escape codes\nconst wordLengths = string => string.split(' ').map(character => stringWidth(character));\n\n// Wrap a long word across multiple rows\n// Ansi escape codes do not count towards length\nconst wrapWord = (rows, word, columns) => {\n\tconst characters = [...word];\n\n\tlet isInsideEscape = false;\n\tlet isInsideLinkEscape = false;\n\tlet visible = stringWidth(stripAnsi(rows.at(-1)));\n\n\tfor (const [index, character] of characters.entries()) {\n\t\tconst characterLength = stringWidth(character);\n\n\t\tif (visible + characterLength <= columns) {\n\t\t\trows[rows.length - 1] += character;\n\t\t} else {\n\t\t\trows.push(character);\n\t\t\tvisible = 0;\n\t\t}\n\n\t\tif (ESCAPES.has(character)) {\n\t\t\tisInsideEscape = true;\n\n\t\t\tconst ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join('');\n\t\t\tisInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;\n\t\t}\n\n\t\tif (isInsideEscape) {\n\t\t\tif (isInsideLinkEscape) {\n\t\t\t\tif (character === ANSI_ESCAPE_BELL) {\n\t\t\t\t\tisInsideEscape = false;\n\t\t\t\t\tisInsideLinkEscape = false;\n\t\t\t\t}\n\t\t\t} else if (character === ANSI_SGR_TERMINATOR) {\n\t\t\t\tisInsideEscape = false;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tvisible += characterLength;\n\n\t\tif (visible === columns && index < characters.length - 1) {\n\t\t\trows.push('');\n\t\t\tvisible = 0;\n\t\t}\n\t}\n\n\t// It's possible that the last row we copy over is only\n\t// ansi escape characters, handle this edge-case\n\tif (!visible && rows.at(-1).length > 0 && rows.length > 1) {\n\t\trows[rows.length - 2] += rows.pop();\n\t}\n};\n\n// Trims spaces from a string ignoring invisible sequences\nconst stringVisibleTrimSpacesRight = string => {\n\tconst words = string.split(' ');\n\tlet last = words.length;\n\n\twhile (last > 0) {\n\t\tif (stringWidth(words[last - 1]) > 0) {\n\t\t\tbreak;\n\t\t}\n\n\t\tlast--;\n\t}\n\n\tif (last === words.length) {\n\t\treturn string;\n\t}\n\n\treturn words.slice(0, last).join(' ') + words.slice(last).join('');\n};\n\n// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode.\n//\n// 'hard' will never allow a string to take up more than columns characters.\n//\n// 'soft' allows long words to expand past the column length.\nconst exec = (string, columns, options = {}) => {\n\tif (options.trim !== false && string.trim() === '') {\n\t\treturn '';\n\t}\n\n\tlet returnValue = '';\n\tlet escapeCode;\n\tlet escapeUrl;\n\n\tconst lengths = wordLengths(string);\n\tlet rows = [''];\n\n\tfor (const [index, word] of string.split(' ').entries()) {\n\t\tif (options.trim !== false) {\n\t\t\trows[rows.length - 1] = rows.at(-1).trimStart();\n\t\t}\n\n\t\tlet rowLength = stringWidth(rows.at(-1));\n\n\t\tif (index !== 0) {\n\t\t\tif (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {\n\t\t\t\t// If we start with a new word but the current row length equals the length of the columns, add a new row\n\t\t\t\trows.push('');\n\t\t\t\trowLength = 0;\n\t\t\t}\n\n\t\t\tif (rowLength > 0 || options.trim === false) {\n\t\t\t\trows[rows.length - 1] += ' ';\n\t\t\t\trowLength++;\n\t\t\t}\n\t\t}\n\n\t\t// In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns'\n\t\tif (options.hard && lengths[index] > columns) {\n\t\t\tconst remainingColumns = (columns - rowLength);\n\t\t\tconst breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);\n\t\t\tconst breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);\n\t\t\tif (breaksStartingNextLine < breaksStartingThisLine) {\n\t\t\t\trows.push('');\n\t\t\t}\n\n\t\t\twrapWord(rows, word, columns);\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {\n\t\t\tif (options.wordWrap === false && rowLength < columns) {\n\t\t\t\twrapWord(rows, word, columns);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\trows.push('');\n\t\t}\n\n\t\tif (rowLength + lengths[index] > columns && options.wordWrap === false) {\n\t\t\twrapWord(rows, word, columns);\n\t\t\tcontinue;\n\t\t}\n\n\t\trows[rows.length - 1] += word;\n\t}\n\n\tif (options.trim !== false) {\n\t\trows = rows.map(row => stringVisibleTrimSpacesRight(row));\n\t}\n\n\tconst preString = rows.join('\\n');\n\tconst pre = [...preString];\n\n\t// We need to keep a separate index as `String#slice()` works on Unicode code units, while `pre` is an array of codepoints.\n\tlet preStringIndex = 0;\n\n\tfor (const [index, character] of pre.entries()) {\n\t\treturnValue += character;\n\n\t\tif (ESCAPES.has(character)) {\n\t\t\tconst {groups} = new RegExp(`(?:\\\\${ANSI_CSI}(?<code>\\\\d+)m|\\\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || {groups: {}};\n\t\t\tif (groups.code !== undefined) {\n\t\t\t\tconst code = Number.parseFloat(groups.code);\n\t\t\t\tescapeCode = code === END_CODE ? undefined : code;\n\t\t\t} else if (groups.uri !== undefined) {\n\t\t\t\tescapeUrl = groups.uri.length === 0 ? undefined : groups.uri;\n\t\t\t}\n\t\t}\n\n\t\tconst code = ansiStyles.codes.get(Number(escapeCode));\n\n\t\tif (pre[index + 1] === '\\n') {\n\t\t\tif (escapeUrl) {\n\t\t\t\treturnValue += wrapAnsiHyperlink('');\n\t\t\t}\n\n\t\t\tif (escapeCode && code) {\n\t\t\t\treturnValue += wrapAnsiCode(code);\n\t\t\t}\n\t\t} else if (character === '\\n') {\n\t\t\tif (escapeCode && code) {\n\t\t\t\treturnValue += wrapAnsiCode(escapeCode);\n\t\t\t}\n\n\t\t\tif (escapeUrl) {\n\t\t\t\treturnValue += wrapAnsiHyperlink(escapeUrl);\n\t\t\t}\n\t\t}\n\n\t\tpreStringIndex += character.length;\n\t}\n\n\treturn returnValue;\n};\n\n// For each newline, invoke the method separately\nexport default function wrapAnsi(string, columns, options) {\n\treturn String(string)\n\t\t.normalize()\n\t\t.replaceAll('\\r\\n', '\\n')\n\t\t.split('\\n')\n\t\t.map(line => exec(line, columns, options))\n\t\t.join('\\n');\n}\n","import process from 'node:process';\nimport stringWidth from 'string-width';\nimport chalk from 'chalk';\nimport widestLine from 'widest-line';\nimport cliBoxes from 'cli-boxes';\nimport camelCase from 'camelcase';\nimport ansiAlign from 'ansi-align';\nimport wrapAnsi from 'wrap-ansi';\n\nconst NEWLINE = '\\n';\nconst PAD = ' ';\nconst NONE = 'none';\n\nconst terminalColumns = () => {\n\tconst {env, stdout, stderr} = process;\n\n\tif (stdout?.columns) {\n\t\treturn stdout.columns;\n\t}\n\n\tif (stderr?.columns) {\n\t\treturn stderr.columns;\n\t}\n\n\tif (env.COLUMNS) {\n\t\treturn Number.parseInt(env.COLUMNS, 10);\n\t}\n\n\treturn 80;\n};\n\nconst getObject = detail => typeof detail === 'number' ? {\n\ttop: detail,\n\tright: detail * 3,\n\tbottom: detail,\n\tleft: detail * 3,\n} : {\n\ttop: 0,\n\tright: 0,\n\tbottom: 0,\n\tleft: 0,\n\t...detail,\n};\n\nconst getBorderWidth = borderStyle => borderStyle === NONE ? 0 : 2;\n\nconst getBorderChars = borderStyle => {\n\tconst sides = [\n\t\t'topLeft',\n\t\t'topRight',\n\t\t'bottomRight',\n\t\t'bottomLeft',\n\t\t'left',\n\t\t'right',\n\t\t'top',\n\t\t'bottom',\n\t];\n\n\tlet characters;\n\n\t// Create empty border style\n\tif (borderStyle === NONE) {\n\t\tborderStyle = {};\n\t\tfor (const side of sides) {\n\t\t\tborderStyle[side] = '';\n\t\t}\n\t}\n\n\tif (typeof borderStyle === 'string') {\n\t\tcharacters = cliBoxes[borderStyle];\n\n\t\tif (!characters) {\n\t\t\tthrow new TypeError(`Invalid border style: ${borderStyle}`);\n\t\t}\n\t} else {\n\t\t// Ensure retro-compatibility\n\t\tif (typeof borderStyle?.vertical === 'string') {\n\t\t\tborderStyle.left = borderStyle.vertical;\n\t\t\tborderStyle.right = borderStyle.vertical;\n\t\t}\n\n\t\t// Ensure retro-compatibility\n\t\tif (typeof borderStyle?.horizontal === 'string') {\n\t\t\tborderStyle.top = borderStyle.horizontal;\n\t\t\tborderStyle.bottom = borderStyle.horizontal;\n\t\t}\n\n\t\tfor (const side of sides) {\n\t\t\tif (borderStyle[side] === null || typeof borderStyle[side] !== 'string') {\n\t\t\t\tthrow new TypeError(`Invalid border style: ${side}`);\n\t\t\t}\n\t\t}\n\n\t\tcharacters = borderStyle;\n\t}\n\n\treturn characters;\n};\n\nconst makeTitle = (text, horizontal, alignment) => {\n\tlet title = '';\n\n\tconst textWidth = stringWidth(text);\n\n\tswitch (alignment) {\n\t\tcase 'left': {\n\t\t\ttitle = text + horizontal.slice(textWidth);\n\t\t\tbreak;\n\t\t}\n\n\t\tcase 'right': {\n\t\t\ttitle = horizontal.slice(textWidth) + text;\n\t\t\tbreak;\n\t\t}\n\n\t\tdefault: {\n\t\t\thorizontal = horizontal.slice(textWidth);\n\n\t\t\tif (horizontal.length % 2 === 1) { // This is needed in case the length is odd\n\t\t\t\thorizontal = horizontal.slice(Math.floor(horizontal.length / 2));\n\t\t\t\ttitle = horizontal.slice(1) + text + horizontal; // We reduce the left part of one character to avoid the bar to go beyond its limit\n\t\t\t} else {\n\t\t\t\thorizontal = horizontal.slice(horizontal.length / 2);\n\t\t\t\ttitle = horizontal + text + horizontal;\n\t\t\t}\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn title;\n};\n\nconst makeContentText = (text, {padding, width, textAlignment, height}) => {\n\ttext = ansiAlign(text, {align: textAlignment});\n\tlet lines = text.split(NEWLINE);\n\tconst textWidth = widestLine(text);\n\n\tconst max = width - padding.left - padding.right;\n\n\tif (textWidth > max) {\n\t\tconst newLines = [];\n\t\tfor (const line of lines) {\n\t\t\tconst createdLines = wrapAnsi(line, max, {hard: true});\n\t\t\tconst alignedLines = ansiAlign(createdLines, {align: textAlignment});\n\t\t\tconst alignedLinesArray = alignedLines.split('\\n');\n\t\t\tconst longestLength = Math.max(...alignedLinesArray.map(s => stringWidth(s)));\n\n\t\t\tfor (const alignedLine of alignedLinesArray) {\n\t\t\t\tlet paddedLine;\n\t\t\t\tswitch (textAlignment) {\n\t\t\t\t\tcase 'center': {\n\t\t\t\t\t\tpaddedLine = PAD.repeat((max - longestLength) / 2) + alignedLine;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase 'right': {\n\t\t\t\t\t\tpaddedLine = PAD.repeat(max - longestLength) + alignedLine;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\tpaddedLine = alignedLine;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tnewLines.push(paddedLine);\n\t\t\t}\n\t\t}\n\n\t\tlines = newLines;\n\t}\n\n\tif (textAlignment === 'center' && textWidth < max) {\n\t\tlines = lines.map(line => PAD.repeat((max - textWidth) / 2) + line);\n\t} else if (textAlignment === 'right' && textWidth < max) {\n\t\tlines = lines.map(line => PAD.repeat(max - textWidth) + line);\n\t}\n\n\tconst paddingLeft = PAD.repeat(padding.left);\n\tconst paddingRight = PAD.repeat(padding.right);\n\n\tlines = lines.map(line => {\n\t\tconst newLine = paddingLeft + line + paddingRight;\n\n\t\treturn newLine + PAD.repeat(width - stringWidth(newLine));\n\t});\n\n\tif (padding.top > 0) {\n\t\tlines = [...Array.from({length: padding.top}).fill(PAD.repeat(width)), ...lines];\n\t}\n\n\tif (padding.bottom > 0) {\n\t\tlines = [...lines, ...Array.from({length: padding.bottom}).fill(PAD.repeat(width))];\n\t}\n\n\tif (height && lines.length > height) {\n\t\tlines = lines.slice(0, height);\n\t} else if (height && lines.length < height) {\n\t\tlines = [...lines, ...Array.from({length: height - lines.length}).fill(PAD.repeat(width))];\n\t}\n\n\treturn lines.join(NEWLINE);\n};\n\nconst boxContent = (content, contentWidth, options) => {\n\tconst colorizeBorder = border => {\n\t\tconst newBorder = options.borderColor ? getColorFunction(options.borderColor)(border) : border;\n\t\treturn options.dimBorder ? chalk.dim(newBorder) : newBorder;\n\t};\n\n\tconst colorizeContent = content => options.backgroundColor ? getBGColorFunction(options.backgroundColor)(content) : content;\n\n\tconst chars = getBorderChars(options.borderStyle);\n\tconst columns = terminalColumns();\n\tlet marginLeft = PAD.repeat(options.margin.left);\n\n\tif (options.float === 'center') {\n\t\tconst marginWidth = Math.max((columns - contentWidth - getBorderWidth(options.borderStyle)) / 2, 0);\n\t\tmarginLeft = PAD.repeat(marginWidth);\n\t} else if (options.float === 'right') {\n\t\tconst marginWidth = Math.max(columns - contentWidth - options.margin.right - getBorderWidth(options.borderStyle), 0);\n\t\tmarginLeft = PAD.repeat(marginWidth);\n\t}\n\n\tlet result = '';\n\n\tif (options.margin.top) {\n\t\tresult += NEWLINE.repeat(options.margin.top);\n\t}\n\n\tif (options.borderStyle !== NONE || options.title) {\n\t\tresult += colorizeBorder(marginLeft + chars.topLeft + (options.title ? makeTitle(options.title, chars.top.repeat(contentWidth), options.titleAlignment) : chars.top.repeat(contentWidth)) + chars.topRight) + NEWLINE;\n\t}\n\n\tconst lines = content.split(NEWLINE);\n\n\tresult += lines.map(line => marginLeft + colorizeBorder(chars.left) + colorizeContent(line) + colorizeBorder(chars.right)).join(NEWLINE);\n\n\tif (options.borderStyle !== NONE) {\n\t\tresult += NEWLINE + colorizeBorder(marginLeft + chars.bottomLeft + chars.bottom.repeat(contentWidth) + chars.bottomRight);\n\t}\n\n\tif (options.margin.bottom) {\n\t\tresult += NEWLINE.repeat(options.margin.bottom);\n\t}\n\n\treturn result;\n};\n\nconst sanitizeOptions = options => {\n\t// If fullscreen is enabled, max-out unspecified width/height\n\tif (options.fullscreen && process?.stdout) {\n\t\tlet newDimensions = [process.stdout.columns, process.stdout.rows];\n\n\t\tif (typeof options.fullscreen === 'function') {\n\t\t\tnewDimensions = options.fullscreen(...newDimensions);\n\t\t}\n\n\t\toptions.width ||= newDimensions[0];\n\n\t\toptions.height ||= newDimensions[1];\n\t}\n\n\t// If width is provided, make sure it's not below 1\n\toptions.width &&= Math.max(1, options.width - getBorderWidth(options.borderStyle));\n\n\t// If height is provided, make sure it's not below 1\n\toptions.height &&= Math.max(1, options.height - getBorderWidth(options.borderStyle));\n\n\treturn options;\n};\n\nconst formatTitle = (title, borderStyle) => borderStyle === NONE ? title : ` ${title} `;\n\nconst determineDimensions = (text, options) => {\n\toptions = sanitizeOptions(options);\n\tconst widthOverride = options.width !== undefined;\n\tconst columns = terminalColumns();\n\tconst borderWidth = getBorderWidth(options.borderStyle);\n\tconst maxWidth = columns - options.margin.left - options.margin.right - borderWidth;\n\n\tconst widest = widestLine(wrapAnsi(text, columns - borderWidth, {hard: true, trim: false})) + options.padding.left + options.padding.right;\n\n\t// If title and width are provided, title adheres to fixed width\n\tif (options.title && widthOverride) {\n\t\toptions.title = options.title.slice(0, Math.max(0, options.width - 2));\n\t\toptions.title &&= formatTitle(options.title, options.borderStyle);\n\t} else if (options.title) {\n\t\toptions.title = options.title.slice(0, Math.max(0, maxWidth - 2));\n\n\t\t// Recheck if title isn't empty now\n\t\tif (options.title) {\n\t\t\toptions.title = formatTitle(options.title, options.borderStyle);\n\t\t\t// If the title is larger than content, box adheres to title width\n\t\t\tif (stringWidth(options.title) > widest) {\n\t\t\t\toptions.width = stringWidth(options.title);\n\t\t\t}\n\t\t}\n\t}\n\n\t// If fixed width is provided, use it or content width as reference\n\toptions.width ||= widest;\n\n\tif (!widthOverride) {\n\t\tif ((options.margin.left && options.margin.right) && options.width > maxWidth) {\n\t\t\t// Let's assume we have margins: left = 3, right = 5, in total = 8\n\t\t\tconst spaceForMargins = columns - options.width - borderWidth;\n\t\t\t// Let's assume we have space = 4\n\t\t\tconst multiplier = spaceForMargins / (options.margin.left + options.margin.right);\n\t\t\t// Here: multiplier = 4/8 = 0.5\n\t\t\toptions.margin.left = Math.max(0, Math.floor(options.margin.left * multiplier));\n\t\t\toptions.margin.right = Math.max(0, Math.floor(options.margin.right * multiplier));\n\t\t\t// Left: 3 * 0.5 = 1.5 -> 1\n\t\t\t// Right: 6 * 0.5 = 3\n\t\t}\n\n\t\t// Re-cap width considering the margins after shrinking\n\t\toptions.width = Math.min(options.width, columns - borderWidth - options.margin.left - options.margin.right);\n\t}\n\n\t// Prevent padding overflow\n\tif (options.width - (options.padding.left + options.padding.right) <= 0) {\n\t\toptions.padding.left = 0;\n\t\toptions.padding.right = 0;\n\t}\n\n\tif (options.height && options.height - (options.padding.top + options.padding.bottom) <= 0) {\n\t\toptions.padding.top = 0;\n\t\toptions.padding.bottom = 0;\n\t}\n\n\treturn options;\n};\n\nconst isHex = color => color.match(/^#(?:[0-f]{3}){1,2}$/i);\nconst isColorValid = color => typeof color === 'string' && (chalk[color] ?? isHex(color));\nconst getColorFunction = color => isHex(color) ? chalk.hex(color) : chalk[color];\nconst getBGColorFunction = color => isHex(color) ? chalk.bgHex(color) : chalk[camelCase(['bg', color])];\n\nexport default function boxen(text, options) {\n\toptions = {\n\t\tpadding: 0,\n\t\tborderStyle: 'single',\n\t\tdimBorder: false,\n\t\ttextAlignment: 'left',\n\t\tfloat: 'left',\n\t\ttitleAlignment: 'left',\n\t\t...options,\n\t};\n\n\t// This option is deprecated\n\tif (options.align) {\n\t\toptions.textAlignment = options.align;\n\t}\n\n\tif (options.borderColor && !isColorValid(options.borderColor)) {\n\t\tthrow new Error(`${options.borderColor} is not a valid borderColor`);\n\t}\n\n\tif (options.backgroundColor && !isColorValid(options.backgroundColor)) {\n\t\tthrow new Error(`${options.backgroundColor} is not a valid backgroundColor`);\n\t}\n\n\toptions.padding = getObject(options.padding);\n\toptions.margin = getObject(options.margin);\n\n\toptions = determineDimensions(text, options);\n\n\ttext = makeContentText(text, options);\n\n\treturn boxContent(text, options.width, options);\n}\n\nexport {default as _borderStyles} from 'cli-boxes';\n","import boxen from 'boxen';\nimport chalk from 'chalk';\n\n/**\n * Display the tool banner\n */\nexport function showBanner(command: string, version: string, quiet = false): void {\n if (quiet) {\n return;\n }\n\n const banner = boxen(\n `${chalk.bold.cyan('QTI <-> Learnosity Converter')}\\n` + `${chalk.dim('Version:')} ${version}\\n` + `${chalk.dim('Command:')} ${command}`,\n {\n padding: 1,\n margin: 1,\n borderStyle: 'round',\n borderColor: 'cyan',\n }\n );\n\n console.log(banner);\n}\n","import type { ConfigOptions } from './types.js';\nimport type { Diagnostic, QtiVersion, OutputFormat, DiagnosticsOutput, ItemReferenceSource, ItemFilenameSource } from '@learnosity/converter-core';\nimport { DiagnosticCode } from '@learnosity/converter-core';\n\nconst VALID_QTI_VERSIONS: QtiVersion[] = ['2.1', '2.2'];\nconst VALID_OUTPUT_FORMATS: OutputFormat[] = ['dir', 'zip', 'stdout'];\nconst VALID_DIAGNOSTICS_OUTPUTS: DiagnosticsOutput[] = ['stderr', 'file', 'both', 'none'];\nconst VALID_ITEM_REFERENCE_SOURCES: ItemReferenceSource[] = ['sourceFilename', 'qti', 'uuid'];\nconst VALID_ITEM_FILENAME_SOURCES: ItemFilenameSource[] = ['sourceFilename', 'qti'];\n\nconst KNOWN_CONFIG_KEYS = new Set(['qtiVersion', 'outputFormat', 'diagnostics', 'pretty', 'verbose', 'output', 'organisationId', 'mediaVault', 'customAssetUrl', 'itemReferenceSource', 'itemFilenameSource', 'truncateTags']);\n\n/**\n * Validate config object and return diagnostics\n */\nexport function validateConfig(config: Record<string, unknown>): { valid: ConfigOptions; diagnostics: Diagnostic[] } {\n const diagnostics: Diagnostic[] = [];\n const valid: ConfigOptions = {};\n\n // Check for unknown keys\n for (const key of Object.keys(config)) {\n if (!KNOWN_CONFIG_KEYS.has(key)) {\n diagnostics.push({\n level: 'warning',\n code: DiagnosticCode.CONFIG_UNKNOWN_KEY,\n message: `Unknown config key: \"${key}\"`,\n file: '',\n context: { key },\n });\n }\n }\n\n // Validate qtiVersion\n if ('qtiVersion' in config) {\n if (typeof config.qtiVersion === 'string' && VALID_QTI_VERSIONS.includes(config.qtiVersion as QtiVersion)) {\n valid.qtiVersion = config.qtiVersion as QtiVersion;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid qtiVersion: \"${config.qtiVersion}\". Must be \"2.1\" or \"2.2\".`,\n file: 'qtiVersion',\n });\n }\n }\n\n // Validate outputFormat\n if ('outputFormat' in config) {\n if (typeof config.outputFormat === 'string' && VALID_OUTPUT_FORMATS.includes(config.outputFormat as OutputFormat)) {\n valid.outputFormat = config.outputFormat as OutputFormat;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid outputFormat: \"${config.outputFormat}\". Must be \"dir\", \"zip\", or \"stdout\".`,\n file: 'outputFormat',\n });\n }\n }\n\n // Validate diagnostics\n if ('diagnostics' in config) {\n if (typeof config.diagnostics === 'string' && VALID_DIAGNOSTICS_OUTPUTS.includes(config.diagnostics as DiagnosticsOutput)) {\n valid.diagnostics = config.diagnostics as DiagnosticsOutput;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid diagnostics: \"${config.diagnostics}\". Must be \"stderr\", \"file\", \"both\", or \"none\".`,\n file: 'diagnostics',\n });\n }\n }\n\n // Validate pretty\n if ('pretty' in config) {\n if (typeof config.pretty === 'boolean') {\n valid.pretty = config.pretty;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid pretty: \"${config.pretty}\". Must be boolean.`,\n file: 'pretty',\n });\n }\n }\n\n // Validate verbose\n if ('verbose' in config) {\n if (typeof config.verbose === 'boolean') {\n valid.verbose = config.verbose;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid verbose: \"${config.verbose}\". Must be boolean.`,\n file: 'verbose',\n });\n }\n }\n\n // Validate output\n if ('output' in config) {\n if (typeof config.output === 'string') {\n valid.output = config.output;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid output: \"${config.output}\". Must be string.`,\n file: 'output',\n });\n }\n }\n\n // Validate organisationId\n if ('organisationId' in config) {\n if (typeof config.organisationId === 'number' && Number.isInteger(config.organisationId)) {\n valid.organisationId = config.organisationId;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid organisationId: \"${config.organisationId}\". Must be an integer.`,\n file: 'organisationId',\n });\n }\n }\n\n // Validate mediaVault\n if ('mediaVault' in config) {\n if (typeof config.mediaVault === 'boolean') {\n valid.mediaVault = config.mediaVault;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid mediaVault: \"${config.mediaVault}\". Must be boolean.`,\n file: 'mediaVault',\n });\n }\n }\n\n // Validate customAssetUrl\n if ('customAssetUrl' in config) {\n if (typeof config.customAssetUrl === 'string') {\n valid.customAssetUrl = config.customAssetUrl;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid customAssetUrl: \"${config.customAssetUrl}\". Must be string.`,\n file: 'customAssetUrl',\n });\n }\n }\n\n // Validate itemReferenceSource\n if ('itemReferenceSource' in config) {\n if (typeof config.itemReferenceSource === 'string' && VALID_ITEM_REFERENCE_SOURCES.includes(config.itemReferenceSource as ItemReferenceSource)) {\n valid.itemReferenceSource = config.itemReferenceSource as ItemReferenceSource;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid itemReferenceSource: \"${config.itemReferenceSource}\". Must be \"sourceFilename\", \"qti\", or \"uuid\".`,\n file: 'itemReferenceSource',\n });\n }\n }\n\n // Validate truncateTags\n if ('truncateTags' in config) {\n if (typeof config.truncateTags === 'boolean') {\n valid.truncateTags = config.truncateTags;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid truncateTags: \"${config.truncateTags}\". Must be boolean.`,\n file: 'truncateTags',\n });\n }\n }\n\n // Validate itemFilenameSource\n if ('itemFilenameSource' in config) {\n if (typeof config.itemFilenameSource === 'string' && VALID_ITEM_FILENAME_SOURCES.includes(config.itemFilenameSource as ItemFilenameSource)) {\n valid.itemFilenameSource = config.itemFilenameSource as ItemFilenameSource;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid itemFilenameSource: \"${config.itemFilenameSource}\". Must be \"sourceFilename\" or \"qti\".`,\n file: 'itemFilenameSource',\n });\n }\n }\n\n return { valid, diagnostics };\n}\n","import { readFile, access } from 'fs/promises';\nimport { resolve } from 'path';\nimport type { ConfigOptions } from './types.js';\nimport type { Diagnostic } from '@learnosity/converter-core';\nimport { DiagnosticCode } from '@learnosity/converter-core';\nimport { validateConfig } from './schema.js';\n\nexport interface ConfigLoadResult {\n config: ConfigOptions | null;\n diagnostics: Diagnostic[];\n configPath: string | null;\n}\n\n/**\n * Load config from file path\n */\nexport async function loadConfigFromPath(configPath: string): Promise<ConfigLoadResult> {\n const diagnostics: Diagnostic[] = [];\n\n // configPath is the operator's own --config argument. Resolving it is the\n // intended behaviour: the CLI must be able to load a config from anywhere on\n // the machine the operator can already read.\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const absolutePath = resolve(configPath);\n\n try {\n await access(absolutePath);\n } catch {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_FILE_NOT_FOUND,\n message: `Config file not found: ${absolutePath}`,\n file: '',\n context: { configPath: absolutePath },\n });\n\n return { config: null, diagnostics, configPath: null };\n }\n\n let content: string;\n\n try {\n content = await readFile(absolutePath, 'utf-8');\n } catch (error) {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_FILE_NOT_FOUND,\n message: `Failed to read config file: ${error instanceof Error ? error.message : 'unknown error'}`,\n file: '',\n context: { configPath: absolutePath },\n });\n\n return { config: null, diagnostics, configPath: null };\n }\n\n let parsed: unknown;\n\n try {\n parsed = JSON.parse(content);\n } catch (error) {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_FILE_INVALID_JSON,\n message: `Invalid JSON in config file: ${error instanceof Error ? error.message : 'unknown error'}`,\n file: '',\n context: { configPath: absolutePath },\n });\n\n return { config: null, diagnostics, configPath: null };\n }\n\n if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: 'Config file must be a JSON object',\n file: '',\n context: { configPath: absolutePath },\n });\n\n return { config: null, diagnostics, configPath: null };\n }\n\n const { valid, diagnostics: validationDiagnostics } = validateConfig(\n parsed as Record<string, unknown>\n );\n\n diagnostics.push(...validationDiagnostics);\n\n // If there are errors, don't return config\n const hasErrors = diagnostics.some((d) => d.level === 'error');\n\n if (hasErrors) {\n return { config: null, diagnostics, configPath: null };\n }\n\n diagnostics.push({\n level: 'info',\n code: DiagnosticCode.CONFIG_LOADED,\n message: `Config loaded from ${absolutePath}`,\n file: '',\n context: { configPath: absolutePath },\n });\n\n return { config: valid, diagnostics, configPath: absolutePath };\n}\n\n/**\n * Load config with discovery (default path or explicit)\n */\nexport async function loadConfig(\n explicitPath?: string,\n noConfig?: boolean\n): Promise<ConfigLoadResult> {\n const diagnostics: Diagnostic[] = [];\n\n // If --no-config, return early\n if (noConfig) {\n diagnostics.push({\n level: 'info',\n code: DiagnosticCode.CONFIG_DISABLED,\n message: 'Config loading disabled via --no-config',\n file: '',\n });\n\n return { config: null, diagnostics, configPath: null };\n }\n\n // If explicit path provided, load it\n if (explicitPath) {\n return loadConfigFromPath(explicitPath);\n }\n\n // Try default path\n const defaultPath = resolve(process.cwd(), 'lrn-converter.config.json');\n\n try {\n await access(defaultPath);\n\n return loadConfigFromPath(defaultPath);\n } catch {\n // Default config doesn't exist, that's fine\n return { config: null, diagnostics: [], configPath: null };\n }\n}\n","import { homedir } from 'os';\n\n/**\n * Expand tilde (~) to home directory in paths.\n *\n * Handles:\n * - `~/path` → `/home/user/path`\n * - `~` → `/home/user`\n *\n * Does NOT handle `~username/path` syntax (returns unchanged).\n *\n * @param filePath - The file path that may contain a tilde\n * @returns The path with tilde expanded to home directory\n */\nexport function expandTilde(filePath: string): string {\n if (filePath.startsWith('~/')) {\n return filePath.replace('~', homedir());\n }\n if (filePath === '~') {\n return homedir();\n }\n\n return filePath;\n}\n\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"mappings":";;;;;;;;;;AACA,MAAM,aAAa,EACf,uBAAuB,OAC3B;AACA,IAAA,eAAe,cAAc,QAAQ,SAAS;CAC1C,MAAM,EAAE,UAAU,UAAU;CAC5B,MAAM,QAAQ,UAAU,YAAY,OAAO,KAAK;CAChD,MAAM,CAAC,QAAQ,aAAa,SAAS,MAAM;CAG3C,MAAM,CA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CAAC;GAAG,YAAY;EAAK;CAC7D;AACJ;;;;;;;;;;;;;;;AClIA,SAAgB,YAAY,UAA0B;CAClD,IAAI,SAAS,WAAW,IAAI,GACxB,OAAO,SAAS,QAAQ,KAAK,QAAQ,CAAC;CAE1C,IAAI,aAAa,KACb,OAAO,QAAQ;CAGnB,OAAO;AACX"}
|
package/packages/cli/dist/{qtiPackageToLearnosity-hT4QZ7YX.js → qtiPackageToLearnosity-FhfNr7gf.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as formatDiagnosticsTable, s as writeDiagnostics } from "./table-
|
|
3
|
-
import { n as processQtiPackageToLearnosity } from "./batchProcessors-
|
|
1
|
+
import { c as dist_default, n as loadConfig, r as showBanner, t as expandTilde } from "./pathUtils-DmtCfutO.js";
|
|
2
|
+
import { r as formatDiagnosticsTable, s as writeDiagnostics } from "./table-7b-8MN2z.js";
|
|
3
|
+
import { i as loadPackageDirectory, l as convertQtiPackageToLearnosityBundle, n as processQtiPackageToLearnosity, o as writeLearnosityBundle } from "./batchProcessors-CUJoQD8a.js";
|
|
4
|
+
import { t as nodeFileAccess } from "./nodeFileAccess-BhCoGDOi.js";
|
|
4
5
|
import { i as processBatchParallel, n as displayConfiguration, r as processBatch, t as configField } from "./configOutput-FwkFyQmk.js";
|
|
5
6
|
import { existsSync, readFileSync, statSync } from "fs";
|
|
6
|
-
import { convertQtiPackageToLearnosityBundle, loadPackageDirectory, nodeFileAccess, writeLearnosityBundle } from "@learnosity/converter-core/node";
|
|
7
7
|
//#region src/commands/qtiPackageToLearnosity.ts
|
|
8
8
|
/**
|
|
9
9
|
* Register qti-package-to-learnosity command
|
|
@@ -351,4 +351,4 @@ async function executeBatchQtiPackageToLearnosity(opts) {
|
|
|
351
351
|
//#endregion
|
|
352
352
|
export { registerQtiPackageToLearnosityCommand };
|
|
353
353
|
|
|
354
|
-
//# sourceMappingURL=qtiPackageToLearnosity-
|
|
354
|
+
//# sourceMappingURL=qtiPackageToLearnosity-FhfNr7gf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qtiPackageToLearnosity-hT4QZ7YX.js","names":["input"],"sources":["../src/commands/qtiPackageToLearnosity.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Command } from 'commander';\nimport type {\n Diagnostic,\n ItemFilenameSource,\n ItemReferenceSource,\n} from '@learnosity/converter-core';\nimport {\n convertQtiPackageToLearnosityBundle,\n writeLearnosityBundle,\n loadPackageDirectory,\n nodeFileAccess,\n} from '@learnosity/converter-core/node';\nimport { existsSync, statSync, readFileSync } from 'fs';\nimport { input } from '@inquirer/prompts';\nimport { writeDiagnostics, type WriteDiagnosticsOptions } from '../io/writeDiagnostics.js';\nimport { showBanner } from '../ux/banner.js';\nimport { formatDiagnosticsTable } from '../ux/table.js';\nimport type { CliOptions } from '../options/types.js';\nimport { loadConfig } from '../options/loadConfig.js';\nimport { expandTilde } from '../utils/pathUtils.js';\nimport { processBatch, processBatchParallel } from '../utils/batchProcessing.js';\nimport { processQtiPackageToLearnosity } from '../utils/batchProcessors.js';\nimport { displayConfiguration, configField } from '../utils/configOutput.js';\n\n/**\n * Register qti-package-to-learnosity command\n */\nexport function registerQtiPackageToLearnosityCommand(program: Command, version: string): void {\n program\n .command('qti-package-to-learnosity')\n .alias('convert qti-package')\n .description('Convert a QTI Content Package to a Learnosity bundle')\n .option('--in <path>', 'Input package path (.zip or directory)')\n .option('--out <path>', 'Output bundle path (.zip or directory)')\n .option(\n '--format <type>',\n 'Output format: zip or dir (default: auto-detect from --out path)'\n )\n .option(\n '--organisation_id <number>',\n 'Organisation ID for Learnosity CDN asset URLs',\n parseInt\n )\n .option('--org_id <number>', 'Alias for --organisation_id', parseInt)\n .option('--mediavault', 'Use media-vault subdomain instead of assets (default: false)')\n .option(\n '--custom-asset-url <url>',\n 'Custom asset URL prefix to override default Learnosity CDN'\n )\n .option(\n '--item-reference-source <source>',\n 'How to generate item references: sourceFilename (default), qti (identifier), or uuid'\n )\n .option(\n '--item-filename-source <source>',\n 'How to name output JSON files: sourceFilename or qti (default: same as --item-reference-source)'\n )\n .option(\n '--truncate-tags',\n 'Truncate tag types and names to 255 characters instead of failing (default: false)'\n )\n .option('--recursive', 'Process all subdirectories in the input path (default: false)')\n .option(\n '--concurrency <number>',\n 'Worker threads for --recursive batch conversion (default: 1 = serial)',\n parseInt\n )\n .option('--diagnostics <mode>', 'Diagnostics output (stderr|file|both|none, default: file)')\n .option('--fail-on-warn', 'Exit with error code 1 if warnings exist (default: false)')\n .option('--config <path>', 'Path to config file')\n .option('--no-config', 'Disable config file loading')\n .option('-i, --interactive', 'Enable interactive prompts (default: false)')\n .option('--verbose', 'Show INFO level diagnostics in table (default: false)')\n .option('-q, --quiet', 'Suppress non-essential output (default: false)')\n .action(async (opts: CliOptions) => {\n await executeQtiPackageToLearnosity(opts, version);\n });\n}\n\n/**\n * Write diagnostics to file and/or stderr depending on mode\n */\nasync function outputDiagnostics(\n allDiagnostics: Diagnostic[],\n diagnosticsMode: string,\n verbose: boolean,\n diagnosticsPath: string,\n outputPath: string,\n metadata: WriteDiagnosticsOptions\n): Promise<void> {\n if (diagnosticsMode === 'file' || diagnosticsMode === 'both') {\n await writeDiagnostics(\n allDiagnostics,\n 'file',\n diagnosticsPath,\n outputPath,\n false,\n metadata\n );\n }\n\n if (diagnosticsMode === 'stderr' || diagnosticsMode === 'both') {\n const table = formatDiagnosticsTable(allDiagnostics, verbose);\n\n if (table) {\n console.error(table);\n }\n }\n}\n\n/**\n * Resolve an interactive or CLI-provided path option\n * Returns the expanded path or exits with an error.\n */\nasync function resolvePathOption(\n value: string | undefined,\n interactive: boolean,\n promptMessage: string,\n errorMessage: string\n): Promise<string> {\n let resolved = value;\n\n if (!resolved && interactive) {\n resolved = await input({ message: promptMessage });\n }\n\n if (!resolved) {\n console.error(errorMessage);\n process.exit(1);\n }\n\n return expandTilde(resolved);\n}\n\n/**\n * Parse the --diagnostics CLI option into mode and optional custom path\n */\nfunction resolveDiagnosticsConfig(diagnosticsOpt: string | undefined): {\n mode: 'file' | 'stderr' | 'both' | 'none';\n customPath?: string;\n} {\n const validModes = ['stderr', 'file', 'both', 'none'] as const;\n\n if (!diagnosticsOpt || validModes.includes(diagnosticsOpt as any)) {\n return { mode: (diagnosticsOpt as (typeof validModes)[number]) ?? 'file' };\n }\n\n return { mode: 'file', customPath: diagnosticsOpt };\n}\n\n/**\n * Resolve organisation ID from CLI options with optional interactive prompt\n */\nasync function resolveOrganisationId(\n cliOpts: CliOptions,\n interactive: boolean,\n configOrgId?: number\n): Promise<number> {\n let organisationId = (cliOpts as any).organisation_id ?? (cliOpts as any).org_id ?? configOrgId;\n\n if (organisationId === undefined && interactive) {\n const orgIdInput = await input({\n message: 'Organisation ID for Learnosity CDN asset URLs:',\n });\n\n organisationId = orgIdInput ? parseInt(orgIdInput, 10) : undefined;\n }\n\n if (organisationId === undefined || organisationId === null) {\n console.error(\n 'Error: --organisation_id is required. Use -i or --interactive for prompts or specify --organisation_id <number>'\n );\n process.exit(1);\n }\n\n return organisationId;\n}\n\n/**\n * Validate input path exists and determine its type\n */\nfunction validateInputPath(inputPath: string): { isZipInput: boolean } {\n if (!existsSync(inputPath)) {\n console.error(`Error: Input not found: ${inputPath}`);\n process.exit(1);\n }\n\n const isZipInput = inputPath.toLowerCase().endsWith('.zip');\n\n if (!isZipInput && !statSync(inputPath).isDirectory()) {\n console.error(`Error: Input must be a directory or .zip file: ${inputPath}`);\n process.exit(1);\n }\n\n return { isZipInput };\n}\n\n/**\n * Resolve output format (zip or directory) from path and explicit format option\n */\nfunction resolveOutputFormat(\n outputPath: string,\n formatOption?: string\n): { isZipOutput: boolean; finalOutputPath: string } {\n if (formatOption) {\n const fmt = formatOption.toLowerCase();\n\n if (fmt !== 'zip' && fmt !== 'dir') {\n console.error('Error: --format must be \"zip\" or \"dir\"');\n process.exit(1);\n }\n\n const isZipOutput = fmt === 'zip';\n const finalOutputPath =\n isZipOutput && !outputPath.toLowerCase().endsWith('.zip')\n ? `${outputPath}.zip`\n : outputPath;\n\n return { isZipOutput, finalOutputPath };\n }\n\n return {\n isZipOutput: outputPath.toLowerCase().endsWith('.zip'),\n finalOutputPath: outputPath,\n };\n}\n\n/**\n * Display conversion progress for activities and items\n */\nfunction displayConversionProgress(convertResult: any): void {\n const convertedActivityFiles = convertResult.convertedActivityFiles || [];\n\n if (convertedActivityFiles.length > 0) {\n process.stderr.write(' Assessment tests:\\n');\n convertedActivityFiles.forEach((sourceFile: string, index: number) => {\n process.stderr.write(\n ` [${index + 1}/${convertedActivityFiles.length}] ${sourceFile} \\x1b[32m✓\\x1b[0m\\n`\n );\n });\n process.stderr.write('\\n');\n }\n\n const convertedFiles = convertResult.convertedSourceFiles || [];\n const failedFiles = convertResult.failedSourceFiles || [];\n const totalFiles = convertedFiles.length + failedFiles.length;\n\n if (totalFiles > 0) {\n process.stderr.write(' Assessment items:\\n');\n const successSet = new Set(convertedFiles);\n const allFiles = [...convertedFiles, ...failedFiles].sort();\n\n allFiles.forEach((sourceFile: string, index: number) => {\n const isSuccess = successSet.has(sourceFile);\n const status = isSuccess ? '\\x1b[32m✓\\x1b[0m' : '\\x1b[31m✗\\x1b[0m';\n\n process.stderr.write(` [${index + 1}/${totalFiles}] ${sourceFile} ${status}\\n`);\n });\n\n if (failedFiles.length > 0) {\n process.stderr.write(\n `\\nConversion completed with ERRORS (${convertedFiles.length} succeeded, ${failedFiles.length} failed)\\n`\n );\n process.stderr.write(\n `Proceeding with ${convertedFiles.length} successfully converted items...\\n\\n`\n );\n } else {\n process.stderr.write(`\\nConverted ${convertedFiles.length} items ✓\\n\\n`);\n }\n }\n}\n\n/**\n * Build metadata object for diagnostics output\n */\nfunction buildDiagnosticsMetadata(\n inputPath: string,\n outputPath: string,\n convertResult: any,\n failed: boolean\n): WriteDiagnosticsOptions {\n const convertedFiles = convertResult.convertedSourceFiles || [];\n const failedFiles = convertResult.failedSourceFiles || [];\n const convertedActivityFiles = convertResult.convertedActivityFiles || [];\n const itemRefs = convertResult.bundle\n ? (Array.from(convertResult.bundle.items.keys()) as string[])\n : [];\n\n return {\n inputPath,\n outputPath,\n totalItemsFound: failed ? itemRefs.length : convertedFiles.length + failedFiles.length,\n totalActivitiesFound: convertedActivityFiles.length,\n convertedFiles: failed ? [] : convertedFiles,\n failedFiles: failed ? itemRefs.map((ref: string) => `items/${ref}.xml`) : failedFiles,\n convertedActivities: convertedActivityFiles,\n };\n}\n\n/**\n * Execute qti-package-to-learnosity conversion\n */\nasync function executeQtiPackageToLearnosity(cliOpts: CliOptions, version: string): Promise<void> {\n const allDiagnostics: Diagnostic[] = [];\n const startTime = Date.now();\n const quiet = cliOpts.quiet ?? false;\n\n try {\n showBanner('qti-package-to-learnosity', version, quiet);\n\n const interactive = cliOpts.interactive ?? false;\n\n // Load config file (CLI flags take precedence over config values)\n const { config, diagnostics: configDiagnostics } = await loadConfig(\n cliOpts.config,\n cliOpts.noConfig\n );\n\n allDiagnostics.push(...configDiagnostics);\n\n if (configDiagnostics.some((d) => d.level === 'error')) {\n console.log('\\n' + formatDiagnosticsTable(configDiagnostics));\n process.exit(1);\n\n return;\n }\n\n const inputPath = await resolvePathOption(\n cliOpts.in,\n interactive,\n 'Input QTI package path (.zip or directory):',\n 'Error: --in is required. Use -i or --interactive for prompts or specify --in <path>'\n );\n\n const outputPath = await resolvePathOption(\n cliOpts.out,\n interactive,\n 'Output bundle path (.zip or directory):',\n 'Error: --out is required. Use -i or --interactive for prompts or specify --out <path>'\n );\n\n const failOnWarn = cliOpts.failOnWarn ?? false;\n const verbose = cliOpts.verbose ?? config?.verbose ?? false;\n const { mode: diagnosticsMode, customPath: customDiagnosticsPath } =\n resolveDiagnosticsConfig(cliOpts.diagnostics ?? config?.diagnostics);\n const organisationId = await resolveOrganisationId(\n cliOpts,\n interactive,\n config?.organisationId\n );\n const mediaVault = (cliOpts as any).mediavault ?? config?.mediaVault ?? false;\n const customAssetUrl = (cliOpts as any).customAssetUrl ?? config?.customAssetUrl;\n const itemReferenceSource =\n (cliOpts as any).itemReferenceSource ?? config?.itemReferenceSource;\n const itemFilenameSource =\n (cliOpts as any).itemFilenameSource ?? config?.itemFilenameSource;\n const truncateTags = (cliOpts as any).truncateTags ?? config?.truncateTags ?? false;\n\n const { isZipInput } = validateInputPath(inputPath);\n\n // Handle recursive batch processing\n if ((cliOpts as any).recursive) {\n if (isZipInput) {\n console.error(\n 'Error: --recursive flag cannot be used with ZIP input. Please provide a directory containing subdirectories.'\n );\n process.exit(1);\n\n return;\n }\n\n await executeBatchQtiPackageToLearnosity({\n inputPath,\n outputPath,\n organisationId,\n mediaVault,\n customAssetUrl,\n itemReferenceSource,\n itemFilenameSource,\n truncateTags,\n diagnosticsMode,\n failOnWarn,\n verbose,\n quiet,\n version,\n concurrency: cliOpts.concurrency ?? 1,\n });\n\n return;\n }\n\n const { isZipOutput, finalOutputPath } = resolveOutputFormat(outputPath, cliOpts.format);\n\n if (!quiet) {\n displayConfiguration(\n [\n configField('Input:', inputPath),\n configField('Output:', finalOutputPath),\n configField('Format:', isZipOutput ? 'ZIP' : 'directory'),\n configField('Diagnostics:', diagnosticsMode),\n configField('Org ID:', organisationId),\n configField('Media vault:', mediaVault),\n configField('Item ref src:', itemReferenceSource ?? 'sourceFilename (default)'),\n configField('Item filename:', itemFilenameSource ?? 'same as item ref src'),\n configField('Verbose:', verbose),\n configField('Fail on warn:', failOnWarn),\n ],\n { quiet }\n );\n }\n\n // Step 1: Convert package to bundle model\n process.stderr.write('Converting QTI package...\\n');\n\n const convertOpts = {\n organisationId,\n mediaVault,\n customAssetUrl,\n itemReferenceSource,\n itemFilenameSource,\n truncateTags,\n packageVersion: version,\n };\n let convertResult;\n\n if (isZipInput) {\n convertResult = convertQtiPackageToLearnosityBundle(\n { zipBytes: new Uint8Array(readFileSync(inputPath)) },\n convertOpts\n );\n } else {\n const loaded = loadPackageDirectory(inputPath);\n\n convertResult = loaded.entries\n ? convertQtiPackageToLearnosityBundle(\n { entries: loaded.entries },\n { ...convertOpts, sourceDir: inputPath, fileAccess: nodeFileAccess }\n )\n : { diagnostics: loaded.diagnostics };\n }\n\n allDiagnostics.push(...convertResult.diagnostics);\n\n displayConversionProgress(convertResult);\n\n const getDiagPath = () =>\n customDiagnosticsPath ||\n (isZipOutput\n ? finalOutputPath.replace(/\\.zip$/i, '-diagnostics.json')\n : `${finalOutputPath.replace(/\\/$/, '')}/diagnostics.json`);\n\n // Check for critical errors\n const errors = allDiagnostics.filter((d) => d.level === 'error');\n const warnings = allDiagnostics.filter((d) => d.level === 'warning');\n const hasValidBundle = convertResult.bundle && convertResult.bundle.items.size > 0;\n\n if (errors.length > 0 && !hasValidBundle) {\n process.stderr.write('\\nConversion FAILED with errors\\n\\n');\n await outputDiagnostics(\n allDiagnostics,\n diagnosticsMode,\n verbose,\n getDiagPath(),\n finalOutputPath,\n buildDiagnosticsMetadata(inputPath, finalOutputPath, convertResult, true)\n );\n process.exit(1);\n\n return;\n }\n\n if (failOnWarn && warnings.length > 0) {\n process.stderr.write('\\nConversion completed with WARNINGS (fail-on-warn mode)\\n\\n');\n await outputDiagnostics(\n allDiagnostics,\n diagnosticsMode,\n verbose,\n getDiagPath(),\n finalOutputPath,\n buildDiagnosticsMetadata(\n inputPath,\n finalOutputPath,\n convertResult,\n errors.length > 0\n )\n );\n process.exit(1);\n\n return;\n }\n\n if (!convertResult.bundle) {\n process.stderr.write('\\nConversion FAILED: no bundle generated\\n\\n');\n await outputDiagnostics(\n allDiagnostics,\n diagnosticsMode,\n verbose,\n getDiagPath(),\n finalOutputPath,\n {\n inputPath,\n outputPath: finalOutputPath,\n totalItemsFound: 0,\n convertedFiles: [],\n failedFiles: [],\n }\n );\n process.exit(1);\n\n return;\n }\n\n // Step 2: Write bundle to directory or ZIP\n process.stderr.write(`Writing ${isZipOutput ? 'ZIP' : 'directory'} package... `);\n const writeResult = await writeLearnosityBundle(convertResult.bundle, {\n outDir: finalOutputPath,\n isZipOutput,\n });\n\n allDiagnostics.push(...writeResult.diagnostics);\n\n if (writeResult.diagnostics.some((d) => d.level === 'error')) {\n process.stderr.write('FAILED\\n\\n');\n await outputDiagnostics(\n allDiagnostics,\n diagnosticsMode,\n verbose,\n getDiagPath(),\n outputPath,\n buildDiagnosticsMetadata(inputPath, outputPath, convertResult, true)\n );\n process.exit(1);\n\n return;\n }\n\n process.stderr.write('✓\\n');\n\n // Step 3: Write final diagnostics on success\n const successMetadata = buildDiagnosticsMetadata(\n inputPath,\n finalOutputPath,\n convertResult,\n false\n );\n\n if (diagnosticsMode === 'file' || diagnosticsMode === 'both') {\n const diagnosticsPath = getDiagPath();\n\n process.stderr.write(`Writing diagnostics to ${diagnosticsPath}... `);\n await outputDiagnostics(\n allDiagnostics,\n 'file',\n verbose,\n diagnosticsPath,\n finalOutputPath,\n successMetadata\n );\n process.stderr.write('✓\\n');\n }\n\n if (diagnosticsMode === 'stderr' || diagnosticsMode === 'both') {\n await outputDiagnostics(\n allDiagnostics,\n 'stderr',\n verbose,\n getDiagPath(),\n finalOutputPath,\n successMetadata\n );\n }\n\n const elapsedTime = ((Date.now() - startTime) / 1000).toFixed(1);\n\n process.stderr.write(`\\nCompleted in ${elapsedTime}s\\n`);\n\n const failedFiles = convertResult.failedSourceFiles || [];\n\n if (failedFiles.length > 0) {\n process.stderr.write(\n `\\nPackage written with ${failedFiles.length} item(s) skipped due to errors\\n`\n );\n }\n\n process.exit(0);\n } catch (error) {\n if (error instanceof Error && error.name === 'ExitPromptError') {\n process.exit(130);\n }\n console.error('\\n' + (error instanceof Error ? error.message : 'Unknown error'));\n process.exit(1);\n }\n}\n\n/**\n * Execute batch QTI package to Learnosity conversion for multiple subdirectories\n */\nasync function executeBatchQtiPackageToLearnosity(opts: {\n inputPath: string;\n outputPath: string;\n organisationId: number;\n mediaVault: boolean;\n customAssetUrl?: string;\n itemReferenceSource?: ItemReferenceSource;\n itemFilenameSource?: ItemFilenameSource;\n truncateTags: boolean;\n diagnosticsMode: string;\n failOnWarn: boolean;\n verbose: boolean;\n quiet: boolean;\n version: string;\n concurrency: number;\n}): Promise<void> {\n const {\n inputPath,\n outputPath,\n organisationId,\n mediaVault,\n customAssetUrl,\n itemReferenceSource,\n itemFilenameSource,\n truncateTags,\n diagnosticsMode,\n failOnWarn,\n verbose,\n quiet,\n version,\n concurrency,\n } = opts;\n\n if (concurrency > 1) {\n await processBatchParallel({\n inputPath,\n outputPath,\n packageType: 'qti',\n direction: 'qti-to-learnosity',\n options: {\n organisationId,\n mediaVault,\n customAssetUrl,\n itemReferenceSource,\n itemFilenameSource,\n truncateTags,\n version,\n },\n concurrency,\n quiet,\n });\n\n return;\n }\n\n // Display configuration\n displayConfiguration(\n [\n configField('Input:', inputPath),\n configField('Output:', outputPath),\n configField('Format:', 'directory'),\n configField('Diagnostics:', diagnosticsMode),\n configField('Org ID:', organisationId),\n configField('Media vault:', mediaVault),\n configField('Item ref src:', itemReferenceSource ?? 'sourceFilename (default)'),\n configField('Item filename:', itemFilenameSource ?? 'same as item ref src'),\n configField('Truncate tags:', truncateTags),\n configField('Recursive:', true),\n configField('Verbose:', verbose),\n configField('Fail on warn:', failOnWarn),\n ],\n { quiet }\n );\n\n if (!quiet) {\n console.log('🔄 Batch Processing Mode');\n console.log(`Scanning: ${inputPath}\\n`);\n }\n\n // Use generic batch processor\n await processBatch({\n inputPath,\n outputPath,\n packageType: 'qti',\n options: opts,\n quiet,\n processPackage: (pkg, packageOutputPath, options) =>\n processQtiPackageToLearnosity(pkg, packageOutputPath, options, quiet),\n });\n}\n"],"mappings":";;;;;;;;;;AA6BA,SAAgB,sCAAsC,SAAkB,SAAuB;CAC3F,QACK,QAAQ,2BAA2B,CAAC,CACpC,MAAM,qBAAqB,CAAC,CAC5B,YAAY,sDAAsD,CAAC,CACnE,OAAO,eAAe,wCAAwC,CAAC,CAC/D,OAAO,gBAAgB,wCAAwC,CAAC,CAChE,OACG,mBACA,kEACJ,CAAC,CACA,OACG,8BACA,iDACA,QACJ,CA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AAiB,uBAAuB,0BAA0B;EAC9E,YAAY,kBAAkB,sBAAsB,sBAAsB;EAC1E,YAAY,kBAAkB,YAAY;EAC1C,YAAY,cAAc,IAAI;EAC9B,YAAY,YAAY,OAAO;EAC/B,YAAY,iBAAiB,UAAU;CAC3C,GACA,EAAE,MAAM,CACZ;CAEA,IAAI,CAAC,OAAO;EACR,QAAQ,IAAI,0BAA0B;EACtC,QAAQ,IAAI,aAAa,UAAU,GAAG;CAC1C;CAGA,MAAM,aAAa;EACf;EACA;EACA,aAAa;EACb,SAAS;EACT;EACA,iBAAiB,KAAK,mBAAmB,YACrC,8BAA8B,KAAK,mBAAmB,SAAS,KAAK;CAC5E,CAAC;AACL"}
|
|
1
|
+
{"version":3,"file":"qtiPackageToLearnosity-FhfNr7gf.js","names":["input"],"sources":["../src/commands/qtiPackageToLearnosity.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Command } from 'commander';\nimport type {\n Diagnostic,\n ItemFilenameSource,\n ItemReferenceSource,\n} from '@learnosity/converter-core';\nimport {\n convertQtiPackageToLearnosityBundle,\n writeLearnosityBundle,\n loadPackageDirectory,\n nodeFileAccess,\n} from '@learnosity/converter-core/node';\nimport { existsSync, statSync, readFileSync } from 'fs';\nimport { input } from '@inquirer/prompts';\nimport { writeDiagnostics, type WriteDiagnosticsOptions } from '../io/writeDiagnostics.js';\nimport { showBanner } from '../ux/banner.js';\nimport { formatDiagnosticsTable } from '../ux/table.js';\nimport type { CliOptions } from '../options/types.js';\nimport { loadConfig } from '../options/loadConfig.js';\nimport { expandTilde } from '../utils/pathUtils.js';\nimport { processBatch, processBatchParallel } from '../utils/batchProcessing.js';\nimport { processQtiPackageToLearnosity } from '../utils/batchProcessors.js';\nimport { displayConfiguration, configField } from '../utils/configOutput.js';\n\n/**\n * Register qti-package-to-learnosity command\n */\nexport function registerQtiPackageToLearnosityCommand(program: Command, version: string): void {\n program\n .command('qti-package-to-learnosity')\n .alias('convert qti-package')\n .description('Convert a QTI Content Package to a Learnosity bundle')\n .option('--in <path>', 'Input package path (.zip or directory)')\n .option('--out <path>', 'Output bundle path (.zip or directory)')\n .option(\n '--format <type>',\n 'Output format: zip or dir (default: auto-detect from --out path)'\n )\n .option(\n '--organisation_id <number>',\n 'Organisation ID for Learnosity CDN asset URLs',\n parseInt\n )\n .option('--org_id <number>', 'Alias for --organisation_id', parseInt)\n .option('--mediavault', 'Use media-vault subdomain instead of assets (default: false)')\n .option(\n '--custom-asset-url <url>',\n 'Custom asset URL prefix to override default Learnosity CDN'\n )\n .option(\n '--item-reference-source <source>',\n 'How to generate item references: sourceFilename (default), qti (identifier), or uuid'\n )\n .option(\n '--item-filename-source <source>',\n 'How to name output JSON files: sourceFilename or qti (default: same as --item-reference-source)'\n )\n .option(\n '--truncate-tags',\n 'Truncate tag types and names to 255 characters instead of failing (default: false)'\n )\n .option('--recursive', 'Process all subdirectories in the input path (default: false)')\n .option(\n '--concurrency <number>',\n 'Worker threads for --recursive batch conversion (default: 1 = serial)',\n parseInt\n )\n .option('--diagnostics <mode>', 'Diagnostics output (stderr|file|both|none, default: file)')\n .option('--fail-on-warn', 'Exit with error code 1 if warnings exist (default: false)')\n .option('--config <path>', 'Path to config file')\n .option('--no-config', 'Disable config file loading')\n .option('-i, --interactive', 'Enable interactive prompts (default: false)')\n .option('--verbose', 'Show INFO level diagnostics in table (default: false)')\n .option('-q, --quiet', 'Suppress non-essential output (default: false)')\n .action(async (opts: CliOptions) => {\n await executeQtiPackageToLearnosity(opts, version);\n });\n}\n\n/**\n * Write diagnostics to file and/or stderr depending on mode\n */\nasync function outputDiagnostics(\n allDiagnostics: Diagnostic[],\n diagnosticsMode: string,\n verbose: boolean,\n diagnosticsPath: string,\n outputPath: string,\n metadata: WriteDiagnosticsOptions\n): Promise<void> {\n if (diagnosticsMode === 'file' || diagnosticsMode === 'both') {\n await writeDiagnostics(\n allDiagnostics,\n 'file',\n diagnosticsPath,\n outputPath,\n false,\n metadata\n );\n }\n\n if (diagnosticsMode === 'stderr' || diagnosticsMode === 'both') {\n const table = formatDiagnosticsTable(allDiagnostics, verbose);\n\n if (table) {\n console.error(table);\n }\n }\n}\n\n/**\n * Resolve an interactive or CLI-provided path option\n * Returns the expanded path or exits with an error.\n */\nasync function resolvePathOption(\n value: string | undefined,\n interactive: boolean,\n promptMessage: string,\n errorMessage: string\n): Promise<string> {\n let resolved = value;\n\n if (!resolved && interactive) {\n resolved = await input({ message: promptMessage });\n }\n\n if (!resolved) {\n console.error(errorMessage);\n process.exit(1);\n }\n\n return expandTilde(resolved);\n}\n\n/**\n * Parse the --diagnostics CLI option into mode and optional custom path\n */\nfunction resolveDiagnosticsConfig(diagnosticsOpt: string | undefined): {\n mode: 'file' | 'stderr' | 'both' | 'none';\n customPath?: string;\n} {\n const validModes = ['stderr', 'file', 'both', 'none'] as const;\n\n if (!diagnosticsOpt || validModes.includes(diagnosticsOpt as any)) {\n return { mode: (diagnosticsOpt as (typeof validModes)[number]) ?? 'file' };\n }\n\n return { mode: 'file', customPath: diagnosticsOpt };\n}\n\n/**\n * Resolve organisation ID from CLI options with optional interactive prompt\n */\nasync function resolveOrganisationId(\n cliOpts: CliOptions,\n interactive: boolean,\n configOrgId?: number\n): Promise<number> {\n let organisationId = (cliOpts as any).organisation_id ?? (cliOpts as any).org_id ?? configOrgId;\n\n if (organisationId === undefined && interactive) {\n const orgIdInput = await input({\n message: 'Organisation ID for Learnosity CDN asset URLs:',\n });\n\n organisationId = orgIdInput ? parseInt(orgIdInput, 10) : undefined;\n }\n\n if (organisationId === undefined || organisationId === null) {\n console.error(\n 'Error: --organisation_id is required. Use -i or --interactive for prompts or specify --organisation_id <number>'\n );\n process.exit(1);\n }\n\n return organisationId;\n}\n\n/**\n * Validate input path exists and determine its type\n */\nfunction validateInputPath(inputPath: string): { isZipInput: boolean } {\n if (!existsSync(inputPath)) {\n console.error(`Error: Input not found: ${inputPath}`);\n process.exit(1);\n }\n\n const isZipInput = inputPath.toLowerCase().endsWith('.zip');\n\n if (!isZipInput && !statSync(inputPath).isDirectory()) {\n console.error(`Error: Input must be a directory or .zip file: ${inputPath}`);\n process.exit(1);\n }\n\n return { isZipInput };\n}\n\n/**\n * Resolve output format (zip or directory) from path and explicit format option\n */\nfunction resolveOutputFormat(\n outputPath: string,\n formatOption?: string\n): { isZipOutput: boolean; finalOutputPath: string } {\n if (formatOption) {\n const fmt = formatOption.toLowerCase();\n\n if (fmt !== 'zip' && fmt !== 'dir') {\n console.error('Error: --format must be \"zip\" or \"dir\"');\n process.exit(1);\n }\n\n const isZipOutput = fmt === 'zip';\n const finalOutputPath =\n isZipOutput && !outputPath.toLowerCase().endsWith('.zip')\n ? `${outputPath}.zip`\n : outputPath;\n\n return { isZipOutput, finalOutputPath };\n }\n\n return {\n isZipOutput: outputPath.toLowerCase().endsWith('.zip'),\n finalOutputPath: outputPath,\n };\n}\n\n/**\n * Display conversion progress for activities and items\n */\nfunction displayConversionProgress(convertResult: any): void {\n const convertedActivityFiles = convertResult.convertedActivityFiles || [];\n\n if (convertedActivityFiles.length > 0) {\n process.stderr.write(' Assessment tests:\\n');\n convertedActivityFiles.forEach((sourceFile: string, index: number) => {\n process.stderr.write(\n ` [${index + 1}/${convertedActivityFiles.length}] ${sourceFile} \\x1b[32m✓\\x1b[0m\\n`\n );\n });\n process.stderr.write('\\n');\n }\n\n const convertedFiles = convertResult.convertedSourceFiles || [];\n const failedFiles = convertResult.failedSourceFiles || [];\n const totalFiles = convertedFiles.length + failedFiles.length;\n\n if (totalFiles > 0) {\n process.stderr.write(' Assessment items:\\n');\n const successSet = new Set(convertedFiles);\n const allFiles = [...convertedFiles, ...failedFiles].sort();\n\n allFiles.forEach((sourceFile: string, index: number) => {\n const isSuccess = successSet.has(sourceFile);\n const status = isSuccess ? '\\x1b[32m✓\\x1b[0m' : '\\x1b[31m✗\\x1b[0m';\n\n process.stderr.write(` [${index + 1}/${totalFiles}] ${sourceFile} ${status}\\n`);\n });\n\n if (failedFiles.length > 0) {\n process.stderr.write(\n `\\nConversion completed with ERRORS (${convertedFiles.length} succeeded, ${failedFiles.length} failed)\\n`\n );\n process.stderr.write(\n `Proceeding with ${convertedFiles.length} successfully converted items...\\n\\n`\n );\n } else {\n process.stderr.write(`\\nConverted ${convertedFiles.length} items ✓\\n\\n`);\n }\n }\n}\n\n/**\n * Build metadata object for diagnostics output\n */\nfunction buildDiagnosticsMetadata(\n inputPath: string,\n outputPath: string,\n convertResult: any,\n failed: boolean\n): WriteDiagnosticsOptions {\n const convertedFiles = convertResult.convertedSourceFiles || [];\n const failedFiles = convertResult.failedSourceFiles || [];\n const convertedActivityFiles = convertResult.convertedActivityFiles || [];\n const itemRefs = convertResult.bundle\n ? (Array.from(convertResult.bundle.items.keys()) as string[])\n : [];\n\n return {\n inputPath,\n outputPath,\n totalItemsFound: failed ? itemRefs.length : convertedFiles.length + failedFiles.length,\n totalActivitiesFound: convertedActivityFiles.length,\n convertedFiles: failed ? [] : convertedFiles,\n failedFiles: failed ? itemRefs.map((ref: string) => `items/${ref}.xml`) : failedFiles,\n convertedActivities: convertedActivityFiles,\n };\n}\n\n/**\n * Execute qti-package-to-learnosity conversion\n */\nasync function executeQtiPackageToLearnosity(cliOpts: CliOptions, version: string): Promise<void> {\n const allDiagnostics: Diagnostic[] = [];\n const startTime = Date.now();\n const quiet = cliOpts.quiet ?? false;\n\n try {\n showBanner('qti-package-to-learnosity', version, quiet);\n\n const interactive = cliOpts.interactive ?? false;\n\n // Load config file (CLI flags take precedence over config values)\n const { config, diagnostics: configDiagnostics } = await loadConfig(\n cliOpts.config,\n cliOpts.noConfig\n );\n\n allDiagnostics.push(...configDiagnostics);\n\n if (configDiagnostics.some((d) => d.level === 'error')) {\n console.log('\\n' + formatDiagnosticsTable(configDiagnostics));\n process.exit(1);\n\n return;\n }\n\n const inputPath = await resolvePathOption(\n cliOpts.in,\n interactive,\n 'Input QTI package path (.zip or directory):',\n 'Error: --in is required. Use -i or --interactive for prompts or specify --in <path>'\n );\n\n const outputPath = await resolvePathOption(\n cliOpts.out,\n interactive,\n 'Output bundle path (.zip or directory):',\n 'Error: --out is required. Use -i or --interactive for prompts or specify --out <path>'\n );\n\n const failOnWarn = cliOpts.failOnWarn ?? false;\n const verbose = cliOpts.verbose ?? config?.verbose ?? false;\n const { mode: diagnosticsMode, customPath: customDiagnosticsPath } =\n resolveDiagnosticsConfig(cliOpts.diagnostics ?? config?.diagnostics);\n const organisationId = await resolveOrganisationId(\n cliOpts,\n interactive,\n config?.organisationId\n );\n const mediaVault = (cliOpts as any).mediavault ?? config?.mediaVault ?? false;\n const customAssetUrl = (cliOpts as any).customAssetUrl ?? config?.customAssetUrl;\n const itemReferenceSource =\n (cliOpts as any).itemReferenceSource ?? config?.itemReferenceSource;\n const itemFilenameSource =\n (cliOpts as any).itemFilenameSource ?? config?.itemFilenameSource;\n const truncateTags = (cliOpts as any).truncateTags ?? config?.truncateTags ?? false;\n\n const { isZipInput } = validateInputPath(inputPath);\n\n // Handle recursive batch processing\n if ((cliOpts as any).recursive) {\n if (isZipInput) {\n console.error(\n 'Error: --recursive flag cannot be used with ZIP input. Please provide a directory containing subdirectories.'\n );\n process.exit(1);\n\n return;\n }\n\n await executeBatchQtiPackageToLearnosity({\n inputPath,\n outputPath,\n organisationId,\n mediaVault,\n customAssetUrl,\n itemReferenceSource,\n itemFilenameSource,\n truncateTags,\n diagnosticsMode,\n failOnWarn,\n verbose,\n quiet,\n version,\n concurrency: cliOpts.concurrency ?? 1,\n });\n\n return;\n }\n\n const { isZipOutput, finalOutputPath } = resolveOutputFormat(outputPath, cliOpts.format);\n\n if (!quiet) {\n displayConfiguration(\n [\n configField('Input:', inputPath),\n configField('Output:', finalOutputPath),\n configField('Format:', isZipOutput ? 'ZIP' : 'directory'),\n configField('Diagnostics:', diagnosticsMode),\n configField('Org ID:', organisationId),\n configField('Media vault:', mediaVault),\n configField('Item ref src:', itemReferenceSource ?? 'sourceFilename (default)'),\n configField('Item filename:', itemFilenameSource ?? 'same as item ref src'),\n configField('Verbose:', verbose),\n configField('Fail on warn:', failOnWarn),\n ],\n { quiet }\n );\n }\n\n // Step 1: Convert package to bundle model\n process.stderr.write('Converting QTI package...\\n');\n\n const convertOpts = {\n organisationId,\n mediaVault,\n customAssetUrl,\n itemReferenceSource,\n itemFilenameSource,\n truncateTags,\n packageVersion: version,\n };\n let convertResult;\n\n if (isZipInput) {\n convertResult = convertQtiPackageToLearnosityBundle(\n { zipBytes: new Uint8Array(readFileSync(inputPath)) },\n convertOpts\n );\n } else {\n const loaded = loadPackageDirectory(inputPath);\n\n convertResult = loaded.entries\n ? convertQtiPackageToLearnosityBundle(\n { entries: loaded.entries },\n { ...convertOpts, sourceDir: inputPath, fileAccess: nodeFileAccess }\n )\n : { diagnostics: loaded.diagnostics };\n }\n\n allDiagnostics.push(...convertResult.diagnostics);\n\n displayConversionProgress(convertResult);\n\n const getDiagPath = () =>\n customDiagnosticsPath ||\n (isZipOutput\n ? finalOutputPath.replace(/\\.zip$/i, '-diagnostics.json')\n : `${finalOutputPath.replace(/\\/$/, '')}/diagnostics.json`);\n\n // Check for critical errors\n const errors = allDiagnostics.filter((d) => d.level === 'error');\n const warnings = allDiagnostics.filter((d) => d.level === 'warning');\n const hasValidBundle = convertResult.bundle && convertResult.bundle.items.size > 0;\n\n if (errors.length > 0 && !hasValidBundle) {\n process.stderr.write('\\nConversion FAILED with errors\\n\\n');\n await outputDiagnostics(\n allDiagnostics,\n diagnosticsMode,\n verbose,\n getDiagPath(),\n finalOutputPath,\n buildDiagnosticsMetadata(inputPath, finalOutputPath, convertResult, true)\n );\n process.exit(1);\n\n return;\n }\n\n if (failOnWarn && warnings.length > 0) {\n process.stderr.write('\\nConversion completed with WARNINGS (fail-on-warn mode)\\n\\n');\n await outputDiagnostics(\n allDiagnostics,\n diagnosticsMode,\n verbose,\n getDiagPath(),\n finalOutputPath,\n buildDiagnosticsMetadata(\n inputPath,\n finalOutputPath,\n convertResult,\n errors.length > 0\n )\n );\n process.exit(1);\n\n return;\n }\n\n if (!convertResult.bundle) {\n process.stderr.write('\\nConversion FAILED: no bundle generated\\n\\n');\n await outputDiagnostics(\n allDiagnostics,\n diagnosticsMode,\n verbose,\n getDiagPath(),\n finalOutputPath,\n {\n inputPath,\n outputPath: finalOutputPath,\n totalItemsFound: 0,\n convertedFiles: [],\n failedFiles: [],\n }\n );\n process.exit(1);\n\n return;\n }\n\n // Step 2: Write bundle to directory or ZIP\n process.stderr.write(`Writing ${isZipOutput ? 'ZIP' : 'directory'} package... `);\n const writeResult = await writeLearnosityBundle(convertResult.bundle, {\n outDir: finalOutputPath,\n isZipOutput,\n });\n\n allDiagnostics.push(...writeResult.diagnostics);\n\n if (writeResult.diagnostics.some((d) => d.level === 'error')) {\n process.stderr.write('FAILED\\n\\n');\n await outputDiagnostics(\n allDiagnostics,\n diagnosticsMode,\n verbose,\n getDiagPath(),\n outputPath,\n buildDiagnosticsMetadata(inputPath, outputPath, convertResult, true)\n );\n process.exit(1);\n\n return;\n }\n\n process.stderr.write('✓\\n');\n\n // Step 3: Write final diagnostics on success\n const successMetadata = buildDiagnosticsMetadata(\n inputPath,\n finalOutputPath,\n convertResult,\n false\n );\n\n if (diagnosticsMode === 'file' || diagnosticsMode === 'both') {\n const diagnosticsPath = getDiagPath();\n\n process.stderr.write(`Writing diagnostics to ${diagnosticsPath}... `);\n await outputDiagnostics(\n allDiagnostics,\n 'file',\n verbose,\n diagnosticsPath,\n finalOutputPath,\n successMetadata\n );\n process.stderr.write('✓\\n');\n }\n\n if (diagnosticsMode === 'stderr' || diagnosticsMode === 'both') {\n await outputDiagnostics(\n allDiagnostics,\n 'stderr',\n verbose,\n getDiagPath(),\n finalOutputPath,\n successMetadata\n );\n }\n\n const elapsedTime = ((Date.now() - startTime) / 1000).toFixed(1);\n\n process.stderr.write(`\\nCompleted in ${elapsedTime}s\\n`);\n\n const failedFiles = convertResult.failedSourceFiles || [];\n\n if (failedFiles.length > 0) {\n process.stderr.write(\n `\\nPackage written with ${failedFiles.length} item(s) skipped due to errors\\n`\n );\n }\n\n process.exit(0);\n } catch (error) {\n if (error instanceof Error && error.name === 'ExitPromptError') {\n process.exit(130);\n }\n console.error('\\n' + (error instanceof Error ? error.message : 'Unknown error'));\n process.exit(1);\n }\n}\n\n/**\n * Execute batch QTI package to Learnosity conversion for multiple subdirectories\n */\nasync function executeBatchQtiPackageToLearnosity(opts: {\n inputPath: string;\n outputPath: string;\n organisationId: number;\n mediaVault: boolean;\n customAssetUrl?: string;\n itemReferenceSource?: ItemReferenceSource;\n itemFilenameSource?: ItemFilenameSource;\n truncateTags: boolean;\n diagnosticsMode: string;\n failOnWarn: boolean;\n verbose: boolean;\n quiet: boolean;\n version: string;\n concurrency: number;\n}): Promise<void> {\n const {\n inputPath,\n outputPath,\n organisationId,\n mediaVault,\n customAssetUrl,\n itemReferenceSource,\n itemFilenameSource,\n truncateTags,\n diagnosticsMode,\n failOnWarn,\n verbose,\n quiet,\n version,\n concurrency,\n } = opts;\n\n if (concurrency > 1) {\n await processBatchParallel({\n inputPath,\n outputPath,\n packageType: 'qti',\n direction: 'qti-to-learnosity',\n options: {\n organisationId,\n mediaVault,\n customAssetUrl,\n itemReferenceSource,\n itemFilenameSource,\n truncateTags,\n version,\n },\n concurrency,\n quiet,\n });\n\n return;\n }\n\n // Display configuration\n displayConfiguration(\n [\n configField('Input:', inputPath),\n configField('Output:', outputPath),\n configField('Format:', 'directory'),\n configField('Diagnostics:', diagnosticsMode),\n configField('Org ID:', organisationId),\n configField('Media vault:', mediaVault),\n configField('Item ref src:', itemReferenceSource ?? 'sourceFilename (default)'),\n configField('Item filename:', itemFilenameSource ?? 'same as item ref src'),\n configField('Truncate tags:', truncateTags),\n configField('Recursive:', true),\n configField('Verbose:', verbose),\n configField('Fail on warn:', failOnWarn),\n ],\n { quiet }\n );\n\n if (!quiet) {\n console.log('🔄 Batch Processing Mode');\n console.log(`Scanning: ${inputPath}\\n`);\n }\n\n // Use generic batch processor\n await processBatch({\n inputPath,\n outputPath,\n packageType: 'qti',\n options: opts,\n quiet,\n processPackage: (pkg, packageOutputPath, options) =>\n processQtiPackageToLearnosity(pkg, packageOutputPath, options, quiet),\n });\n}\n"],"mappings":";;;;;;;;;;AA6BA,SAAgB,sCAAsC,SAAkB,SAAuB;CAC3F,QACK,QAAQ,2BAA2B,CAAC,CACpC,MAAM,qBAAqB,CAAC,CAC5B,YAAY,sDAAsD,CAAC,CACnE,OAAO,eAAe,wCAAwC,CAAC,CAC/D,OAAO,gBAAgB,wCAAwC,CAAC,CAChE,OACG,mBACA,kEACJ,CAAC,CACA,OACG,8BACA,iDACA,QACJ,CAAC,CACA,OAAO,qBAAqB,+BAA+B,QAAQ,CAAC,CACpE,OAAO,gBAAgB,8DAA8D,CAAC,CACtF,OACG,4BACA,4DACJ,CAAC,CACA,OACG,oCACA,sFACJ,CAAC,CACA,OACG,mCACA,iGACJ,CAAC,CACA,OACG,mBACA,oFACJ,CAAC,CACA,OAAO,eAAe,+DAA+D,CAAC,CACtF,OACG,0BACA,yEACA,QACJ,CAAC,CACA,OAAO,wBAAwB,2DAA2D,CAAC,CAC3F,OAAO,kBAAkB,2DAA2D,CAAC,CACrF,OAAO,mBAAmB,qBAAqB,CAAC,CAChD,OAAO,eAAe,6BAA6B,CAAC,CACpD,OAAO,qBAAqB,6CAA6C,CAAC,CAC1E,OAAO,aAAa,uDAAuD,CAAC,CAC5E,OAAO,eAAe,gDAAgD,CAAC,CACvE,OAAO,OAAO,SAAqB;EAChC,MAAM,8BAA8B,MAAM,OAAO;CACrD,CAAC;AACT;;;;AAKA,eAAe,kBACX,gBACA,iBACA,SACA,iBACA,YACA,UACa;CACb,IAAI,oBAAoB,UAAU,oBAAoB,QAClD,MAAM,iBACF,gBACA,QACA,iBACA,YACA,OACA,QACJ;CAGJ,IAAI,oBAAoB,YAAY,oBAAoB,QAAQ;EAC5D,MAAM,QAAQ,uBAAuB,gBAAgB,OAAO;EAE5D,IAAI,OACA,QAAQ,MAAM,KAAK;CAE3B;AACJ;;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BACA,cACA,iBACA,YACA,SACA,OACA,SACA,gBACA;CAEJ,IAAI,cAAc,GAAG;EACjB,MAAM,qBAAqB;GACvB;GACA;GACA,aAAa;GACb,WAAW;GACX,SAAS;IACL;IACA;IACA;IACA;IACA;IACA;IACA;GACJ;GACA;GACA;EACJ,CAAC;EAED;CACJ;CAGA,qBACI;EACI,YAAY,UAAU,SAAS;EAC/B,YAAY,WAAW,UAAU;EACjC,YAAY,WAAW,WAAW;EAClC,YAAY,gBAAgB,eAAe;EAC3C,YAAY,WAAW,cAAc;EACrC,YAAY,gBAAgB,UAAU;EACtC,YAAY,iBAAiB,uBAAuB,0BAA0B;EAC9E,YAAY,kBAAkB,sBAAsB,sBAAsB;EAC1E,YAAY,kBAAkB,YAAY;EAC1C,YAAY,cAAc,IAAI;EAC9B,YAAY,YAAY,OAAO;EAC/B,YAAY,iBAAiB,UAAU;CAC3C,GACA,EAAE,MAAM,CACZ;CAEA,IAAI,CAAC,OAAO;EACR,QAAQ,IAAI,0BAA0B;EACtC,QAAQ,IAAI,aAAa,UAAU,GAAG;CAC1C;CAGA,MAAM,aAAa;EACf;EACA;EACA,aAAa;EACb,SAAS;EACT;EACA,iBAAiB,KAAK,mBAAmB,YACrC,8BAA8B,KAAK,mBAAmB,SAAS,KAAK;CAC5E,CAAC;AACL"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as loadConfig, r as showBanner } from "./pathUtils-
|
|
2
|
-
import { r as formatDiagnosticsTable, s as writeDiagnostics, t as countErrors } from "./table-
|
|
3
|
-
import { c as convertQtiToLearnosity, i as writeOutput, n as ProgressTracker, o as readInput, r as showResolvedOptions, t as resolveOptions } from "./resolveOptions-
|
|
4
|
-
import { nodeFileAccess } from "
|
|
1
|
+
import { n as loadConfig, r as showBanner } from "./pathUtils-DmtCfutO.js";
|
|
2
|
+
import { r as formatDiagnosticsTable, s as writeDiagnostics, t as countErrors } from "./table-7b-8MN2z.js";
|
|
3
|
+
import { c as convertQtiToLearnosity, i as writeOutput, n as ProgressTracker, o as readInput, r as showResolvedOptions, t as resolveOptions } from "./resolveOptions-lHxSyq9F.js";
|
|
4
|
+
import { t as nodeFileAccess } from "./nodeFileAccess-BhCoGDOi.js";
|
|
5
5
|
//#region src/commands/qtiToLearnosity.ts
|
|
6
6
|
/**
|
|
7
7
|
* Register qti-to-learnosity command
|
|
@@ -94,4 +94,4 @@ async function executeQtiToLearnosity(cliOpts, version) {
|
|
|
94
94
|
//#endregion
|
|
95
95
|
export { registerQtiToLearnosityCommand };
|
|
96
96
|
|
|
97
|
-
//# sourceMappingURL=qtiToLearnosity-
|
|
97
|
+
//# sourceMappingURL=qtiToLearnosity-5lQ5f3-t.js.map
|