getExportsWithDepth = exportsDepth =>
	/** @type {GetExportsFromDataFn} */
	function getExportsFromData(data, curDepth = 1) {
		if (curDepth > exportsDepth) {
			return null;
		}

		if (data && typeof data === "object") {
			if (Array.isArray(data)) {
				return data.length < 100
					? data.map((item, idx) => ({
							name: `${idx}`,
							canMangle: true,
							exports: getExportsFromData(item, curDepth + 1) || undefined
						}))
					: null;
			}

			/** @type {ExportSpec[]} */
			const exports = [];

			for (const key of Object.keys(data)) {
				exports.push({
					name: key,
					canMangle: true,
					exports: getExportsFromData(data[key], curDepth + 1) || undefined
				});
			}

			return exports;
		}

		return null;
	}
@param {number} exportsDepth exportsDepth
@returns {GetExportsFromDataFn} value