@voidzero-dev/vite-plus-core 0.0.0-de8bd982.20260205-1433 → 0.0.0-e32b32e5.20260224-0706

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.
Files changed (65) hide show
  1. package/dist/rolldown/cli-setup.mjs +1 -1
  2. package/dist/rolldown/cli.mjs +10 -9
  3. package/dist/rolldown/config.d.mts +2 -2
  4. package/dist/rolldown/config.mjs +9 -8
  5. package/dist/rolldown/experimental-index.d.mts +72 -27
  6. package/dist/rolldown/experimental-index.mjs +64 -36
  7. package/dist/rolldown/filter-index.d.mts +2 -2
  8. package/dist/rolldown/get-log-filter.d.mts +3 -7
  9. package/dist/rolldown/index.d.mts +4 -4
  10. package/dist/rolldown/index.mjs +9 -8
  11. package/dist/rolldown/parallel-plugin-worker.mjs +5 -4
  12. package/dist/rolldown/parallel-plugin.d.mts +2 -2
  13. package/dist/rolldown/parse-ast-index.d.mts +1 -1
  14. package/dist/rolldown/parse-ast-index.mjs +3 -3
  15. package/dist/rolldown/plugins-index.d.mts +3 -3
  16. package/dist/rolldown/plugins-index.mjs +3 -3
  17. package/dist/rolldown/shared/{binding-D-XMzSaG.d.mts → binding-B4HaVp87.d.mts} +245 -93
  18. package/dist/rolldown/shared/{binding-DuOSzYPt.mjs → binding-eAM5CAoo.mjs} +4 -0
  19. package/dist/rolldown/shared/{bindingify-input-options-Bu6nUTgS.mjs → bindingify-input-options-B98M8Cgz.mjs} +17 -92
  20. package/dist/rolldown/shared/{constructors-KD7LvxpN.d.mts → constructors-BkfxO5px.d.mts} +3 -4
  21. package/dist/rolldown/shared/{constructors-DZVRHTli.mjs → constructors-DdT6KuVQ.mjs} +2 -5
  22. package/dist/rolldown/shared/{define-config-U4pj0ZDn.d.mts → define-config-RYvN7eA1.d.mts} +77 -5
  23. package/dist/rolldown/shared/error-CpxG7etL.mjs +90 -0
  24. package/dist/rolldown/shared/get-log-filter-D5_9u-u7.d.mts +7 -0
  25. package/dist/rolldown/shared/{load-config-O1K_tT_z.mjs → load-config-CQVZkjsL.mjs} +1 -1
  26. package/dist/rolldown/shared/{logs-NH298mHo.mjs → logs-COHDsWqD.mjs} +1 -1
  27. package/dist/rolldown/shared/{normalize-string-or-regex-DeZqg15i.mjs → normalize-string-or-regex-Dqznrk6L.mjs} +2 -2
  28. package/dist/rolldown/shared/{parse-DLraxqjd.mjs → parse-D9q1irbA.mjs} +22 -5
  29. package/dist/rolldown/shared/{rolldown-O0UKbTKf.mjs → rolldown-BTkXfjFD.mjs} +1 -1
  30. package/dist/rolldown/shared/{rolldown-build-BIs7C4B_.mjs → rolldown-build-C97gg8oe.mjs} +24 -9
  31. package/dist/rolldown/shared/transform-Beiln3kS.d.mts +92 -0
  32. package/dist/rolldown/shared/transform-C27ukHWs.mjs +91 -0
  33. package/dist/rolldown/shared/{watch-DQXGaDjx.mjs → watch-CIpF8Tjn.mjs} +5 -4
  34. package/dist/rolldown/utils-index.d.mts +352 -0
  35. package/dist/rolldown/utils-index.mjs +2408 -0
  36. package/dist/tsdown/build-C5RQkVSf-Sq8O6v2d.js +6 -0
  37. package/dist/tsdown/{build-l5WhXg4M-BBPqZr0m.js → build-C5RQkVSf-TFRE7tGr.js} +12 -16
  38. package/dist/tsdown/{debug-Cb_Nqpo4-BueIRvg1.js → debug-Cb_Nqpo4-Bp3Jla8o.js} +2 -2
  39. package/dist/tsdown/{detect-CCATtVj7-B86m8IqW.js → detect-CCATtVj7-CIEct60l.js} +1 -1
  40. package/dist/tsdown/{dist-dc0X0G6b.js → dist-DhHdxGfe.js} +0 -1
  41. package/dist/tsdown/{index-node-BjDys8jy--sqPE5mM.js → index-node-BjDys8jy-DouyYlgA.js} +1 -1
  42. package/dist/tsdown/index-types.d.ts +6 -6
  43. package/dist/tsdown/index.js +4 -4
  44. package/dist/tsdown/{main-d9yZSQqW.js → main-CL35d8F6.js} +3 -3
  45. package/dist/tsdown/run.js +4 -4
  46. package/dist/vite/client/client.mjs +4 -4
  47. package/dist/vite/node/chunks/build.js +4 -0
  48. package/dist/vite/node/chunks/build2.js +1 -1
  49. package/dist/vite/node/chunks/chunk.js +1 -14
  50. package/dist/vite/node/chunks/config.js +4 -0
  51. package/dist/vite/node/chunks/dist2.js +1 -1
  52. package/dist/vite/node/chunks/logger.js +5 -4
  53. package/dist/vite/node/chunks/{fetchableEnvironments.js → node.js} +315 -1774
  54. package/dist/vite/node/chunks/optimizer.js +4 -0
  55. package/dist/vite/node/chunks/postcss-import.js +1 -1
  56. package/dist/vite/node/chunks/preview.js +4 -0
  57. package/dist/vite/node/chunks/server.js +4 -0
  58. package/dist/vite/node/cli.js +14 -12
  59. package/dist/vite/node/index.d.ts +46 -6
  60. package/dist/vite/node/index.js +2 -13
  61. package/dist/vite/node/module-runner.js +64 -6
  62. package/package.json +20 -16
  63. /package/dist/rolldown/shared/{define-config-BVG4QvnP.mjs → define-config-B-Hn45NS.mjs} +0 -0
  64. /package/dist/rolldown/shared/{logging-CE90D8JR.d.mts → logging-CKYae7lu.d.mts} +0 -0
  65. /package/dist/rolldown/shared/{prompt-DeISmFRp.mjs → prompt-omTrgOHx.mjs} +0 -0
