@meng-xi/vite-plugin 0.0.6 → 0.0.8

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 CHANGED
@@ -15,8 +15,8 @@
15
15
 
16
16
  ## 特性
17
17
 
18
- - **开箱即用** - 提供文件复制、路由生成、版本管理、图标注入等实用插件
19
- - **插件开发框架** - 导出 BasePlugin、Logger、Validator 等核心组件,快速构建自定义插件
18
+ - **开箱即用** - 提供 6 个实用插件,覆盖构建进度展示、文件复制、路由生成、版本管理、图标注入、全局 Loading 状态管理等常见场景
19
+ - **插件开发框架** - 导出 BasePlugin、Logger、Validator 等核心组件,快速构建符合规范的自定义 Vite 插件
20
20
  - **完整生命周期** - 支持初始化、配置解析、销毁等生命周期管理,自动组合钩子逻辑
21
21
  - **类型安全** - 完整的 TypeScript 类型定义,配置验证器确保参数正确性
22
22
  - **灵活配置** - 所有插件支持详细配置,满足多样化场景需求
@@ -28,27 +28,35 @@
28
28
 
29
29
  ## 安装
30
30
 
31
- ```bash
32
- # npm
31
+ ::: code-group
32
+
33
+ ```bash [npm]
33
34
  npm install @meng-xi/vite-plugin -D
35
+ ```
34
36
 
35
- # yarn
37
+ ```bash [yarn]
36
38
  yarn add @meng-xi/vite-plugin -D
39
+ ```
37
40
 
38
- # pnpm
41
+ ```bash [pnpm]
39
42
  pnpm add @meng-xi/vite-plugin -D
40
43
  ```
41
44
 
45
+ :::
46
+
42
47
  ## 快速开始
43
48
 
44
49
  ### 使用内置插件
45
50
 
46
51
  ```typescript
47
52
  import { defineConfig } from 'vite'
48
- import { copyFile, generateRouter, generateVersion, injectIco } from '@meng-xi/vite-plugin'
53
+ import { buildProgress, copyFile, generateRouter, generateVersion, injectIco, injectLoading } from '@meng-xi/vite-plugin'
49
54
 
