@utoo/pack 0.0.1-alpha.13 → 0.0.1-alpha.15

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/cjs/binding.d.ts CHANGED
@@ -4,78 +4,70 @@
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
6
  export declare class ExternalObject<T> {
7
- readonly "": {
8
- readonly "": unique symbol;
9
- [K: symbol]: T;
10
- };
7
+ readonly '': {
8
+ readonly '': unique symbol
9
+ [K: symbol]: T
10
+ }
11
11
  }
12
12
  export interface TransformOutput {
13
- code: string;
14
- map?: string;
15
- output?: string;
16
- diagnostics: Array<string>;
13
+ code: string
14
+ map?: string
15
+ output?: string
16
+ diagnostics: Array<string>
17
+ }
18
+ export interface NapiEndpointConfig {
19
+
17
20
  }
18
-
19
- export interface NapiEndpointConfig {}
20
21
  export interface NapiServerPath {
21
- path: string;
22
- contentHash: string;
22
+ path: string
23
+ contentHash: string
23
24
  }
24
25
  export interface NapiWrittenEndpoint {
25
- type: string;
26
- entryPath?: string;
27
- clientPaths: Array<string>;
28
- serverPaths: Array<NapiServerPath>;
29
- config: NapiEndpointConfig;
30
- }
31
- export declare function endpointWriteToDisk(endpoint: {
32
- __napiType: "Endpoint";
33
- }): Promise<TurbopackResult>;
34
- export declare function endpointServerChangedSubscribe(
35
- endpoint: { __napiType: "Endpoint" },
36
- issues: boolean,
37
- func: (...args: any[]) => any,
38
- ): { __napiType: "RootTask" };
39
- export declare function endpointClientChangedSubscribe(
40
- endpoint: { __napiType: "Endpoint" },
41
- func: (...args: any[]) => any,
42
- ): { __napiType: "RootTask" };
26
+ type: string
27
+ entryPath?: string
28
+ clientPaths: Array<string>
29
+ serverPaths: Array<NapiServerPath>
30
+ config: NapiEndpointConfig
31
+ }
32
+ export declare function endpointWriteToDisk(endpoint: { __napiType: "Endpoint" }): Promise<TurbopackResult>
33
+ export declare function endpointServerChangedSubscribe(endpoint: { __napiType: "Endpoint" }, issues: boolean, func: (...args: any[]) => any): { __napiType: "RootTask" }
34
+ export declare function endpointClientChangedSubscribe(endpoint: { __napiType: "Endpoint" }, func: (...args: any[]) => any): { __napiType: "RootTask" }
43
35
  export interface NapiEnvVar {
44
- name: string;
45
- value: string;
36
+ name: string
37
+ value: string
46
38
  }
47
39
  export interface NapiWatchOptions {
48
40
  /** Whether to watch the filesystem for file changes. */
49
- enable: boolean;
41
+ enable: boolean
50
42
  /**
51
43
  * Enable polling at a certain interval if the native file watching doesn't work (e.g.
52
44
  * docker).
53
45
  */
54
- pollIntervalMs?: number;
46
+ pollIntervalMs?: number
55
47
  }
56
48
  export interface NapiProjectOptions {
57
49
  /**
58
50
  * A root path from which all files must be nested under. Trying to access
59
51
  * a file outside this root will fail. Think of this as a chroot.
60
52
  */
61
- rootPath: string;
53
+ rootPath: string
62
54
  /** A path inside the root_path which contains the app/pages directories. */
63
- projectPath: string;
55
+ projectPath: string
64
56
  /** Filesystem watcher options. */
65
- watch: NapiWatchOptions;
57
+ watch: NapiWatchOptions
66
58
  /** The contents of config.js, serialized to JSON. */
67
- config: string;
59
+ config: string
68
60
  /** A map of environment variables to use when compiling code. */
69
- processEnv: Array<NapiEnvVar>;
61
+ processEnv: Array<NapiEnvVar>
70
62
  /**
71
63
  * A map of environment variables which should get injected at compile
72
64
  * time.
73
65
  */
74
- processDefineEnv: NapiDefineEnv;
66
+ processDefineEnv: NapiDefineEnv
75
67
  /** The mode in which Next.js is running. */
76
- dev: boolean;
68
+ dev: boolean
77
69
  /** The build id. */
78
- buildId: string;
70
+ buildId: string
79
71
  }
