@rollipop/rolldown-debug 0.0.0-beta.0

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 (51) hide show
  1. package/LICENSE +25 -0
  2. package/dist/generated/Asset.d.ts +12 -0
  3. package/dist/generated/Asset.js +2 -0
  4. package/dist/generated/AssetsReady.d.ts +5 -0
  5. package/dist/generated/AssetsReady.js +1 -0
  6. package/dist/generated/BuildEnd.d.ts +3 -0
  7. package/dist/generated/BuildEnd.js +2 -0
  8. package/dist/generated/BuildStart.d.ts +3 -0
  9. package/dist/generated/BuildStart.js +2 -0
  10. package/dist/generated/Chunk.d.ts +58 -0
  11. package/dist/generated/Chunk.js +1 -0
  12. package/dist/generated/ChunkGraphReady.d.ts +5 -0
  13. package/dist/generated/ChunkGraphReady.js +1 -0
  14. package/dist/generated/ChunkImport.d.ts +7 -0
  15. package/dist/generated/ChunkImport.js +2 -0
  16. package/dist/generated/HookLoadCallEnd.d.ts +11 -0
  17. package/dist/generated/HookLoadCallEnd.js +2 -0
  18. package/dist/generated/HookLoadCallStart.d.ts +10 -0
  19. package/dist/generated/HookLoadCallStart.js +2 -0
  20. package/dist/generated/HookRenderChunkEnd.d.ts +10 -0
  21. package/dist/generated/HookRenderChunkEnd.js +2 -0
  22. package/dist/generated/HookRenderChunkStart.d.ts +10 -0
  23. package/dist/generated/HookRenderChunkStart.js +2 -0
  24. package/dist/generated/HookResolveIdCallEnd.d.ts +19 -0
  25. package/dist/generated/HookResolveIdCallEnd.js +2 -0
  26. package/dist/generated/HookResolveIdCallStart.d.ts +17 -0
  27. package/dist/generated/HookResolveIdCallStart.js +2 -0
  28. package/dist/generated/HookTransformCallEnd.d.ts +14 -0
  29. package/dist/generated/HookTransformCallEnd.js +2 -0
  30. package/dist/generated/HookTransformCallStart.d.ts +14 -0
  31. package/dist/generated/HookTransformCallStart.js +2 -0
  32. package/dist/generated/InputItem.d.ts +11 -0
  33. package/dist/generated/InputItem.js +2 -0
  34. package/dist/generated/Meta.d.ts +15 -0
  35. package/dist/generated/Meta.js +1 -0
  36. package/dist/generated/Module.d.ts +7 -0
  37. package/dist/generated/Module.js +1 -0
  38. package/dist/generated/ModuleGraphReady.d.ts +5 -0
  39. package/dist/generated/ModuleGraphReady.js +1 -0
  40. package/dist/generated/ModuleImport.d.ts +17 -0
  41. package/dist/generated/ModuleImport.js +2 -0
  42. package/dist/generated/PluginItem.d.ts +4 -0
  43. package/dist/generated/PluginItem.js +2 -0
  44. package/dist/generated/SessionMeta.d.ts +18 -0
  45. package/dist/generated/SessionMeta.js +1 -0
  46. package/dist/generated/index.d.ts +22 -0
  47. package/dist/generated/index.js +22 -0
  48. package/dist/index.d.ts +13 -0
  49. package/dist/index.js +7 -0
  50. package/dist/tsconfig.tsbuildinfo +1 -0
  51. package/package.json +32 -0
