Changeset 0c6b92a for imaps-frontend/node_modules/rollup/dist/bin
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/rollup/dist/bin/rollup
rd565449 r0c6b92a 2 2 /* 3 3 @license 4 Rollup.js v4.2 0.05 Sat, 03 Aug 2024 04:48:21 GMT - commit df12edfea6e9c1a71bda1a01bed1ab787b7514d54 Rollup.js v4.27.4 5 Sat, 23 Nov 2024 06:59:50 GMT - commit e805b546405a4e6cfccd3fe73e9f4df770023824 6 6 7 7 https://github.com/rollup/rollup … … 29 29 require('../getLogFilter.js'); 30 30 31 const help = "rollup version __VERSION__\n=====================================\n\nUsage: rollup [options] <entry file>\n\nBasic options:\n\n-c, --config <filename> Use this config file (if argument is used but value\n is unspecified, defaults to rollup.config.js)\n-d, --dir <dirname> Directory for chunks (if absent, prints to stdout)\n-e, --external <ids> Comma-separate list of module IDs to exclude\n-f, --format <format> Type of output (amd, cjs, es, iife, umd, system)\n-g, --globals <pairs> Comma-separate list of `moduleID:Global` pairs\n-h, --help Show this help message\n-i, --input <filename> Input (alternative to <entry file>)\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n-n, --name <name> Name for UMD export\n-o, --file <output> Single output file (if absent, prints to stdout)\n-p, --plugin <plugin> Use the plugin specified (may be repeated)\n-v, --version Show version number\n-w, --watch Watch files in bundle and rebuild on changes\n--amd.autoId Generate the AMD ID based off the chunk name\n--amd.basePath <prefix> Path to prepend to auto generated AMD ID\n--amd.define <name> Function to use in place of `define`\n--amd.forceJsExtensionForImports Use `.js` extension in AMD imports\n--amd.id <id> ID for AMD module (default is anonymous)\n--assetFileNames <pattern> Name pattern for emitted assets\n--banner <text> Code to insert at top of bundle (outside wrapper)\n--chunkFileNames <pattern> Name pattern for emitted secondary chunks\n--compact Minify wrapper code\n--context <variable> Specify top-level `this` value\n--no-dynamicImportInCjs Write external dynamic CommonJS imports as require\n--entryFileNames <pattern> Name pattern for emitted entry chunks\n--environment <values> Settings passed to config file (see example)\n--no-esModule Do not add __esModule property\n--exports <mode> Specify export mode (auto, default, named, none)\n--extend Extend global variable defined by --name\n--no-externalImportAttributes Omit import attributes in \"es\" output\n--no-externalLiveBindings Do not generate code to support live bindings\n--failAfterWarnings Exit with an error if the build produced warnings\n--filterLogs <filter> Filter log messages\n--footer <text> Code to insert at end of bundle (outside wrapper)\n--forceExit Force exit the process when done\n--no-freeze Do not freeze namespace objects\n--generatedCode <preset> Which code features to use (es5/es2015)\n--generatedCode.arrowFunctions Use arrow functions in generated code\n--generatedCode.constBindings Use \"const\" in generated code\n--generatedCode.objectShorthand Use shorthand properties in generated code\n--no-generatedCode.reservedNamesAsProps Always quote reserved names as props\n--generatedCode.symbols Use symbols in generated code\n--hashCharacters <name> Use the specified character set for file hashes\n--no-hoistTransitiveImports Do not hoist transitive imports into entry chunks\n--importAttributesKey <name> Use the specified keyword for import attributes\n--no-indent Don't indent result\n--inlineDynamicImports Create single bundle when using dynamic imports\n--no-interop Do not include interop block\n--intro <text> Code to insert at top of bundle (inside wrapper)\n--logLevel <level> Which kind of logs to display\n--no-makeAbsoluteExternalsRelative Prevent normalization of external imports\n--maxParallelFileOps <value> How many files to read in parallel\n--minifyInternalExports Force or disable minification of internal exports\n--noConflict Generate a noConflict method for UMD globals\n--outro <text> Code to insert at end of bundle (inside wrapper)\n--perf Display performance timings\n--no-preserveEntrySignatures Avoid facade chunks for entry points\n--preserveModules Preserve module structure\n--preserveModulesRoot Put preserved modules under this path at root level\n--preserveSymlinks Do not follow symlinks when resolving files\n--no-reexportProtoFromExternal Ignore `__proto__` in star re-exports\n--no-sanitizeFileName Do not replace invalid characters in file names\n--shimMissingExports Create shim variables for missing exports\n--silent Don't print warnings\n--sourcemapBaseUrl <url> Emit absolute sourcemap URLs with given base\n--sourcemap ExcludeSources Do not include source code in source maps\n--sourcemapFile <file> Specify bundle position for source maps\n--sourcemapFileNames <pattern> Name pattern for emitted sourcemaps\n--stdin=ext Specify file extension used for stdin input\n--no-stdin Do not read \"-\" from stdin\n--no-strict Don't emit `\"use strict\";` in the generated modules\n--strictDeprecations Throw errors for deprecated features\n--no-systemNullSetters Do not replace empty SystemJS setters with `null`\n--no-treeshake Disable tree-shaking optimisations\n--no-treeshake.annotations Ignore pure call annotations\n--treeshake.correctVarValueBeforeDeclaration Deoptimize variables until declared\n--treeshake.manualPureFunctions <names> Manually declare functions as pure\n--no-treeshake.moduleSideEffects Assume modules have no side effects\n--no-treeshake.propertyReadSideEffects Ignore property access side effects\n--no-treeshake.tryCatchDeoptimization Do not turn off try-catch-tree-shaking\n--no-treeshake.unknownGlobalSideEffects Assume unknown globals do not throw\n--validate Validate output\n--waitForBundleInput Wait for bundle input files\n--watch.buildDelay <number> Throttle watch rebuilds\n--no-watch.clearScreen Do not clear the screen when rebuilding\n--watch.exclude <files> Exclude files from being watched\n--watch.include <files> Limit watching to specified files\n--watch.onBundleEnd <cmd> Shell command to run on `\"BUNDLE_END\"` event\n--watch.onBundleStart <cmd> Shell command to run on `\"BUNDLE_START\"` event\n--watch.onEnd <cmd> Shell command to run on `\"END\"` event\n--watch.onError <cmd> Shell command to run on `\"ERROR\"` event\n--watch.onStart <cmd> Shell command to run on `\"START\"` event\n--watch.skipWrite Do not write files to disk when watching\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --file=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://rollupjs.org\n";31 const help = "rollup version __VERSION__\n=====================================\n\nUsage: rollup [options] <entry file>\n\nBasic options:\n\n-c, --config <filename> Use this config file (if argument is used but value\n is unspecified, defaults to rollup.config.js)\n-d, --dir <dirname> Directory for chunks (if absent, prints to stdout)\n-e, --external <ids> Comma-separate list of module IDs to exclude\n-f, --format <format> Type of output (amd, cjs, es, iife, umd, system)\n-g, --globals <pairs> Comma-separate list of `moduleID:Global` pairs\n-h, --help Show this help message\n-i, --input <filename> Input (alternative to <entry file>)\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n-n, --name <name> Name for UMD export\n-o, --file <output> Single output file (if absent, prints to stdout)\n-p, --plugin <plugin> Use the plugin specified (may be repeated)\n-v, --version Show version number\n-w, --watch Watch files in bundle and rebuild on changes\n--amd.autoId Generate the AMD ID based off the chunk name\n--amd.basePath <prefix> Path to prepend to auto generated AMD ID\n--amd.define <name> Function to use in place of `define`\n--amd.forceJsExtensionForImports Use `.js` extension in AMD imports\n--amd.id <id> ID for AMD module (default is anonymous)\n--assetFileNames <pattern> Name pattern for emitted assets\n--banner <text> Code to insert at top of bundle (outside wrapper)\n--chunkFileNames <pattern> Name pattern for emitted secondary chunks\n--compact Minify wrapper code\n--context <variable> Specify top-level `this` value\n--no-dynamicImportInCjs Write external dynamic CommonJS imports as require\n--entryFileNames <pattern> Name pattern for emitted entry chunks\n--environment <values> Settings passed to config file (see example)\n--no-esModule Do not add __esModule property\n--exports <mode> Specify export mode (auto, default, named, none)\n--extend Extend global variable defined by --name\n--no-externalImportAttributes Omit import attributes in \"es\" output\n--no-externalLiveBindings Do not generate code to support live bindings\n--failAfterWarnings Exit with an error if the build produced warnings\n--filterLogs <filter> Filter log messages\n--footer <text> Code to insert at end of bundle (outside wrapper)\n--forceExit Force exit the process when done\n--no-freeze Do not freeze namespace objects\n--generatedCode <preset> Which code features to use (es5/es2015)\n--generatedCode.arrowFunctions Use arrow functions in generated code\n--generatedCode.constBindings Use \"const\" in generated code\n--generatedCode.objectShorthand Use shorthand properties in generated code\n--no-generatedCode.reservedNamesAsProps Always quote reserved names as props\n--generatedCode.symbols Use symbols in generated code\n--hashCharacters <name> Use the specified character set for file hashes\n--no-hoistTransitiveImports Do not hoist transitive imports into entry chunks\n--importAttributesKey <name> Use the specified keyword for import attributes\n--no-indent Don't indent result\n--inlineDynamicImports Create single bundle when using dynamic imports\n--no-interop Do not include interop block\n--intro <text> Code to insert at top of bundle (inside wrapper)\n--logLevel <level> Which kind of logs to display\n--no-makeAbsoluteExternalsRelative Prevent normalization of external imports\n--maxParallelFileOps <value> How many files to read in parallel\n--minifyInternalExports Force or disable minification of internal exports\n--noConflict Generate a noConflict method for UMD globals\n--outro <text> Code to insert at end of bundle (inside wrapper)\n--perf Display performance timings\n--no-preserveEntrySignatures Avoid facade chunks for entry points\n--preserveModules Preserve module structure\n--preserveModulesRoot Put preserved modules under this path at root level\n--preserveSymlinks Do not follow symlinks when resolving files\n--no-reexportProtoFromExternal Ignore `__proto__` in star re-exports\n--no-sanitizeFileName Do not replace invalid characters in file names\n--shimMissingExports Create shim variables for missing exports\n--silent Don't print warnings\n--sourcemapBaseUrl <url> Emit absolute sourcemap URLs with given base\n--sourcemapDebugIds Emit unique debug ids in source and sourcemaps\n--sourcemapExcludeSources Do not include source code in source maps\n--sourcemapFile <file> Specify bundle position for source maps\n--sourcemapFileNames <pattern> Name pattern for emitted sourcemaps\n--stdin=ext Specify file extension used for stdin input\n--no-stdin Do not read \"-\" from stdin\n--no-strict Don't emit `\"use strict\";` in the generated modules\n--strictDeprecations Throw errors for deprecated features\n--no-systemNullSetters Do not replace empty SystemJS setters with `null`\n--no-treeshake Disable tree-shaking optimisations\n--no-treeshake.annotations Ignore pure call annotations\n--treeshake.correctVarValueBeforeDeclaration Deoptimize variables until declared\n--treeshake.manualPureFunctions <names> Manually declare functions as pure\n--no-treeshake.moduleSideEffects Assume modules have no side effects\n--no-treeshake.propertyReadSideEffects Ignore property access side effects\n--no-treeshake.tryCatchDeoptimization Do not turn off try-catch-tree-shaking\n--no-treeshake.unknownGlobalSideEffects Assume unknown globals do not throw\n--validate Validate output\n--waitForBundleInput Wait for bundle input files\n--watch.buildDelay <number> Throttle watch rebuilds\n--no-watch.clearScreen Do not clear the screen when rebuilding\n--watch.exclude <files> Exclude files from being watched\n--watch.include <files> Limit watching to specified files\n--watch.onBundleEnd <cmd> Shell command to run on `\"BUNDLE_END\"` event\n--watch.onBundleStart <cmd> Shell command to run on `\"BUNDLE_START\"` event\n--watch.onEnd <cmd> Shell command to run on `\"END\"` event\n--watch.onError <cmd> Shell command to run on `\"ERROR\"` event\n--watch.onStart <cmd> Shell command to run on `\"START\"` event\n--watch.skipWrite Do not write files to disk when watching\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --file=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://rollupjs.org\n"; 32 32 33 33 /** … … 1248 1248 yargsParser.looksLikeNumber = looksLikeNumber; 1249 1249 1250 /****************************************************************************** 1251 Copyright (c) Microsoft Corporation. 1252 1253 Permission to use, copy, modify, and/or distribute this software for any 1254 purpose with or without fee is hereby granted. 1255 1256 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 1257 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 1258 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 1259 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 1260 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 1261 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 1262 PERFORMANCE OF THIS SOFTWARE. 1263 ***************************************************************************** */ 1264 /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ 1265 1266 1267 function __addDisposableResource(env, value, async) { 1268 if (value !== null && value !== void 0) { 1269 if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); 1270 var dispose, inner; 1271 if (async) { 1272 if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); 1273 dispose = value[Symbol.asyncDispose]; 1274 } 1275 if (dispose === void 0) { 1276 if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); 1277 dispose = value[Symbol.dispose]; 1278 if (async) inner = dispose; 1279 } 1280 if (typeof dispose !== "function") throw new TypeError("Object not disposable."); 1281 if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; 1282 env.stack.push({ value: value, dispose: dispose, async: async }); 1283 } 1284 else if (async) { 1285 env.stack.push({ async: true }); 1286 } 1287 return value; 1288 1289 } 1290 1291 var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { 1292 var e = new Error(message); 1293 return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; 1294 }; 1295 1296 function __disposeResources(env) { 1297 function fail(e) { 1298 env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; 1299 env.hasError = true; 1300 } 1301 var r, s = 0; 1302 function next() { 1303 while (r = env.stack.pop()) { 1304 try { 1305 if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); 1306 if (r.dispose) { 1307 var result = r.dispose.call(r.value); 1308 if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); 1309 } 1310 else s |= 1; 1311 } 1312 catch (e) { 1313 fail(e); 1314 } 1315 } 1316 if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); 1317 if (env.hasError) throw env.error; 1318 } 1319 return next(); 1320 } 1321 1250 1322 const toZeroIfInfinity = value => Number.isFinite(value) ? value : 0; 1251 1323 … … 1355 1427 const days = BigInt(parsed.days); 1356 1428 1357 add(days / 365n, 'year', 'y'); 1358 add(days % 365n, 'day', 'd'); 1359 add(Number(parsed.hours), 'hour', 'h'); 1429 if (options.hideYearAndDays) { 1430 add((BigInt(days) * 24n) + BigInt(parsed.hours), 'hour', 'h'); 1431 } else { 1432 if (options.hideYear) { 1433 add(days, 'day', 'd'); 1434 } else { 1435 add(days / 365n, 'year', 'y'); 1436 add(days % 365n, 'day', 'd'); 1437 } 1438 1439 add(Number(parsed.hours), 'hour', 'h'); 1440 } 1441 1360 1442 add(Number(parsed.minutes), 'minute', 'm'); 1361 1443 1362 if ( 1363 options.separateMilliseconds 1364 || options.formatSubMilliseconds 1365 || (!options.colonNotation && milliseconds < 1000) 1366 ) { 1367 const seconds = Number(parsed.seconds); 1368 const milliseconds = Number(parsed.milliseconds); 1369 const microseconds = Number(parsed.microseconds); 1370 const nanoseconds = Number(parsed.nanoseconds); 1371 1372 add(seconds, 'second', 's'); 1373 1374 if (options.formatSubMilliseconds) { 1375 add(milliseconds, 'millisecond', 'ms'); 1376 add(microseconds, 'microsecond', 'µs'); 1377 add(nanoseconds, 'nanosecond', 'ns'); 1444 if (!options.hideSeconds) { 1445 if ( 1446 options.separateMilliseconds 1447 || options.formatSubMilliseconds 1448 || (!options.colonNotation && milliseconds < 1000) 1449 ) { 1450 const seconds = Number(parsed.seconds); 1451 const milliseconds = Number(parsed.milliseconds); 1452 const microseconds = Number(parsed.microseconds); 1453 const nanoseconds = Number(parsed.nanoseconds); 1454 1455 add(seconds, 'second', 's'); 1456 1457 if (options.formatSubMilliseconds) { 1458 add(milliseconds, 'millisecond', 'ms'); 1459 add(microseconds, 'microsecond', 'µs'); 1460 add(nanoseconds, 'nanosecond', 'ns'); 1461 } else { 1462 const millisecondsAndBelow 1463 = milliseconds 1464 + (microseconds / 1000) 1465 + (nanoseconds / 1e6); 1466 1467 const millisecondsDecimalDigits 1468 = typeof options.millisecondsDecimalDigits === 'number' 1469 ? options.millisecondsDecimalDigits 1470 : 0; 1471 1472 const roundedMilliseconds = millisecondsAndBelow >= 1 1473 ? Math.round(millisecondsAndBelow) 1474 : Math.ceil(millisecondsAndBelow); 1475 1476 const millisecondsString = millisecondsDecimalDigits 1477 ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) 1478 : roundedMilliseconds; 1479 1480 add( 1481 Number.parseFloat(millisecondsString), 1482 'millisecond', 1483 'ms', 1484 millisecondsString, 1485 ); 1486 } 1378 1487 } else { 1379 const millisecondsAndBelow 1380 = milliseconds 1381 + (microseconds / 1000) 1382 + (nanoseconds / 1e6); 1383 1384 const millisecondsDecimalDigits 1385 = typeof options.millisecondsDecimalDigits === 'number' 1386 ? options.millisecondsDecimalDigits 1387 : 0; 1388 1389 const roundedMilliseconds = millisecondsAndBelow >= 1 1390 ? Math.round(millisecondsAndBelow) 1391 : Math.ceil(millisecondsAndBelow); 1392 1393 const millisecondsString = millisecondsDecimalDigits 1394 ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) 1395 : roundedMilliseconds; 1396 1397 add( 1398 Number.parseFloat(millisecondsString), 1399 'millisecond', 1400 'ms', 1401 millisecondsString, 1402 ); 1488 const seconds = ( 1489 (isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) 1490 / 1000 1491 ) % 60; 1492 const secondsDecimalDigits 1493 = typeof options.secondsDecimalDigits === 'number' 1494 ? options.secondsDecimalDigits 1495 : 1; 1496 const secondsFixed = floorDecimals(seconds, secondsDecimalDigits); 1497 const secondsString = options.keepDecimalsOnWholeSeconds 1498 ? secondsFixed 1499 : secondsFixed.replace(/\.0+$/, ''); 1500 add(Number.parseFloat(secondsString), 'second', 's', secondsString); 1403 1501 } 1404 } else {1405 const seconds = (1406 (isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds)1407 / 10001408 ) % 60;1409 const secondsDecimalDigits1410 = typeof options.secondsDecimalDigits === 'number'1411 ? options.secondsDecimalDigits1412 : 1;1413 const secondsFixed = floorDecimals(seconds, secondsDecimalDigits);1414 const secondsString = options.keepDecimalsOnWholeSeconds1415 ? secondsFixed1416 : secondsFixed.replace(/\.0+$/, '');1417 add(Number.parseFloat(secondsString), 'second', 's', secondsString);1418 1502 } 1419 1503 … … 1562 1646 1563 1647 async function build(inputOptions, warnings, silent = false) { 1564 const outputOptions = inputOptions.output; 1565 const useStdout = !outputOptions[0].file && !outputOptions[0].dir; 1566 const start = Date.now(); 1567 const files = useStdout ? ['stdout'] : outputOptions.map(t => parseAst_js.relativeId(t.file || t.dir)); 1568 if (!silent) { 1569 let inputFiles; 1570 if (typeof inputOptions.input === 'string') { 1571 inputFiles = inputOptions.input; 1572 } 1573 else if (Array.isArray(inputOptions.input)) { 1574 inputFiles = inputOptions.input.join(', '); 1575 } 1576 else if (typeof inputOptions.input === 'object' && inputOptions.input !== null) { 1577 inputFiles = Object.values(inputOptions.input).join(', '); 1578 } 1579 rollup.stderr(rollup.cyan$1(`\n${rollup.bold(inputFiles)} → ${rollup.bold(files.join(', '))}...`)); 1580 } 1581 const bundle = await rollup.rollup(inputOptions); 1582 if (useStdout) { 1583 const output = outputOptions[0]; 1584 if (output.sourcemap && output.sourcemap !== 'inline') { 1585 rollup.handleError(parseAst_js.logOnlyInlineSourcemapsForStdout()); 1586 } 1587 const { output: outputs } = await bundle.generate(output); 1588 for (const file of outputs) { 1589 if (outputs.length > 1) 1590 process$1.stdout.write(`\n${rollup.cyan$1(rollup.bold(`//→ ${file.fileName}:`))}\n`); 1591 process$1.stdout.write(file.type === 'asset' ? file.source : file.code); 1592 } 1648 const env_1 = { stack: [], error: void 0, hasError: false }; 1649 try { 1650 const outputOptions = inputOptions.output; 1651 const useStdout = !outputOptions[0].file && !outputOptions[0].dir; 1652 const start = Date.now(); 1653 const files = useStdout ? ['stdout'] : outputOptions.map(t => parseAst_js.relativeId(t.file || t.dir)); 1654 if (!silent) { 1655 let inputFiles; 1656 if (typeof inputOptions.input === 'string') { 1657 inputFiles = inputOptions.input; 1658 } 1659 else if (Array.isArray(inputOptions.input)) { 1660 inputFiles = inputOptions.input.join(', '); 1661 } 1662 else if (typeof inputOptions.input === 'object' && inputOptions.input !== null) { 1663 inputFiles = Object.values(inputOptions.input).join(', '); 1664 } 1665 rollup.stderr(rollup.cyan$1(`\n${rollup.bold(inputFiles)} → ${rollup.bold(files.join(', '))}...`)); 1666 } 1667 const bundle = __addDisposableResource(env_1, await rollup.rollup(inputOptions), true); 1668 if (useStdout) { 1669 const output = outputOptions[0]; 1670 if (output.sourcemap && output.sourcemap !== 'inline') { 1671 rollup.handleError(parseAst_js.logOnlyInlineSourcemapsForStdout()); 1672 } 1673 const { output: outputs } = await bundle.generate(output); 1674 for (const file of outputs) { 1675 if (outputs.length > 1) 1676 process$1.stdout.write(`\n${rollup.cyan$1(rollup.bold(`//→ ${file.fileName}:`))}\n`); 1677 process$1.stdout.write(file.type === 'asset' ? file.source : file.code); 1678 } 1679 if (!silent) { 1680 warnings.flush(); 1681 } 1682 return; 1683 } 1684 await Promise.all(outputOptions.map(bundle.write)); 1593 1685 if (!silent) { 1594 1686 warnings.flush(); 1595 } 1596 return; 1597 } 1598 await Promise.all(outputOptions.map(bundle.write)); 1599 await bundle.close(); 1600 if (!silent) { 1601 warnings.flush(); 1602 rollup.stderr(rollup.green(`created ${rollup.bold(files.join(', '))} in ${rollup.bold(prettyMilliseconds(Date.now() - start))}`)); 1603 if (bundle && bundle.getTimings) { 1604 printTimings(bundle.getTimings()); 1605 } 1687 rollup.stderr(rollup.green(`created ${rollup.bold(files.join(', '))} in ${rollup.bold(prettyMilliseconds(Date.now() - start))}`)); 1688 if (bundle && bundle.getTimings) { 1689 printTimings(bundle.getTimings()); 1690 } 1691 } 1692 } 1693 catch (e_1) { 1694 env_1.error = e_1; 1695 env_1.hasError = true; 1696 } 1697 finally { 1698 const result_1 = __disposeResources(env_1); 1699 if (result_1) 1700 await result_1; 1606 1701 } 1607 1702 } … … 1615 1710 const packageName = commandConfig.slice(5); 1616 1711 try { 1617 // eslint-disable-next-line unicorn/prefer-module1618 1712 return require.resolve(`rollup-config-${packageName}`, { paths: [process$1.cwd()] }); 1619 1713 } 1620 1714 catch { 1621 1715 try { 1622 // eslint-disable-next-line unicorn/prefer-module1623 1716 return require.resolve(packageName, { paths: [process$1.cwd()] }); 1624 1717 } … … 1746 1839 else { 1747 1840 try { 1748 // eslint-disable-next-line unicorn/prefer-module1841 // eslint-disable-next-line @typescript-eslint/no-require-imports 1749 1842 require('source-map-support').install(); 1750 1843 } … … 1754 1847 const promise = runRollup(command); 1755 1848 if (command.forceExit) { 1756 // eslint-disable-next-line unicorn/no-process-exit1757 1849 promise.then(() => process$1.exit()); 1758 1850 }
Note:
See TracChangeset
for help on using the changeset viewer.