80
72
  /** [NapiProjectOptions] with all fields optional. */
81
73
  export interface NapiPartialProjectOptions {
@@ -83,61 +75,53 @@ export interface NapiPartialProjectOptions {
83
75
  * A root path from which all files must be nested under. Trying to access
84
76
  * a file outside this root will fail. Think of this as a chroot.
85
77
  */
86
- rootPath?: string;
78
+ rootPath?: string
87
79
  /** A path inside the root_path which contains the app/pages directories. */
88
- projectPath?: string;
80
+ projectPath?: string
89
81
  /** Filesystem watcher options. */
90
- watch?: NapiWatchOptions;
82
+ watch?: NapiWatchOptions
91
83
  /** The contents of config.js, serialized to JSON. */
92
- config?: string;
84
+ config?: string
93
85
  /** A map of environment variables to use when compiling code. */
94
- processEnv?: Array<NapiEnvVar>;
86
+ processEnv?: Array<NapiEnvVar>
95
87
  /**
96
88
  * A map of environment variables which should get injected at compile
97
89
  * time.
98
90
  */
99
- processDefineEnv?: NapiDefineEnv;
91
+ processDefineEnv?: NapiDefineEnv
100
92
  /** The mode in which Next.js is running. */
101
- dev?: boolean;
93
+ dev?: boolean
102
94
  /** The build id. */
103
- buildId?: string;
95
+ buildId?: string
104
96
  /**
105
97
  * When the code is minified, this opts out of the default mangling of
106
98
  * local names for variables, functions etc., which can be useful for
107
99
  * debugging/profiling purposes.
108
100
  */
109
- noMangling?: boolean;
101
+ noMangling?: boolean
110
102
  }
111
103
  export interface NapiDefineEnv {
112
- client: Array<NapiEnvVar>;
113
- edge: Array<NapiEnvVar>;
114
- nodejs: Array<NapiEnvVar>;
104
+ client: Array<NapiEnvVar>
105
+ edge: Array<NapiEnvVar>
106
+ nodejs: Array<NapiEnvVar>
115
107
  }
116
108
  export interface NapiTurboEngineOptions {
117
109
  /** Use the new backend with persistent caching enabled. */
118
- persistentCaching?: boolean;
110
+ persistentCaching?: boolean
119
111
  /** An upper bound of memory that turbopack will attempt to stay under. */
120
- memoryLimit?: number;
112
+ memoryLimit?: number
121
113
  /** Track dependencies between tasks. If false, any change during build will error. */
122
- dependencyTracking?: boolean;
114
+ dependencyTracking?: boolean
123
115
  }
124
- export declare function projectNew(
125
- options: NapiProjectOptions,
126
- turboEngineOptions: NapiTurboEngineOptions,
127
- ): Promise<{ __napiType: "Project" }>;
128
- export declare function projectUpdate(
129
- project: { __napiType: "Project" },
130
- options: NapiPartialProjectOptions,
131
- ): Promise<void>;
116
+ export declare function projectNew(options: NapiProjectOptions, turboEngineOptions: NapiTurboEngineOptions): Promise<{ __napiType: "Project" }>
117
+ export declare function projectUpdate(project: { __napiType: "Project" }, options: NapiPartialProjectOptions): Promise<void>
132
118
  /**
133
119
  * Runs exit handlers for the project registered using the [`ExitHandler`] API.
134
120
  *
135
121
  * This is called by `project_shutdown`, so if you're calling that API, you shouldn't call this
136
122
  * one.
137
123
  */
138
- export declare function projectOnExit(project: {
139
- __napiType: "Project";
140
- }): Promise<void>;
124
+ export declare function projectOnExit(project: { __napiType: "Project" }): Promise<void>
141
125
  /**
142
126
  * Runs `project_on_exit`, and then waits for turbo_tasks to gracefully shut down.
143
127
  *
@@ -145,39 +129,25 @@ export declare function projectOnExit(project: {
145
129
  * it's skipped in the development server (`project_on_exit` is used instead with a short timeout),
146
130
  * where we prioritize fast exit and user responsiveness over all else.
147
131
  */
148
- export declare function projectShutdown(project: {
149
- __napiType: "Project";
150
- }): Promise<void>;
132
+ export declare function projectShutdown(project: { __napiType: "Project" }): Promise<void>
151
133
  export interface NapiEntrypoints {
152
- apps?: Array<ExternalObject<ExternalEndpoint>>;
153
- libraries?: Array<ExternalObject<ExternalEndpoint>>;
134
+ apps?: Array<ExternalObject<ExternalEndpoint>>
135
+ libraries?: Array<ExternalObject<ExternalEndpoint>>
154
136
  }
155
- export declare function projectWriteAllEntrypointsToDisk(project: {
156
- __napiType: "Project";
157
- }): Promise<TurbopackResult>;
158
- export declare function projectEntrypointsSubscribe(
159
- project: { __napiType: "Project" },
160
- func: (...args: any[]) => any,
161
- ): { __napiType: "RootTask" };
162
- export declare function projectHmrEvents(
163
- project: { __napiType: "Project" },
164
- identifier: string,
165
- func: (...args: any[]) => any,
166
- ): { __napiType: "RootTask" };
137
+ export declare function projectWriteAllEntrypointsToDisk(project: { __napiType: "Project" }): Promise<TurbopackResult>
138
+ export declare function projectEntrypointsSubscribe(project: { __napiType: "Project" }, func: (...args: any[]) => any): { __napiType: "RootTask" }
139
+ export declare function projectHmrEvents(project: { __napiType: "Project" }, identifier: string, func: (...args: any[]) => any): { __napiType: "RootTask" }
167
140
  export interface HmrIdentifiers {
168
- identifiers: Array<string>;
141
+ identifiers: Array<string>
169
142
  }
170
- export declare function projectHmrIdentifiersSubscribe(
171
- project: { __napiType: "Project" },
172
- func: (...args: any[]) => any,
173
- ): { __napiType: "RootTask" };
143
+ export declare function projectHmrIdentifiersSubscribe(project: { __napiType: "Project" }, func: (...args: any[]) => any): { __napiType: "RootTask" }
174
144
  export interface NapiUpdateMessage {
175
- updateType: string;
176
- value?: NapiUpdateInfo;
145
+ updateType: string
146
+ value?: NapiUpdateInfo
177
147
  }
178
148
  export interface NapiUpdateInfo {
179
- duration: number;
180
- tasks: number;
149
+ duration: number
150
+ tasks: number
181
151
  }
182
152
  /**
183
153
  * Subscribes to lifecycle events of the compilation.
@@ -192,84 +162,61 @@ export interface NapiUpdateInfo {
192
162
  *
193
163
  * The signature of the `func` is `(update_message: UpdateMessage) => void`.
194
164
  */
195
- export declare function projectUpdateInfoSubscribe(
196
- project: { __napiType: "Project" },
197
- aggregationMs: number,
198
- func: (...args: any[]) => any,
199
- ): void;
165
+ export declare function projectUpdateInfoSubscribe(project: { __napiType: "Project" }, aggregationMs: number, func: (...args: any[]) => any): void
200
166
  export interface StackFrame {
201
- isServer: boolean;
202
- isInternal?: boolean;
203
- originalFile?: string;
204
- file: string;
205
- line?: number;
206
- column?: number;
207
- methodName?: string;
208
- }
209
- export declare function projectTraceSource(
210
- project: { __napiType: "Project" },
211
- frame: StackFrame,
212
- currentDirectoryFileUrl: string,
213
- ): Promise<StackFrame | null>;
214
- export declare function projectGetSourceForAsset(
215
- project: { __napiType: "Project" },
216
- filePath: string,
217
- ): Promise<string | null>;
218
- export declare function projectGetSourceMap(
219
- project: { __napiType: "Project" },
220
- filePath: string,
221
- ): Promise<string | null>;
222
- export declare function projectGetSourceMapSync(
223
- project: { __napiType: "Project" },
224
- filePath: string,
225
- ): string | null;
226
- export declare function rootTaskDispose(rootTask: {
227
- __napiType: "RootTask";
228
- }): void;
167
+ isServer: boolean
168
+ isInternal?: boolean
169
+ originalFile?: string
170
+ file: string
171
+ line?: number
172
+ column?: number
173
+ methodName?: string
174
+ }
175
+ export declare function projectTraceSource(project: { __napiType: "Project" }, frame: StackFrame, currentDirectoryFileUrl: string): Promise<StackFrame | null>
176
+ export declare function projectGetSourceForAsset(project: { __napiType: "Project" }, filePath: string): Promise<string | null>
177
+ export declare function projectGetSourceMap(project: { __napiType: "Project" }, filePath: string): Promise<string | null>
178
+ export declare function projectGetSourceMapSync(project: { __napiType: "Project" }, filePath: string): string | null
179
+ export declare function rootTaskDispose(rootTask: { __napiType: "RootTask" }): void
229
180
  export interface NapiIssue {
230
- severity: string;
231
- stage: string;
232
- filePath: string;
233
- title: any;
234
- description?: any;
235
- detail?: any;
236
- source?: NapiIssueSource;
237
- documentationLink: string;
238
- subIssues: Array<NapiIssue>;
181
+ severity: string
182
+ stage: string
183
+ filePath: string
184
+ title: any
185
+ description?: any
186
+ detail?: any
187
+ source?: NapiIssueSource
188
+ documentationLink: string
189
+ subIssues: Array<NapiIssue>
239
190
  }
