@meng-xi/vite-plugin 0.0.7 → 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,7 +15,7 @@
15
15
 
16
16
  ## 特性
17
17
 
18
- - **开箱即用** - 提供 buildProgress、copyFile、generateRouter、generateVersion、injectIco 五个实用插件,覆盖构建进度展示、文件复制、路由生成、版本管理、图标注入等常见场景
18
+ - **开箱即用** - 提供 6 个实用插件,覆盖构建进度展示、文件复制、路由生成、版本管理、图标注入、全局 Loading 状态管理等常见场景
19
19
  - **插件开发框架** - 导出 BasePlugin、Logger、Validator 等核心组件,快速构建符合规范的自定义 Vite 插件
20
20
  - **完整生命周期** - 支持初始化、配置解析、销毁等生命周期管理,自动组合钩子逻辑
21
21
  - **类型安全** - 完整的 TypeScript 类型定义,配置验证器确保参数正确性
@@ -50,7 +50,7 @@ pnpm add @meng-xi/vite-plugin -D
50
50
 
51
51
  ```typescript
52
52
  import { defineConfig } from 'vite'
53
- import { buildProgress, copyFile, generateRouter, generateVersion, injectIco } from '@meng-xi/vite-plugin'
53
+ import { buildProgress, copyFile, generateRouter, generateVersion, injectIco, injectLoading } from '@meng-xi/vite-plugin'
54
54
 
55
55
  export default defineConfig({
56
56
  plugins: [
@@ -78,6 +78,12 @@ export default defineConfig({
78
78
  // 注入网站图标
79
79
  injectIco({
80
80
  base: '/assets'
81
+ }),
82
+
83
+ // 注入全局 Loading
84
+ injectLoading({
85
+ defaultVisible: true,
86
+ autoHideOn: 'DOMContentLoaded'
81
87
  })
82
88
  ]
83
89
  })
@@ -245,19 +251,28 @@ Logger.destroy()
245
251
 
246
252
  ## 内置插件
247
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
+
248
263
  ### buildProgress
249
264
 
250
265
  在终端实时显示 Vite 构建进度条,支持三种显示格式。
251
266
 
252
- | 选项 | 类型 | 默认值 | 描述 |
253
- | --------------- | ------------------------------------- | ------ | ------------------------------ |
254
- | width | number | 30 | 进度条宽度(字符数) |
255
- | format | `'bar'` \| `'spinner'` \| `'minimal'` | 'bar' | 进度条显示格式 |
256
- | completeChar | string | '█' | 已完成部分的填充字符 |
257
- | incompleteChar | string | '░' | 未完成部分的填充字符 |
258
- | clearOnComplete | boolean | true | 构建完成后是否清除进度条 |
259
- | showModuleName | boolean | true | 是否显示当前正在处理的模块名称 |
260
- | theme | [ProgressTheme](#progresstheme) | - | 自定义颜色主题 |
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` | - | 自定义颜色主题 |
261
276
 
262
277
  **ProgressTheme**
263
278
 