package/LICENSE ADDED
@@ -0,0 +1,25 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-present VoidZero Inc. & Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ end of terms and conditions
24
+
25
+ The licenses of externally maintained libraries from which parts of the Software is derived are listed [here](https://github.com/rolldown/rolldown/blob/main/THIRD-PARTY-LICENSE).
@@ -0,0 +1,12 @@
1
+ export type Asset = {
2
+ /**
3
+ * The id of the chunk that the asset is created from. Empty means the asset is not created from a chunk.
4
+ */
5
+ chunk_id: number | null;
6
+ content: string | null;
7
+ /**
8
+ * The size of the asset in bytes.
9
+ */
10
+ size: number;
11
+ filename: string;
12
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { Asset } from "./Asset";
2
+ export type AssetsReady = {
3
+ action: 'AssetsReady';
4
+ assets: Array<Asset>;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export type BuildEnd = {
2
+ action: 'BuildEnd';
3
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export type BuildStart = {
2
+ action: 'BuildStart';
3
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,58 @@
1
+ import type { ChunkImport } from "./ChunkImport";
2
+ export type Chunk = {
3
+ chunk_id: number;
4
+ /**
5
+ * ```js
6
+ * import { defineConfig } from 'rolldown';
7
+ * export default defineConfig({
8
+ * input: {
9
+ * main: './index.ts',
10
+ * },
11
+ * output: {
12
+ * advancedChunks: {
13
+ * groups: [
14
+ * {
15
+ * name: 'npm-libs',
16
+ * test: /node_modules/,
17
+ * },
18
+ * ],
19
+ * },
20
+ * },
21
+ * });
22
+ * ```
23
+ * - `main` is the name, if this chunk is an entry chunk.
24
+ * - `npm-libs` is the name, if this chunk is created by `output.advancedChunks`.
25
+ */
26
+ name: string | null;
27
+ /**
28
+ * ```js
29
+ * import { defineConfig } from 'rolldown';
30
+ * export default defineConfig({
31
+ * input: {
32
+ * main: './index.ts',
33
+ * },
34
+ * output: {
35
+ * advancedChunks: {
36
+ * groups: [
37
+ * {
38
+ * name: 'npm-libs',
39
+ * test: /node_modules/,
40
+ * },
41
+ * ],
42
+ * },
43
+ * },
44
+ * });
45
+ * ```
46
+ * - `advanced_chunk_group_id` will be `0` if this chunk is created by `output.advancedChunks`.
47
+ */
48
+ advanced_chunk_group_id: number | null;
49
+ is_user_defined_entry: boolean;
50
+ /**
51
+ * A entry could be both user-defined and async.
52
+ */
53
+ is_async_entry: boolean;
54
+ entry_module: string | null;
55
+ modules: Array<string>;
56
+ reason: 'advanced-chunks' | 'preserve-modules' | 'entry' | 'common';
57
+ imports: Array<ChunkImport>;
58
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { Chunk } from "./Chunk";
2
+ export type ChunkGraphReady = {
3
+ action: 'ChunkGraphReady';
4
+ chunks: Array<Chunk>;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export type ChunkImport = {
2
+ /**
3
+ * Id of the imported chunk
4
+ */
5
+ chunk_id: number;
6
+ kind: 'import-statement' | 'dynamic-import';
7
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,11 @@
1
+ export type HookLoadCallEnd = {
2
+ action: 'HookLoadCallEnd';
3
+ module_id: string;
4
+ content: string | null;
5
+ plugin_name: string;
6
+ /**
7
+ * The index of the plugin in the plugin list. It's unique to each plugin.
8
+ */
9
+ plugin_id: number;
10
+ call_id: string;
11
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ export type HookLoadCallStart = {
2
+ action: 'HookLoadCallStart';
3
+ module_id: string;
4
+ plugin_name: string;
5
+ /**
6
+ * The index of the plugin in the plugin list. It's unique to each plugin.
7
+ */
8
+ plugin_id: number;
9
+ call_id: string;
10
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ export type HookRenderChunkEnd = {
2
+ action: 'HookRenderChunkEnd';
3
+ plugin_name: string;
4
+ /**
5
+ * The index of the plugin in the plugin list. It's unique to each plugin.
6
+ */
7
+ plugin_id: number;
8
+ call_id: string;
9
+ content: string | null;
10
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ export type HookRenderChunkStart = {
2
+ action: 'HookRenderChunkStart';
3
+ plugin_name: string;
4
+ /**
5
+ * The index of the plugin in the plugin list. It's unique to each plugin.
6
+ */
7
+ plugin_id: number;
8
+ call_id: string;
9
+ content: string;
10
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,19 @@
1
+ export type HookResolveIdCallEnd = {
2
+ action: 'HookResolveIdCallEnd';
3
+ resolved_id: string | null;
4
+ /**
5
+ * If the value is `true/false`, it means the plugin explicitly returned the value for this field.
6
+ */
7
+ is_external: boolean | null;
8
+ plugin_name: string;
9
+ /**
10
+ * The index of the plugin in the plugin list. It's unique to each plugin.
11
+ */
12
+ plugin_id: number;
13
+ /**
14
+ * - `automatic` means the resolve call is triggered by the bundler automatically.
15
+ * - `manual` means the resolve call is triggered manually by `this.resolve(...)`
16
+ */
17
+ trigger: 'automatic' | 'manual';
18
+ call_id: string;
19
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,17 @@
1
+ export type HookResolveIdCallStart = {
2
+ action: 'HookResolveIdCallStart';
3
+ importer: string | null;
4
+ module_request: string;
5
+ import_kind: string;
6
+ plugin_name: string;
7
+ /**
8
+ * The index of the plugin in the plugin list. It's unique to each plugin.
9
+ */
10
+ plugin_id: number;
11
+ /**
12
+ * - `automatic` means the resolve call is triggered by the bundler automatically.
13
+ * - `manual` means the resolve call is triggered manually by `this.resolve(...)`
14
+ */
15
+ trigger: 'automatic' | 'manual';
16
+ call_id: string;
17
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,14 @@
1
+ export type HookTransformCallEnd = {
2
+ action: 'HookTransformCallEnd';
3
+ module_id: string;
4
+ /**
5
+ * Result after transform. Empty means the transform hook returns nothing.
6
+ */
7
+ content: string | null;
8
+ plugin_name: string;
9
+ /**
10
+ * The index of the plugin in the plugin list. It's unique to each plugin.
11
+ */
12
+ plugin_id: number;
13
+ call_id: string;
14
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,14 @@
1
+ export type HookTransformCallStart = {
2
+ action: 'HookTransformCallStart';
3
+ module_id: string;
4
+ /**
5
+ * The content of the module before transform.
6
+ */
7
+ content: string;
8
+ plugin_name: string;
9
+ /**
10
+ * The index of the plugin in the plugin list. It's unique to each plugin.
11
+ */
12
+ plugin_id: number;
13
+ call_id: string;
14
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,11 @@
1
+ export type InputItem = {
2
+ /**
3
+ * For `input: { main: './main.js' }`, `./main.js` has the name `main`.
4
+ * For `input: ['./main.js']`, `./main.js` doesn't have a name.
5
+ */
6
+ name: string | null;
7
+ /**
8
+ * For `input: { main: './main.js' }`, `./main.js` is the filename.
9
+ */
10
+ filename: string;
11
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,15 @@
1
+ import type { AssetsReady } from "./AssetsReady";
2
+ import type { BuildEnd } from "./BuildEnd";
3
+ import type { BuildStart } from "./BuildStart";
4
+ import type { ChunkGraphReady } from "./ChunkGraphReady";
5
+ import type { HookLoadCallEnd } from "./HookLoadCallEnd";
6
+ import type { HookLoadCallStart } from "./HookLoadCallStart";
7
+ import type { HookRenderChunkEnd } from "./HookRenderChunkEnd";
8
+ import type { HookRenderChunkStart } from "./HookRenderChunkStart";
9
+ import type { HookResolveIdCallEnd } from "./HookResolveIdCallEnd";
10
+ import type { HookResolveIdCallStart } from "./HookResolveIdCallStart";
11
+ import type { HookTransformCallEnd } from "./HookTransformCallEnd";
12
+ import type { HookTransformCallStart } from "./HookTransformCallStart";
13
+ import type { ModuleGraphReady } from "./ModuleGraphReady";
14
+ import type { SessionMeta } from "./SessionMeta";
15
+ export type Meta = HookTransformCallStart | HookTransformCallEnd | HookLoadCallStart | HookLoadCallEnd | BuildStart | BuildEnd | HookResolveIdCallStart | HookResolveIdCallEnd | ModuleGraphReady | SessionMeta | ChunkGraphReady | HookRenderChunkStart | HookRenderChunkEnd | AssetsReady;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { ModuleImport } from "./ModuleImport";
2
+ export type Module = {
3
+ id: string;
4
+ is_external: boolean;
5
+ imports: Array<ModuleImport> | null;
6
+ importers: Array<string> | null;
7
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { Module } from "./Module";
2
+ export type ModuleGraphReady = {
3
+ action: 'ModuleGraphReady';
4
+ modules: Array<Module>;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ export type ModuleImport = {
2
+ module_id: string;
3
+ /**
4
+ * - `import-statement`: `import { foo } from './lib.js';`
5
+ * - `dynamic-import`: `import('./lib.js')`
6
+ * - `require-call`: `require('./lib.js')`
7
+ * - `import-rule`: `@import 'bg-color.css'`
8
+ * - `url-token`: `url('./icon.png')`
9
+ * - `new-url`: `new URL('./worker.js', import.meta.url)`
10
+ * - `hot-accept`: `import.meta.hot.accept('./lib.js', () => {})`
11
+ */
12
+ kind: 'import-statement' | 'dynamic-import' | 'require-call' | 'import-rule' | 'url-token' | 'new-url' | 'hot-accept';
13
+ /**
14
+ * `./lib.js` in `import { foo } from './lib.js';`
15
+ */
16
+ module_request: string;
17
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export type PluginItem = {
2
+ name: string;
3
+ plugin_id: number;
4
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,18 @@
1
+ import type { InputItem } from "./InputItem";
2
+ import type { PluginItem } from "./PluginItem";
3
+ export type SessionMeta = {
4
+ action: 'SessionMeta';
5
+ inputs: Array<InputItem>;
6
+ plugins: Array<PluginItem>;
7
+ cwd: string;
8
+ platform: 'browser' | 'node' | 'neutral';
9
+ format: 'esm' | 'cjs' | 'iife' | 'umd';
10
+ /**
11
+ * `OutputOptions.dir`
12
+ */
13
+ dir: string | null;
14
+ /**
15
+ * `OutputOptions.file`
16
+ */
17
+ file: string | null;
18
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,22 @@
1
+ export * from './Asset.js';
2
+ export * from './AssetsReady.js';
3
+ export * from './BuildEnd.js';
4
+ export * from './BuildStart.js';
5
+ export * from './Chunk.js';
6
+ export * from './ChunkGraphReady.js';
7
+ export * from './ChunkImport.js';
8
+ export * from './HookLoadCallEnd.js';
9
+ export * from './HookLoadCallStart.js';
10
+ export * from './HookRenderChunkEnd.js';
11
+ export * from './HookRenderChunkStart.js';
12
+ export * from './HookResolveIdCallEnd.js';
13
+ export * from './HookResolveIdCallStart.js';
14
+ export * from './HookTransformCallEnd.js';
15
+ export * from './HookTransformCallStart.js';
16
+ export * from './InputItem.js';
17
+ export * from './Meta.js';
18
+ export * from './Module.js';
19
+ export * from './ModuleGraphReady.js';
20
+ export * from './ModuleImport.js';
21
+ export * from './PluginItem.js';
22
+ export * from './SessionMeta.js';
@@ -0,0 +1,22 @@
1
+ export * from './Asset.js';
2
+ export * from './AssetsReady.js';
3
+ export * from './BuildEnd.js';
4
+ export * from './BuildStart.js';
5
+ export * from './Chunk.js';
6
+ export * from './ChunkGraphReady.js';
7
+ export * from './ChunkImport.js';
8
+ export * from './HookLoadCallEnd.js';
9
+ export * from './HookLoadCallStart.js';
10
+ export * from './HookRenderChunkEnd.js';
11
+ export * from './HookRenderChunkStart.js';
12
+ export * from './HookResolveIdCallEnd.js';
13
+ export * from './HookResolveIdCallStart.js';
14
+ export * from './HookTransformCallEnd.js';
15
+ export * from './HookTransformCallStart.js';
16
+ export * from './InputItem.js';
17
+ export * from './Meta.js';
18
+ export * from './Module.js';
19
+ export * from './ModuleGraphReady.js';
20
+ export * from './ModuleImport.js';
21
+ export * from './PluginItem.js';
22
+ export * from './SessionMeta.js';
@@ -0,0 +1,13 @@
1
+ import { type Meta } from './generated/index.js';
2
+ export * from './generated/index.js';
3
+ export type Event = StringRef | ({
4
+ timestamp: string;
5
+ session_id: string;
6
+ } & Meta);
7
+ export declare function parseToEvents(data: string): Event[];
8
+ export declare function parseToEvent(data: string): Event;
9
+ export interface StringRef {
10
+ action: 'StringRef';
11
+ id: string;
12
+ content: string;
13
+ }
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ export * from './generated/index.js';
2
+ export function parseToEvents(data) {
3
+ return data.split('\n').map((v) => JSON.parse(v));
4
+ }
5
+ export function parseToEvent(data) {
6
+ return JSON.parse(data);
7
+ }
@@ -0,0 +1 @@
1
+ {"root":["../src/index.ts","../src/generated/Asset.ts","../src/generated/AssetsReady.ts","../src/generated/BuildEnd.ts","../src/generated/BuildStart.ts","../src/generated/Chunk.ts","../src/generated/ChunkGraphReady.ts","../src/generated/ChunkImport.ts","../src/generated/HookLoadCallEnd.ts","../src/generated/HookLoadCallStart.ts","../src/generated/HookRenderChunkEnd.ts","../src/generated/HookRenderChunkStart.ts","../src/generated/HookResolveIdCallEnd.ts","../src/generated/HookResolveIdCallStart.ts","../src/generated/HookTransformCallEnd.ts","../src/generated/HookTransformCallStart.ts","../src/generated/InputItem.ts","../src/generated/Meta.ts","../src/generated/Module.ts","../src/generated/ModuleGraphReady.ts","../src/generated/ModuleImport.ts","../src/generated/PluginItem.ts","../src/generated/SessionMeta.ts","../src/generated/index.ts"],"version":"5.9.3"}
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@rollipop/rolldown-debug",
3
+ "version": "0.0.0-beta.0",
4
+ "homepage": "https://rolldown.rs/",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/leegeunhyeok/rolldown.git",
9
+ "directory": "packages/debug"
10
+ },
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "type": "module",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.js"
19
+ }
20
+ },
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "devDependencies": {
25
+ "@oxc-node/cli": "^0.0.35"
26
+ },
27
+ "scripts": {
28
+ "gen-action-types": "oxnode ../../scripts/src/gen-debug-action-types.ts",
29
+ "build": "pnpm run gen-action-types && tsc -b",
30
+ "test": "echo \"Error: no test specified\" && exit 1"
31
+ }
32
+ }