240
191
  export interface NapiIssueSource {
241
- source: NapiSource;
242
- range?: NapiIssueSourceRange;
192
+ source: NapiSource
193
+ range?: NapiIssueSourceRange
243
194
  }
244
195
  export interface NapiIssueSourceRange {
245
- start: NapiSourcePos;
246
- end: NapiSourcePos;
196
+ start: NapiSourcePos
197
+ end: NapiSourcePos
247
198
  }
248
199
  export interface NapiSource {
249
- ident: string;
250
- content?: string;
200
+ ident: string
201
+ content?: string
251
202
  }
252
203
  export interface NapiSourcePos {
253
- line: number;
254
- column: number;
204
+ line: number
205
+ column: number
255
206
  }
256
207
  export interface NapiDiagnostic {
257
- category: string;
258
- name: string;
259
- payload: Record<string, string>;
208
+ category: string
209
+ name: string
210
+ payload: Record<string, string>
260
211
  }
261
212
  /**
262
213
  * Initialize tracing subscriber to emit traces. This configures subscribers
263
214
  * for Trace Event Format <https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview>.
264
215
  */
265
- export declare function initCustomTraceSubscriber(
266
- traceOutFilePath?: string | undefined | null,
267
- ): ExternalObject<RefCell>;
216
+ export declare function initCustomTraceSubscriber(traceOutFilePath?: string | undefined | null): ExternalObject<RefCell>
268
217
  /**
269
218
  * Teardown currently running tracing subscriber to flush out remaining traces.
270
219
  * This should be called when parent node.js process exits, otherwise generated
271
220
  * trace may drop traces in the buffer.
272
221
  */