50
55
  export default defineConfig({
51
56
  plugins: [
57
+ // 构建进度条
58
+ buildProgress(),
59
+
52
60
  // 复制文件
53
61
  copyFile({
54
62
  sourceDir: 'src/assets',
@@ -70,6 +78,12 @@ export default defineConfig({
70
78
  // 注入网站图标
71
79
  injectIco({
72
80
  base: '/assets'
81
+ }),
82
+
83
+ // 注入全局 Loading
84
+ injectLoading({
85
+ defaultVisible: true,
86
+ autoHideOn: 'DOMContentLoaded'
73
87
  })
74
88
  ]
75
89
  })
@@ -196,7 +210,7 @@ const result = await this.safeExecute(async () => {
196
210
 
197
211
  ### createPluginFactory
198
212
 
199
- 创建插件工厂函数,支持选项标准化:
213
+ 创建插件工厂函数,支持选项标准化器:
200
214
 
201
215
  ```typescript
202
216
  // 基本使用
@@ -237,72 +251,255 @@ Logger.destroy()
237
251
 
238
252
  ## 内置插件
239
253
 
254
+ | 插件 | 说明 |
255
+ | --------------- | ----------------------------------------------------- |
256
+ | buildProgress | 终端实时构建进度条,支持 bar / spinner / minimal |
257
+ | copyFile | 构建完成后复制文件或目录,支持增量复制 |
258
+ | generateRouter | 根据 pages.json 自动生成路由配置(uni-app) |
259
+ | generateVersion | 自动生成版本号,支持文件输出和全局变量注入 |
260
+ | injectIco | 将网站图标链接注入到 HTML 文件 |
261
+ | injectLoading | 注入全局 Loading 状态管理,支持请求拦截和白屏 Loading |
262
+
263
+ ### buildProgress
264
+
265
+ 在终端实时显示 Vite 构建进度条,支持三种显示格式。
266
+
267
+ | 选项 | 类型 | 默认值 | 描述 |
268
+ | --------------- | ------------------------------------- | ------- | ------------------------------ |
269
+ | width | `number` | `30` | 进度条宽度(字符数) |
270
+ | format | `'bar'` \| `'spinner'` \| `'minimal'` | `'bar'` | 进度条显示格式 |
271
+ | completeChar | `string` | `'█'` | 已完成部分的填充字符 |
272
+ | incompleteChar | `string` | `'░'` | 未完成部分的填充字符 |
273
+ | clearOnComplete | `boolean` | `true` | 构建完成后是否清除进度条 |
274
+ | showModuleName | `boolean` | `true` | 是否显示当前正在处理的模块名称 |
275
+ | theme | `ProgressTheme` | - | 自定义颜色主题 |
276
+
277
+ **ProgressTheme**
278
+
279
+ | 属性 | 类型 | 描述 |
280
+ | --------------- | -------------------------- | -------------- |
281
+ | completeColor | `(text: string) => string` | 已完成部分颜色 |
282
+ | incompleteColor | `(text: string) => string` | 未完成部分颜色 |
283
+ | percentageColor | `(text: string) => string` | 百分比数字颜色 |
284
+ | phaseColor | `(text: string) => string` | 阶段标签颜色 |
285
+ | moduleColor | `(text: string) => string` | 模块名称颜色 |
286
+
287
+ ```typescript
288
+ // 默认进度条格式
289
+ buildProgress()
290
+
291
+ // 旋转动画格式
292
+ buildProgress({ format: 'spinner' })
293
+
294
+ // 精简格式
295
+ buildProgress({ format: 'minimal' })
296
+
297
+ // 自定义外观
298
+ buildProgress({
299
+ width: 40,
300
+ completeChar: '■',
301
+ incompleteChar: '□',
302
+ clearOnComplete: false
303
+ })
304
+ ```
305
+
240
306
  ### copyFile
241
307
 
242
308
  在 Vite 构建完成后复制文件或目录到指定位置。
243
309
 
244
- | 选项 | 类型 | 默认值 | 描述 |
245
- | ----------- | ------- | ------ | -------------------- |
246
- | sourceDir | string | - | 源目录路径(必填) |
247
- | targetDir | string | - | 目标目录路径(必填) |
248
- | overwrite | boolean | true | 是否覆盖现有文件 |
249
- | recursive | boolean | true | 是否递归复制子目录 |
250
- | incremental | boolean | true | 是否启用增量复制 |
310
+ | 选项 | 类型 | 默认值 | 描述 |
311
+ | ----------- | --------- | ------ | -------------------- |
312
+ | sourceDir | `string` | - | 源目录路径(必填) |
313
+ | targetDir | `string` | - | 目标目录路径(必填) |
314
+ | overwrite | `boolean` | `true` | 是否覆盖现有文件 |
315
+ | recursive | `boolean` | `true` | 是否递归复制子目录 |
316
+ | incremental | `boolean` | `true` | 是否启用增量复制 |
251
317
 
252
318
  ### generateRouter
253
319
 
254
320
  根据 uni-app 项目的 `pages.json` 自动生成路由配置文件。
255
321
 
256
- | 选项 | 类型 | 默认值 | 描述 |
257
- | -------------------- | ------------------------------------------------- | ---------------------- | ----------------------------- |
258
- | pagesJsonPath | string | 'src/pages.json' | pages.json 文件路径 |
259
- | outputPath | string | 'src/router.config.ts' | 输出文件路径 |
260
- | outputFormat | 'ts' \| 'js' | 'ts' | 输出文件格式 |
261
- | nameStrategy | 'path' \| 'camelCase' \| 'pascalCase' \| 'custom' | 'camelCase' | 路由名称策略 |
262
- | customNameGenerator | (path: string) => string | - | 自定义路由名称生成函数 |
263
- | includeSubPackages | boolean | true | 是否包含子包路由 |
264
- | watch | boolean | true | 是否监听变化自动重新生成 |
265
- | metaMapping | Record\<string, string\> | - | 页面 style 字段到 meta 的映射 |
266
- | exportTypes | boolean | true | 是否导出类型定义 |
267
- | preserveRouteChanges | boolean | true | 是否保留用户对 routes 的修改 |
322
+ | 选项 | 类型 | 默认值 | 描述 |
323
+ | -------------------- | --------------------------------------------------------- | ------------------------ | ----------------------------- |
324
+ | pagesJsonPath | `string` | `'src/pages.json'` | pages.json 文件路径 |
325
+ | outputPath | `string` | `'src/router.config.ts'` | 输出文件路径 |
326
+ | outputFormat | `'ts'` \| `'js'` | `'ts'` | 输出文件格式 |
327
+ | nameStrategy | `'path'` \| `'camelCase'` \| `'pascalCase'` \| `'custom'` | `'camelCase'` | 路由名称策略 |
328
+ | customNameGenerator | `(path: string) => string` | - | 自定义路由名称生成函数 |
329
+ | includeSubPackages | `boolean` | `true` | 是否包含子包路由 |
330
+ | watch | `boolean` | `true` | 是否监听变化自动重新生成 |
331
+ | metaMapping | `Record<string, string>` | - | 页面 style 字段到 meta 的映射 |
332
+ | exportTypes | `boolean` | `true` | 是否导出类型定义 |
333
+ | preserveRouteChanges | `boolean` | `true` | 是否保留用户对 routes 的修改 |
268
334
 
269
335
  ### generateVersion
270
336
 
271
337
  在 Vite 构建过程中自动生成版本号。
272
338
 
273
- | 选项 | 类型 | 默认值 | 描述 |
274
- | ------------ | --------------------------------------------------------------------- | ----------------- | ------------------------ |
275
- | format | 'timestamp' \| 'date' \| 'datetime' \| 'semver' \| 'hash' \| 'custom' | 'timestamp' | 版本号格式 |
276
- | customFormat | string | - | 自定义格式模板 |
277
- | semverBase | string | '1.0.0' | 语义化版本基础值 |
278
- | outputType | 'file' \| 'define' \| 'both' | 'file' | 输出类型 |
279
- | outputFile | string | 'version.json' | 输出文件路径 |
280
- | defineName | string | '**APP_VERSION**' | 注入的全局变量名 |
281
- | hashLength | number | 8 | 哈希长度(1-32) |
282
- | prefix | string | - | 版本号前缀 |
283
- | suffix | string | - | 版本号后缀 |
284
- | extra | Record\<string, unknown\> | - | 附加信息(仅 JSON 文件) |
339
+ | 选项 | 类型 | 默认值 | 描述 |
340
+ | ------------ | --------------------------------------------------------------------------------- | ------------------- | ------------------------ |
341
+ | format | `'timestamp'` \| `'date'` \| `'datetime'` \| `'semver'` \| `'hash'` \| `'custom'` | `'timestamp'` | 版本号格式 |
342
+ | customFormat | `string` | - | 自定义格式模板 |
343
+ | semverBase | `string` | `'1.0.0'` | 语义化版本基础值 |
344
+ | outputType | `'file'` \| `'define'` \| `'both'` | `'file'` | 输出类型 |
345
+ | outputFile | `string` | `'version.json'` | 输出文件路径 |
346
+ | defineName | `string` | `'__APP_VERSION__'` | 注入的全局变量名 |
347
+ | hashLength | `number` | `8` | 哈希长度(1-32) |
348
+ | prefix | `string` | - | 版本号前缀 |
349
+ | suffix | `string` | - | 版本号后缀 |
350
+ | extra | `Record<string, unknown>` | - | 附加信息(仅 JSON 文件) |
285
351
 
286
352
  ### injectIco
287
353
 
288
354
  在 Vite 构建过程中将网站图标链接注入到 HTML 文件的 head 中。
289
355
 
290
- | 选项 | 类型 | 默认值 | 描述 |
291
- | ----------- | ------ | ------ | --------------------------- |
292
- | base | string | '/' | 图标文件的基础路径 |
293
- | url | string | - | 图标的完整 URL |
294
- | link | string | - | 自定义完整的 link 标签 HTML |
295
- | icons | Icon[] | - | 自定义图标数组 |
296
- | copyOptions | object | - | 图标文件复制配置 |
356
+ | 选项 | 类型 | 默认值 | 描述 |
357
+ | ----------- | -------- | ------ | --------------------------- |
358
+ | base | `string` | `'/'` | 图标文件的基础路径 |
359
+ | url | `string` | - | 图标的完整 URL |
360
+ | link | `string` | - | 自定义完整的 link 标签 HTML |
361
+ | icons | `Icon[]` | - | 自定义图标数组 |
362
+ | copyOptions | `object` | - | 图标文件复制配置 |
297
363
 
298
364
  `Icon` 接口定义:
299
365
 
300
- | 属性 | 类型 | 必填 | 描述 |
301
- | ----- | ------ | ---- | -------------- |
302
- | rel | string | 是 | 图标关系类型 |
303
- | href | string | 是 | 图标 URL |
304
- | sizes | string | 否 | 图标尺寸 |
305
- | type | string | 否 | 图标 MIME 类型 |
366
+ | 属性 | 类型 | 必填 | 描述 |
367
+ | ----- | -------- | ---- | -------------- |
368
+ | rel | `string` | 是 | 图标关系类型 |
369
+ | href | `string` | 是 | 图标 URL |
370
+ | sizes | `string` | 否 | 图标尺寸 |
371
+ | type | `string` | 否 | 图标 MIME 类型 |
372
+
373
+ `copyOptions` 接口定义:
374
+
375
+ | 属性 | 类型 | 必填 | 默认值 | 描述 |
376
+ | --------- | --------- | ---- | ------ | ---------------- |
377
+ | sourceDir | `string` | 是 | - | 图标源文件目录 |
378
+ | targetDir | `string` | 是 | - | 图标目标目录 |
379
+ | overwrite | `boolean` | 否 | `true` | 是否覆盖同名文件 |
380
+ | recursive | `boolean` | 否 | `true` | 是否递归复制 |
381
+
382
+ ### injectLoading
383
+
384
+ 注入全局 Loading 状态管理,支持 XHR/Fetch 请求拦截、白屏 Loading、自定义样式和生命周期回调。
385
+
386
+ | 选项 | 类型 | 默认值 | 描述 |
387
+ | -------------- | ----------------------------------------------- | ----------------------- | -------------------------------------------- |
388
+ | position | `'center'` \| `'top'` \| `'bottom'` | `'center'` | Loading 显示位置 |
389
+ | defaultText | `string` | `'加载中...'` | 默认显示文本 |
390
+ | spinnerType | `'spinner'` \| `'dots'` \| `'pulse'` \| `'bar'` | `'spinner'` | 旋转图标类型 |
391
+ | style | `LoadingStyle` | - | 自定义样式配置 |
392
+ | transition | `TransitionConfig` | `{ enabled: true }` | 过渡动画配置 |
393
+ | minDisplayTime | `MinDisplayTime` | `{ enabled: true }` | 最小显示时间配置 |
394
+ | delayShow | `DelayShow` | `{ enabled: true }` | 延迟显示配置 |
395
+ | debounceHide | `DebounceHide` | `{ enabled: false }` | 防抖隐藏配置 |
396
+ | autoBind | `'fetch'` \| `'xhr'` \| `'all'` \| `'none'` | `'none'` | 自动绑定请求拦截模式 |
397
+ | requestFilter | `RequestFilter` | - | 请求过滤配置 |
398
+ | globalName | `string` | `'__LOADING_MANAGER__'` | 注入到浏览器的全局变量名 |
399
+ | customTemplate | `string` | - | 自定义 HTML 模板(需含 `data-loading-text`) |
400
+ | defaultVisible | `boolean` | `false` | 初始是否可见(白屏 Loading) |
401
+ | autoHideOn | `'DOMContentLoaded'` \| `'load'` \| `'manual'` | `'DOMContentLoaded'` | 自动隐藏时机(需 `defaultVisible: true`) |
402
+ | callbacks | `LoadingCallbacks` | - | 生命周期回调 |
403
+
404
+ **LoadingStyle**
405
+
406
+ | 属性 | 类型 | 默认值 | 描述 |
407
+ | ------------------ | --------- | ------------------------- | ------------------ |
408
+ | overlayColor | `string` | `'rgba(255,255,255,0.7)'` | 遮罩层背景色 |
409
+ | spinnerColor | `string` | `'#4361ee'` | 图标颜色 |
410
+ | spinnerSize | `string` | `'40px'` | 图标大小 |
411
+ | textColor | `string` | `'#333'` | 文本颜色 |
412
+ | textSize | `string` | `'14px'` | 文本大小 |
413
+ | customClass | `string` | - | 自定义 CSS 类名 |
414
+ | customStyle | `string` | - | 自定义内联样式 |
415
+ | zIndex | `number` | `9999` | z-index 值 |
416
+ | pointerEvents | `boolean` | `false` | 是否允许点击穿透 |
417
+ | backdropBlur | `boolean` | `false` | 是否启用背景模糊 |
418
+ | backdropBlurAmount | `number` | `4` | 背景模糊程度(px) |
419
+
420
+ **TransitionConfig**
421
+
422
+ | 属性 | 类型 | 默认值 | 描述 |
423
+ | -------- | --------- | ------------ | ---------------- |
424
+ | enabled | `boolean` | `true` | 是否启用过渡 |
425
+ | duration | `number` | `200` | 过渡持续时间(ms) |
426
+ | easing | `string` | `'ease-out'` | 缓动函数 |
427
+
428
+ **MinDisplayTime**
429
+
430
+ | 属性 | 类型 | 默认值 | 描述 |
431
+ | -------- | --------- | ------ | ---------------- |
432
+ | enabled | `boolean` | `true` | 是否启用 |
433
+ | duration | `number` | `300` | 最小显示时间(ms) |
434
+
435
+ **DelayShow**
436
+
437
+ | 属性 | 类型 | 默认值 | 描述 |
438
+ | -------- | --------- | ------ | ---------------------------------------- |
439
+ | enabled | `boolean` | `true` | 是否启用 |
440
+ | duration | `number` | `200` | 延迟时间(ms),请求在此时间内完成则不显示 |
441
+
442
+ **DebounceHide**
443
+
444
+ | 属性 | 类型 | 默认值 | 描述 |
445
+ | -------- | --------- | ------- | ---------------- |
446
+ | enabled | `boolean` | `false` | 是否启用 |
447
+ | duration | `number` | `100` | 防抖等待时间(ms) |
448
+
449
+ **RequestFilter**
450
+
451
+ | 属性 | 类型 | 描述 |
452
+ | ------------------ | ---------- | ----------------------------------------- |
453
+ | excludeUrls | `RegExp[]` | 排除的 URL 正则数组 |
454
+ | includeUrls | `RegExp[]` | 包含的 URL 正则数组(优先级高于 exclude) |
455
+ | excludeMethods | `string[]` | 排除的 HTTP 方法数组 |
456
+ | excludeUrlPrefixes | `string[]` | 排除的 URL 前缀数组(前缀匹配,更高效) |
457
+
458
+ **LoadingCallbacks**
459
+
460
+ 回调以**函数体字符串**形式提供(构建时注入到浏览器端,无法传递函数引用)。
461
+
462
+ | 属性 | 类型 | 描述 |
463
+ | ------------ | -------- | --------------------------------- |
464
+ | onBeforeShow | `string` | 显示前回调,`return false` 可阻止 |
465
+ | onShow | `string` | 显示后回调 |
466
+ | onBeforeHide | `string` | 隐藏前回调,`return false` 可阻止 |
467
+ | onHide | `string` | 隐藏后回调 |
468
+ | onDestroy | `string` | 销毁时回调 |
469
+
470
+ **LoadingManager API**
471
+
472
+ 通过 `window.__LOADING_MANAGER__` 访问:
473
+
474
+ | 方法 | 说明 |
475
+ | ------------------- | ---------------------------------------- |
476
+ | `show(text?)` | 显示 Loading,可传入文本 |
477
+ | `hide()` | 隐藏 Loading(受最小显示时间和防抖约束) |
478
+ | `forceHide()` | 强制隐藏,忽略最小显示时间和防抖 |
479
+ | `destroy()` | 销毁实例,恢复原始拦截器 |
480
+ | `updateText(t)` | 更新文本内容 |
481
+ | `isVisible()` | 获取当前是否显示 |
482
+ | `getPendingCount()` | 获取当前挂起的请求数量 |
483
+
484
+ ```typescript
485
+ // 白屏 Loading:页面加载即显示,DOM 就绪后自动隐藏
486
+ injectLoading({ defaultVisible: true, autoHideOn: 'DOMContentLoaded' })
487
+
488
+ // 自动拦截所有请求
489
+ injectLoading({ autoBind: 'all' })
490
+
491
+ // 自定义样式 + 请求过滤
492
+ injectLoading({
493
+ style: { overlayColor: 'rgba(0,0,0,0.5)', spinnerColor: '#fff' },
494
+ autoBind: 'fetch',
495
+ requestFilter: { excludeUrls: [/\/api\/health/] }
496
+ })
497
+
498
+ // 手动控制
499
+ injectLoading()
500
+ window.__LOADING_MANAGER__.show('正在保存...')
501
+ window.__LOADING_MANAGER__.hide()
502
+ ```
306
503
 
307
504
  ## 子路径导出
308
505
 
@@ -310,17 +507,17 @@ Logger.destroy()
310
507
 
311
508
  ```typescript
312
509
  // 完整导入
313
- import { copyFile, BasePlugin, Logger } from '@meng-xi/vite-plugin'
510
+ import { buildProgress, copyFile, injectLoading, BasePlugin, Logger } from '@meng-xi/vite-plugin'
314
511
 
315
512
  // 按模块导入
316
513
  import { BasePlugin, createPluginFactory } from '@meng-xi/vite-plugin/factory'
317
514
  import { Logger } from '@meng-xi/vite-plugin/logger'
318
- import { copyFile, generateRouter } from '@meng-xi/vite-plugin/plugins'
515
+ import { buildProgress, copyFile, generateRouter, injectLoading } from '@meng-xi/vite-plugin/plugins'
319
516
  import { Validator, readFileContent, writeFileContent } from '@meng-xi/vite-plugin/common'
320
517
 
321
518
  // 类型导入(从子路径按需导入类型定义)
322
519
  import type { PluginWithInstance, PluginFactory, BasePluginOptions } from '@meng-xi/vite-plugin/factory'
323
- import type { GenerateVersionOptions, InjectIcoOptions, Icon } from '@meng-xi/vite-plugin/plugins'
520
+ import type { BuildProgressOptions, GenerateVersionOptions, InjectIcoOptions, InjectLoadingOptions, Icon } from '@meng-xi/vite-plugin/plugins'
324
521
  import type { DateFormatOptions } from '@meng-xi/vite-plugin/common'
325
522
  ```
326
523
 
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const format=require("./shared/vite-plugin.Ba9646wL.cjs"),validation=require("./shared/vite-plugin.IGZeStMa.cjs"),index=require("./shared/vite-plugin.CawoITTT.cjs"),logger_index=require("./logger/index.cjs"),index$1=require("./shared/vite-plugin.CXlzkIgT.cjs");require("fs"),require("path"),require("crypto"),exports.checkSourceExists=format.checkSourceExists,exports.copySourceToTarget=format.copySourceToTarget,exports.ensureTargetDir=format.ensureTargetDir,exports.fileExists=format.fileExists,exports.formatDate=format.formatDate,exports.generateRandomHash=format.generateRandomHash,exports.getDateFormatParams=format.getDateFormatParams,exports.padNumber=format.padNumber,exports.parseTemplate=format.parseTemplate,exports.readDirRecursive=format.readDirRecursive,exports.readFileContent=format.readFileContent,exports.readFileSync=format.readFileSync,exports.runWithConcurrency=format.runWithConcurrency,exports.shouldUpdateFile=format.shouldUpdateFile,exports.stripJsonComments=format.stripJsonComments,exports.toCamelCase=format.toCamelCase,exports.toPascalCase=format.toPascalCase,exports.writeFileContent=format.writeFileContent,exports.Validator=validation.Validator,exports.deepMerge=validation.deepMerge,exports.BasePlugin=index.BasePlugin,exports.createPluginFactory=index.createPluginFactory,exports.Logger=logger_index.Logger,exports.copyFile=index$1.copyFile,exports.generateRouter=index$1.generateRouter,exports.generateVersion=index$1.generateVersion,exports.injectIco=index$1.injectIco;
1
+ "use strict";const format=require("./shared/vite-plugin.Ba9646wL.cjs"),validation=require("./shared/vite-plugin.IGZeStMa.cjs"),index=require("./shared/vite-plugin.CawoITTT.cjs"),logger_index=require("./logger/index.cjs"),index$1=require("./shared/vite-plugin.CIQOGuWb.cjs");require("fs"),require("path"),require("crypto"),exports.checkSourceExists=format.checkSourceExists,exports.copySourceToTarget=format.copySourceToTarget,exports.ensureTargetDir=format.ensureTargetDir,exports.fileExists=format.fileExists,exports.formatDate=format.formatDate,exports.generateRandomHash=format.generateRandomHash,exports.getDateFormatParams=format.getDateFormatParams,exports.padNumber=format.padNumber,exports.parseTemplate=format.parseTemplate,exports.readDirRecursive=format.readDirRecursive,exports.readFileContent=format.readFileContent,exports.readFileSync=format.readFileSync,exports.runWithConcurrency=format.runWithConcurrency,exports.shouldUpdateFile=format.shouldUpdateFile,exports.stripJsonComments=format.stripJsonComments,exports.toCamelCase=format.toCamelCase,exports.toPascalCase=format.toPascalCase,exports.writeFileContent=format.writeFileContent,exports.Validator=validation.Validator,exports.deepMerge=validation.deepMerge,exports.BasePlugin=index.BasePlugin,exports.createPluginFactory=index.createPluginFactory,exports.Logger=logger_index.Logger,exports.buildProgress=index$1.buildProgress,exports.copyFile=index$1.copyFile,exports.generateRouter=index$1.generateRouter,exports.generateVersion=index$1.generateVersion,exports.injectIco=index$1.injectIco,exports.injectLoading=index$1.injectLoading;
package/dist/index.d.cts CHANGED
@@ -2,5 +2,5 @@ export { DateFormatOptions, checkSourceExists, copySourceToTarget, deepMerge, en
2
2
  export { V as Validator } from './shared/vite-plugin.CiHfwMiN.cjs';
3
3
  export { BasePlugin, BasePluginOptions, OptionsNormalizer, PluginFactory, PluginWithInstance, createPluginFactory } from './factory/index.cjs';
4
4
  export { L as Logger, P as PluginLogger } from './shared/vite-plugin.CLr0ttuO.cjs';
5
- export { CopyFileOptions, GenerateRouterOptions, GenerateVersionOptions, Icon, InjectIcoOptions, NameStrategy, OutputFormat, OutputType, RouteConfig, RouteMeta, UniAppPageConfig, UniAppPagesJson, UniAppTabBarConfig, VersionFormat, copyFile, generateRouter, generateVersion, injectIco } from './plugins/index.cjs';
5
+ export { AutoBindMode, AutoHideOn, BuildPhase, BuildProgressOptions, CopyFileOptions, DebounceHide, DelayShow, GenerateRouterOptions, GenerateVersionOptions, Icon, InjectIcoOptions, InjectLoadingOptions, LoadingCallbacks, LoadingManager, LoadingPosition, LoadingStyle, MinDisplayTime, NameStrategy, OutputFormat, OutputType, ProgressFormat, ProgressTheme, RequestFilter, RouteConfig, RouteMeta, SpinnerType, TransitionConfig, UniAppPageConfig, UniAppPagesJson, UniAppTabBarConfig, VersionFormat, buildProgress, copyFile, generateRouter, generateVersion, injectIco, injectLoading } from './plugins/index.cjs';
6
6
  import 'vite';
package/dist/index.d.mts CHANGED
@@ -2,5 +2,5 @@ export { DateFormatOptions, checkSourceExists, copySourceToTarget, deepMerge, en
2
2
  export { V as Validator } from './shared/vite-plugin.CiHfwMiN.mjs';
3
3
  export { BasePlugin, BasePluginOptions, OptionsNormalizer, PluginFactory, PluginWithInstance, createPluginFactory } from './factory/index.mjs';
4
4
  export { L as Logger, P as PluginLogger } from './shared/vite-plugin.CLr0ttuO.mjs';
5
- export { CopyFileOptions, GenerateRouterOptions, GenerateVersionOptions, Icon, InjectIcoOptions, NameStrategy, OutputFormat, OutputType, RouteConfig, RouteMeta, UniAppPageConfig, UniAppPagesJson, UniAppTabBarConfig, VersionFormat, copyFile, generateRouter, generateVersion, injectIco } from './plugins/index.mjs';
5
+ export { AutoBindMode, AutoHideOn, BuildPhase, BuildProgressOptions, CopyFileOptions, DebounceHide, DelayShow, GenerateRouterOptions, GenerateVersionOptions, Icon, InjectIcoOptions, InjectLoadingOptions, LoadingCallbacks, LoadingManager, LoadingPosition, LoadingStyle, MinDisplayTime, NameStrategy, OutputFormat, OutputType, ProgressFormat, ProgressTheme, RequestFilter, RouteConfig, RouteMeta, SpinnerType, TransitionConfig, UniAppPageConfig, UniAppPagesJson, UniAppTabBarConfig, VersionFormat, buildProgress, copyFile, generateRouter, generateVersion, injectIco, injectLoading } from './plugins/index.mjs';
6
6
  import 'vite';
package/dist/index.d.ts CHANGED
@@ -2,5 +2,5 @@ export { DateFormatOptions, checkSourceExists, copySourceToTarget, deepMerge, en
2
2
  export { V as Validator } from './shared/vite-plugin.CiHfwMiN.js';
3
3
  export { BasePlugin, BasePluginOptions, OptionsNormalizer, PluginFactory, PluginWithInstance, createPluginFactory } from './factory/index.js';
4
4
  export { L as Logger, P as PluginLogger } from './shared/vite-plugin.CLr0ttuO.js';
5
- export { CopyFileOptions, GenerateRouterOptions, GenerateVersionOptions, Icon, InjectIcoOptions, NameStrategy, OutputFormat, OutputType, RouteConfig, RouteMeta, UniAppPageConfig, UniAppPagesJson, UniAppTabBarConfig, VersionFormat, copyFile, generateRouter, generateVersion, injectIco } from './plugins/index.js';
5
+ export { AutoBindMode, AutoHideOn, BuildPhase, BuildProgressOptions, CopyFileOptions, DebounceHide, DelayShow, GenerateRouterOptions, GenerateVersionOptions, Icon, InjectIcoOptions, InjectLoadingOptions, LoadingCallbacks, LoadingManager, LoadingPosition, LoadingStyle, MinDisplayTime, NameStrategy, OutputFormat, OutputType, ProgressFormat, ProgressTheme, RequestFilter, RouteConfig, RouteMeta, SpinnerType, TransitionConfig, UniAppPageConfig, UniAppPagesJson, UniAppTabBarConfig, VersionFormat, buildProgress, copyFile, generateRouter, generateVersion, injectIco, injectLoading } from './plugins/index.js';
6
6
  import 'vite';
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export{c as checkSourceExists,a as copySourceToTarget,e as ensureTargetDir,f as fileExists,b as formatDate,g as generateRandomHash,d as getDateFormatParams,p as padNumber,h as parseTemplate,r as readDirRecursive,i as readFileContent,j as readFileSync,k as runWithConcurrency,s as shouldUpdateFile,l as stripJsonComments,t as toCamelCase,m as toPascalCase,w as writeFileContent}from"./shared/vite-plugin.C3ejdBNf.mjs";export{V as Validator,d as deepMerge}from"./shared/vite-plugin.B88RyRN8.mjs";export{B as BasePlugin,c as createPluginFactory}from"./shared/vite-plugin.DSb6XzBn.mjs";export{Logger}from"./logger/index.mjs";export{c as copyFile,g as generateRouter,a as generateVersion,i as injectIco}from"./shared/vite-plugin.B5wW4CiL.mjs";import"fs";import"path";import"crypto";
1
+ export{c as checkSourceExists,a as copySourceToTarget,e as ensureTargetDir,f as fileExists,b as formatDate,g as generateRandomHash,d as getDateFormatParams,p as padNumber,h as parseTemplate,r as readDirRecursive,i as readFileContent,j as readFileSync,k as runWithConcurrency,s as shouldUpdateFile,l as stripJsonComments,t as toCamelCase,m as toPascalCase,w as writeFileContent}from"./shared/vite-plugin.C3ejdBNf.mjs";export{V as Validator,d as deepMerge}from"./shared/vite-plugin.B88RyRN8.mjs";export{B as BasePlugin,c as createPluginFactory}from"./shared/vite-plugin.DSb6XzBn.mjs";export{Logger}from"./logger/index.mjs";export{b as buildProgress,c as copyFile,g as generateRouter,a as generateVersion,i as injectIco,d as injectLoading}from"./shared/vite-plugin.N63Ts2dO.mjs";import"fs";import"path";import"crypto";
@@ -1 +1 @@
1
- "use strict";const index=require("../shared/vite-plugin.CXlzkIgT.cjs");require("../shared/vite-plugin.CawoITTT.cjs"),require("../logger/index.cjs"),require("fs"),require("path"),require("crypto"),require("../shared/vite-plugin.IGZeStMa.cjs"),require("../shared/vite-plugin.Ba9646wL.cjs"),exports.copyFile=index.copyFile,exports.generateRouter=index.generateRouter,exports.generateVersion=index.generateVersion,exports.injectIco=index.injectIco;
1
+ "use strict";const index=require("../shared/vite-plugin.CIQOGuWb.cjs");require("../shared/vite-plugin.CawoITTT.cjs"),require("../logger/index.cjs"),require("fs"),require("path"),require("crypto"),require("../shared/vite-plugin.IGZeStMa.cjs"),require("../shared/vite-plugin.Ba9646wL.cjs"),exports.buildProgress=index.buildProgress,exports.copyFile=index.copyFile,exports.generateRouter=index.generateRouter,exports.generateVersion=index.generateVersion,exports.injectIco=index.injectIco,exports.injectLoading=index.injectLoading;