@kubb/core 0.41.0 → 0.41.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.
package/dist/index.d.ts CHANGED
@@ -233,7 +233,16 @@ declare class FileManager {
233
233
  private getSource;
234
234
  get files(): File[];
235
235
  add(file: File): Promise<File>;
236
- build(file: File): string;
236
+ build(file: File): {
237
+ source: string;
238
+ fileName: string;
239
+ path: string;
240
+ imports?: {
241
+ name: string | string[];
242
+ path: string;
243
+ type?: boolean | undefined;
244
+ }[] | undefined;
245
+ };
237
246
  addOrAppend(file: File): Promise<File>;
238
247
  setStatus(id: UUID, status: Status): void;
239
248
  get(id: UUID): File | undefined;
@@ -17248,7 +17248,10 @@ ${file.source}`;
17248
17248
  });
17249
17249
  }
17250
17250
  build(file) {
17251
- return this.getSource(file);
17251
+ return {
17252
+ ...file,
17253
+ source: this.getSource(file)
17254
+ };
17252
17255
  }
17253
17256
  addOrAppend(file) {
17254
17257
  const previousCache = this.getCacheByPath(file.path);
@@ -17589,12 +17592,12 @@ ${file.source}`,
17589
17592
  fileManager.events.onSuccess(async () => {
17590
17593
  await pluginManager.hookParallel("buildEnd");
17591
17594
  setTimeout(() => {
17592
- done({ files: fileManager.files });
17595
+ done({ files: fileManager.files.map((file) => fileManager.build(file)) });
17593
17596
  }, 1e3);
17594
17597
  });
17595
17598
  fileManager.events.onAdd(async (id, file) => {
17596
17599
  const { path } = file;
17597
- let code = fileManager.build(file);
17600
+ let { source: code } = fileManager.build(file);
17598
17601
  const loadedResult = await pluginManager.hookFirst("load", [path]);
17599
17602
  if (loadedResult) {
17600
17603
  code = loadedResult;