273
- export declare function teardownTraceSubscriber(
274
- guardExternal: ExternalObject<RefCell>,
275
- ): void;
222
+ export declare function teardownTraceSubscriber(guardExternal: ExternalObject<RefCell>): void
package/esm/binding.d.ts CHANGED
@@ -4,78 +4,70 @@
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
6
  export declare class ExternalObject<T> {
7
- readonly "": {
8
- readonly "": unique symbol;
9
- [K: symbol]: T;
10
- };
7
+ readonly '': {
8
+ readonly '': unique symbol
9
+ [K: symbol]: T
10
+ }
11
11
  }
12
12
  export interface TransformOutput {
13
- code: string;
14
- map?: string;
15
- output?: string;
16
- diagnostics: Array<string>;
13
+ code: string
14
+ map?: string
15
+ output?: string
16
+ diagnostics: Array<string>
17
+ }
18
+ export interface NapiEndpointConfig {
19
+
17
20
  }
18
-
19
- export interface NapiEndpointConfig {}
20
21
  export interface NapiServerPath {
21
- path: string;
22
- contentHash: string;
22
+ path: string
23
+ contentHash: string
23
24
  }
24
25
  export interface NapiWrittenEndpoint {
25
- type: string;
26
- entryPath?: string;
27
- clientPaths: Array<string>;
28
- serverPaths: Array<NapiServerPath>;
29
- config: NapiEndpointConfig;
30
- }
31
- export declare function endpointWriteToDisk(endpoint: {
32
- __napiType: "Endpoint";
33
- }): Promise<TurbopackResult>;
34
- export declare function endpointServerChangedSubscribe(
35
- endpoint: { __napiType: "Endpoint" },
36
- issues: boolean,
37
- func: (...args: any[]) => any,
38
- ): { __napiType: "RootTask" };
39
- export declare function endpointClientChangedSubscribe(
40
- endpoint: { __napiType: "Endpoint" },
41
- func: (...args: any[]) => any,
42
- ): { __napiType: "RootTask" };
26
+ type: string
27
+ entryPath?: string
28
+ clientPaths: Array<string>
29
+ serverPaths: Array<NapiServerPath>
30
+ config: NapiEndpointConfig
31
+ }
32
+ export declare function endpointWriteToDisk(endpoint: { __napiType: "Endpoint" }): Promise<TurbopackResult>
33
+ export declare function endpointServerChangedSubscribe(endpoint: { __napiType: "Endpoint" }, issues: boolean, func: (...args: any[]) => any): { __napiType: "RootTask" }
34
+ export declare function endpointClientChangedSubscribe(endpoint: { __napiType: "Endpoint" }, func: (...args: any[]) => any): { __napiType: "RootTask" }
43
35
  export interface NapiEnvVar {
44
- name: string;
45
- value: string;
36
+ name: string
37
+ value: string
46
38
  }
