@module-federation/native-federation-typescript 0.6.2 → 0.6.3

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 (53) hide show
  1. package/dist/CHANGELOG.md +6 -0
  2. package/dist/HostOptions-D3CcBqii.d.mts +20 -0
  3. package/dist/HostOptions-DHKrVzUF.d.cts +20 -0
  4. package/dist/archiveHandler-B5LiXkIf.cjs +1 -0
  5. package/dist/archiveHandler-CsCn5EI2.mjs +1 -0
  6. package/dist/esbuild.cjs +1 -0
  7. package/dist/esbuild.d.cts +607 -0
  8. package/dist/esbuild.d.mts +606 -5
  9. package/dist/esbuild.mjs +1 -1
  10. package/dist/farm.cjs +1 -0
  11. package/dist/{farm.d.ts → farm.d.cts} +4 -3
  12. package/dist/farm.d.mts +4 -3
  13. package/dist/farm.mjs +1 -1
  14. package/dist/index.cjs +1 -0
  15. package/dist/{index.d.ts → index.d.cts} +5 -4
  16. package/dist/index.d.mts +5 -4
  17. package/dist/index.mjs +1 -1
  18. package/dist/package.json +52 -22
  19. package/dist/rolldown.cjs +1 -0
  20. package/dist/rolldown.d.cts +8 -0
  21. package/dist/rolldown.d.mts +7 -5
  22. package/dist/rolldown.mjs +1 -1
  23. package/dist/rollup.cjs +1 -0
  24. package/dist/rollup.d.cts +8 -0
  25. package/dist/rollup.d.mts +7 -6
  26. package/dist/rollup.mjs +1 -1
  27. package/dist/rspack.cjs +1 -0
  28. package/dist/{rspack.d.ts → rspack.d.cts} +5 -4
  29. package/dist/rspack.d.mts +5 -4
  30. package/dist/rspack.mjs +1 -1
  31. package/dist/vite.cjs +1 -0
  32. package/dist/{rolldown.d.ts → vite.d.cts} +4 -3
  33. package/dist/vite.d.mts +4 -3
  34. package/dist/vite.mjs +1 -1
  35. package/dist/webpack.cjs +1 -0
  36. package/dist/{webpack.d.ts → webpack.d.cts} +5 -4
  37. package/dist/webpack.d.mts +5 -4
  38. package/dist/webpack.mjs +1 -1
  39. package/package.json +52 -22
  40. package/dist/RemoteOptions-DKWfaIms.d.ts +0 -18
  41. package/dist/chunk-6KP4ELTF.js +0 -2
  42. package/dist/chunk-RFGP2BOW.mjs +0 -2
  43. package/dist/esbuild.d.ts +0 -6
  44. package/dist/esbuild.js +0 -1
  45. package/dist/farm.js +0 -1
  46. package/dist/index.js +0 -1
  47. package/dist/rolldown.js +0 -1
  48. package/dist/rollup.d.ts +0 -7
  49. package/dist/rollup.js +0 -1
  50. package/dist/rspack.js +0 -1
  51. package/dist/vite.d.ts +0 -6
  52. package/dist/vite.js +0 -1
  53. package/dist/webpack.js +0 -1
