@rolldown/browser 1.0.0-beta.54 → 1.0.0-beta.56

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 (44) hide show
  1. package/dist/cli.mjs +18 -18
  2. package/dist/config.d.mts +1 -1
  3. package/dist/config.mjs +7 -7
  4. package/dist/{constructors-CPxFX1pF.js → constructors-DMeuUDyD.js} +1 -1
  5. package/dist/experimental-index.browser.mjs +39 -4
  6. package/dist/experimental-index.d.mts +38 -5
  7. package/dist/experimental-index.mjs +37 -6
  8. package/dist/filter-index.d.mts +1 -1
  9. package/dist/filter-index.mjs +2 -2
  10. package/dist/get-log-filter.d.mts +7 -0
  11. package/dist/get-log-filter.mjs +48 -0
  12. package/dist/index.browser.mjs +2 -2
  13. package/dist/index.d.mts +4 -3
  14. package/dist/index.mjs +7 -7
  15. package/dist/{normalize-string-or-regex-Crhxh-US.js → normalize-string-or-regex-B-Y4k0qo.js} +6 -4
  16. package/dist/parallel-plugin-worker.mjs +3 -3
  17. package/dist/parallel-plugin.d.mts +2 -2
  18. package/dist/parse-ast-index.d.mts +1 -1
  19. package/dist/parse-ast-index.mjs +1 -1
  20. package/dist/plugins-index.browser.mjs +2 -2
  21. package/dist/plugins-index.d.mts +3 -3
  22. package/dist/plugins-index.mjs +2 -2
  23. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  24. package/dist/{rolldown-build-BEfycLl9.js → rolldown-build-BEV6JVIl.js} +76 -29
  25. package/dist/shared/{binding-yIBVkeOE.d.mts → binding-CDyF6W3D.d.mts} +15 -10
  26. package/dist/shared/{bindingify-input-options-CxbvPG4D.mjs → bindingify-input-options-kzSFdf_-.mjs} +53 -17
  27. package/dist/shared/{constructors-D9uR3o6d.d.mts → constructors-B0L_9ar3.d.mts} +2 -2
  28. package/dist/shared/{constructors-C4qFjfHR.mjs → constructors-Dw9UOO6Z.mjs} +1 -1
  29. package/dist/shared/{define-config-DkpMlrZ3.d.mts → define-config-CrCCK_Ci.d.mts} +19 -7
  30. package/dist/shared/{load-config-BqTtlue1.mjs → load-config-vlnYfd7q.mjs} +1 -1
  31. package/dist/shared/logging-BpAvp7KV.d.mts +37 -0
  32. package/dist/shared/{logs-CPsamAuj.mjs → logs-DEfpOy5A.mjs} +4 -2
  33. package/dist/shared/{normalize-string-or-regex-B8NuOx7w.mjs → normalize-string-or-regex-CwM9ci6w.mjs} +4 -4
  34. package/dist/shared/{parse-ast-index-C0k-VwRM.mjs → parse-ast-index-DZPue_kI.mjs} +11 -8
  35. package/dist/shared/{rolldown-BeAWDsL_.mjs → rolldown-DtiFL1Ph.mjs} +1 -1
  36. package/dist/shared/{rolldown-build-yjeMNdrl.mjs → rolldown-build-B3XDwemQ.mjs} +22 -14
  37. package/dist/shared/utils-B3dcnHc8.d.mts +29 -0
  38. package/dist/shared/{watch-C7zN9oTc.mjs → watch-BHMj7YNj.mjs} +9 -9
  39. package/package.json +1 -1
  40. package/dist/shared/utils-mjPIk7Yj.d.mts +0 -64
  41. /package/dist/shared/{composable-filters-DZ5ToxRJ.mjs → composable-filters-G1eqjHFo.mjs} +0 -0
  42. /package/dist/shared/{define-config-DfeZGBEt.mjs → define-config-BF4P-Pum.mjs} +0 -0
  43. /package/dist/shared/{misc-5GYLGQ20.mjs → misc-BubmxcE3.mjs} +0 -0
  44. /package/dist/shared/{prompt-pmGBC3ws.mjs → prompt-CNt8OM9C.mjs} +0 -0
