@mearl/client 2.20.3 → 2.20.5
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/dist/check.d.ts +2 -0
- package/dist/check.js +7 -0
- package/dist/commands.d.ts +9 -1
- package/dist/commands.js +11 -1
- package/dist/generated-app-profile-definition.d.ts +130 -0
- package/dist/generated-app-profile-definition.js +448 -0
- package/dist/generated-app-profile-runtime-types.d.ts +209 -0
- package/dist/generated-app-profile-runtime-types.js +1 -0
- package/dist/generated-browser-action-protocol.d.ts +8 -3
- package/dist/nativeHost.d.ts +21 -0
- package/dist/nativeHost.js +107 -0
- package/dist/plugin.d.ts +6 -0
- package/dist/plugin.js +15 -3
- package/dist/pluginAppProfiles.d.ts +6 -0
- package/dist/pluginAppProfiles.js +40 -0
- package/dist/pluginPageBundle.js +12 -1
- package/dist/pluginRegistry.d.ts +8 -0
- package/dist/pluginRegistry.js +32 -0
- package/dist/pythonPlugin.d.ts +1 -0
- package/dist/pythonPlugin.js +8 -3
- package/package.json +7 -3
package/dist/pythonPlugin.js
CHANGED
|
@@ -157,14 +157,16 @@ try:
|
|
|
157
157
|
raise TypeError("入口的 description 必须为字符串")
|
|
158
158
|
if plugin_toolbox is not None and not isinstance(plugin_toolbox, dict):
|
|
159
159
|
raise TypeError("入口的 toolbox 必须为对象")
|
|
160
|
+
plugin_app_profiles = getattr(module, "appProfiles", None)
|
|
160
161
|
register = getattr(module, "register", None)
|
|
161
|
-
if not callable(register):
|
|
162
|
+
if not callable(register) and plugin_app_profiles is None:
|
|
162
163
|
raise TypeError("入口必须导出 register(app) 函数")
|
|
163
164
|
|
|
164
165
|
app = _App(options)
|
|
165
|
-
|
|
166
|
+
if callable(register):
|
|
167
|
+
_resolve(register(app))
|
|
166
168
|
app.registering = False
|
|
167
|
-
if not app.commands:
|
|
169
|
+
if not app.commands and plugin_app_profiles is None:
|
|
168
170
|
raise RuntimeError("入口未注册任何命令")
|
|
169
171
|
|
|
170
172
|
descriptor = {
|
|
@@ -180,6 +182,8 @@ try:
|
|
|
180
182
|
descriptor["description"] = plugin_description
|
|
181
183
|
if plugin_toolbox is not None:
|
|
182
184
|
descriptor["toolbox"] = plugin_toolbox
|
|
185
|
+
if plugin_app_profiles is not None:
|
|
186
|
+
descriptor["appProfiles"] = plugin_app_profiles
|
|
183
187
|
_send(descriptor)
|
|
184
188
|
|
|
185
189
|
if mode == "run":
|
|
@@ -251,6 +255,7 @@ function parseDescriptor(message) {
|
|
|
251
255
|
...(typeof message.name === 'string' ? { name: message.name } : {}),
|
|
252
256
|
...(typeof message.description === 'string' ? { description: message.description } : {}),
|
|
253
257
|
...(message.toolbox !== undefined ? { toolbox: message.toolbox } : {}),
|
|
258
|
+
...(message.appProfiles !== undefined ? { appProfiles: message.appProfiles } : {}),
|
|
254
259
|
};
|
|
255
260
|
}
|
|
256
261
|
function bridgedError(message) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mearl/client",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.5",
|
|
4
4
|
"description": "Unified Mearl SDK & CLI for local and remote browsers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,6 +26,10 @@
|
|
|
26
26
|
"types": "./dist/check.d.ts",
|
|
27
27
|
"import": "./dist/check.js"
|
|
28
28
|
},
|
|
29
|
+
"./native-host": {
|
|
30
|
+
"types": "./dist/nativeHost.d.ts",
|
|
31
|
+
"import": "./dist/nativeHost.js"
|
|
32
|
+
},
|
|
29
33
|
"./cli": {
|
|
30
34
|
"types": "./dist/cli.d.ts",
|
|
31
35
|
"import": "./dist/cli.js"
|
|
@@ -59,8 +63,8 @@
|
|
|
59
63
|
"commander": "^15.0.0",
|
|
60
64
|
"fastest-levenshtein": "^1.0.16",
|
|
61
65
|
"ws": "^8.18.0",
|
|
62
|
-
"@mearl/cloud-types": "2.20.
|
|
63
|
-
"@mearl/provider": "2.20.
|
|
66
|
+
"@mearl/cloud-types": "2.20.5",
|
|
67
|
+
"@mearl/provider": "2.20.5"
|
|
64
68
|
},
|
|
65
69
|
"devDependencies": {
|
|
66
70
|
"@types/node": "^24.9.1",
|