47
39
  export interface NapiWatchOptions {
48
40
  /** Whether to watch the filesystem for file changes. */
49
- enable: boolean;
41
+ enable: boolean
50
42
  /**
51
43
  * Enable polling at a certain interval if the native file watching doesn't work (e.g.
52
44
  * docker).
53
45
  */
54
- pollIntervalMs?: number;
46
+ pollIntervalMs?: number
55
47
  }
56
48
  export interface NapiProjectOptions {
57
49
  /**
58
50
  * A root path from which all files must be nested under. Trying to access
59
51
  * a file outside this root will fail. Think of this as a chroot.
60
52
  */
61
- rootPath: string;
53
+ rootPath: string
62
54
  /** A path inside the root_path which contains the app/pages directories. */
63
- projectPath: string;
55
+ projectPath: string
64
56
  /** Filesystem watcher options. */
65
- watch: NapiWatchOptions;
57
+ watch: NapiWatchOptions
66
58
  /** The contents of config.js, serialized to JSON. */
67
- config: string;
59
+ config: string
68
60
  /** A map of environment variables to use when compiling code. */
69
- processEnv: Array<NapiEnvVar>;
61
+ processEnv: Array<NapiEnvVar>
70
62
  /**
71
63
  * A map of environment variables which should get injected at compile
72
64
  * time.
73
65
  */
74
- processDefineEnv: NapiDefineEnv;
66
+ processDefineEnv: NapiDefineEnv
75
67
  /** The mode in which Next.js is running. */
76
- dev: boolean;
68
+ dev: boolean
77
69
  /** The build id. */
78
- buildId: string;
70
+ buildId: string
79
71
  }
80
72
  /** [NapiProjectOptions] with all fields optional. */