@@ -1,5 +1,5 @@
1
- import { a as logInvalidLogPosition, c as logPluginError, n as error } from "./logs-CPsamAuj.mjs";
2
- import { r as noop } from "./misc-5GYLGQ20.mjs";
1
+ import { a as logInvalidLogPosition, c as logPluginError, n as error } from "./logs-DEfpOy5A.mjs";
2
+ import { r as noop } from "./misc-BubmxcE3.mjs";
3
3
  import { BindingCallableBuiltinPlugin } from "../rolldown-binding.wasi.cjs";
4
4
 
5
5
  //#region src/log/logging.ts
@@ -32,7 +32,7 @@ function getLogHandler(level, code, logger, pluginName, logLevel) {
32
32
 
33
33
  //#endregion
34
34
  //#region package.json
35
- var version = "1.0.0-beta.54";
35
+ var version = "1.0.0-beta.56";
36
36
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
37
37
 
38
38
  //#endregion
@@ -190,7 +190,7 @@ function bindingAssetSource(source) {
190
190
  }
191
191
 
192
192
  //#endregion
193
- //#region \0@oxc-project+runtime@0.102.0/helpers/decorate.js
193
+ //#region \0@oxc-project+runtime@0.103.0/helpers/decorate.js
194
194
  function __decorate(decorators, target, key, desc) {
195
195
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
196
196
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -1,7 +1,7 @@
1
- import { l as locate, n as error, s as logParseError, u as getCodeFrame } from "./logs-CPsamAuj.mjs";
1
+ import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./logs-DEfpOy5A.mjs";
2
2
  import { parse, parseSync } from "../rolldown-binding.wasi.cjs";
3
3
 
4
- //#region ../../node_modules/.pnpm/oxc-parser@0.102.0/node_modules/oxc-parser/src-js/wrap.js
4
+ //#region ../../node_modules/.pnpm/oxc-parser@0.103.0/node_modules/oxc-parser/src-js/wrap.js
5
5
  function wrap$1(result) {
6
6
  let program, module, comments, errors;
7
7
  return {
@@ -54,12 +54,13 @@ function parseSync$1(filename, sourceText, options) {
54
54
 
55
55
  //#endregion
56
56
  //#region src/parse-ast-index.ts
57
- function wrap(result, sourceText) {
58
- if (result.errors.length > 0) return normalizeParseError(sourceText, result.errors);
57
+ function wrap(result, filename, sourceText) {
58
+ if (result.errors.length > 0) return normalizeParseError(filename, sourceText, result.errors);
59
59
  return result.program;
60
60
  }
61
- function normalizeParseError(sourceText, errors) {
61
+ function normalizeParseError(filename, sourceText, errors) {
62
62
  let message = `Parse failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
63
+ const pos = errors[0]?.labels?.[0]?.start;
63
64
  for (let i = 0; i < errors.length; i++) {
64
65
  if (i >= 5) {
65
66
  message += "\n...";
@@ -72,7 +73,9 @@ function normalizeParseError(sourceText, errors) {
72
73
  return getCodeFrame(sourceText, location.line, location.column);
73
74
  }).filter(Boolean).join("\n");
74
75
  }
75
- return error(logParseError(message));
76
+ const log = logParseError(message, filename, pos);
77
+ if (pos !== void 0 && filename) augmentCodeLocation(log, pos, sourceText, filename);
78
+ return error(log);
76
79
  }
77
80
  const defaultParserOptions = {
78
81
  lang: "js",
@@ -82,13 +85,13 @@ function parseAst(sourceText, options, filename) {
82
85
  return wrap(parseSync$1(filename ?? "file.js", sourceText, {
83
86
  ...defaultParserOptions,
84
87
  ...options
85
- }), sourceText);
88
+ }), filename, sourceText);
86
89
  }
87
90
  async function parseAstAsync(sourceText, options, filename) {
88
91
  return wrap(await parse$1(filename ?? "file.js", sourceText, {
89
92
  ...defaultParserOptions,
90
93
  ...options
91
- }), sourceText);
94
+ }), filename, sourceText);
92
95
  }
93
96
 
94
97
  //#endregion
@@ -1,4 +1,4 @@
1
- import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build-yjeMNdrl.mjs";
1
+ import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build-B3XDwemQ.mjs";
2
2
 
3
3
  //#region src/api/rolldown/index.ts
4
4
  const rolldown = async (input) => {
@@ -1,7 +1,7 @@
1
- import { i as logInputHookInOutputPlugin, n as error } from "./logs-CPsamAuj.mjs";
2
- import { i as unimplemented } from "./misc-5GYLGQ20.mjs";
3
- import { C as LOG_LEVEL_DEBUG, D as logLevelPriority, E as LOG_LEVEL_WARN, S as normalizeLog, T as LOG_LEVEL_INFO, _ as PlainObjectLike, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, n as BuiltinPlugin, p as __decorate, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_ERROR, y as VERSION } from "./normalize-string-or-regex-B8NuOx7w.mjs";
4
- import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options-CxbvPG4D.mjs";
1
+ import { i as logInputHookInOutputPlugin, n as error } from "./logs-DEfpOy5A.mjs";
2
+ import { i as unimplemented } from "./misc-BubmxcE3.mjs";
3
+ import { C as LOG_LEVEL_DEBUG, D as logLevelPriority, E as LOG_LEVEL_WARN, S as normalizeLog, T as LOG_LEVEL_INFO, _ as PlainObjectLike, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, n as BuiltinPlugin, p as __decorate, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_ERROR, y as VERSION } from "./normalize-string-or-regex-CwM9ci6w.mjs";
4
+ import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options-kzSFdf_-.mjs";
5
5
  import { Worker } from "node:worker_threads";
6
6
  import { BindingBundler, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
7
7
  import path from "node:path";
@@ -1607,7 +1607,7 @@ const ChecksOptionsSchema = strictObject({
1607
1607
  eval: pipe(optional(boolean()), description("Whether to emit warning when detecting eval")),
1608
1608
  missingGlobalName: pipe(optional(boolean()), description("Whether to emit warning when detecting missing global name")),
1609
1609
  missingNameOptionForIifeExport: pipe(optional(boolean()), description("Whether to emit warning when detecting missing name option for iife export")),
1610
- mixedExport: pipe(optional(boolean()), description("Whether to emit warning when detecting mixed export")),
1610
+ mixedExports: pipe(optional(boolean()), description("Whether to emit warning when detecting mixed exports")),
1611
1611
  unresolvedEntry: pipe(optional(boolean()), description("Whether to emit warning when detecting unresolved entry")),
1612
1612
  unresolvedImport: pipe(optional(boolean()), description("Whether to emit warning when detecting unresolved import")),
1613
1613
  filenameConflict: pipe(optional(boolean()), description("Whether to emit warning when detecting filename conflict")),
@@ -1696,11 +1696,11 @@ const OnLogSchema = pipe(vFunction(), args(tuple([
1696
1696
  LogOrStringHandlerSchema
1697
1697
  ])));
1698
1698
  const OnwarnSchema = pipe(vFunction(), args(tuple([RollupLogSchema, pipe(vFunction(), args(tuple([union([RollupLogWithStringSchema, pipe(vFunction(), returns(RollupLogWithStringSchema))])])))])));
1699
- const HmrSchema = union([boolean(), strictObject({
1700
- new: optional(boolean()),
1699
+ const DevModeSchema = union([boolean(), strictObject({
1701
1700
  port: optional(number()),
1702
1701
  host: optional(string()),
1703
- implement: optional(string())
1702
+ implement: optional(string()),
1703
+ lazy: optional(boolean())
1704
1704
  })]);
1705
1705
  const InputOptionsSchema = strictObject({
1706
1706
  input: optional(InputOptionSchema),
@@ -1729,7 +1729,7 @@ const InputOptionsSchema = strictObject({
1729
1729
  strictExecutionOrder: optional(boolean()),
1730
1730
  onDemandWrapping: optional(boolean()),
1731
1731
  incrementalBuild: optional(boolean()),
1732
- hmr: optional(HmrSchema),
1732
+ devMode: optional(DevModeSchema),
1733
1733
  attachDebugInfo: optional(union([
1734
1734
  literal("none"),
1735
1735
  literal("simple"),
@@ -1852,6 +1852,8 @@ const OutputOptionsSchema = strictObject({
1852
1852
  sourcemapPathTransform: optional(custom(() => true)),
1853
1853
  banner: optional(union([string(), AddonFunctionSchema])),
1854
1854
  footer: optional(union([string(), AddonFunctionSchema])),
1855
+ postBanner: optional(union([string(), AddonFunctionSchema])),
1856
+ postFooter: optional(union([string(), AddonFunctionSchema])),
1855
1857
  intro: optional(union([string(), AddonFunctionSchema])),
1856
1858
  outro: optional(union([string(), AddonFunctionSchema])),
1857
1859
  extend: pipe(optional(boolean()), description("Extend global variable defined by name in IIFE / UMD formats")),
@@ -1899,6 +1901,8 @@ const OutputCliOverrideSchema = strictObject({
1899
1901
  sanitizeFileName: pipe(optional(boolean()), description("Sanitize file name")),
1900
1902
  banner: pipe(optional(string()), description(getAddonDescription("top", "outside"))),
1901
1903
  footer: pipe(optional(string()), description(getAddonDescription("bottom", "outside"))),
1904
+ postBanner: pipe(optional(string()), description("A string to prepend to the top of each chunk. Applied after the `renderChunk` hook and minification")),
1905
+ postFooter: pipe(optional(string()), description("A string to append to the bottom of each chunk. Applied after the `renderChunk` hook and minification")),
1902
1906
  intro: pipe(optional(string()), description(getAddonDescription("top", "inside"))),
1903
1907
  outro: pipe(optional(string()), description(getAddonDescription("bottom", "inside"))),
1904
1908
  esModule: pipe(optional(boolean()), description("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")),
@@ -2014,7 +2018,10 @@ var ChunkingContextImpl = class {
2014
2018
  //#endregion
2015
2019
  //#region src/utils/bindingify-output-options.ts
2016
2020
  function bindingifyOutputOptions(outputOptions) {
2017
- const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir } = outputOptions;
2021
+ const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir } = outputOptions;
2022
+ if (outputOptions.inlineDynamicImports === true) {
2023
+ if (manualChunks != null) throw new Error("Invalid value \"true\" for option \"output.inlineDynamicImports\" - this option is not supported for \"output.manualChunks\".");
2024
+ }
2018
2025
  const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
2019
2026
  return {
2020
2027
  dir,
@@ -2029,6 +2036,8 @@ function bindingifyOutputOptions(outputOptions) {
2029
2036
  sourcemapPathTransform,
2030
2037
  banner: bindingifyAddon(banner),
2031
2038
  footer: bindingifyAddon(footer),
2039
+ postBanner: bindingifyAddon(postBanner),
2040
+ postFooter: bindingifyAddon(postFooter),
2032
2041
  intro: bindingifyAddon(intro),
2033
2042
  outro: bindingifyAddon(outro),
2034
2043
  extend: outputOptions.extend,
@@ -2059,10 +2068,9 @@ function bindingifyOutputOptions(outputOptions) {
2059
2068
  };
2060
2069
  }
2061
2070
  function bindingifyAddon(configAddon) {
2062
- return async (chunk) => {
2063
- if (typeof configAddon === "function") return configAddon(transformRenderedChunk(chunk));
2064
- return configAddon || "";
2065
- };
2071
+ if (configAddon == null || configAddon === "") return;
2072
+ if (typeof configAddon === "function") return async (chunk) => configAddon(transformRenderedChunk(chunk));
2073
+ return configAddon;
2066
2074
  }
2067
2075
  function bindingifyFormat(format) {
2068
2076
  switch (format) {
@@ -0,0 +1,29 @@
1
+ import { a as RollupLog } from "./logging-BpAvp7KV.mjs";
2
+ import { t as BindingBuiltinPluginName } from "./binding-CDyF6W3D.mjs";
3
+
4
+ //#region src/types/utils.d.ts
5
+ type MaybePromise<T> = T | Promise<T>;
6
+ type NullValue<T = void> = T | undefined | null | void;
7
+ type PartialNull<T> = { [P in keyof T]: T[P] | null };
8
+ type MakeAsync<Function_> = Function_ extends ((this: infer This, ...parameters: infer Arguments) => infer Return) ? (this: This, ...parameters: Arguments) => Return | Promise<Return> : never;
9
+ type MaybeArray<T> = T | T[];
10
+ type StringOrRegExp = string | RegExp;
11
+ //#endregion
12
+ //#region src/log/log-handler.d.ts
13
+ type LoggingFunction = (log: RollupLog | string | (() => RollupLog | string)) => void;
14
+ type LoggingFunctionWithPosition = (log: RollupLog | string | (() => RollupLog | string), pos?: number | {
15
+ column: number;
16
+ line: number;
17
+ }) => void;
18
+ type WarningHandlerWithDefault = (warning: RollupLog, defaultHandler: LoggingFunction) => void;
19
+ //#endregion
20
+ //#region src/builtin-plugin/utils.d.ts
21
+ declare class BuiltinPlugin {
22
+ name: BindingBuiltinPluginName;
23
+ _options?: unknown;
24
+ /** Vite-specific option to control plugin ordering */
25
+ enforce?: "pre" | "post";
26
+ constructor(name: BindingBuiltinPluginName, _options?: unknown);
27
+ }
28
+ //#endregion
29
+ export { MakeAsync as a, NullValue as c, WarningHandlerWithDefault as i, PartialNull as l, LoggingFunction as n, MaybeArray as o, LoggingFunctionWithPosition as r, MaybePromise as s, BuiltinPlugin as t, StringOrRegExp as u };
@@ -1,8 +1,8 @@
1
- import { o as logMultiplyNotifyOption } from "./logs-CPsamAuj.mjs";
2
- import { t as arraify } from "./misc-5GYLGQ20.mjs";
3
- import { E as LOG_LEVEL_WARN } from "./normalize-string-or-regex-B8NuOx7w.mjs";
4
- import { l as PluginDriver, n as createBundlerOptions } from "./rolldown-build-yjeMNdrl.mjs";
5
- import { a as aggregateBindingErrorsIntoJsError } from "./bindingify-input-options-CxbvPG4D.mjs";
1
+ import { o as logMultiplyNotifyOption } from "./logs-DEfpOy5A.mjs";
2
+ import { t as arraify } from "./misc-BubmxcE3.mjs";
3
+ import { E as LOG_LEVEL_WARN } from "./normalize-string-or-regex-CwM9ci6w.mjs";
4
+ import { l as PluginDriver, n as createBundlerOptions } from "./rolldown-build-B3XDwemQ.mjs";
5
+ import { a as aggregateBindingErrorsIntoJsError } from "./bindingify-input-options-kzSFdf_-.mjs";
6
6
  import { BindingWatcher, shutdownAsyncRuntime } from "../rolldown-binding.wasi.cjs";
7
7
 
8
8
  //#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
@@ -203,18 +203,18 @@ var SignalExit = class extends SignalExitBase {
203
203
  }
204
204
  };
205
205
  const process$1 = globalThis.process;
206
- const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
206
+ const { onExit: onExit$1, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
207
207
 
208
208
  //#endregion
209
209
  //#region src/utils/signal-exit.ts
210
- function onExit$1(...args) {
210
+ function onExit(...args) {
211
211
  if (typeof process === "object" && process.versions.webcontainer) {
212
212
  process.on("exit", (code) => {
213
213
  args[0](code, null);
214
214
  });
215
215
  return;
216
216
  }
217
- onExit(...args);
217
+ onExit$1(...args);
218
218
  }
219
219
 
220
220
  //#endregion
@@ -347,4 +347,4 @@ const watch = (input) => {
347
347
  };
348
348
 
349
349
  //#endregion
350
- export { onExit$1 as n, watch as t };
350
+ export { onExit as n, watch as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolldown/browser",
3
- "version": "1.0.0-beta.54",
3
+ "version": "1.0.0-beta.56",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "type": "module",
@@ -1,64 +0,0 @@
1
- import { t as BindingBuiltinPluginName } from "./binding-yIBVkeOE.mjs";
2
-
3
- //#region src/log/logging.d.ts
4
- type LogLevel = "info" | "debug" | "warn";
5
- type LogLevelOption = LogLevel | "silent";
6
- type LogLevelWithError = LogLevel | "error";
7
- interface RollupLog {
8
- binding?: string;
9
- cause?: unknown;
10
- code?: string;
11
- exporter?: string;
12
- frame?: string;
13
- hook?: string;
14
- id?: string;
15
- ids?: string[];
16
- loc?: {
17
- column: number;
18
- file?: string;
19
- line: number;
20
- };
21
- message: string;
22
- meta?: any;
23
- names?: string[];
24
- plugin?: string;
25
- pluginCode?: unknown;
26
- pos?: number;
27
- reexporter?: string;
28
- stack?: string;
29
- url?: string;
30
- }
31
- type RollupLogWithString = RollupLog | string;
32
- interface RollupError extends RollupLog {
33
- name?: string;
34
- stack?: string;
35
- watchFiles?: string[];
36
- }
37
- type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
38
- //#endregion
39
- //#region src/types/utils.d.ts
40
- type MaybePromise<T> = T | Promise<T>;
41
- type NullValue<T = void> = T | undefined | null | void;
42
- type PartialNull<T> = { [P in keyof T]: T[P] | null };
43
- type MakeAsync<Function_> = Function_ extends ((this: infer This, ...parameters: infer Arguments) => infer Return) ? (this: This, ...parameters: Arguments) => Return | Promise<Return> : never;
44
- type MaybeArray<T> = T | T[];
45
- type StringOrRegExp = string | RegExp;
46
- //#endregion
47
- //#region src/log/log-handler.d.ts
48
- type LoggingFunction = (log: RollupLog | string | (() => RollupLog | string)) => void;
49
- type LoggingFunctionWithPosition = (log: RollupLog | string | (() => RollupLog | string), pos?: number | {
50
- column: number;
51
- line: number;
52
- }) => void;
53
- type WarningHandlerWithDefault = (warning: RollupLog, defaultHandler: LoggingFunction) => void;
54
- //#endregion
55
- //#region src/builtin-plugin/utils.d.ts
56
- declare class BuiltinPlugin {
57
- name: BindingBuiltinPluginName;
58
- _options?: unknown;
59
- /** Vite-specific option to control plugin ordering */
60
- enforce?: "pre" | "post";
61
- constructor(name: BindingBuiltinPluginName, _options?: unknown);
62
- }
63
- //#endregion
64
- export { MakeAsync as a, NullValue as c, LogLevel as d, LogLevelOption as f, RollupLogWithString as g, RollupLog as h, WarningHandlerWithDefault as i, PartialNull as l, RollupError as m, LoggingFunction as n, MaybeArray as o, LogOrStringHandler as p, LoggingFunctionWithPosition as r, MaybePromise as s, BuiltinPlugin as t, StringOrRegExp as u };