rollipop 1.0.0-alpha.21 → 1.0.0-alpha.22

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/dist/index.d.ts CHANGED
@@ -22,24 +22,29 @@ type DeepRequired<T> = { [K in keyof T]-?: T[K] extends object ? DeepRequired<T[
22
22
  interface Reporter {
23
23
  update(event: ReportableEvent): void;
24
24
  }
25
- type ReportableEvent = {
25
+ interface OptionalBundlerEvent {
26
+ bundlerId?: string;
27
+ }
28
+ type ReportableEvent = ({
26
29
  type: 'bundle_build_started';
27
- } | {
30
+ } & OptionalBundlerEvent) | ({
28
31
  type: 'bundle_build_done';
29
32
  totalModules: number;
33
+ transformedModules: number;
34
+ cacheHitModules: number;
30
35
  duration: number;
31
- } | {
36
+ } & OptionalBundlerEvent) | ({
32
37
  type: 'bundle_build_failed';
33
38
  error: Error;
34
- } | {
39
+ } & OptionalBundlerEvent) | ({
35
40
  type: 'transform';
36
41
  id: string;
37
42
  totalModules: number | undefined;
38
43
  transformedModules: number;
39
- } | {
44
+ } & OptionalBundlerEvent) | ({
40
45
  type: 'watch_change';
41
46
  id: string;
42
- } | MetroCompatibleClientLogEvent;
47
+ } & OptionalBundlerEvent) | MetroCompatibleClientLogEvent;
43
48
  type MetroCompatibleClientLogEvent = {
44
49
  type: 'client_log';
45
50
  level: 'trace' | 'info' | 'warn' | 'log' | 'group' | 'groupCollapsed' | 'groupEnd' | 'debug'
@@ -51,6 +56,7 @@ type MetroCompatibleClientLogEvent = {
51
56
  */
52
57
  | 'error';
53
58
  data: any[];
59
+ bundlerId?: string;
54
60
  };
55
61
  interface PackageJson {
56
62
  name: string;
@@ -306,7 +312,8 @@ interface PluginContext {
306
312
  //#region src/core/plugins/types.d.ts
307
313
  type PluginConfig = Omit<Config, 'plugins'>;
308
314
  type ResolvedPluginConfig = Omit<ResolvedConfig, 'plugins'>;
309
- type Plugin = rolldown.Plugin & {
315
+ type InternalRolldownHook = 'transformCacheHit';
316
+ type Plugin = Omit<rolldown.Plugin, InternalRolldownHook> & {
310
317
  config?: PluginConfig | ((this: PluginContext, config: PluginConfig) => AsyncResult<PluginConfig | null | void>);
311
318
  configResolved?: (this: PluginContext, config: ResolvedConfig) => AsyncResult<void>;
312
319
  configureServer?: (this: PluginContext, server: DevServer) => AsyncResult<void | (() => AsyncResult<void>)>;
@@ -1220,4 +1227,4 @@ declare namespace cli_d_exports {
1220
1227
  }
1221
1228
  declare function run(argv: string[]): void;
1222
1229
  //#endregion
1223
- export { assets_d_exports as AssetUtils, AsyncResult, BabelTransformConfig, BuildOptions, BuildType, BundleDetails, Bundler, BundlerContext, BundlerState, CodegenConfig, Config, constants_d_exports as Constants, DEFAULT_HOST, DEFAULT_PORT, DEV_SERVER_ASSET_PATH, DeepRequired, DefaultConfig, DefineConfigContext, DevEngine, DevEngineOptions, DevModeConfig, type DevRuntime, DevRuntimeInterface, DevRuntimeMessenger, DevRuntimeModule, DevServer, DevServerEvents, DynamicUserConfig, ExperimentalConfig, FastifyInstance, FlowConfig, FormattedError, HMRClientLogLevel, HMRClientMessage, HMRContext, HMRCustomHandler, HMRCustomMessage, HMRServerError, HMRServerMessage, HmrConfig, InteractiveCommand, InteractiveCommandContext, InteractiveModeOptions, LoadConfigOptions, LoadEnvOptions, MaybePromise, Middlewares, NullValue, OptimizationConfig, PackageJson, type Plugin, type PluginConfig, PluginFlattenConfig, PluginOption, Polyfill, PolyfillType, PolyfillWithCode, PolyfillWithPath, ReactNativeConfig, ReportableEvent, Reporter, ResolvedConfig, ResolverConfig, RolldownConfig, type RollipopReactNativeFlowConfig, type RollipopReactNativeWorkletsConfig, SerializerConfig, ServerOptions, SwcTransformConfig, TerminalConfig, TransformRule, TransformerConfig, UserConfig, WatcherConfig, cli_d_exports as cli, createCommand, createDevServer, createReactNativeCliCommand, defineConfig, flattenPluginOption, getDefaultConfig, invokeConfigResolved, loadConfig, loadEnv, mergeConfig, index_d_exports as plugins, resetCache, resolvePluginConfig, rolldown, rolldownExperimental, runBuild, runServer, setupInteractiveMode };
1230
+ export { assets_d_exports as AssetUtils, AsyncResult, BabelTransformConfig, BuildOptions, BuildType, BundleDetails, Bundler, BundlerContext, BundlerState, CodegenConfig, Config, constants_d_exports as Constants, DEFAULT_HOST, DEFAULT_PORT, DEV_SERVER_ASSET_PATH, DeepRequired, DefaultConfig, DefineConfigContext, DevEngine, DevEngineOptions, DevModeConfig, type DevRuntime, DevRuntimeInterface, DevRuntimeMessenger, DevRuntimeModule, DevServer, DevServerEvents, DynamicUserConfig, ExperimentalConfig, FastifyInstance, FlowConfig, FormattedError, HMRClientLogLevel, HMRClientMessage, HMRContext, HMRCustomHandler, HMRCustomMessage, HMRServerError, HMRServerMessage, HmrConfig, InteractiveCommand, InteractiveCommandContext, InteractiveModeOptions, LoadConfigOptions, LoadEnvOptions, MaybePromise, MetroCompatibleClientLogEvent, Middlewares, NullValue, OptimizationConfig, PackageJson, type Plugin, type PluginConfig, PluginFlattenConfig, PluginOption, Polyfill, PolyfillType, PolyfillWithCode, PolyfillWithPath, ReactNativeConfig, ReportableEvent, Reporter, ResolvedConfig, ResolverConfig, RolldownConfig, type RollipopReactNativeFlowConfig, type RollipopReactNativeWorkletsConfig, SerializerConfig, ServerOptions, SwcTransformConfig, TerminalConfig, TransformRule, TransformerConfig, UserConfig, WatcherConfig, cli_d_exports as cli, createCommand, createDevServer, createReactNativeCliCommand, defineConfig, flattenPluginOption, getDefaultConfig, invokeConfigResolved, loadConfig, loadEnv, mergeConfig, index_d_exports as plugins, resetCache, resolvePluginConfig, rolldown, rolldownExperimental, runBuild, runServer, setupInteractiveMode };