81
73
  export interface NapiPartialProjectOptions {
@@ -83,61 +75,53 @@ export interface NapiPartialProjectOptions {
83
75
  * A root path from which all files must be nested under. Trying to access
84
76
  * a file outside this root will fail. Think of this as a chroot.
85
77
  */
86
- rootPath?: string;
78
+ rootPath?: string
87
79
  /** A path inside the root_path which contains the app/pages directories. */
88
- projectPath?: string;
80
+ projectPath?: string
89
81
  /** Filesystem watcher options. */
90
- watch?: NapiWatchOptions;
82
+ watch?: NapiWatchOptions
91
83
  /** The contents of config.js, serialized to JSON. */
92
- config?: string;
84
+ config?: string
93
85
  /** A map of environment variables to use when compiling code. */
94
- processEnv?: Array<NapiEnvVar>;
86
+ processEnv?: Array<NapiEnvVar>
95
87
  /**
96
88
  * A map of environment variables which should get injected at compile
97
89
  * time.
98
90
  */
99
- processDefineEnv?: NapiDefineEnv;
91
+ processDefineEnv?: NapiDefineEnv
100
92
  /** The mode in which Next.js is running. */
101
- dev?: boolean;
93
+ dev?: boolean
102
94
  /** The build id. */
103
- buildId?: string;
95
+ buildId?: string
104
96
  /**
105
97
  * When the code is minified, this opts out of the default mangling of
106
98
  * local names for variables, functions etc., which can be useful for
107
99
  * debugging/profiling purposes.
108
100
  */
109
- noMangling?: boolean;
101
+ noMangling?: boolean
110
102
  }
111
103
  export interface NapiDefineEnv {
112
- client: Array<NapiEnvVar>;
113
- edge: Array<NapiEnvVar>;
114
- nodejs: Array<NapiEnvVar>;
104
+ client: Array<NapiEnvVar>
105
+ edge: Array<NapiEnvVar>
106
+ nodejs: Array<NapiEnvVar>
115
107
  }
116
108
  export interface NapiTurboEngineOptions {
117
109
  /** Use the new backend with persistent caching enabled. */
118
- persistentCaching?: boolean;
110
+ persistentCaching?: boolean
119
111
  /** An upper bound of memory that turbopack will attempt to stay under. */
120
- memoryLimit?: number;
112
+ memoryLimit?: number
121
113
  /** Track dependencies between tasks. If false, any change during build will error. */
122
- dependencyTracking?: boolean;
114
+ dependencyTracking?: boolean
123
115
  }
124
- export declare function projectNew(
125
- options: NapiProjectOptions,
126
- turboEngineOptions: NapiTurboEngineOptions,
127
- ): Promise<{ __napiType: "Project" }>;
128
- export declare function projectUpdate(
129
- project: { __napiType: "Project" },
130
- options: NapiPartialProjectOptions,
131
- ): Promise<void>;
116
+ export declare function projectNew(options: NapiProjectOptions, turboEngineOptions: NapiTurboEngineOptions): Promise<{ __napiType: "Project" }>
117
+ export declare function projectUpdate(project: { __napiType: "Project" }, options: NapiPartialProjectOptions): Promise<void>
132
118
  /**
133
119
  * Runs exit handlers for the project registered using the [`ExitHandler`] API.
134
120
  *
135
121
  * This is called by `project_shutdown`, so if you're calling that API, you shouldn't call this
136
122
  * one.
137
123
  */
138
- export declare function projectOnExit(project: {
139
- __napiType: "Project";
140
- }): Promise<void>;
124
+ export declare function projectOnExit(project: { __napiType: "Project" }): Promise<void>
141
125
  /**
142
126
  * Runs `project_on_exit`, and then waits for turbo_tasks to gracefully shut down.
143
127
  *
@@ -145,39 +129,25 @@ export declare function projectOnExit(project: {
145
129
  * it's skipped in the development server (`project_on_exit` is used instead with a short timeout),
146
130
  * where we prioritize fast exit and user responsiveness over all else.
147
131
  */
148
- export declare function projectShutdown(project: {
149
- __napiType: "Project";
150
- }): Promise<void>;
132
+ export declare function projectShutdown(project: { __napiType: "Project" }): Promise<void>
151
133
  export interface NapiEntrypoints {
152
- apps?: Array<ExternalObject<ExternalEndpoint>>;
153
- libraries?: Array<ExternalObject<ExternalEndpoint>>;
134
+ apps?: Array<ExternalObject<ExternalEndpoint>>
135
+ libraries?: Array<ExternalObject<ExternalEndpoint>>
154
136
  }
155
- export declare function projectWriteAllEntrypointsToDisk(project: {
156
- __napiType: "Project";
157
- }): Promise<TurbopackResult>;
158
- export declare function projectEntrypointsSubscribe(
159
- project: { __napiType: "Project" },
160
- func: (...args: any[]) => any,
161
- ): { __napiType: "RootTask" };
162
- export declare function projectHmrEvents(
163
- project: { __napiType: "Project" },
164
- identifier: string,
165
- func: (...args: any[]) => any,
166
- ): { __napiType: "RootTask" };
137
+ export declare function projectWriteAllEntrypointsToDisk(project: { __napiType: "Project" }): Promise<TurbopackResult>
138
+ export declare function projectEntrypointsSubscribe(project: { __napiType: "Project" }, func: (...args: any[]) => any): { __napiType: "RootTask" }
139
+ export declare function projectHmrEvents(project: { __napiType: "Project" }, identifier: string, func: (...args: any[]) => any): { __napiType: "RootTask" }
167
140
  export interface HmrIdentifiers {
168
- identifiers: Array<string>;
141
+ identifiers: Array<string>
169
142
  }
170
- export declare function projectHmrIdentifiersSubscribe(
171
- project: { __napiType: "Project" },
172
- func: (...args: any[]) => any,
173
- ): { __napiType: "RootTask" };
143
+ export declare function projectHmrIdentifiersSubscribe(project: { __napiType: "Project" }, func: (...args: any[]) => any): { __napiType: "RootTask" }
174
144
  export interface NapiUpdateMessage {
175
- updateType: string;
176
- value?: NapiUpdateInfo;
145
+ updateType: string
146
+ value?: NapiUpdateInfo
177
147
  }
178
148
  export interface NapiUpdateInfo {
179
- duration: number;
180
- tasks: number;
149
+ duration: number
150
+ tasks: number
181
151
  }
182
152
  /**
183
153
  * Subscribes to lifecycle events of the compilation.
@@ -192,84 +162,61 @@ export interface NapiUpdateInfo {
192
162
  *
193
163
  * The signature of the `func` is `(update_message: UpdateMessage) => void`.
194
164
  */
195
- export declare function projectUpdateInfoSubscribe(
196
- project: { __napiType: "Project" },
197
- aggregationMs: number,
198
- func: (...args: any[]) => any,
199
- ): void;
165
+ export declare function projectUpdateInfoSubscribe(project: { __napiType: "Project" }, aggregationMs: number, func: (...args: any[]) => any): void
200
166
  export interface StackFrame {
201
- isServer: boolean;
202
- isInternal?: boolean;
203
- originalFile?: string;
204
- file: string;
205
- line?: number;
206
- column?: number;
207
- methodName?: string;
208
- }
209
- export declare function projectTraceSource(
210
- project: { __napiType: "Project" },
211
- frame: StackFrame,
212
- currentDirectoryFileUrl: string,
213
- ): Promise<StackFrame | null>;
214
- export declare function projectGetSourceForAsset(
215
- project: { __napiType: "Project" },
216
- filePath: string,
217
- ): Promise<string | null>;
218
- export declare function projectGetSourceMap(
219
- project: { __napiType: "Project" },
220
- filePath: string,
221
- ): Promise<string | null>;
222
- export declare function projectGetSourceMapSync(
223
- project: { __napiType: "Project" },
224
- filePath: string,
225
- ): string | null;
226
- export declare function rootTaskDispose(rootTask: {
227
- __napiType: "RootTask";
228
- }): void;
167
+ isServer: boolean
168
+ isInternal?: boolean
169
+ originalFile?: string
170
+ file: string
171
+ line?: number
172
+ column?: number
173
+ methodName?: string
174
+ }
175
+ export declare function projectTraceSource(project: { __napiType: "Project" }, frame: StackFrame, currentDirectoryFileUrl: string): Promise<StackFrame | null>
176
+ export declare function projectGetSourceForAsset(project: { __napiType: "Project" }, filePath: string): Promise<string | null>
177
+ export declare function projectGetSourceMap(project: { __napiType: "Project" }, filePath: string): Promise<string | null>
178
+ export declare function projectGetSourceMapSync(project: { __napiType: "Project" }, filePath: string): string | null
179
+ export declare function rootTaskDispose(rootTask: { __napiType: "RootTask" }): void
229
180
  export interface NapiIssue {
230
- severity: string;
231
- stage: string;
232
- filePath: string;
233
- title: any;
234
- description?: any;
235
- detail?: any;
236
- source?: NapiIssueSource;
237
- documentationLink: string;
238
- subIssues: Array<NapiIssue>;
181
+ severity: string
182
+ stage: string
183
+ filePath: string
184
+ title: any
185
+ description?: any
186
+ detail?: any
187
+ source?: NapiIssueSource
188
+ documentationLink: string
189
+ subIssues: Array<NapiIssue>
239
190
  }
