@remotion/browser-bundler 4.0.527
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/README.md +18 -0
- package/dist/browser-bundler-worker.d.ts +1 -0
- package/dist/browser-bundler-worker.js +1420 -0
- package/dist/browser-module-scope.d.ts +7 -0
- package/dist/compiler.d.ts +7 -0
- package/dist/compiler.js +1604 -0
- package/dist/create-browser-bundle-runtime.d.ts +7 -0
- package/dist/create-browser-bundler.d.ts +2 -0
- package/dist/create-browser-compiler.d.ts +27 -0
- package/dist/create-browser-composition-observer.d.ts +15 -0
- package/dist/dependency-resolution.d.ts +9 -0
- package/dist/errors.d.ts +6 -0
- package/dist/fast-refresh-bridge.d.ts +8 -0
- package/dist/get-browser-composition.d.ts +17 -0
- package/dist/hmr-assets.d.ts +16 -0
- package/dist/hmr-plugins.d.ts +10 -0
- package/dist/http-client.d.ts +9 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +115 -0
- package/dist/index.js.LICENSE.txt +19 -0
- package/dist/load-browser-bundle.d.ts +10 -0
- package/dist/load-rspack.d.ts +3 -0
- package/dist/refresh-virtual-files.d.ts +5 -0
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/dist/runtime.d.ts +5 -0
- package/dist/runtime.js +689 -0
- package/dist/types.d.ts +60 -0
- package/dist/virtual-project.d.ts +12 -0
- package/dist/wasi-worker-browser.mjs +28176 -0
- package/dist/wasi-worker-browser.mjs.LICENSE.txt +12 -0
- package/package.json +76 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { BrowserHmrAsset } from './hmr-assets';
|
|
2
|
+
export type VirtualProject = {
|
|
3
|
+
entryPoint: string;
|
|
4
|
+
files: Record<string, string>;
|
|
5
|
+
};
|
|
6
|
+
export type VirtualFileSystem = {
|
|
7
|
+
readFile: (path: string) => Promise<string> | string;
|
|
8
|
+
writeFile: (path: string, contents: string) => Promise<void> | void;
|
|
9
|
+
exists: (path: string) => Promise<boolean> | boolean;
|
|
10
|
+
listFiles: () => Promise<string[]> | string[];
|
|
11
|
+
};
|
|
12
|
+
export type BrowserBundle = {
|
|
13
|
+
code: string;
|
|
14
|
+
warnings: string[];
|
|
15
|
+
fastRefresh: {
|
|
16
|
+
sessionId: string;
|
|
17
|
+
hash: string;
|
|
18
|
+
previousHash: string | null;
|
|
19
|
+
assets: BrowserHmrAsset[];
|
|
20
|
+
} | null;
|
|
21
|
+
};
|
|
22
|
+
export type BrowserBundlerProgress = {
|
|
23
|
+
asset: 'rspack-wasm';
|
|
24
|
+
loadedBytes: number;
|
|
25
|
+
totalBytes: number | null;
|
|
26
|
+
};
|
|
27
|
+
export type BrowserBundlerOptions = {
|
|
28
|
+
dependencyVersions?: Record<string, string>;
|
|
29
|
+
enableFastRefresh?: boolean;
|
|
30
|
+
onProgress?: (progress: BrowserBundlerProgress) => void;
|
|
31
|
+
workerUrl?: string | URL;
|
|
32
|
+
};
|
|
33
|
+
export type BrowserBundler = {
|
|
34
|
+
bundle: (options: {
|
|
35
|
+
project: VirtualProject;
|
|
36
|
+
}) => Promise<BrowserBundle>;
|
|
37
|
+
dispose: () => void;
|
|
38
|
+
};
|
|
39
|
+
export type BrowserBundlerWorkerRequest = {
|
|
40
|
+
id: number;
|
|
41
|
+
project: VirtualProject;
|
|
42
|
+
dependencyVersions: Record<string, string>;
|
|
43
|
+
enableFastRefresh: boolean;
|
|
44
|
+
};
|
|
45
|
+
export type SerializedCompilerError = {
|
|
46
|
+
message: string;
|
|
47
|
+
stack: string | null;
|
|
48
|
+
diagnostics: string[];
|
|
49
|
+
};
|
|
50
|
+
export type BrowserBundlerWorkerResponse = {
|
|
51
|
+
type: 'bundle';
|
|
52
|
+
id: number;
|
|
53
|
+
bundle: BrowserBundle;
|
|
54
|
+
} | {
|
|
55
|
+
type: 'error';
|
|
56
|
+
id: number;
|
|
57
|
+
error: SerializedCompilerError;
|
|
58
|
+
} | ({
|
|
59
|
+
type: 'progress';
|
|
60
|
+
} & BrowserBundlerProgress);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { VirtualProject } from './types';
|
|
2
|
+
export declare const normalizeVirtualPath: (path: string) => string;
|
|
3
|
+
export declare const getVirtualProjectFiles: (project: VirtualProject) => {
|
|
4
|
+
[k: string]: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const getVirtualProjectChanges: ({ previous, next, }: {
|
|
7
|
+
previous: Record<string, string>;
|
|
8
|
+
next: Record<string, string>;
|
|
9
|
+
}) => {
|
|
10
|
+
modified: string[];
|
|
11
|
+
removed: string[];
|
|
12
|
+
};
|