Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add beta for testing and npm available #1883

Merged
merged 8 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/index.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'node:path';
import {fileURLToPath} from 'node:url';

import {BasePlugin} from 'appium/plugin.js';
import {BasePlugin} from '@appium/base-plugin';
Copy link
Member Author

@KazuCocoa KazuCocoa Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only this way fixed:

[Appium] Could not load plugin 'inspector', so it will not be available. Error in loading the plugin was: Cannot find package 'appium' imported from /Users/kazu/.appium/node_modules/appium-inspector-plugin/index.mjs
[Appium] Error: Cannot find package 'appium' imported from /Users/kazu/.appium/node_modules/appium-inspector-plugin/index.mjs
    at packageResolve (node:internal/modules/esm/resolve:854:9)
    at moduleResolve (node:internal/modules/esm/resolve:927:18)
    at defaultResolve (node:internal/modules/esm/resolve:1169:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:540:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:509:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:239:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:96:40)
    at link (node:internal/modules/esm/module_job:95:36)
[Appium] Welcome to Appium v2.14.1 (REV bab86d5de571015b63fd8fc30b47bbe072a1290e)
[Appium] Non-default server args:

error...

appium plugin install --source=npm [email protected]

is only import {BasePlugin} from 'appium/plugin.js'; and peerDependencies. No "@appium/base-plugin": "^2.3.0" but appium --use-plugins=inspector--allow-cors cased error the above.

Latest appium plugin install --source=npm [email protected] is this current PR's latest.

(I know ideally we'd like to use import {BasePlugin} from 'appium/plugin.js'; only with peerDependencies)

const PLUGIN_ROOT_PATH = '/inspector';
const INDEX_HTML = 'index.html';
const ROOT_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), 'dist-browser');
Expand Down
9 changes: 6 additions & 3 deletions plugins/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "appium-inspector-plugin",
"version": "2024.12.1",
"version": "2024.12.1-beta.10",
"description": "An app inspector for use with an Appium server",
"repository": {
"type": "git",
Expand All @@ -23,7 +23,8 @@
"exports": {
".": {
"import": "./index.mjs"
}
},
"./package.json": "./package.json"
},
"peerDependencies": {
"appium": "^2.0.0"
Expand All @@ -34,7 +35,9 @@
"dist-browser",
"README.md"
],
"dependencies": {},
"dependencies": {
"@appium/base-plugin": "^2.3.0"
},
"devDependencies": {},
"engines": {
"node": ">=20.x",
Expand Down
Loading