240
191
  export interface NapiIssueSource {
241
- source: NapiSource;
242
- range?: NapiIssueSourceRange;
192
+ source: NapiSource
193
+ range?: NapiIssueSourceRange
243
194
  }
244
195
  export interface NapiIssueSourceRange {
245
- start: NapiSourcePos;
246
- end: NapiSourcePos;
196
+ start: NapiSourcePos
197
+ end: NapiSourcePos
247
198
  }
248
199
  export interface NapiSource {
249
- ident: string;
250
- content?: string;
200
+ ident: string
201
+ content?: string
251
202
  }
252
203
  export interface NapiSourcePos {
253
- line: number;
254
- column: number;
204
+ line: number
205
+ column: number
255
206
  }
256
207
  export interface NapiDiagnostic {
257
- category: string;
258
- name: string;
259
- payload: Record<string, string>;
208
+ category: string
209
+ name: string
210
+ payload: Record<string, string>
260
211
  }
261
212
  /**
262
213
  * Initialize tracing subscriber to emit traces. This configures subscribers
263
214
  * for Trace Event Format <https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview>.
264
215
  */
265
- export declare function initCustomTraceSubscriber(
266
- traceOutFilePath?: string | undefined | null,
267
- ): ExternalObject<RefCell>;
216
+ export declare function initCustomTraceSubscriber(traceOutFilePath?: string | undefined | null): ExternalObject<RefCell>
268
217
  /**
269
218
  * Teardown currently running tracing subscriber to flush out remaining traces.
270
219
  * This should be called when parent node.js process exits, otherwise generated
271
220
  * trace may drop traces in the buffer.
272
221
  */
