File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,12 +56,16 @@ export interface PluginInterfaceCtx {
5656 urlRequest : ( conf : UrlRequestConfig ) => Promise < UrlResponse | null > ;
5757 /** 隐藏面板(低风险) */
5858 hidePanel : ( list ?: string [ ] ) => void ;
59+ /** 读取文件(高风险) */
60+ readFile : ( basePath : 'CONFIG' | 'PUBLIC' , relPath : string ) => Promise < string | null > ;
61+ /** 写入文件(高风险) */
62+ writeFile : ( basePath : 'CONFIG' | 'PUBLIC' , relPath : string , content : string ) => Promise < boolean > ;
5963 /** 显示面板(低风险) */
6064 showPanel : ( list ?: string [ ] ) => void ;
6165 /** 注册子面板(中风险) */
62- registerSubPanel ? : ( options : { id : string ; el : HTMLElement } ) => void ;
66+ registerSubPanel : ( options : { id : string ; el : HTMLElement } ) => void ;
6367 /** 注销子面板 */
64- unregisterSubPanel ? : ( id : string ) => void ;
68+ unregisterSubPanel : ( id : string ) => void ;
6569 } ;
6670}
6771
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export default defineConfig({
55 lib : { // Library 模式:输出单个 ES 模块文件
66 entry : 'src/index.ts' ,
77 formats : [ 'es' ] ,
8- fileName : ( ) => 'hello-world.js' , // 输出文件名:dist/hello-world.js
8+ fileName : ( ) => 'hello-world.js' , // 输出文件名
99 } ,
1010 rollupOptions : {
1111 external : [ ] ,
You can’t perform that action at this time.
0 commit comments