@@ -98,7 +98,7 @@ interface MangleOptions {
98
98
  /**
99
99
  * Pass `true` to mangle names declared in the top level scope.
100
100
  *
101
- * @default false
101
+ * @default true for modules and commonjs, otherwise false
102
102
  */
103
103
  toplevel?: boolean;
104
104
  /**
@@ -1014,21 +1014,6 @@ interface StyledComponentsOptions {
1014
1014
  */
1015
1015
  topLevelImportPaths?: Array<string>;
1016
1016
  }
1017
- /**
1018
- * Transpile a JavaScript or TypeScript into a target ECMAScript version, asynchronously.
1019
- *
1020
- * Note: This function can be slower than `transform` due to the overhead of spawning a thread.
1021
- *
1022
- * @param filename The name of the file being transformed. If this is a
1023
- * relative path, consider setting the {@link TransformOptions#cwd} option.
1024
- * @param sourceText the source code itself
1025
- * @param options The options for the transformation. See {@link
1026
- * TransformOptions} for more information.
1027
- *
1028
- * @returns a promise that resolves to an object containing the transformed code,
1029
- * source maps, and any errors that occurred during parsing or transformation.
1030
- */
1031
- declare function transform(filename: string, sourceText: string, options?: TransformOptions | undefined | null): Promise<TransformResult>;
1032
1017
  /**
1033
1018
  * Options for transforming a JavaScript or TypeScript file.
1034
1019
  *
@@ -1101,70 +1086,6 @@ interface TransformOptions {
1101
1086
  */
1102
1087
  plugins?: PluginsOptions;
1103
1088
  }
1104
- interface TransformResult {
1105
- /**
1106
- * The transformed code.
1107
- *
1108
- * If parsing failed, this will be an empty string.
1109
- */
1110
- code: string;
1111
- /**
1112
- * The source map for the transformed code.
1113
- *
1114
- * This will be set if {@link TransformOptions#sourcemap} is `true`.
1115
- */
1116
- map?: SourceMap;
1117
- /**
1118
- * The `.d.ts` declaration file for the transformed code. Declarations are
1119
- * only generated if `declaration` is set to `true` and a TypeScript file
1120
- * is provided.
1121
- *
1122
- * If parsing failed and `declaration` is set, this will be an empty string.
1123
- *
1124
- * @see {@link TypeScriptOptions#declaration}
1125
- * @see [declaration tsconfig option](https://www.typescriptlang.org/tsconfig/#declaration)
1126
- */
1127
- declaration?: string;
1128
- /**
1129
- * Declaration source map. Only generated if both
1130
- * {@link TypeScriptOptions#declaration declaration} and
1131
- * {@link TransformOptions#sourcemap sourcemap} are set to `true`.
1132
- */
1133
- declarationMap?: SourceMap;
1134
- /**
1135
- * Helpers used.
1136
- *
1137
- * @internal
1138
- *
1139
- * Example:
1140
- *
1141
- * ```text
1142
- * { "_objectSpread": "@oxc-project/runtime/helpers/objectSpread2" }
1143
- * ```
1144
- */
1145
- helpersUsed: Record<string, string>;
1146
- /**
1147
- * Parse and transformation errors.
1148
- *
1149
- * Oxc's parser recovers from common syntax errors, meaning that
1150
- * transformed code may still be available even if there are errors in this
1151
- * list.
1152
- */
1153
- errors: Array<OxcError>;
1154
- }
1155
- /**
1156
- * Transpile a JavaScript or TypeScript into a target ECMAScript version.
1157
- *
1158
- * @param filename The name of the file being transformed. If this is a
1159
- * relative path, consider setting the {@link TransformOptions#cwd} option..
1160
- * @param sourceText the source code itself
1161
- * @param options The options for the transformation. See {@link
1162
- * TransformOptions} for more information.
1163
- *
1164
- * @returns an object containing the transformed code, source maps, and any
1165
- * errors that occurred during parsing or transformation.
1166
- */
1167
- declare function transformSync(filename: string, sourceText: string, options?: TransformOptions | undefined | null): TransformResult;
1168
1089
  interface TypeScriptOptions {
1169
1090
  jsxPragma?: string;
1170
1091
  jsxPragmaFrag?: string;
@@ -1357,6 +1278,7 @@ declare class BindingNormalizedOptions {
1357
1278
  get polyfillRequire(): boolean;
1358
1279
  get minify(): false | 'dce-only' | MinifyOptions;
1359
1280
  get legalComments(): 'none' | 'inline';
1281
+ get comments(): BindingCommentsOptions;
1360
1282
  get preserveModules(): boolean;
1361
1283
  get preserveModulesRoot(): string | undefined;
1362
1284
  get virtualDirname(): string;
@@ -1406,7 +1328,30 @@ declare class BindingSourceMap {
1406
1328
  declare class BindingWatcherBundler {
1407
1329
  close(): Promise<void>;
1408
1330
  }
1409
- type BindingBuiltinPluginName = 'builtin:esm-external-require' | 'builtin:isolated-declaration' | 'builtin:replace' | 'builtin:vite-alias' | 'builtin:vite-build-import-analysis' | 'builtin:vite-dynamic-import-vars' | 'builtin:vite-import-glob' | 'builtin:vite-json' | 'builtin:vite-load-fallback' | 'builtin:vite-manifest' | 'builtin:vite-module-preload-polyfill' | 'builtin:vite-react-refresh-wrapper' | 'builtin:vite-reporter' | 'builtin:vite-resolve' | 'builtin:vite-transform' | 'builtin:vite-wasm-fallback' | 'builtin:vite-wasm-helper' | 'builtin:vite-web-worker-post';
1331
+ /**
1332
+ * Cache for tsconfig resolution to avoid redundant file system operations.
1333
+ *
1334
+ * The cache stores resolved tsconfig configurations keyed by their file paths.
1335
+ * When transforming multiple files in the same project, tsconfig lookups are
1336
+ * deduplicated, improving performance.
1337
+ */
1338
+ declare class TsconfigCache {
1339
+ /** Create a new transform cache with auto tsconfig discovery enabled. */
1340
+ constructor();
1341
+ /**
1342
+ * Clear the cache.
1343
+ *
1344
+ * Call this when tsconfig files have changed to ensure fresh resolution.
1345
+ */
1346
+ clear(): void;
1347
+ /** Get the number of cached entries. */
1348
+ size(): number;
1349
+ }
1350
+ type BindingBuiltinPluginName = 'builtin:bundle-analyzer' | 'builtin:esm-external-require' | 'builtin:isolated-declaration' | 'builtin:replace' | 'builtin:vite-alias' | 'builtin:vite-build-import-analysis' | 'builtin:vite-dynamic-import-vars' | 'builtin:vite-import-glob' | 'builtin:vite-json' | 'builtin:vite-load-fallback' | 'builtin:vite-manifest' | 'builtin:vite-module-preload-polyfill' | 'builtin:vite-react-refresh-wrapper' | 'builtin:vite-reporter' | 'builtin:vite-resolve' | 'builtin:vite-transform' | 'builtin:vite-wasm-fallback' | 'builtin:vite-web-worker-post';
1351
+ interface BindingBundleAnalyzerPluginConfig {
1352
+ /** Output filename for the analysis data (default: "analyze-data.json") */
1353
+ fileName?: string;
1354
+ }
1410
1355
  interface BindingBundleState {
1411
1356
  lastFullBuildFailed: boolean;
1412
1357
  hasStaleOutput: boolean;
@@ -1415,6 +1360,161 @@ interface BindingClientHmrUpdate {
1415
1360
  clientId: string;
1416
1361
  update: BindingHmrUpdate;
1417
1362
  }
1363
+ interface BindingCommentsOptions {
1364
+ legal?: boolean;
1365
+ annotation?: boolean;
1366
+ jsdoc?: boolean;
1367
+ }
1368
+ interface BindingCompilerOptions {
1369
+ baseUrl?: string;
1370
+ paths?: Record<string, Array<string>>;
1371
+ experimentalDecorators?: boolean;
1372
+ emitDecoratorMetadata?: boolean;
1373
+ useDefineForClassFields?: boolean;
1374
+ rewriteRelativeImportExtensions?: boolean;
1375
+ jsx?: string;
1376
+ jsxFactory?: string;
1377
+ jsxFragmentFactory?: string;
1378
+ jsxImportSource?: string;
1379
+ verbatimModuleSyntax?: boolean;
1380
+ preserveValueImports?: boolean;
1381
+ importsNotUsedAsValues?: string;
1382
+ target?: string;
1383
+ module?: string;
1384
+ allowJs?: boolean;
1385
+ rootDirs?: Array<string>;
1386
+ }
1387
+ /** Enhanced transform options with tsconfig and inputMap support. */
1388
+ interface BindingEnhancedTransformOptions {
1389
+ /** Treat the source text as 'js', 'jsx', 'ts', 'tsx', or 'dts'. */
1390
+ lang?: 'js' | 'jsx' | 'ts' | 'tsx' | 'dts';
1391
+ /** Treat the source text as 'script', 'module', 'commonjs', or 'unambiguous'. */
1392
+ sourceType?: 'script' | 'module' | 'commonjs' | 'unambiguous' | undefined;
1393
+ /**
1394
+ * The current working directory. Used to resolve relative paths in other
1395
+ * options.
1396
+ */
1397
+ cwd?: string;
1398
+ /**
1399
+ * Enable source map generation.
1400
+ *
1401
+ * When `true`, the `sourceMap` field of transform result objects will be populated.
1402
+ *
1403
+ * @default false
1404
+ */
1405
+ sourcemap?: boolean;
1406
+ /** Set assumptions in order to produce smaller output. */
1407
+ assumptions?: CompilerAssumptions;
1408
+ /**
1409
+ * Configure how TypeScript is transformed.
1410
+ * @see {@link https://oxc.rs/docs/guide/usage/transformer/typescript}
1411
+ */
1412
+ typescript?: TypeScriptOptions;
1413
+ /**
1414
+ * Configure how TSX and JSX are transformed.
1415
+ * @see {@link https://oxc.rs/docs/guide/usage/transformer/jsx}
1416
+ */
1417
+ jsx?: 'preserve' | JsxOptions;
1418
+ /**
1419
+ * Sets the target environment for the generated JavaScript.
1420
+ *
1421
+ * The lowest target is `es2015`.
1422
+ *
1423
+ * Example:
1424
+ *
1425
+ * * `'es2015'`
1426
+ * * `['es2020', 'chrome58', 'edge16', 'firefox57', 'node12', 'safari11']`
1427
+ *
1428
+ * @default `esnext` (No transformation)
1429
+ *
1430
+ * @see {@link https://oxc.rs/docs/guide/usage/transformer/lowering#target}
1431
+ */
1432
+ target?: string | Array<string>;
1433
+ /** Behaviour for runtime helpers. */
1434
+ helpers?: Helpers;
1435
+ /**
1436
+ * Define Plugin
1437
+ * @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#define}
1438
+ */
1439
+ define?: Record<string, string>;
1440
+ /**
1441
+ * Inject Plugin
1442
+ * @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#inject}
1443
+ */
1444
+ inject?: Record<string, string | [string, string]>;
1445
+ /** Decorator plugin */
1446
+ decorator?: DecoratorOptions;
1447
+ /**
1448
+ * Third-party plugins to use.
1449
+ * @see {@link https://oxc.rs/docs/guide/usage/transformer/plugins}
1450
+ */
1451
+ plugins?: PluginsOptions;
1452
+ /**
1453
+ * Configure tsconfig handling.
1454
+ * - true: Auto-discover and load the nearest tsconfig.json
1455
+ * - TsconfigRawOptions: Use the provided inline tsconfig options
1456
+ */
1457
+ tsconfig?: boolean | BindingTsconfigRawOptions;
1458
+ /** An input source map to collapse with the output source map. */
1459
+ inputMap?: SourceMap;
1460
+ }
1461
+ /** Result of the enhanced transform API. */
1462
+ interface BindingEnhancedTransformResult {
1463
+ /**
1464
+ * The transformed code.
1465
+ *
1466
+ * If parsing failed, this will be an empty string.
1467
+ */
1468
+ code: string;
1469
+ /**
1470
+ * The source map for the transformed code.
1471
+ *
1472
+ * This will be set if {@link BindingEnhancedTransformOptions#sourcemap} is `true`.
1473
+ */
1474
+ map?: SourceMap;
1475
+ /**
1476
+ * The `.d.ts` declaration file for the transformed code. Declarations are
1477
+ * only generated if `declaration` is set to `true` and a TypeScript file
1478
+ * is provided.
1479
+ *
1480
+ * If parsing failed and `declaration` is set, this will be an empty string.
1481
+ *
1482
+ * @see {@link TypeScriptOptions#declaration}
1483
+ * @see [declaration tsconfig option](https://www.typescriptlang.org/tsconfig/#declaration)
1484
+ */
1485
+ declaration?: string;
1486
+ /**
1487
+ * Declaration source map. Only generated if both
1488
+ * {@link TypeScriptOptions#declaration declaration} and
1489
+ * {@link BindingEnhancedTransformOptions#sourcemap sourcemap} are set to `true`.
1490
+ */
1491
+ declarationMap?: SourceMap;
1492
+ /**
1493
+ * Helpers used.
1494
+ *
1495
+ * @internal
1496
+ *
1497
+ * Example:
1498
+ *
1499
+ * ```text
1500
+ * { "_objectSpread": "@oxc-project/runtime/helpers/objectSpread2" }
1501
+ * ```
1502
+ */
1503
+ helpersUsed: Record<string, string>;
1504
+ /** Parse and transformation errors. */
1505
+ errors: Array<BindingError>;
1506
+ /** Parse and transformation warnings. */
1507
+ warnings: Array<BindingError>;
1508
+ /** Paths to tsconfig files that were loaded during transformation. */
1509
+ tsconfigFilePaths: Array<string>;
1510
+ }
1511
+ type BindingError = {
1512
+ type: 'JsError';
1513
+ field0: Error;
1514
+ } | {
1515
+ type: 'NativeError';
1516
+ field0: NativeError;
1517
+ };
1418
1518
  interface BindingEsmExternalRequirePluginConfig {
1419
1519
  external: Array<BindingStringOrRegex>;
1420
1520
  skipDuplicateCheck?: boolean;
@@ -1453,6 +1553,13 @@ interface BindingHookResolveIdExtraArgs {
1453
1553
  interface BindingIsolatedDeclarationPluginConfig {
1454
1554
  stripInternal?: boolean;
1455
1555
  }
1556
+ interface BindingLogLocation {
1557
+ /** 1-based */
1558
+ line: number;
1559
+ /** 0-based position in the line in UTF-16 code units */
1560
+ column: number;
1561
+ file?: string;
1562
+ }
1456
1563
  interface BindingMagicStringOptions {
1457
1564
  filename?: string;
1458
1565
  }
@@ -1522,6 +1629,46 @@ interface BindingSourceMapOptions {
1522
1629
  interface BindingTransformHookExtraArgs {
1523
1630
  moduleType: string;
1524
1631
  }
1632
+ interface BindingTsconfig {
1633
+ files?: Array<string>;
1634
+ include?: Array<string>;
1635
+ exclude?: Array<string>;
1636
+ compilerOptions: BindingCompilerOptions;
1637
+ }
1638
+ /** TypeScript compiler options for inline tsconfig configuration. */
1639
+ interface BindingTsconfigCompilerOptions {
1640
+ /** Specifies the JSX factory function to use. */
1641
+ jsx?: 'react' | 'react-jsx' | 'react-jsxdev' | 'preserve' | 'react-native';
1642
+ /** Specifies the JSX factory function. */
1643
+ jsxFactory?: string;
1644
+ /** Specifies the JSX fragment factory function. */
1645
+ jsxFragmentFactory?: string;
1646
+ /** Specifies the module specifier for JSX imports. */
1647
+ jsxImportSource?: string;
1648
+ /** Enables experimental decorators. */
1649
+ experimentalDecorators?: boolean;
1650
+ /** Enables decorator metadata emission. */
1651
+ emitDecoratorMetadata?: boolean;
1652
+ /** Preserves module structure of imports/exports. */
1653
+ verbatimModuleSyntax?: boolean;
1654
+ /** Configures how class fields are emitted. */
1655
+ useDefineForClassFields?: boolean;
1656
+ /** The ECMAScript target version. */
1657
+ target?: string;
1658
+ /** @deprecated Use verbatimModuleSyntax instead. */
1659
+ preserveValueImports?: boolean;
1660
+ /** @deprecated Use verbatimModuleSyntax instead. */
1661
+ importsNotUsedAsValues?: 'remove' | 'preserve' | 'error';
1662
+ }
1663
+ /** Raw tsconfig options for inline configuration. */
1664
+ interface BindingTsconfigRawOptions {
1665
+ /** TypeScript compiler options. */
1666
+ compilerOptions?: BindingTsconfigCompilerOptions;
1667
+ }
1668
+ interface BindingTsconfigResult {
1669
+ tsconfig: BindingTsconfig;
1670
+ tsconfigFilePaths: Array<string>;
1671
+ }
1525
1672
  interface BindingViteBuildImportAnalysisPluginConfig {
1526
1673
  preloadCode: string;
1527
1674
  insertPreload: boolean;
@@ -1580,9 +1727,9 @@ interface BindingViteReporterPluginConfig {
1580
1727
  isLib: boolean;
1581
1728
  assetsDir: string;
1582
1729
  chunkLimit: number;
1583
- shouldLogInfo: boolean;
1584
1730
  warnLargeChunks: boolean;
1585
1731
  reportCompressedSize: boolean;
1732
+ logInfo?: (msg: string) => void;
1586
1733
  }
1587
1734
  interface BindingViteResolvePluginConfig {
1588
1735
  resolveOptions: BindingViteResolvePluginResolveOptions;
@@ -1629,21 +1776,24 @@ interface BindingViteTransformPluginConfig {
1629
1776
  transformOptions?: TransformOptions;
1630
1777
  yarnPnp?: boolean;
1631
1778
  }
1632
- interface BindingViteWasmHelperPluginConfig {
1633
- decodedBase: string;
1634
- v2?: BindingViteWasmHelperPluginV2Config;
1635
- }
1636
- interface BindingViteWasmHelperPluginV2Config {
1637
- root: string;
1638
- isLib: boolean;
1639
- publicDir: string;
1640
- assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
1641
- }
1642
1779
  declare function createTokioRuntime(blockingThreads?: number | undefined | null): void;
1643
1780
  interface ExternalMemoryStatus {
1644
1781
  freed: boolean;
1645
1782
  reason?: string;
1646
1783
  }
1784
+ /** Error emitted from native side, it only contains kind and message, no stack trace. */
1785
+ interface NativeError {
1786
+ kind: string;
1787
+ message: string;
1788
+ /** The id of the file associated with the error */
1789
+ id?: string;
1790
+ /** The exporter associated with the error (for import/export errors) */
1791
+ exporter?: string;
1792
+ /** Location information (line, column, file) */
1793
+ loc?: BindingLogLocation;
1794
+ /** Position in the source file in UTF-16 code units */
1795
+ pos?: number;
1796
+ }
1647
1797
  interface PreRenderedChunk {
1648
1798
  /** The name of this chunk, which is used in naming patterns. */
1649
1799
  name: string;
@@ -1658,8 +1808,10 @@ interface PreRenderedChunk {
1658
1808
  /** Exported variable names from this chunk. */
1659
1809
  exports: Array<string>;
1660
1810
  }
1811
+ /** @hidden This is only expected to be used by Vite */
1812
+ declare function resolveTsconfig(filename: string, cache?: TsconfigCache | undefined | null): BindingTsconfigResult | null;
1661
1813
  interface ViteImportGlobMeta {
1662
1814
  isSubImportsPattern?: boolean;
1663
1815
  }
1664
1816
  //#endregion
1665
- export { MinifyResult as A, createTokioRuntime as B, BindingViteWasmHelperPluginConfig as C, IsolatedDeclarationsResult as D, IsolatedDeclarationsOptions as E, ResolveResult as F, transformSync as G, isolatedDeclarationSync as H, ResolverFactory as I, SourceMap as L, ParseResult as M, ParserOptions as N, JsxOptions as O, PreRenderedChunk as P, TransformOptions as R, BindingViteTransformPluginConfig as S, ExternalMemoryStatus as T, moduleRunnerTransform as U, isolatedDeclaration as V, transform as W, BindingViteManifestPluginConfig as _, BindingHookResolveIdExtraArgs as a, BindingViteReporterPluginConfig as b, BindingPluginContextResolveOptions as c, BindingReplacePluginConfig as d, BindingTransformHookExtraArgs as f, BindingViteJsonPluginConfig as g, BindingViteImportGlobPluginConfig as h, BindingEsmExternalRequirePluginConfig as i, NapiResolveOptions as j, MinifyOptions as k, BindingRebuildStrategy as l, BindingViteDynamicImportVarsPluginConfig as m, BindingBundleState as n, BindingIsolatedDeclarationPluginConfig as o, BindingViteBuildImportAnalysisPluginConfig as p, BindingClientHmrUpdate as r, BindingMagicString as s, BindingBuiltinPluginName as t, BindingRenderedChunk as u, BindingViteModulePreloadPolyfillPluginConfig as v, BindingWatcherBundler as w, BindingViteResolvePluginConfig as x, BindingViteReactRefreshWrapperPluginConfig as y, TransformResult as z };
1817
+ export { IsolatedDeclarationsOptions as A, ResolverFactory as B, BindingViteModulePreloadPolyfillPluginConfig as C, BindingViteTransformPluginConfig as D, BindingViteResolvePluginConfig as E, NapiResolveOptions as F, isolatedDeclaration as G, TransformOptions as H, ParseResult as I, resolveTsconfig as J, isolatedDeclarationSync as K, ParserOptions as L, JsxOptions as M, MinifyOptions as N, BindingWatcherBundler as O, MinifyResult as P, PreRenderedChunk as R, BindingViteManifestPluginConfig as S, BindingViteReporterPluginConfig as T, TsconfigCache as U, SourceMap as V, createTokioRuntime as W, BindingTsconfigRawOptions as _, BindingEnhancedTransformOptions as a, BindingViteImportGlobPluginConfig as b, BindingHookResolveIdExtraArgs as c, BindingPluginContextResolveOptions as d, BindingRebuildStrategy as f, BindingTsconfigCompilerOptions as g, BindingTransformHookExtraArgs as h, BindingClientHmrUpdate as i, IsolatedDeclarationsResult as j, ExternalMemoryStatus as k, BindingIsolatedDeclarationPluginConfig as l, BindingReplacePluginConfig as m, BindingBundleAnalyzerPluginConfig as n, BindingEnhancedTransformResult as o, BindingRenderedChunk as p, moduleRunnerTransform as q, BindingBundleState as r, BindingEsmExternalRequirePluginConfig as s, BindingBuiltinPluginName as t, BindingMagicString as u, BindingViteBuildImportAnalysisPluginConfig as v, BindingViteReactRefreshWrapperPluginConfig as w, BindingViteJsonPluginConfig as x, BindingViteDynamicImportVarsPluginConfig as y, ResolveResult as z };
@@ -566,6 +566,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
566
566
  module.exports.ParallelJsPluginRegistry = nativeBinding.ParallelJsPluginRegistry;
567
567
  module.exports.ScheduledBuild = nativeBinding.ScheduledBuild;
568
568
  module.exports.TraceSubscriberGuard = nativeBinding.TraceSubscriberGuard;
569
+ module.exports.TsconfigCache = nativeBinding.TsconfigCache;
569
570
  module.exports.BindingAttachDebugInfo = nativeBinding.BindingAttachDebugInfo;
570
571
  module.exports.BindingBuiltinPluginName = nativeBinding.BindingBuiltinPluginName;
571
572
  module.exports.BindingChunkModuleOrderBy = nativeBinding.BindingChunkModuleOrderBy;
@@ -576,9 +577,12 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
576
577
  module.exports.BindingRebuildStrategy = nativeBinding.BindingRebuildStrategy;
577
578
  module.exports.collapseSourcemaps = nativeBinding.collapseSourcemaps;
578
579
  module.exports.createTokioRuntime = nativeBinding.createTokioRuntime;
580
+ module.exports.enhancedTransform = nativeBinding.enhancedTransform;
581
+ module.exports.enhancedTransformSync = nativeBinding.enhancedTransformSync;
579
582
  module.exports.FilterTokenKind = nativeBinding.FilterTokenKind;
580
583
  module.exports.initTraceSubscriber = nativeBinding.initTraceSubscriber;
581
584
  module.exports.registerPlugins = nativeBinding.registerPlugins;
585
+ module.exports.resolveTsconfig = nativeBinding.resolveTsconfig;
582
586
  module.exports.shutdownAsyncRuntime = nativeBinding.shutdownAsyncRuntime;
583
587
  module.exports.startAsyncRuntime = nativeBinding.startAsyncRuntime;
584
588
  }));
@@ -1,7 +1,8 @@
1
- import { n as __toESM, t as require_binding } from "./binding-DuOSzYPt.mjs";
2
- import { a as logInvalidLogPosition, c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-NH298mHo.mjs";
3
- import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-DeZqg15i.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-eAM5CAoo.mjs";
2
+ import { a as logInvalidLogPosition, c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-COHDsWqD.mjs";
3
+ import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-Dqznrk6L.mjs";
4
4
  import { a as unreachable, o as unsupported, r as noop, t as arraify } from "./misc-CCZIsXVO.mjs";
5
+ import { a as bindingifySourcemap, i as unwrapBindingResult, t as aggregateBindingErrorsIntoJsError } from "./error-CpxG7etL.mjs";
5
6
  import { parseAst } from "../parse-ast-index.mjs";
6
7
  import path from "node:path";
7
8
  import * as filter from "@voidzero-dev/vite-plus-core/rolldown/pluginutils";
@@ -227,7 +228,7 @@ function bindingAssetSource(source) {
227
228
  }
228
229
 
229
230
  //#endregion
230
- //#region \0@oxc-project+runtime@0.112.0/helpers/decorate.js
231
+ //#region \0@oxc-project+runtime@0.114.0/helpers/decorate.js
231
232
  function __decorate(decorators, target, key, desc) {
232
233
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
233
234
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -415,22 +416,6 @@ __decorate([lazyProp], OutputChunkImpl.prototype, "dynamicImports", null);
415
416
  __decorate([lazyProp], OutputChunkImpl.prototype, "moduleIds", null);
416
417
  __decorate([lazyProp], OutputChunkImpl.prototype, "map", null);
417
418
 
418
- //#endregion
419
- //#region src/types/sourcemap.ts
420
- function bindingifySourcemap(map) {
421
- if (map == null) return;
422
- return { inner: typeof map === "string" ? map : {
423
- file: map.file ?? void 0,
424
- mappings: map.mappings,
425
- sourceRoot: "sourceRoot" in map ? map.sourceRoot ?? void 0 : void 0,
426
- sources: map.sources?.map((s) => s ?? void 0),
427
- sourcesContent: map.sourcesContent?.map((s) => s ?? void 0),
428
- names: map.names,
429
- x_google_ignoreList: map.x_google_ignoreList,
430
- debugId: "debugId" in map ? map.debugId : void 0
431
- } };
432
- }
433
-
434
419
  //#endregion
435
420
  //#region src/utils/transform-to-rollup-output.ts
436
421
  function transformToRollupSourceMap(map) {
@@ -591,77 +576,6 @@ function collectChangedBundle(changed, bundle) {
591
576
  };
592
577
  }
593
578
 
594
- //#endregion
595
- //#region src/utils/error.ts
596
- var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
597
- function unwrapBindingResult(container) {
598
- if (typeof container === "object" && container !== null && "isBindingErrors" in container && container.isBindingErrors) throw aggregateBindingErrorsIntoJsError(container.errors);
599
- return container;
600
- }
601
- function normalizeBindingResult(container) {
602
- if (typeof container === "object" && container !== null && "isBindingErrors" in container && container.isBindingErrors) return aggregateBindingErrorsIntoJsError(container.errors);
603
- return container;
604
- }
605
- function normalizeBindingError(e) {
606
- return e.type === "JsError" ? e.field0 : Object.assign(/* @__PURE__ */ new Error(), {
607
- code: e.field0.kind,
608
- kind: e.field0.kind,
609
- message: e.field0.message,
610
- id: e.field0.id,
611
- exporter: e.field0.exporter,
612
- loc: e.field0.loc,
613
- pos: e.field0.pos,
614
- stack: void 0
615
- });
616
- }
617
- function aggregateBindingErrorsIntoJsError(rawErrors) {
618
- const errors = rawErrors.map(normalizeBindingError);
619
- let summary = `Build failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
620
- for (let i = 0; i < errors.length; i++) {
621
- summary += "\n";
622
- if (i >= 5) {
623
- summary += "...";
624
- break;
625
- }
626
- summary += getErrorMessage(errors[i]);
627
- }
628
- const wrapper = new Error(summary);
629
- Object.defineProperty(wrapper, "errors", {
630
- configurable: true,
631
- enumerable: true,
632
- get: () => errors,
633
- set: (value) => Object.defineProperty(wrapper, "errors", {
634
- configurable: true,
635
- enumerable: true,
636
- value
637
- })
638
- });
639
- return wrapper;
640
- }
641
- function getErrorMessage(e) {
642
- if (Object.hasOwn(e, "kind")) return e.message;
643
- let s = "";
644
- if (e.plugin) s += `[plugin ${e.plugin}]`;
645
- const id = e.id ?? e.loc?.file;
646
- if (id) {
647
- s += " " + id;
648
- if (e.loc) s += `:${e.loc.line}:${e.loc.column}`;
649
- }
650
- if (s) s += "\n";
651
- const message = `${e.name ?? "Error"}: ${e.message}`;
652
- s += message;
653
- if (e.frame) s = joinNewLine(s, e.frame);
654
- if (e.stack) s = joinNewLine(s, e.stack.replace(message, ""));
655
- if (e.cause) {
656
- s = joinNewLine(s, "Caused by:");
657
- s = joinNewLine(s, getErrorMessage(e.cause).split("\n").map((line) => " " + line).join("\n"));
658
- }
659
- return s;
660
- }
661
- function joinNewLine(s1, s2) {
662
- return s1.replace(/\n+$/, "") + "\n" + s2.replace(/^\n+/, "");
663
- }
664
-
665
579
  //#endregion
666
580
  //#region src/utils/transform-module-info.ts
667
581
  function transformModuleInfo(info, option) {
@@ -679,6 +593,7 @@ function transformModuleInfo(info, option) {
679
593
  dynamicallyImportedIds: info.dynamicallyImportedIds,
680
594
  exports: info.exports,
681
595
  isEntry: info.isEntry,
596
+ inputFormat: info.inputFormat,
682
597
  ...option
683
598
  };
684
599
  }
@@ -892,6 +807,7 @@ function bindingifyRenderChunkFilter(filterOption) {
892
807
 
893
808
  //#endregion
894
809
  //#region src/plugin/bindingify-plugin-hook-meta.ts
810
+ var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
895
811
  function bindingifyPluginHookMeta(options) {
896
812
  return { order: bindingPluginOrder(options.order) };
897
813
  }
@@ -1832,6 +1748,14 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
1832
1748
  get legalComments() {
1833
1749
  return this.inner.legalComments;
1834
1750
  }
1751
+ get comments() {
1752
+ const c = this.inner.comments;
1753
+ return {
1754
+ legal: c.legal ?? true,
1755
+ annotation: c.annotation ?? true,
1756
+ jsdoc: c.jsdoc ?? true
1757
+ };
1758
+ }
1835
1759
  get polyfillRequire() {
1836
1760
  return this.inner.polyfillRequire;
1837
1761
  }
@@ -1887,6 +1811,7 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapIgnoreLi
1887
1811
  __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "sourcemapPathTransform", null);
1888
1812
  __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "minify", null);
1889
1813
  __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "legalComments", null);
1814
+ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "comments", null);
1890
1815
  __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "polyfillRequire", null);
1891
1816
  __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "plugins", null);
1892
1817
  __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "preserveModules", null);
@@ -2254,4 +2179,4 @@ function bindingifyPreserveEntrySignatures(preserveEntrySignatures) {
2254
2179
  }
2255
2180
 
2256
2181
  //#endregion
2257
- export { RUNTIME_MODULE_ID as C, version as E, logLevelPriority as S, description as T, normalizeLog as _, aggregateBindingErrorsIntoJsError as a, LOG_LEVEL_INFO as b, transformToRollupOutput as c, __decorate as d, transformAssetSource as f, normalizeHook as g, MinimalPluginContextImpl as h, transformModuleInfo as i, bindingifySourcemap as l, PlainObjectLike as m, PluginContextData as n, normalizeBindingResult as o, lazyProp as p, bindingifyPlugin as r, unwrapBindingResult as s, bindingifyInputOptions as t, transformRenderedChunk as u, LOG_LEVEL_DEBUG as v, VERSION as w, LOG_LEVEL_WARN as x, LOG_LEVEL_ERROR as y };
2182
+ export { version as S, LOG_LEVEL_WARN as _, transformToRollupOutput as a, VERSION as b, transformAssetSource as c, MinimalPluginContextImpl as d, normalizeHook as f, LOG_LEVEL_INFO as g, LOG_LEVEL_ERROR as h, transformModuleInfo as i, lazyProp as l, LOG_LEVEL_DEBUG as m, PluginContextData as n, transformRenderedChunk as o, normalizeLog as p, bindingifyPlugin as r, __decorate as s, bindingifyInputOptions as t, PlainObjectLike as u, logLevelPriority as v, description as x, RUNTIME_MODULE_ID as y };
@@ -1,5 +1,5 @@
1
- import { C as BindingViteWasmHelperPluginConfig, b as BindingViteReporterPluginConfig, g as BindingViteJsonPluginConfig, h as BindingViteImportGlobPluginConfig, i as BindingEsmExternalRequirePluginConfig, m as BindingViteDynamicImportVarsPluginConfig, o as BindingIsolatedDeclarationPluginConfig, p as BindingViteBuildImportAnalysisPluginConfig, v as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteResolvePluginConfig, y as BindingViteReactRefreshWrapperPluginConfig } from "./binding-D-XMzSaG.mjs";
2
- import { Lt as StringOrRegExp, M as BuiltinPlugin } from "./define-config-U4pj0ZDn.mjs";
1
+ import { C as BindingViteModulePreloadPolyfillPluginConfig, E as BindingViteResolvePluginConfig, T as BindingViteReporterPluginConfig, b as BindingViteImportGlobPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, v as BindingViteBuildImportAnalysisPluginConfig, w as BindingViteReactRefreshWrapperPluginConfig, x as BindingViteJsonPluginConfig, y as BindingViteDynamicImportVarsPluginConfig } from "./binding-B4HaVp87.mjs";
2
+ import { M as BuiltinPlugin, Rt as StringOrRegExp } from "./define-config-RYvN7eA1.mjs";
3
3
 
4
4
  //#region src/builtin-plugin/constructors.d.ts
5
5
  declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
@@ -10,7 +10,6 @@ type DynamicImportVarsPluginConfig = Omit<BindingViteDynamicImportVarsPluginConf
10
10
  declare function viteDynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
11
11
  declare function viteImportGlobPlugin(config?: BindingViteImportGlobPluginConfig): BuiltinPlugin;
12
12
  declare function viteReporterPlugin(config: BindingViteReporterPluginConfig): BuiltinPlugin;
13
- declare function viteWasmHelperPlugin(config: BindingViteWasmHelperPluginConfig): BuiltinPlugin;
14
13
  declare function viteWasmFallbackPlugin(): BuiltinPlugin;
15
14
  declare function viteLoadFallbackPlugin(): BuiltinPlugin;
16
15
  declare function viteJsonPlugin(config: BindingViteJsonPluginConfig): BuiltinPlugin;
@@ -25,4 +24,4 @@ type ViteReactRefreshWrapperPluginConfig = Omit<BindingViteReactRefreshWrapperPl
25
24
  };
26
25
  declare function viteReactRefreshWrapperPlugin(config: ViteReactRefreshWrapperPluginConfig): BuiltinPlugin;
27
26
  //#endregion
28
- export { viteImportGlobPlugin as a, viteModulePreloadPolyfillPlugin as c, viteResolvePlugin as d, viteWasmFallbackPlugin as f, viteDynamicImportVarsPlugin as i, viteReactRefreshWrapperPlugin as l, viteWebWorkerPostPlugin as m, isolatedDeclarationPlugin as n, viteJsonPlugin as o, viteWasmHelperPlugin as p, viteBuildImportAnalysisPlugin as r, viteLoadFallbackPlugin as s, esmExternalRequirePlugin as t, viteReporterPlugin as u };
27
+ export { viteImportGlobPlugin as a, viteModulePreloadPolyfillPlugin as c, viteResolvePlugin as d, viteWasmFallbackPlugin as f, viteDynamicImportVarsPlugin as i, viteReactRefreshWrapperPlugin as l, isolatedDeclarationPlugin as n, viteJsonPlugin as o, viteWebWorkerPostPlugin as p, viteBuildImportAnalysisPlugin as r, viteLoadFallbackPlugin as s, esmExternalRequirePlugin as t, viteReporterPlugin as u };
@@ -1,4 +1,4 @@
1
- import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-DeZqg15i.mjs";
1
+ import { a as makeBuiltinPluginCallable, n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-Dqznrk6L.mjs";
2
2
 
3
3
  //#region src/builtin-plugin/constructors.ts
4
4
  function viteModulePreloadPolyfillPlugin(config) {
@@ -17,9 +17,6 @@ function viteImportGlobPlugin(config) {
17
17
  function viteReporterPlugin(config) {
18
18
  return new BuiltinPlugin("builtin:vite-reporter", config);
19
19
  }
20
- function viteWasmHelperPlugin(config) {
21
- return new BuiltinPlugin("builtin:vite-wasm-helper", config);
22
- }
23
20
  function viteWasmFallbackPlugin() {
24
21
  return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:vite-wasm-fallback"));
25
22
  }
@@ -58,4 +55,4 @@ function viteReactRefreshWrapperPlugin(config) {
58
55
  }
59
56
 
60
57
  //#endregion
61
- export { viteImportGlobPlugin as a, viteModulePreloadPolyfillPlugin as c, viteResolvePlugin as d, viteWasmFallbackPlugin as f, viteDynamicImportVarsPlugin as i, viteReactRefreshWrapperPlugin as l, viteWebWorkerPostPlugin as m, isolatedDeclarationPlugin as n, viteJsonPlugin as o, viteWasmHelperPlugin as p, viteBuildImportAnalysisPlugin as r, viteLoadFallbackPlugin as s, esmExternalRequirePlugin as t, viteReporterPlugin as u };
58
+ export { viteImportGlobPlugin as a, viteModulePreloadPolyfillPlugin as c, viteResolvePlugin as d, viteWasmFallbackPlugin as f, viteDynamicImportVarsPlugin as i, viteReactRefreshWrapperPlugin as l, isolatedDeclarationPlugin as n, viteJsonPlugin as o, viteWebWorkerPostPlugin as p, viteBuildImportAnalysisPlugin as r, viteLoadFallbackPlugin as s, esmExternalRequirePlugin as t, viteReporterPlugin as u };