273
- export declare function teardownTraceSubscriber(
274
- guardExternal: ExternalObject<RefCell>,
275
- ): void;
222
+ export declare function teardownTraceSubscriber(guardExternal: ExternalObject<RefCell>): void
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utoo/pack",
3
- "version": "0.0.1-alpha.13",
3
+ "version": "0.0.1-alpha.15",
4
4
  "main": "cjs/index.js",
5
5
  "module": "esm/index.js",
6
6
  "exports": {
@@ -79,12 +79,12 @@
79
79
  },
80
80
  "repository": "git@github.com:umijs/mako.git",
81
81
  "optionalDependencies": {
82
- "@utoo/pack-darwin-arm64": "0.0.1-alpha.13",
83
- "@utoo/pack-darwin-x64": "0.0.1-alpha.13",
84
- "@utoo/pack-linux-arm64-gnu": "0.0.1-alpha.13",
85
- "@utoo/pack-linux-arm64-musl": "0.0.1-alpha.13",
86
- "@utoo/pack-linux-x64-gnu": "0.0.1-alpha.13",
87
- "@utoo/pack-linux-x64-musl": "0.0.1-alpha.13",
88
- "@utoo/pack-win32-x64-msvc": "0.0.1-alpha.13"
82
+ "@utoo/pack-darwin-arm64": "0.0.1-alpha.15",
83
+ "@utoo/pack-darwin-x64": "0.0.1-alpha.15",
84
+ "@utoo/pack-linux-arm64-gnu": "0.0.1-alpha.15",
85
+ "@utoo/pack-linux-arm64-musl": "0.0.1-alpha.15",
86
+ "@utoo/pack-linux-x64-gnu": "0.0.1-alpha.15",
87
+ "@utoo/pack-linux-x64-musl": "0.0.1-alpha.15",
88
+ "@utoo/pack-win32-x64-msvc": "0.0.1-alpha.15"
89
89
  }
90
90
  }