@meng-xi/vite-plugin 0.0.9 → 0.1.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-en.md +345 -268
- package/README.md +331 -254
- package/dist/common/index.cjs +1 -1
- package/dist/common/index.d.cts +101 -2
- package/dist/common/index.d.mts +101 -2
- package/dist/common/index.d.ts +101 -2
- package/dist/common/index.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/plugins/index.cjs +1 -1
- package/dist/plugins/index.d.cts +361 -167
- package/dist/plugins/index.d.mts +361 -167
- package/dist/plugins/index.d.ts +361 -167
- package/dist/plugins/index.mjs +1 -1
- package/dist/shared/vite-plugin.D6Law9Ke.mjs +706 -0
- package/dist/shared/vite-plugin.D8L9KzuW.cjs +706 -0
- package/dist/shared/vite-plugin.DFjf9wFM.mjs +2 -0
- package/dist/shared/vite-plugin.Tab4qcIM.cjs +2 -0
- package/package.json +1 -1
- package/dist/shared/vite-plugin.BI4kA-bR.mjs +0 -526
- package/dist/shared/vite-plugin.Ba9646wL.cjs +0 -1
- package/dist/shared/vite-plugin.C3ejdBNf.mjs +0 -1
- package/dist/shared/vite-plugin.CsdNNQ-4.cjs +0 -526
package/dist/common/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const script=require("../shared/vite-plugin.Tab4qcIM.cjs"),validation=require("../shared/vite-plugin.IGZeStMa.cjs");require("fs"),require("path"),require("crypto"),exports.checkSourceExists=script.checkSourceExists,exports.containsScriptTag=script.containsScriptTag,exports.copySourceToTarget=script.copySourceToTarget,exports.ensureTargetDir=script.ensureTargetDir,exports.fileExists=script.fileExists,exports.formatDate=script.formatDate,exports.generateRandomHash=script.generateRandomHash,exports.getDateFormatParams=script.getDateFormatParams,exports.injectBeforeTag=script.injectBeforeTag,exports.injectHtmlByPriority=script.injectHtmlByPriority,exports.makeCallback=script.makeCallback,exports.padNumber=script.padNumber,exports.parseTemplate=script.parseTemplate,exports.readDirRecursive=script.readDirRecursive,exports.readFileContent=script.readFileContent,exports.readFileSync=script.readFileSync,exports.runWithConcurrency=script.runWithConcurrency,exports.shouldUpdateFile=script.shouldUpdateFile,exports.stripJsonComments=script.stripJsonComments,exports.toCamelCase=script.toCamelCase,exports.toPascalCase=script.toPascalCase,exports.validateIdentifierName=script.validateIdentifierName,exports.writeFileContent=script.writeFileContent,exports.Validator=validation.Validator,exports.deepMerge=validation.deepMerge;
|
package/dist/common/index.d.cts
CHANGED
|
@@ -285,6 +285,52 @@ declare function toPascalCase(str: string, separators?: RegExp): string;
|
|
|
285
285
|
*/
|
|
286
286
|
declare function stripJsonComments(jsonString: string): string;
|
|
287
287
|
|
|
288
|
+
/**
|
|
289
|
+
* HTML 注入结果
|
|
290
|
+
*/
|
|
291
|
+
interface HtmlInjectResult {
|
|
292
|
+
/** 注入后的 HTML 内容 */
|
|
293
|
+
html: string;
|
|
294
|
+
/** 是否成功注入 */
|
|
295
|
+
injected: boolean;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* 在 HTML 中指定闭合标签前注入代码
|
|
299
|
+
*
|
|
300
|
+
* @param html - 原始 HTML 内容
|
|
301
|
+
* @param tag - 目标闭合标签(如 `</head>`、`</body>`、`</html>`)
|
|
302
|
+
* @param code - 要注入的代码
|
|
303
|
+
* @returns 注入结果对象
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* ```typescript
|
|
307
|
+
* // 在 </head> 前注入 CSS
|
|
308
|
+
* const result = injectBeforeTag(html, '</head>', '<style>...</style>')
|
|
309
|
+
*
|
|
310
|
+
* // 在 </body> 前注入 JS
|
|
311
|
+
* const result = injectBeforeTag(html, '</body>', '<script>...</script>')
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
314
|
+
declare function injectBeforeTag(html: string, tag: string, code: string): HtmlInjectResult;
|
|
315
|
+
/**
|
|
316
|
+
* 按优先级向 HTML 中注入代码
|
|
317
|
+
*
|
|
318
|
+
* @description 依次尝试在 `</head>`、`</body>`、`</html>` 前注入代码,
|
|
319
|
+
* 优先注入到靠前的标签位置。适用于需要注入到页面中但无特定位置要求的场景
|
|
320
|
+
*
|
|
321
|
+
* @param html - 原始 HTML 内容
|
|
322
|
+
* @param code - 要注入的代码
|
|
323
|
+
* @param targets - 目标标签优先级列表,默认为 `['</head>', '</body>', '</html>']`
|
|
324
|
+
* @returns 注入结果对象
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* ```typescript
|
|
328
|
+
* // 优先注入到 </body> 前
|
|
329
|
+
* const result = injectHtmlByPriority(html, scriptCode, ['</body>', '</html>'])
|
|
330
|
+
* ```
|
|
331
|
+
*/
|
|
332
|
+
declare function injectHtmlByPriority(html: string, code: string, targets?: string[]): HtmlInjectResult;
|
|
333
|
+
|
|
288
334
|
/**
|
|
289
335
|
* 深度合并对象
|
|
290
336
|
*
|
|
@@ -314,5 +360,58 @@ declare function stripJsonComments(jsonString: string): string;
|
|
|
314
360
|
*/
|
|
315
361
|
declare function deepMerge<T extends Record<string, any>>(...sources: Partial<T>[]): T;
|
|
316
362
|
|
|
317
|
-
|
|
318
|
-
|
|
363
|
+
/**
|
|
364
|
+
* 将回调函数体字符串包装为安全的函数表达式
|
|
365
|
+
*
|
|
366
|
+
* @param body - 函数体代码字符串
|
|
367
|
+
* @param context - 回调上下文标识,用于错误日志
|
|
368
|
+
* @param params - 函数参数列表字符串,默认为空
|
|
369
|
+
* @returns 安全的函数表达式字符串(包含 try-catch 保护)
|
|
370
|
+
*
|
|
371
|
+
* @example
|
|
372
|
+
* ```typescript
|
|
373
|
+
* makeCallback('console.log("done")')
|
|
374
|
+
* // 'function() { try { console.log("done") } catch(e) { console.error('[callback] error:', e); } }'
|
|
375
|
+
*
|
|
376
|
+
* makeCallback('console.log(a, b)', 'callback', 'a, b')
|
|
377
|
+
* // 'function(a, b) { try { console.log(a, b) } catch(e) { console.error('[callback] error:', e); } }'
|
|
378
|
+
*
|
|
379
|
+
* makeCallback('')
|
|
380
|
+
* // 'function() {}'
|
|
381
|
+
* ```
|
|
382
|
+
*/
|
|
383
|
+
declare function makeCallback(body?: string, context?: string, params?: string): string;
|
|
384
|
+
/**
|
|
385
|
+
* 检测字符串是否包含 `<script>` 标签
|
|
386
|
+
*
|
|
387
|
+
* @param str - 待检测的字符串
|
|
388
|
+
* @returns 是否包含 script 标签
|
|
389
|
+
*
|
|
390
|
+
* @example
|
|
391
|
+
* ```typescript
|
|
392
|
+
* containsScriptTag('<div onclick="alert(1)">') // false
|
|
393
|
+
* containsScriptTag('<script>alert(1)</script>') // true
|
|
394
|
+
* ```
|
|
395
|
+
*/
|
|
396
|
+
declare function containsScriptTag(str: string): boolean;
|
|
397
|
+
/**
|
|
398
|
+
* 验证字符串是否为合法的 JavaScript 标识符
|
|
399
|
+
*
|
|
400
|
+
* @description 检查名称是否以字母、下划线或美元符开头,
|
|
401
|
+
* 仅包含字母、数字、下划线和美元符,并排除可能导致原型污染的内置属性
|
|
402
|
+
*
|
|
403
|
+
* @param name - 待验证的标识符名称
|
|
404
|
+
* @throws 当名称不是合法标识符时抛出错误
|
|
405
|
+
* @throws 当名称为 JavaScript 内置属性时抛出错误
|
|
406
|
+
*
|
|
407
|
+
* @example
|
|
408
|
+
* ```typescript
|
|
409
|
+
* validateIdentifierName('__LOADING_MANAGER__') // 通过
|
|
410
|
+
* validateIdentifierName('123abc') // 抛出错误
|
|
411
|
+
* validateIdentifierName('__proto__') // 抛出错误(内置属性)
|
|
412
|
+
* ```
|
|
413
|
+
*/
|
|
414
|
+
declare function validateIdentifierName(name: string): void;
|
|
415
|
+
|
|
416
|
+
export { checkSourceExists, containsScriptTag, copySourceToTarget, deepMerge, ensureTargetDir, fileExists, formatDate, generateRandomHash, getDateFormatParams, injectBeforeTag, injectHtmlByPriority, makeCallback, padNumber, parseTemplate, readDirRecursive, readFileContent, readFileSync, runWithConcurrency, shouldUpdateFile, stripJsonComments, toCamelCase, toPascalCase, validateIdentifierName, writeFileContent };
|
|
417
|
+
export type { DateFormatOptions, HtmlInjectResult };
|
package/dist/common/index.d.mts
CHANGED
|
@@ -285,6 +285,52 @@ declare function toPascalCase(str: string, separators?: RegExp): string;
|
|
|
285
285
|
*/
|
|
286
286
|
declare function stripJsonComments(jsonString: string): string;
|
|
287
287
|
|
|
288
|
+
/**
|
|
289
|
+
* HTML 注入结果
|
|
290
|
+
*/
|
|
291
|
+
interface HtmlInjectResult {
|
|
292
|
+
/** 注入后的 HTML 内容 */
|
|
293
|
+
html: string;
|
|
294
|
+
/** 是否成功注入 */
|
|
295
|
+
injected: boolean;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* 在 HTML 中指定闭合标签前注入代码
|
|
299
|
+
*
|
|
300
|
+
* @param html - 原始 HTML 内容
|
|
301
|
+
* @param tag - 目标闭合标签(如 `</head>`、`</body>`、`</html>`)
|
|
302
|
+
* @param code - 要注入的代码
|
|
303
|
+
* @returns 注入结果对象
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* ```typescript
|
|
307
|
+
* // 在 </head> 前注入 CSS
|
|
308
|
+
* const result = injectBeforeTag(html, '</head>', '<style>...</style>')
|
|
309
|
+
*
|
|
310
|
+
* // 在 </body> 前注入 JS
|
|
311
|
+
* const result = injectBeforeTag(html, '</body>', '<script>...</script>')
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
314
|
+
declare function injectBeforeTag(html: string, tag: string, code: string): HtmlInjectResult;
|
|
315
|
+
/**
|
|
316
|
+
* 按优先级向 HTML 中注入代码
|
|
317
|
+
*
|
|
318
|
+
* @description 依次尝试在 `</head>`、`</body>`、`</html>` 前注入代码,
|
|
319
|
+
* 优先注入到靠前的标签位置。适用于需要注入到页面中但无特定位置要求的场景
|
|
320
|
+
*
|
|
321
|
+
* @param html - 原始 HTML 内容
|
|
322
|
+
* @param code - 要注入的代码
|
|
323
|
+
* @param targets - 目标标签优先级列表,默认为 `['</head>', '</body>', '</html>']`
|
|
324
|
+
* @returns 注入结果对象
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* ```typescript
|
|
328
|
+
* // 优先注入到 </body> 前
|
|
329
|
+
* const result = injectHtmlByPriority(html, scriptCode, ['</body>', '</html>'])
|
|
330
|
+
* ```
|
|
331
|
+
*/
|
|
332
|
+
declare function injectHtmlByPriority(html: string, code: string, targets?: string[]): HtmlInjectResult;
|
|
333
|
+
|
|
288
334
|
/**
|
|
289
335
|
* 深度合并对象
|
|
290
336
|
*
|
|
@@ -314,5 +360,58 @@ declare function stripJsonComments(jsonString: string): string;
|
|
|
314
360
|
*/
|
|
315
361
|
declare function deepMerge<T extends Record<string, any>>(...sources: Partial<T>[]): T;
|
|
316
362
|
|
|
317
|
-
|
|
318
|
-
|
|
363
|
+
/**
|
|
364
|
+
* 将回调函数体字符串包装为安全的函数表达式
|
|
365
|
+
*
|
|
366
|
+
* @param body - 函数体代码字符串
|
|
367
|
+
* @param context - 回调上下文标识,用于错误日志
|
|
368
|
+
* @param params - 函数参数列表字符串,默认为空
|
|
369
|
+
* @returns 安全的函数表达式字符串(包含 try-catch 保护)
|
|
370
|
+
*
|
|
371
|
+
* @example
|
|
372
|
+
* ```typescript
|
|
373
|
+
* makeCallback('console.log("done")')
|
|
374
|
+
* // 'function() { try { console.log("done") } catch(e) { console.error('[callback] error:', e); } }'
|
|
375
|
+
*
|
|
376
|
+
* makeCallback('console.log(a, b)', 'callback', 'a, b')
|
|
377
|
+
* // 'function(a, b) { try { console.log(a, b) } catch(e) { console.error('[callback] error:', e); } }'
|
|
378
|
+
*
|
|
379
|
+
* makeCallback('')
|
|
380
|
+
* // 'function() {}'
|
|
381
|
+
* ```
|
|
382
|
+
*/
|
|
383
|
+
declare function makeCallback(body?: string, context?: string, params?: string): string;
|
|
384
|
+
/**
|
|
385
|
+
* 检测字符串是否包含 `<script>` 标签
|
|
386
|
+
*
|
|
387
|
+
* @param str - 待检测的字符串
|
|
388
|
+
* @returns 是否包含 script 标签
|
|
389
|
+
*
|
|
390
|
+
* @example
|
|
391
|
+
* ```typescript
|
|
392
|
+
* containsScriptTag('<div onclick="alert(1)">') // false
|
|
393
|
+
* containsScriptTag('<script>alert(1)</script>') // true
|
|
394
|
+
* ```
|
|
395
|
+
*/
|
|
396
|
+
declare function containsScriptTag(str: string): boolean;
|
|
397
|
+
/**
|
|
398
|
+
* 验证字符串是否为合法的 JavaScript 标识符
|
|
399
|
+
*
|
|
400
|
+
* @description 检查名称是否以字母、下划线或美元符开头,
|
|
401
|
+
* 仅包含字母、数字、下划线和美元符,并排除可能导致原型污染的内置属性
|
|
402
|
+
*
|
|
403
|
+
* @param name - 待验证的标识符名称
|
|
404
|
+
* @throws 当名称不是合法标识符时抛出错误
|
|
405
|
+
* @throws 当名称为 JavaScript 内置属性时抛出错误
|
|
406
|
+
*
|
|
407
|
+
* @example
|
|
408
|
+
* ```typescript
|
|
409
|
+
* validateIdentifierName('__LOADING_MANAGER__') // 通过
|
|
410
|
+
* validateIdentifierName('123abc') // 抛出错误
|
|
411
|
+
* validateIdentifierName('__proto__') // 抛出错误(内置属性)
|
|
412
|
+
* ```
|
|
413
|
+
*/
|
|
414
|
+
declare function validateIdentifierName(name: string): void;
|
|
415
|
+
|
|
416
|
+
export { checkSourceExists, containsScriptTag, copySourceToTarget, deepMerge, ensureTargetDir, fileExists, formatDate, generateRandomHash, getDateFormatParams, injectBeforeTag, injectHtmlByPriority, makeCallback, padNumber, parseTemplate, readDirRecursive, readFileContent, readFileSync, runWithConcurrency, shouldUpdateFile, stripJsonComments, toCamelCase, toPascalCase, validateIdentifierName, writeFileContent };
|
|
417
|
+
export type { DateFormatOptions, HtmlInjectResult };
|
package/dist/common/index.d.ts
CHANGED
|
@@ -285,6 +285,52 @@ declare function toPascalCase(str: string, separators?: RegExp): string;
|
|
|
285
285
|
*/
|
|
286
286
|
declare function stripJsonComments(jsonString: string): string;
|
|
287
287
|
|
|
288
|
+
/**
|
|
289
|
+
* HTML 注入结果
|
|
290
|
+
*/
|
|
291
|
+
interface HtmlInjectResult {
|
|
292
|
+
/** 注入后的 HTML 内容 */
|
|
293
|
+
html: string;
|
|
294
|
+
/** 是否成功注入 */
|
|
295
|
+
injected: boolean;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* 在 HTML 中指定闭合标签前注入代码
|
|
299
|
+
*
|
|
300
|
+
* @param html - 原始 HTML 内容
|
|
301
|
+
* @param tag - 目标闭合标签(如 `</head>`、`</body>`、`</html>`)
|
|
302
|
+
* @param code - 要注入的代码
|
|
303
|
+
* @returns 注入结果对象
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* ```typescript
|
|
307
|
+
* // 在 </head> 前注入 CSS
|
|
308
|
+
* const result = injectBeforeTag(html, '</head>', '<style>...</style>')
|
|
309
|
+
*
|
|
310
|
+
* // 在 </body> 前注入 JS
|
|
311
|
+
* const result = injectBeforeTag(html, '</body>', '<script>...</script>')
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
314
|
+
declare function injectBeforeTag(html: string, tag: string, code: string): HtmlInjectResult;
|
|
315
|
+
/**
|
|
316
|
+
* 按优先级向 HTML 中注入代码
|
|
317
|
+
*
|
|
318
|
+
* @description 依次尝试在 `</head>`、`</body>`、`</html>` 前注入代码,
|
|
319
|
+
* 优先注入到靠前的标签位置。适用于需要注入到页面中但无特定位置要求的场景
|
|
320
|
+
*
|
|
321
|
+
* @param html - 原始 HTML 内容
|
|
322
|
+
* @param code - 要注入的代码
|
|
323
|
+
* @param targets - 目标标签优先级列表,默认为 `['</head>', '</body>', '</html>']`
|
|
324
|
+
* @returns 注入结果对象
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* ```typescript
|
|
328
|
+
* // 优先注入到 </body> 前
|
|
329
|
+
* const result = injectHtmlByPriority(html, scriptCode, ['</body>', '</html>'])
|
|
330
|
+
* ```
|
|
331
|
+
*/
|
|
332
|
+
declare function injectHtmlByPriority(html: string, code: string, targets?: string[]): HtmlInjectResult;
|
|
333
|
+
|
|
288
334
|
/**
|
|
289
335
|
* 深度合并对象
|
|
290
336
|
*
|
|
@@ -314,5 +360,58 @@ declare function stripJsonComments(jsonString: string): string;
|
|
|
314
360
|
*/
|
|
315
361
|
declare function deepMerge<T extends Record<string, any>>(...sources: Partial<T>[]): T;
|
|
316
362
|
|
|
317
|
-
|
|
318
|
-
|
|
363
|
+
/**
|
|
364
|
+
* 将回调函数体字符串包装为安全的函数表达式
|
|
365
|
+
*
|
|
366
|
+
* @param body - 函数体代码字符串
|
|
367
|
+
* @param context - 回调上下文标识,用于错误日志
|
|
368
|
+
* @param params - 函数参数列表字符串,默认为空
|
|
369
|
+
* @returns 安全的函数表达式字符串(包含 try-catch 保护)
|
|
370
|
+
*
|
|
371
|
+
* @example
|
|
372
|
+
* ```typescript
|
|
373
|
+
* makeCallback('console.log("done")')
|
|
374
|
+
* // 'function() { try { console.log("done") } catch(e) { console.error('[callback] error:', e); } }'
|
|
375
|
+
*
|
|
376
|
+
* makeCallback('console.log(a, b)', 'callback', 'a, b')
|
|
377
|
+
* // 'function(a, b) { try { console.log(a, b) } catch(e) { console.error('[callback] error:', e); } }'
|
|
378
|
+
*
|
|
379
|
+
* makeCallback('')
|
|
380
|
+
* // 'function() {}'
|
|
381
|
+
* ```
|
|
382
|
+
*/
|
|
383
|
+
declare function makeCallback(body?: string, context?: string, params?: string): string;
|
|
384
|
+
/**
|
|
385
|
+
* 检测字符串是否包含 `<script>` 标签
|
|
386
|
+
*
|
|
387
|
+
* @param str - 待检测的字符串
|
|
388
|
+
* @returns 是否包含 script 标签
|
|
389
|
+
*
|
|
390
|
+
* @example
|
|
391
|
+
* ```typescript
|
|
392
|
+
* containsScriptTag('<div onclick="alert(1)">') // false
|
|
393
|
+
* containsScriptTag('<script>alert(1)</script>') // true
|
|
394
|
+
* ```
|
|
395
|
+
*/
|
|
396
|
+
declare function containsScriptTag(str: string): boolean;
|
|
397
|
+
/**
|
|
398
|
+
* 验证字符串是否为合法的 JavaScript 标识符
|
|
399
|
+
*
|
|
400
|
+
* @description 检查名称是否以字母、下划线或美元符开头,
|
|
401
|
+
* 仅包含字母、数字、下划线和美元符,并排除可能导致原型污染的内置属性
|
|
402
|
+
*
|
|
403
|
+
* @param name - 待验证的标识符名称
|
|
404
|
+
* @throws 当名称不是合法标识符时抛出错误
|
|
405
|
+
* @throws 当名称为 JavaScript 内置属性时抛出错误
|
|
406
|
+
*
|
|
407
|
+
* @example
|
|
408
|
+
* ```typescript
|
|
409
|
+
* validateIdentifierName('__LOADING_MANAGER__') // 通过
|
|
410
|
+
* validateIdentifierName('123abc') // 抛出错误
|
|
411
|
+
* validateIdentifierName('__proto__') // 抛出错误(内置属性)
|
|
412
|
+
* ```
|
|
413
|
+
*/
|
|
414
|
+
declare function validateIdentifierName(name: string): void;
|
|
415
|
+
|
|
416
|
+
export { checkSourceExists, containsScriptTag, copySourceToTarget, deepMerge, ensureTargetDir, fileExists, formatDate, generateRandomHash, getDateFormatParams, injectBeforeTag, injectHtmlByPriority, makeCallback, padNumber, parseTemplate, readDirRecursive, readFileContent, readFileSync, runWithConcurrency, shouldUpdateFile, stripJsonComments, toCamelCase, toPascalCase, validateIdentifierName, writeFileContent };
|
|
417
|
+
export type { DateFormatOptions, HtmlInjectResult };
|
package/dist/common/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as checkSourceExists,a as copySourceToTarget,e as ensureTargetDir,f as fileExists,
|
|
1
|
+
export{c as checkSourceExists,a as containsScriptTag,b as copySourceToTarget,e as ensureTargetDir,f as fileExists,d as formatDate,g as generateRandomHash,h as getDateFormatParams,i as injectBeforeTag,j as injectHtmlByPriority,m as makeCallback,p as padNumber,k as parseTemplate,r as readDirRecursive,l as readFileContent,n as readFileSync,o as runWithConcurrency,s as shouldUpdateFile,q as stripJsonComments,t as toCamelCase,u as toPascalCase,v as validateIdentifierName,w as writeFileContent}from"../shared/vite-plugin.DFjf9wFM.mjs";export{V as Validator,d as deepMerge}from"../shared/vite-plugin.B88RyRN8.mjs";import"fs";import"path";import"crypto";
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const script=require("./shared/vite-plugin.Tab4qcIM.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.D8L9KzuW.cjs");require("fs"),require("path"),require("crypto"),exports.checkSourceExists=script.checkSourceExists,exports.containsScriptTag=script.containsScriptTag,exports.copySourceToTarget=script.copySourceToTarget,exports.ensureTargetDir=script.ensureTargetDir,exports.fileExists=script.fileExists,exports.formatDate=script.formatDate,exports.generateRandomHash=script.generateRandomHash,exports.getDateFormatParams=script.getDateFormatParams,exports.injectBeforeTag=script.injectBeforeTag,exports.injectHtmlByPriority=script.injectHtmlByPriority,exports.makeCallback=script.makeCallback,exports.padNumber=script.padNumber,exports.parseTemplate=script.parseTemplate,exports.readDirRecursive=script.readDirRecursive,exports.readFileContent=script.readFileContent,exports.readFileSync=script.readFileSync,exports.runWithConcurrency=script.runWithConcurrency,exports.shouldUpdateFile=script.shouldUpdateFile,exports.stripJsonComments=script.stripJsonComments,exports.toCamelCase=script.toCamelCase,exports.toPascalCase=script.toPascalCase,exports.validateIdentifierName=script.validateIdentifierName,exports.writeFileContent=script.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.faviconManager=index$1.faviconManager,exports.generateRouter=index$1.generateRouter,exports.generateVersion=index$1.generateVersion,exports.loadingManager=index$1.loadingManager,exports.versionUpdateChecker=index$1.versionUpdateChecker;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { DateFormatOptions, checkSourceExists, copySourceToTarget, deepMerge, ensureTargetDir, fileExists, formatDate, generateRandomHash, getDateFormatParams, padNumber, parseTemplate, readDirRecursive, readFileContent, readFileSync, runWithConcurrency, shouldUpdateFile, stripJsonComments, toCamelCase, toPascalCase, writeFileContent } from './common/index.cjs';
|
|
1
|
+
export { DateFormatOptions, HtmlInjectResult, checkSourceExists, containsScriptTag, copySourceToTarget, deepMerge, ensureTargetDir, fileExists, formatDate, generateRandomHash, getDateFormatParams, injectBeforeTag, injectHtmlByPriority, makeCallback, padNumber, parseTemplate, readDirRecursive, readFileContent, readFileSync, runWithConcurrency, shouldUpdateFile, stripJsonComments, toCamelCase, toPascalCase, validateIdentifierName, writeFileContent } from './common/index.cjs';
|
|
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 { AutoBindMode, AutoHideOn, BuildPhase, BuildProgressOptions, CopyFileOptions, DebounceHide, DelayShow, GenerateRouterOptions, GenerateVersionOptions, Icon,
|
|
5
|
+
export { AutoBindMode, AutoHideOn, BuildPhase, BuildProgressOptions, CopyFileOptions, DebounceHide, DelayShow, FaviconManagerOptions, GenerateRouterOptions, GenerateVersionOptions, Icon, LoadingCallbacks, LoadingManager, LoadingManagerOptions, LoadingPosition, LoadingStyle, MinDisplayTime, NameStrategy, OutputFormat, OutputType, ProgressFormat, ProgressTheme, PromptStyle, RequestFilter, RouteConfig, RouteMeta, SpinnerType, TransitionConfig, UniAppPageConfig, UniAppPagesJson, UniAppTabBarConfig, VersionFormat, VersionSource, VersionUpdateCheckerOptions, buildProgress, copyFile, faviconManager, generateRouter, generateVersion, loadingManager, versionUpdateChecker } from './plugins/index.cjs';
|
|
6
6
|
import 'vite';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { DateFormatOptions, checkSourceExists, copySourceToTarget, deepMerge, ensureTargetDir, fileExists, formatDate, generateRandomHash, getDateFormatParams, padNumber, parseTemplate, readDirRecursive, readFileContent, readFileSync, runWithConcurrency, shouldUpdateFile, stripJsonComments, toCamelCase, toPascalCase, writeFileContent } from './common/index.mjs';
|
|
1
|
+
export { DateFormatOptions, HtmlInjectResult, checkSourceExists, containsScriptTag, copySourceToTarget, deepMerge, ensureTargetDir, fileExists, formatDate, generateRandomHash, getDateFormatParams, injectBeforeTag, injectHtmlByPriority, makeCallback, padNumber, parseTemplate, readDirRecursive, readFileContent, readFileSync, runWithConcurrency, shouldUpdateFile, stripJsonComments, toCamelCase, toPascalCase, validateIdentifierName, writeFileContent } from './common/index.mjs';
|
|
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 { AutoBindMode, AutoHideOn, BuildPhase, BuildProgressOptions, CopyFileOptions, DebounceHide, DelayShow, GenerateRouterOptions, GenerateVersionOptions, Icon,
|
|
5
|
+
export { AutoBindMode, AutoHideOn, BuildPhase, BuildProgressOptions, CopyFileOptions, DebounceHide, DelayShow, FaviconManagerOptions, GenerateRouterOptions, GenerateVersionOptions, Icon, LoadingCallbacks, LoadingManager, LoadingManagerOptions, LoadingPosition, LoadingStyle, MinDisplayTime, NameStrategy, OutputFormat, OutputType, ProgressFormat, ProgressTheme, PromptStyle, RequestFilter, RouteConfig, RouteMeta, SpinnerType, TransitionConfig, UniAppPageConfig, UniAppPagesJson, UniAppTabBarConfig, VersionFormat, VersionSource, VersionUpdateCheckerOptions, buildProgress, copyFile, faviconManager, generateRouter, generateVersion, loadingManager, versionUpdateChecker } from './plugins/index.mjs';
|
|
6
6
|
import 'vite';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { DateFormatOptions, checkSourceExists, copySourceToTarget, deepMerge, ensureTargetDir, fileExists, formatDate, generateRandomHash, getDateFormatParams, padNumber, parseTemplate, readDirRecursive, readFileContent, readFileSync, runWithConcurrency, shouldUpdateFile, stripJsonComments, toCamelCase, toPascalCase, writeFileContent } from './common/index.js';
|
|
1
|
+
export { DateFormatOptions, HtmlInjectResult, checkSourceExists, containsScriptTag, copySourceToTarget, deepMerge, ensureTargetDir, fileExists, formatDate, generateRandomHash, getDateFormatParams, injectBeforeTag, injectHtmlByPriority, makeCallback, padNumber, parseTemplate, readDirRecursive, readFileContent, readFileSync, runWithConcurrency, shouldUpdateFile, stripJsonComments, toCamelCase, toPascalCase, validateIdentifierName, writeFileContent } from './common/index.js';
|
|
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 { AutoBindMode, AutoHideOn, BuildPhase, BuildProgressOptions, CopyFileOptions, DebounceHide, DelayShow, GenerateRouterOptions, GenerateVersionOptions, Icon,
|
|
5
|
+
export { AutoBindMode, AutoHideOn, BuildPhase, BuildProgressOptions, CopyFileOptions, DebounceHide, DelayShow, FaviconManagerOptions, GenerateRouterOptions, GenerateVersionOptions, Icon, LoadingCallbacks, LoadingManager, LoadingManagerOptions, LoadingPosition, LoadingStyle, MinDisplayTime, NameStrategy, OutputFormat, OutputType, ProgressFormat, ProgressTheme, PromptStyle, RequestFilter, RouteConfig, RouteMeta, SpinnerType, TransitionConfig, UniAppPageConfig, UniAppPagesJson, UniAppTabBarConfig, VersionFormat, VersionSource, VersionUpdateCheckerOptions, buildProgress, copyFile, faviconManager, generateRouter, generateVersion, loadingManager, versionUpdateChecker } 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,
|
|
1
|
+
export{c as checkSourceExists,a as containsScriptTag,b as copySourceToTarget,e as ensureTargetDir,f as fileExists,d as formatDate,g as generateRandomHash,h as getDateFormatParams,i as injectBeforeTag,j as injectHtmlByPriority,m as makeCallback,p as padNumber,k as parseTemplate,r as readDirRecursive,l as readFileContent,n as readFileSync,o as runWithConcurrency,s as shouldUpdateFile,q as stripJsonComments,t as toCamelCase,u as toPascalCase,v as validateIdentifierName,w as writeFileContent}from"./shared/vite-plugin.DFjf9wFM.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,f as faviconManager,g as generateRouter,a as generateVersion,l as loadingManager,v as versionUpdateChecker}from"./shared/vite-plugin.D6Law9Ke.mjs";import"fs";import"path";import"crypto";
|
package/dist/plugins/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const index=require("../shared/vite-plugin.
|
|
1
|
+
"use strict";const index=require("../shared/vite-plugin.D8L9KzuW.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.Tab4qcIM.cjs"),exports.buildProgress=index.buildProgress,exports.copyFile=index.copyFile,exports.faviconManager=index.faviconManager,exports.generateRouter=index.generateRouter,exports.generateVersion=index.generateVersion,exports.loadingManager=index.loadingManager,exports.versionUpdateChecker=index.versionUpdateChecker;
|