capacitor-dex-editor 0.0.41 → 0.0.42
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 +38 -0
- package/dist/docs.json +93 -0
- package/dist/esm/definitions.d.ts +16 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +2 -1
- package/dist/esm/web.js +7 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +7 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +7 -0
- package/dist/plugin.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -171,6 +171,7 @@ MIT
|
|
|
171
171
|
<docgen-index>
|
|
172
172
|
|
|
173
173
|
* [`execute(...)`](#execute)
|
|
174
|
+
* [`openSmaliEditor(...)`](#opensmalieditor)
|
|
174
175
|
* [Interfaces](#interfaces)
|
|
175
176
|
* [Type Aliases](#type-aliases)
|
|
176
177
|
|
|
@@ -199,6 +200,23 @@ execute(options: DexExecuteOptions) => Promise<DexExecuteResult>
|
|
|
199
200
|
--------------------
|
|
200
201
|
|
|
201
202
|
|
|
203
|
+
### openSmaliEditor(...)
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
openSmaliEditor(options: OpenSmaliEditorOptions) => Promise<OpenSmaliEditorResult>
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
打开原生 Smali 编辑器
|
|
210
|
+
|
|
211
|
+
| Param | Type |
|
|
212
|
+
| ------------- | ------------------------------------------------------------------------- |
|
|
213
|
+
| **`options`** | <code><a href="#opensmalieditoroptions">OpenSmaliEditorOptions</a></code> |
|
|
214
|
+
|
|
215
|
+
**Returns:** <code>Promise<<a href="#opensmalieditorresult">OpenSmaliEditorResult</a>></code>
|
|
216
|
+
|
|
217
|
+
--------------------
|
|
218
|
+
|
|
219
|
+
|
|
202
220
|
### Interfaces
|
|
203
221
|
|
|
204
222
|
|
|
@@ -219,6 +237,26 @@ execute(options: DexExecuteOptions) => Promise<DexExecuteResult>
|
|
|
219
237
|
| **`params`** | <code><a href="#record">Record</a><string, any></code> |
|
|
220
238
|
|
|
221
239
|
|
|
240
|
+
#### OpenSmaliEditorResult
|
|
241
|
+
|
|
242
|
+
| Prop | Type |
|
|
243
|
+
| --------------- | -------------------- |
|
|
244
|
+
| **`success`** | <code>boolean</code> |
|
|
245
|
+
| **`content`** | <code>string</code> |
|
|
246
|
+
| **`modified`** | <code>boolean</code> |
|
|
247
|
+
| **`cancelled`** | <code>boolean</code> |
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
#### OpenSmaliEditorOptions
|
|
251
|
+
|
|
252
|
+
| Prop | Type |
|
|
253
|
+
| --------------- | -------------------- |
|
|
254
|
+
| **`content`** | <code>string</code> |
|
|
255
|
+
| **`title`** | <code>string</code> |
|
|
256
|
+
| **`className`** | <code>string</code> |
|
|
257
|
+
| **`readOnly`** | <code>boolean</code> |
|
|
258
|
+
|
|
259
|
+
|
|
222
260
|
### Type Aliases
|
|
223
261
|
|
|
224
262
|
|
package/dist/docs.json
CHANGED
|
@@ -32,6 +32,25 @@
|
|
|
32
32
|
"DexExecuteOptions"
|
|
33
33
|
],
|
|
34
34
|
"slug": "execute"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "openSmaliEditor",
|
|
38
|
+
"signature": "(options: OpenSmaliEditorOptions) => Promise<OpenSmaliEditorResult>",
|
|
39
|
+
"parameters": [
|
|
40
|
+
{
|
|
41
|
+
"name": "options",
|
|
42
|
+
"docs": "",
|
|
43
|
+
"type": "OpenSmaliEditorOptions"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"returns": "Promise<OpenSmaliEditorResult>",
|
|
47
|
+
"tags": [],
|
|
48
|
+
"docs": "打开原生 Smali 编辑器",
|
|
49
|
+
"complexTypes": [
|
|
50
|
+
"OpenSmaliEditorResult",
|
|
51
|
+
"OpenSmaliEditorOptions"
|
|
52
|
+
],
|
|
53
|
+
"slug": "opensmalieditor"
|
|
35
54
|
}
|
|
36
55
|
],
|
|
37
56
|
"properties": []
|
|
@@ -93,6 +112,80 @@
|
|
|
93
112
|
"type": "Record<string, any>"
|
|
94
113
|
}
|
|
95
114
|
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "OpenSmaliEditorResult",
|
|
118
|
+
"slug": "opensmalieditorresult",
|
|
119
|
+
"docs": "",
|
|
120
|
+
"tags": [],
|
|
121
|
+
"methods": [],
|
|
122
|
+
"properties": [
|
|
123
|
+
{
|
|
124
|
+
"name": "success",
|
|
125
|
+
"tags": [],
|
|
126
|
+
"docs": "",
|
|
127
|
+
"complexTypes": [],
|
|
128
|
+
"type": "boolean"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "content",
|
|
132
|
+
"tags": [],
|
|
133
|
+
"docs": "",
|
|
134
|
+
"complexTypes": [],
|
|
135
|
+
"type": "string | undefined"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "modified",
|
|
139
|
+
"tags": [],
|
|
140
|
+
"docs": "",
|
|
141
|
+
"complexTypes": [],
|
|
142
|
+
"type": "boolean | undefined"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"name": "cancelled",
|
|
146
|
+
"tags": [],
|
|
147
|
+
"docs": "",
|
|
148
|
+
"complexTypes": [],
|
|
149
|
+
"type": "boolean | undefined"
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "OpenSmaliEditorOptions",
|
|
155
|
+
"slug": "opensmalieditoroptions",
|
|
156
|
+
"docs": "",
|
|
157
|
+
"tags": [],
|
|
158
|
+
"methods": [],
|
|
159
|
+
"properties": [
|
|
160
|
+
{
|
|
161
|
+
"name": "content",
|
|
162
|
+
"tags": [],
|
|
163
|
+
"docs": "",
|
|
164
|
+
"complexTypes": [],
|
|
165
|
+
"type": "string"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "title",
|
|
169
|
+
"tags": [],
|
|
170
|
+
"docs": "",
|
|
171
|
+
"complexTypes": [],
|
|
172
|
+
"type": "string | undefined"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "className",
|
|
176
|
+
"tags": [],
|
|
177
|
+
"docs": "",
|
|
178
|
+
"complexTypes": [],
|
|
179
|
+
"type": "string | undefined"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "readOnly",
|
|
183
|
+
"tags": [],
|
|
184
|
+
"docs": "",
|
|
185
|
+
"complexTypes": [],
|
|
186
|
+
"type": "boolean | undefined"
|
|
187
|
+
}
|
|
188
|
+
]
|
|
96
189
|
}
|
|
97
190
|
],
|
|
98
191
|
"enums": [],
|
|
@@ -9,6 +9,22 @@ export interface DexEditorPluginPlugin {
|
|
|
9
9
|
* @param options.params 操作参数
|
|
10
10
|
*/
|
|
11
11
|
execute(options: DexExecuteOptions): Promise<DexExecuteResult>;
|
|
12
|
+
/**
|
|
13
|
+
* 打开原生 Smali 编辑器
|
|
14
|
+
*/
|
|
15
|
+
openSmaliEditor(options: OpenSmaliEditorOptions): Promise<OpenSmaliEditorResult>;
|
|
16
|
+
}
|
|
17
|
+
export interface OpenSmaliEditorOptions {
|
|
18
|
+
content: string;
|
|
19
|
+
title?: string;
|
|
20
|
+
className?: string;
|
|
21
|
+
readOnly?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface OpenSmaliEditorResult {
|
|
24
|
+
success: boolean;
|
|
25
|
+
content?: string;
|
|
26
|
+
modified?: boolean;
|
|
27
|
+
cancelled?: boolean;
|
|
12
28
|
}
|
|
13
29
|
export interface DexExecuteOptions {
|
|
14
30
|
action: DexAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * DEX编辑器插件 - 通用执行器接口\n * 通过 action 参数调用 dexlib2 的全部功能\n */\nexport interface DexEditorPluginPlugin {\n /**\n * 通用执行器 - 调用任意 dexlib2 功能\n * @param options.action 操作名称\n * @param options.params 操作参数\n */\n execute(options: DexExecuteOptions): Promise<DexExecuteResult>;\n}\n\nexport interface DexExecuteOptions {\n action: DexAction;\n params?: Record<string, any>;\n}\n\nexport interface DexExecuteResult {\n success: boolean;\n data?: any;\n error?: string;\n}\n\n/**\n * 支持的操作类型\n */\nexport type DexAction =\n // DEX文件操作\n | 'loadDex' // 加载DEX文件\n | 'saveDex' // 保存DEX文件\n | 'closeDex' // 关闭DEX文件\n | 'getDexInfo' // 获取DEX文件信息\n \n // 类操作\n | 'getClasses' // 获取所有类列表\n | 'getClassInfo' // 获取类详细信息\n | 'addClass' // 添加类\n | 'removeClass' // 删除类\n | 'renameClass' // 重命名类\n \n // 方法操作\n | 'getMethods' // 获取类的所有方法\n | 'getMethodInfo' // 获取方法详细信息\n | 'getMethodSmali' // 获取方法的Smali代码\n | 'setMethodSmali' // 设置方法的Smali代码\n | 'addMethod' // 添加方法\n | 'removeMethod' // 删除方法\n \n // 字段操作\n | 'getFields' // 获取类的所有字段\n | 'getFieldInfo' // 获取字段详细信息\n | 'addField' // 添加字段\n | 'removeField' // 删除字段\n \n // Smali操作\n | 'classToSmali' // 将类转换为Smali代码\n | 'smaliToClass' // 将Smali代码编译为类\n | 'disassemble' // 反汇编整个DEX\n | 'assemble' // 汇编Smali目录为DEX\n \n // 搜索操作\n | 'searchString' // 搜索字符串\n | 'searchCode' // 搜索代码\n | 'searchMethod' // 搜索方法\n | 'searchField' // 搜索字段\n \n // 工具操作\n | 'fixDex' // 修复DEX文件\n | 'mergeDex' // 合并多个DEX\n | 'splitDex' // 拆分DEX\n | 'getStrings' // 获取字符串常量池\n | 'modifyString' // 修改字符串\n \n // APK操作\n | 'openApk' // 打开APK文件(解压)\n | 'closeApk' // 关闭APK会话\n | 'getApkInfo' // 获取APK信息\n | 'listApkContents' // 列出APK内容\n | 'extractFile' // 提取APK中的文件\n | 'replaceFile' // 替换APK中的文件\n | 'addFile' // 添加文件到APK\n | 'deleteFile' // 删除APK中的文件\n | 'repackApk' // 重新打包APK\n | 'signApk' // 签名APK\n | 'signApkWithTestKey'// 使用测试密钥签名\n | 'getApkSignature' // 获取APK签名信息\n | 'getSessionDexFiles';// 获取会话中的DEX文件\n\n/**\n * 常用参数类型定义\n */\nexport interface LoadDexParams {\n path: string; // DEX文件路径\n sessionId?: string; // 可选的会话ID\n}\n\nexport interface SaveDexParams {\n sessionId: string; // 会话ID\n outputPath: string; // 输出路径\n}\n\nexport interface ClassInfoParams {\n sessionId: string;\n className: string; // 类名 (如 Lcom/example/Test;)\n}\n\nexport interface MethodSmaliParams {\n sessionId: string;\n className: string;\n methodName: string;\n methodSignature: string; // 方法签名 (如 (I)V)\n}\n\nexport interface SetMethodSmaliParams extends MethodSmaliParams {\n smaliCode: string; // 新的Smali代码\n}\n\nexport interface SearchParams {\n sessionId: string;\n query: string;\n regex?: boolean; // 是否使用正则表达式\n caseSensitive?: boolean;\n}\n\nexport interface DisassembleParams {\n sessionId: string;\n outputDir: string; // 输出Smali目录\n}\n\nexport interface AssembleParams {\n smaliDir: string; // Smali目录\n outputPath: string; // 输出DEX路径\n}\n\n// ============ APK 操作参数 ============\n\nexport interface OpenApkParams {\n apkPath: string; // APK文件路径\n extractDir?: string; // 解压目录(可选)\n}\n\nexport interface ApkInfoParams {\n apkPath: string;\n}\n\nexport interface ExtractFileParams {\n apkPath: string;\n entryName: string; // ZIP内文件路径\n outputPath: string;\n}\n\nexport interface ReplaceFileParams {\n sessionId: string;\n entryName: string; // ZIP内文件路径\n newFilePath: string; // 新文件路径\n}\n\nexport interface RepackApkParams {\n sessionId: string;\n outputPath: string; // 输出APK路径\n}\n\nexport interface SignApkParams {\n apkPath: string;\n outputPath: string;\n keystorePath: string; // 密钥库路径\n keystorePassword: string;\n keyAlias: string; // 密钥别名\n keyPassword: string;\n}\n\nexport interface SignApkTestParams {\n apkPath: string;\n outputPath: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * DEX编辑器插件 - 通用执行器接口\n * 通过 action 参数调用 dexlib2 的全部功能\n */\nexport interface DexEditorPluginPlugin {\n /**\n * 通用执行器 - 调用任意 dexlib2 功能\n * @param options.action 操作名称\n * @param options.params 操作参数\n */\n execute(options: DexExecuteOptions): Promise<DexExecuteResult>;\n\n /**\n * 打开原生 Smali 编辑器\n */\n openSmaliEditor(options: OpenSmaliEditorOptions): Promise<OpenSmaliEditorResult>;\n}\n\nexport interface OpenSmaliEditorOptions {\n content: string;\n title?: string;\n className?: string;\n readOnly?: boolean;\n}\n\nexport interface OpenSmaliEditorResult {\n success: boolean;\n content?: string;\n modified?: boolean;\n cancelled?: boolean;\n}\n\nexport interface DexExecuteOptions {\n action: DexAction;\n params?: Record<string, any>;\n}\n\nexport interface DexExecuteResult {\n success: boolean;\n data?: any;\n error?: string;\n}\n\n/**\n * 支持的操作类型\n */\nexport type DexAction =\n // DEX文件操作\n | 'loadDex' // 加载DEX文件\n | 'saveDex' // 保存DEX文件\n | 'closeDex' // 关闭DEX文件\n | 'getDexInfo' // 获取DEX文件信息\n \n // 类操作\n | 'getClasses' // 获取所有类列表\n | 'getClassInfo' // 获取类详细信息\n | 'addClass' // 添加类\n | 'removeClass' // 删除类\n | 'renameClass' // 重命名类\n \n // 方法操作\n | 'getMethods' // 获取类的所有方法\n | 'getMethodInfo' // 获取方法详细信息\n | 'getMethodSmali' // 获取方法的Smali代码\n | 'setMethodSmali' // 设置方法的Smali代码\n | 'addMethod' // 添加方法\n | 'removeMethod' // 删除方法\n \n // 字段操作\n | 'getFields' // 获取类的所有字段\n | 'getFieldInfo' // 获取字段详细信息\n | 'addField' // 添加字段\n | 'removeField' // 删除字段\n \n // Smali操作\n | 'classToSmali' // 将类转换为Smali代码\n | 'smaliToClass' // 将Smali代码编译为类\n | 'disassemble' // 反汇编整个DEX\n | 'assemble' // 汇编Smali目录为DEX\n \n // 搜索操作\n | 'searchString' // 搜索字符串\n | 'searchCode' // 搜索代码\n | 'searchMethod' // 搜索方法\n | 'searchField' // 搜索字段\n \n // 工具操作\n | 'fixDex' // 修复DEX文件\n | 'mergeDex' // 合并多个DEX\n | 'splitDex' // 拆分DEX\n | 'getStrings' // 获取字符串常量池\n | 'modifyString' // 修改字符串\n \n // APK操作\n | 'openApk' // 打开APK文件(解压)\n | 'closeApk' // 关闭APK会话\n | 'getApkInfo' // 获取APK信息\n | 'listApkContents' // 列出APK内容\n | 'extractFile' // 提取APK中的文件\n | 'replaceFile' // 替换APK中的文件\n | 'addFile' // 添加文件到APK\n | 'deleteFile' // 删除APK中的文件\n | 'repackApk' // 重新打包APK\n | 'signApk' // 签名APK\n | 'signApkWithTestKey'// 使用测试密钥签名\n | 'getApkSignature' // 获取APK签名信息\n | 'getSessionDexFiles';// 获取会话中的DEX文件\n\n/**\n * 常用参数类型定义\n */\nexport interface LoadDexParams {\n path: string; // DEX文件路径\n sessionId?: string; // 可选的会话ID\n}\n\nexport interface SaveDexParams {\n sessionId: string; // 会话ID\n outputPath: string; // 输出路径\n}\n\nexport interface ClassInfoParams {\n sessionId: string;\n className: string; // 类名 (如 Lcom/example/Test;)\n}\n\nexport interface MethodSmaliParams {\n sessionId: string;\n className: string;\n methodName: string;\n methodSignature: string; // 方法签名 (如 (I)V)\n}\n\nexport interface SetMethodSmaliParams extends MethodSmaliParams {\n smaliCode: string; // 新的Smali代码\n}\n\nexport interface SearchParams {\n sessionId: string;\n query: string;\n regex?: boolean; // 是否使用正则表达式\n caseSensitive?: boolean;\n}\n\nexport interface DisassembleParams {\n sessionId: string;\n outputDir: string; // 输出Smali目录\n}\n\nexport interface AssembleParams {\n smaliDir: string; // Smali目录\n outputPath: string; // 输出DEX路径\n}\n\n// ============ APK 操作参数 ============\n\nexport interface OpenApkParams {\n apkPath: string; // APK文件路径\n extractDir?: string; // 解压目录(可选)\n}\n\nexport interface ApkInfoParams {\n apkPath: string;\n}\n\nexport interface ExtractFileParams {\n apkPath: string;\n entryName: string; // ZIP内文件路径\n outputPath: string;\n}\n\nexport interface ReplaceFileParams {\n sessionId: string;\n entryName: string; // ZIP内文件路径\n newFilePath: string; // 新文件路径\n}\n\nexport interface RepackApkParams {\n sessionId: string;\n outputPath: string; // 输出APK路径\n}\n\nexport interface SignApkParams {\n apkPath: string;\n outputPath: string;\n keystorePath: string; // 密钥库路径\n keystorePassword: string;\n keyAlias: string; // 密钥别名\n keyPassword: string;\n}\n\nexport interface SignApkTestParams {\n apkPath: string;\n outputPath: string;\n}\n"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { WebPlugin } from '@capacitor/core';
|
|
2
|
-
import type { DexEditorPluginPlugin, DexExecuteOptions, DexExecuteResult } from './definitions';
|
|
2
|
+
import type { DexEditorPluginPlugin, DexExecuteOptions, DexExecuteResult, OpenSmaliEditorOptions, OpenSmaliEditorResult } from './definitions';
|
|
3
3
|
/**
|
|
4
4
|
* Web 平台实现(仅用于开发调试,实际功能需要 Android 原生)
|
|
5
5
|
*/
|
|
6
6
|
export declare class DexEditorPluginWeb extends WebPlugin implements DexEditorPluginPlugin {
|
|
7
7
|
execute(options: DexExecuteOptions): Promise<DexExecuteResult>;
|
|
8
|
+
openSmaliEditor(_options: OpenSmaliEditorOptions): Promise<OpenSmaliEditorResult>;
|
|
8
9
|
}
|
package/dist/esm/web.js
CHANGED
|
@@ -11,5 +11,12 @@ export class DexEditorPluginWeb extends WebPlugin {
|
|
|
11
11
|
error: 'DEX editing is only available on Android platform'
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
+
async openSmaliEditor(_options) {
|
|
15
|
+
console.warn('DexEditorPlugin: Native Smali editor is only available on Android');
|
|
16
|
+
return {
|
|
17
|
+
success: false,
|
|
18
|
+
cancelled: true
|
|
19
|
+
};
|
|
20
|
+
}
|
|
14
21
|
}
|
|
15
22
|
//# sourceMappingURL=web.js.map
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAC/C,KAAK,CAAC,OAAO,CAAC,OAA0B;QACtC,OAAO,CAAC,IAAI,CAAC,gEAAgE,CAAC,CAAC;QAC/E,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAElE,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,mDAAmD;SAC3D,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { DexEditorPluginPlugin, DexExecuteOptions, DexExecuteResult } from './definitions';\n\n/**\n * Web 平台实现(仅用于开发调试,实际功能需要 Android 原生)\n */\nexport class DexEditorPluginWeb extends WebPlugin implements DexEditorPluginPlugin {\n async execute(options: DexExecuteOptions): Promise<DexExecuteResult> {\n console.warn('DexEditorPlugin: Web platform is not supported for DEX editing');\n console.log('Action:', options.action, 'Params:', options.params);\n \n return {\n success: false,\n error: 'DEX editing is only available on Android platform'\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAC/C,KAAK,CAAC,OAAO,CAAC,OAA0B;QACtC,OAAO,CAAC,IAAI,CAAC,gEAAgE,CAAC,CAAC;QAC/E,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAElE,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,mDAAmD;SAC3D,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,QAAgC;QACpD,OAAO,CAAC,IAAI,CAAC,mEAAmE,CAAC,CAAC;QAClF,OAAO;YACL,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,IAAI;SAChB,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { DexEditorPluginPlugin, DexExecuteOptions, DexExecuteResult, OpenSmaliEditorOptions, OpenSmaliEditorResult } from './definitions';\n\n/**\n * Web 平台实现(仅用于开发调试,实际功能需要 Android 原生)\n */\nexport class DexEditorPluginWeb extends WebPlugin implements DexEditorPluginPlugin {\n async execute(options: DexExecuteOptions): Promise<DexExecuteResult> {\n console.warn('DexEditorPlugin: Web platform is not supported for DEX editing');\n console.log('Action:', options.action, 'Params:', options.params);\n \n return {\n success: false,\n error: 'DEX editing is only available on Android platform'\n };\n }\n\n async openSmaliEditor(_options: OpenSmaliEditorOptions): Promise<OpenSmaliEditorResult> {\n console.warn('DexEditorPlugin: Native Smali editor is only available on Android');\n return {\n success: false,\n cancelled: true\n };\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -18,6 +18,13 @@ class DexEditorPluginWeb extends core.WebPlugin {
|
|
|
18
18
|
error: 'DEX editing is only available on Android platform'
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
+
async openSmaliEditor(_options) {
|
|
22
|
+
console.warn('DexEditorPlugin: Native Smali editor is only available on Android');
|
|
23
|
+
return {
|
|
24
|
+
success: false,
|
|
25
|
+
cancelled: true
|
|
26
|
+
};
|
|
27
|
+
}
|
|
21
28
|
}
|
|
22
29
|
|
|
23
30
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DexEditorPlugin = registerPlugin('DexEditorPlugin', {\n web: () => import('./web').then((m) => new m.DexEditorPluginWeb()),\n});\nexport * from './definitions';\nexport { DexEditorPlugin };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\n/**\n * Web 平台实现(仅用于开发调试,实际功能需要 Android 原生)\n */\nexport class DexEditorPluginWeb extends WebPlugin {\n async execute(options) {\n console.warn('DexEditorPlugin: Web platform is not supported for DEX editing');\n console.log('Action:', options.action, 'Params:', options.params);\n return {\n success: false,\n error: 'DEX editing is only available on Android platform'\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;AAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACtE,CAAC;;ACFD;AACA;AACA;AACO,MAAM,kBAAkB,SAASC,cAAS,CAAC;AAClD,IAAI,MAAM,OAAO,CAAC,OAAO,EAAE;AAC3B,QAAQ,OAAO,CAAC,IAAI,CAAC,gEAAgE,CAAC;AACtF,QAAQ,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC;AACzE,QAAQ,OAAO;AACf,YAAY,OAAO,EAAE,KAAK;AAC1B,YAAY,KAAK,EAAE;AACnB,SAAS;AACT,IAAI;AACJ;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DexEditorPlugin = registerPlugin('DexEditorPlugin', {\n web: () => import('./web').then((m) => new m.DexEditorPluginWeb()),\n});\nexport * from './definitions';\nexport { DexEditorPlugin };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\n/**\n * Web 平台实现(仅用于开发调试,实际功能需要 Android 原生)\n */\nexport class DexEditorPluginWeb extends WebPlugin {\n async execute(options) {\n console.warn('DexEditorPlugin: Web platform is not supported for DEX editing');\n console.log('Action:', options.action, 'Params:', options.params);\n return {\n success: false,\n error: 'DEX editing is only available on Android platform'\n };\n }\n async openSmaliEditor(_options) {\n console.warn('DexEditorPlugin: Native Smali editor is only available on Android');\n return {\n success: false,\n cancelled: true\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;AAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACtE,CAAC;;ACFD;AACA;AACA;AACO,MAAM,kBAAkB,SAASC,cAAS,CAAC;AAClD,IAAI,MAAM,OAAO,CAAC,OAAO,EAAE;AAC3B,QAAQ,OAAO,CAAC,IAAI,CAAC,gEAAgE,CAAC;AACtF,QAAQ,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC;AACzE,QAAQ,OAAO;AACf,YAAY,OAAO,EAAE,KAAK;AAC1B,YAAY,KAAK,EAAE;AACnB,SAAS;AACT,IAAI;AACJ,IAAI,MAAM,eAAe,CAAC,QAAQ,EAAE;AACpC,QAAQ,OAAO,CAAC,IAAI,CAAC,mEAAmE,CAAC;AACzF,QAAQ,OAAO;AACf,YAAY,OAAO,EAAE,KAAK;AAC1B,YAAY,SAAS,EAAE;AACvB,SAAS;AACT,IAAI;AACJ;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -17,6 +17,13 @@ var capacitorDexEditorPlugin = (function (exports, core) {
|
|
|
17
17
|
error: 'DEX editing is only available on Android platform'
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
+
async openSmaliEditor(_options) {
|
|
21
|
+
console.warn('DexEditorPlugin: Native Smali editor is only available on Android');
|
|
22
|
+
return {
|
|
23
|
+
success: false,
|
|
24
|
+
cancelled: true
|
|
25
|
+
};
|
|
26
|
+
}
|
|
20
27
|
}
|
|
21
28
|
|
|
22
29
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DexEditorPlugin = registerPlugin('DexEditorPlugin', {\n web: () => import('./web').then((m) => new m.DexEditorPluginWeb()),\n});\nexport * from './definitions';\nexport { DexEditorPlugin };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\n/**\n * Web 平台实现(仅用于开发调试,实际功能需要 Android 原生)\n */\nexport class DexEditorPluginWeb extends WebPlugin {\n async execute(options) {\n console.warn('DexEditorPlugin: Web platform is not supported for DEX editing');\n console.log('Action:', options.action, 'Params:', options.params);\n return {\n success: false,\n error: 'DEX editing is only available on Android platform'\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;IAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACtE,CAAC;;ICFD;IACA;IACA;IACO,MAAM,kBAAkB,SAASC,cAAS,CAAC;IAClD,IAAI,MAAM,OAAO,CAAC,OAAO,EAAE;IAC3B,QAAQ,OAAO,CAAC,IAAI,CAAC,gEAAgE,CAAC;IACtF,QAAQ,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC;IACzE,QAAQ,OAAO;IACf,YAAY,OAAO,EAAE,KAAK;IAC1B,YAAY,KAAK,EAAE;IACnB,SAAS;IACT,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DexEditorPlugin = registerPlugin('DexEditorPlugin', {\n web: () => import('./web').then((m) => new m.DexEditorPluginWeb()),\n});\nexport * from './definitions';\nexport { DexEditorPlugin };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\n/**\n * Web 平台实现(仅用于开发调试,实际功能需要 Android 原生)\n */\nexport class DexEditorPluginWeb extends WebPlugin {\n async execute(options) {\n console.warn('DexEditorPlugin: Web platform is not supported for DEX editing');\n console.log('Action:', options.action, 'Params:', options.params);\n return {\n success: false,\n error: 'DEX editing is only available on Android platform'\n };\n }\n async openSmaliEditor(_options) {\n console.warn('DexEditorPlugin: Native Smali editor is only available on Android');\n return {\n success: false,\n cancelled: true\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,eAAe,GAAGA,mBAAc,CAAC,iBAAiB,EAAE;IAC1D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IACtE,CAAC;;ICFD;IACA;IACA;IACO,MAAM,kBAAkB,SAASC,cAAS,CAAC;IAClD,IAAI,MAAM,OAAO,CAAC,OAAO,EAAE;IAC3B,QAAQ,OAAO,CAAC,IAAI,CAAC,gEAAgE,CAAC;IACtF,QAAQ,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC;IACzE,QAAQ,OAAO;IACf,YAAY,OAAO,EAAE,KAAK;IAC1B,YAAY,KAAK,EAAE;IACnB,SAAS;IACT,IAAI;IACJ,IAAI,MAAM,eAAe,CAAC,QAAQ,EAAE;IACpC,QAAQ,OAAO,CAAC,IAAI,CAAC,mEAAmE,CAAC;IACzF,QAAQ,OAAO;IACf,YAAY,OAAO,EAAE,KAAK;IAC1B,YAAY,SAAS,EAAE;IACvB,SAAS;IACT,IAAI;IACJ;;;;;;;;;;;;;;;"}
|