@kubb/fabric-core 0.5.5 → 0.7.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.
@@ -152,7 +152,7 @@ export const loggerPlugin = definePlugin<Options>({
152
152
  broadcast('lifecycle:render', { timestamp: Date.now() })
153
153
  })
154
154
 
155
- ctx.on('files:added', async ({ files }) => {
155
+ ctx.on('files:added', async (files) => {
156
156
  if (!files.length) {
157
157
  return
158
158
  }
@@ -163,17 +163,17 @@ export const loggerPlugin = definePlugin<Options>({
163
163
  })
164
164
  })
165
165
 
166
- ctx.on('file:path:resolving', async ({ file }) => {
166
+ ctx.on('file:resolve:path', async (file) => {
167
167
  logger.info(`Resolving path for ${formatPath(file.path)}`)
168
- broadcast('file:path:resolving', { file: serializeFile(file) })
168
+ broadcast('file:resolve:path', { file: serializeFile(file) })
169
169
  })
170
170
 
171
- ctx.on('file:name:resolving', async ({ file }) => {
171
+ ctx.on('file:resolve:name', async (file) => {
172
172
  logger.info(`Resolving name for ${formatPath(file.path)}`)
173
- broadcast('file:name:resolving', { file: serializeFile(file) })
173
+ broadcast('file:resolve:name', { file: serializeFile(file) })
174
174
  })
175
175
 
176
- ctx.on('files:processing:start', async ({ files }) => {
176
+ ctx.on('files:processing:start', async (files) => {
177
177
  logger.start(`Processing ${pluralize('file', files.length)}`)
178
178
  broadcast('files:processing:start', {
179
179
  total: files.length,
@@ -186,7 +186,7 @@ export const loggerPlugin = definePlugin<Options>({
186
186
  }
187
187
  })
188
188
 
189
- ctx.on('file:processing:start', async ({ file, index, total }) => {
189
+ ctx.on('file:processing:start', async (file, index, total) => {
190
190
  logger.info(`Processing [${index + 1}/${total}] ${formatPath(file.path)}`)
191
191
  broadcast('file:processing:start', {
192
192
  index,
@@ -195,11 +195,11 @@ export const loggerPlugin = definePlugin<Options>({
195
195
  })
196
196
  })
197
197
 
198
- ctx.on('files:processing:update', async ({ processed, total, percentage, file }) => {
198
+ ctx.on('file:processing:update', async ({ processed, total, percentage, file }) => {
199
199
  const formattedPercentage = Number.isFinite(percentage) ? percentage.toFixed(1) : '0.0'
200
200
 
201
201
  logger.info(`Progress ${formattedPercentage}% (${processed}/${total}) → ${formatPath(file.path)}`)
202
- broadcast('files:processing:update', {
202
+ broadcast('file:processing:update', {
203
203
  processed,
204
204
  total,
205
205
  percentage,
@@ -213,7 +213,7 @@ export const loggerPlugin = definePlugin<Options>({
213
213
  }
214
214
  })
215
215
 
216
- ctx.on('file:processing:end', async ({ file, index, total }) => {
216
+ ctx.on('file:processing:end', async (file, index, total) => {
217
217
  logger.success(`Finished [${index + 1}/${total}] ${formatPath(file.path)}`)
218
218
  broadcast('file:processing:end', {
219
219
  index,
@@ -222,21 +222,21 @@ export const loggerPlugin = definePlugin<Options>({
222
222
  })
223
223
  })
224
224
 
225
- ctx.on('files:writing:start', async ({ files }) => {
225
+ ctx.on('files:writing:start', async (files) => {
226
226
  logger.start(`Writing ${pluralize('file', files.length)} to disk`)
227
227
  broadcast('files:writing:start', {
228
228
  files: files.map(serializeFile),
229
229
  })
230
230
  })
231
231
 
232
- ctx.on('files:writing:end', async ({ files }) => {
232
+ ctx.on('files:writing:end', async (files) => {
233
233
  logger.success(`Written ${pluralize('file', files.length)} to disk`)
234
234
  broadcast('files:writing:end', {
235
235
  files: files.map(serializeFile),
236
236
  })
237
237
  })
238
238
 
239
- ctx.on('files:processing:end', async ({ files }) => {
239
+ ctx.on('files:processing:end', async (files) => {
240
240
  logger.success(`Processed ${pluralize('file', files.length)}`)
241
241
  broadcast('files:processing:end', {
242
242
  total: files.length,