@rolldown/debug 1.0.0-beta.9-commit.0ec9e7d → 1.0.0-rc.1

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 (34) hide show
  1. package/dist/generated/Asset.d.ts +12 -0
  2. package/dist/generated/Asset.js +2 -0
  3. package/dist/generated/AssetsReady.d.ts +5 -0
  4. package/dist/generated/AssetsReady.js +1 -0
  5. package/dist/generated/Chunk.d.ts +58 -0
  6. package/dist/generated/Chunk.js +1 -0
  7. package/dist/generated/ChunkGraphReady.d.ts +5 -0
  8. package/dist/generated/ChunkGraphReady.js +1 -0
  9. package/dist/generated/ChunkImport.d.ts +7 -0
  10. package/dist/generated/ChunkImport.js +2 -0
  11. package/dist/generated/HookLoadCallEnd.d.ts +2 -2
  12. package/dist/generated/HookLoadCallStart.d.ts +1 -1
  13. package/dist/generated/HookRenderChunkEnd.d.ts +10 -0
  14. package/dist/generated/HookRenderChunkEnd.js +2 -0
  15. package/dist/generated/HookRenderChunkStart.d.ts +10 -0
  16. package/dist/generated/HookRenderChunkStart.js +2 -0
  17. package/dist/generated/HookResolveIdCallEnd.d.ts +5 -1
  18. package/dist/generated/HookResolveIdCallStart.d.ts +5 -1
  19. package/dist/generated/HookTransformCallEnd.d.ts +5 -2
  20. package/dist/generated/HookTransformCallStart.d.ts +5 -2
  21. package/dist/generated/InputItem.d.ts +11 -0
  22. package/dist/generated/InputItem.js +2 -0
  23. package/dist/generated/Meta.d.ts +6 -1
  24. package/dist/generated/ModuleImport.d.ts +1 -1
  25. package/dist/generated/PluginItem.d.ts +4 -0
  26. package/dist/generated/PluginItem.js +2 -0
  27. package/dist/generated/SessionMeta.d.ts +18 -0
  28. package/dist/generated/SessionMeta.js +1 -0
  29. package/dist/generated/index.d.ts +10 -0
  30. package/dist/generated/index.js +10 -0
  31. package/dist/index.d.ts +7 -2
  32. package/dist/index.js +1 -1
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/package.json +15 -13
@@ -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,58 @@
1
+ import type { ChunkImport } from "./ChunkImport";
2
+ export type Chunk = {
3
+ 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 {};
@@ -1,11 +1,11 @@
1
1
  export type HookLoadCallEnd = {
2
2
  action: 'HookLoadCallEnd';
3
3
  module_id: string;
4
- source: string | null;
4
+ content: string | null;
5
5
  plugin_name: string;
6
6
  /**
7
7
  * The index of the plugin in the plugin list. It's unique to each plugin.
8
8
  */
9
- plugin_index: number;
9
+ plugin_id: number;
10
10
  call_id: string;
11
11
  };
@@ -5,6 +5,6 @@ export type HookLoadCallStart = {
5
5
  /**
6
6
  * The index of the plugin in the plugin list. It's unique to each plugin.
7
7
  */
8
- plugin_index: number;
8
+ plugin_id: number;
9
9
  call_id: string;
10
10
  };
@@ -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 {};
@@ -9,7 +9,11 @@ export type HookResolveIdCallEnd = {
9
9
  /**
10
10
  * The index of the plugin in the plugin list. It's unique to each plugin.
11
11
  */
12
- plugin_index: number;
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
+ */
13
17
  trigger: 'automatic' | 'manual';
14
18
  call_id: string;
15
19
  };
@@ -7,7 +7,11 @@ export type HookResolveIdCallStart = {
7
7
  /**
8
8
  * The index of the plugin in the plugin list. It's unique to each plugin.
9
9
  */
10
- plugin_index: number;
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
+ */
11
15
  trigger: 'automatic' | 'manual';
12
16
  call_id: string;
13
17
  };
@@ -1,11 +1,14 @@
1
1
  export type HookTransformCallEnd = {
2
2
  action: 'HookTransformCallEnd';
3
3
  module_id: string;
4
- transformed_source: string | null;
4
+ /**
5
+ * Result after transform. Empty means the transform hook returns nothing.
6
+ */
7
+ content: string | null;
5
8
  plugin_name: string;
6
9
  /**
7
10
  * The index of the plugin in the plugin list. It's unique to each plugin.
8
11
  */
9
- plugin_index: number;
12
+ plugin_id: number;
10
13
  call_id: string;
11
14
  };
@@ -1,11 +1,14 @@
1
1
  export type HookTransformCallStart = {
2
2
  action: 'HookTransformCallStart';
3
3
  module_id: string;
4
- source: string;
4
+ /**
5
+ * The content of the module before transform.
6
+ */
7
+ content: string;
5
8
  plugin_name: string;
6
9
  /**
7
10
  * The index of the plugin in the plugin list. It's unique to each plugin.
8
11
  */
9
- plugin_index: number;
12
+ plugin_id: number;
10
13
  call_id: string;
11
14
  };
@@ -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 {};
@@ -1,10 +1,15 @@
1
+ import type { AssetsReady } from "./AssetsReady";
1
2
  import type { BuildEnd } from "./BuildEnd";
2
3
  import type { BuildStart } from "./BuildStart";
4
+ import type { ChunkGraphReady } from "./ChunkGraphReady";
3
5
  import type { HookLoadCallEnd } from "./HookLoadCallEnd";
4
6
  import type { HookLoadCallStart } from "./HookLoadCallStart";
7
+ import type { HookRenderChunkEnd } from "./HookRenderChunkEnd";
8
+ import type { HookRenderChunkStart } from "./HookRenderChunkStart";
5
9
  import type { HookResolveIdCallEnd } from "./HookResolveIdCallEnd";
6
10
  import type { HookResolveIdCallStart } from "./HookResolveIdCallStart";
7
11
  import type { HookTransformCallEnd } from "./HookTransformCallEnd";
8
12
  import type { HookTransformCallStart } from "./HookTransformCallStart";
9
13
  import type { ModuleGraphReady } from "./ModuleGraphReady";
10
- export type Meta = HookTransformCallStart | HookTransformCallEnd | HookLoadCallStart | HookLoadCallEnd | BuildStart | BuildEnd | HookResolveIdCallStart | HookResolveIdCallEnd | 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;
@@ -1,5 +1,5 @@
1
1
  export type ModuleImport = {
2
- id: string;
2
+ module_id: string;
3
3
  /**
4
4
  * - `import-statement`: `import { foo } from './lib.js';`
5
5
  * - `dynamic-import`: `import('./lib.js')`
@@ -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 {};
@@ -1,12 +1,22 @@
1
+ export * from './Asset.js';
2
+ export * from './AssetsReady.js';
1
3
  export * from './BuildEnd.js';
2
4
  export * from './BuildStart.js';
5
+ export * from './Chunk.js';
6
+ export * from './ChunkGraphReady.js';
7
+ export * from './ChunkImport.js';
3
8
  export * from './HookLoadCallEnd.js';
4
9
  export * from './HookLoadCallStart.js';
10
+ export * from './HookRenderChunkEnd.js';
11
+ export * from './HookRenderChunkStart.js';
5
12
  export * from './HookResolveIdCallEnd.js';
6
13
  export * from './HookResolveIdCallStart.js';
7
14
  export * from './HookTransformCallEnd.js';
8
15
  export * from './HookTransformCallStart.js';
16
+ export * from './InputItem.js';
9
17
  export * from './Meta.js';
10
18
  export * from './Module.js';
11
19
  export * from './ModuleGraphReady.js';
12
20
  export * from './ModuleImport.js';
21
+ export * from './PluginItem.js';
22
+ export * from './SessionMeta.js';
@@ -1,12 +1,22 @@
1
+ export * from './Asset.js';
2
+ export * from './AssetsReady.js';
1
3
  export * from './BuildEnd.js';
2
4
  export * from './BuildStart.js';
5
+ export * from './Chunk.js';
6
+ export * from './ChunkGraphReady.js';
7
+ export * from './ChunkImport.js';
3
8
  export * from './HookLoadCallEnd.js';
4
9
  export * from './HookLoadCallStart.js';
10
+ export * from './HookRenderChunkEnd.js';
11
+ export * from './HookRenderChunkStart.js';
5
12
  export * from './HookResolveIdCallEnd.js';
6
13
  export * from './HookResolveIdCallStart.js';
7
14
  export * from './HookTransformCallEnd.js';
8
15
  export * from './HookTransformCallStart.js';
16
+ export * from './InputItem.js';
9
17
  export * from './Meta.js';
10
18
  export * from './Module.js';
11
19
  export * from './ModuleGraphReady.js';
12
20
  export * from './ModuleImport.js';
21
+ export * from './PluginItem.js';
22
+ export * from './SessionMeta.js';
package/dist/index.d.ts CHANGED
@@ -1,8 +1,13 @@
1
1
  import { type Meta } from './generated/index.js';
2
2
  export * from './generated/index.js';
3
- export type Event = {
3
+ export type Event = StringRef | ({
4
4
  timestamp: string;
5
5
  session_id: string;
6
- } & Meta;
6
+ } & Meta);
7
7
  export declare function parseToEvents(data: string): Event[];
8
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 CHANGED
@@ -1,6 +1,6 @@
1
1
  export * from './generated/index.js';
2
2
  export function parseToEvents(data) {
3
- return data.split('\n').map(v => JSON.parse(v));
3
+ return data.split('\n').map((v) => JSON.parse(v));
4
4
  }
5
5
  export function parseToEvent(data) {
6
6
  return JSON.parse(data);
@@ -1 +1 @@
1
- {"root":["../src/index.ts","../src/generated/BuildEnd.ts","../src/generated/BuildStart.ts","../src/generated/HookLoadCallEnd.ts","../src/generated/HookLoadCallStart.ts","../src/generated/HookResolveIdCallEnd.ts","../src/generated/HookResolveIdCallStart.ts","../src/generated/HookTransformCallEnd.ts","../src/generated/HookTransformCallStart.ts","../src/generated/Meta.ts","../src/generated/Module.ts","../src/generated/ModuleGraphReady.ts","../src/generated/ModuleImport.ts","../src/generated/index.ts"],"version":"5.8.3"}
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 CHANGED
@@ -1,31 +1,33 @@
1
1
  {
2
2
  "name": "@rolldown/debug",
3
- "version": "1.0.0-beta.9-commit.0ec9e7d",
3
+ "version": "1.0.0-rc.1",
4
+ "homepage": "https://rolldown.rs/",
4
5
  "license": "MIT",
5
- "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/rolldown/rolldown.git",
9
9
  "directory": "packages/debug"
10
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
+ },
11
21
  "publishConfig": {
12
22
  "access": "public"
13
23
  },
14
24
  "devDependencies": {
15
- "@oxc-node/cli": "^0.0.27"
16
- },
17
- "exports": {
18
- ".": {
19
- "import": "./dist/index.js",
20
- "types": "./dist/index.d.ts"
21
- }
25
+ "@oxc-node/cli": "^0.0.35"
22
26
  },
23
- "files": [
24
- "dist"
25
- ],
26
27
  "scripts": {
27
28
  "gen-action-types": "oxnode ../../scripts/src/gen-debug-action-types.ts",
28
29
  "build": "pnpm run gen-action-types && tsc -b",
29
- "test": "echo \"Error: no test specified\" && exit 1"
30
+ "test": "echo \"Error: no test specified\" && exit 1",
31
+ "publint": "publint ."
30
32
  }
31
33
  }