@@ -0,0 +1,607 @@
1
+ import { n as RemoteOptions, t as HostOptions } from "./HostOptions-DHKrVzUF.cjs";
2
+
3
+ //#region ../../node_modules/.pnpm/esbuild@0.25.0/node_modules/esbuild/lib/main.d.ts
4
+ type Platform = 'browser' | 'node' | 'neutral';
5
+ type Format = 'iife' | 'cjs' | 'esm';
6
+ type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx';
7
+ type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent';
8
+ type Charset = 'ascii' | 'utf8';
9
+ type Drop = 'console' | 'debugger';
10
+ interface CommonOptions {
11
+ /** Documentation: https://esbuild.github.io/api/#sourcemap */
12
+ sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both';
13
+ /** Documentation: https://esbuild.github.io/api/#legal-comments */
14
+ legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external';
15
+ /** Documentation: https://esbuild.github.io/api/#source-root */
16
+ sourceRoot?: string;
17
+ /** Documentation: https://esbuild.github.io/api/#sources-content */
18
+ sourcesContent?: boolean;
19
+ /** Documentation: https://esbuild.github.io/api/#format */
20
+ format?: Format;
21
+ /** Documentation: https://esbuild.github.io/api/#global-name */
22
+ globalName?: string;
23
+ /** Documentation: https://esbuild.github.io/api/#target */
24
+ target?: string | string[];
25
+ /** Documentation: https://esbuild.github.io/api/#supported */
26
+ supported?: Record<string, boolean>;
27
+ /** Documentation: https://esbuild.github.io/api/#platform */
28
+ platform?: Platform;
29
+ /** Documentation: https://esbuild.github.io/api/#mangle-props */
30
+ mangleProps?: RegExp;
31
+ /** Documentation: https://esbuild.github.io/api/#mangle-props */
32
+ reserveProps?: RegExp;
33
+ /** Documentation: https://esbuild.github.io/api/#mangle-props */
34
+ mangleQuoted?: boolean;
35
+ /** Documentation: https://esbuild.github.io/api/#mangle-props */
36
+ mangleCache?: Record<string, string | false>;
37
+ /** Documentation: https://esbuild.github.io/api/#drop */
38
+ drop?: Drop[];
39
+ /** Documentation: https://esbuild.github.io/api/#drop-labels */
40
+ dropLabels?: string[];
41
+ /** Documentation: https://esbuild.github.io/api/#minify */
42
+ minify?: boolean;
43
+ /** Documentation: https://esbuild.github.io/api/#minify */
44
+ minifyWhitespace?: boolean;
45
+ /** Documentation: https://esbuild.github.io/api/#minify */
46
+ minifyIdentifiers?: boolean;
47
+ /** Documentation: https://esbuild.github.io/api/#minify */
48
+ minifySyntax?: boolean;
49
+ /** Documentation: https://esbuild.github.io/api/#line-limit */
50
+ lineLimit?: number;
51
+ /** Documentation: https://esbuild.github.io/api/#charset */
52
+ charset?: Charset;
53
+ /** Documentation: https://esbuild.github.io/api/#tree-shaking */
54
+ treeShaking?: boolean;
55
+ /** Documentation: https://esbuild.github.io/api/#ignore-annotations */
56
+ ignoreAnnotations?: boolean;
57
+ /** Documentation: https://esbuild.github.io/api/#jsx */
58
+ jsx?: 'transform' | 'preserve' | 'automatic';
59
+ /** Documentation: https://esbuild.github.io/api/#jsx-factory */
60
+ jsxFactory?: string;
61
+ /** Documentation: https://esbuild.github.io/api/#jsx-fragment */
62
+ jsxFragment?: string;
63
+ /** Documentation: https://esbuild.github.io/api/#jsx-import-source */
64
+ jsxImportSource?: string;
65
+ /** Documentation: https://esbuild.github.io/api/#jsx-development */
66
+ jsxDev?: boolean;
67
+ /** Documentation: https://esbuild.github.io/api/#jsx-side-effects */
68
+ jsxSideEffects?: boolean;
69
+ /** Documentation: https://esbuild.github.io/api/#define */
70
+ define?: {
71
+ [key: string]: string;
72
+ };
73
+ /** Documentation: https://esbuild.github.io/api/#pure */
74
+ pure?: string[];
75
+ /** Documentation: https://esbuild.github.io/api/#keep-names */
76
+ keepNames?: boolean;
77
+ /** Documentation: https://esbuild.github.io/api/#color */
78
+ color?: boolean;
79
+ /** Documentation: https://esbuild.github.io/api/#log-level */
80
+ logLevel?: LogLevel;
81
+ /** Documentation: https://esbuild.github.io/api/#log-limit */
82
+ logLimit?: number;
83
+ /** Documentation: https://esbuild.github.io/api/#log-override */
84
+ logOverride?: Record<string, LogLevel>;
85
+ /** Documentation: https://esbuild.github.io/api/#tsconfig-raw */
86
+ tsconfigRaw?: string | TsconfigRaw;
87
+ }
88
+ interface TsconfigRaw {
89
+ compilerOptions?: {
90
+ alwaysStrict?: boolean;
91
+ baseUrl?: string;
92
+ experimentalDecorators?: boolean;
93
+ importsNotUsedAsValues?: 'remove' | 'preserve' | 'error';
94
+ jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev';
95
+ jsxFactory?: string;
96
+ jsxFragmentFactory?: string;
97
+ jsxImportSource?: string;
98
+ paths?: Record<string, string[]>;
99
+ preserveValueImports?: boolean;
100
+ strict?: boolean;
101
+ target?: string;
102
+ useDefineForClassFields?: boolean;
103
+ verbatimModuleSyntax?: boolean;
104
+ };
105
+ }
106
+ interface BuildOptions extends CommonOptions {
107
+ /** Documentation: https://esbuild.github.io/api/#bundle */
108
+ bundle?: boolean;
109
+ /** Documentation: https://esbuild.github.io/api/#splitting */
110
+ splitting?: boolean;
111
+ /** Documentation: https://esbuild.github.io/api/#preserve-symlinks */
112
+ preserveSymlinks?: boolean;
113
+ /** Documentation: https://esbuild.github.io/api/#outfile */
114
+ outfile?: string;
115
+ /** Documentation: https://esbuild.github.io/api/#metafile */
116
+ metafile?: boolean;
117
+ /** Documentation: https://esbuild.github.io/api/#outdir */
118
+ outdir?: string;
119
+ /** Documentation: https://esbuild.github.io/api/#outbase */
120
+ outbase?: string;
121
+ /** Documentation: https://esbuild.github.io/api/#external */
122
+ external?: string[];
123
+ /** Documentation: https://esbuild.github.io/api/#packages */
124
+ packages?: 'bundle' | 'external';
125
+ /** Documentation: https://esbuild.github.io/api/#alias */
126
+ alias?: Record<string, string>;
127
+ /** Documentation: https://esbuild.github.io/api/#loader */
128
+ loader?: {
129
+ [ext: string]: Loader;
130
+ };
131
+ /** Documentation: https://esbuild.github.io/api/#resolve-extensions */
132
+ resolveExtensions?: string[];
133
+ /** Documentation: https://esbuild.github.io/api/#main-fields */
134
+ mainFields?: string[];
135
+ /** Documentation: https://esbuild.github.io/api/#conditions */
136
+ conditions?: string[];
137
+ /** Documentation: https://esbuild.github.io/api/#write */
138
+ write?: boolean;
139
+ /** Documentation: https://esbuild.github.io/api/#allow-overwrite */
140
+ allowOverwrite?: boolean;
141
+ /** Documentation: https://esbuild.github.io/api/#tsconfig */
142
+ tsconfig?: string;
143
+ /** Documentation: https://esbuild.github.io/api/#out-extension */
144
+ outExtension?: {
145
+ [ext: string]: string;
146
+ };
147
+ /** Documentation: https://esbuild.github.io/api/#public-path */
148
+ publicPath?: string;
149
+ /** Documentation: https://esbuild.github.io/api/#entry-names */
150
+ entryNames?: string;
151
+ /** Documentation: https://esbuild.github.io/api/#chunk-names */
152
+ chunkNames?: string;
153
+ /** Documentation: https://esbuild.github.io/api/#asset-names */
154
+ assetNames?: string;
155
+ /** Documentation: https://esbuild.github.io/api/#inject */
156
+ inject?: string[];
157
+ /** Documentation: https://esbuild.github.io/api/#banner */
158
+ banner?: {
159
+ [type: string]: string;
160
+ };
161
+ /** Documentation: https://esbuild.github.io/api/#footer */
162
+ footer?: {
163
+ [type: string]: string;
164
+ };
165
+ /** Documentation: https://esbuild.github.io/api/#entry-points */
166
+ entryPoints?: string[] | Record<string, string> | {
167
+ in: string;
168
+ out: string;
169
+ }[];
170
+ /** Documentation: https://esbuild.github.io/api/#stdin */
171
+ stdin?: StdinOptions;
172
+ /** Documentation: https://esbuild.github.io/plugins/ */
173
+ plugins?: Plugin[];
174
+ /** Documentation: https://esbuild.github.io/api/#working-directory */
175
+ absWorkingDir?: string;
176
+ /** Documentation: https://esbuild.github.io/api/#node-paths */
177
+ nodePaths?: string[]; // The "NODE_PATH" variable from Node.js
178
+ }
179
+ interface StdinOptions {
180
+ contents: string | Uint8Array;
181
+ resolveDir?: string;
182
+ sourcefile?: string;
183
+ loader?: Loader;
184
+ }
185
+ interface Message {
186
+ id: string;
187
+ pluginName: string;
188
+ text: string;
189
+ location: Location | null;
190
+ notes: Note[];
191
+ /**
192
+ * Optional user-specified data that is passed through unmodified. You can
193
+ * use this to stash the original error, for example.
194
+ */
195
+ detail: any;
196
+ }
197
+ interface Note {
198
+ text: string;
199
+ location: Location | null;
200
+ }
201
+ interface Location {
202
+ file: string;
203
+ namespace: string;
204
+ /** 1-based */
205
+ line: number;
206
+ /** 0-based, in bytes */
207
+ column: number;
208
+ /** in bytes */
209
+ length: number;
210
+ lineText: string;
211
+ suggestion: string;
212
+ }
213
+ interface OutputFile {
214
+ path: string;
215
+ contents: Uint8Array;
216
+ hash: string;
217
+ /** "contents" as text (changes automatically with "contents") */
218
+ readonly text: string;
219
+ }
220
+ interface BuildResult<ProvidedOptions extends BuildOptions = BuildOptions> {
221
+ errors: Message[];
222
+ warnings: Message[];
223
+ /** Only when "write: false" */
224
+ outputFiles: OutputFile[] | (ProvidedOptions['write'] extends false ? never : undefined);
225
+ /** Only when "metafile: true" */
226
+ metafile: Metafile | (ProvidedOptions['metafile'] extends true ? never : undefined);
227
+ /** Only when "mangleCache" is present */
228
+ mangleCache: Record<string, string | false> | (ProvidedOptions['mangleCache'] extends Object ? never : undefined);
229
+ }
230
+ /** Documentation: https://esbuild.github.io/api/#serve-arguments */
231
+ interface ServeOptions {
232
+ port?: number;
233
+ host?: string;
234
+ servedir?: string;
235
+ keyfile?: string;
236
+ certfile?: string;
237
+ fallback?: string;
238
+ onRequest?: (args: ServeOnRequestArgs) => void;
239
+ }
240
+ interface ServeOnRequestArgs {
241
+ remoteAddress: string;
242
+ method: string;
243
+ path: string;
244
+ status: number;
245
+ /** The time to generate the response, not to send it */
246
+ timeInMS: number;
247
+ }
248
+ /** Documentation: https://esbuild.github.io/api/#serve-return-values */
249
+ interface ServeResult {
250
+ port: number;
251
+ hosts: string[];
252
+ }
253
+ interface TransformOptions extends CommonOptions {
254
+ /** Documentation: https://esbuild.github.io/api/#sourcefile */
255
+ sourcefile?: string;
256
+ /** Documentation: https://esbuild.github.io/api/#loader */
257
+ loader?: Loader;
258
+ /** Documentation: https://esbuild.github.io/api/#banner */
259
+ banner?: string;
260
+ /** Documentation: https://esbuild.github.io/api/#footer */
261
+ footer?: string;
262
+ }
263
+ interface TransformResult<ProvidedOptions extends TransformOptions = TransformOptions> {
264
+ code: string;
265
+ map: string;
266
+ warnings: Message[];
267
+ /** Only when "mangleCache" is present */
268
+ mangleCache: Record<string, string | false> | (ProvidedOptions['mangleCache'] extends Object ? never : undefined);
269
+ /** Only when "legalComments" is "external" */
270
+ legalComments: string | (ProvidedOptions['legalComments'] extends 'external' ? never : undefined);
271
+ }
272
+ interface Plugin {
273
+ name: string;
274
+ setup: (build: PluginBuild) => (void | Promise<void>);
275
+ }
276
+ interface PluginBuild {
277
+ /** Documentation: https://esbuild.github.io/plugins/#build-options */
278
+ initialOptions: BuildOptions;
279
+ /** Documentation: https://esbuild.github.io/plugins/#resolve */
280
+ resolve(path: string, options?: ResolveOptions): Promise<ResolveResult>;
281
+ /** Documentation: https://esbuild.github.io/plugins/#on-start */
282
+ onStart(callback: () => (OnStartResult | null | void | Promise<OnStartResult | null | void>)): void;
283
+ /** Documentation: https://esbuild.github.io/plugins/#on-end */
284
+ onEnd(callback: (result: BuildResult) => (OnEndResult | null | void | Promise<OnEndResult | null | void>)): void;
285
+ /** Documentation: https://esbuild.github.io/plugins/#on-resolve */
286
+ onResolve(options: OnResolveOptions, callback: (args: OnResolveArgs) => (OnResolveResult | null | undefined | Promise<OnResolveResult | null | undefined>)): void;
287
+ /** Documentation: https://esbuild.github.io/plugins/#on-load */
288
+ onLoad(options: OnLoadOptions, callback: (args: OnLoadArgs) => (OnLoadResult | null | undefined | Promise<OnLoadResult | null | undefined>)): void;
289
+ /** Documentation: https://esbuild.github.io/plugins/#on-dispose */
290
+ onDispose(callback: () => void): void; // This is a full copy of the esbuild library in case you need it
291
+ esbuild: {
292
+ context: typeof context;
293
+ build: typeof build;
294
+ buildSync: typeof buildSync;
295
+ transform: typeof transform;
296
+ transformSync: typeof transformSync;
297
+ formatMessages: typeof formatMessages;
298
+ formatMessagesSync: typeof formatMessagesSync;
299
+ analyzeMetafile: typeof analyzeMetafile;
300
+ analyzeMetafileSync: typeof analyzeMetafileSync;
301
+ initialize: typeof initialize;
302
+ version: typeof version;
303
+ };
304
+ }
305
+ /** Documentation: https://esbuild.github.io/plugins/#resolve-options */
306
+ interface ResolveOptions {
307
+ pluginName?: string;
308
+ importer?: string;
309
+ namespace?: string;
310
+ resolveDir?: string;
311
+ kind?: ImportKind;
312
+ pluginData?: any;
313
+ with?: Record<string, string>;
314
+ }
315
+ /** Documentation: https://esbuild.github.io/plugins/#resolve-results */
316
+ interface ResolveResult {
317
+ errors: Message[];
318
+ warnings: Message[];
319
+ path: string;
320
+ external: boolean;
321
+ sideEffects: boolean;
322
+ namespace: string;
323
+ suffix: string;
324
+ pluginData: any;
325
+ }
326
+ interface OnStartResult {
327
+ errors?: PartialMessage[];
328
+ warnings?: PartialMessage[];
329
+ }
330
+ interface OnEndResult {
331
+ errors?: PartialMessage[];
332
+ warnings?: PartialMessage[];
333
+ }
334
+ /** Documentation: https://esbuild.github.io/plugins/#on-resolve-options */
335
+ interface OnResolveOptions {
336
+ filter: RegExp;
337
+ namespace?: string;
338
+ }
339
+ /** Documentation: https://esbuild.github.io/plugins/#on-resolve-arguments */
340
+ interface OnResolveArgs {
341
+ path: string;
342
+ importer: string;
343
+ namespace: string;
344
+ resolveDir: string;
345
+ kind: ImportKind;
346
+ pluginData: any;
347
+ with: Record<string, string>;
348
+ }
349
+ type ImportKind = 'entry-point' // JS
350
+ | 'import-statement' | 'require-call' | 'dynamic-import' | 'require-resolve' // CSS
351
+ | 'import-rule' | 'composes-from' | 'url-token';
352
+ /** Documentation: https://esbuild.github.io/plugins/#on-resolve-results */
353
+ interface OnResolveResult {
354
+ pluginName?: string;
355
+ errors?: PartialMessage[];
356
+ warnings?: PartialMessage[];
357
+ path?: string;
358
+ external?: boolean;
359
+ sideEffects?: boolean;
360
+ namespace?: string;
361
+ suffix?: string;
362
+ pluginData?: any;
363
+ watchFiles?: string[];
364
+ watchDirs?: string[];
365
+ }
366
+ /** Documentation: https://esbuild.github.io/plugins/#on-load-options */
367
+ interface OnLoadOptions {
368
+ filter: RegExp;
369
+ namespace?: string;
370
+ }
371
+ /** Documentation: https://esbuild.github.io/plugins/#on-load-arguments */
372
+ interface OnLoadArgs {
373
+ path: string;
374
+ namespace: string;
375
+ suffix: string;
376
+ pluginData: any;
377
+ with: Record<string, string>;
378
+ }
379
+ /** Documentation: https://esbuild.github.io/plugins/#on-load-results */
380
+ interface OnLoadResult {
381
+ pluginName?: string;
382
+ errors?: PartialMessage[];
383
+ warnings?: PartialMessage[];
384
+ contents?: string | Uint8Array;
385
+ resolveDir?: string;
386
+ loader?: Loader;
387
+ pluginData?: any;
388
+ watchFiles?: string[];
389
+ watchDirs?: string[];
390
+ }
391
+ interface PartialMessage {
392
+ id?: string;
393
+ pluginName?: string;
394
+ text?: string;
395
+ location?: Partial<Location> | null;
396
+ notes?: PartialNote[];
397
+ detail?: any;
398
+ }
399
+ interface PartialNote {
400
+ text?: string;
401
+ location?: Partial<Location> | null;
402
+ }
403
+ /** Documentation: https://esbuild.github.io/api/#metafile */
404
+ interface Metafile {
405
+ inputs: {
406
+ [path: string]: {
407
+ bytes: number;
408
+ imports: {
409
+ path: string;
410
+ kind: ImportKind;
411
+ external?: boolean;
412
+ original?: string;
413
+ with?: Record<string, string>;
414
+ }[];
415
+ format?: 'cjs' | 'esm';
416
+ with?: Record<string, string>;
417
+ };
418
+ };
419
+ outputs: {
420
+ [path: string]: {
421
+ bytes: number;
422
+ inputs: {
423
+ [path: string]: {
424
+ bytesInOutput: number;
425
+ };
426
+ };
427
+ imports: {
428
+ path: string;
429
+ kind: ImportKind | 'file-loader';
430
+ external?: boolean;
431
+ }[];
432
+ exports: string[];
433
+ entryPoint?: string;
434
+ cssBundle?: string;
435
+ };
436
+ };
437
+ }
438
+ interface FormatMessagesOptions {
439
+ kind: 'error' | 'warning';
440
+ color?: boolean;
441
+ terminalWidth?: number;
442
+ }
443
+ interface AnalyzeMetafileOptions {
444
+ color?: boolean;
445
+ verbose?: boolean;
446
+ }
447
+ interface WatchOptions {}
448
+ interface BuildContext<ProvidedOptions extends BuildOptions = BuildOptions> {
449
+ /** Documentation: https://esbuild.github.io/api/#rebuild */
450
+ rebuild(): Promise<BuildResult<ProvidedOptions>>;
451
+ /** Documentation: https://esbuild.github.io/api/#watch */
452
+ watch(options?: WatchOptions): Promise<void>;
453
+ /** Documentation: https://esbuild.github.io/api/#serve */
454
+ serve(options?: ServeOptions): Promise<ServeResult>;
455
+ cancel(): Promise<void>;
456
+ dispose(): Promise<void>;
457
+ }
458
+ // This is a TypeScript type-level function which replaces any keys in "In"
459
+ // that aren't in "Out" with "never". We use this to reject properties with
460
+ // typos in object literals. See: https://stackoverflow.com/questions/49580725
461
+ type SameShape<Out, In extends Out> = In & { [Key in Exclude<keyof In, keyof Out>]: never };
462
+ /**
463
+ * This function invokes the "esbuild" command-line tool for you. It returns a
464
+ * promise that either resolves with a "BuildResult" object or rejects with a
465
+ * "BuildFailure" object.
466
+ *
467
+ * - Works in node: yes
468
+ * - Works in browser: yes
469
+ *
470
+ * Documentation: https://esbuild.github.io/api/#build
471
+ */
472
+ declare function build<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildResult<T>>;
473
+ /**
474
+ * This is the advanced long-running form of "build" that supports additional
475
+ * features such as watch mode and a local development server.
476
+ *
477
+ * - Works in node: yes
478
+ * - Works in browser: no
479
+ *
480
+ * Documentation: https://esbuild.github.io/api/#build
481
+ */
482
+ declare function context<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildContext<T>>;
483
+ /**
484
+ * This function transforms a single JavaScript file. It can be used to minify
485
+ * JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript
486
+ * to older JavaScript. It returns a promise that is either resolved with a
487
+ * "TransformResult" object or rejected with a "TransformFailure" object.
488
+ *
489
+ * - Works in node: yes
490
+ * - Works in browser: yes
491
+ *
492
+ * Documentation: https://esbuild.github.io/api/#transform
493
+ */
494
+ declare function transform<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): Promise<TransformResult<T>>;
495
+ /**
496
+ * Converts log messages to formatted message strings suitable for printing in
497
+ * the terminal. This allows you to reuse the built-in behavior of esbuild's
498
+ * log message formatter. This is a batch-oriented API for efficiency.
499
+ *
500
+ * - Works in node: yes
501
+ * - Works in browser: yes
502
+ */
503
+ declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise<string[]>;
504
+ /**
505
+ * Pretty-prints an analysis of the metafile JSON to a string. This is just for
506
+ * convenience to be able to match esbuild's pretty-printing exactly. If you want
507
+ * to customize it, you can just inspect the data in the metafile yourself.
508
+ *
509
+ * - Works in node: yes
510
+ * - Works in browser: yes
511
+ *
512
+ * Documentation: https://esbuild.github.io/api/#analyze
513
+ */
514
+ declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise<string>;
515
+ /**
516
+ * A synchronous version of "build".
517
+ *
518
+ * - Works in node: yes
519
+ * - Works in browser: no
520
+ *
521
+ * Documentation: https://esbuild.github.io/api/#build
522
+ */
523
+ declare function buildSync<T extends BuildOptions>(options: SameShape<BuildOptions, T>): BuildResult<T>;
524
+ /**
525
+ * A synchronous version of "transform".
526
+ *
527
+ * - Works in node: yes
528
+ * - Works in browser: no
529
+ *
530
+ * Documentation: https://esbuild.github.io/api/#transform
531
+ */
532
+ declare function transformSync<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): TransformResult<T>;
533
+ /**
534
+ * A synchronous version of "formatMessages".
535
+ *
536
+ * - Works in node: yes
537
+ * - Works in browser: no
538
+ */
539
+ declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[];
540
+ /**
541
+ * A synchronous version of "analyzeMetafile".
542
+ *
543
+ * - Works in node: yes
544
+ * - Works in browser: no
545
+ *
546
+ * Documentation: https://esbuild.github.io/api/#analyze
547
+ */
548
+ declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string;
549
+ /**
550
+ * This configures the browser-based version of esbuild. It is necessary to
551
+ * call this first and wait for the returned promise to be resolved before
552
+ * making other API calls when using esbuild in the browser.
553
+ *
554
+ * - Works in node: yes
555
+ * - Works in browser: yes ("options" is required)
556
+ *
557
+ * Documentation: https://esbuild.github.io/api/#browser
558
+ */
559
+ declare function initialize(options: InitializeOptions): Promise<void>;
560
+ interface InitializeOptions {
561
+ /**
562
+ * The URL of the "esbuild.wasm" file. This must be provided when running
563
+ * esbuild in the browser.
564
+ */
565
+ wasmURL?: string | URL;
566
+ /**
567
+ * The result of calling "new WebAssembly.Module(buffer)" where "buffer"
568
+ * is a typed array or ArrayBuffer containing the binary code of the
569
+ * "esbuild.wasm" file.
570
+ *
571
+ * You can use this as an alternative to "wasmURL" for environments where it's
572
+ * not possible to download the WebAssembly module.
573
+ */
574
+ wasmModule?: WebAssembly.Module;
575
+ /**
576
+ * By default esbuild runs the WebAssembly-based browser API in a web worker
577
+ * to avoid blocking the UI thread. This can be disabled by setting "worker"
578
+ * to false.
579
+ */
580
+ worker?: boolean;
581
+ }
582
+ declare let version: string;
583
+ // Note: These declarations exist to avoid type errors when you omit "dom" from
584
+ // "lib" in your "tsconfig.json" file. TypeScript confusingly declares the
585
+ // global "WebAssembly" type in "lib.dom.d.ts" even though it has nothing to do
586
+ // with the browser DOM and is present in many non-browser JavaScript runtimes
587
+ // (e.g. node and deno). Declaring it here allows esbuild's API to be used in
588
+ // these scenarios.
589
+ //
590
+ // There's an open issue about getting this problem corrected (although these
591
+ // declarations will need to remain even if this is fixed for backward
592
+ // compatibility with older TypeScript versions):
593
+ //
594
+ // https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/826
595
+ //
596
+ declare global {
597
+ namespace WebAssembly {
598
+ interface Module {}
599
+ }
600
+ interface URL {}
601
+ }
602
+ //#endregion
603
+ //#region src/esbuild.d.ts
604
+ declare const NativeFederationTypeScriptRemote: (options: RemoteOptions) => Plugin;
605
+ declare const NativeFederationTypeScriptHost: (options: HostOptions) => Plugin;
606
+ //#endregion
607
+ export { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote };