@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.
- package/README.md +45 -13
- package/dist/{Fabric-DlBN6CDR.d.cts → Fabric-BXYWK9V4.d.cts} +93 -49
- package/dist/{Fabric-CtqeUUFU.d.ts → Fabric-CDFwTDyP.d.ts} +93 -49
- package/dist/index.cjs +11 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -19
- package/dist/index.js.map +1 -1
- package/dist/parsers/typescript.d.cts +2 -2
- package/dist/parsers/typescript.d.ts +2 -2
- package/dist/parsers.d.cts +2 -2
- package/dist/parsers.d.ts +2 -2
- package/dist/plugins.cjs +16 -16
- package/dist/plugins.cjs.map +1 -1
- package/dist/plugins.d.cts +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +16 -16
- package/dist/plugins.js.map +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{typescriptParser-BAlwCe3a.d.ts → typescriptParser-CPUUUA9z.d.ts} +2 -2
- package/dist/{typescriptParser-CnzxSeDN.d.cts → typescriptParser-H0FvAP4t.d.cts} +2 -2
- package/package.json +1 -1
- package/src/Fabric.ts +92 -24
- package/src/FileManager.ts +6 -6
- package/src/FileProcessor.ts +5 -5
- package/src/plugins/barrelPlugin.ts +2 -2
- package/src/plugins/fsPlugin.ts +1 -1
- package/src/plugins/graphPlugin.ts +1 -1
- package/src/plugins/loggerPlugin.ts +13 -13
|
@@ -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 (
|
|
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
|
|
166
|
+
ctx.on('file:resolve:path', async (file) => {
|
|
167
167
|
logger.info(`Resolving path for ${formatPath(file.path)}`)
|
|
168
|
-
broadcast('file:path
|
|
168
|
+
broadcast('file:resolve:path', { file: serializeFile(file) })
|
|
169
169
|
})
|
|
170
170
|
|
|
171
|
-
ctx.on('file:name
|
|
171
|
+
ctx.on('file:resolve:name', async (file) => {
|
|
172
172
|
logger.info(`Resolving name for ${formatPath(file.path)}`)
|
|
173
|
-
broadcast('file:name
|
|
173
|
+
broadcast('file:resolve:name', { file: serializeFile(file) })
|
|
174
174
|
})
|
|
175
175
|
|
|
176
|
-
ctx.on('files:processing:start', async (
|
|
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 (
|
|
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('
|
|
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('
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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,
|