rolldown 0.12.2-snapshot-3ea6797-20240810002921 → 0.12.2-snapshot-e65c643-20240811191124
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/cjs/cli.cjs +2 -2
- package/dist/cjs/experimental-index.cjs +2 -2
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/parallel-plugin-worker.cjs +1 -1
- package/dist/esm/cli.mjs +2 -2
- package/dist/esm/experimental-index.mjs +2 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/parallel-plugin-worker.mjs +1 -1
- package/dist/shared/{plugin-context-data-I1aPS5hK.cjs → plugin-context-data-DXDLCu7_.cjs} +179 -115
- package/dist/shared/{plugin-context-data-l2hAUTQq.mjs → plugin-context-data-ymCbOD0T.mjs} +179 -115
- package/dist/shared/{rolldown-tWN4pzYf.cjs → rolldown-HPuKu0TA.cjs} +54 -13
- package/dist/shared/{rolldown-gbhp04Mo.mjs → rolldown-Lp-BFTO_.mjs} +54 -13
- package/dist/shared/rolldown-binding.wasi.cjs +54 -49
- package/dist/types/binding.d.ts +40 -0
- package/dist/types/constants/plugin.d.ts +28 -1
- package/dist/types/experimental-index.d.ts +4 -6
- package/dist/types/options/input-options.d.ts +38 -22
- package/dist/types/options/normalized-ecma-transform-plugin-config.d.ts +1 -1
- package/dist/types/options/output-options.d.ts +8 -8
- package/dist/types/plugin/bindingify-build-hooks.d.ts +8 -7
- package/dist/types/plugin/bindingify-output-hooks.d.ts +11 -10
- package/dist/types/plugin/bindingify-plugin-hook-meta.d.ts +7 -0
- package/dist/types/plugin/index.d.ts +30 -23
- package/dist/types/plugin/plugin-driver.d.ts +2 -2
- package/dist/types/utils/normalize-hook.d.ts +7 -2
- package/dist/types/utils/plugin/index.d.ts +2 -0
- package/package.json +14 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import __node_module__ from 'node:module';
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
-
import { LOG_LEVEL_DEBUG, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_WARN, PluginContextData, __toESM, arraify, bindingifyPlugin, error, getLogHandler, isNullish, logLevelPriority, logPluginError, normalizeHook, normalizeLog, require_binding, transformToRollupOutput, unimplemented } from "./plugin-context-data-
|
|
3
|
+
import { LOG_LEVEL_DEBUG, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_WARN, PluginContextData, __toESM, arraify, bindingifyPlugin, error, getLogHandler, isNullish, logLevelPriority, logPluginError, normalizeHook, normalizeLog, require_binding, transformToRollupOutput, unimplemented } from "./plugin-context-data-ymCbOD0T.mjs";
|
|
4
4
|
import { default as nodePath, default as path } from "node:path";
|
|
5
5
|
import { isRegExp, isRegExp as isRegExp$1 } from "node:util/types";
|
|
6
6
|
import { Worker } from "node:worker_threads";
|
|
@@ -188,7 +188,31 @@ function bindingifyInputOptions(options, outputOptions) {
|
|
|
188
188
|
},
|
|
189
189
|
treeshake: options.treeshake,
|
|
190
190
|
moduleTypes: options.moduleTypes,
|
|
191
|
-
define: options.define ? Object.entries(options.define) : undefined
|
|
191
|
+
define: options.define ? Object.entries(options.define) : undefined,
|
|
192
|
+
inject: options.inject ? (Object.entries(options.inject)).map(([alias, item]) => {
|
|
193
|
+
if (Array.isArray(item)) {
|
|
194
|
+
if (item[1] === "*") {
|
|
195
|
+
return {
|
|
196
|
+
tagNamespace: true,
|
|
197
|
+
alias,
|
|
198
|
+
from: item[0]
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
return {
|
|
202
|
+
tagNamed: true,
|
|
203
|
+
alias,
|
|
204
|
+
from: item[0],
|
|
205
|
+
imported: item[1]
|
|
206
|
+
};
|
|
207
|
+
} else {
|
|
208
|
+
return {
|
|
209
|
+
tagNamed: true,
|
|
210
|
+
imported: "default",
|
|
211
|
+
alias,
|
|
212
|
+
from: item
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
}) : undefined
|
|
192
216
|
};
|
|
193
217
|
}
|
|
194
218
|
function bindingifyLogLevel(logLevel) {
|
|
@@ -383,7 +407,7 @@ class PluginDriver {
|
|
|
383
407
|
const name = plugin.name || "unknown";
|
|
384
408
|
const options = plugin.options;
|
|
385
409
|
if (options) {
|
|
386
|
-
const
|
|
410
|
+
const { handler: handler } = normalizeHook(options);
|
|
387
411
|
const result = await handler.call({
|
|
388
412
|
debug: getLogHandler(LOG_LEVEL_DEBUG, "PLUGIN_LOG", logger, name, logLevel),
|
|
389
413
|
error: (e) => error(logPluginError(normalizeLog(e), name, {hook: "onLog"})),
|
|
@@ -402,7 +426,7 @@ class PluginDriver {
|
|
|
402
426
|
for (const plugin of plugins) {
|
|
403
427
|
const options = plugin.outputOptions;
|
|
404
428
|
if (options) {
|
|
405
|
-
const
|
|
429
|
+
const { handler: handler } = normalizeHook(options);
|
|
406
430
|
const result = handler.call(null, outputOptions);
|
|
407
431
|
if (result) {
|
|
408
432
|
outputOptions = result;
|
|
@@ -458,7 +482,7 @@ function normalizeTreeshakeOptions(config) {
|
|
|
458
482
|
}
|
|
459
483
|
|
|
460
484
|
//#endregion
|
|
461
|
-
//#region ../../node_modules/.pnpm/remeda@2.10.
|
|
485
|
+
//#region ../../node_modules/.pnpm/remeda@2.10.1/node_modules/remeda/dist/chunk-K26VP6CL.js
|
|
462
486
|
function u$1(t$1, n, a) {
|
|
463
487
|
let o = (r) => t$1(r, ...n);
|
|
464
488
|
return a === void 0 ? o : Object.assign(o, {
|
|
@@ -468,7 +492,7 @@ function u$1(t$1, n, a) {
|
|
|
468
492
|
}
|
|
469
493
|
|
|
470
494
|
//#endregion
|
|
471
|
-
//#region ../../node_modules/.pnpm/remeda@2.10.
|
|
495
|
+
//#region ../../node_modules/.pnpm/remeda@2.10.1/node_modules/remeda/dist/chunk-RAAYCPUM.js
|
|
472
496
|
function u(r, n, a) {
|
|
473
497
|
let o = r.length - n.length;
|
|
474
498
|
if (o === 0) return r(...n);
|
|
@@ -477,7 +501,7 @@ function u(r, n, a) {
|
|
|
477
501
|
}
|
|
478
502
|
|
|
479
503
|
//#endregion
|
|
480
|
-
//#region ../../node_modules/.pnpm/remeda@2.10.
|
|
504
|
+
//#region ../../node_modules/.pnpm/remeda@2.10.1/node_modules/remeda/dist/chunk-NMJS7ULY.js
|
|
481
505
|
function t(...n) {
|
|
482
506
|
return u(Object.keys, n);
|
|
483
507
|
}
|
|
@@ -554,7 +578,7 @@ function createComposedPlugin(plugins) {
|
|
|
554
578
|
const batchedHandlers = batchedHooks.buildStart;
|
|
555
579
|
composed.buildStart = async function(options) {
|
|
556
580
|
await Promise.all(batchedHandlers.map((handler) => {
|
|
557
|
-
const
|
|
581
|
+
const { handler: handlerFn } = normalizeHook(handler);
|
|
558
582
|
return handlerFn.call(this, options);
|
|
559
583
|
}));
|
|
560
584
|
};
|
|
@@ -566,7 +590,7 @@ function createComposedPlugin(plugins) {
|
|
|
566
590
|
const batchedHandlers = batchedHooks.load;
|
|
567
591
|
composed.load = async function(id) {
|
|
568
592
|
for (const handler of batchedHandlers) {
|
|
569
|
-
const
|
|
593
|
+
const { handler: handlerFn } = normalizeHook(handler);
|
|
570
594
|
const result = await handlerFn.call(this, id);
|
|
571
595
|
if (!isNullish(result)) {
|
|
572
596
|
return result;
|
|
@@ -587,7 +611,7 @@ function createComposedPlugin(plugins) {
|
|
|
587
611
|
moduleSideEffects = newModuleSideEffects ?? undefined;
|
|
588
612
|
}
|
|
589
613
|
for (const handler of batchedHandlers) {
|
|
590
|
-
const
|
|
614
|
+
const { handler: handlerFn } = normalizeHook(handler);
|
|
591
615
|
const result = await handlerFn.call(this, code, id, moduleType);
|
|
592
616
|
if (!isNullish(result)) {
|
|
593
617
|
if (typeof result === "string") {
|
|
@@ -612,7 +636,7 @@ function createComposedPlugin(plugins) {
|
|
|
612
636
|
const batchedHandlers = batchedHooks.buildEnd;
|
|
613
637
|
composed.buildEnd = async function(err) {
|
|
614
638
|
await Promise.all(batchedHandlers.map((handler) => {
|
|
615
|
-
const
|
|
639
|
+
const { handler: handlerFn } = normalizeHook(handler);
|
|
616
640
|
return handlerFn.call(this, err);
|
|
617
641
|
}));
|
|
618
642
|
};
|
|
@@ -624,7 +648,7 @@ function createComposedPlugin(plugins) {
|
|
|
624
648
|
const batchedHandlers = batchedHooks.renderChunk;
|
|
625
649
|
composed.renderChunk = async function(code, chunk, options) {
|
|
626
650
|
for (const handler of batchedHandlers) {
|
|
627
|
-
const
|
|
651
|
+
const { handler: handlerFn } = normalizeHook(handler);
|
|
628
652
|
const result = await handlerFn.call(this, code, chunk, options);
|
|
629
653
|
if (!isNullish(result)) {
|
|
630
654
|
return result;
|
|
@@ -646,7 +670,24 @@ function isComposablePlugin(plugin) {
|
|
|
646
670
|
if ("_parallel"in plugin) {
|
|
647
671
|
return false;
|
|
648
672
|
}
|
|
649
|
-
|
|
673
|
+
const hasNotComposablePattern = (t(plugin)).some((hookName) => {
|
|
674
|
+
const OK_TO_COMPOSE = false;
|
|
675
|
+
switch (hookName) {
|
|
676
|
+
case "name":
|
|
677
|
+
case "api": return OK_TO_COMPOSE;
|
|
678
|
+
}
|
|
679
|
+
if (isUnsupportedHooks(hookName)) {
|
|
680
|
+
return !OK_TO_COMPOSE;
|
|
681
|
+
}
|
|
682
|
+
if (plugin[hookName]) {
|
|
683
|
+
const { meta: meta } = normalizeHook(plugin[hookName]);
|
|
684
|
+
if (meta.order === "pre" || meta.order === "post") {
|
|
685
|
+
return !OK_TO_COMPOSE;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
return OK_TO_COMPOSE;
|
|
689
|
+
});
|
|
690
|
+
if (hasNotComposablePattern) {
|
|
650
691
|
return false;
|
|
651
692
|
}
|
|
652
693
|
return true;
|
|
@@ -94,55 +94,59 @@ function __napi_rs_initialize_modules(__napiInstance) {
|
|
|
94
94
|
__napiInstance.exports['__napi_register__transform_9']?.()
|
|
95
95
|
__napiInstance.exports['__napi_register__Bundler_struct_0']?.()
|
|
96
96
|
__napiInstance.exports['__napi_register__Bundler_impl_5']?.()
|
|
97
|
-
__napiInstance.exports['
|
|
98
|
-
__napiInstance.exports['
|
|
99
|
-
__napiInstance.exports['
|
|
100
|
-
__napiInstance.exports['
|
|
101
|
-
__napiInstance.exports['
|
|
102
|
-
__napiInstance.exports['
|
|
103
|
-
__napiInstance.exports['
|
|
104
|
-
__napiInstance.exports['
|
|
105
|
-
__napiInstance.exports['
|
|
106
|
-
__napiInstance.exports['
|
|
107
|
-
__napiInstance.exports['
|
|
108
|
-
__napiInstance.exports['
|
|
109
|
-
__napiInstance.exports['
|
|
110
|
-
__napiInstance.exports['
|
|
111
|
-
__napiInstance.exports['
|
|
112
|
-
__napiInstance.exports['
|
|
113
|
-
__napiInstance.exports['
|
|
114
|
-
__napiInstance.exports['
|
|
115
|
-
__napiInstance.exports['
|
|
116
|
-
__napiInstance.exports['
|
|
117
|
-
__napiInstance.exports['
|
|
118
|
-
__napiInstance.exports['
|
|
119
|
-
__napiInstance.exports['
|
|
120
|
-
__napiInstance.exports['
|
|
121
|
-
__napiInstance.exports['
|
|
122
|
-
__napiInstance.exports['
|
|
123
|
-
__napiInstance.exports['
|
|
124
|
-
__napiInstance.exports['
|
|
125
|
-
__napiInstance.exports['
|
|
126
|
-
__napiInstance.exports['
|
|
127
|
-
__napiInstance.exports['
|
|
128
|
-
__napiInstance.exports['
|
|
129
|
-
__napiInstance.exports['
|
|
130
|
-
__napiInstance.exports['
|
|
131
|
-
__napiInstance.exports['
|
|
132
|
-
__napiInstance.exports['
|
|
133
|
-
__napiInstance.exports['
|
|
134
|
-
__napiInstance.exports['
|
|
135
|
-
__napiInstance.exports['
|
|
136
|
-
__napiInstance.exports['
|
|
137
|
-
__napiInstance.exports['
|
|
138
|
-
__napiInstance.exports['
|
|
139
|
-
__napiInstance.exports['
|
|
140
|
-
__napiInstance.exports['
|
|
141
|
-
__napiInstance.exports['
|
|
142
|
-
__napiInstance.exports['
|
|
143
|
-
__napiInstance.exports['
|
|
144
|
-
__napiInstance.exports['
|
|
145
|
-
__napiInstance.exports['
|
|
97
|
+
__napiInstance.exports['__napi_register__BindingInjectImportNamed_struct_6']?.()
|
|
98
|
+
__napiInstance.exports['__napi_register__BindingInjectImportNamespace_struct_7']?.()
|
|
99
|
+
__napiInstance.exports['__napi_register__BindingInputItem_struct_8']?.()
|
|
100
|
+
__napiInstance.exports['__napi_register__BindingResolveOptions_struct_9']?.()
|
|
101
|
+
__napiInstance.exports['__napi_register__BindingTreeshake_struct_10']?.()
|
|
102
|
+
__napiInstance.exports['__napi_register__BindingInputOptions_struct_11']?.()
|
|
103
|
+
__napiInstance.exports['__napi_register__BindingOutputOptions_struct_12']?.()
|
|
104
|
+
__napiInstance.exports['__napi_register__BindingPluginContext_struct_13']?.()
|
|
105
|
+
__napiInstance.exports['__napi_register__BindingPluginContext_impl_19']?.()
|
|
106
|
+
__napiInstance.exports['__napi_register__BindingPluginContextResolvedId_struct_20']?.()
|
|
107
|
+
__napiInstance.exports['__napi_register__BindingPluginOptions_struct_21']?.()
|
|
108
|
+
__napiInstance.exports['__napi_register__BindingPluginWithIndex_struct_22']?.()
|
|
109
|
+
__napiInstance.exports['__napi_register__BindingTransformPluginContext_struct_23']?.()
|
|
110
|
+
__napiInstance.exports['__napi_register__BindingTransformPluginContext_impl_25']?.()
|
|
111
|
+
__napiInstance.exports['__napi_register__BindingAssetSource_struct_26']?.()
|
|
112
|
+
__napiInstance.exports['__napi_register__BindingEmittedAsset_struct_27']?.()
|
|
113
|
+
__napiInstance.exports['__napi_register__BindingHookLoadOutput_struct_28']?.()
|
|
114
|
+
__napiInstance.exports['__napi_register__BindingHookRenderChunkOutput_struct_29']?.()
|
|
115
|
+
__napiInstance.exports['__napi_register__BindingHookResolveIdExtraArgs_struct_30']?.()
|
|
116
|
+
__napiInstance.exports['__napi_register__BindingHookResolveIdOutput_struct_31']?.()
|
|
117
|
+
__napiInstance.exports['__napi_register__BindingHookSideEffects_32']?.()
|
|
118
|
+
__napiInstance.exports['__napi_register__BindingHookTransformOutput_struct_33']?.()
|
|
119
|
+
__napiInstance.exports['__napi_register__BindingStringOrRegex_struct_34']?.()
|
|
120
|
+
__napiInstance.exports['__napi_register__BindingPluginContextResolveOptions_struct_35']?.()
|
|
121
|
+
__napiInstance.exports['__napi_register__BindingTransformHookExtraArgs_struct_36']?.()
|
|
122
|
+
__napiInstance.exports['__napi_register__BindingBuiltinPlugin_struct_37']?.()
|
|
123
|
+
__napiInstance.exports['__napi_register__BindingBuiltinPluginName_38']?.()
|
|
124
|
+
__napiInstance.exports['__napi_register__BindingGlobImportPluginConfig_struct_39']?.()
|
|
125
|
+
__napiInstance.exports['__napi_register__BindingManifestPluginConfig_struct_40']?.()
|
|
126
|
+
__napiInstance.exports['__napi_register__BindingModulePreloadPolyfillPluginConfig_struct_41']?.()
|
|
127
|
+
__napiInstance.exports['__napi_register__BindingTransformPluginConfig_struct_42']?.()
|
|
128
|
+
__napiInstance.exports['__napi_register__BindingPluginOrder_43']?.()
|
|
129
|
+
__napiInstance.exports['__napi_register__BindingPluginHookMeta_struct_44']?.()
|
|
130
|
+
__napiInstance.exports['__napi_register__ParallelJsPluginRegistry_struct_45']?.()
|
|
131
|
+
__napiInstance.exports['__napi_register__ParallelJsPluginRegistry_impl_47']?.()
|
|
132
|
+
__napiInstance.exports['__napi_register__register_plugins_48']?.()
|
|
133
|
+
__napiInstance.exports['__napi_register__BindingLog_struct_49']?.()
|
|
134
|
+
__napiInstance.exports['__napi_register__BindingLogLevel_50']?.()
|
|
135
|
+
__napiInstance.exports['__napi_register__BindingModuleInfo_struct_51']?.()
|
|
136
|
+
__napiInstance.exports['__napi_register__BindingModuleInfo_impl_53']?.()
|
|
137
|
+
__napiInstance.exports['__napi_register__BindingOutputAsset_struct_54']?.()
|
|
138
|
+
__napiInstance.exports['__napi_register__BindingOutputAsset_impl_59']?.()
|
|
139
|
+
__napiInstance.exports['__napi_register__BindingOutputChunk_struct_60']?.()
|
|
140
|
+
__napiInstance.exports['__napi_register__BindingOutputChunk_impl_78']?.()
|
|
141
|
+
__napiInstance.exports['__napi_register__BindingOutputs_struct_79']?.()
|
|
142
|
+
__napiInstance.exports['__napi_register__BindingOutputs_impl_83']?.()
|
|
143
|
+
__napiInstance.exports['__napi_register__FinalBindingOutputs_struct_84']?.()
|
|
144
|
+
__napiInstance.exports['__napi_register__FinalBindingOutputs_impl_87']?.()
|
|
145
|
+
__napiInstance.exports['__napi_register__RenderedChunk_struct_88']?.()
|
|
146
|
+
__napiInstance.exports['__napi_register__BindingRenderedModule_struct_89']?.()
|
|
147
|
+
__napiInstance.exports['__napi_register__AliasItem_struct_90']?.()
|
|
148
|
+
__napiInstance.exports['__napi_register__BindingSourcemap_struct_91']?.()
|
|
149
|
+
__napiInstance.exports['__napi_register__BindingJsonSourcemap_struct_92']?.()
|
|
146
150
|
}
|
|
147
151
|
module.exports.BindingLog = __napiModule.exports.BindingLog
|
|
148
152
|
module.exports.BindingModuleInfo = __napiModule.exports.BindingModuleInfo
|
|
@@ -157,6 +161,7 @@ module.exports.ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginR
|
|
|
157
161
|
module.exports.BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName
|
|
158
162
|
module.exports.BindingHookSideEffects = __napiModule.exports.BindingHookSideEffects
|
|
159
163
|
module.exports.BindingLogLevel = __napiModule.exports.BindingLogLevel
|
|
164
|
+
module.exports.BindingPluginOrder = __napiModule.exports.BindingPluginOrder
|
|
160
165
|
module.exports.isolatedDeclaration = __napiModule.exports.isolatedDeclaration
|
|
161
166
|
module.exports.registerPlugins = __napiModule.exports.registerPlugins
|
|
162
167
|
module.exports.transform = __napiModule.exports.transform
|
package/dist/types/binding.d.ts
CHANGED
|
@@ -167,6 +167,19 @@ export interface BindingHookTransformOutput {
|
|
|
167
167
|
moduleType?: string
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
export interface BindingInjectImportNamed {
|
|
171
|
+
tagNamed: true
|
|
172
|
+
imported: string
|
|
173
|
+
alias?: string
|
|
174
|
+
from: string
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface BindingInjectImportNamespace {
|
|
178
|
+
tagNamespace: true
|
|
179
|
+
alias: string
|
|
180
|
+
from: string
|
|
181
|
+
}
|
|
182
|
+
|
|
170
183
|
export interface BindingInputItem {
|
|
171
184
|
name?: string
|
|
172
185
|
import: string
|
|
@@ -185,6 +198,7 @@ export interface BindingInputOptions {
|
|
|
185
198
|
treeshake?: BindingTreeshake
|
|
186
199
|
moduleTypes?: Record<string, string>
|
|
187
200
|
define?: Array<[string, string]>
|
|
201
|
+
inject?: Array<BindingInjectImportNamed | BindingInjectImportNamespace>
|
|
188
202
|
}
|
|
189
203
|
|
|
190
204
|
export interface BindingJsonSourcemap {
|
|
@@ -244,25 +258,51 @@ export interface BindingPluginContextResolveOptions {
|
|
|
244
258
|
custom?: number
|
|
245
259
|
}
|
|
246
260
|
|
|
261
|
+
export interface BindingPluginHookMeta {
|
|
262
|
+
order?: BindingPluginOrder
|
|
263
|
+
}
|
|
264
|
+
|
|
247
265
|
export interface BindingPluginOptions {
|
|
248
266
|
name: string
|
|
249
267
|
buildStart?: (ctx: BindingPluginContext) => MaybePromise<VoidNullable>
|
|
268
|
+
buildStartMeta?: BindingPluginHookMeta
|
|
250
269
|
resolveId?: (ctx: BindingPluginContext, specifier: string, importer: Nullable<string>, options: BindingHookResolveIdExtraArgs) => MaybePromise<VoidNullable<BindingHookResolveIdOutput>>
|
|
270
|
+
resolveIdMeta?: BindingPluginHookMeta
|
|
251
271
|
resolveDynamicImport?: (ctx: BindingPluginContext, specifier: string, importer: Nullable<string>) => MaybePromise<VoidNullable<BindingHookResolveIdOutput>>
|
|
272
|
+
resolveDynamicImportMeta?: BindingPluginHookMeta
|
|
252
273
|
load?: (ctx: BindingPluginContext, id: string) => MaybePromise<VoidNullable<BindingHookLoadOutput>>
|
|
274
|
+
loadMeta?: BindingPluginHookMeta
|
|
253
275
|
transform?: (ctx: BindingTransformPluginContext, id: string, code: string, module_type: BindingTransformHookExtraArgs) => MaybePromise<VoidNullable<BindingHookTransformOutput>>
|
|
276
|
+
transformMeta?: BindingPluginHookMeta
|
|
254
277
|
moduleParsed?: (ctx: BindingPluginContext, module: BindingModuleInfo) => MaybePromise<VoidNullable>
|
|
278
|
+
moduleParsedMeta?: BindingPluginHookMeta
|
|
255
279
|
buildEnd?: (ctx: BindingPluginContext, error: Nullable<string>) => MaybePromise<VoidNullable>
|
|
280
|
+
buildEndMeta?: BindingPluginHookMeta
|
|
256
281
|
renderChunk?: (ctx: BindingPluginContext, code: string, chunk: RenderedChunk) => MaybePromise<VoidNullable<BindingHookRenderChunkOutput>>
|
|
282
|
+
renderChunkMeta?: BindingPluginHookMeta
|
|
257
283
|
augmentChunkHash?: (ctx: BindingPluginContext, chunk: RenderedChunk) => MaybePromise<void | string>
|
|
284
|
+
augmentChunkHashMeta?: BindingPluginHookMeta
|
|
258
285
|
renderStart?: (ctx: BindingPluginContext) => void
|
|
286
|
+
renderStartMeta?: BindingPluginHookMeta
|
|
259
287
|
renderError?: (ctx: BindingPluginContext, error: string) => void
|
|
288
|
+
renderErrorMeta?: BindingPluginHookMeta
|
|
260
289
|
generateBundle?: (ctx: BindingPluginContext, bundle: BindingOutputs, isWrite: boolean) => MaybePromise<VoidNullable>
|
|
290
|
+
generateBundleMeta?: BindingPluginHookMeta
|
|
261
291
|
writeBundle?: (ctx: BindingPluginContext, bundle: BindingOutputs) => MaybePromise<VoidNullable>
|
|
292
|
+
writeBundleMeta?: BindingPluginHookMeta
|
|
262
293
|
banner?: (ctx: BindingPluginContext, chunk: RenderedChunk) => void
|
|
294
|
+
bannerMeta?: BindingPluginHookMeta
|
|
263
295
|
footer?: (ctx: BindingPluginContext, chunk: RenderedChunk) => void
|
|
296
|
+
footerMeta?: BindingPluginHookMeta
|
|
264
297
|
intro?: (ctx: BindingPluginContext, chunk: RenderedChunk) => void
|
|
298
|
+
introMeta?: BindingPluginHookMeta
|
|
265
299
|
outro?: (ctx: BindingPluginContext, chunk: RenderedChunk) => void
|
|
300
|
+
outroMeta?: BindingPluginHookMeta
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export declare enum BindingPluginOrder {
|
|
304
|
+
Pre = 0,
|
|
305
|
+
Post = 1
|
|
266
306
|
}
|
|
267
307
|
|
|
268
308
|
export interface BindingPluginWithIndex {
|
|
@@ -1,9 +1,36 @@
|
|
|
1
1
|
import { Plugin } from '../plugin';
|
|
2
|
+
export declare const ENUMERATED_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "augmentChunkHash", "buildEnd", "onLog", "resolveDynamicImport", "generateBundle", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "footer", "banner", "intro", "outro"];
|
|
2
3
|
/**
|
|
3
4
|
* Names of all properties in a `Plugin` object. Includes `name` and `api`.
|
|
4
5
|
*/
|
|
5
6
|
export type PluginProps = keyof Plugin;
|
|
7
|
+
type EnumeratedPluginHookNames = typeof ENUMERATED_PLUGIN_HOOK_NAMES;
|
|
6
8
|
/**
|
|
7
9
|
* Names of all hooks in a `Plugin` object. Does not include `name` and `api`, since they are not hooks.
|
|
8
10
|
*/
|
|
9
|
-
export type PluginHookNames =
|
|
11
|
+
export type PluginHookNames = EnumeratedPluginHookNames[number];
|
|
12
|
+
/**
|
|
13
|
+
* Names of all defined hooks. It's like
|
|
14
|
+
* ```ts
|
|
15
|
+
* type DefinedHookNames = {
|
|
16
|
+
* options: 'options',
|
|
17
|
+
* buildStart: 'buildStart',
|
|
18
|
+
* ...
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export type DefinedHookNames = {
|
|
23
|
+
readonly [K in PluginHookNames]: K;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Names of all defined hooks. It's like
|
|
27
|
+
* ```js
|
|
28
|
+
* const DEFINED_HOOK_NAMES ={
|
|
29
|
+
* options: 'options',
|
|
30
|
+
* buildStart: 'buildStart',
|
|
31
|
+
* ...
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare const DEFINED_HOOK_NAMES: DefinedHookNames;
|
|
36
|
+
export {};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { defineParallelPlugin, experimental_scan as scan, transform };
|
|
6
|
-
export { modulePreloadPolyfillPlugin, dynamicImportVarsPlugin, wasmPlugin, globImportPlugin, manifestPlugin, loadFallbackPlugin, transformPlugin, };
|
|
1
|
+
export { defineParallelPlugin } from './plugin/parallel-plugin';
|
|
2
|
+
export { experimental_scan as scan } from './rolldown';
|
|
3
|
+
export { transform } from './binding';
|
|
4
|
+
export { modulePreloadPolyfillPlugin, dynamicImportVarsPlugin, wasmPlugin, globImportPlugin, manifestPlugin, loadFallbackPlugin, transformPlugin, } from './plugin/builtin-plugin';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RolldownPluginRec } from '../plugin';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { TreeshakingOptions } from '../treeshake';
|
|
4
4
|
declare const inputOptionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
5
5
|
declare const externalSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>, z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodString>, z.ZodBoolean], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodVoid, z.ZodNull]>, z.ZodUndefined]>, z.ZodBoolean]>>]>;
|
|
6
6
|
declare const inputOptionsSchema: z.ZodObject<{
|
|
7
7
|
input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
8
|
-
plugins: z.ZodOptional<z.ZodArray<z.ZodType<
|
|
8
|
+
plugins: z.ZodOptional<z.ZodArray<z.ZodType<RolldownPluginRec, z.ZodTypeDef, RolldownPluginRec>, "many">>;
|
|
9
9
|
external: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>, z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodString>, z.ZodBoolean], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodVoid, z.ZodNull]>, z.ZodUndefined]>, z.ZodBoolean]>>]>>;
|
|
10
10
|
resolve: z.ZodOptional<z.ZodObject<{
|
|
11
11
|
alias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -44,15 +44,7 @@ declare const inputOptionsSchema: z.ZodObject<{
|
|
|
44
44
|
cwd: z.ZodOptional<z.ZodString>;
|
|
45
45
|
platform: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"node">, z.ZodLiteral<"browser">]>, z.ZodLiteral<"neutral">]>>;
|
|
46
46
|
shimMissingExports: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
-
treeshake: z.ZodOptional<z.
|
|
48
|
-
moduleSideEffects: z.ZodUnion<[z.ZodBoolean, z.ZodString]>;
|
|
49
|
-
}, {
|
|
50
|
-
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>;
|
|
51
|
-
}>, "strict", z.ZodTypeAny, {
|
|
52
|
-
moduleSideEffects?: string | boolean | undefined;
|
|
53
|
-
}, {
|
|
54
|
-
moduleSideEffects?: string | boolean | undefined;
|
|
55
|
-
}>]>>;
|
|
47
|
+
treeshake: z.ZodOptional<z.ZodType<boolean | TreeshakingOptions, z.ZodTypeDef, boolean | TreeshakingOptions>>;
|
|
56
48
|
logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>;
|
|
57
49
|
onLog: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"error">]>, z.ZodUnion<[z.ZodAny, z.ZodString]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>;
|
|
58
50
|
onwarn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodAny, z.ZodString]>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodAny, z.ZodString]>>]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>;
|
|
@@ -65,9 +57,10 @@ declare const inputOptionsSchema: z.ZodObject<{
|
|
|
65
57
|
enableComposingJsPlugins?: boolean | undefined;
|
|
66
58
|
}>>;
|
|
67
59
|
define: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
60
|
+
inject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>>>;
|
|
68
61
|
}, "strict", z.ZodTypeAny, {
|
|
69
62
|
input?: string | string[] | Record<string, string> | undefined;
|
|
70
|
-
plugins?:
|
|
63
|
+
plugins?: RolldownPluginRec[] | undefined;
|
|
71
64
|
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args_3: unknown[]) => boolean | void | null | undefined) | undefined;
|
|
72
65
|
resolve?: {
|
|
73
66
|
alias?: Record<string, string> | undefined;
|
|
@@ -84,9 +77,7 @@ declare const inputOptionsSchema: z.ZodObject<{
|
|
|
84
77
|
cwd?: string | undefined;
|
|
85
78
|
platform?: "node" | "browser" | "neutral" | undefined;
|
|
86
79
|
shimMissingExports?: boolean | undefined;
|
|
87
|
-
treeshake?: boolean |
|
|
88
|
-
moduleSideEffects?: string | boolean | undefined;
|
|
89
|
-
} | undefined;
|
|
80
|
+
treeshake?: boolean | TreeshakingOptions | undefined;
|
|
90
81
|
logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
|
|
91
82
|
onLog?: ((args_0: "info" | "debug" | "warn", args_1: any, args_2: (args_0: "info" | "debug" | "warn" | "error", args_1: any, ...args_2: unknown[]) => unknown, ...args_3: unknown[]) => unknown) | undefined;
|
|
92
83
|
onwarn?: ((args_0: any, args_1: (args_0: any, ...args_1: unknown[]) => unknown, ...args_2: unknown[]) => unknown) | undefined;
|
|
@@ -95,9 +86,10 @@ declare const inputOptionsSchema: z.ZodObject<{
|
|
|
95
86
|
enableComposingJsPlugins?: boolean | undefined;
|
|
96
87
|
} | undefined;
|
|
97
88
|
define?: Record<string, string> | undefined;
|
|
89
|
+
inject?: Record<string, string | [string, string]> | undefined;
|
|
98
90
|
}, {
|
|
99
91
|
input?: string | string[] | Record<string, string> | undefined;
|
|
100
|
-
plugins?:
|
|
92
|
+
plugins?: RolldownPluginRec[] | undefined;
|
|
101
93
|
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args_3: unknown[]) => boolean | void | null | undefined) | undefined;
|
|
102
94
|
resolve?: {
|
|
103
95
|
alias?: Record<string, string> | undefined;
|
|
@@ -114,9 +106,7 @@ declare const inputOptionsSchema: z.ZodObject<{
|
|
|
114
106
|
cwd?: string | undefined;
|
|
115
107
|
platform?: "node" | "browser" | "neutral" | undefined;
|
|
116
108
|
shimMissingExports?: boolean | undefined;
|
|
117
|
-
treeshake?: boolean |
|
|
118
|
-
moduleSideEffects?: string | boolean | undefined;
|
|
119
|
-
} | undefined;
|
|
109
|
+
treeshake?: boolean | TreeshakingOptions | undefined;
|
|
120
110
|
logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
|
|
121
111
|
onLog?: ((args_0: "info" | "debug" | "warn", args_1: any, args_2: (args_0: "info" | "debug" | "warn" | "error", args_1: any, ...args_2: unknown[]) => unknown, ...args_3: unknown[]) => unknown) | undefined;
|
|
122
112
|
onwarn?: ((args_0: any, args_1: (args_0: any, ...args_1: unknown[]) => unknown, ...args_2: unknown[]) => unknown) | undefined;
|
|
@@ -125,10 +115,36 @@ declare const inputOptionsSchema: z.ZodObject<{
|
|
|
125
115
|
enableComposingJsPlugins?: boolean | undefined;
|
|
126
116
|
} | undefined;
|
|
127
117
|
define?: Record<string, string> | undefined;
|
|
118
|
+
inject?: Record<string, string | [string, string]> | undefined;
|
|
128
119
|
}>;
|
|
120
|
+
type RawInputOptions = z.infer<typeof inputOptionsSchema>;
|
|
121
|
+
interface OverwriteInputOptionsWithDoc {
|
|
122
|
+
/**
|
|
123
|
+
* Inject import statements on demand.
|
|
124
|
+
*
|
|
125
|
+
* ## Supported patterns
|
|
126
|
+
* ```js
|
|
127
|
+
* {
|
|
128
|
+
* // import { Promise } from 'es6-promise'
|
|
129
|
+
* Promise: ['es6-promise', 'Promise'],
|
|
130
|
+
*
|
|
131
|
+
* // import { Promise as P } from 'es6-promise'
|
|
132
|
+
* P: ['es6-promise', 'Promise'],
|
|
133
|
+
*
|
|
134
|
+
* // import $ from 'jquery'
|
|
135
|
+
* $: 'jquery',
|
|
136
|
+
*
|
|
137
|
+
* // import * as fs from 'node:fs'
|
|
138
|
+
* fs: ['node:fs', '*'],
|
|
139
|
+
*
|
|
140
|
+
* // Inject shims for property access pattern
|
|
141
|
+
* 'Object.assign': path.resolve( 'src/helpers/object-assign.js' ),
|
|
142
|
+
* }
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
inject?: RawInputOptions['inject'];
|
|
146
|
+
}
|
|
129
147
|
export type InputOption = z.infer<typeof inputOptionSchema>;
|
|
148
|
+
export type InputOptions = Omit<RawInputOptions, keyof OverwriteInputOptionsWithDoc> & OverwriteInputOptionsWithDoc;
|
|
130
149
|
export type ExternalOption = z.infer<typeof externalSchema>;
|
|
131
|
-
export type InputOptions = Omit<z.infer<typeof inputOptionsSchema>, 'treeshake'> & {
|
|
132
|
-
treeshake?: boolean | TreeshakingOptions;
|
|
133
|
-
};
|
|
134
150
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BindingTransformPluginConfig } from '../binding';
|
|
2
2
|
type TransformPattern = string | RegExp | RegExp[] | string[];
|
|
3
|
-
export type TransformPluginConfig = BindingTransformPluginConfig & {
|
|
3
|
+
export type TransformPluginConfig = Omit<BindingTransformPluginConfig, 'include' | 'exclude'> & {
|
|
4
4
|
include?: TransformPattern;
|
|
5
5
|
exclude?: TransformPattern;
|
|
6
6
|
};
|
|
@@ -20,6 +20,10 @@ declare const outputOptionsSchema: z.ZodObject<{
|
|
|
20
20
|
name: z.ZodOptional<z.ZodString>;
|
|
21
21
|
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
22
22
|
}, "strict", z.ZodTypeAny, {
|
|
23
|
+
footer?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
24
|
+
banner?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
25
|
+
intro?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
26
|
+
outro?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
23
27
|
name?: string | undefined;
|
|
24
28
|
exports?: "auto" | "named" | "default" | "none" | undefined;
|
|
25
29
|
dir?: string | undefined;
|
|
@@ -27,10 +31,6 @@ declare const outputOptionsSchema: z.ZodObject<{
|
|
|
27
31
|
sourcemap?: boolean | "inline" | "hidden" | undefined;
|
|
28
32
|
sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption | undefined;
|
|
29
33
|
sourcemapPathTransform?: SourcemapPathTransformOption | undefined;
|
|
30
|
-
banner?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
31
|
-
footer?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
32
|
-
intro?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
33
|
-
outro?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
34
34
|
esModule?: boolean | "if-default-prop" | undefined;
|
|
35
35
|
entryFileNames?: string | undefined;
|
|
36
36
|
chunkFileNames?: string | undefined;
|
|
@@ -38,6 +38,10 @@ declare const outputOptionsSchema: z.ZodObject<{
|
|
|
38
38
|
minify?: boolean | undefined;
|
|
39
39
|
globals?: Record<string, string> | undefined;
|
|
40
40
|
}, {
|
|
41
|
+
footer?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
42
|
+
banner?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
43
|
+
intro?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
44
|
+
outro?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
41
45
|
name?: string | undefined;
|
|
42
46
|
exports?: "auto" | "named" | "default" | "none" | undefined;
|
|
43
47
|
dir?: string | undefined;
|
|
@@ -45,10 +49,6 @@ declare const outputOptionsSchema: z.ZodObject<{
|
|
|
45
49
|
sourcemap?: boolean | "inline" | "hidden" | undefined;
|
|
46
50
|
sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption | undefined;
|
|
47
51
|
sourcemapPathTransform?: SourcemapPathTransformOption | undefined;
|
|
48
|
-
banner?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
49
|
-
footer?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
50
|
-
intro?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
51
|
-
outro?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
52
52
|
esModule?: boolean | "if-default-prop" | undefined;
|
|
53
53
|
entryFileNames?: string | undefined;
|
|
54
54
|
chunkFileNames?: string | undefined;
|
|
@@ -2,10 +2,11 @@ import type { BindingPluginOptions } from '../binding';
|
|
|
2
2
|
import type { Plugin } from './index';
|
|
3
3
|
import { NormalizedInputOptions } from '../options/normalized-input-options';
|
|
4
4
|
import { PluginContextData } from './plugin-context-data';
|
|
5
|
-
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
5
|
+
import { PluginHookWithBindingMeta } from './bindingify-plugin-hook-meta';
|
|
6
|
+
export declare function bindingifyBuildStart(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['buildStart']>;
|
|
7
|
+
export declare function bindingifyBuildEnd(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['buildEnd']>;
|
|
8
|
+
export declare function bindingifyResolveId(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['resolveId']>;
|
|
9
|
+
export declare function bindingifyResolveDynamicImport(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['resolveDynamicImport']>;
|
|
10
|
+
export declare function bindingifyTransform(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['transform']>;
|
|
11
|
+
export declare function bindingifyLoad(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['load']>;
|
|
12
|
+
export declare function bindingifyModuleParsed(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['moduleParsed']>;
|
|
@@ -3,13 +3,14 @@ import type { NormalizedInputOptions } from '../options/normalized-input-options
|
|
|
3
3
|
import type { Plugin } from './index';
|
|
4
4
|
import { NormalizedOutputOptions } from '../options/normalized-output-options';
|
|
5
5
|
import { PluginContextData } from './plugin-context-data';
|
|
6
|
-
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function
|
|
14
|
-
export declare function
|
|
15
|
-
export declare function
|
|
6
|
+
import { PluginHookWithBindingMeta } from './bindingify-plugin-hook-meta';
|
|
7
|
+
export declare function bindingifyRenderStart(plugin: Plugin, options: NormalizedInputOptions, outputOptions: NormalizedOutputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['renderStart']>;
|
|
8
|
+
export declare function bindingifyRenderChunk(plugin: Plugin, options: NormalizedInputOptions, outputOptions: NormalizedOutputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['renderChunk']>;
|
|
9
|
+
export declare function bindingifyAugmentChunkHash(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['augmentChunkHash']>;
|
|
10
|
+
export declare function bindingifyRenderError(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['renderError']>;
|
|
11
|
+
export declare function bindingifyGenerateBundle(plugin: Plugin, options: NormalizedInputOptions, outputOptions: NormalizedOutputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['generateBundle']>;
|
|
12
|
+
export declare function bindingifyWriteBundle(plugin: Plugin, options: NormalizedInputOptions, outputOptions: NormalizedOutputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['writeBundle']>;
|
|
13
|
+
export declare function bindingifyBanner(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['banner']>;
|
|
14
|
+
export declare function bindingifyFooter(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['footer']>;
|
|
15
|
+
export declare function bindingifyIntro(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['intro']>;
|
|
16
|
+
export declare function bindingifyOutro(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingMeta<BindingPluginOptions['outro']>;
|