@@ -292,77 +307,199 @@ buildProgress({
292
307
 
293
308
  在 Vite 构建完成后复制文件或目录到指定位置。
294
309
 
295
- | 选项 | 类型 | 默认值 | 描述 |
296
- | ----------- | ------- | ------ | -------------------- |
297
- | sourceDir | string | - | 源目录路径(必填) |
298
- | targetDir | string | - | 目标目录路径(必填) |
299
- | overwrite | boolean | true | 是否覆盖现有文件 |
300
- | recursive | boolean | true | 是否递归复制子目录 |
301
- | incremental | boolean | true | 是否启用增量复制 |
310
+ | 选项 | 类型 | 默认值 | 描述 |
311
+ | ----------- | --------- | ------ | -------------------- |
312
+ | sourceDir | `string` | - | 源目录路径(必填) |
313
+ | targetDir | `string` | - | 目标目录路径(必填) |
314
+ | overwrite | `boolean` | `true` | 是否覆盖现有文件 |
315
+ | recursive | `boolean` | `true` | 是否递归复制子目录 |
316
+ | incremental | `boolean` | `true` | 是否启用增量复制 |
302
317
 
303
318
  ### generateRouter
304
319
 
305
320
  根据 uni-app 项目的 `pages.json` 自动生成路由配置文件。
306
321
 
307
- | 选项 | 类型 | 默认值 | 描述 |
308
- | -------------------- | --------------------------------------------------------- | ---------------------- | ----------------------------- |
309
- | pagesJsonPath | string | 'src/pages.json' | pages.json 文件路径 |
310
- | outputPath | string | 'src/router.config.ts' | 输出文件路径 |
311
- | outputFormat | `'ts'` \| `'js'` | 'ts' | 输出文件格式 |
312
- | nameStrategy | `'path'` \| `'camelCase'` \| `'pascalCase'` \| `'custom'` | 'camelCase' | 路由名称策略 |
313
- | customNameGenerator | `(path: string) => string` | - | 自定义路由名称生成函数 |
314
- | includeSubPackages | boolean | true | 是否包含子包路由 |
315
- | watch | boolean | true | 是否监听变化自动重新生成 |
316
- | metaMapping | `Record<string, string>` | - | 页面 style 字段到 meta 的映射 |
317
- | exportTypes | boolean | true | 是否导出类型定义 |
318
- | 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 的修改 |
319
334
 
320
335
  ### generateVersion
321
336
 
322
337
  在 Vite 构建过程中自动生成版本号。
323
338
 
324
- | 选项 | 类型 | 默认值 | 描述 |
325
- | ------------ | --------------------------------------------------------------------------------- | ----------------- | ------------------------ |
326
- | format | `'timestamp'` \| `'date'` \| `'datetime'` \| `'semver'` \| `'hash'` \| `'custom'` | 'timestamp' | 版本号格式 |
327
- | customFormat | string | - | 自定义格式模板 |
328
- | semverBase | string | '1.0.0' | 语义化版本基础值 |
329
- | outputType | `'file'` \| `'define'` \| `'both'` | 'file' | 输出类型 |
330
- | outputFile | string | 'version.json' | 输出文件路径 |
331
- | defineName | string | '**APP_VERSION**' | 注入的全局变量名 |
332
- | hashLength | number | 8 | 哈希长度(1-32) |
333
- | prefix | string | - | 版本号前缀 |
334
- | suffix | string | - | 版本号后缀 |
335
- | 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 文件) |
336
351
 
337
352
  ### injectIco
338
353
 
339
354
  在 Vite 构建过程中将网站图标链接注入到 HTML 文件的 head 中。
340
355
 
341
- | 选项 | 类型 | 默认值 | 描述 |
342
- | ----------- | ------ | ------ | --------------------------- |
343
- | base | string | '/' | 图标文件的基础路径 |
344
- | url | string | - | 图标的完整 URL |
345
- | link | string | - | 自定义完整的 link 标签 HTML |
346
- | icons | Icon[] | - | 自定义图标数组 |
347
- | copyOptions | object | - | 图标文件复制配置 |
356
+ | 选项 | 类型 | 默认值 | 描述 |
357
+ | ----------- | -------- | ------ | --------------------------- |
358
+ | base | `string` | `'/'` | 图标文件的基础路径 |
359
+ | url | `string` | - | 图标的完整 URL |
360
+ | link | `string` | - | 自定义完整的 link 标签 HTML |
361
+ | icons | `Icon[]` | - | 自定义图标数组 |
362
+ | copyOptions | `object` | - | 图标文件复制配置 |
348
363
 
349
364
  `Icon` 接口定义:
350
365
 
351
- | 属性 | 类型 | 必填 | 描述 |
352
- | ----- | ------ | ---- | -------------- |
353
- | rel | string | 是 | 图标关系类型 |
354
- | href | string | 是 | 图标 URL |
355
- | sizes | string | 否 | 图标尺寸 |
356
- | type | string | 否 | 图标 MIME 类型 |
366
+ | 属性 | 类型 | 必填 | 描述 |
367
+ | ----- | -------- | ---- | -------------- |
368
+ | rel | `string` | 是 | 图标关系类型 |
369
+ | href | `string` | 是 | 图标 URL |
370
+ | sizes | `string` | 否 | 图标尺寸 |
371
+ | type | `string` | 否 | 图标 MIME 类型 |
357
372
 
358
373
  `copyOptions` 接口定义:
359
374
 
360
- | 属性 | 类型 | 必填 | 默认值 | 描述 |
361
- | --------- | ------- | ---- | ------ | ---------------- |
362
- | sourceDir | string | 是 | - | 图标源文件目录 |
363
- | targetDir | string | 是 | - | 图标目标目录 |
364
- | overwrite | boolean | 否 | true | 是否覆盖同名文件 |
365
- | recursive | boolean | 否 | true | 是否递归复制 |
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
+ ```
366
503
 
367
504
  ## 子路径导出
368
505
 
@@ -370,17 +507,17 @@ buildProgress({
370
507
 
371
508
  ```typescript
372
509
  // 完整导入
373
- import { buildProgress, copyFile, BasePlugin, Logger } from '@meng-xi/vite-plugin'
510
+ import { buildProgress, copyFile, injectLoading, BasePlugin, Logger } from '@meng-xi/vite-plugin'
374
511
 
375
512
  // 按模块导入
376
513
  import { BasePlugin, createPluginFactory } from '@meng-xi/vite-plugin/factory'
377
514
  import { Logger } from '@meng-xi/vite-plugin/logger'
378
- import { buildProgress, copyFile, generateRouter } from '@meng-xi/vite-plugin/plugins'
515
+ import { buildProgress, copyFile, generateRouter, injectLoading } from '@meng-xi/vite-plugin/plugins'
379
516
  import { Validator, readFileContent, writeFileContent } from '@meng-xi/vite-plugin/common'
380
517
 
381
518
  // 类型导入(从子路径按需导入类型定义)
382
519
  import type { PluginWithInstance, PluginFactory, BasePluginOptions } from '@meng-xi/vite-plugin/factory'
383
- import type { BuildProgressOptions, GenerateVersionOptions, InjectIcoOptions, Icon } from '@meng-xi/vite-plugin/plugins'
520
+ import type { BuildProgressOptions, GenerateVersionOptions, InjectIcoOptions, InjectLoadingOptions, Icon } from '@meng-xi/vite-plugin/plugins'
384
521
  import type { DateFormatOptions } from '@meng-xi/vite-plugin/common'
385
522
  ```
386
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.DqgHJjxa.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;
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 { BuildPhase, BuildProgressOptions, CopyFileOptions, GenerateRouterOptions, GenerateVersionOptions, Icon, InjectIcoOptions, NameStrategy, OutputFormat, OutputType, ProgressFormat, ProgressTheme, RouteConfig, RouteMeta, UniAppPageConfig, UniAppPagesJson, UniAppTabBarConfig, VersionFormat, buildProgress, 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 { BuildPhase, BuildProgressOptions, CopyFileOptions, GenerateRouterOptions, GenerateVersionOptions, Icon, InjectIcoOptions, NameStrategy, OutputFormat, OutputType, ProgressFormat, ProgressTheme, RouteConfig, RouteMeta, UniAppPageConfig, UniAppPagesJson, UniAppTabBarConfig, VersionFormat, buildProgress, 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 { BuildPhase, BuildProgressOptions, CopyFileOptions, GenerateRouterOptions, GenerateVersionOptions, Icon, InjectIcoOptions, NameStrategy, OutputFormat, OutputType, ProgressFormat, ProgressTheme, RouteConfig, RouteMeta, UniAppPageConfig, UniAppPagesJson, UniAppTabBarConfig, VersionFormat, buildProgress, 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{b as buildProgress,c as copyFile,g as generateRouter,a as generateVersion,i as injectIco}from"./shared/vite-plugin.CIahO6bu.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.DqgHJjxa.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;
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;