{"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: .lintstagedrc.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nmodule.exports = {\n '*.(js|ts)': ['eslint --fix', 'prettier --write'],\n 'appium-config-schema.js': () => [\n 'npm run --workspace=./packages/schema build',\n 'git add -A packages/schema/lib/appium-config.schema.json',\n 'npm run --workspace=./packages/types build',\n 'git add -A packages/types/lib/appium-config.ts',\n ],\n '!(package|package-lock)*.json': ['prettier --write'],\n};\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: .mocharc.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\n'use strict';\n\nmodule.exports = {\n require: ['ts-node/register'],\n // forbids use of .only() in CI\n forbidOnly: Boolean(process.env.CI),\n color: true,\n timeout: '5s',\n};\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: .renovaterc.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n \"extends\": [\"github>appium/appium//renovate/default\"],\n \"schedule\": [\n \"after 10pm\",\n \"before 5:00am\"\n ],\n \"timezone\": \"America/Vancouver\"\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: CHANGELOG.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n# Aggregate Changelog\n\nThe Appium monorepo contains many different modules and supports a variety of drivers, plugins and clients,\nmost of which have their own changelogs. Links to these individual changelogs are aggregated here.\n\n## Main Appium Module\n\n* ### [Appium Changelog](packages/appium/CHANGELOG.md)\n* [Appium 1.x Changelog](https://github.com/appium/appium/blob/1.x/CHANGELOG.md)\n\n## Drivers / Clients\nRefer to the [Appium Ecosystem](https://appium.io/docs/en/latest/ecosystem/) page for links\nto driver/client documentation\n\n## Plugins\n* [execute-driver-plugin](packages/execute-driver-plugin/CHANGELOG.md)\n* [images-plugin](packages/images-plugin/CHANGELOG.md)\n* [relaxed-caps-plugin](packages/relaxed-caps-plugin/CHANGELOG.md)\n* [storage-plugin](packages/storage-plugin/CHANGELOG.md)\n* [universal-xml-plugin](packages/universal-xml-plugin/CHANGELOG.md)\n\n## Other Modules\n* [base-driver](packages/base-driver/CHANGELOG.md)\n* [base-plugin](packages/base-plugin/CHANGELOG.md)\n* [docutils](packages/docutils/CHANGELOG.md)\n* [driver-test-support](packages/driver-test-support/CHANGELOG.md)\n* [eslint-config-appium-ts](packages/eslint-config-appium-ts/CHANGELOG.md)\n* [fake-driver](packages/fake-driver/CHANGELOG.md)\n* [fake-plugin](packages/fake-plugin/CHANGELOG.md)\n* [logger](packages/logger/CHANGELOG.md)\n* [opencv](packages/opencv/CHANGELOG.md)\n* [plugin-test-support](packages/plugin-test-support/CHANGELOG.md)\n* [schema](packages/schema/CHANGELOG.md)\n* [strongbox](packages/strongbox/CHANGELOG.md)\n* [support](packages/support/CHANGELOG.md)\n* [test-support](packages/test-support/CHANGELOG.md)\n* [tsconfig](packages/tsconfig/CHANGELOG.md)\n* [types](packages/types/CHANGELOG.md)\n\n## Removed Modules\nThe changelog links used for these modules lead to the last version of their changelog file.\n* [doctor](https://github.com/appium/appium/blob/8daf5e123ac14c8325acf504fb33eb28e1a3dd78/packages/doctor/CHANGELOG.md) ([removal PR](https://github.com/appium/appium/pull/20805))\n* [eslint-config-appium](https://github.com/appium/appium/blob/4b3a8c2197a587ec5a2606b662e4e7667a7852cb/packages/eslint-config-appium/CHANGELOG.md) ([removal PR](https://github.com/appium/appium/pull/20856))\n* [gulp-plugins](https://github.com/appium/appium/blob/0823f0b60e40395cd1dc3b72cfa3c0092bc81302/packages/gulp-plugins/CHANGELOG.md) ([removal PR](https://github.com/appium/appium/pull/17943))\n* [typedoc-plugin-appium](https://github.com/appium/appium/blob/d6204b6902074210943d7bbbf72d139b9b170a20/packages/typedoc-plugin-appium/CHANGELOG.md) ([removal PR](https://github.com/appium/appium/pull/19465))\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: CONDUCT.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n## Code of Conduct\n\n### What is this code of conduct for?\n\nAppium is a piece of technology, but **the core of the Appium community is the people in it**. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, gender identity and expression, sexual orientation, ability, physical appearance, body size, race, age, socioeconomic status, religion (or lack thereof), or other marginalized aspect of community members. We expect all members of the Appium community to abide by this Code of Conduct whenever interacting in Appium venues (pull requests, GitHub issues, 1-1 or group chat, meetups, conferences, etc...)\n\n### Examples of inappropriate behavior\n\nBecause we come from a variety of backgrounds, we don't want to assume that everyone has the same assumptions about what is and isn't appropriate. Here are some examples of inappropriate behavior that are incompatible with our community's ethos:\n\n* Spamming, trolling, intentionally disrupting conversations, or irrelevant solicitation or advertisement\n* Making demeaning or discriminatory comments\n* Making negative assumptions about someone's background, abilities, or intentions\n* Harassing or stalking individuals (online or in person)\n* Giving someone unwelcome sexual attention or making unwelcome physical contact (in the case of an IRL event)\n* Sharing sexual images or using sexually explicit language\n\nIn general: treat others how you would like to be treated, were you in their place. Don't be a jerk. _Do_ ask questions. _Do_ keep conflicts productively focused on technical issues. _Do_ think before you speak; remember that what is perceived as a funny witticism in your group of friends might be hurtful or reinforce hurtful stereotypes in the context of our diverse online community. _Do_ remember that we are all people, not robots, and all equally deserving of sensitivity and respect. (If and when robots join our community, let's treat them with respect too!)\n\n\n### What will organizers do about inappropriate behavior?\n\nIf we notice you doing or saying something inappropriate, an organizer will explain why it's inappropriate and ask you to stop. We won't demonize or vilify you. But please do stop the inappropriate behavior so we can get back to writing and discussing code in a safe environment. If you have philosophical disagreements about what's actually inappropriate, please take them to a separate public or private conversation with an Appium maintainer so we don't turn pull requests into an ethics debate.\n\nIf you keep doing unacceptable things, we'll likely ban you, report you to GitHub, or take other appropriate action.\n\n### What if I see or am subject to what feels like inappropriate behavior?\n\nLet us know! Please notify a community organizer as soon as possible. Full contact information is listed in the [Contact Info](#contact-info) section of this document. All communications will be kept strictly confidential, unless otherwise required by law. No issue will be considered too inconsequential or unimportant for us to have a conversation about.\n\n### Contact Info\n\nIf you need to report an incident, please contact any of the following organizers directly:\n\n* Isaac Murchie [email](mailto:isaac@saucelabs.com) [twitter](https://twitter.com/imurchie)\n* Jonathan Lipps [email](mailto:jlipps@saucelabs.com) [twitter](https://twitter.com/jlipps)\n\n### Credit, License, and Attribution\n\nThis Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).\n\nIt's inspired among other things by:\n* [Citizen Code of Conduct](http://citizencodeofconduct.org/)\n* [npmjs](https://www.npmjs.com/policies/conduct)\n* [Geek Feminism](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy)\n* [Ashe Dryden](http://www.ashedryden.com/blog/codes-of-conduct-101-faq)\n* [Model View Culture](https://modelviewculture.com/issues/events)\n* [Open Source & Feelings](http://osfeels.com/conduct).\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: GOVERNANCE.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n# Appium Project Governance\n\nThe Appium Project wants as much as possible to operate using procedures that\nare fair, open, inviting, and ultimately good for the community. For that\nreason we find it valuable to codify some of the ways that the Project goes\nabout its day-to-day business. We want to make sure that no matter who you are,\nyou have the opportunity to contribute to Appium. We want to make sure that no\none corporation can exert undue influence on the community or hold the Project\nhostage. And likewise we want to make sure that corporations which benefit from\nAppium are also incentivized to give back.\n\n### The Technical Committee\n\nThe project is officially led by a Technical Committee (TC), currently\nconsisting of:\n\n* [@jlipps](https://github.com/jlipps)\n* [@mykola-mokhnach](https://github.com/mykola-mokhnach)\n* [@eglitise](https://github.com/eglitise)\n* [@KazuCocoa](https://github.com/KazuCocoa)\n\nThey all represent different companies and different types of contribution to\nthe Appium Project. The TC is responsible for high-level decisions (like\nestablishing a feature roadmap, accepting sponsorship, organizing conferences,\netc...), adjudicating conflicts between members of the community, and making\nchanges to the project's governance processes.\n\n* Membership in the TC is granted by unanimous vote of current TC members.\n* TC members can step down at any time.\n* No more than 1/3 (or 2, whichever is higher) of TC members may belong to the same company.\n* Changes to project governance require unanimous vote of the TC.\n\n### Project Committers\n\nMost of the project maintenance is handled by committers, community members who\nhave been granted commit access to the Appium organization on GitHub. The\nresponsibilities of committers include: reviewing and merging pull requests,\nwalking through changes with developers, weighing in on architectural issues,\nand so on.\n\n* Any two TC members can decide to make someone a project committer, providing that person has shown an appropriate understanding of the Appium codebase through prior contributions of code.\n* In general any committer can review and merge a PR. In general committers should only merge code they are qualified to review, which might entail pinging another committer who has greater ownership over a specific code area.\n* Debates between committers about whether code should be merged should happen in GitHub pull requests.\n* Proposals for large changes to the project's code (architectural changes, etc...) should be brought forward as a GitHub issue (with the label `Proposal`), and all committers should be pinged so they can weigh in on the discussion if desired. Substantial changes, whether in proposal stage or in pull request stage should be signed off on by 1 TC member and at least 2 other committers. To assist in the discussion, a small proof of concept can be undertaken on a subset of the Appium ecosystem and raised as a strawman PR, to give flesh to the proposal and make discussion more helpfully concrete.\n* In general disputes about code should be resolved by discussion, not votes. If there is substantial disagreement, aim for consensus. If that is not possible, committers can bring the dispute to the TC for a vote, with the outcome determined by a majority.\n* Any committer can decide to close a PR or issue if they determine the change doesn't suit the project.\n* Appium has a large ecosystem of repositories. Some are 'core' in the sense of being central subpackages with a lot of traffic like `appium/appium` or `appium/appium-ios-driver`. Others are 'peripheral' in the sense of receiving few changes, being maintained by 1 person or no one, etc..., like `appium/ruby_lib` or `appium/appium_thor` For 'core' repos, committers should not merge their own code straightaway. Like all contributors they should open a PR and get a +1 from another committer. For 'peripheral' repos for which they are the sole maintainer or for which they have a good understanding, it is obtuse to insist on another contributor's +1 and this rule should be relaxed in that case. In sum: use good judgment and don't ram code through without a review when you can help it.\n\nThe current committers are (along with their primary areas(s) of ownership or maintenance):\n\n* [@dan-maor](https://github.com/Dan-Maor) - XCUITest driver and iOS internals\n* [@dor-bl](https://github.com/Dor-bl) - DotNet client\n* [@eglitise](https://github.com/eglitise) - Appium server, Inspector\n* [@jlipps](https://github.com/jlipps) - Appium server, Inspector\n* [@kazucocoa](https://github.com/KazuCocoa) - all Appium projects\n* [@laolubenson](https://github.com/laolubenson) - DotNet client\n* [@mwakizaka](https://github.com/mwakizaka) - XCUITest driver\n* [@mykola-mokhnach](https://github.com/mykola-mokhnach) - all Appium projects\n* [@rerorero](https://github.com/rerorero) - XCUITest/UIA2 driver\n* [@saikrishna321](https://github.com/saikrishna321) - Java client\n* [@srinivasantarget](https://github.com/SrinivasanTarget) - Java client\n* [@tomriddly](https://github.com/tomriddly) - appium-ios-device\n* [@valfirst](https://github.com/valfirst) - Java client\n\nSee [Emeritus Contributors](#emeritus-contributors) below for a list of people who formerly made\nsignificant contributions to the project but are no longer actively committing.\n\n### Other Contributors\n\nOther, less formal, kinds of contribution are outlined in our [Contributing Guide](https://appium.io/docs/en/latest/contributing/).\nWe also very much appreciate those who spend their valuable time assisting with the [Appium forums](https://discuss.appium.io).\nCurrent high-level forum contributors and mods include:\n\n* [aleksei](https://discuss.appium.io/u/aleksei/summary)\n* [wreed](https://discuss.appium.io/u/wreed/summary)\n\n### Sponsorship\n\nThe Appium project welcomes the sponsorship of individuals and organizations. There are two types\nof sponsorship: those related to contributions of Appium maintenance and leadership, and those\nrelated to contributions of funds. Both are extremely important to the ongoing health of the\nproject. Financial sponsorship is mediated through our [OpenCollective page](https://opencollective.com/appium).\nSponsorship tiers and benefits are described below:\n\n- **Development Partners**: The primary need of any open source project is for sustained maintenance and contributorship. Companies that officially sponsor such development with dedicated employee time are recognized as Development Partners, and receive the same benefits as the highest tier of financial sponsorship. To be considered a Development Partner, a company must devote at least 50% of a full-time employee's time to Appium maintenance. This means that the contributors designated by the company must have been appointed as \"committers\" in good standing of one or more core Appium repositories. (See above for a description of how to become a committer).\n- **Strategic Partners**: Representing the highest tier of ongoing financial support for the project, Strategic Partners are what make our compensation scheme for contributors possible, and we thank them for their significant investment into the project! More than financial contribution, Strategic Partners help elevate Appium's position in the industry through marketing and evangelism efforts, and partner with the Appium team to help make Appium better. Along with the Development Partners, Strategic Partners have their logos displayed prominently on our website, and have the ability to link to their Appium-related products in a few relevant places in our documentation.\n- **Gold, Silver, and Bronze Sponsors**: these sponsorship levels correspond to different amounts of recurring financial contribution that generously support our contributor compensation scheme. Sponsors at these levels also have the opportunity to display their logo on our website.\n- **Backers**: individuals who benefit from the Appium project can also donate on a one-time or recurring basis, at any amount, and will be recognized as Backers for their contribution!\n\nTo become a sponsor at one of these levels, follow the process indicated at the [OpenCollective\npage](https://opencollective.com/appium).\n\n### Compensation Scheme\n\nWith funds received through sponsorship, the Appium project wants to incentivize contributions of\ncode, documentation efforts, maintenance, and project leadership. We have developed a scheme\n(inspired by one developed at the [WebdriverIO](https://github.com/webdriverio/webdriverio)\nproject) for disbursing funds on a monthly basis to those who contribute to the project, as well as\nsome other \"upstream\" open source projects.\n\nEach month, 15% of sponsorship funds received will be donated to upstream projects, based on the\ndiscretion of the current TC. At this point, no attempt will be made to formalize quantitative\nnotions of relevance. If you manage a project upstream of Appium and would like to be considered as\npart of this donation group, give us a shout!\n\nOf the remaining 85% of sponsorship funds, 70% (roughly 60% of the original total) will go to\nproject Committers (i.e., those in a role of maintenance), and 30% (roughly 25% of the original\ntotal) will go to Contributors (i.e., those making one-off or periodic contributions). The way that\nCommitters and Contributors are paid for their efforts differs.\n\nFor Committers, each Committer will keep a monthly time sheet of hours contributed to the project.\nAt the end of each month, the hours tracked from all Committers will be totalled, and then the\nCommitter-allocated funds will be disbursed (via OpenCollective) on a pro rata basis. Within this\nscheme, Committers agree not to submit hours worked as part of their employment with a Development\nPartner (since this is part of the \"sponsorship\" contribution of the Development Partner).\n\nFor Contributors, when they make contributions which are successfully merged into the project,\na Committer can discretionarily assign a \"value tier\" to the contribution. The \"value tiers\" and\ncorresponding payouts are as follows:\n\n- XS: a trivial change (e.g. a typo change or applying of an automatically suggested security\npatch). \\$0.\n- S: a small but useful change. \\$25.\n- M: a medium-small or slightly more complex change. \\$50.\n- L: a very valuable or sizable change. \\$100.\n- XL: a massive change or set of changes. \\$500.\n\nAt the end of each month, Committers will total up the number of changes receiving potential\npayout. If the total amount of funds allocated for Contributor payout exceeds the total amount to\nbe paid, then each Contributor will receive an OpenCollective link to claim their funds. If not\nenough funds exist to cover all payouts, then the payout amounts will be scaled down in a pro rata\nfashion.\n\nThe scope for Committer or Contributor payouts is work completed within any \"core\" Appium\nrepository (i.e., those officially maintained by the Appium team, residing within the Appium\norganization on GitHub, under `https://github.com/appium`).\n\nSome disclaimers: Payments will happen exclusively via OpenCollective. Recipients of funds are\nresponsible for maintaining their OpenCollective account in a fashion where funds can be disbursed,\nand are responsible for any and all tax, financial, or legal consequences of receiving money in\nthis way. Receipt of funds from this scheme holds the Appium project and the OpenJS Foundation free\nof any claim or obligation. While this document exists to clearly and publicly lay out the terms\nunder which payments are generally made, the TC retains the right to grant or withhold funding on\na discretionary of special basis. Basically, this scheme is run at the project's discretion, and is\nnot a public service. Making contributions to the project under this scheme does not obligate the\nproject to pay you for such work, or otherwise compensate you in any way.\n\n### Raising Issues Related to Governance\n\nThis governance model necessarily leaves many situations unspecified. If\nquestions arise as to how a given situation should proceed according to the\noverall goals of the project, the best thing to do is to open a GitHub issue\nand ping the TC members.\n\n### Emeritus Contributors\n\n* [@aluedeke](https://github.com/aluedeke)\n* [@astro03](https://github.com/Astro03)\n* [@bayandin](https://github.com/bayandin)\n* [@boneskull](https://github.com/boneskull)\n* [@bootstraponline](https://github.com/bootstraponline)\n* [@dandoveralba](https://github.com/dandoveralba)\n* [@ddkjin](https://github.com/ddkjin)\n* [@drpy](https://github.com/drpy)\n* [@dylanLacey](https://github.com/DylanLacey)\n* [@filmaj](https://github.com/filmaj)\n* [@gempesaw](https://github.com/gempesaw)\n* [@hugs](https://github.com/hugs)\n* [@imurchie](https://github.com/imurchie)\n* [@jamieEdge](https://github.com/JamieEdge)\n* [@jdeff](https://github.com/jdeff)\n* [@jonahss](https://github.com/Jonahss)\n* [@maudineormsby](https://github.com/maudineormsby)\n* [@moizjv](https://github.com/moizjv)\n* [@peepa](https://github.com/peepa)\n* [@penguinho](https://github.com/penguinho)\n* [@sbonebrake](https://github.com/sbonebrake)\n* [@scottdixon](https://github.com/scottdixon)\n* [@sebv](https://github.com/sebv)\n* [@sravanmedarapu](https://github.com/sravanmedarapu)\n* [@stuartbrussell-intuit](https://github.com/stuartbrussell-intuit)\n* [@tikhomirovSergey](https://github.com/TikhomirovSergey)\n* [@titusfortner](https://github.com/titusfortner)\n* [@vgrigoruk](https://github.com/vgrigoruk)\n* [@vmaxim](https://github.com/vmaxim)\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: IDEAS.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nGoogle Summer of Code Ideas\n=====\n\nAppium is excited to participate as a [Google Summer of Code](https://summerofcode.withgoogle.com/) sponsor project. Here's a fun list of ideas that a Summer of Code student participant can use as a foundation for thinking about what to contribute to Appium!\n\n|Idea|Description|\n|----|-----------|\n|Apple tvOS Support|Our users have been asking for an Appium driver for Apple tvOS apps. Is this possible? We're not entirely sure! Why not be awesome and build it?|\n|Test App revamp|Appium uses a number of poorly-designed mobile applications in its own testing. We have to use a variety of apps because we need to test that Appium can automate all the various controls and platform features that mobile vendors provide. Really what we need is one cross-platform app (or one app per platform) that exhibit all and only the features we need to test. This would be a fun project to build some mobile apps used for testing and also demoing Appium at events and in training videos, etc...|\n|Tooling and Performance|We haven't instrumented Appium with very many performance metrics, and don't really know if we're missing some low-hanging fruit in terms of performance. Maybe you can help us do that?|\n|Babel|We have a lot of repos, and they're all on a really old version of Babel. They all need to stay in sync. How can we make this situation better, and upgrade to the latest and greatest?|\n|Unity3d Driver|Historically, Appium hasn't been great at automating games. We don't have any particular support for the frameworks used to create games. Unity is a popular one, for example. What if we could write an Appium driver that talked to an embedded process in a test version of a Unity game, that allowed us to find and interact with 3d elements? It would be amazing! You can also be amazing and lead Appium into this new world.|\n|Testing the Internet of Things|Appium's architecture makes it dead simple to integrate drivers for automating new technologies. What about _really_ new technologies like IoT devices? Help to redefine the semantics of the WebDriver protocol for use with IoT, and build a driver for an IoT device to prove it out.|\n|Driver for X|Have an idea of something else Appium could automate that it doesn't already? Build a driver for it! This would involve some awesome Node.js code, plus whatever else is needed to integrate with the platform you have in mind.|\n\nHopefully this gives you some ideas of fun projects that would be substantial and long-lasting contributions to the Appium community.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: README.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n

\n \n \"Appium\"\n \n

\n

\n Cross-platform test automation for native, hybrid, mobile web and desktop apps.\n

\n\n
\n\n[![NPM version](https://badge.fury.io/js/appium.svg)](https://npmjs.org/package/appium)\n[![Monthly Downloads](https://img.shields.io/npm/dm/appium.svg)](https://npmjs.org/package/appium)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium?ref=badge_shield)\n[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/)\n[![CeasefireInGaza](https://img.shields.io/badge/Ceasefire_Now-%F0%9F%87%B5%F0%9F%87%B8-red?style=flat)](https://www.unrwa.org/)\n\n
\n\n***\n\n

\n Documentation |\n Get Started |\n Ecosystem |\n Changelog |\n Contributing Guide |\n Discussion Forum\n

\n\n***\n\nAppium is an open-source automation framework that provides\n[WebDriver](https://www.w3.org/TR/webdriver/)-based automation possibilities for a wide range of\ndifferent mobile, desktop and IoT platforms. Appium is modular and extensible, and supports multiple\nprogramming languages, which means there is an entire ecosystem of related software:\n* [__Drivers__](#drivers) add support for automating specific platforms\n* [__Clients__](#clients) allow writing Appium tests in your programming language of choice\n* [__Plugins__](#plugins) allow to further extend Appium functionality\n\n## Upgrading From Older Versions\n\nThe Appium team only provides support for the most recent version of Appium. If you wish to upgrade from\nan older major Appium version, please refer to the migration guides:\n\n* [Appium v2 to v3](https://appium.io/docs/en/latest/guides/migrating-2-to-3/)\n* [Appium v1 to v2](https://appium.io/docs/en/latest/guides/migrating-1-to-2/)\n\n## Installation\n\nAppium can be installed using `npm` (other package managers are not currently supported). Please\ncheck the [installation docs](http://appium.io/docs/en/latest/quickstart/install/) for the\nsystem requirements and further information.\n\nIf upgrading from Appium 1, make sure Appium 1 is fully uninstalled (`npm uninstall -g appium`).\nUnexpected errors might appear if this has not been done.\n\n```bash\nnpm i -g appium\n```\n\nNote that this will only install the core Appium server, which cannot automate anything on its own.\nPlease install [drivers](#drivers) for your target platforms in order to automate them.\n\n## Drivers\n\nAppium supports app automation across a variety of platforms, like iOS, Android, macOS, Windows,\nand more. Each platform is supported by one or more \"drivers\", which know how to automate that\nparticular platform. You can find a full list of officially-supported and third-party drivers in\n[Appium Ecosystem's Drivers page](http://appium.io/docs/en/latest/ecosystem/drivers/).\n\nDriver management is done using [Appium's Extension command-line interface](http://appium.io/docs/en/latest/cli/extensions/):\n\n```bash\n# Install an official driver from npm (see documentation for a list of such drivers)\nappium driver install \n# Install any driver from npm\nappium driver install --source=npm \n# See documentation for installation from other sources\n\n# List already installed drivers\nappium driver list --installed\n# Update a driver (it must be already installed)\n# This will NOT update the major version, in order to prevent breaking changes\nappium driver update \n# Update a driver to the most recent version (may include breaking changes)\nappium driver update --unsafe\n# Uninstall a driver (it won't last forever, will it?)\nappium driver uninstall \n```\n\n## Clients\n\nClient libraries enable writing Appium tests in different programming languages. There are\nofficially-supported clients for Java, Python, Ruby, and .NET C#, as well as third-party clients\nfor other languages. You can find a full list of clients in\n[Appium Ecosystem's Clients page](http://appium.io/docs/en/latest/ecosystem/clients/).\n\n## Plugins\n\nPlugins allow you to extend server functionality without changing the server code. The main\ndifference between drivers and plugins is that the latter must be explicitly enabled on\nAppium server startup (all installed drivers are enabled by default):\n\n```bash\nappium --use-plugins=\n```\n\nYou can find a full list of officially-supported and third-party plugins in\n[Appium Ecosystem's Plugins page](http://appium.io/docs/en/latest/ecosystem/plugins/).\n\nSimilarly to drivers, plugin management is also done using\n[Appium's Extension command-line interface](http://appium.io/docs/en/latest/cli/extensions/):\n\n```bash\n# Install an official plugin from npm (see documentation for a list of such plugins)\nappium plugin install \n# Install any plugin from npm\nappium plugin install --source=npm \n# See documentation for installation from other sources\n\n# List already installed plugins\nappium plugin list --installed\n# Update a plugin (it must be already installed)\n# This will NOT update the major version, in order to prevent breaking changes\nappium plugin update \n# Update a plugin to the most recent version (may include breaking changes)\nappium plugin update --unsafe\n# Uninstall a plugin\nappium plugin uninstall \n```\n\n## Server Command Line Interface\n\nIn order to start sending commands to the Appium server, it must be running on the URL and port\nwhere your client library expects it to listen. [Appium's command-line interface](http://appium.io/docs/en/latest/cli/server/)\nis used to launch and configure the server:\n\n```bash\n# Start the server on the default host (0.0.0.0) and port (4723)\nappium server\n# You can also omit the 'server' subcommand\nappium\n# Start the server on the given host, port and use a custom base path prefix (the default prefix is '/')\nappium --address 127.0.0.1 --port 9000 --base-path /wd/hub\n```\n\nAppium supports execution of parallel server processes, as well as parallel driver sessions within a\nsingle server process. Refer the corresponding driver documentations regarding which mode is optimal\nfor the particular driver or whether it supports parallel sessions.\n\n## Why Appium?\n\n1. You usually don't have to recompile your app or modify it in any way, due to the use of standard\n automation APIs on all platforms.\n2. You can write tests with your favorite dev tools using any WebDriver-compatible language such as\n Java, Python, Ruby and C#. There are also third party client implementations for other languages.\n3. You can use any testing framework.\n4. Some drivers like `xcuitest` and `uiautomator2` have built-in mobile web and hybrid app support.\n Within the same script, you can switch seamlessly between native app automation and webview\n automation, all using the WebDriver model that's already the standard for web automation.\n5. You can run your automated tests locally and in a cloud. There are multiple cloud providers that\n support various Appium drivers (mostly targeting iOS and Android mobile automation).\n6. [Appium Inspector](https://github.com/appium/appium-inspector) can be used to visually inspect\n the page source of applications across different platforms, facilitating easier test development.\n\nInvesting in the [WebDriver](https://w3c.github.io/webdriver/webdriver-spec.html) protocol means you\nare betting on a single, free, and open protocol for testing that has become a web standard. Don't\nlock yourself into a proprietary stack.\n\nFor example, if you use Apple's XCUITest library without Appium, you can only write tests using\nObj-C/Swift, and you can only run tests through Xcode. Similarly, with Google's UiAutomator or\nEspresso, you can only write tests in Java/Kotlin. Appium opens up the possibility of true\ncross-platform native app automation, for mobile and beyond!\n\nIf you are looking for a more comprehensive description of what this is all about, please read our\ndocumentation on [How Does Appium Work?](https://appium.io/docs/en/latest/intro/appium/).\n\n## Sponsors\n\nAppium has a [Sponsorship Program](GOVERNANCE.md#sponsorship)! If you or your company uses Appium\nand wants to give back financially to the project, we use these funds to [encourage development and\ncontributions](GOVERNANCE.md#compensation-scheme), as well as support other open source projects we\nrely on. [Become a sponsor](https://opencollective.com/appium) via our OpenCollective page.\n\n### Development and Strategic Partners\n\nAppium is incredibly grateful to our Development and Strategic Partners for their sustained\ncontribution of project development and leadership!\n\n

\n \n \n \n \n \"Browserstack\"/\n \n \n

\n\n

\n \n \n \n \n \"TestMu\n \n \n

\n\n### Other Sponsors\n\nA full list of sponsors is available at our [Sponsors page](https://appium.io/docs/en/latest/sponsors/).\n\n## License\n\n[Apache-2.0](./LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium?ref=badge_large)\n\n`@appium/logger` package is under [ISC](./packages/logger/LICENSE) License.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: ROADMAP.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n# Roadmap\n\nThis is not a traditional roadmap. We don't have a typical product team with a typical product\nmanager. The fact that the items below exist on a roadmap is no indication that we will ever have\nthe opportunity to work on them. Instead this is more like a wishlist of outcomes that the project\nthinks would be valuable. If and when we get additional contributions of development work, this is\na set of items that would be great for someone to work on! Ideally, interested devs would find\nsomething on this list and own it from start to finish! Let anyone on the project know if you're\ninterested and we can help get you going.\n\n### Core projects\n- **WebDriver BiDi support in the Appium server**: the WebDriver BiDi spec is underway, which details a different method for communicating with drivers. We should implement handling for these methods in our server so that Appium drivers can take advantage of the BiDi spec without additional work on their part.\n- **Redevelop automatically generated command docs**: due to changing TypeDoc support and the departure of one of our team, we were forced to remove our TypeDoc-based automatic docs generation tool. It would be nice to bring this back in a more maintainable form!\n\n### Driver/platform-specific projects\n- **Better maintenance for our Android drivers**: we're looking for Android specialists to help maintain our Android drivers (UiAutomator2 and Espresso)\n- **Better maintenance for our iOS driver**: we're looking for iOS specialists to help maintain our XCUITest driver\n- **Better maintenance for [appium-ios-device](https://github.com/appium/appium-ios-device)**: this project is using outdated approaches and libraries. If it could be improved it would have a big impact on the performance of the XCUITest driver\n\n### Client library projects\n- **Selenium compatibility client updates**: we'd like to rearchitect our flagship Appium clients to extend rather than wrap Selenium clients, reducing the overall surface area of the Appium clients and making them work more closely with existing Selenium client functionality.\n\n### Appium Inspector projects\n- **Full support for web inspection**: currently the Appium Inspector has poor to no support for inspecing web pages (either mobile browsers or web content embedded in webviews). It's a common requirement to inspect web elements as part of writing Appium tests, and at the present time users are required to leave the Inspector and open up a browser's devtools.\n- **Record/Playback**: we have a basic record-to-code feature already. It would be nice to be able to save recorded steps and play them back with a little player/editor.\n- **Support for more platforms**: currently there is a fair bit of specialized handling for iOS and Android in the Appium inspector. Other platforms either work poorly or not at all with the Inspector. It would be great to establish a way for drivers to report all the information about how they work to the Inspector, so it can support any platform without needing special-cased code for it.\n- **Locator analysis and comparison**: it would be nice for users to get more information about the relative suitability of using different locators to find elements, as poor locator performance is a leading cause of Appium test instability.\n- **Dark theme**: for true hackers!\n- **Export/import of saved gestures**: it's currently not possible to port your saved gestures to other instances of the Inspector (i.e., to share with team members).\n- **Bulk export/import saved sessions**: would be nice to take your sessions and capabilities with you or to share with colleagues.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: SPONSORS.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n# Sponsors & Backers\n\nPlease check [Sponsors & Backers](https://appium.io/docs/en/latest/sponsors/)\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: lerna.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"$schema\": \"https://json.schemastore.org/lerna\",\n \"changelogPreset\": \"conventional-changelog-conventionalcommits\",\n \"command\": {\n \"add\": {\n \"exact\": true\n },\n \"publish\": {\n \"message\": \"chore: publish\"\n },\n \"run\": {\n \"concurrency\": 8\n },\n \"version\": {\n \"conventionalCommits\": true,\n \"createRelease\": \"github\",\n \"allowBranch\": [\"master\", \"appium3\"]\n }\n },\n \"ignoreChanges\": [\"**/test/**\", \"**/*.md\"],\n \"useNx\": false,\n \"version\": \"independent\"\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: package-lock.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"name\": \"appium-monorepo\",\n \"version\": \"0.0.0\",\n \"lockfileVersion\": 3,\n \"requires\": true,\n \"packages\": {\n \"\": {\n \"name\": \"appium-monorepo\",\n \"version\": \"0.0.0\",\n \"license\": \"Apache-2.0\",\n \"workspaces\": [\n \"packages/*\"\n ],\n \"devDependencies\": {\n \"@colors/colors\": \"1.6.0\",\n \"@eslint/js\": \"9.39.2\",\n \"@stylistic/eslint-plugin\": \"5.7.1\",\n \"@tsconfig/node20\": \"20.1.9\",\n \"@types/archiver\": \"7.0.0\",\n \"@types/argparse\": \"2.0.17\",\n \"@types/async-lock\": \"1.4.2\",\n \"@types/base64-stream\": \"1.0.5\",\n \"@types/bluebird\": \"3.5.42\",\n \"@types/chai\": \"5.2.3\",\n \"@types/chai-as-promised\": \"8.0.2\",\n \"@types/express\": \"5.0.6\",\n \"@types/jsftp\": \"2.1.5\",\n \"@types/json-schema\": \"7.0.15\",\n \"@types/klaw\": \"3.0.7\",\n \"@types/lockfile\": \"1.0.4\",\n \"@types/lodash\": \"4.17.23\",\n \"@types/method-override\": \"3.0.0\",\n \"@types/mocha\": \"10.0.10\",\n \"@types/mv\": \"2.1.4\",\n \"@types/ncp\": \"2.0.8\",\n \"@types/node\": \"24.10.10\",\n \"@types/pluralize\": \"0.0.33\",\n \"@types/semver\": \"7.7.1\",\n \"@types/serve-favicon\": \"2.5.7\",\n \"@types/shell-quote\": \"1.7.5\",\n \"@types/sinon\": \"21.0.0\",\n \"@types/sinon-chai\": \"4.0.0\",\n \"@types/which\": \"3.0.4\",\n \"@types/ws\": \"8.18.1\",\n \"@types/xmldom\": \"0.1.34\",\n \"@types/yargs\": \"17.0.35\",\n \"asyncbox\": \"6.1.0\",\n \"chai\": \"6.2.2\",\n \"chai-as-promised\": \"8.0.2\",\n \"conventional-changelog-conventionalcommits\": \"7.0.2\",\n \"cpy-cli\": \"7.0.0\",\n \"cross-env\": \"10.1.0\",\n \"eslint\": \"9.39.2\",\n \"eslint-config-prettier\": \"10.1.8\",\n \"eslint-import-resolver-typescript\": \"4.4.4\",\n \"eslint-plugin-import-x\": \"4.16.1\",\n \"eslint-plugin-mocha\": \"11.2.0\",\n \"eslint-plugin-n\": \"17.23.2\",\n \"eslint-plugin-promise\": \"7.2.1\",\n \"finalhandler\": \"2.1.1\",\n \"get-port\": \"7.1.0\",\n \"json-schema-to-typescript\": \"15.0.4\",\n \"lerna\": \"9.0.3\",\n \"log-symbols\": \"7.0.1\",\n \"midnight-smoker\": \"8.0.0\",\n \"mjpeg-consumer\": \"2.0.0\",\n \"mjpeg-server\": \"0.3.1\",\n \"mocha\": \"11.7.5\",\n \"npm-run-all2\": \"8.0.4\",\n \"prettier\": \"3.8.1\",\n \"rewiremock\": \"3.14.6\",\n \"rimraf\": \"6.1.2\",\n \"serve-static\": \"2.2.1\",\n \"sinon\": \"21.0.1\",\n \"sinon-chai\": \"4.0.1\",\n \"sync-monorepo-packages\": \"1.0.2\",\n \"teen_process\": \"4.0.9\",\n \"ts-node\": \"10.9.2\",\n \"tsd\": \"0.33.0\",\n \"typescript\": \"5.9.3\",\n \"typescript-eslint\": \"8.54.0\",\n \"webdriverio\": \"9.23.3\",\n \"ws\": \"8.19.0\",\n \"yaml-js\": \"0.3.1\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n }\n },\n \"node_modules/@aashutoshrathi/word-wrap\": {\n \"version\": \"1.2.6\",\n \"resolved\": \"https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz\",\n \"integrity\": \"sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/@apidevtools/json-schema-ref-parser\": {\n \"version\": \"11.5.5\",\n \"resolved\": \"https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.5.5.tgz\",\n \"integrity\": \"sha512-hv/aXDILyroHioVW27etFMV+IX6FyNn41YwbeGIAt5h/7fUTQvHI5w3ols8qYAT8aQt3kzexq5ZwxFDxNHIhdQ==\",\n \"dev\": true,\n \"dependencies\": {\n \"@jsdevtools/ono\": \"^7.1.3\",\n \"@types/json-schema\": \"^7.0.15\",\n \"js-yaml\": \"^4.1.0\"\n },\n \"engines\": {\n \"node\": \">= 16\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/philsturgeon\"\n }\n },\n \"node_modules/@appium/base-driver\": {\n \"resolved\": \"packages/base-driver\",\n \"link\": true\n },\n \"node_modules/@appium/base-plugin\": {\n \"resolved\": \"packages/base-plugin\",\n \"link\": true\n },\n \"node_modules/@appium/docutils\": {\n \"resolved\": \"packages/docutils\",\n \"link\": true\n },\n \"node_modules/@appium/driver-test-support\": {\n \"resolved\": \"packages/driver-test-support\",\n \"link\": true\n },\n \"node_modules/@appium/eslint-config-appium-ts\": {\n \"resolved\": \"packages/eslint-config-appium-ts\",\n \"link\": true\n },\n \"node_modules/@appium/execute-driver-plugin\": {\n \"resolved\": \"packages/execute-driver-plugin\",\n \"link\": true\n },\n \"node_modules/@appium/fake-driver\": {\n \"resolved\": \"packages/fake-driver\",\n \"link\": true\n },\n \"node_modules/@appium/fake-plugin\": {\n \"resolved\": \"packages/fake-plugin\",\n \"link\": true\n },\n \"node_modules/@appium/images-plugin\": {\n \"resolved\": \"packages/images-plugin\",\n \"link\": true\n },\n \"node_modules/@appium/logger\": {\n \"resolved\": \"packages/logger\",\n \"link\": true\n },\n \"node_modules/@appium/opencv\": {\n \"resolved\": \"packages/opencv\",\n \"link\": true\n },\n \"node_modules/@appium/plugin-test-support\": {\n \"resolved\": \"packages/plugin-test-support\",\n \"link\": true\n },\n \"node_modules/@appium/relaxed-caps-plugin\": {\n \"resolved\": \"packages/relaxed-caps-plugin\",\n \"link\": true\n },\n \"node_modules/@appium/schema\": {\n \"resolved\": \"packages/schema\",\n \"link\": true\n },\n \"node_modules/@appium/storage-plugin\": {\n \"resolved\": \"packages/storage-plugin\",\n \"link\": true\n },\n \"node_modules/@appium/strongbox\": {\n \"resolved\": \"packages/strongbox\",\n \"link\": true\n },\n \"node_modules/@appium/support\": {\n \"resolved\": \"packages/support\",\n \"link\": true\n },\n \"node_modules/@appium/test-support\": {\n \"resolved\": \"packages/test-support\",\n \"link\": true\n },\n \"node_modules/@appium/tsconfig\": {\n \"resolved\": \"packages/tsconfig\",\n \"link\": true\n },\n \"node_modules/@appium/types\": {\n \"resolved\": \"packages/types\",\n \"link\": true\n },\n \"node_modules/@appium/universal-xml-plugin\": {\n \"resolved\": \"packages/universal-xml-plugin\",\n \"link\": true\n },\n \"node_modules/@babel/code-frame\": {\n \"version\": \"7.26.2\",\n \"resolved\": \"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz\",\n \"integrity\": \"sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@babel/helper-validator-identifier\": \"^7.25.9\",\n \"js-tokens\": \"^4.0.0\",\n \"picocolors\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=6.9.0\"\n }\n },\n \"node_modules/@babel/helper-validator-identifier\": {\n \"version\": \"7.28.5\",\n \"resolved\": \"https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz\",\n \"integrity\": \"sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6.9.0\"\n }\n },\n \"node_modules/@colors/colors\": {\n \"version\": \"1.6.0\",\n \"resolved\": \"https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz\",\n \"integrity\": \"sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==\",\n \"engines\": {\n \"node\": \">=0.1.90\"\n }\n },\n \"node_modules/@cspotcode/source-map-support\": {\n \"version\": \"0.8.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@jridgewell/trace-mapping\": \"0.3.9\"\n },\n \"engines\": {\n \"node\": \">=12\"\n }\n },\n \"node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping\": {\n \"version\": \"0.3.9\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@jridgewell/resolve-uri\": \"^3.0.3\",\n \"@jridgewell/sourcemap-codec\": \"^1.4.10\"\n }\n },\n \"node_modules/@dabh/diagnostics\": {\n \"version\": \"2.0.8\",\n \"resolved\": \"https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.8.tgz\",\n \"integrity\": \"sha512-R4MSXTVnuMzGD7bzHdW2ZhhdPC/igELENcq5IjEverBvq5hn1SXCWcsi6eSsdWP0/Ur+SItRRjAktmdoX/8R/Q==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@so-ric/colorspace\": \"^1.1.6\",\n \"enabled\": \"2.0.x\",\n \"kuler\": \"^2.0.0\"\n }\n },\n \"node_modules/@emnapi/core\": {\n \"version\": \"1.4.3\",\n \"resolved\": \"https://registry.npmjs.org/@emnapi/core/-/core-1.4.3.tgz\",\n \"integrity\": \"sha512-4m62DuCE07lw01soJwPiBGC0nAww0Q+RY70VZ+n49yDIO13yyinhbWCeNnaob0lakDtWQzSdtNWzJeOJt2ma+g==\",\n \"devOptional\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@emnapi/wasi-threads\": \"1.0.2\",\n \"tslib\": \"^2.4.0\"\n }\n },\n \"node_modules/@emnapi/runtime\": {\n \"version\": \"1.4.3\",\n \"resolved\": \"https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.3.tgz\",\n \"integrity\": \"sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==\",\n \"devOptional\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"tslib\": \"^2.4.0\"\n }\n },\n \"node_modules/@emnapi/wasi-threads\": {\n \"version\": \"1.0.2\",\n \"resolved\": \"https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.0.2.tgz\",\n \"integrity\": \"sha512-5n3nTJblwRi8LlXkJ9eBzu+kZR8Yxcc7ubakyQTFzPMtIhFpUBRbsnc2Dv88IZDIbCDlBiWrknhB4Lsz7mg6BA==\",\n \"devOptional\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"tslib\": \"^2.4.0\"\n }\n },\n \"node_modules/@epic-web/invariant\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@epic-web/invariant/-/invariant-1.0.0.tgz\",\n \"integrity\": \"sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@eslint-community/eslint-utils\": {\n \"version\": \"4.9.1\",\n \"resolved\": \"https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz\",\n \"integrity\": \"sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"eslint-visitor-keys\": \"^3.4.3\"\n },\n \"engines\": {\n \"node\": \"^12.22.0 || ^14.17.0 || >=16.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/eslint\"\n },\n \"peerDependencies\": {\n \"eslint\": \"^6.0.0 || ^7.0.0 || >=8.0.0\"\n }\n },\n \"node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys\": {\n \"version\": \"3.4.3\",\n \"resolved\": \"https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz\",\n \"integrity\": \"sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==\",\n \"license\": \"Apache-2.0\",\n \"engines\": {\n \"node\": \"^12.22.0 || ^14.17.0 || >=16.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/eslint\"\n }\n },\n \"node_modules/@eslint-community/regexpp\": {\n \"version\": \"4.12.2\",\n \"resolved\": \"https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz\",\n \"integrity\": \"sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^12.0.0 || ^14.0.0 || >=16.0.0\"\n }\n },\n \"node_modules/@eslint/compat\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/@eslint/compat/-/compat-2.0.2.tgz\",\n \"integrity\": \"sha512-pR1DoD0h3HfF675QZx0xsyrsU8q70Z/plx7880NOhS02NuWLgBCOMDL787nUeQ7EWLkxv3bPQJaarjcPQb2Dwg==\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@eslint/core\": \"^1.1.0\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.13.0 || >=24\"\n },\n \"peerDependencies\": {\n \"eslint\": \"^8.40 || 9 || 10\"\n },\n \"peerDependenciesMeta\": {\n \"eslint\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@eslint/compat/node_modules/@eslint/core\": {\n \"version\": \"1.1.0\",\n \"resolved\": \"https://registry.npmjs.org/@eslint/core/-/core-1.1.0.tgz\",\n \"integrity\": \"sha512-/nr9K9wkr3P1EzFTdFdMoLuo1PmIxjmwvPozwoSodjNBdefGujXQUF93u1DDZpEaTuDvMsIQddsd35BwtrW9Xw==\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@types/json-schema\": \"^7.0.15\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.13.0 || >=24\"\n }\n },\n \"node_modules/@eslint/config-array\": {\n \"version\": \"0.21.1\",\n \"resolved\": \"https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz\",\n \"integrity\": \"sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@eslint/object-schema\": \"^2.1.7\",\n \"debug\": \"^4.3.1\",\n \"minimatch\": \"^3.1.2\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n }\n },\n \"node_modules/@eslint/config-helpers\": {\n \"version\": \"0.4.2\",\n \"resolved\": \"https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz\",\n \"integrity\": \"sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@eslint/core\": \"^0.17.0\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n }\n },\n \"node_modules/@eslint/core\": {\n \"version\": \"0.17.0\",\n \"resolved\": \"https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz\",\n \"integrity\": \"sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@types/json-schema\": \"^7.0.15\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n }\n },\n \"node_modules/@eslint/eslintrc\": {\n \"version\": \"3.3.1\",\n \"resolved\": \"https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz\",\n \"integrity\": \"sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ajv\": \"^6.12.4\",\n \"debug\": \"^4.3.2\",\n \"espree\": \"^10.0.1\",\n \"globals\": \"^14.0.0\",\n \"ignore\": \"^5.2.0\",\n \"import-fresh\": \"^3.2.1\",\n \"js-yaml\": \"^4.1.0\",\n \"minimatch\": \"^3.1.2\",\n \"strip-json-comments\": \"^3.1.1\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/eslint\"\n }\n },\n \"node_modules/@eslint/eslintrc/node_modules/ajv\": {\n \"version\": \"6.12.6\",\n \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz\",\n \"integrity\": \"sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"fast-deep-equal\": \"^3.1.1\",\n \"fast-json-stable-stringify\": \"^2.0.0\",\n \"json-schema-traverse\": \"^0.4.1\",\n \"uri-js\": \"^4.2.2\"\n },\n \"funding\": {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/epoberezkin\"\n }\n },\n \"node_modules/@eslint/eslintrc/node_modules/globals\": {\n \"version\": \"14.0.0\",\n \"resolved\": \"https://registry.npmjs.org/globals/-/globals-14.0.0.tgz\",\n \"integrity\": \"sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/@eslint/eslintrc/node_modules/json-schema-traverse\": {\n \"version\": \"0.4.1\",\n \"resolved\": \"https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz\",\n \"integrity\": \"sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@eslint/js\": {\n \"version\": \"9.39.2\",\n \"resolved\": \"https://registry.npmjs.org/@eslint/js/-/js-9.39.2.tgz\",\n \"integrity\": \"sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"url\": \"https://eslint.org/donate\"\n }\n },\n \"node_modules/@eslint/object-schema\": {\n \"version\": \"2.1.7\",\n \"resolved\": \"https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz\",\n \"integrity\": \"sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==\",\n \"license\": \"Apache-2.0\",\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n }\n },\n \"node_modules/@eslint/plugin-kit\": {\n \"version\": \"0.4.1\",\n \"resolved\": \"https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz\",\n \"integrity\": \"sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@eslint/core\": \"^0.17.0\",\n \"levn\": \"^0.4.1\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n }\n },\n \"node_modules/@humanfs/core\": {\n \"version\": \"0.19.1\",\n \"resolved\": \"https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz\",\n \"integrity\": \"sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==\",\n \"license\": \"Apache-2.0\",\n \"engines\": {\n \"node\": \">=18.18.0\"\n }\n },\n \"node_modules/@humanfs/node\": {\n \"version\": \"0.16.6\",\n \"resolved\": \"https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz\",\n \"integrity\": \"sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@humanfs/core\": \"^0.19.1\",\n \"@humanwhocodes/retry\": \"^0.3.0\"\n },\n \"engines\": {\n \"node\": \">=18.18.0\"\n }\n },\n \"node_modules/@humanfs/node/node_modules/@humanwhocodes/retry\": {\n \"version\": \"0.3.1\",\n \"resolved\": \"https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz\",\n \"integrity\": \"sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==\",\n \"license\": \"Apache-2.0\",\n \"engines\": {\n \"node\": \">=18.18\"\n },\n \"funding\": {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/nzakas\"\n }\n },\n \"node_modules/@humanwhocodes/module-importer\": {\n \"version\": \"1.0.1\",\n \"license\": \"Apache-2.0\",\n \"engines\": {\n \"node\": \">=12.22\"\n },\n \"funding\": {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/nzakas\"\n }\n },\n \"node_modules/@humanwhocodes/retry\": {\n \"version\": \"0.4.2\",\n \"resolved\": \"https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz\",\n \"integrity\": \"sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==\",\n \"license\": \"Apache-2.0\",\n \"engines\": {\n \"node\": \">=18.18\"\n },\n \"funding\": {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/nzakas\"\n }\n },\n \"node_modules/@hutson/parse-repository-url\": {\n \"version\": \"3.0.2\",\n \"resolved\": \"https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz\",\n \"integrity\": \"sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"engines\": {\n \"node\": \">=6.9.0\"\n }\n },\n \"node_modules/@img/colour\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz\",\n \"integrity\": \"sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/@img/sharp-darwin-arm64\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz\",\n \"integrity\": \"sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"license\": \"Apache-2.0\",\n \"optional\": true,\n \"os\": [\n \"darwin\"\n ],\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n },\n \"optionalDependencies\": {\n \"@img/sharp-libvips-darwin-arm64\": \"1.2.4\"\n }\n },\n \"node_modules/@img/sharp-darwin-x64\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz\",\n \"integrity\": \"sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==\",\n \"cpu\": [\n \"x64\"\n ],\n \"license\": \"Apache-2.0\",\n \"optional\": true,\n \"os\": [\n \"darwin\"\n ],\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n },\n \"optionalDependencies\": {\n \"@img/sharp-libvips-darwin-x64\": \"1.2.4\"\n }\n },\n \"node_modules/@img/sharp-libvips-darwin-arm64\": {\n \"version\": \"1.2.4\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz\",\n \"integrity\": \"sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"license\": \"LGPL-3.0-or-later\",\n \"optional\": true,\n \"os\": [\n \"darwin\"\n ],\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n }\n },\n \"node_modules/@img/sharp-libvips-darwin-x64\": {\n \"version\": \"1.2.4\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz\",\n \"integrity\": \"sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==\",\n \"cpu\": [\n \"x64\"\n ],\n \"license\": \"LGPL-3.0-or-later\",\n \"optional\": true,\n \"os\": [\n \"darwin\"\n ],\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n }\n },\n \"node_modules/@img/sharp-libvips-linux-arm\": {\n \"version\": \"1.2.4\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz\",\n \"integrity\": \"sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==\",\n \"cpu\": [\n \"arm\"\n ],\n \"license\": \"LGPL-3.0-or-later\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n }\n },\n \"node_modules/@img/sharp-libvips-linux-arm64\": {\n \"version\": \"1.2.4\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz\",\n \"integrity\": \"sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"license\": \"LGPL-3.0-or-later\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n }\n },\n \"node_modules/@img/sharp-libvips-linux-ppc64\": {\n \"version\": \"1.2.4\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.4.tgz\",\n \"integrity\": \"sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==\",\n \"cpu\": [\n \"ppc64\"\n ],\n \"license\": \"LGPL-3.0-or-later\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n }\n },\n \"node_modules/@img/sharp-libvips-linux-riscv64\": {\n \"version\": \"1.2.4\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.2.4.tgz\",\n \"integrity\": \"sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==\",\n \"cpu\": [\n \"riscv64\"\n ],\n \"license\": \"LGPL-3.0-or-later\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n }\n },\n \"node_modules/@img/sharp-libvips-linux-s390x\": {\n \"version\": \"1.2.4\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.4.tgz\",\n \"integrity\": \"sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==\",\n \"cpu\": [\n \"s390x\"\n ],\n \"license\": \"LGPL-3.0-or-later\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n }\n },\n \"node_modules/@img/sharp-libvips-linux-x64\": {\n \"version\": \"1.2.4\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz\",\n \"integrity\": \"sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==\",\n \"cpu\": [\n \"x64\"\n ],\n \"license\": \"LGPL-3.0-or-later\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n }\n },\n \"node_modules/@img/sharp-libvips-linuxmusl-arm64\": {\n \"version\": \"1.2.4\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz\",\n \"integrity\": \"sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"license\": \"LGPL-3.0-or-later\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n }\n },\n \"node_modules/@img/sharp-libvips-linuxmusl-x64\": {\n \"version\": \"1.2.4\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz\",\n \"integrity\": \"sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==\",\n \"cpu\": [\n \"x64\"\n ],\n \"license\": \"LGPL-3.0-or-later\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n }\n },\n \"node_modules/@img/sharp-linux-arm\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz\",\n \"integrity\": \"sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==\",\n \"cpu\": [\n \"arm\"\n ],\n \"license\": \"Apache-2.0\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n },\n \"optionalDependencies\": {\n \"@img/sharp-libvips-linux-arm\": \"1.2.4\"\n }\n },\n \"node_modules/@img/sharp-linux-arm64\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz\",\n \"integrity\": \"sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"license\": \"Apache-2.0\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n },\n \"optionalDependencies\": {\n \"@img/sharp-libvips-linux-arm64\": \"1.2.4\"\n }\n },\n \"node_modules/@img/sharp-linux-ppc64\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.5.tgz\",\n \"integrity\": \"sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==\",\n \"cpu\": [\n \"ppc64\"\n ],\n \"license\": \"Apache-2.0\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n },\n \"optionalDependencies\": {\n \"@img/sharp-libvips-linux-ppc64\": \"1.2.4\"\n }\n },\n \"node_modules/@img/sharp-linux-riscv64\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.34.5.tgz\",\n \"integrity\": \"sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==\",\n \"cpu\": [\n \"riscv64\"\n ],\n \"license\": \"Apache-2.0\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n },\n \"optionalDependencies\": {\n \"@img/sharp-libvips-linux-riscv64\": \"1.2.4\"\n }\n },\n \"node_modules/@img/sharp-linux-s390x\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.5.tgz\",\n \"integrity\": \"sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==\",\n \"cpu\": [\n \"s390x\"\n ],\n \"license\": \"Apache-2.0\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n },\n \"optionalDependencies\": {\n \"@img/sharp-libvips-linux-s390x\": \"1.2.4\"\n }\n },\n \"node_modules/@img/sharp-linux-x64\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz\",\n \"integrity\": \"sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==\",\n \"cpu\": [\n \"x64\"\n ],\n \"license\": \"Apache-2.0\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n },\n \"optionalDependencies\": {\n \"@img/sharp-libvips-linux-x64\": \"1.2.4\"\n }\n },\n \"node_modules/@img/sharp-linuxmusl-arm64\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz\",\n \"integrity\": \"sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"license\": \"Apache-2.0\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n },\n \"optionalDependencies\": {\n \"@img/sharp-libvips-linuxmusl-arm64\": \"1.2.4\"\n }\n },\n \"node_modules/@img/sharp-linuxmusl-x64\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz\",\n \"integrity\": \"sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==\",\n \"cpu\": [\n \"x64\"\n ],\n \"license\": \"Apache-2.0\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ],\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n },\n \"optionalDependencies\": {\n \"@img/sharp-libvips-linuxmusl-x64\": \"1.2.4\"\n }\n },\n \"node_modules/@img/sharp-wasm32\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.5.tgz\",\n \"integrity\": \"sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==\",\n \"cpu\": [\n \"wasm32\"\n ],\n \"license\": \"Apache-2.0 AND LGPL-3.0-or-later AND MIT\",\n \"optional\": true,\n \"dependencies\": {\n \"@emnapi/runtime\": \"^1.7.0\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n }\n },\n \"node_modules/@img/sharp-wasm32/node_modules/@emnapi/runtime\": {\n \"version\": \"1.7.0\",\n \"resolved\": \"https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.0.tgz\",\n \"integrity\": \"sha512-oAYoQnCYaQZKVS53Fq23ceWMRxq5EhQsE0x0RdQ55jT7wagMu5k+fS39v1fiSLrtrLQlXwVINenqhLMtTrV/1Q==\",\n \"license\": \"MIT\",\n \"optional\": true,\n \"dependencies\": {\n \"tslib\": \"^2.4.0\"\n }\n },\n \"node_modules/@img/sharp-win32-arm64\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.5.tgz\",\n \"integrity\": \"sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"license\": \"Apache-2.0 AND LGPL-3.0-or-later\",\n \"optional\": true,\n \"os\": [\n \"win32\"\n ],\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n }\n },\n \"node_modules/@img/sharp-win32-ia32\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.5.tgz\",\n \"integrity\": \"sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==\",\n \"cpu\": [\n \"ia32\"\n ],\n \"license\": \"Apache-2.0 AND LGPL-3.0-or-later\",\n \"optional\": true,\n \"os\": [\n \"win32\"\n ],\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n }\n },\n \"node_modules/@img/sharp-win32-x64\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz\",\n \"integrity\": \"sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==\",\n \"cpu\": [\n \"x64\"\n ],\n \"license\": \"Apache-2.0 AND LGPL-3.0-or-later\",\n \"optional\": true,\n \"os\": [\n \"win32\"\n ],\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n }\n },\n \"node_modules/@inquirer/ansi\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.0.tgz\",\n \"integrity\": \"sha512-JWaTfCxI1eTmJ1BIv86vUfjVatOdxwD0DAVKYevY8SazeUUZtW+tNbsdejVO1GYE0GXJW1N1ahmiC3TFd+7wZA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/@inquirer/checkbox\": {\n \"version\": \"4.2.4\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.2.4.tgz\",\n \"integrity\": \"sha512-2n9Vgf4HSciFq8ttKXk+qy+GsyTXPV1An6QAwe/8bkbbqvG4VW1I/ZY1pNu2rf+h9bdzMLPbRSfcNxkHBy/Ydw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@inquirer/ansi\": \"^1.0.0\",\n \"@inquirer/core\": \"^10.2.2\",\n \"@inquirer/figures\": \"^1.0.13\",\n \"@inquirer/type\": \"^3.0.8\",\n \"yoctocolors-cjs\": \"^2.1.2\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@inquirer/confirm\": {\n \"version\": \"5.1.18\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.18.tgz\",\n \"integrity\": \"sha512-MilmWOzHa3Ks11tzvuAmFoAd/wRuaP3SwlT1IZhyMke31FKLxPiuDWcGXhU+PKveNOpAc4axzAgrgxuIJJRmLw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@inquirer/core\": \"^10.2.2\",\n \"@inquirer/type\": \"^3.0.8\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@inquirer/core\": {\n \"version\": \"10.2.2\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/core/-/core-10.2.2.tgz\",\n \"integrity\": \"sha512-yXq/4QUnk4sHMtmbd7irwiepjB8jXU0kkFRL4nr/aDBA2mDz13cMakEWdDwX3eSCTkk03kwcndD1zfRAIlELxA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@inquirer/ansi\": \"^1.0.0\",\n \"@inquirer/figures\": \"^1.0.13\",\n \"@inquirer/type\": \"^3.0.8\",\n \"cli-width\": \"^4.1.0\",\n \"mute-stream\": \"^2.0.0\",\n \"signal-exit\": \"^4.1.0\",\n \"wrap-ansi\": \"^6.2.0\",\n \"yoctocolors-cjs\": \"^2.1.2\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@inquirer/core/node_modules/ansi-styles\": {\n \"version\": \"4.3.0\",\n \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz\",\n \"integrity\": \"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-convert\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/@inquirer/core/node_modules/color-convert\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz\",\n \"integrity\": \"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-name\": \"~1.1.4\"\n },\n \"engines\": {\n \"node\": \">=7.0.0\"\n }\n },\n \"node_modules/@inquirer/core/node_modules/color-name\": {\n \"version\": \"1.1.4\",\n \"resolved\": \"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz\",\n \"integrity\": \"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@inquirer/core/node_modules/signal-exit\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz\",\n \"integrity\": \"sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=14\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@inquirer/core/node_modules/wrap-ansi\": {\n \"version\": \"6.2.0\",\n \"resolved\": \"https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz\",\n \"integrity\": \"sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^4.0.0\",\n \"string-width\": \"^4.1.0\",\n \"strip-ansi\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/@inquirer/editor\": {\n \"version\": \"4.2.20\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.20.tgz\",\n \"integrity\": \"sha512-7omh5y5bK672Q+Brk4HBbnHNowOZwrb/78IFXdrEB9PfdxL3GudQyDk8O9vQ188wj3xrEebS2M9n18BjJoI83g==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@inquirer/core\": \"^10.2.2\",\n \"@inquirer/external-editor\": \"^1.0.2\",\n \"@inquirer/type\": \"^3.0.8\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@inquirer/expand\": {\n \"version\": \"4.0.20\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.20.tgz\",\n \"integrity\": \"sha512-Dt9S+6qUg94fEvgn54F2Syf0Z3U8xmnBI9ATq2f5h9xt09fs2IJXSCIXyyVHwvggKWFXEY/7jATRo2K6Dkn6Ow==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@inquirer/core\": \"^10.2.2\",\n \"@inquirer/type\": \"^3.0.8\",\n \"yoctocolors-cjs\": \"^2.1.2\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@inquirer/external-editor\": {\n \"version\": \"1.0.2\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.2.tgz\",\n \"integrity\": \"sha512-yy9cOoBnx58TlsPrIxauKIFQTiyH+0MK4e97y4sV9ERbI+zDxw7i2hxHLCIEGIE/8PPvDxGhgzIOTSOWcs6/MQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"chardet\": \"^2.1.0\",\n \"iconv-lite\": \"^0.7.0\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@inquirer/external-editor/node_modules/iconv-lite\": {\n \"version\": \"0.7.0\",\n \"resolved\": \"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz\",\n \"integrity\": \"sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safer-buffer\": \">= 2.1.2 < 3.0.0\"\n },\n \"engines\": {\n \"node\": \">=0.10.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/express\"\n }\n },\n \"node_modules/@inquirer/figures\": {\n \"version\": \"1.0.13\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.13.tgz\",\n \"integrity\": \"sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/@inquirer/input\": {\n \"version\": \"4.2.4\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/input/-/input-4.2.4.tgz\",\n \"integrity\": \"sha512-cwSGpLBMwpwcZZsc6s1gThm0J+it/KIJ+1qFL2euLmSKUMGumJ5TcbMgxEjMjNHRGadouIYbiIgruKoDZk7klw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@inquirer/core\": \"^10.2.2\",\n \"@inquirer/type\": \"^3.0.8\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@inquirer/number\": {\n \"version\": \"3.0.20\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/number/-/number-3.0.20.tgz\",\n \"integrity\": \"sha512-bbooay64VD1Z6uMfNehED2A2YOPHSJnQLs9/4WNiV/EK+vXczf/R988itL2XLDGTgmhMF2KkiWZo+iEZmc4jqg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@inquirer/core\": \"^10.2.2\",\n \"@inquirer/type\": \"^3.0.8\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@inquirer/password\": {\n \"version\": \"4.0.20\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/password/-/password-4.0.20.tgz\",\n \"integrity\": \"sha512-nxSaPV2cPvvoOmRygQR+h0B+Av73B01cqYLcr7NXcGXhbmsYfUb8fDdw2Us1bI2YsX+VvY7I7upgFYsyf8+Nug==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@inquirer/ansi\": \"^1.0.0\",\n \"@inquirer/core\": \"^10.2.2\",\n \"@inquirer/type\": \"^3.0.8\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@inquirer/prompts\": {\n \"version\": \"7.8.6\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.8.6.tgz\",\n \"integrity\": \"sha512-68JhkiojicX9SBUD8FE/pSKbOKtwoyaVj1kwqLfvjlVXZvOy3iaSWX4dCLsZyYx/5Ur07Fq+yuDNOen+5ce6ig==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@inquirer/checkbox\": \"^4.2.4\",\n \"@inquirer/confirm\": \"^5.1.18\",\n \"@inquirer/editor\": \"^4.2.20\",\n \"@inquirer/expand\": \"^4.0.20\",\n \"@inquirer/input\": \"^4.2.4\",\n \"@inquirer/number\": \"^3.0.20\",\n \"@inquirer/password\": \"^4.0.20\",\n \"@inquirer/rawlist\": \"^4.1.8\",\n \"@inquirer/search\": \"^3.1.3\",\n \"@inquirer/select\": \"^4.3.4\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@inquirer/rawlist\": {\n \"version\": \"4.1.8\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.8.tgz\",\n \"integrity\": \"sha512-CQ2VkIASbgI2PxdzlkeeieLRmniaUU1Aoi5ggEdm6BIyqopE9GuDXdDOj9XiwOqK5qm72oI2i6J+Gnjaa26ejg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@inquirer/core\": \"^10.2.2\",\n \"@inquirer/type\": \"^3.0.8\",\n \"yoctocolors-cjs\": \"^2.1.2\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@inquirer/search\": {\n \"version\": \"3.1.3\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/search/-/search-3.1.3.tgz\",\n \"integrity\": \"sha512-D5T6ioybJJH0IiSUK/JXcoRrrm8sXwzrVMjibuPs+AgxmogKslaafy1oxFiorNI4s3ElSkeQZbhYQgLqiL8h6Q==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@inquirer/core\": \"^10.2.2\",\n \"@inquirer/figures\": \"^1.0.13\",\n \"@inquirer/type\": \"^3.0.8\",\n \"yoctocolors-cjs\": \"^2.1.2\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@inquirer/select\": {\n \"version\": \"4.3.4\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/select/-/select-4.3.4.tgz\",\n \"integrity\": \"sha512-Qp20nySRmfbuJBBsgPU7E/cL62Hf250vMZRzYDcBHty2zdD1kKCnoDFWRr0WO2ZzaXp3R7a4esaVGJUx0E6zvA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@inquirer/ansi\": \"^1.0.0\",\n \"@inquirer/core\": \"^10.2.2\",\n \"@inquirer/figures\": \"^1.0.13\",\n \"@inquirer/type\": \"^3.0.8\",\n \"yoctocolors-cjs\": \"^2.1.2\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@inquirer/type\": {\n \"version\": \"3.0.8\",\n \"resolved\": \"https://registry.npmjs.org/@inquirer/type/-/type-3.0.8.tgz\",\n \"integrity\": \"sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@isaacs/balanced-match\": {\n \"version\": \"4.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz\",\n \"integrity\": \"sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"node_modules/@isaacs/brace-expansion\": {\n \"version\": \"5.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.1.tgz\",\n \"integrity\": \"sha512-WMz71T1JS624nWj2n2fnYAuPovhv7EUhk69R6i9dsVyzxt5eM3bjwvgk9L+APE1TRscGysAVMANkB0jh0LQZrQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@isaacs/balanced-match\": \"^4.0.1\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"node_modules/@isaacs/cliui\": {\n \"version\": \"8.0.2\",\n \"resolved\": \"https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz\",\n \"integrity\": \"sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==\",\n \"dependencies\": {\n \"string-width\": \"^5.1.2\",\n \"string-width-cjs\": \"npm:string-width@^4.2.0\",\n \"strip-ansi\": \"^7.0.1\",\n \"strip-ansi-cjs\": \"npm:strip-ansi@^6.0.1\",\n \"wrap-ansi\": \"^8.1.0\",\n \"wrap-ansi-cjs\": \"npm:wrap-ansi@^7.0.0\"\n },\n \"engines\": {\n \"node\": \">=12\"\n }\n },\n \"node_modules/@isaacs/cliui/node_modules/ansi-regex\": {\n \"version\": \"6.0.1\",\n \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz\",\n \"integrity\": \"sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-regex?sponsor=1\"\n }\n },\n \"node_modules/@isaacs/cliui/node_modules/ansi-styles\": {\n \"version\": \"6.2.1\",\n \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz\",\n \"integrity\": \"sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/@isaacs/cliui/node_modules/emoji-regex\": {\n \"version\": \"9.2.2\",\n \"resolved\": \"https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz\",\n \"integrity\": \"sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==\"\n },\n \"node_modules/@isaacs/cliui/node_modules/string-width\": {\n \"version\": \"5.1.2\",\n \"resolved\": \"https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz\",\n \"integrity\": \"sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==\",\n \"dependencies\": {\n \"eastasianwidth\": \"^0.2.0\",\n \"emoji-regex\": \"^9.2.2\",\n \"strip-ansi\": \"^7.0.1\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/@isaacs/cliui/node_modules/strip-ansi\": {\n \"version\": \"7.0.1\",\n \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz\",\n \"integrity\": \"sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==\",\n \"dependencies\": {\n \"ansi-regex\": \"^6.0.1\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/strip-ansi?sponsor=1\"\n }\n },\n \"node_modules/@isaacs/cliui/node_modules/wrap-ansi\": {\n \"version\": \"8.1.0\",\n \"resolved\": \"https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz\",\n \"integrity\": \"sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==\",\n \"dependencies\": {\n \"ansi-styles\": \"^6.1.0\",\n \"string-width\": \"^5.0.1\",\n \"strip-ansi\": \"^7.0.1\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/wrap-ansi?sponsor=1\"\n }\n },\n \"node_modules/@isaacs/fs-minipass\": {\n \"version\": \"4.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz\",\n \"integrity\": \"sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"minipass\": \"^7.0.4\"\n },\n \"engines\": {\n \"node\": \">=18.0.0\"\n }\n },\n \"node_modules/@isaacs/fs-minipass/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/@isaacs/string-locale-compare\": {\n \"version\": \"1.1.0\",\n \"resolved\": \"https://registry.npmjs.org/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz\",\n \"integrity\": \"sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/@jest/diff-sequences\": {\n \"version\": \"30.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.0.1.tgz\",\n \"integrity\": \"sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0\"\n }\n },\n \"node_modules/@jest/get-type\": {\n \"version\": \"30.1.0\",\n \"resolved\": \"https://registry.npmjs.org/@jest/get-type/-/get-type-30.1.0.tgz\",\n \"integrity\": \"sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0\"\n }\n },\n \"node_modules/@jest/schemas\": {\n \"version\": \"29.4.3\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@sinclair/typebox\": \"^0.25.16\"\n },\n \"engines\": {\n \"node\": \"^14.15.0 || ^16.10.0 || >=18.0.0\"\n }\n },\n \"node_modules/@jridgewell/resolve-uri\": {\n \"version\": \"3.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6.0.0\"\n }\n },\n \"node_modules/@jridgewell/sourcemap-codec\": {\n \"version\": \"1.4.14\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@jsdevtools/ono\": {\n \"version\": \"7.1.3\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@lerna/create\": {\n \"version\": \"9.0.3\",\n \"resolved\": \"https://registry.npmjs.org/@lerna/create/-/create-9.0.3.tgz\",\n \"integrity\": \"sha512-hUTEWrR8zH+/Z3bp/R1aLm6DW8vB/BB7KH7Yeg4fMfrvSwxegiLVW9uJFAzWkK4mzEagmj/Dti85Yg9MN13t0g==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@npmcli/arborist\": \"9.1.6\",\n \"@npmcli/package-json\": \"7.0.2\",\n \"@npmcli/run-script\": \"10.0.2\",\n \"@nx/devkit\": \">=21.5.2 < 23.0.0\",\n \"@octokit/plugin-enterprise-rest\": \"6.0.1\",\n \"@octokit/rest\": \"20.1.2\",\n \"aproba\": \"2.0.0\",\n \"byte-size\": \"8.1.1\",\n \"chalk\": \"4.1.0\",\n \"cmd-shim\": \"6.0.3\",\n \"color-support\": \"1.1.3\",\n \"columnify\": \"1.6.0\",\n \"console-control-strings\": \"^1.1.0\",\n \"conventional-changelog-core\": \"5.0.1\",\n \"conventional-recommended-bump\": \"7.0.1\",\n \"cosmiconfig\": \"9.0.0\",\n \"dedent\": \"1.5.3\",\n \"execa\": \"5.0.0\",\n \"fs-extra\": \"^11.2.0\",\n \"get-stream\": \"6.0.0\",\n \"git-url-parse\": \"14.0.0\",\n \"glob-parent\": \"6.0.2\",\n \"has-unicode\": \"2.0.1\",\n \"ini\": \"^1.3.8\",\n \"init-package-json\": \"8.2.2\",\n \"inquirer\": \"12.9.6\",\n \"is-ci\": \"3.0.1\",\n \"is-stream\": \"2.0.0\",\n \"js-yaml\": \"4.1.1\",\n \"libnpmpublish\": \"11.1.2\",\n \"load-json-file\": \"6.2.0\",\n \"make-dir\": \"4.0.0\",\n \"make-fetch-happen\": \"15.0.2\",\n \"minimatch\": \"3.0.5\",\n \"multimatch\": \"5.0.0\",\n \"npm-package-arg\": \"13.0.1\",\n \"npm-packlist\": \"10.0.3\",\n \"npm-registry-fetch\": \"19.1.0\",\n \"nx\": \">=21.5.3 < 23.0.0\",\n \"p-map\": \"4.0.0\",\n \"p-map-series\": \"2.1.0\",\n \"p-queue\": \"6.6.2\",\n \"p-reduce\": \"^2.1.0\",\n \"pacote\": \"21.0.1\",\n \"pify\": \"5.0.0\",\n \"read-cmd-shim\": \"4.0.0\",\n \"resolve-from\": \"5.0.0\",\n \"rimraf\": \"^4.4.1\",\n \"semver\": \"7.7.2\",\n \"set-blocking\": \"^2.0.0\",\n \"signal-exit\": \"3.0.7\",\n \"slash\": \"^3.0.0\",\n \"ssri\": \"12.0.0\",\n \"string-width\": \"^4.2.3\",\n \"tar\": \"6.2.1\",\n \"temp-dir\": \"1.0.0\",\n \"through\": \"2.3.8\",\n \"tinyglobby\": \"0.2.12\",\n \"upath\": \"2.0.1\",\n \"uuid\": \"^11.1.0\",\n \"validate-npm-package-license\": \"3.0.4\",\n \"validate-npm-package-name\": \"6.0.2\",\n \"wide-align\": \"1.1.5\",\n \"write-file-atomic\": \"5.0.1\",\n \"write-pkg\": \"4.0.0\",\n \"yargs\": \"17.7.2\",\n \"yargs-parser\": \"21.1.1\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\"\n }\n },\n \"node_modules/@lerna/create/node_modules/ansi-styles\": {\n \"version\": \"4.3.0\",\n \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz\",\n \"integrity\": \"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-convert\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/@lerna/create/node_modules/chalk\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz\",\n \"integrity\": \"sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^4.1.0\",\n \"supports-color\": \"^7.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/chalk?sponsor=1\"\n }\n },\n \"node_modules/@lerna/create/node_modules/color-convert\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz\",\n \"integrity\": \"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-name\": \"~1.1.4\"\n },\n \"engines\": {\n \"node\": \">=7.0.0\"\n }\n },\n \"node_modules/@lerna/create/node_modules/color-name\": {\n \"version\": \"1.1.4\",\n \"resolved\": \"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz\",\n \"integrity\": \"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@lerna/create/node_modules/execa\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/execa/-/execa-5.0.0.tgz\",\n \"integrity\": \"sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"cross-spawn\": \"^7.0.3\",\n \"get-stream\": \"^6.0.0\",\n \"human-signals\": \"^2.1.0\",\n \"is-stream\": \"^2.0.0\",\n \"merge-stream\": \"^2.0.0\",\n \"npm-run-path\": \"^4.0.1\",\n \"onetime\": \"^5.1.2\",\n \"signal-exit\": \"^3.0.3\",\n \"strip-final-newline\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sindresorhus/execa?sponsor=1\"\n }\n },\n \"node_modules/@lerna/create/node_modules/fdir\": {\n \"version\": \"6.4.6\",\n \"resolved\": \"https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz\",\n \"integrity\": \"sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"peerDependencies\": {\n \"picomatch\": \"^3 || ^4\"\n },\n \"peerDependenciesMeta\": {\n \"picomatch\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@lerna/create/node_modules/get-stream\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz\",\n \"integrity\": \"sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/@lerna/create/node_modules/glob\": {\n \"version\": \"9.3.5\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-9.3.5.tgz\",\n \"integrity\": \"sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"fs.realpath\": \"^1.0.0\",\n \"minimatch\": \"^8.0.2\",\n \"minipass\": \"^4.2.4\",\n \"path-scurry\": \"^1.6.1\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@lerna/create/node_modules/glob-parent\": {\n \"version\": \"6.0.2\",\n \"resolved\": \"https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz\",\n \"integrity\": \"sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"is-glob\": \"^4.0.3\"\n },\n \"engines\": {\n \"node\": \">=10.13.0\"\n }\n },\n \"node_modules/@lerna/create/node_modules/glob/node_modules/brace-expansion\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz\",\n \"integrity\": \"sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"balanced-match\": \"^1.0.0\"\n }\n },\n \"node_modules/@lerna/create/node_modules/glob/node_modules/minimatch\": {\n \"version\": \"8.0.4\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz\",\n \"integrity\": \"sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@lerna/create/node_modules/is-stream\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz\",\n \"integrity\": \"sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/@lerna/create/node_modules/make-dir\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz\",\n \"integrity\": \"sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"semver\": \"^7.5.3\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/@lerna/create/node_modules/minimatch\": {\n \"version\": \"3.0.5\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz\",\n \"integrity\": \"sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^1.1.7\"\n },\n \"engines\": {\n \"node\": \"*\"\n }\n },\n \"node_modules/@lerna/create/node_modules/minipass\": {\n \"version\": \"4.2.8\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz\",\n \"integrity\": \"sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/@lerna/create/node_modules/picomatch\": {\n \"version\": \"4.0.2\",\n \"resolved\": \"https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz\",\n \"integrity\": \"sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/jonschlinkert\"\n }\n },\n \"node_modules/@lerna/create/node_modules/rimraf\": {\n \"version\": \"4.4.1\",\n \"resolved\": \"https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz\",\n \"integrity\": \"sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"glob\": \"^9.2.0\"\n },\n \"bin\": {\n \"rimraf\": \"dist/cjs/src/bin.js\"\n },\n \"engines\": {\n \"node\": \">=14\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@lerna/create/node_modules/slash\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/slash/-/slash-3.0.0.tgz\",\n \"integrity\": \"sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/@lerna/create/node_modules/supports-color\": {\n \"version\": \"7.2.0\",\n \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz\",\n \"integrity\": \"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-flag\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/@lerna/create/node_modules/tinyglobby\": {\n \"version\": \"0.2.12\",\n \"resolved\": \"https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz\",\n \"integrity\": \"sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"fdir\": \"^6.4.3\",\n \"picomatch\": \"^4.0.2\"\n },\n \"engines\": {\n \"node\": \">=12.0.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/SuperchupuDev\"\n }\n },\n \"node_modules/@napi-rs/wasm-runtime\": {\n \"version\": \"0.2.4\",\n \"resolved\": \"https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.4.tgz\",\n \"integrity\": \"sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@emnapi/core\": \"^1.1.0\",\n \"@emnapi/runtime\": \"^1.1.0\",\n \"@tybys/wasm-util\": \"^0.9.0\"\n }\n },\n \"node_modules/@nodelib/fs.scandir\": {\n \"version\": \"2.1.5\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@nodelib/fs.stat\": \"2.0.5\",\n \"run-parallel\": \"^1.1.9\"\n },\n \"engines\": {\n \"node\": \">= 8\"\n }\n },\n \"node_modules/@nodelib/fs.stat\": {\n \"version\": \"2.0.5\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 8\"\n }\n },\n \"node_modules/@nodelib/fs.walk\": {\n \"version\": \"1.2.8\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@nodelib/fs.scandir\": \"2.1.5\",\n \"fastq\": \"^1.6.0\"\n },\n \"engines\": {\n \"node\": \">= 8\"\n }\n },\n \"node_modules/@npmcli/agent\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/agent/-/agent-4.0.0.tgz\",\n \"integrity\": \"sha512-kAQTcEN9E8ERLVg5AsGwLNoFb+oEG6engbqAU2P43gD4JEIkNGMHdVQ096FsOAAYpZPB0RSt0zgInKIAS1l5QA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"agent-base\": \"^7.1.0\",\n \"http-proxy-agent\": \"^7.0.0\",\n \"https-proxy-agent\": \"^7.0.1\",\n \"lru-cache\": \"^11.2.1\",\n \"socks-proxy-agent\": \"^8.0.3\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/agent/node_modules/lru-cache\": {\n \"version\": \"11.2.2\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz\",\n \"integrity\": \"sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"node_modules/@npmcli/arborist\": {\n \"version\": \"9.1.6\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.1.6.tgz\",\n \"integrity\": \"sha512-c5Pr3EG8UP5ollkJy2x+UdEQC5sEHe3H9whYn6hb2HJimAKS4zmoJkx5acCiR/g4P38RnCSMlsYQyyHnKYeLvQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@isaacs/string-locale-compare\": \"^1.1.0\",\n \"@npmcli/fs\": \"^4.0.0\",\n \"@npmcli/installed-package-contents\": \"^3.0.0\",\n \"@npmcli/map-workspaces\": \"^5.0.0\",\n \"@npmcli/metavuln-calculator\": \"^9.0.2\",\n \"@npmcli/name-from-folder\": \"^3.0.0\",\n \"@npmcli/node-gyp\": \"^4.0.0\",\n \"@npmcli/package-json\": \"^7.0.0\",\n \"@npmcli/query\": \"^4.0.0\",\n \"@npmcli/redact\": \"^3.0.0\",\n \"@npmcli/run-script\": \"^10.0.0\",\n \"bin-links\": \"^5.0.0\",\n \"cacache\": \"^20.0.1\",\n \"common-ancestor-path\": \"^1.0.1\",\n \"hosted-git-info\": \"^9.0.0\",\n \"json-stringify-nice\": \"^1.1.4\",\n \"lru-cache\": \"^11.2.1\",\n \"minimatch\": \"^10.0.3\",\n \"nopt\": \"^8.0.0\",\n \"npm-install-checks\": \"^7.1.0\",\n \"npm-package-arg\": \"^13.0.0\",\n \"npm-pick-manifest\": \"^11.0.1\",\n \"npm-registry-fetch\": \"^19.0.0\",\n \"pacote\": \"^21.0.2\",\n \"parse-conflict-json\": \"^4.0.0\",\n \"proc-log\": \"^5.0.0\",\n \"proggy\": \"^3.0.0\",\n \"promise-all-reject-late\": \"^1.0.0\",\n \"promise-call-limit\": \"^3.0.1\",\n \"semver\": \"^7.3.7\",\n \"ssri\": \"^12.0.0\",\n \"treeverse\": \"^3.0.0\",\n \"walk-up-path\": \"^4.0.0\"\n },\n \"bin\": {\n \"arborist\": \"bin/index.js\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/@npmcli/git\": {\n \"version\": \"7.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/git/-/git-7.0.1.tgz\",\n \"integrity\": \"sha512-+XTFxK2jJF/EJJ5SoAzXk3qwIDfvFc5/g+bD274LZ7uY7LE8sTfG6Z8rOanPl2ZEvZWqNvmEdtXC25cE54VcoA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/promise-spawn\": \"^9.0.0\",\n \"ini\": \"^6.0.0\",\n \"lru-cache\": \"^11.2.1\",\n \"npm-pick-manifest\": \"^11.0.1\",\n \"proc-log\": \"^6.0.0\",\n \"promise-retry\": \"^2.0.1\",\n \"semver\": \"^7.3.5\",\n \"which\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/@npmcli/git/node_modules/proc-log\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/proc-log/-/proc-log-6.0.0.tgz\",\n \"integrity\": \"sha512-KG/XsTDN901PNfPfAMmj6N/Ywg9tM+bHK8pAz+27fS4N4Pcr+4zoYBOcGSBu6ceXYNPxkLpa4ohtfxV1XcLAfA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/@npmcli/promise-spawn\": {\n \"version\": \"9.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-9.0.1.tgz\",\n \"integrity\": \"sha512-OLUaoqBuyxeTqUvjA3FZFiXUfYC1alp3Sa99gW3EUDz3tZ3CbXDdcZ7qWKBzicrJleIgucoWamWH1saAmH/l2Q==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"which\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/cacache\": {\n \"version\": \"20.0.1\",\n \"resolved\": \"https://registry.npmjs.org/cacache/-/cacache-20.0.1.tgz\",\n \"integrity\": \"sha512-+7LYcYGBYoNqTp1Rv7Ny1YjUo5E0/ftkQtraH3vkfAGgVHc+ouWdC8okAwQgQR7EVIdW6JTzTmhKFwzb+4okAQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/fs\": \"^4.0.0\",\n \"fs-minipass\": \"^3.0.0\",\n \"glob\": \"^11.0.3\",\n \"lru-cache\": \"^11.1.0\",\n \"minipass\": \"^7.0.3\",\n \"minipass-collect\": \"^2.0.1\",\n \"minipass-flush\": \"^1.0.5\",\n \"minipass-pipeline\": \"^1.2.4\",\n \"p-map\": \"^7.0.2\",\n \"ssri\": \"^12.0.0\",\n \"unique-filename\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/chownr\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz\",\n \"integrity\": \"sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/fs-minipass\": {\n \"version\": \"3.0.3\",\n \"resolved\": \"https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz\",\n \"integrity\": \"sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"minipass\": \"^7.0.3\"\n },\n \"engines\": {\n \"node\": \"^14.17.0 || ^16.13.0 || >=18.0.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/glob\": {\n \"version\": \"11.1.0\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-11.1.0.tgz\",\n \"integrity\": \"sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"foreground-child\": \"^3.3.1\",\n \"jackspeak\": \"^4.1.1\",\n \"minimatch\": \"^10.1.1\",\n \"minipass\": \"^7.1.2\",\n \"package-json-from-dist\": \"^1.0.0\",\n \"path-scurry\": \"^2.0.0\"\n },\n \"bin\": {\n \"glob\": \"dist/esm/bin.mjs\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/hosted-git-info\": {\n \"version\": \"9.0.2\",\n \"resolved\": \"https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz\",\n \"integrity\": \"sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"lru-cache\": \"^11.1.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/ini\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/ini/-/ini-6.0.0.tgz\",\n \"integrity\": \"sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/isexe\": {\n \"version\": \"3.1.1\",\n \"resolved\": \"https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz\",\n \"integrity\": \"sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/jackspeak\": {\n \"version\": \"4.1.1\",\n \"resolved\": \"https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz\",\n \"integrity\": \"sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/cliui\": \"^8.0.2\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/lru-cache\": {\n \"version\": \"11.2.2\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz\",\n \"integrity\": \"sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/minimatch\": {\n \"version\": \"10.1.1\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz\",\n \"integrity\": \"sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/brace-expansion\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/minizlib\": {\n \"version\": \"3.1.0\",\n \"resolved\": \"https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz\",\n \"integrity\": \"sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"minipass\": \"^7.1.2\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/npm-bundled\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/npm-bundled/-/npm-bundled-5.0.0.tgz\",\n \"integrity\": \"sha512-JLSpbzh6UUXIEoqPsYBvVNVmyrjVZ1fzEFbqxKkTJQkWBO3xFzFT+KDnSKQWwOQNbuWRwt5LSD6HOTLGIWzfrw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"npm-normalize-package-bin\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/npm-normalize-package-bin\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-5.0.0.tgz\",\n \"integrity\": \"sha512-CJi3OS4JLsNMmr2u07OJlhcrPxCeOeP/4xq67aWNai6TNWWbTrlNDgl8NcFKVlcBKp18GPj+EzbNIgrBfZhsag==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/npm-pick-manifest\": {\n \"version\": \"11.0.3\",\n \"resolved\": \"https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-11.0.3.tgz\",\n \"integrity\": \"sha512-buzyCfeoGY/PxKqmBqn1IUJrZnUi1VVJTdSSRPGI60tJdUhUoSQFhs0zycJokDdOznQentgrpf8LayEHyyYlqQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"npm-install-checks\": \"^8.0.0\",\n \"npm-normalize-package-bin\": \"^5.0.0\",\n \"npm-package-arg\": \"^13.0.0\",\n \"semver\": \"^7.3.5\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/npm-pick-manifest/node_modules/npm-install-checks\": {\n \"version\": \"8.0.0\",\n \"resolved\": \"https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-8.0.0.tgz\",\n \"integrity\": \"sha512-ScAUdMpyzkbpxoNekQ3tNRdFI8SJ86wgKZSQZdUxT+bj0wVFpsEMWnkXP0twVe1gJyNF5apBWDJhhIbgrIViRA==\",\n \"dev\": true,\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"semver\": \"^7.1.1\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/p-map\": {\n \"version\": \"7.0.4\",\n \"resolved\": \"https://registry.npmjs.org/p-map/-/p-map-7.0.4.tgz\",\n \"integrity\": \"sha512-tkAQEw8ysMzmkhgw8k+1U/iPhWNhykKnSk4Rd5zLoPJCuJaGRPo6YposrZgaxHKzDHdDWWZvE/Sk7hsL2X/CpQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/pacote\": {\n \"version\": \"21.0.4\",\n \"resolved\": \"https://registry.npmjs.org/pacote/-/pacote-21.0.4.tgz\",\n \"integrity\": \"sha512-RplP/pDW0NNNDh3pnaoIWYPvNenS7UqMbXyvMqJczosiFWTeGGwJC2NQBLqKf4rGLFfwCOnntw1aEp9Jiqm1MA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/git\": \"^7.0.0\",\n \"@npmcli/installed-package-contents\": \"^4.0.0\",\n \"@npmcli/package-json\": \"^7.0.0\",\n \"@npmcli/promise-spawn\": \"^9.0.0\",\n \"@npmcli/run-script\": \"^10.0.0\",\n \"cacache\": \"^20.0.0\",\n \"fs-minipass\": \"^3.0.0\",\n \"minipass\": \"^7.0.2\",\n \"npm-package-arg\": \"^13.0.0\",\n \"npm-packlist\": \"^10.0.1\",\n \"npm-pick-manifest\": \"^11.0.1\",\n \"npm-registry-fetch\": \"^19.0.0\",\n \"proc-log\": \"^6.0.0\",\n \"promise-retry\": \"^2.0.1\",\n \"sigstore\": \"^4.0.0\",\n \"ssri\": \"^13.0.0\",\n \"tar\": \"^7.4.3\"\n },\n \"bin\": {\n \"pacote\": \"bin/index.js\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/pacote/node_modules/@npmcli/installed-package-contents\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-4.0.0.tgz\",\n \"integrity\": \"sha512-yNyAdkBxB72gtZ4GrwXCM0ZUedo9nIbOMKfGjt6Cu6DXf0p8y1PViZAKDC8q8kv/fufx0WTjRBdSlyrvnP7hmA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"npm-bundled\": \"^5.0.0\",\n \"npm-normalize-package-bin\": \"^5.0.0\"\n },\n \"bin\": {\n \"installed-package-contents\": \"bin/index.js\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/pacote/node_modules/proc-log\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/proc-log/-/proc-log-6.0.0.tgz\",\n \"integrity\": \"sha512-KG/XsTDN901PNfPfAMmj6N/Ywg9tM+bHK8pAz+27fS4N4Pcr+4zoYBOcGSBu6ceXYNPxkLpa4ohtfxV1XcLAfA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/pacote/node_modules/ssri\": {\n \"version\": \"13.0.0\",\n \"resolved\": \"https://registry.npmjs.org/ssri/-/ssri-13.0.0.tgz\",\n \"integrity\": \"sha512-yizwGBpbCn4YomB2lzhZqrHLJoqFGXihNbib3ozhqF/cIp5ue+xSmOQrjNasEE62hFxsCcg/V/z23t4n8jMEng==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"minipass\": \"^7.0.3\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/path-scurry\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz\",\n \"integrity\": \"sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"lru-cache\": \"^11.0.0\",\n \"minipass\": \"^7.1.2\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/tar\": {\n \"version\": \"7.5.3\",\n \"resolved\": \"https://registry.npmjs.org/tar/-/tar-7.5.3.tgz\",\n \"integrity\": \"sha512-ENg5JUHUm2rDD7IvKNFGzyElLXNjachNLp6RaGf4+JOgxXHkqA+gq81ZAMCUmtMtqBsoU62lcp6S27g1LCYGGQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/fs-minipass\": \"^4.0.0\",\n \"chownr\": \"^3.0.0\",\n \"minipass\": \"^7.1.2\",\n \"minizlib\": \"^3.1.0\",\n \"yallist\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/which\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/which/-/which-6.0.0.tgz\",\n \"integrity\": \"sha512-f+gEpIKMR9faW/JgAgPK1D7mekkFoqbmiwvNzuhsHetni20QSgzg9Vhn0g2JSJkkfehQnqdUAx7/e15qS1lPxg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"isexe\": \"^3.1.1\"\n },\n \"bin\": {\n \"node-which\": \"bin/which.js\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/arborist/node_modules/yallist\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz\",\n \"integrity\": \"sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/@npmcli/fs\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/fs/-/fs-4.0.0.tgz\",\n \"integrity\": \"sha512-/xGlezI6xfGO9NwuJlnwz/K14qD1kCSAGtacBHnGzeAIuJGazcp45KP5NuyARXoKb7cwulAGWVsbeSxdG/cb0Q==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"semver\": \"^7.3.5\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/@npmcli/git\": {\n \"version\": \"6.0.3\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/git/-/git-6.0.3.tgz\",\n \"integrity\": \"sha512-GUYESQlxZRAdhs3UhbB6pVRNUELQOHXwK9ruDkwmCv2aZ5y0SApQzUJCg02p3A7Ue2J5hxvlk1YI53c00NmRyQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/promise-spawn\": \"^8.0.0\",\n \"ini\": \"^5.0.0\",\n \"lru-cache\": \"^10.0.1\",\n \"npm-pick-manifest\": \"^10.0.0\",\n \"proc-log\": \"^5.0.0\",\n \"promise-retry\": \"^2.0.1\",\n \"semver\": \"^7.3.5\",\n \"which\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/@npmcli/git/node_modules/ini\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/ini/-/ini-5.0.0.tgz\",\n \"integrity\": \"sha512-+N0ngpO3e7cRUWOJAS7qw0IZIVc6XPrW4MlFBdD066F2L4k1L6ker3hLqSq7iXxU5tgS4WGkIUElWn5vogAEnw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/@npmcli/git/node_modules/isexe\": {\n \"version\": \"3.1.1\",\n \"resolved\": \"https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz\",\n \"integrity\": \"sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16\"\n }\n },\n \"node_modules/@npmcli/git/node_modules/lru-cache\": {\n \"version\": \"10.4.3\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz\",\n \"integrity\": \"sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/@npmcli/git/node_modules/which\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/which/-/which-5.0.0.tgz\",\n \"integrity\": \"sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"isexe\": \"^3.1.1\"\n },\n \"bin\": {\n \"node-which\": \"bin/which.js\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/@npmcli/installed-package-contents\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-3.0.0.tgz\",\n \"integrity\": \"sha512-fkxoPuFGvxyrH+OQzyTkX2LUEamrF4jZSmxjAtPPHHGO0dqsQ8tTKjnIS8SAnPHdk2I03BDtSMR5K/4loKg79Q==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"npm-bundled\": \"^4.0.0\",\n \"npm-normalize-package-bin\": \"^4.0.0\"\n },\n \"bin\": {\n \"installed-package-contents\": \"bin/index.js\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/@npmcli/map-workspaces\": {\n \"version\": \"5.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-5.0.1.tgz\",\n \"integrity\": \"sha512-LFEh3vY5nyiVI9IY9rko7FtAtS9fjgQySARlccKbnS7BMWFyQF73OT/n8NG22/8xyp57xPIl13gwO/OD63nktg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/name-from-folder\": \"^4.0.0\",\n \"@npmcli/package-json\": \"^7.0.0\",\n \"glob\": \"^11.0.3\",\n \"minimatch\": \"^10.0.3\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/map-workspaces/node_modules/@npmcli/name-from-folder\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-4.0.0.tgz\",\n \"integrity\": \"sha512-qfrhVlOSqmKM8i6rkNdZzABj8MKEITGFAY+4teqBziksCQAOLutiAxM1wY2BKEd8KjUSpWmWCYxvXr0y4VTlPg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/map-workspaces/node_modules/glob\": {\n \"version\": \"11.1.0\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-11.1.0.tgz\",\n \"integrity\": \"sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"foreground-child\": \"^3.3.1\",\n \"jackspeak\": \"^4.1.1\",\n \"minimatch\": \"^10.1.1\",\n \"minipass\": \"^7.1.2\",\n \"package-json-from-dist\": \"^1.0.0\",\n \"path-scurry\": \"^2.0.0\"\n },\n \"bin\": {\n \"glob\": \"dist/esm/bin.mjs\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/map-workspaces/node_modules/jackspeak\": {\n \"version\": \"4.1.1\",\n \"resolved\": \"https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz\",\n \"integrity\": \"sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/cliui\": \"^8.0.2\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/map-workspaces/node_modules/lru-cache\": {\n \"version\": \"11.2.2\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz\",\n \"integrity\": \"sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"node_modules/@npmcli/map-workspaces/node_modules/minimatch\": {\n \"version\": \"10.1.1\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz\",\n \"integrity\": \"sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/brace-expansion\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/map-workspaces/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/@npmcli/map-workspaces/node_modules/path-scurry\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz\",\n \"integrity\": \"sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"lru-cache\": \"^11.0.0\",\n \"minipass\": \"^7.1.2\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/metavuln-calculator\": {\n \"version\": \"9.0.3\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-9.0.3.tgz\",\n \"integrity\": \"sha512-94GLSYhLXF2t2LAC7pDwLaM4uCARzxShyAQKsirmlNcpidH89VA4/+K1LbJmRMgz5gy65E/QBBWQdUvGLe2Frg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"cacache\": \"^20.0.0\",\n \"json-parse-even-better-errors\": \"^5.0.0\",\n \"pacote\": \"^21.0.0\",\n \"proc-log\": \"^6.0.0\",\n \"semver\": \"^7.3.5\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/metavuln-calculator/node_modules/cacache\": {\n \"version\": \"20.0.1\",\n \"resolved\": \"https://registry.npmjs.org/cacache/-/cacache-20.0.1.tgz\",\n \"integrity\": \"sha512-+7LYcYGBYoNqTp1Rv7Ny1YjUo5E0/ftkQtraH3vkfAGgVHc+ouWdC8okAwQgQR7EVIdW6JTzTmhKFwzb+4okAQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/fs\": \"^4.0.0\",\n \"fs-minipass\": \"^3.0.0\",\n \"glob\": \"^11.0.3\",\n \"lru-cache\": \"^11.1.0\",\n \"minipass\": \"^7.0.3\",\n \"minipass-collect\": \"^2.0.1\",\n \"minipass-flush\": \"^1.0.5\",\n \"minipass-pipeline\": \"^1.2.4\",\n \"p-map\": \"^7.0.2\",\n \"ssri\": \"^12.0.0\",\n \"unique-filename\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/metavuln-calculator/node_modules/fs-minipass\": {\n \"version\": \"3.0.3\",\n \"resolved\": \"https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz\",\n \"integrity\": \"sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"minipass\": \"^7.0.3\"\n },\n \"engines\": {\n \"node\": \"^14.17.0 || ^16.13.0 || >=18.0.0\"\n }\n },\n \"node_modules/@npmcli/metavuln-calculator/node_modules/glob\": {\n \"version\": \"11.1.0\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-11.1.0.tgz\",\n \"integrity\": \"sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"foreground-child\": \"^3.3.1\",\n \"jackspeak\": \"^4.1.1\",\n \"minimatch\": \"^10.1.1\",\n \"minipass\": \"^7.1.2\",\n \"package-json-from-dist\": \"^1.0.0\",\n \"path-scurry\": \"^2.0.0\"\n },\n \"bin\": {\n \"glob\": \"dist/esm/bin.mjs\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/metavuln-calculator/node_modules/jackspeak\": {\n \"version\": \"4.1.1\",\n \"resolved\": \"https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz\",\n \"integrity\": \"sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/cliui\": \"^8.0.2\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/metavuln-calculator/node_modules/json-parse-even-better-errors\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-5.0.0.tgz\",\n \"integrity\": \"sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/metavuln-calculator/node_modules/lru-cache\": {\n \"version\": \"11.2.2\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz\",\n \"integrity\": \"sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"node_modules/@npmcli/metavuln-calculator/node_modules/minimatch\": {\n \"version\": \"10.1.1\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz\",\n \"integrity\": \"sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/brace-expansion\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/metavuln-calculator/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/@npmcli/metavuln-calculator/node_modules/p-map\": {\n \"version\": \"7.0.4\",\n \"resolved\": \"https://registry.npmjs.org/p-map/-/p-map-7.0.4.tgz\",\n \"integrity\": \"sha512-tkAQEw8ysMzmkhgw8k+1U/iPhWNhykKnSk4Rd5zLoPJCuJaGRPo6YposrZgaxHKzDHdDWWZvE/Sk7hsL2X/CpQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/@npmcli/metavuln-calculator/node_modules/path-scurry\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz\",\n \"integrity\": \"sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"lru-cache\": \"^11.0.0\",\n \"minipass\": \"^7.1.2\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/metavuln-calculator/node_modules/proc-log\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/proc-log/-/proc-log-6.0.0.tgz\",\n \"integrity\": \"sha512-KG/XsTDN901PNfPfAMmj6N/Ywg9tM+bHK8pAz+27fS4N4Pcr+4zoYBOcGSBu6ceXYNPxkLpa4ohtfxV1XcLAfA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/name-from-folder\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-3.0.0.tgz\",\n \"integrity\": \"sha512-61cDL8LUc9y80fXn+lir+iVt8IS0xHqEKwPu/5jCjxQTVoSCmkXvw4vbMrzAMtmghz3/AkiBjhHkDKUH+kf7kA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/@npmcli/node-gyp\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-4.0.0.tgz\",\n \"integrity\": \"sha512-+t5DZ6mO/QFh78PByMq1fGSAub/agLJZDRfJRMeOSNCt8s9YVlTjmGpIPwPhvXTGUIJk+WszlT0rQa1W33yzNA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/@npmcli/package-json\": {\n \"version\": \"7.0.2\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/package-json/-/package-json-7.0.2.tgz\",\n \"integrity\": \"sha512-0ylN3U5htO1SJTmy2YI78PZZjLkKUGg7EKgukb2CRi0kzyoDr0cfjHAzi7kozVhj2V3SxN1oyKqZ2NSo40z00g==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/git\": \"^7.0.0\",\n \"glob\": \"^11.0.3\",\n \"hosted-git-info\": \"^9.0.0\",\n \"json-parse-even-better-errors\": \"^5.0.0\",\n \"proc-log\": \"^6.0.0\",\n \"semver\": \"^7.5.3\",\n \"validate-npm-package-license\": \"^3.0.4\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/@npmcli/git\": {\n \"version\": \"7.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/git/-/git-7.0.1.tgz\",\n \"integrity\": \"sha512-+XTFxK2jJF/EJJ5SoAzXk3qwIDfvFc5/g+bD274LZ7uY7LE8sTfG6Z8rOanPl2ZEvZWqNvmEdtXC25cE54VcoA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/promise-spawn\": \"^9.0.0\",\n \"ini\": \"^6.0.0\",\n \"lru-cache\": \"^11.2.1\",\n \"npm-pick-manifest\": \"^11.0.1\",\n \"proc-log\": \"^6.0.0\",\n \"promise-retry\": \"^2.0.1\",\n \"semver\": \"^7.3.5\",\n \"which\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/@npmcli/promise-spawn\": {\n \"version\": \"9.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-9.0.1.tgz\",\n \"integrity\": \"sha512-OLUaoqBuyxeTqUvjA3FZFiXUfYC1alp3Sa99gW3EUDz3tZ3CbXDdcZ7qWKBzicrJleIgucoWamWH1saAmH/l2Q==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"which\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/glob\": {\n \"version\": \"11.1.0\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-11.1.0.tgz\",\n \"integrity\": \"sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"foreground-child\": \"^3.3.1\",\n \"jackspeak\": \"^4.1.1\",\n \"minimatch\": \"^10.1.1\",\n \"minipass\": \"^7.1.2\",\n \"package-json-from-dist\": \"^1.0.0\",\n \"path-scurry\": \"^2.0.0\"\n },\n \"bin\": {\n \"glob\": \"dist/esm/bin.mjs\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/hosted-git-info\": {\n \"version\": \"9.0.0\",\n \"resolved\": \"https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.0.tgz\",\n \"integrity\": \"sha512-gEf705MZLrDPkbbhi8PnoO4ZwYgKoNL+ISZ3AjZMht2r3N5tuTwncyDi6Fv2/qDnMmZxgs0yI8WDOyR8q3G+SQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"lru-cache\": \"^11.1.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/ini\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/ini/-/ini-6.0.0.tgz\",\n \"integrity\": \"sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/isexe\": {\n \"version\": \"3.1.1\",\n \"resolved\": \"https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz\",\n \"integrity\": \"sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/jackspeak\": {\n \"version\": \"4.1.1\",\n \"resolved\": \"https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz\",\n \"integrity\": \"sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/cliui\": \"^8.0.2\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/json-parse-even-better-errors\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-5.0.0.tgz\",\n \"integrity\": \"sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/lru-cache\": {\n \"version\": \"11.2.2\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz\",\n \"integrity\": \"sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/minimatch\": {\n \"version\": \"10.1.1\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz\",\n \"integrity\": \"sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/brace-expansion\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/npm-install-checks\": {\n \"version\": \"8.0.0\",\n \"resolved\": \"https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-8.0.0.tgz\",\n \"integrity\": \"sha512-ScAUdMpyzkbpxoNekQ3tNRdFI8SJ86wgKZSQZdUxT+bj0wVFpsEMWnkXP0twVe1gJyNF5apBWDJhhIbgrIViRA==\",\n \"dev\": true,\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"semver\": \"^7.1.1\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/npm-normalize-package-bin\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-5.0.0.tgz\",\n \"integrity\": \"sha512-CJi3OS4JLsNMmr2u07OJlhcrPxCeOeP/4xq67aWNai6TNWWbTrlNDgl8NcFKVlcBKp18GPj+EzbNIgrBfZhsag==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/npm-pick-manifest\": {\n \"version\": \"11.0.3\",\n \"resolved\": \"https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-11.0.3.tgz\",\n \"integrity\": \"sha512-buzyCfeoGY/PxKqmBqn1IUJrZnUi1VVJTdSSRPGI60tJdUhUoSQFhs0zycJokDdOznQentgrpf8LayEHyyYlqQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"npm-install-checks\": \"^8.0.0\",\n \"npm-normalize-package-bin\": \"^5.0.0\",\n \"npm-package-arg\": \"^13.0.0\",\n \"semver\": \"^7.3.5\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/path-scurry\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz\",\n \"integrity\": \"sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"lru-cache\": \"^11.0.0\",\n \"minipass\": \"^7.1.2\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/proc-log\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/proc-log/-/proc-log-6.0.0.tgz\",\n \"integrity\": \"sha512-KG/XsTDN901PNfPfAMmj6N/Ywg9tM+bHK8pAz+27fS4N4Pcr+4zoYBOcGSBu6ceXYNPxkLpa4ohtfxV1XcLAfA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/package-json/node_modules/which\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/which/-/which-6.0.0.tgz\",\n \"integrity\": \"sha512-f+gEpIKMR9faW/JgAgPK1D7mekkFoqbmiwvNzuhsHetni20QSgzg9Vhn0g2JSJkkfehQnqdUAx7/e15qS1lPxg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"isexe\": \"^3.1.1\"\n },\n \"bin\": {\n \"node-which\": \"bin/which.js\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/promise-spawn\": {\n \"version\": \"8.0.3\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-8.0.3.tgz\",\n \"integrity\": \"sha512-Yb00SWaL4F8w+K8YGhQ55+xE4RUNdMHV43WZGsiTM92gS+lC0mGsn7I4hLug7pbao035S6bj3Y3w0cUNGLfmkg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"which\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/@npmcli/promise-spawn/node_modules/isexe\": {\n \"version\": \"3.1.1\",\n \"resolved\": \"https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz\",\n \"integrity\": \"sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16\"\n }\n },\n \"node_modules/@npmcli/promise-spawn/node_modules/which\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/which/-/which-5.0.0.tgz\",\n \"integrity\": \"sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"isexe\": \"^3.1.1\"\n },\n \"bin\": {\n \"node-which\": \"bin/which.js\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/@npmcli/query\": {\n \"version\": \"4.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/query/-/query-4.0.1.tgz\",\n \"integrity\": \"sha512-4OIPFb4weUUwkDXJf4Hh1inAn8neBGq3xsH4ZsAaN6FK3ldrFkH7jSpCc7N9xesi0Sp+EBXJ9eGMDrEww2Ztqw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"postcss-selector-parser\": \"^7.0.0\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/@npmcli/redact\": {\n \"version\": \"3.2.2\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/redact/-/redact-3.2.2.tgz\",\n \"integrity\": \"sha512-7VmYAmk4csGv08QzrDKScdzn11jHPFGyqJW39FyPgPuAp3zIaUmuCo1yxw9aGs+NEJuTGQ9Gwqpt93vtJubucg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/@npmcli/run-script\": {\n \"version\": \"10.0.2\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/run-script/-/run-script-10.0.2.tgz\",\n \"integrity\": \"sha512-9lCTqxaoa9c9cdkzSSx+q/qaYrCrUPEwTWzLkVYg1/T8ESH3BG9vmb1zRc6ODsBVB0+gnGRSqSr01pxTS1yX3A==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/node-gyp\": \"^5.0.0\",\n \"@npmcli/package-json\": \"^7.0.0\",\n \"@npmcli/promise-spawn\": \"^9.0.0\",\n \"node-gyp\": \"^11.0.0\",\n \"proc-log\": \"^6.0.0\",\n \"which\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/run-script/node_modules/@npmcli/node-gyp\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-5.0.0.tgz\",\n \"integrity\": \"sha512-uuG5HZFXLfyFKqg8QypsmgLQW7smiRjVc45bqD/ofZZcR/uxEjgQU8qDPv0s9TEeMUiAAU/GC5bR6++UdTirIQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/run-script/node_modules/@npmcli/promise-spawn\": {\n \"version\": \"9.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-9.0.1.tgz\",\n \"integrity\": \"sha512-OLUaoqBuyxeTqUvjA3FZFiXUfYC1alp3Sa99gW3EUDz3tZ3CbXDdcZ7qWKBzicrJleIgucoWamWH1saAmH/l2Q==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"which\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/run-script/node_modules/@npmcli/promise-spawn/node_modules/which\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/which/-/which-6.0.0.tgz\",\n \"integrity\": \"sha512-f+gEpIKMR9faW/JgAgPK1D7mekkFoqbmiwvNzuhsHetni20QSgzg9Vhn0g2JSJkkfehQnqdUAx7/e15qS1lPxg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"isexe\": \"^3.1.1\"\n },\n \"bin\": {\n \"node-which\": \"bin/which.js\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/run-script/node_modules/isexe\": {\n \"version\": \"3.1.1\",\n \"resolved\": \"https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz\",\n \"integrity\": \"sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16\"\n }\n },\n \"node_modules/@npmcli/run-script/node_modules/proc-log\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/proc-log/-/proc-log-6.0.0.tgz\",\n \"integrity\": \"sha512-KG/XsTDN901PNfPfAMmj6N/Ywg9tM+bHK8pAz+27fS4N4Pcr+4zoYBOcGSBu6ceXYNPxkLpa4ohtfxV1XcLAfA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@npmcli/run-script/node_modules/which\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/which/-/which-5.0.0.tgz\",\n \"integrity\": \"sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"isexe\": \"^3.1.1\"\n },\n \"bin\": {\n \"node-which\": \"bin/which.js\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/@nx/devkit\": {\n \"version\": \"21.6.2\",\n \"resolved\": \"https://registry.npmjs.org/@nx/devkit/-/devkit-21.6.2.tgz\",\n \"integrity\": \"sha512-iGTiG6ZknDPfhmUUMRBBgb2498xUk4gBeLu1nI2BbVNNt3Tmiz/U7OjfV1yJ4Hc6CeJoY0An34VdmWE/UDQYrA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ejs\": \"^3.1.7\",\n \"enquirer\": \"~2.3.6\",\n \"ignore\": \"^5.0.4\",\n \"minimatch\": \"9.0.3\",\n \"semver\": \"^7.5.3\",\n \"tslib\": \"^2.3.0\",\n \"yargs-parser\": \"21.1.1\"\n },\n \"peerDependencies\": {\n \"nx\": \">= 20 <= 22\"\n }\n },\n \"node_modules/@nx/devkit/node_modules/brace-expansion\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz\",\n \"integrity\": \"sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"balanced-match\": \"^1.0.0\"\n }\n },\n \"node_modules/@nx/devkit/node_modules/minimatch\": {\n \"version\": \"9.0.3\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz\",\n \"integrity\": \"sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@nx/nx-darwin-arm64\": {\n \"version\": \"21.6.2\",\n \"resolved\": \"https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-21.6.2.tgz\",\n \"integrity\": \"sha512-Iwf7gxWMeDdrNqXYkVOib6PlDYwLw51+nMiFm1UW5nKxbQyVYHp7lhQNHsZrQ7Oqo84m9swWgzE7bhs21HkbYQ==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"dev\": true,\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"darwin\"\n ]\n },\n \"node_modules/@nx/nx-darwin-x64\": {\n \"version\": \"21.6.2\",\n \"resolved\": \"https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-21.6.2.tgz\",\n \"integrity\": \"sha512-A+q5AULxNEk15ol8ELmnOIUQuwBV5n9vK/vpzpfmTQqsMAUC6ksdBOI8N7I6+YVWLV0vUHWoRp9iH7I2IecERQ==\",\n \"cpu\": [\n \"x64\"\n ],\n \"dev\": true,\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"darwin\"\n ]\n },\n \"node_modules/@nx/nx-freebsd-x64\": {\n \"version\": \"21.6.2\",\n \"resolved\": \"https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-21.6.2.tgz\",\n \"integrity\": \"sha512-Hw6eOsdtD21j/B514eRJzgX03ew8ErFCfxWtjLwl7wB31Dw4nZbScj2FNDTc0xtg6oXCkw5Gt5uFKI5QFQUVfg==\",\n \"cpu\": [\n \"x64\"\n ],\n \"dev\": true,\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"freebsd\"\n ]\n },\n \"node_modules/@nx/nx-linux-arm-gnueabihf\": {\n \"version\": \"21.6.2\",\n \"resolved\": \"https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-21.6.2.tgz\",\n \"integrity\": \"sha512-fzFyOioyO0G+NqThTwqn6YRcVZOHdsdN7M/lGSgjgfOChNuf3A0eTQzy2jh/8j868YpKV/esPlBphq3CGXWPmg==\",\n \"cpu\": [\n \"arm\"\n ],\n \"dev\": true,\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@nx/nx-linux-arm64-gnu\": {\n \"version\": \"21.6.2\",\n \"resolved\": \"https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-21.6.2.tgz\",\n \"integrity\": \"sha512-daRHdZzJWtzuEkrN+jDKdN59K2nPsXIHbWZq/4bIxvz/hszRX4hQZcrpVgtr0YV6jHY+/gKZCJsKnr2yYdaF3w==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"dev\": true,\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@nx/nx-linux-arm64-musl\": {\n \"version\": \"21.6.2\",\n \"resolved\": \"https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-21.6.2.tgz\",\n \"integrity\": \"sha512-pB67mhywxV+WrVCiYV/+DgK2lfen3dv8PPgmBN/7qHQUgHqTJSLw7f9upiLlApuVN20qyCaktNT6Nq41Q88NCg==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"dev\": true,\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@nx/nx-linux-x64-gnu\": {\n \"version\": \"21.6.2\",\n \"resolved\": \"https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-21.6.2.tgz\",\n \"integrity\": \"sha512-pavN0n/VdQP2qKxdjdL8lt0fJWK5N3AvH3veSM5UROZ06HZVURcqEt3T74vLUGRiRnIPbFO/YEJGt2cO2THwXg==\",\n \"cpu\": [\n \"x64\"\n ],\n \"dev\": true,\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@nx/nx-linux-x64-musl\": {\n \"version\": \"21.6.2\",\n \"resolved\": \"https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-21.6.2.tgz\",\n \"integrity\": \"sha512-nEEkb3fBuqL18q6q7oqC1PpRiP8LMCmLf7UkGl6owDzCPy48K36Nept2YjHzABdUN2Wv5kojCWjNpGqhnTZSiw==\",\n \"cpu\": [\n \"x64\"\n ],\n \"dev\": true,\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@nx/nx-win32-arm64-msvc\": {\n \"version\": \"21.6.2\",\n \"resolved\": \"https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-21.6.2.tgz\",\n \"integrity\": \"sha512-FnVZbMHN4PeaNdyPDNKyUWCK1+XKBi3A15jb0VdiJHTv+6jzNxBfPZfsI6RkAjSag3TeVC/Lgz0asWTW3LDyXA==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"dev\": true,\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"win32\"\n ]\n },\n \"node_modules/@nx/nx-win32-x64-msvc\": {\n \"version\": \"21.6.2\",\n \"resolved\": \"https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-21.6.2.tgz\",\n \"integrity\": \"sha512-7xzDBz7TgaCfAxFa1Z1V+1YXNiCBHSUzLOeWAQYZ1McBltuxjEddK4w4FcHMVvjs7NUUTja+5fDxE42rUp9IQw==\",\n \"cpu\": [\n \"x64\"\n ],\n \"dev\": true,\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"win32\"\n ]\n },\n \"node_modules/@octokit/auth-token\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz\",\n \"integrity\": \"sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/@octokit/core\": {\n \"version\": \"5.2.1\",\n \"resolved\": \"https://registry.npmjs.org/@octokit/core/-/core-5.2.1.tgz\",\n \"integrity\": \"sha512-dKYCMuPO1bmrpuogcjQ8z7ICCH3FP6WmxpwC03yjzGfZhj9fTJg6+bS1+UAplekbN2C+M61UNllGOOoAfGCrdQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@octokit/auth-token\": \"^4.0.0\",\n \"@octokit/graphql\": \"^7.1.0\",\n \"@octokit/request\": \"^8.4.1\",\n \"@octokit/request-error\": \"^5.1.1\",\n \"@octokit/types\": \"^13.0.0\",\n \"before-after-hook\": \"^2.2.0\",\n \"universal-user-agent\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/@octokit/endpoint\": {\n \"version\": \"9.0.6\",\n \"resolved\": \"https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz\",\n \"integrity\": \"sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@octokit/types\": \"^13.1.0\",\n \"universal-user-agent\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/@octokit/graphql\": {\n \"version\": \"7.1.1\",\n \"resolved\": \"https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.1.tgz\",\n \"integrity\": \"sha512-3mkDltSfcDUoa176nlGoA32RGjeWjl3K7F/BwHwRMJUW/IteSa4bnSV8p2ThNkcIcZU2umkZWxwETSSCJf2Q7g==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@octokit/request\": \"^8.4.1\",\n \"@octokit/types\": \"^13.0.0\",\n \"universal-user-agent\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/@octokit/openapi-types\": {\n \"version\": \"24.2.0\",\n \"resolved\": \"https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz\",\n \"integrity\": \"sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@octokit/plugin-enterprise-rest\": {\n \"version\": \"6.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz\",\n \"integrity\": \"sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@octokit/plugin-paginate-rest\": {\n \"version\": \"11.4.4-cjs.2\",\n \"resolved\": \"https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.4-cjs.2.tgz\",\n \"integrity\": \"sha512-2dK6z8fhs8lla5PaOTgqfCGBxgAv/le+EhPs27KklPhm1bKObpu6lXzwfUEQ16ajXzqNrKMujsFyo9K2eaoISw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@octokit/types\": \"^13.7.0\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n },\n \"peerDependencies\": {\n \"@octokit/core\": \"5\"\n }\n },\n \"node_modules/@octokit/plugin-request-log\": {\n \"version\": \"4.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-4.0.1.tgz\",\n \"integrity\": \"sha512-GihNqNpGHorUrO7Qa9JbAl0dbLnqJVrV8OXe2Zm5/Y4wFkZQDfTreBzVmiRfJVfE4mClXdihHnbpyyO9FSX4HA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 18\"\n },\n \"peerDependencies\": {\n \"@octokit/core\": \"5\"\n }\n },\n \"node_modules/@octokit/plugin-rest-endpoint-methods\": {\n \"version\": \"13.3.2-cjs.1\",\n \"resolved\": \"https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.3.2-cjs.1.tgz\",\n \"integrity\": \"sha512-VUjIjOOvF2oELQmiFpWA1aOPdawpyaCUqcEBc/UOUnj3Xp6DJGrJ1+bjUIIDzdHjnFNO6q57ODMfdEZnoBkCwQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@octokit/types\": \"^13.8.0\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n },\n \"peerDependencies\": {\n \"@octokit/core\": \"^5\"\n }\n },\n \"node_modules/@octokit/request\": {\n \"version\": \"8.4.1\",\n \"resolved\": \"https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz\",\n \"integrity\": \"sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@octokit/endpoint\": \"^9.0.6\",\n \"@octokit/request-error\": \"^5.1.1\",\n \"@octokit/types\": \"^13.1.0\",\n \"universal-user-agent\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/@octokit/request-error\": {\n \"version\": \"5.1.1\",\n \"resolved\": \"https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz\",\n \"integrity\": \"sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@octokit/types\": \"^13.1.0\",\n \"deprecation\": \"^2.0.0\",\n \"once\": \"^1.4.0\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/@octokit/rest\": {\n \"version\": \"20.1.2\",\n \"resolved\": \"https://registry.npmjs.org/@octokit/rest/-/rest-20.1.2.tgz\",\n \"integrity\": \"sha512-GmYiltypkHHtihFwPRxlaorG5R9VAHuk/vbszVoRTGXnAsY60wYLkh/E2XiFmdZmqrisw+9FaazS1i5SbdWYgA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@octokit/core\": \"^5.0.2\",\n \"@octokit/plugin-paginate-rest\": \"11.4.4-cjs.2\",\n \"@octokit/plugin-request-log\": \"^4.0.0\",\n \"@octokit/plugin-rest-endpoint-methods\": \"13.3.2-cjs.1\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/@octokit/types\": {\n \"version\": \"13.10.0\",\n \"resolved\": \"https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz\",\n \"integrity\": \"sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@octokit/openapi-types\": \"^24.2.0\"\n }\n },\n \"node_modules/@pkgjs/parseargs\": {\n \"version\": \"0.11.0\",\n \"resolved\": \"https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz\",\n \"integrity\": \"sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==\",\n \"optional\": true,\n \"engines\": {\n \"node\": \">=14\"\n }\n },\n \"node_modules/@promptbook/utils\": {\n \"version\": \"0.69.5\",\n \"resolved\": \"https://registry.npmjs.org/@promptbook/utils/-/utils-0.69.5.tgz\",\n \"integrity\": \"sha512-xm5Ti/Hp3o4xHrsK9Yy3MS6KbDxYbq485hDsFvxqaNA7equHLPdo8H8faTitTeb14QCDfLW4iwCxdVYu5sn6YQ==\",\n \"funding\": [\n {\n \"type\": \"individual\",\n \"url\": \"https://buymeacoffee.com/hejny\"\n },\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/webgptorg/promptbook/blob/main/README.md#%EF%B8%8F-contributing\"\n }\n ],\n \"license\": \"CC-BY-4.0\",\n \"dependencies\": {\n \"spacetrim\": \"0.11.59\"\n }\n },\n \"node_modules/@puppeteer/browsers\": {\n \"version\": \"2.11.0\",\n \"resolved\": \"https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.11.0.tgz\",\n \"integrity\": \"sha512-n6oQX6mYkG8TRPuPXmbPidkUbsSRalhmaaVAQxvH1IkQy63cwsH+kOjB3e4cpCDHg0aSvsiX9bQ4s2VB6mGWUQ==\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"debug\": \"^4.4.3\",\n \"extract-zip\": \"^2.0.1\",\n \"progress\": \"^2.0.3\",\n \"proxy-agent\": \"^6.5.0\",\n \"semver\": \"^7.7.3\",\n \"tar-fs\": \"^3.1.1\",\n \"yargs\": \"^17.7.2\"\n },\n \"bin\": {\n \"browsers\": \"lib/cjs/main-cli.js\"\n },\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/@puppeteer/browsers/node_modules/debug\": {\n \"version\": \"4.4.3\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.4.3.tgz\",\n \"integrity\": \"sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.3\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@puppeteer/browsers/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz\",\n \"integrity\": \"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@puppeteer/browsers/node_modules/semver\": {\n \"version\": \"7.7.3\",\n \"resolved\": \"https://registry.npmjs.org/semver/-/semver-7.7.3.tgz\",\n \"integrity\": \"sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==\",\n \"license\": \"ISC\",\n \"bin\": {\n \"semver\": \"bin/semver.js\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/@sec-ant/readable-stream\": {\n \"version\": \"0.4.1\",\n \"resolved\": \"https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz\",\n \"integrity\": \"sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@sidvind/better-ajv-errors\": {\n \"version\": \"4.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@sidvind/better-ajv-errors/-/better-ajv-errors-4.0.1.tgz\",\n \"integrity\": \"sha512-6arF1ssKxItxgitPYXafUoLmsVBA6K7m9+ZGj6hLDoBl7nWpJ33EInwQUdHTle2METeWGxgQiqSex20KZRykew==\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"kleur\": \"^4.1.0\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n },\n \"peerDependencies\": {\n \"ajv\": \"^7.0.0 || ^8.0.0\"\n }\n },\n \"node_modules/@sigstore/bundle\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@sigstore/bundle/-/bundle-4.0.0.tgz\",\n \"integrity\": \"sha512-NwCl5Y0V6Di0NexvkTqdoVfmjTaQwoLM236r89KEojGmq/jMls8S+zb7yOwAPdXvbwfKDlP+lmXgAL4vKSQT+A==\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@sigstore/protobuf-specs\": \"^0.5.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@sigstore/core\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@sigstore/core/-/core-3.0.0.tgz\",\n \"integrity\": \"sha512-NgbJ+aW9gQl/25+GIEGYcCyi8M+ng2/5X04BMuIgoDfgvp18vDcoNHOQjQsG9418HGNYRxG3vfEXaR1ayD37gg==\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@sigstore/protobuf-specs\": {\n \"version\": \"0.5.0\",\n \"resolved\": \"https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.5.0.tgz\",\n \"integrity\": \"sha512-MM8XIwUjN2bwvCg1QvrMtbBmpcSHrkhFSCu1D11NyPvDQ25HEc4oG5/OcQfd/Tlf/OxmKWERDj0zGE23jQaMwA==\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/@sigstore/sign\": {\n \"version\": \"4.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@sigstore/sign/-/sign-4.0.1.tgz\",\n \"integrity\": \"sha512-KFNGy01gx9Y3IBPG/CergxR9RZpN43N+lt3EozEfeoyqm8vEiLxwRl3ZO5sPx3Obv1ix/p7FWOlPc2Jgwfp9PA==\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@sigstore/bundle\": \"^4.0.0\",\n \"@sigstore/core\": \"^3.0.0\",\n \"@sigstore/protobuf-specs\": \"^0.5.0\",\n \"make-fetch-happen\": \"^15.0.2\",\n \"proc-log\": \"^5.0.0\",\n \"promise-retry\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@sigstore/tuf\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@sigstore/tuf/-/tuf-4.0.0.tgz\",\n \"integrity\": \"sha512-0QFuWDHOQmz7t66gfpfNO6aEjoFrdhkJaej/AOqb4kqWZVbPWFZifXZzkxyQBB1OwTbkhdT3LNpMFxwkTvf+2w==\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@sigstore/protobuf-specs\": \"^0.5.0\",\n \"tuf-js\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@sigstore/verify\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@sigstore/verify/-/verify-3.0.0.tgz\",\n \"integrity\": \"sha512-moXtHH33AobOhTZF8xcX1MpOFqdvfCk7v6+teJL8zymBiDXwEsQH6XG9HGx2VIxnJZNm4cNSzflTLDnQLmIdmw==\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@sigstore/bundle\": \"^4.0.0\",\n \"@sigstore/core\": \"^3.0.0\",\n \"@sigstore/protobuf-specs\": \"^0.5.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@sinclair/typebox\": {\n \"version\": \"0.25.24\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@sindresorhus/merge-streams\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz\",\n \"integrity\": \"sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/@sinonjs/commons\": {\n \"version\": \"3.0.1\",\n \"resolved\": \"https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz\",\n \"integrity\": \"sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==\",\n \"license\": \"BSD-3-Clause\",\n \"dependencies\": {\n \"type-detect\": \"4.0.8\"\n }\n },\n \"node_modules/@sinonjs/fake-timers\": {\n \"version\": \"15.1.0\",\n \"resolved\": \"https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-15.1.0.tgz\",\n \"integrity\": \"sha512-cqfapCxwTGsrR80FEgOoPsTonoefMBY7dnUEbQ+GRcved0jvkJLzvX6F4WtN+HBqbPX/SiFsIRUp+IrCW/2I2w==\",\n \"license\": \"BSD-3-Clause\",\n \"dependencies\": {\n \"@sinonjs/commons\": \"^3.0.1\"\n }\n },\n \"node_modules/@sinonjs/samsam\": {\n \"version\": \"8.0.3\",\n \"resolved\": \"https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.3.tgz\",\n \"integrity\": \"sha512-hw6HbX+GyVZzmaYNh82Ecj1vdGZrqVIn/keDTg63IgAwiQPO+xCz99uG6Woqgb4tM0mUiFENKZ4cqd7IX94AXQ==\",\n \"license\": \"BSD-3-Clause\",\n \"dependencies\": {\n \"@sinonjs/commons\": \"^3.0.1\",\n \"type-detect\": \"^4.1.0\"\n }\n },\n \"node_modules/@sinonjs/samsam/node_modules/type-detect\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz\",\n \"integrity\": \"sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/@so-ric/colorspace\": {\n \"version\": \"1.1.6\",\n \"resolved\": \"https://registry.npmjs.org/@so-ric/colorspace/-/colorspace-1.1.6.tgz\",\n \"integrity\": \"sha512-/KiKkpHNOBgkFJwu9sh48LkHSMYGyuTcSFK/qMBdnOAlrRJzRSXAOFB5qwzaVQuDl8wAvHVMkaASQDReTahxuw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color\": \"^5.0.2\",\n \"text-hex\": \"1.0.x\"\n }\n },\n \"node_modules/@stylistic/eslint-plugin\": {\n \"version\": \"5.7.1\",\n \"resolved\": \"https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.7.1.tgz\",\n \"integrity\": \"sha512-zjTUwIsEfT+k9BmXwq1QEFYsb4afBlsI1AXFyWQBgggMzwBFOuu92pGrE5OFx90IOjNl+lUbQoTG7f8S0PkOdg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@eslint-community/eslint-utils\": \"^4.9.1\",\n \"@typescript-eslint/types\": \"^8.53.1\",\n \"eslint-visitor-keys\": \"^4.2.1\",\n \"espree\": \"^10.4.0\",\n \"estraverse\": \"^5.3.0\",\n \"picomatch\": \"^4.0.3\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"peerDependencies\": {\n \"eslint\": \">=9.0.0\"\n }\n },\n \"node_modules/@stylistic/eslint-plugin/node_modules/picomatch\": {\n \"version\": \"4.0.3\",\n \"resolved\": \"https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz\",\n \"integrity\": \"sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/jonschlinkert\"\n }\n },\n \"node_modules/@tootallnate/quickjs-emscripten\": {\n \"version\": \"0.23.0\",\n \"resolved\": \"https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz\",\n \"integrity\": \"sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@tsconfig/node10\": {\n \"version\": \"1.0.9\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@tsconfig/node12\": {\n \"version\": \"1.0.11\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@tsconfig/node16\": {\n \"version\": \"1.0.3\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@tsconfig/node20\": {\n \"version\": \"20.1.9\",\n \"resolved\": \"https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.9.tgz\",\n \"integrity\": \"sha512-IjlTv1RsvnPtUcjTqtVsZExKVq+KQx4g5pCP5tI7rAs6Xesl2qFwSz/tPDBC4JajkL/MlezBu3gPUwqRHl+RIg==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@tsd/typescript\": {\n \"version\": \"5.9.2\",\n \"resolved\": \"https://registry.npmjs.org/@tsd/typescript/-/typescript-5.9.2.tgz\",\n \"integrity\": \"sha512-mSMM0QtEPdMd+rdMDd17yCUYD4yI3pKHap89+jEZrZ3KIO5PhDofBjER0OtgHdvOXF74KMLO3fyD6k3Hz0v03A==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=14.17\"\n }\n },\n \"node_modules/@tufjs/canonical-json\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz\",\n \"integrity\": \"sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^16.14.0 || >=18.0.0\"\n }\n },\n \"node_modules/@tufjs/models\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@tufjs/models/-/models-4.0.0.tgz\",\n \"integrity\": \"sha512-h5x5ga/hh82COe+GoD4+gKUeV4T3iaYOxqLt41GRKApinPI7DMidhCmNVTjKfhCWFJIGXaFJee07XczdT4jdZQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@tufjs/canonical-json\": \"2.0.0\",\n \"minimatch\": \"^9.0.5\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/@tufjs/models/node_modules/brace-expansion\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz\",\n \"integrity\": \"sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"balanced-match\": \"^1.0.0\"\n }\n },\n \"node_modules/@tufjs/models/node_modules/minimatch\": {\n \"version\": \"9.0.5\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz\",\n \"integrity\": \"sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@tybys/wasm-util\": {\n \"version\": \"0.9.0\",\n \"resolved\": \"https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.9.0.tgz\",\n \"integrity\": \"sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"tslib\": \"^2.4.0\"\n }\n },\n \"node_modules/@types/archiver\": {\n \"version\": \"7.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@types/archiver/-/archiver-7.0.0.tgz\",\n \"integrity\": \"sha512-/3vwGwx9n+mCQdYZ2IKGGHEFL30I96UgBlk8EtRDDFQ9uxM1l4O5Ci6r00EMAkiDaTqD9DQ6nVrWRICnBPtzzg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/readdir-glob\": \"*\"\n }\n },\n \"node_modules/@types/argparse\": {\n \"version\": \"2.0.17\",\n \"resolved\": \"https://registry.npmjs.org/@types/argparse/-/argparse-2.0.17.tgz\",\n \"integrity\": \"sha512-fueJssTf+4dW4HODshEGkIZbkLKHzgu1FvCI4cTc/MKum/534Euo3SrN+ilq8xgyHnOjtmg33/hee8iXLRg1XA==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@types/async-lock\": {\n \"version\": \"1.4.2\",\n \"resolved\": \"https://registry.npmjs.org/@types/async-lock/-/async-lock-1.4.2.tgz\",\n \"integrity\": \"sha512-HlZ6Dcr205BmNhwkdXqrg2vkFMN2PluI7Lgr8In3B3wE5PiQHhjRqtW/lGdVU9gw+sM0JcIDx2AN+cW8oSWIcw==\",\n \"dev\": true\n },\n \"node_modules/@types/base64-stream\": {\n \"version\": \"1.0.5\",\n \"resolved\": \"https://registry.npmjs.org/@types/base64-stream/-/base64-stream-1.0.5.tgz\",\n \"integrity\": \"sha512-gXuo/a7pQ1EXlR5ksM2MccBLl6UUgAgnzR01r/QoHnkaSNinmzSdaGcCq5NAxn72dZ5A1zNYQIl+J9hPsBgBrA==\",\n \"dev\": true,\n \"dependencies\": {\n \"@types/node\": \"*\"\n }\n },\n \"node_modules/@types/bluebird\": {\n \"version\": \"3.5.42\",\n \"resolved\": \"https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.42.tgz\",\n \"integrity\": \"sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A==\",\n \"dev\": true\n },\n \"node_modules/@types/body-parser\": {\n \"version\": \"1.19.2\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/connect\": \"*\",\n \"@types/node\": \"*\"\n }\n },\n \"node_modules/@types/chai\": {\n \"version\": \"5.2.3\",\n \"resolved\": \"https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz\",\n \"integrity\": \"sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/deep-eql\": \"*\",\n \"assertion-error\": \"^2.0.1\"\n }\n },\n \"node_modules/@types/chai-as-promised\": {\n \"version\": \"8.0.2\",\n \"resolved\": \"https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-8.0.2.tgz\",\n \"integrity\": \"sha512-meQ1wDr1K5KRCSvG2lX7n7/5wf70BeptTKst0axGvnN6zqaVpRqegoIbugiAPSqOW9K9aL8gDVrm7a2LXOtn2Q==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/chai\": \"*\"\n }\n },\n \"node_modules/@types/connect\": {\n \"version\": \"3.4.35\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/node\": \"*\"\n }\n },\n \"node_modules/@types/deep-eql\": {\n \"version\": \"4.0.2\",\n \"resolved\": \"https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz\",\n \"integrity\": \"sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@types/eslint\": {\n \"version\": \"7.29.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/estree\": \"*\",\n \"@types/json-schema\": \"*\"\n }\n },\n \"node_modules/@types/estree\": {\n \"version\": \"1.0.6\",\n \"resolved\": \"https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz\",\n \"integrity\": \"sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@types/express\": {\n \"version\": \"5.0.6\",\n \"resolved\": \"https://registry.npmjs.org/@types/express/-/express-5.0.6.tgz\",\n \"integrity\": \"sha512-sKYVuV7Sv9fbPIt/442koC7+IIwK5olP1KWeD88e/idgoJqDm3JV/YUiPwkoKK92ylff2MGxSz1CSjsXelx0YA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/body-parser\": \"*\",\n \"@types/express-serve-static-core\": \"^5.0.0\",\n \"@types/serve-static\": \"^2\"\n }\n },\n \"node_modules/@types/express-serve-static-core\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.0.tgz\",\n \"integrity\": \"sha512-AbXMTZGt40T+KON9/Fdxx0B2WK5hsgxcfXJLr5bFpZ7b4JCex2WyQPTEKdXqfHiY5nKKBScZ7yCoO6Pvgxfvnw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/node\": \"*\",\n \"@types/qs\": \"*\",\n \"@types/range-parser\": \"*\",\n \"@types/send\": \"*\"\n }\n },\n \"node_modules/@types/http-errors\": {\n \"version\": \"2.0.5\",\n \"resolved\": \"https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz\",\n \"integrity\": \"sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@types/jsftp\": {\n \"version\": \"2.1.5\",\n \"resolved\": \"https://registry.npmjs.org/@types/jsftp/-/jsftp-2.1.5.tgz\",\n \"integrity\": \"sha512-g2W6f06wXWVYZw3f/z/N5VHRK69kb1nFaNcRnxs6YxwLph+G7ebd0+Aobd3jWu43oZuyHgycpJZPn+YdIU6qRw==\",\n \"dev\": true,\n \"dependencies\": {\n \"@types/node\": \"*\"\n }\n },\n \"node_modules/@types/json-schema\": {\n \"version\": \"7.0.15\",\n \"resolved\": \"https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz\",\n \"integrity\": \"sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==\"\n },\n \"node_modules/@types/klaw\": {\n \"version\": \"3.0.7\",\n \"resolved\": \"https://registry.npmjs.org/@types/klaw/-/klaw-3.0.7.tgz\",\n \"integrity\": \"sha512-ooZ+dVfTfg8RIUzwCBnHR6NirCB0amo1MNneUbL+Votca1H/eaMwkB31uDU9O6yKWNY5ngdYP3ywduOxm4KtMg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/node\": \"*\"\n }\n },\n \"node_modules/@types/lockfile\": {\n \"version\": \"1.0.4\",\n \"resolved\": \"https://registry.npmjs.org/@types/lockfile/-/lockfile-1.0.4.tgz\",\n \"integrity\": \"sha512-Q8oFIHJHr+htLrTXN2FuZfg+WXVHQRwU/hC2GpUu+Q8e3FUM9EDkS2pE3R2AO1ZGu56f479ybdMCNF1DAu8cAQ==\",\n \"dev\": true\n },\n \"node_modules/@types/lodash\": {\n \"version\": \"4.17.23\",\n \"resolved\": \"https://registry.npmjs.org/@types/lodash/-/lodash-4.17.23.tgz\",\n \"integrity\": \"sha512-RDvF6wTulMPjrNdCoYRC8gNR880JNGT8uB+REUpC2Ns4pRqQJhGz90wh7rgdXDPpCczF3VGktDuFGVnz8zP7HA==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@types/method-override\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@types/method-override/-/method-override-3.0.0.tgz\",\n \"integrity\": \"sha512-7XFHR6j7JljprBpzzRZatakUXm1kEGAM3PL/GSsGRHtDvOAKYCdmnXX/5YSl1eQrpJymGs9tRekSWEGaG+Ntjw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"peerDependencies\": {\n \"@types/express\": \"*\"\n }\n },\n \"node_modules/@types/minimatch\": {\n \"version\": \"5.1.2\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@types/minimist\": {\n \"version\": \"1.2.2\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@types/mocha\": {\n \"version\": \"10.0.10\",\n \"resolved\": \"https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz\",\n \"integrity\": \"sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@types/mv\": {\n \"version\": \"2.1.4\",\n \"resolved\": \"https://registry.npmjs.org/@types/mv/-/mv-2.1.4.tgz\",\n \"integrity\": \"sha512-MgEHBpXnQo44Q43j8G0Bvp/Yi8LYbC8hxKrRFMgDEDZMmzDKZLgiyMWtW49B37ko+QupgZ3G5rtPUnOGe5ixLw==\",\n \"dev\": true\n },\n \"node_modules/@types/ncp\": {\n \"version\": \"2.0.8\",\n \"resolved\": \"https://registry.npmjs.org/@types/ncp/-/ncp-2.0.8.tgz\",\n \"integrity\": \"sha512-pLNWVLCVWBLVM4F2OPjjK6FWFtByFKD7LhHryF+MbVLws7ENj09mKxRFlhkGPOXfJuaBAG+2iADKJsZwnAbYDw==\",\n \"dev\": true,\n \"dependencies\": {\n \"@types/node\": \"*\"\n }\n },\n \"node_modules/@types/node\": {\n \"version\": \"24.10.10\",\n \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-24.10.10.tgz\",\n \"integrity\": \"sha512-+0/4J266CBGPUq/ELg7QUHhN25WYjE0wYTPSQJn1xeu8DOlIOPxXxrNGiLmfAWl7HMMgWFWXpt9IDjMWrF5Iow==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"undici-types\": \"~7.16.0\"\n }\n },\n \"node_modules/@types/node/node_modules/undici-types\": {\n \"version\": \"7.16.0\",\n \"resolved\": \"https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz\",\n \"integrity\": \"sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@types/normalize-package-data\": {\n \"version\": \"2.4.4\",\n \"resolved\": \"https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz\",\n \"integrity\": \"sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@types/pluralize\": {\n \"version\": \"0.0.33\",\n \"resolved\": \"https://registry.npmjs.org/@types/pluralize/-/pluralize-0.0.33.tgz\",\n \"integrity\": \"sha512-JOqsl+ZoCpP4e8TDke9W79FDcSgPAR0l6pixx2JHkhnRjvShyYiAYw2LVsnA7K08Y6DeOnaU6ujmENO4os/cYg==\",\n \"dev\": true\n },\n \"node_modules/@types/qs\": {\n \"version\": \"6.9.7\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@types/range-parser\": {\n \"version\": \"1.2.4\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@types/readdir-glob\": {\n \"version\": \"1.1.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/node\": \"*\"\n }\n },\n \"node_modules/@types/semver\": {\n \"version\": \"7.7.1\",\n \"resolved\": \"https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz\",\n \"integrity\": \"sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@types/send\": {\n \"version\": \"0.17.4\",\n \"resolved\": \"https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz\",\n \"integrity\": \"sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/mime\": \"^1\",\n \"@types/node\": \"*\"\n }\n },\n \"node_modules/@types/send/node_modules/@types/mime\": {\n \"version\": \"1.3.5\",\n \"resolved\": \"https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz\",\n \"integrity\": \"sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@types/serve-favicon\": {\n \"version\": \"2.5.7\",\n \"resolved\": \"https://registry.npmjs.org/@types/serve-favicon/-/serve-favicon-2.5.7.tgz\",\n \"integrity\": \"sha512-z9TNUQXdQ+W/OJMP1e3KOYUZ99qJS4+ZfFOIrPGImcayqKoyifbJSEFkVq1MCKBbqjMZpjPj3B5ilrQAR2+TOw==\",\n \"dev\": true,\n \"dependencies\": {\n \"@types/express\": \"*\"\n }\n },\n \"node_modules/@types/serve-static\": {\n \"version\": \"2.2.0\",\n \"resolved\": \"https://registry.npmjs.org/@types/serve-static/-/serve-static-2.2.0.tgz\",\n \"integrity\": \"sha512-8mam4H1NHLtu7nmtalF7eyBH14QyOASmcxHhSfEoRyr0nP/YdoesEtU+uSRvMe96TW/HPTtkoKqQLl53N7UXMQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/http-errors\": \"*\",\n \"@types/node\": \"*\"\n }\n },\n \"node_modules/@types/shell-quote\": {\n \"version\": \"1.7.5\",\n \"resolved\": \"https://registry.npmjs.org/@types/shell-quote/-/shell-quote-1.7.5.tgz\",\n \"integrity\": \"sha512-+UE8GAGRPbJVQDdxi16dgadcBfQ+KG2vgZhV1+3A1XmHbmwcdwhCUwIdy+d3pAGrbvgRoVSjeI9vOWyq376Yzw==\",\n \"dev\": true\n },\n \"node_modules/@types/sinon\": {\n \"version\": \"21.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@types/sinon/-/sinon-21.0.0.tgz\",\n \"integrity\": \"sha512-+oHKZ0lTI+WVLxx1IbJDNmReQaIsQJjN2e7UUrJHEeByG7bFeKJYsv1E75JxTQ9QKJDp21bAa/0W2Xo4srsDnw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/sinonjs__fake-timers\": \"*\"\n }\n },\n \"node_modules/@types/sinon-chai\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-4.0.0.tgz\",\n \"integrity\": \"sha512-Uar+qk3TmeFsUWCwtqRNqNUE7vf34+MCJiQJR5M2rd4nCbhtE8RgTiHwN/mVwbfCjhmO6DiOel/MgzHkRMJJFg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/chai\": \"*\",\n \"@types/sinon\": \"*\"\n }\n },\n \"node_modules/@types/sinonjs__fake-timers\": {\n \"version\": \"8.1.5\",\n \"resolved\": \"https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz\",\n \"integrity\": \"sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@types/triple-beam\": {\n \"version\": \"1.3.5\",\n \"resolved\": \"https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz\",\n \"integrity\": \"sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@types/which\": {\n \"version\": \"3.0.4\",\n \"resolved\": \"https://registry.npmjs.org/@types/which/-/which-3.0.4.tgz\",\n \"integrity\": \"sha512-liyfuo/106JdlgSchJzXEQCVArk0CvevqPote8F8HgWgJ3dRCcTHgJIsLDuee0kxk/mhbInzIZk3QWSZJ8R+2w==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@types/ws\": {\n \"version\": \"8.18.1\",\n \"resolved\": \"https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz\",\n \"integrity\": \"sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/node\": \"*\"\n }\n },\n \"node_modules/@types/xmldom\": {\n \"version\": \"0.1.34\",\n \"resolved\": \"https://registry.npmjs.org/@types/xmldom/-/xmldom-0.1.34.tgz\",\n \"integrity\": \"sha512-7eZFfxI9XHYjJJuugddV6N5YNeXgQE1lArWOcd1eCOKWb/FGs5SIjacSYuEJuwhsGS3gy4RuZ5EUIcqYscuPDA==\",\n \"dev\": true\n },\n \"node_modules/@types/yargs\": {\n \"version\": \"17.0.35\",\n \"resolved\": \"https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz\",\n \"integrity\": \"sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/yargs-parser\": \"*\"\n }\n },\n \"node_modules/@types/yargs-parser\": {\n \"version\": \"21.0.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/@types/yauzl\": {\n \"version\": \"2.10.0\",\n \"resolved\": \"https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz\",\n \"integrity\": \"sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==\",\n \"optional\": true,\n \"dependencies\": {\n \"@types/node\": \"*\"\n }\n },\n \"node_modules/@typescript-eslint/eslint-plugin\": {\n \"version\": \"8.54.0\",\n \"resolved\": \"https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.54.0.tgz\",\n \"integrity\": \"sha512-hAAP5io/7csFStuOmR782YmTthKBJ9ND3WVL60hcOjvtGFb+HJxH4O5huAcmcZ9v9G8P+JETiZ/G1B8MALnWZQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@eslint-community/regexpp\": \"^4.12.2\",\n \"@typescript-eslint/scope-manager\": \"8.54.0\",\n \"@typescript-eslint/type-utils\": \"8.54.0\",\n \"@typescript-eslint/utils\": \"8.54.0\",\n \"@typescript-eslint/visitor-keys\": \"8.54.0\",\n \"ignore\": \"^7.0.5\",\n \"natural-compare\": \"^1.4.0\",\n \"ts-api-utils\": \"^2.4.0\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/typescript-eslint\"\n },\n \"peerDependencies\": {\n \"@typescript-eslint/parser\": \"^8.54.0\",\n \"eslint\": \"^8.57.0 || ^9.0.0\",\n \"typescript\": \">=4.8.4 <6.0.0\"\n }\n },\n \"node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore\": {\n \"version\": \"7.0.5\",\n \"resolved\": \"https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz\",\n \"integrity\": \"sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 4\"\n }\n },\n \"node_modules/@typescript-eslint/parser\": {\n \"version\": \"8.54.0\",\n \"resolved\": \"https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.54.0.tgz\",\n \"integrity\": \"sha512-BtE0k6cjwjLZoZixN0t5AKP0kSzlGu7FctRXYuPAm//aaiZhmfq1JwdYpYr1brzEspYyFeF+8XF5j2VK6oalrA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@typescript-eslint/scope-manager\": \"8.54.0\",\n \"@typescript-eslint/types\": \"8.54.0\",\n \"@typescript-eslint/typescript-estree\": \"8.54.0\",\n \"@typescript-eslint/visitor-keys\": \"8.54.0\",\n \"debug\": \"^4.4.3\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/typescript-eslint\"\n },\n \"peerDependencies\": {\n \"eslint\": \"^8.57.0 || ^9.0.0\",\n \"typescript\": \">=4.8.4 <6.0.0\"\n }\n },\n \"node_modules/@typescript-eslint/parser/node_modules/debug\": {\n \"version\": \"4.4.3\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.4.3.tgz\",\n \"integrity\": \"sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.3\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@typescript-eslint/parser/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz\",\n \"integrity\": \"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@typescript-eslint/project-service\": {\n \"version\": \"8.54.0\",\n \"resolved\": \"https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.54.0.tgz\",\n \"integrity\": \"sha512-YPf+rvJ1s7MyiWM4uTRhE4DvBXrEV+d8oC3P9Y2eT7S+HBS0clybdMIPnhiATi9vZOYDc7OQ1L/i6ga6NFYK/g==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@typescript-eslint/tsconfig-utils\": \"^8.54.0\",\n \"@typescript-eslint/types\": \"^8.54.0\",\n \"debug\": \"^4.4.3\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/typescript-eslint\"\n },\n \"peerDependencies\": {\n \"typescript\": \">=4.8.4 <6.0.0\"\n }\n },\n \"node_modules/@typescript-eslint/project-service/node_modules/debug\": {\n \"version\": \"4.4.3\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.4.3.tgz\",\n \"integrity\": \"sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.3\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@typescript-eslint/project-service/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz\",\n \"integrity\": \"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@typescript-eslint/scope-manager\": {\n \"version\": \"8.54.0\",\n \"resolved\": \"https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.54.0.tgz\",\n \"integrity\": \"sha512-27rYVQku26j/PbHYcVfRPonmOlVI6gihHtXFbTdB5sb6qA0wdAQAbyXFVarQ5t4HRojIz64IV90YtsjQSSGlQg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@typescript-eslint/types\": \"8.54.0\",\n \"@typescript-eslint/visitor-keys\": \"8.54.0\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/typescript-eslint\"\n }\n },\n \"node_modules/@typescript-eslint/tsconfig-utils\": {\n \"version\": \"8.54.0\",\n \"resolved\": \"https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.54.0.tgz\",\n \"integrity\": \"sha512-dRgOyT2hPk/JwxNMZDsIXDgyl9axdJI3ogZ2XWhBPsnZUv+hPesa5iuhdYt2gzwA9t8RE5ytOJ6xB0moV0Ujvw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/typescript-eslint\"\n },\n \"peerDependencies\": {\n \"typescript\": \">=4.8.4 <6.0.0\"\n }\n },\n \"node_modules/@typescript-eslint/type-utils\": {\n \"version\": \"8.54.0\",\n \"resolved\": \"https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.54.0.tgz\",\n \"integrity\": \"sha512-hiLguxJWHjjwL6xMBwD903ciAwd7DmK30Y9Axs/etOkftC3ZNN9K44IuRD/EB08amu+Zw6W37x9RecLkOo3pMA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@typescript-eslint/types\": \"8.54.0\",\n \"@typescript-eslint/typescript-estree\": \"8.54.0\",\n \"@typescript-eslint/utils\": \"8.54.0\",\n \"debug\": \"^4.4.3\",\n \"ts-api-utils\": \"^2.4.0\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/typescript-eslint\"\n },\n \"peerDependencies\": {\n \"eslint\": \"^8.57.0 || ^9.0.0\",\n \"typescript\": \">=4.8.4 <6.0.0\"\n }\n },\n \"node_modules/@typescript-eslint/type-utils/node_modules/debug\": {\n \"version\": \"4.4.3\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.4.3.tgz\",\n \"integrity\": \"sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.3\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@typescript-eslint/type-utils/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz\",\n \"integrity\": \"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@typescript-eslint/types\": {\n \"version\": \"8.54.0\",\n \"resolved\": \"https://registry.npmjs.org/@typescript-eslint/types/-/types-8.54.0.tgz\",\n \"integrity\": \"sha512-PDUI9R1BVjqu7AUDsRBbKMtwmjWcn4J3le+5LpcFgWULN3LvHC5rkc9gCVxbrsrGmO1jfPybN5s6h4Jy+OnkAA==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/typescript-eslint\"\n }\n },\n \"node_modules/@typescript-eslint/typescript-estree\": {\n \"version\": \"8.54.0\",\n \"resolved\": \"https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.54.0.tgz\",\n \"integrity\": \"sha512-BUwcskRaPvTk6fzVWgDPdUndLjB87KYDrN5EYGetnktoeAvPtO4ONHlAZDnj5VFnUANg0Sjm7j4usBlnoVMHwA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@typescript-eslint/project-service\": \"8.54.0\",\n \"@typescript-eslint/tsconfig-utils\": \"8.54.0\",\n \"@typescript-eslint/types\": \"8.54.0\",\n \"@typescript-eslint/visitor-keys\": \"8.54.0\",\n \"debug\": \"^4.4.3\",\n \"minimatch\": \"^9.0.5\",\n \"semver\": \"^7.7.3\",\n \"tinyglobby\": \"^0.2.15\",\n \"ts-api-utils\": \"^2.4.0\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/typescript-eslint\"\n },\n \"peerDependencies\": {\n \"typescript\": \">=4.8.4 <6.0.0\"\n }\n },\n \"node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz\",\n \"integrity\": \"sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"balanced-match\": \"^1.0.0\"\n }\n },\n \"node_modules/@typescript-eslint/typescript-estree/node_modules/debug\": {\n \"version\": \"4.4.3\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.4.3.tgz\",\n \"integrity\": \"sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.3\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch\": {\n \"version\": \"9.0.5\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz\",\n \"integrity\": \"sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@typescript-eslint/typescript-estree/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz\",\n \"integrity\": \"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@typescript-eslint/typescript-estree/node_modules/semver\": {\n \"version\": \"7.7.3\",\n \"resolved\": \"https://registry.npmjs.org/semver/-/semver-7.7.3.tgz\",\n \"integrity\": \"sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==\",\n \"license\": \"ISC\",\n \"bin\": {\n \"semver\": \"bin/semver.js\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/@typescript-eslint/utils\": {\n \"version\": \"8.54.0\",\n \"resolved\": \"https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.54.0.tgz\",\n \"integrity\": \"sha512-9Cnda8GS57AQakvRyG0PTejJNlA2xhvyNtEVIMlDWOOeEyBkYWhGPnfrIAnqxLMTSTo6q8g12XVjjev5l1NvMA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@eslint-community/eslint-utils\": \"^4.9.1\",\n \"@typescript-eslint/scope-manager\": \"8.54.0\",\n \"@typescript-eslint/types\": \"8.54.0\",\n \"@typescript-eslint/typescript-estree\": \"8.54.0\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/typescript-eslint\"\n },\n \"peerDependencies\": {\n \"eslint\": \"^8.57.0 || ^9.0.0\",\n \"typescript\": \">=4.8.4 <6.0.0\"\n }\n },\n \"node_modules/@typescript-eslint/visitor-keys\": {\n \"version\": \"8.54.0\",\n \"resolved\": \"https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.54.0.tgz\",\n \"integrity\": \"sha512-VFlhGSl4opC0bprJiItPQ1RfUhGDIBokcPwaFH4yiBCaNPeld/9VeXbiPO1cLyorQi1G1vL+ecBk1x8o1axORA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@typescript-eslint/types\": \"8.54.0\",\n \"eslint-visitor-keys\": \"^4.2.1\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/typescript-eslint\"\n }\n },\n \"node_modules/@unrs/resolver-binding-android-arm-eabi\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz\",\n \"integrity\": \"sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==\",\n \"cpu\": [\n \"arm\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"android\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-android-arm64\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz\",\n \"integrity\": \"sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"android\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-darwin-arm64\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz\",\n \"integrity\": \"sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"darwin\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-darwin-x64\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz\",\n \"integrity\": \"sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==\",\n \"cpu\": [\n \"x64\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"darwin\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-freebsd-x64\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz\",\n \"integrity\": \"sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==\",\n \"cpu\": [\n \"x64\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"freebsd\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-linux-arm-gnueabihf\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz\",\n \"integrity\": \"sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==\",\n \"cpu\": [\n \"arm\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-linux-arm-musleabihf\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz\",\n \"integrity\": \"sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==\",\n \"cpu\": [\n \"arm\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-linux-arm64-gnu\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz\",\n \"integrity\": \"sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-linux-arm64-musl\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz\",\n \"integrity\": \"sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-linux-ppc64-gnu\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz\",\n \"integrity\": \"sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==\",\n \"cpu\": [\n \"ppc64\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-linux-riscv64-gnu\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz\",\n \"integrity\": \"sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==\",\n \"cpu\": [\n \"riscv64\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-linux-riscv64-musl\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz\",\n \"integrity\": \"sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==\",\n \"cpu\": [\n \"riscv64\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-linux-s390x-gnu\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz\",\n \"integrity\": \"sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==\",\n \"cpu\": [\n \"s390x\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-linux-x64-gnu\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz\",\n \"integrity\": \"sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==\",\n \"cpu\": [\n \"x64\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-linux-x64-musl\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz\",\n \"integrity\": \"sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==\",\n \"cpu\": [\n \"x64\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"linux\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-wasm32-wasi\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz\",\n \"integrity\": \"sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==\",\n \"cpu\": [\n \"wasm32\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"dependencies\": {\n \"@napi-rs/wasm-runtime\": \"^0.2.11\"\n },\n \"engines\": {\n \"node\": \">=14.0.0\"\n }\n },\n \"node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@napi-rs/wasm-runtime\": {\n \"version\": \"0.2.12\",\n \"resolved\": \"https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz\",\n \"integrity\": \"sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==\",\n \"license\": \"MIT\",\n \"optional\": true,\n \"dependencies\": {\n \"@emnapi/core\": \"^1.4.3\",\n \"@emnapi/runtime\": \"^1.4.3\",\n \"@tybys/wasm-util\": \"^0.10.0\"\n }\n },\n \"node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@tybys/wasm-util\": {\n \"version\": \"0.10.1\",\n \"resolved\": \"https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz\",\n \"integrity\": \"sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==\",\n \"license\": \"MIT\",\n \"optional\": true,\n \"dependencies\": {\n \"tslib\": \"^2.4.0\"\n }\n },\n \"node_modules/@unrs/resolver-binding-win32-arm64-msvc\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz\",\n \"integrity\": \"sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==\",\n \"cpu\": [\n \"arm64\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"win32\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-win32-ia32-msvc\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz\",\n \"integrity\": \"sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==\",\n \"cpu\": [\n \"ia32\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"win32\"\n ]\n },\n \"node_modules/@unrs/resolver-binding-win32-x64-msvc\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz\",\n \"integrity\": \"sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==\",\n \"cpu\": [\n \"x64\"\n ],\n \"license\": \"MIT\",\n \"optional\": true,\n \"os\": [\n \"win32\"\n ]\n },\n \"node_modules/@wdio/config\": {\n \"version\": \"9.23.3\",\n \"resolved\": \"https://registry.npmjs.org/@wdio/config/-/config-9.23.3.tgz\",\n \"integrity\": \"sha512-tQCT1R6R3hdib7Qb+82Dxgn/sB+CiR8+GS4zyJh5vU0dzLGeYsCo2B5W89VLItvRjveTmsmh8NOQGV2KH0FHTQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@wdio/logger\": \"9.18.0\",\n \"@wdio/types\": \"9.23.3\",\n \"@wdio/utils\": \"9.23.3\",\n \"deepmerge-ts\": \"^7.0.3\",\n \"glob\": \"^10.2.2\",\n \"import-meta-resolve\": \"^4.0.0\",\n \"jiti\": \"^2.6.1\"\n },\n \"engines\": {\n \"node\": \">=18.20.0\"\n }\n },\n \"node_modules/@wdio/config/node_modules/brace-expansion\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz\",\n \"integrity\": \"sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"balanced-match\": \"^1.0.0\"\n }\n },\n \"node_modules/@wdio/config/node_modules/glob\": {\n \"version\": \"10.5.0\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-10.5.0.tgz\",\n \"integrity\": \"sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"foreground-child\": \"^3.1.0\",\n \"jackspeak\": \"^3.1.2\",\n \"minimatch\": \"^9.0.4\",\n \"minipass\": \"^7.1.2\",\n \"package-json-from-dist\": \"^1.0.0\",\n \"path-scurry\": \"^1.11.1\"\n },\n \"bin\": {\n \"glob\": \"dist/esm/bin.mjs\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@wdio/config/node_modules/jackspeak\": {\n \"version\": \"3.4.3\",\n \"resolved\": \"https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz\",\n \"integrity\": \"sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==\",\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/cliui\": \"^8.0.2\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n },\n \"optionalDependencies\": {\n \"@pkgjs/parseargs\": \"^0.11.0\"\n }\n },\n \"node_modules/@wdio/config/node_modules/minimatch\": {\n \"version\": \"9.0.5\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz\",\n \"integrity\": \"sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/@wdio/config/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/@wdio/logger\": {\n \"version\": \"9.18.0\",\n \"resolved\": \"https://registry.npmjs.org/@wdio/logger/-/logger-9.18.0.tgz\",\n \"integrity\": \"sha512-HdzDrRs+ywAqbXGKqe1i/bLtCv47plz4TvsHFH3j729OooT5VH38ctFn5aLXgECmiAKDkmH/A6kOq2Zh5DIxww==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"chalk\": \"^5.1.2\",\n \"loglevel\": \"^1.6.0\",\n \"loglevel-plugin-prefix\": \"^0.8.4\",\n \"safe-regex2\": \"^5.0.0\",\n \"strip-ansi\": \"^7.1.0\"\n },\n \"engines\": {\n \"node\": \">=18.20.0\"\n }\n },\n \"node_modules/@wdio/logger/node_modules/ansi-regex\": {\n \"version\": \"6.2.2\",\n \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz\",\n \"integrity\": \"sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-regex?sponsor=1\"\n }\n },\n \"node_modules/@wdio/logger/node_modules/chalk\": {\n \"version\": \"5.6.2\",\n \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz\",\n \"integrity\": \"sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^12.17.0 || ^14.13 || >=16.0.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/chalk?sponsor=1\"\n }\n },\n \"node_modules/@wdio/logger/node_modules/strip-ansi\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz\",\n \"integrity\": \"sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-regex\": \"^6.0.1\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/strip-ansi?sponsor=1\"\n }\n },\n \"node_modules/@wdio/protocols\": {\n \"version\": \"9.23.3\",\n \"resolved\": \"https://registry.npmjs.org/@wdio/protocols/-/protocols-9.23.3.tgz\",\n \"integrity\": \"sha512-QfA3Gfl9/3QRX1FnH7x2+uZrgpkwYcksgk1bxGLzl/E0Qefp3BkhgHAfSB1+iKsiYIw9iFOLVx+x+zh0F4BSeg==\",\n \"license\": \"MIT\"\n },\n \"node_modules/@wdio/repl\": {\n \"version\": \"9.16.2\",\n \"resolved\": \"https://registry.npmjs.org/@wdio/repl/-/repl-9.16.2.tgz\",\n \"integrity\": \"sha512-FLTF0VL6+o5BSTCO7yLSXocm3kUnu31zYwzdsz4n9s5YWt83sCtzGZlZpt7TaTzb3jVUfxuHNQDTb8UMkCu0lQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/node\": \"^20.1.0\"\n },\n \"engines\": {\n \"node\": \">=18.20.0\"\n }\n },\n \"node_modules/@wdio/repl/node_modules/@types/node\": {\n \"version\": \"20.19.30\",\n \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-20.19.30.tgz\",\n \"integrity\": \"sha512-WJtwWJu7UdlvzEAUm484QNg5eAoq5QR08KDNx7g45Usrs2NtOPiX8ugDqmKdXkyL03rBqU5dYNYVQetEpBHq2g==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"undici-types\": \"~6.21.0\"\n }\n },\n \"node_modules/@wdio/types\": {\n \"version\": \"9.23.3\",\n \"resolved\": \"https://registry.npmjs.org/@wdio/types/-/types-9.23.3.tgz\",\n \"integrity\": \"sha512-Ufjh06DAD7cGTMORUkq5MTZLw1nAgBSr2y8OyiNNuAfPGCwHEU3EwEfhG/y0V7S7xT5pBxliqWi7AjRrCgGcIA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/node\": \"^20.1.0\"\n },\n \"engines\": {\n \"node\": \">=18.20.0\"\n }\n },\n \"node_modules/@wdio/types/node_modules/@types/node\": {\n \"version\": \"20.19.30\",\n \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-20.19.30.tgz\",\n \"integrity\": \"sha512-WJtwWJu7UdlvzEAUm484QNg5eAoq5QR08KDNx7g45Usrs2NtOPiX8ugDqmKdXkyL03rBqU5dYNYVQetEpBHq2g==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"undici-types\": \"~6.21.0\"\n }\n },\n \"node_modules/@wdio/utils\": {\n \"version\": \"9.23.3\",\n \"resolved\": \"https://registry.npmjs.org/@wdio/utils/-/utils-9.23.3.tgz\",\n \"integrity\": \"sha512-LO/cTpOcb3r49psjmWTxjFduHUMHDOhVfSzL1gfBCS5cGv6h3hAWOYw/94OrxLn1SIOgZu/hyLwf3SWeZB529g==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@puppeteer/browsers\": \"^2.2.0\",\n \"@wdio/logger\": \"9.18.0\",\n \"@wdio/types\": \"9.23.3\",\n \"decamelize\": \"^6.0.0\",\n \"deepmerge-ts\": \"^7.0.3\",\n \"edgedriver\": \"^6.1.2\",\n \"geckodriver\": \"^6.1.0\",\n \"get-port\": \"^7.0.0\",\n \"import-meta-resolve\": \"^4.0.0\",\n \"locate-app\": \"^2.2.24\",\n \"mitt\": \"^3.0.1\",\n \"safaridriver\": \"^1.0.0\",\n \"split2\": \"^4.2.0\",\n \"wait-port\": \"^1.1.0\"\n },\n \"engines\": {\n \"node\": \">=18.20.0\"\n }\n },\n \"node_modules/@wdio/utils/node_modules/decamelize\": {\n \"version\": \"6.0.1\",\n \"resolved\": \"https://registry.npmjs.org/decamelize/-/decamelize-6.0.1.tgz\",\n \"integrity\": \"sha512-G7Cqgaelq68XHJNGlZ7lrNQyhZGsFqpwtGFexqUv4IQdjKoSYF7ipZ9UuTJZUSQXFj/XaoBLuEVIVqr8EJngEQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^12.20.0 || ^14.13.1 || >=16.0.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/@wdio/utils/node_modules/split2\": {\n \"version\": \"4.2.0\",\n \"resolved\": \"https://registry.npmjs.org/split2/-/split2-4.2.0.tgz\",\n \"integrity\": \"sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==\",\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">= 10.x\"\n }\n },\n \"node_modules/@xmldom/xmldom\": {\n \"version\": \"0.9.8\",\n \"resolved\": \"https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.9.8.tgz\",\n \"integrity\": \"sha512-p96FSY54r+WJ50FIOsCOjyj/wavs8921hG5+kVMmZgKcvIKxMXHTrjNJvRgWa/zuX3B6t2lijLNFaOyuxUH+2A==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=14.6\"\n }\n },\n \"node_modules/@yarnpkg/lockfile\": {\n \"version\": \"1.1.0\",\n \"resolved\": \"https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz\",\n \"integrity\": \"sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==\",\n \"dev\": true,\n \"license\": \"BSD-2-Clause\"\n },\n \"node_modules/@yarnpkg/parsers\": {\n \"version\": \"3.0.2\",\n \"resolved\": \"https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.2.tgz\",\n \"integrity\": \"sha512-/HcYgtUSiJiot/XWGLOlGxPYUG65+/31V8oqk17vZLW1xlCoR4PampyePljOxY2n8/3jz9+tIFzICsyGujJZoA==\",\n \"dev\": true,\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"js-yaml\": \"^3.10.0\",\n \"tslib\": \"^2.4.0\"\n },\n \"engines\": {\n \"node\": \">=18.12.0\"\n }\n },\n \"node_modules/@yarnpkg/parsers/node_modules/argparse\": {\n \"version\": \"1.0.10\",\n \"resolved\": \"https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz\",\n \"integrity\": \"sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"sprintf-js\": \"~1.0.2\"\n }\n },\n \"node_modules/@yarnpkg/parsers/node_modules/js-yaml\": {\n \"version\": \"3.14.2\",\n \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz\",\n \"integrity\": \"sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"argparse\": \"^1.0.7\",\n \"esprima\": \"^4.0.0\"\n },\n \"bin\": {\n \"js-yaml\": \"bin/js-yaml.js\"\n }\n },\n \"node_modules/@zip.js/zip.js\": {\n \"version\": \"2.8.11\",\n \"resolved\": \"https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.8.11.tgz\",\n \"integrity\": \"sha512-0fztsk/0ryJ+2PPr9EyXS5/Co7OK8q3zY/xOoozEWaUsL5x+C0cyZ4YyMuUffOO2Dx/rAdq4JMPqW0VUtm+vzA==\",\n \"license\": \"BSD-3-Clause\",\n \"engines\": {\n \"bun\": \">=0.7.0\",\n \"deno\": \">=1.0.0\",\n \"node\": \">=18.0.0\"\n }\n },\n \"node_modules/@zkochan/js-yaml\": {\n \"version\": \"0.0.7\",\n \"resolved\": \"https://registry.npmjs.org/@zkochan/js-yaml/-/js-yaml-0.0.7.tgz\",\n \"integrity\": \"sha512-nrUSn7hzt7J6JWgWGz78ZYI8wj+gdIJdk0Ynjpp8l+trkn58Uqsf6RYrYkEK+3X18EX+TNdtJI0WxAtc+L84SQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"argparse\": \"^2.0.1\"\n },\n \"bin\": {\n \"js-yaml\": \"bin/js-yaml.js\"\n }\n },\n \"node_modules/abbrev\": {\n \"version\": \"3.0.1\",\n \"resolved\": \"https://registry.npmjs.org/abbrev/-/abbrev-3.0.1.tgz\",\n \"integrity\": \"sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/abort-controller\": {\n \"version\": \"3.0.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"event-target-shim\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \">=6.5\"\n }\n },\n \"node_modules/accepts\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz\",\n \"integrity\": \"sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"mime-types\": \"^3.0.0\",\n \"negotiator\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/accepts/node_modules/mime-db\": {\n \"version\": \"1.54.0\",\n \"resolved\": \"https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz\",\n \"integrity\": \"sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/accepts/node_modules/mime-types\": {\n \"version\": \"3.0.1\",\n \"resolved\": \"https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz\",\n \"integrity\": \"sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"mime-db\": \"^1.54.0\"\n },\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/acorn\": {\n \"version\": \"8.15.0\",\n \"resolved\": \"https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz\",\n \"integrity\": \"sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==\",\n \"license\": \"MIT\",\n \"bin\": {\n \"acorn\": \"bin/acorn\"\n },\n \"engines\": {\n \"node\": \">=0.4.0\"\n }\n },\n \"node_modules/acorn-jsx\": {\n \"version\": \"5.3.2\",\n \"resolved\": \"https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz\",\n \"integrity\": \"sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==\",\n \"license\": \"MIT\",\n \"peerDependencies\": {\n \"acorn\": \"^6.0.0 || ^7.0.0 || ^8.0.0\"\n }\n },\n \"node_modules/acorn-walk\": {\n \"version\": \"8.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.4.0\"\n }\n },\n \"node_modules/add-stream\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz\",\n \"integrity\": \"sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/agent-base\": {\n \"version\": \"7.1.3\",\n \"resolved\": \"https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz\",\n \"integrity\": \"sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/aggregate-error\": {\n \"version\": \"3.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"clean-stack\": \"^2.0.0\",\n \"indent-string\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/ajv\": {\n \"version\": \"8.17.1\",\n \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz\",\n \"integrity\": \"sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"fast-deep-equal\": \"^3.1.3\",\n \"fast-uri\": \"^3.0.1\",\n \"json-schema-traverse\": \"^1.0.0\",\n \"require-from-string\": \"^2.0.2\"\n },\n \"funding\": {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/epoberezkin\"\n }\n },\n \"node_modules/ajv-formats\": {\n \"version\": \"3.0.1\",\n \"resolved\": \"https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz\",\n \"integrity\": \"sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==\",\n \"dependencies\": {\n \"ajv\": \"^8.0.0\"\n },\n \"peerDependencies\": {\n \"ajv\": \"^8.0.0\"\n },\n \"peerDependenciesMeta\": {\n \"ajv\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/ansi-colors\": {\n \"version\": \"4.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz\",\n \"integrity\": \"sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/ansi-escapes\": {\n \"version\": \"4.3.2\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"type-fest\": \"^0.21.3\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/ansi-escapes/node_modules/type-fest\": {\n \"version\": \"0.21.3\",\n \"dev\": true,\n \"license\": \"(MIT OR CC0-1.0)\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/ansi-regex\": {\n \"version\": \"5.0.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/ansi-styles\": {\n \"version\": \"3.2.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-convert\": \"^1.9.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/ansi-styles/node_modules/color-convert\": {\n \"version\": \"1.9.3\",\n \"resolved\": \"https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz\",\n \"integrity\": \"sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-name\": \"1.1.3\"\n }\n },\n \"node_modules/ansi-styles/node_modules/color-name\": {\n \"version\": \"1.1.3\",\n \"resolved\": \"https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz\",\n \"integrity\": \"sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/appium\": {\n \"resolved\": \"packages/appium\",\n \"link\": true\n },\n \"node_modules/aproba\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz\",\n \"integrity\": \"sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/archiver\": {\n \"version\": \"7.0.1\",\n \"resolved\": \"https://registry.npmjs.org/archiver/-/archiver-7.0.1.tgz\",\n \"integrity\": \"sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==\",\n \"dependencies\": {\n \"archiver-utils\": \"^5.0.2\",\n \"async\": \"^3.2.4\",\n \"buffer-crc32\": \"^1.0.0\",\n \"readable-stream\": \"^4.0.0\",\n \"readdir-glob\": \"^1.1.2\",\n \"tar-stream\": \"^3.0.0\",\n \"zip-stream\": \"^6.0.1\"\n },\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/archiver-utils\": {\n \"version\": \"5.0.2\",\n \"resolved\": \"https://registry.npmjs.org/archiver-utils/-/archiver-utils-5.0.2.tgz\",\n \"integrity\": \"sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==\",\n \"dependencies\": {\n \"glob\": \"^10.0.0\",\n \"graceful-fs\": \"^4.2.0\",\n \"is-stream\": \"^2.0.1\",\n \"lazystream\": \"^1.0.0\",\n \"lodash\": \"^4.17.15\",\n \"normalize-path\": \"^3.0.0\",\n \"readable-stream\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/archiver-utils/node_modules/brace-expansion\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz\",\n \"integrity\": \"sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"balanced-match\": \"^1.0.0\"\n }\n },\n \"node_modules/archiver-utils/node_modules/buffer\": {\n \"version\": \"6.0.3\",\n \"resolved\": \"https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz\",\n \"integrity\": \"sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==\",\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/feross\"\n },\n {\n \"type\": \"patreon\",\n \"url\": \"https://www.patreon.com/feross\"\n },\n {\n \"type\": \"consulting\",\n \"url\": \"https://feross.org/support\"\n }\n ],\n \"dependencies\": {\n \"base64-js\": \"^1.3.1\",\n \"ieee754\": \"^1.2.1\"\n }\n },\n \"node_modules/archiver-utils/node_modules/glob\": {\n \"version\": \"10.5.0\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-10.5.0.tgz\",\n \"integrity\": \"sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"foreground-child\": \"^3.1.0\",\n \"jackspeak\": \"^3.1.2\",\n \"minimatch\": \"^9.0.4\",\n \"minipass\": \"^7.1.2\",\n \"package-json-from-dist\": \"^1.0.0\",\n \"path-scurry\": \"^1.11.1\"\n },\n \"bin\": {\n \"glob\": \"dist/esm/bin.mjs\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/archiver-utils/node_modules/jackspeak\": {\n \"version\": \"3.4.3\",\n \"resolved\": \"https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz\",\n \"integrity\": \"sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==\",\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/cliui\": \"^8.0.2\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n },\n \"optionalDependencies\": {\n \"@pkgjs/parseargs\": \"^0.11.0\"\n }\n },\n \"node_modules/archiver-utils/node_modules/minimatch\": {\n \"version\": \"9.0.5\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz\",\n \"integrity\": \"sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/archiver-utils/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/archiver-utils/node_modules/readable-stream\": {\n \"version\": \"4.5.2\",\n \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz\",\n \"integrity\": \"sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==\",\n \"dependencies\": {\n \"abort-controller\": \"^3.0.0\",\n \"buffer\": \"^6.0.3\",\n \"events\": \"^3.3.0\",\n \"process\": \"^0.11.10\",\n \"string_decoder\": \"^1.3.0\"\n },\n \"engines\": {\n \"node\": \"^12.22.0 || ^14.17.0 || >=16.0.0\"\n }\n },\n \"node_modules/archiver/node_modules/buffer\": {\n \"version\": \"6.0.3\",\n \"resolved\": \"https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz\",\n \"integrity\": \"sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==\",\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/feross\"\n },\n {\n \"type\": \"patreon\",\n \"url\": \"https://www.patreon.com/feross\"\n },\n {\n \"type\": \"consulting\",\n \"url\": \"https://feross.org/support\"\n }\n ],\n \"dependencies\": {\n \"base64-js\": \"^1.3.1\",\n \"ieee754\": \"^1.2.1\"\n }\n },\n \"node_modules/archiver/node_modules/buffer-crc32\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-1.0.0.tgz\",\n \"integrity\": \"sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==\",\n \"engines\": {\n \"node\": \">=8.0.0\"\n }\n },\n \"node_modules/archiver/node_modules/readable-stream\": {\n \"version\": \"4.5.2\",\n \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz\",\n \"integrity\": \"sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==\",\n \"dependencies\": {\n \"abort-controller\": \"^3.0.0\",\n \"buffer\": \"^6.0.3\",\n \"events\": \"^3.3.0\",\n \"process\": \"^0.11.10\",\n \"string_decoder\": \"^1.3.0\"\n },\n \"engines\": {\n \"node\": \"^12.22.0 || ^14.17.0 || >=16.0.0\"\n }\n },\n \"node_modules/archiver/node_modules/tar-stream\": {\n \"version\": \"3.1.7\",\n \"resolved\": \"https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz\",\n \"integrity\": \"sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==\",\n \"dependencies\": {\n \"b4a\": \"^1.6.4\",\n \"fast-fifo\": \"^1.2.0\",\n \"streamx\": \"^2.15.0\"\n }\n },\n \"node_modules/arg\": {\n \"version\": \"4.1.3\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/argparse\": {\n \"version\": \"2.0.1\",\n \"license\": \"Python-2.0\"\n },\n \"node_modules/aria-query\": {\n \"version\": \"5.3.0\",\n \"resolved\": \"https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz\",\n \"integrity\": \"sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==\",\n \"dependencies\": {\n \"dequal\": \"^2.0.3\"\n }\n },\n \"node_modules/array-differ\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz\",\n \"integrity\": \"sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/array-find-index\": {\n \"version\": \"1.0.2\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/array-ify\": {\n \"version\": \"1.0.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/array-union\": {\n \"version\": \"2.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/arrify\": {\n \"version\": \"1.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/asn1.js\": {\n \"version\": \"4.10.1\",\n \"resolved\": \"https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz\",\n \"integrity\": \"sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"bn.js\": \"^4.0.0\",\n \"inherits\": \"^2.0.1\",\n \"minimalistic-assert\": \"^1.0.0\"\n }\n },\n \"node_modules/asn1.js/node_modules/bn.js\": {\n \"version\": \"4.12.2\",\n \"resolved\": \"https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz\",\n \"integrity\": \"sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/assert\": {\n \"version\": \"1.5.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"object-assign\": \"^4.1.1\",\n \"util\": \"0.10.3\"\n }\n },\n \"node_modules/assert/node_modules/inherits\": {\n \"version\": \"2.0.1\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/assert/node_modules/util\": {\n \"version\": \"0.10.3\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"inherits\": \"2.0.1\"\n }\n },\n \"node_modules/assertion-error\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz\",\n \"integrity\": \"sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n }\n },\n \"node_modules/ast-types\": {\n \"version\": \"0.13.4\",\n \"resolved\": \"https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz\",\n \"integrity\": \"sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"tslib\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/async\": {\n \"version\": \"3.2.6\",\n \"resolved\": \"https://registry.npmjs.org/async/-/async-3.2.6.tgz\",\n \"integrity\": \"sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/async-lock\": {\n \"version\": \"1.4.1\",\n \"resolved\": \"https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz\",\n \"integrity\": \"sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==\"\n },\n \"node_modules/asyncbox\": {\n \"version\": \"6.1.0\",\n \"resolved\": \"https://registry.npmjs.org/asyncbox/-/asyncbox-6.1.0.tgz\",\n \"integrity\": \"sha512-KZwKNVnDdDe0ubN+fFMuHhSljZNHnbjdJABImoqFzQP61oIg6sMlhXIqOIu3WRd7YwW89q+eVj2Ty/Ax5dbh2Q==\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"p-limit\": \"^7.2.0\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n }\n },\n \"node_modules/asyncbox/node_modules/p-limit\": {\n \"version\": \"7.2.0\",\n \"resolved\": \"https://registry.npmjs.org/p-limit/-/p-limit-7.2.0.tgz\",\n \"integrity\": \"sha512-ATHLtwoTNDloHRFFxFJdHnG6n2WUeFjaR8XQMFdKIv0xkXjrER8/iG9iu265jOM95zXHAfv9oTkqhrfbIzosrQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"yocto-queue\": \"^1.2.1\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/asyncbox/node_modules/yocto-queue\": {\n \"version\": \"1.2.2\",\n \"resolved\": \"https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz\",\n \"integrity\": \"sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12.20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/asynckit\": {\n \"version\": \"0.4.0\",\n \"license\": \"MIT\"\n },\n \"node_modules/available-typed-arrays\": {\n \"version\": \"1.0.7\",\n \"resolved\": \"https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz\",\n \"integrity\": \"sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"possible-typed-array-names\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/axios\": {\n \"version\": \"1.13.4\",\n \"resolved\": \"https://registry.npmjs.org/axios/-/axios-1.13.4.tgz\",\n \"integrity\": \"sha512-1wVkUaAO6WyaYtCkcYCOx12ZgpGf9Zif+qXa4n+oYzK558YryKqiL6UWwd5DqiH3VRW0GYhTZQ/vlgJrCoNQlg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"follow-redirects\": \"^1.15.6\",\n \"form-data\": \"^4.0.4\",\n \"proxy-from-env\": \"^1.1.0\"\n }\n },\n \"node_modules/b4a\": {\n \"version\": \"1.6.4\",\n \"resolved\": \"https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz\",\n \"integrity\": \"sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==\"\n },\n \"node_modules/babel-runtime\": {\n \"version\": \"6.26.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"core-js\": \"^2.4.0\",\n \"regenerator-runtime\": \"^0.11.0\"\n }\n },\n \"node_modules/babel-runtime/node_modules/regenerator-runtime\": {\n \"version\": \"0.11.1\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/balanced-match\": {\n \"version\": \"1.0.2\",\n \"license\": \"MIT\"\n },\n \"node_modules/bare-events\": {\n \"version\": \"2.5.0\",\n \"resolved\": \"https://registry.npmjs.org/bare-events/-/bare-events-2.5.0.tgz\",\n \"integrity\": \"sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==\",\n \"license\": \"Apache-2.0\",\n \"optional\": true\n },\n \"node_modules/bare-fs\": {\n \"version\": \"4.0.1\",\n \"resolved\": \"https://registry.npmjs.org/bare-fs/-/bare-fs-4.0.1.tgz\",\n \"integrity\": \"sha512-ilQs4fm/l9eMfWY2dY0WCIUplSUp7U0CT1vrqMg1MUdeZl4fypu5UP0XcDBK5WBQPJAKP1b7XEodISmekH/CEg==\",\n \"license\": \"Apache-2.0\",\n \"optional\": true,\n \"dependencies\": {\n \"bare-events\": \"^2.0.0\",\n \"bare-path\": \"^3.0.0\",\n \"bare-stream\": \"^2.0.0\"\n },\n \"engines\": {\n \"bare\": \">=1.7.0\"\n }\n },\n \"node_modules/bare-os\": {\n \"version\": \"3.6.0\",\n \"resolved\": \"https://registry.npmjs.org/bare-os/-/bare-os-3.6.0.tgz\",\n \"integrity\": \"sha512-BUrFS5TqSBdA0LwHop4OjPJwisqxGy6JsWVqV6qaFoe965qqtaKfDzHY5T2YA1gUL0ZeeQeA+4BBc1FJTcHiPw==\",\n \"license\": \"Apache-2.0\",\n \"optional\": true,\n \"engines\": {\n \"bare\": \">=1.14.0\"\n }\n },\n \"node_modules/bare-path\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/bare-path/-/bare-path-3.0.0.tgz\",\n \"integrity\": \"sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==\",\n \"license\": \"Apache-2.0\",\n \"optional\": true,\n \"dependencies\": {\n \"bare-os\": \"^3.0.1\"\n }\n },\n \"node_modules/bare-stream\": {\n \"version\": \"2.6.5\",\n \"resolved\": \"https://registry.npmjs.org/bare-stream/-/bare-stream-2.6.5.tgz\",\n \"integrity\": \"sha512-jSmxKJNJmHySi6hC42zlZnq00rga4jjxcgNZjY9N5WlOe/iOoGRtdwGsHzQv2RlH2KOYMwGUXhf2zXd32BA9RA==\",\n \"license\": \"Apache-2.0\",\n \"optional\": true,\n \"dependencies\": {\n \"streamx\": \"^2.21.0\"\n },\n \"peerDependencies\": {\n \"bare-buffer\": \"*\",\n \"bare-events\": \"*\"\n },\n \"peerDependenciesMeta\": {\n \"bare-buffer\": {\n \"optional\": true\n },\n \"bare-events\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/base64-js\": {\n \"version\": \"1.5.1\",\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/feross\"\n },\n {\n \"type\": \"patreon\",\n \"url\": \"https://www.patreon.com/feross\"\n },\n {\n \"type\": \"consulting\",\n \"url\": \"https://feross.org/support\"\n }\n ],\n \"license\": \"MIT\"\n },\n \"node_modules/base64-stream\": {\n \"version\": \"1.0.0\",\n \"license\": \"MIT\"\n },\n \"node_modules/baseline-browser-mapping\": {\n \"version\": \"2.9.15\",\n \"resolved\": \"https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.15.tgz\",\n \"integrity\": \"sha512-kX8h7K2srmDyYnXRIppo4AH/wYgzWVCs+eKr3RusRSQ5PvRYoEFmR/I0PbdTjKFAoKqp5+kbxnNTFO9jOfSVJg==\",\n \"license\": \"Apache-2.0\",\n \"bin\": {\n \"baseline-browser-mapping\": \"dist/cli.js\"\n }\n },\n \"node_modules/basic-auth\": {\n \"version\": \"2.0.1\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safe-buffer\": \"5.1.2\"\n },\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/basic-auth/node_modules/safe-buffer\": {\n \"version\": \"5.1.2\",\n \"license\": \"MIT\"\n },\n \"node_modules/basic-ftp\": {\n \"version\": \"5.0.5\",\n \"resolved\": \"https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz\",\n \"integrity\": \"sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10.0.0\"\n }\n },\n \"node_modules/before-after-hook\": {\n \"version\": \"2.2.3\",\n \"resolved\": \"https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz\",\n \"integrity\": \"sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==\",\n \"dev\": true,\n \"license\": \"Apache-2.0\"\n },\n \"node_modules/big-integer\": {\n \"version\": \"1.6.51\",\n \"license\": \"Unlicense\",\n \"engines\": {\n \"node\": \">=0.6\"\n }\n },\n \"node_modules/bin-links\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/bin-links/-/bin-links-5.0.0.tgz\",\n \"integrity\": \"sha512-sdleLVfCjBtgO5cNjA2HVRvWBJAHs4zwenaCPMNJAJU0yNxpzj80IpjOIimkpkr+mhlA+how5poQtt53PygbHA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"cmd-shim\": \"^7.0.0\",\n \"npm-normalize-package-bin\": \"^4.0.0\",\n \"proc-log\": \"^5.0.0\",\n \"read-cmd-shim\": \"^5.0.0\",\n \"write-file-atomic\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/bin-links/node_modules/cmd-shim\": {\n \"version\": \"7.0.0\",\n \"resolved\": \"https://registry.npmjs.org/cmd-shim/-/cmd-shim-7.0.0.tgz\",\n \"integrity\": \"sha512-rtpaCbr164TPPh+zFdkWpCyZuKkjpAzODfaZCf/SVJZzJN+4bHQb/LP3Jzq5/+84um3XXY8r548XiWKSborwVw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/bin-links/node_modules/read-cmd-shim\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-5.0.0.tgz\",\n \"integrity\": \"sha512-SEbJV7tohp3DAAILbEMPXavBjAnMN0tVnh4+9G8ihV4Pq3HYF9h8QNez9zkJ1ILkv9G2BjdzwctznGZXgu/HGw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/bin-links/node_modules/signal-exit\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz\",\n \"integrity\": \"sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=14\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/bin-links/node_modules/write-file-atomic\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-6.0.0.tgz\",\n \"integrity\": \"sha512-GmqrO8WJ1NuzJ2DrziEI2o57jKAVIQNf8a18W3nCYU3H7PNWqCCVTeH6/NQE93CIllIgQS98rrmVkYgTX9fFJQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"imurmurhash\": \"^0.1.4\",\n \"signal-exit\": \"^4.0.1\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/bl\": {\n \"version\": \"4.1.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"buffer\": \"^5.5.0\",\n \"inherits\": \"^2.0.4\",\n \"readable-stream\": \"^3.4.0\"\n }\n },\n \"node_modules/bluebird\": {\n \"version\": \"3.7.2\",\n \"license\": \"MIT\"\n },\n \"node_modules/bn.js\": {\n \"version\": \"5.2.2\",\n \"resolved\": \"https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz\",\n \"integrity\": \"sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/body-parser\": {\n \"version\": \"2.2.2\",\n \"resolved\": \"https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz\",\n \"integrity\": \"sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"bytes\": \"^3.1.2\",\n \"content-type\": \"^1.0.5\",\n \"debug\": \"^4.4.3\",\n \"http-errors\": \"^2.0.0\",\n \"iconv-lite\": \"^0.7.0\",\n \"on-finished\": \"^2.4.1\",\n \"qs\": \"^6.14.1\",\n \"raw-body\": \"^3.0.1\",\n \"type-is\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/express\"\n }\n },\n \"node_modules/body-parser/node_modules/debug\": {\n \"version\": \"4.4.3\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.4.3.tgz\",\n \"integrity\": \"sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.3\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/body-parser/node_modules/iconv-lite\": {\n \"version\": \"0.7.1\",\n \"resolved\": \"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.1.tgz\",\n \"integrity\": \"sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safer-buffer\": \">= 2.1.2 < 3.0.0\"\n },\n \"engines\": {\n \"node\": \">=0.10.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/express\"\n }\n },\n \"node_modules/body-parser/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz\",\n \"integrity\": \"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/boolbase\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz\",\n \"integrity\": \"sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==\",\n \"license\": \"ISC\"\n },\n \"node_modules/bplist-creator\": {\n \"version\": \"0.1.1\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"stream-buffers\": \"2.2.x\"\n }\n },\n \"node_modules/bplist-parser\": {\n \"version\": \"0.3.2\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"big-integer\": \"1.6.x\"\n },\n \"engines\": {\n \"node\": \">= 5.10.0\"\n }\n },\n \"node_modules/brace-expansion\": {\n \"version\": \"1.1.12\",\n \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz\",\n \"integrity\": \"sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"balanced-match\": \"^1.0.0\",\n \"concat-map\": \"0.0.1\"\n }\n },\n \"node_modules/braces\": {\n \"version\": \"3.0.3\",\n \"resolved\": \"https://registry.npmjs.org/braces/-/braces-3.0.3.tgz\",\n \"integrity\": \"sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"fill-range\": \"^7.1.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/brorand\": {\n \"version\": \"1.1.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/browser-stdout\": {\n \"version\": \"1.3.1\",\n \"license\": \"ISC\"\n },\n \"node_modules/browserify-aes\": {\n \"version\": \"1.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"buffer-xor\": \"^1.0.3\",\n \"cipher-base\": \"^1.0.0\",\n \"create-hash\": \"^1.1.0\",\n \"evp_bytestokey\": \"^1.0.3\",\n \"inherits\": \"^2.0.1\",\n \"safe-buffer\": \"^5.0.1\"\n }\n },\n \"node_modules/browserify-cipher\": {\n \"version\": \"1.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"browserify-aes\": \"^1.0.4\",\n \"browserify-des\": \"^1.0.0\",\n \"evp_bytestokey\": \"^1.0.0\"\n }\n },\n \"node_modules/browserify-des\": {\n \"version\": \"1.0.2\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"cipher-base\": \"^1.0.1\",\n \"des.js\": \"^1.0.0\",\n \"inherits\": \"^2.0.1\",\n \"safe-buffer\": \"^5.1.2\"\n }\n },\n \"node_modules/browserify-rsa\": {\n \"version\": \"4.1.1\",\n \"resolved\": \"https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.1.tgz\",\n \"integrity\": \"sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"bn.js\": \"^5.2.1\",\n \"randombytes\": \"^2.1.0\",\n \"safe-buffer\": \"^5.2.1\"\n },\n \"engines\": {\n \"node\": \">= 0.10\"\n }\n },\n \"node_modules/browserify-sign\": {\n \"version\": \"4.2.5\",\n \"resolved\": \"https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.5.tgz\",\n \"integrity\": \"sha512-C2AUdAJg6rlM2W5QMp2Q4KGQMVBwR1lIimTsUnutJ8bMpW5B52pGpR2gEnNBNwijumDo5FojQ0L9JrXA8m4YEw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"bn.js\": \"^5.2.2\",\n \"browserify-rsa\": \"^4.1.1\",\n \"create-hash\": \"^1.2.0\",\n \"create-hmac\": \"^1.1.7\",\n \"elliptic\": \"^6.6.1\",\n \"inherits\": \"^2.0.4\",\n \"parse-asn1\": \"^5.1.9\",\n \"readable-stream\": \"^2.3.8\",\n \"safe-buffer\": \"^5.2.1\"\n },\n \"engines\": {\n \"node\": \">= 0.10\"\n }\n },\n \"node_modules/browserify-sign/node_modules/isarray\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz\",\n \"integrity\": \"sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/browserify-sign/node_modules/readable-stream\": {\n \"version\": \"2.3.8\",\n \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz\",\n \"integrity\": \"sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"core-util-is\": \"~1.0.0\",\n \"inherits\": \"~2.0.3\",\n \"isarray\": \"~1.0.0\",\n \"process-nextick-args\": \"~2.0.0\",\n \"safe-buffer\": \"~5.1.1\",\n \"string_decoder\": \"~1.1.1\",\n \"util-deprecate\": \"~1.0.1\"\n }\n },\n \"node_modules/browserify-sign/node_modules/readable-stream/node_modules/safe-buffer\": {\n \"version\": \"5.1.2\",\n \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz\",\n \"integrity\": \"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/browserify-sign/node_modules/string_decoder\": {\n \"version\": \"1.1.1\",\n \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz\",\n \"integrity\": \"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safe-buffer\": \"~5.1.0\"\n }\n },\n \"node_modules/browserify-sign/node_modules/string_decoder/node_modules/safe-buffer\": {\n \"version\": \"5.1.2\",\n \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz\",\n \"integrity\": \"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/browserify-zlib\": {\n \"version\": \"0.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"pako\": \"~1.0.5\"\n }\n },\n \"node_modules/browserslist\": {\n \"version\": \"4.28.1\",\n \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz\",\n \"integrity\": \"sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==\",\n \"funding\": [\n {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/browserslist\"\n },\n {\n \"type\": \"tidelift\",\n \"url\": \"https://tidelift.com/funding/github/npm/browserslist\"\n },\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/ai\"\n }\n ],\n \"license\": \"MIT\",\n \"dependencies\": {\n \"baseline-browser-mapping\": \"^2.9.0\",\n \"caniuse-lite\": \"^1.0.30001759\",\n \"electron-to-chromium\": \"^1.5.263\",\n \"node-releases\": \"^2.0.27\",\n \"update-browserslist-db\": \"^1.2.0\"\n },\n \"bin\": {\n \"browserslist\": \"cli.js\"\n },\n \"engines\": {\n \"node\": \"^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7\"\n }\n },\n \"node_modules/buffer\": {\n \"version\": \"5.7.1\",\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/feross\"\n },\n {\n \"type\": \"patreon\",\n \"url\": \"https://www.patreon.com/feross\"\n },\n {\n \"type\": \"consulting\",\n \"url\": \"https://feross.org/support\"\n }\n ],\n \"license\": \"MIT\",\n \"dependencies\": {\n \"base64-js\": \"^1.3.1\",\n \"ieee754\": \"^1.1.13\"\n }\n },\n \"node_modules/buffer-crc32\": {\n \"version\": \"0.2.13\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"*\"\n }\n },\n \"node_modules/buffer-from\": {\n \"version\": \"1.1.2\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/buffer-xor\": {\n \"version\": \"1.0.3\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/builtin-modules\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/builtin-modules/-/builtin-modules-5.0.0.tgz\",\n \"integrity\": \"sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18.20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/builtin-status-codes\": {\n \"version\": \"3.0.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/byte-size\": {\n \"version\": \"8.1.1\",\n \"resolved\": \"https://registry.npmjs.org/byte-size/-/byte-size-8.1.1.tgz\",\n \"integrity\": \"sha512-tUkzZWK0M/qdoLEqikxBWe4kumyuwjl3HO6zHTr4yEI23EojPtLYXdG1+AQY7MN0cGyNDvEaJ8wiYQm6P2bPxg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12.17\"\n }\n },\n \"node_modules/bytes\": {\n \"version\": \"3.1.2\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/cacache\": {\n \"version\": \"19.0.1\",\n \"resolved\": \"https://registry.npmjs.org/cacache/-/cacache-19.0.1.tgz\",\n \"integrity\": \"sha512-hdsUxulXCi5STId78vRVYEtDAjq99ICAUktLTeTYsLoTE6Z8dS0c8pWNCxwdrk9YfJeobDZc2Y186hD/5ZQgFQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/fs\": \"^4.0.0\",\n \"fs-minipass\": \"^3.0.0\",\n \"glob\": \"^10.2.2\",\n \"lru-cache\": \"^10.0.1\",\n \"minipass\": \"^7.0.3\",\n \"minipass-collect\": \"^2.0.1\",\n \"minipass-flush\": \"^1.0.5\",\n \"minipass-pipeline\": \"^1.2.4\",\n \"p-map\": \"^7.0.2\",\n \"ssri\": \"^12.0.0\",\n \"tar\": \"^7.4.3\",\n \"unique-filename\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/cacache/node_modules/brace-expansion\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz\",\n \"integrity\": \"sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"balanced-match\": \"^1.0.0\"\n }\n },\n \"node_modules/cacache/node_modules/chownr\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz\",\n \"integrity\": \"sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/cacache/node_modules/fs-minipass\": {\n \"version\": \"3.0.3\",\n \"resolved\": \"https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz\",\n \"integrity\": \"sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"minipass\": \"^7.0.3\"\n },\n \"engines\": {\n \"node\": \"^14.17.0 || ^16.13.0 || >=18.0.0\"\n }\n },\n \"node_modules/cacache/node_modules/glob\": {\n \"version\": \"10.5.0\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-10.5.0.tgz\",\n \"integrity\": \"sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"foreground-child\": \"^3.1.0\",\n \"jackspeak\": \"^3.1.2\",\n \"minimatch\": \"^9.0.4\",\n \"minipass\": \"^7.1.2\",\n \"package-json-from-dist\": \"^1.0.0\",\n \"path-scurry\": \"^1.11.1\"\n },\n \"bin\": {\n \"glob\": \"dist/esm/bin.mjs\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/cacache/node_modules/jackspeak\": {\n \"version\": \"3.4.3\",\n \"resolved\": \"https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz\",\n \"integrity\": \"sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/cliui\": \"^8.0.2\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n },\n \"optionalDependencies\": {\n \"@pkgjs/parseargs\": \"^0.11.0\"\n }\n },\n \"node_modules/cacache/node_modules/lru-cache\": {\n \"version\": \"10.4.3\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz\",\n \"integrity\": \"sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/cacache/node_modules/minimatch\": {\n \"version\": \"9.0.5\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz\",\n \"integrity\": \"sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/cacache/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/cacache/node_modules/minizlib\": {\n \"version\": \"3.1.0\",\n \"resolved\": \"https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz\",\n \"integrity\": \"sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"minipass\": \"^7.1.2\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/cacache/node_modules/p-map\": {\n \"version\": \"7.0.3\",\n \"resolved\": \"https://registry.npmjs.org/p-map/-/p-map-7.0.3.tgz\",\n \"integrity\": \"sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/cacache/node_modules/tar\": {\n \"version\": \"7.5.3\",\n \"resolved\": \"https://registry.npmjs.org/tar/-/tar-7.5.3.tgz\",\n \"integrity\": \"sha512-ENg5JUHUm2rDD7IvKNFGzyElLXNjachNLp6RaGf4+JOgxXHkqA+gq81ZAMCUmtMtqBsoU62lcp6S27g1LCYGGQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/fs-minipass\": \"^4.0.0\",\n \"chownr\": \"^3.0.0\",\n \"minipass\": \"^7.1.2\",\n \"minizlib\": \"^3.1.0\",\n \"yallist\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/cacache/node_modules/yallist\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz\",\n \"integrity\": \"sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/call-bind\": {\n \"version\": \"1.0.8\",\n \"resolved\": \"https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz\",\n \"integrity\": \"sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"call-bind-apply-helpers\": \"^1.0.0\",\n \"es-define-property\": \"^1.0.0\",\n \"get-intrinsic\": \"^1.2.4\",\n \"set-function-length\": \"^1.2.2\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/call-bind-apply-helpers\": {\n \"version\": \"1.0.2\",\n \"resolved\": \"https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz\",\n \"integrity\": \"sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"es-errors\": \"^1.3.0\",\n \"function-bind\": \"^1.1.2\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n }\n },\n \"node_modules/call-bound\": {\n \"version\": \"1.0.4\",\n \"resolved\": \"https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz\",\n \"integrity\": \"sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"call-bind-apply-helpers\": \"^1.0.2\",\n \"get-intrinsic\": \"^1.3.0\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/callsites\": {\n \"version\": \"3.1.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/camelcase\": {\n \"version\": \"5.3.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/camelcase-keys\": {\n \"version\": \"6.2.2\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"camelcase\": \"^5.3.1\",\n \"map-obj\": \"^4.0.0\",\n \"quick-lru\": \"^4.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/caniuse-lite\": {\n \"version\": \"1.0.30001764\",\n \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001764.tgz\",\n \"integrity\": \"sha512-9JGuzl2M+vPL+pz70gtMF9sHdMFbY9FJaQBi186cHKH3pSzDvzoUJUPV6fqiKIMyXbud9ZLg4F3Yza1vJ1+93g==\",\n \"funding\": [\n {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/browserslist\"\n },\n {\n \"type\": \"tidelift\",\n \"url\": \"https://tidelift.com/funding/github/npm/caniuse-lite\"\n },\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/ai\"\n }\n ],\n \"license\": \"CC-BY-4.0\"\n },\n \"node_modules/chai\": {\n \"version\": \"6.2.2\",\n \"resolved\": \"https://registry.npmjs.org/chai/-/chai-6.2.2.tgz\",\n \"integrity\": \"sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/chai-as-promised\": {\n \"version\": \"8.0.2\",\n \"resolved\": \"https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-8.0.2.tgz\",\n \"integrity\": \"sha512-1GadL+sEJVLzDjcawPM4kjfnL+p/9vrxiEUonowKOAzvVg0PixJUdtuDzdkDeQhK3zfOE76GqGkZIQ7/Adcrqw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"check-error\": \"^2.1.1\"\n },\n \"peerDependencies\": {\n \"chai\": \">= 2.1.2 < 7\"\n }\n },\n \"node_modules/chalk\": {\n \"version\": \"2.4.2\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^3.2.1\",\n \"escape-string-regexp\": \"^1.0.5\",\n \"supports-color\": \"^5.3.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/chalk/node_modules/has-flag\": {\n \"version\": \"3.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/chalk/node_modules/supports-color\": {\n \"version\": \"5.5.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-flag\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/change-case\": {\n \"version\": \"5.4.4\",\n \"resolved\": \"https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz\",\n \"integrity\": \"sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==\",\n \"license\": \"MIT\"\n },\n \"node_modules/chardet\": {\n \"version\": \"2.1.0\",\n \"resolved\": \"https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz\",\n \"integrity\": \"sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/check-error\": {\n \"version\": \"2.1.1\",\n \"resolved\": \"https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz\",\n \"integrity\": \"sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==\",\n \"engines\": {\n \"node\": \">= 16\"\n }\n },\n \"node_modules/cheerio\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz\",\n \"integrity\": \"sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"cheerio-select\": \"^2.1.0\",\n \"dom-serializer\": \"^2.0.0\",\n \"domhandler\": \"^5.0.3\",\n \"domutils\": \"^3.1.0\",\n \"encoding-sniffer\": \"^0.2.0\",\n \"htmlparser2\": \"^9.1.0\",\n \"parse5\": \"^7.1.2\",\n \"parse5-htmlparser2-tree-adapter\": \"^7.0.0\",\n \"parse5-parser-stream\": \"^7.1.2\",\n \"undici\": \"^6.19.5\",\n \"whatwg-mimetype\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=18.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/cheeriojs/cheerio?sponsor=1\"\n }\n },\n \"node_modules/cheerio-select\": {\n \"version\": \"2.1.0\",\n \"resolved\": \"https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz\",\n \"integrity\": \"sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==\",\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"boolbase\": \"^1.0.0\",\n \"css-select\": \"^5.1.0\",\n \"css-what\": \"^6.1.0\",\n \"domelementtype\": \"^2.3.0\",\n \"domhandler\": \"^5.0.3\",\n \"domutils\": \"^3.0.1\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/fb55\"\n }\n },\n \"node_modules/chokidar\": {\n \"version\": \"4.0.3\",\n \"resolved\": \"https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz\",\n \"integrity\": \"sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"readdirp\": \"^4.0.1\"\n },\n \"engines\": {\n \"node\": \">= 14.16.0\"\n },\n \"funding\": {\n \"url\": \"https://paulmillr.com/funding/\"\n }\n },\n \"node_modules/chownr\": {\n \"version\": \"2.0.0\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/ci-info\": {\n \"version\": \"3.9.0\",\n \"resolved\": \"https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz\",\n \"integrity\": \"sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==\",\n \"dev\": true,\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/sibiraj-s\"\n }\n ],\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/cipher-base\": {\n \"version\": \"1.0.6\",\n \"resolved\": \"https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz\",\n \"integrity\": \"sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"inherits\": \"^2.0.4\",\n \"safe-buffer\": \"^5.2.1\"\n },\n \"engines\": {\n \"node\": \">= 0.10\"\n }\n },\n \"node_modules/clean-regexp\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz\",\n \"integrity\": \"sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"escape-string-regexp\": \"^1.0.5\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/clean-stack\": {\n \"version\": \"2.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/cli-cursor\": {\n \"version\": \"3.1.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"restore-cursor\": \"^3.1.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/cli-spinners\": {\n \"version\": \"2.7.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/cli-width\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz\",\n \"integrity\": \"sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">= 12\"\n }\n },\n \"node_modules/cliui\": {\n \"version\": \"8.0.1\",\n \"resolved\": \"https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz\",\n \"integrity\": \"sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"string-width\": \"^4.2.0\",\n \"strip-ansi\": \"^6.0.1\",\n \"wrap-ansi\": \"^7.0.0\"\n },\n \"engines\": {\n \"node\": \">=12\"\n }\n },\n \"node_modules/cmd-shim\": {\n \"version\": \"6.0.3\",\n \"resolved\": \"https://registry.npmjs.org/cmd-shim/-/cmd-shim-6.0.3.tgz\",\n \"integrity\": \"sha512-FMabTRlc5t5zjdenF6mS0MBeFZm0XqHqeOkcskKFb/LYCcRQ5fVgLOHVc4Lq9CqABd9zhjwPjMBCJvMCziSVtA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^14.17.0 || ^16.13.0 || >=18.0.0\"\n }\n },\n \"node_modules/color\": {\n \"version\": \"5.0.2\",\n \"resolved\": \"https://registry.npmjs.org/color/-/color-5.0.2.tgz\",\n \"integrity\": \"sha512-e2hz5BzbUPcYlIRHo8ieAhYgoajrJr+hWoceg6E345TPsATMUKqDgzt8fSXZJJbxfpiPzkWyphz8yn8At7q3fA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-convert\": \"^3.0.1\",\n \"color-string\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/color-convert\": {\n \"version\": \"3.1.2\",\n \"resolved\": \"https://registry.npmjs.org/color-convert/-/color-convert-3.1.2.tgz\",\n \"integrity\": \"sha512-UNqkvCDXstVck3kdowtOTWROIJQwafjOfXSmddoDrXo4cewMKmusCeF22Q24zvjR8nwWib/3S/dfyzPItPEiJg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-name\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=14.6\"\n }\n },\n \"node_modules/color-name\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/color-name/-/color-name-2.0.2.tgz\",\n \"integrity\": \"sha512-9vEt7gE16EW7Eu7pvZnR0abW9z6ufzhXxGXZEVU9IqPdlsUiMwJeJfRtq0zePUmnbHGT9zajca7mX8zgoayo4A==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12.20\"\n }\n },\n \"node_modules/color-string\": {\n \"version\": \"2.1.2\",\n \"resolved\": \"https://registry.npmjs.org/color-string/-/color-string-2.1.2.tgz\",\n \"integrity\": \"sha512-RxmjYxbWemV9gKu4zPgiZagUxbH3RQpEIO77XoSSX0ivgABDZ+h8Zuash/EMFLTI4N9QgFPOJ6JQpPZKFxa+dA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-name\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/color-support\": {\n \"version\": \"1.1.3\",\n \"resolved\": \"https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz\",\n \"integrity\": \"sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"bin\": {\n \"color-support\": \"bin.js\"\n }\n },\n \"node_modules/columnify\": {\n \"version\": \"1.6.0\",\n \"resolved\": \"https://registry.npmjs.org/columnify/-/columnify-1.6.0.tgz\",\n \"integrity\": \"sha512-lomjuFZKfM6MSAnV9aCZC9sc0qGbmZdfygNv+nCpqVkSKdCxCklLtd16O0EILGkImHw9ZpHkAnHaB+8Zxq5W6Q==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"strip-ansi\": \"^6.0.1\",\n \"wcwidth\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=8.0.0\"\n }\n },\n \"node_modules/combined-stream\": {\n \"version\": \"1.0.8\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"delayed-stream\": \"~1.0.0\"\n },\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/commander\": {\n \"version\": \"9.5.0\",\n \"resolved\": \"https://registry.npmjs.org/commander/-/commander-9.5.0.tgz\",\n \"integrity\": \"sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^12.20.0 || >=14\"\n }\n },\n \"node_modules/comment-parser\": {\n \"version\": \"1.4.1\",\n \"resolved\": \"https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz\",\n \"integrity\": \"sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 12.0.0\"\n }\n },\n \"node_modules/common-ancestor-path\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz\",\n \"integrity\": \"sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/compare-func\": {\n \"version\": \"2.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"array-ify\": \"^1.0.0\",\n \"dot-prop\": \"^5.1.0\"\n }\n },\n \"node_modules/compare-func/node_modules/dot-prop\": {\n \"version\": \"5.3.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"is-obj\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/compare-module-exports\": {\n \"version\": \"2.1.0\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/compress-commons\": {\n \"version\": \"6.0.2\",\n \"resolved\": \"https://registry.npmjs.org/compress-commons/-/compress-commons-6.0.2.tgz\",\n \"integrity\": \"sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==\",\n \"dependencies\": {\n \"crc-32\": \"^1.2.0\",\n \"crc32-stream\": \"^6.0.0\",\n \"is-stream\": \"^2.0.1\",\n \"normalize-path\": \"^3.0.0\",\n \"readable-stream\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/compress-commons/node_modules/buffer\": {\n \"version\": \"6.0.3\",\n \"resolved\": \"https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz\",\n \"integrity\": \"sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==\",\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/feross\"\n },\n {\n \"type\": \"patreon\",\n \"url\": \"https://www.patreon.com/feross\"\n },\n {\n \"type\": \"consulting\",\n \"url\": \"https://feross.org/support\"\n }\n ],\n \"dependencies\": {\n \"base64-js\": \"^1.3.1\",\n \"ieee754\": \"^1.2.1\"\n }\n },\n \"node_modules/compress-commons/node_modules/readable-stream\": {\n \"version\": \"4.5.2\",\n \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz\",\n \"integrity\": \"sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==\",\n \"dependencies\": {\n \"abort-controller\": \"^3.0.0\",\n \"buffer\": \"^6.0.3\",\n \"events\": \"^3.3.0\",\n \"process\": \"^0.11.10\",\n \"string_decoder\": \"^1.3.0\"\n },\n \"engines\": {\n \"node\": \"^12.22.0 || ^14.17.0 || >=16.0.0\"\n }\n },\n \"node_modules/concat-map\": {\n \"version\": \"0.0.1\",\n \"license\": \"MIT\"\n },\n \"node_modules/concat-stream\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz\",\n \"integrity\": \"sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==\",\n \"dev\": true,\n \"engines\": [\n \"node >= 6.0\"\n ],\n \"license\": \"MIT\",\n \"dependencies\": {\n \"buffer-from\": \"^1.0.0\",\n \"inherits\": \"^2.0.3\",\n \"readable-stream\": \"^3.0.2\",\n \"typedarray\": \"^0.0.6\"\n }\n },\n \"node_modules/consola\": {\n \"version\": \"3.4.2\",\n \"resolved\": \"https://registry.npmjs.org/consola/-/consola-3.4.2.tgz\",\n \"integrity\": \"sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^14.18.0 || >=16.10.0\"\n }\n },\n \"node_modules/console-browserify\": {\n \"version\": \"1.2.0\",\n \"dev\": true\n },\n \"node_modules/console-control-strings\": {\n \"version\": \"1.1.0\",\n \"license\": \"ISC\"\n },\n \"node_modules/constants-browserify\": {\n \"version\": \"1.0.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/content-disposition\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz\",\n \"integrity\": \"sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safe-buffer\": \"5.2.1\"\n },\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/content-type\": {\n \"version\": \"1.0.5\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/conventional-changelog-angular\": {\n \"version\": \"7.0.0\",\n \"resolved\": \"https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz\",\n \"integrity\": \"sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==\",\n \"dev\": true,\n \"dependencies\": {\n \"compare-func\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=16\"\n }\n },\n \"node_modules/conventional-changelog-conventionalcommits\": {\n \"version\": \"7.0.2\",\n \"resolved\": \"https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-7.0.2.tgz\",\n \"integrity\": \"sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==\",\n \"dev\": true,\n \"dependencies\": {\n \"compare-func\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=16\"\n }\n },\n \"node_modules/conventional-changelog-core\": {\n \"version\": \"5.0.1\",\n \"resolved\": \"https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-5.0.1.tgz\",\n \"integrity\": \"sha512-Rvi5pH+LvgsqGwZPZ3Cq/tz4ty7mjijhr3qR4m9IBXNbxGGYgTVVO+duXzz9aArmHxFtwZ+LRkrNIMDQzgoY4A==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"add-stream\": \"^1.0.0\",\n \"conventional-changelog-writer\": \"^6.0.0\",\n \"conventional-commits-parser\": \"^4.0.0\",\n \"dateformat\": \"^3.0.3\",\n \"get-pkg-repo\": \"^4.2.1\",\n \"git-raw-commits\": \"^3.0.0\",\n \"git-remote-origin-url\": \"^2.0.0\",\n \"git-semver-tags\": \"^5.0.0\",\n \"normalize-package-data\": \"^3.0.3\",\n \"read-pkg\": \"^3.0.0\",\n \"read-pkg-up\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=14\"\n }\n },\n \"node_modules/conventional-changelog-core/node_modules/hosted-git-info\": {\n \"version\": \"2.8.9\",\n \"resolved\": \"https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz\",\n \"integrity\": \"sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/conventional-changelog-core/node_modules/load-json-file\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz\",\n \"integrity\": \"sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"graceful-fs\": \"^4.1.2\",\n \"parse-json\": \"^4.0.0\",\n \"pify\": \"^3.0.0\",\n \"strip-bom\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/conventional-changelog-core/node_modules/parse-json\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz\",\n \"integrity\": \"sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"error-ex\": \"^1.3.1\",\n \"json-parse-better-errors\": \"^1.0.1\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/conventional-changelog-core/node_modules/path-type\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz\",\n \"integrity\": \"sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"pify\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/conventional-changelog-core/node_modules/pify\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/pify/-/pify-3.0.0.tgz\",\n \"integrity\": \"sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/conventional-changelog-core/node_modules/read-pkg\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz\",\n \"integrity\": \"sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"load-json-file\": \"^4.0.0\",\n \"normalize-package-data\": \"^2.3.2\",\n \"path-type\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/conventional-changelog-core/node_modules/read-pkg/node_modules/normalize-package-data\": {\n \"version\": \"2.5.0\",\n \"resolved\": \"https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz\",\n \"integrity\": \"sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==\",\n \"dev\": true,\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"hosted-git-info\": \"^2.1.4\",\n \"resolve\": \"^1.10.0\",\n \"semver\": \"2 || 3 || 4 || 5\",\n \"validate-npm-package-license\": \"^3.0.1\"\n }\n },\n \"node_modules/conventional-changelog-core/node_modules/semver\": {\n \"version\": \"5.7.2\",\n \"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.7.2.tgz\",\n \"integrity\": \"sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"bin\": {\n \"semver\": \"bin/semver\"\n }\n },\n \"node_modules/conventional-changelog-core/node_modules/strip-bom\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz\",\n \"integrity\": \"sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/conventional-changelog-preset-loader\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-3.0.0.tgz\",\n \"integrity\": \"sha512-qy9XbdSLmVnwnvzEisjxdDiLA4OmV3o8db+Zdg4WiFw14fP3B6XNz98X0swPPpkTd/pc1K7+adKgEDM1JCUMiA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=14\"\n }\n },\n \"node_modules/conventional-changelog-writer\": {\n \"version\": \"6.0.1\",\n \"resolved\": \"https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-6.0.1.tgz\",\n \"integrity\": \"sha512-359t9aHorPw+U+nHzUXHS5ZnPBOizRxfQsWT5ZDHBfvfxQOAik+yfuhKXG66CN5LEWPpMNnIMHUTCKeYNprvHQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"conventional-commits-filter\": \"^3.0.0\",\n \"dateformat\": \"^3.0.3\",\n \"handlebars\": \"^4.7.7\",\n \"json-stringify-safe\": \"^5.0.1\",\n \"meow\": \"^8.1.2\",\n \"semver\": \"^7.0.0\",\n \"split\": \"^1.0.1\"\n },\n \"bin\": {\n \"conventional-changelog-writer\": \"cli.js\"\n },\n \"engines\": {\n \"node\": \">=14\"\n }\n },\n \"node_modules/conventional-commits-filter\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-3.0.0.tgz\",\n \"integrity\": \"sha512-1ymej8b5LouPx9Ox0Dw/qAO2dVdfpRFq28e5Y0jJEU8ZrLdy0vOSkkIInwmxErFGhg6SALro60ZrwYFVTUDo4Q==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"lodash.ismatch\": \"^4.4.0\",\n \"modify-values\": \"^1.0.1\"\n },\n \"engines\": {\n \"node\": \">=14\"\n }\n },\n \"node_modules/conventional-commits-parser\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-4.0.0.tgz\",\n \"integrity\": \"sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"is-text-path\": \"^1.0.1\",\n \"JSONStream\": \"^1.3.5\",\n \"meow\": \"^8.1.2\",\n \"split2\": \"^3.2.2\"\n },\n \"bin\": {\n \"conventional-commits-parser\": \"cli.js\"\n },\n \"engines\": {\n \"node\": \">=14\"\n }\n },\n \"node_modules/conventional-recommended-bump\": {\n \"version\": \"7.0.1\",\n \"resolved\": \"https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-7.0.1.tgz\",\n \"integrity\": \"sha512-Ft79FF4SlOFvX4PkwFDRnaNiIVX7YbmqGU0RwccUaiGvgp3S0a8ipR2/Qxk31vclDNM+GSdJOVs2KrsUCjblVA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"concat-stream\": \"^2.0.0\",\n \"conventional-changelog-preset-loader\": \"^3.0.0\",\n \"conventional-commits-filter\": \"^3.0.0\",\n \"conventional-commits-parser\": \"^4.0.0\",\n \"git-raw-commits\": \"^3.0.0\",\n \"git-semver-tags\": \"^5.0.0\",\n \"meow\": \"^8.1.2\"\n },\n \"bin\": {\n \"conventional-recommended-bump\": \"cli.js\"\n },\n \"engines\": {\n \"node\": \">=14\"\n }\n },\n \"node_modules/cookie\": {\n \"version\": \"0.7.1\",\n \"resolved\": \"https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz\",\n \"integrity\": \"sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/cookie-signature\": {\n \"version\": \"1.2.2\",\n \"resolved\": \"https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz\",\n \"integrity\": \"sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6.6.0\"\n }\n },\n \"node_modules/copy-file\": {\n \"version\": \"11.1.0\",\n \"resolved\": \"https://registry.npmjs.org/copy-file/-/copy-file-11.1.0.tgz\",\n \"integrity\": \"sha512-X8XDzyvYaA6msMyAM575CUoygY5b44QzLcGRKsK3MFmXcOvQa518dNPLsKYwkYsn72g3EiW+LE0ytd/FlqWmyw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"graceful-fs\": \"^4.2.11\",\n \"p-event\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/core-js\": {\n \"version\": \"2.6.12\",\n \"dev\": true,\n \"hasInstallScript\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/core-js-compat\": {\n \"version\": \"3.47.0\",\n \"resolved\": \"https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.47.0.tgz\",\n \"integrity\": \"sha512-IGfuznZ/n7Kp9+nypamBhvwdwLsW6KC8IOaURw2doAK5e98AG3acVLdh0woOnEqCfUtS+Vu882JE4k/DAm3ItQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"browserslist\": \"^4.28.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/core-js\"\n }\n },\n \"node_modules/core-util-is\": {\n \"version\": \"1.0.2\",\n \"license\": \"MIT\"\n },\n \"node_modules/corepack\": {\n \"version\": \"0.23.0\",\n \"resolved\": \"https://registry.npmjs.org/corepack/-/corepack-0.23.0.tgz\",\n \"integrity\": \"sha512-0+f/lrSsFPwa9Ec7xvVOutLjcOX6wzhzcvbBM9G6mI+0WKuB4SD8BGLqqNw2FwlLS1zTHoOw0hUPoMh68kyICQ==\",\n \"dev\": true,\n \"bin\": {\n \"corepack\": \"dist/corepack.js\",\n \"pnpm\": \"dist/pnpm.js\",\n \"pnpx\": \"dist/pnpx.js\",\n \"yarn\": \"dist/yarn.js\",\n \"yarnpkg\": \"dist/yarnpkg.js\"\n },\n \"engines\": {\n \"node\": \">=18.17.1\"\n }\n },\n \"node_modules/cosmiconfig\": {\n \"version\": \"9.0.0\",\n \"resolved\": \"https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz\",\n \"integrity\": \"sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"env-paths\": \"^2.2.1\",\n \"import-fresh\": \"^3.3.0\",\n \"js-yaml\": \"^4.1.0\",\n \"parse-json\": \"^5.2.0\"\n },\n \"engines\": {\n \"node\": \">=14\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/d-fischer\"\n },\n \"peerDependencies\": {\n \"typescript\": \">=4.9.5\"\n },\n \"peerDependenciesMeta\": {\n \"typescript\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/cpy\": {\n \"version\": \"13.2.0\",\n \"resolved\": \"https://registry.npmjs.org/cpy/-/cpy-13.2.0.tgz\",\n \"integrity\": \"sha512-zTF1smuEo4MqYkx2/vzE2QftjgUJGaDNkIyEV9iZG7OfRhxZh6DlLEm+xHAcc0D2k8hL/Abseoep1crmG9so/w==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"copy-file\": \"^11.1.0\",\n \"globby\": \"^16.1.0\",\n \"junk\": \"^4.0.1\",\n \"micromatch\": \"^4.0.8\",\n \"p-filter\": \"^4.1.0\",\n \"p-map\": \"^7.0.4\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/cpy-cli\": {\n \"version\": \"7.0.0\",\n \"resolved\": \"https://registry.npmjs.org/cpy-cli/-/cpy-cli-7.0.0.tgz\",\n \"integrity\": \"sha512-uGCdhIxGfZcPXidCuT8w1jBknVXFx0un7NLjzqBZcdnkIWtLUnWMPk5TC37ceoVjwASLSNsRtTXXNTuFIyE2ng==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"cpy\": \"^13.2.0\",\n \"globby\": \"^16.1.0\",\n \"meow\": \"^14.0.0\"\n },\n \"bin\": {\n \"cpy\": \"cli.js\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/cpy-cli/node_modules/globby\": {\n \"version\": \"16.1.0\",\n \"resolved\": \"https://registry.npmjs.org/globby/-/globby-16.1.0.tgz\",\n \"integrity\": \"sha512-+A4Hq7m7Ze592k9gZRy4gJ27DrXRNnC1vPjxTt1qQxEY8RxagBkBxivkCwg7FxSTG0iLLEMaUx13oOr0R2/qcQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@sindresorhus/merge-streams\": \"^4.0.0\",\n \"fast-glob\": \"^3.3.3\",\n \"ignore\": \"^7.0.5\",\n \"is-path-inside\": \"^4.0.0\",\n \"slash\": \"^5.1.0\",\n \"unicorn-magic\": \"^0.4.0\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/cpy-cli/node_modules/ignore\": {\n \"version\": \"7.0.5\",\n \"resolved\": \"https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz\",\n \"integrity\": \"sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 4\"\n }\n },\n \"node_modules/cpy-cli/node_modules/is-path-inside\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz\",\n \"integrity\": \"sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/cpy-cli/node_modules/meow\": {\n \"version\": \"14.0.0\",\n \"resolved\": \"https://registry.npmjs.org/meow/-/meow-14.0.0.tgz\",\n \"integrity\": \"sha512-JhC3R1f6dbspVtmF3vKjAWz1EVIvwFrGGPLSdU6rK79xBwHWTuHoLnRX/t1/zHS1Ch1Y2UtIrih7DAHuH9JFJA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/cpy-cli/node_modules/unicorn-magic\": {\n \"version\": \"0.4.0\",\n \"resolved\": \"https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.4.0.tgz\",\n \"integrity\": \"sha512-wH590V9VNgYH9g3lH9wWjTrUoKsjLF6sGLjhR4sH1LWpLmCOH0Zf7PukhDA8BiS7KHe4oPNkcTHqYkj7SOGUOw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/cpy/node_modules/globby\": {\n \"version\": \"16.1.0\",\n \"resolved\": \"https://registry.npmjs.org/globby/-/globby-16.1.0.tgz\",\n \"integrity\": \"sha512-+A4Hq7m7Ze592k9gZRy4gJ27DrXRNnC1vPjxTt1qQxEY8RxagBkBxivkCwg7FxSTG0iLLEMaUx13oOr0R2/qcQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@sindresorhus/merge-streams\": \"^4.0.0\",\n \"fast-glob\": \"^3.3.3\",\n \"ignore\": \"^7.0.5\",\n \"is-path-inside\": \"^4.0.0\",\n \"slash\": \"^5.1.0\",\n \"unicorn-magic\": \"^0.4.0\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/cpy/node_modules/ignore\": {\n \"version\": \"7.0.5\",\n \"resolved\": \"https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz\",\n \"integrity\": \"sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 4\"\n }\n },\n \"node_modules/cpy/node_modules/is-path-inside\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz\",\n \"integrity\": \"sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/cpy/node_modules/p-map\": {\n \"version\": \"7.0.4\",\n \"resolved\": \"https://registry.npmjs.org/p-map/-/p-map-7.0.4.tgz\",\n \"integrity\": \"sha512-tkAQEw8ysMzmkhgw8k+1U/iPhWNhykKnSk4Rd5zLoPJCuJaGRPo6YposrZgaxHKzDHdDWWZvE/Sk7hsL2X/CpQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/cpy/node_modules/unicorn-magic\": {\n \"version\": \"0.4.0\",\n \"resolved\": \"https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.4.0.tgz\",\n \"integrity\": \"sha512-wH590V9VNgYH9g3lH9wWjTrUoKsjLF6sGLjhR4sH1LWpLmCOH0Zf7PukhDA8BiS7KHe4oPNkcTHqYkj7SOGUOw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/crc-32\": {\n \"version\": \"1.2.2\",\n \"resolved\": \"https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz\",\n \"integrity\": \"sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==\",\n \"bin\": {\n \"crc32\": \"bin/crc32.njs\"\n },\n \"engines\": {\n \"node\": \">=0.8\"\n }\n },\n \"node_modules/crc32-stream\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/crc32-stream/-/crc32-stream-6.0.0.tgz\",\n \"integrity\": \"sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==\",\n \"dependencies\": {\n \"crc-32\": \"^1.2.0\",\n \"readable-stream\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/crc32-stream/node_modules/buffer\": {\n \"version\": \"6.0.3\",\n \"resolved\": \"https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz\",\n \"integrity\": \"sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==\",\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/feross\"\n },\n {\n \"type\": \"patreon\",\n \"url\": \"https://www.patreon.com/feross\"\n },\n {\n \"type\": \"consulting\",\n \"url\": \"https://feross.org/support\"\n }\n ],\n \"dependencies\": {\n \"base64-js\": \"^1.3.1\",\n \"ieee754\": \"^1.2.1\"\n }\n },\n \"node_modules/crc32-stream/node_modules/readable-stream\": {\n \"version\": \"4.5.2\",\n \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz\",\n \"integrity\": \"sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==\",\n \"dependencies\": {\n \"abort-controller\": \"^3.0.0\",\n \"buffer\": \"^6.0.3\",\n \"events\": \"^3.3.0\",\n \"process\": \"^0.11.10\",\n \"string_decoder\": \"^1.3.0\"\n },\n \"engines\": {\n \"node\": \"^12.22.0 || ^14.17.0 || >=16.0.0\"\n }\n },\n \"node_modules/create-ecdh\": {\n \"version\": \"4.0.4\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"bn.js\": \"^4.1.0\",\n \"elliptic\": \"^6.5.3\"\n }\n },\n \"node_modules/create-ecdh/node_modules/bn.js\": {\n \"version\": \"4.12.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/create-hash\": {\n \"version\": \"1.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"cipher-base\": \"^1.0.1\",\n \"inherits\": \"^2.0.1\",\n \"md5.js\": \"^1.3.4\",\n \"ripemd160\": \"^2.0.1\",\n \"sha.js\": \"^2.4.0\"\n }\n },\n \"node_modules/create-hmac\": {\n \"version\": \"1.1.7\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"cipher-base\": \"^1.0.3\",\n \"create-hash\": \"^1.1.0\",\n \"inherits\": \"^2.0.1\",\n \"ripemd160\": \"^2.0.0\",\n \"safe-buffer\": \"^5.0.1\",\n \"sha.js\": \"^2.4.8\"\n }\n },\n \"node_modules/create-require\": {\n \"version\": \"1.1.1\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/cross-env\": {\n \"version\": \"10.1.0\",\n \"resolved\": \"https://registry.npmjs.org/cross-env/-/cross-env-10.1.0.tgz\",\n \"integrity\": \"sha512-GsYosgnACZTADcmEyJctkJIoqAhHjttw7RsFrVoJNXbsWWqaq6Ym+7kZjq6mS45O0jij6vtiReppKQEtqWy6Dw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@epic-web/invariant\": \"^1.0.0\",\n \"cross-spawn\": \"^7.0.6\"\n },\n \"bin\": {\n \"cross-env\": \"dist/bin/cross-env.js\",\n \"cross-env-shell\": \"dist/bin/cross-env-shell.js\"\n },\n \"engines\": {\n \"node\": \">=20\"\n }\n },\n \"node_modules/cross-spawn\": {\n \"version\": \"7.0.6\",\n \"resolved\": \"https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz\",\n \"integrity\": \"sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"path-key\": \"^3.1.0\",\n \"shebang-command\": \"^2.0.0\",\n \"which\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">= 8\"\n }\n },\n \"node_modules/crypto-browserify\": {\n \"version\": \"3.12.1\",\n \"resolved\": \"https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.1.tgz\",\n \"integrity\": \"sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"browserify-cipher\": \"^1.0.1\",\n \"browserify-sign\": \"^4.2.3\",\n \"create-ecdh\": \"^4.0.4\",\n \"create-hash\": \"^1.2.0\",\n \"create-hmac\": \"^1.1.7\",\n \"diffie-hellman\": \"^5.0.3\",\n \"hash-base\": \"~3.0.4\",\n \"inherits\": \"^2.0.4\",\n \"pbkdf2\": \"^3.1.2\",\n \"public-encrypt\": \"^4.0.3\",\n \"randombytes\": \"^2.1.0\",\n \"randomfill\": \"^1.0.4\"\n },\n \"engines\": {\n \"node\": \">= 0.10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/crypto-browserify/node_modules/hash-base\": {\n \"version\": \"3.0.5\",\n \"resolved\": \"https://registry.npmjs.org/hash-base/-/hash-base-3.0.5.tgz\",\n \"integrity\": \"sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"inherits\": \"^2.0.4\",\n \"safe-buffer\": \"^5.2.1\"\n },\n \"engines\": {\n \"node\": \">= 0.10\"\n }\n },\n \"node_modules/css-select\": {\n \"version\": \"5.1.0\",\n \"resolved\": \"https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz\",\n \"integrity\": \"sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==\",\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"boolbase\": \"^1.0.0\",\n \"css-what\": \"^6.1.0\",\n \"domhandler\": \"^5.0.2\",\n \"domutils\": \"^3.0.1\",\n \"nth-check\": \"^2.0.1\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/fb55\"\n }\n },\n \"node_modules/css-shorthand-properties\": {\n \"version\": \"1.1.1\"\n },\n \"node_modules/css-value\": {\n \"version\": \"0.0.1\"\n },\n \"node_modules/css-what\": {\n \"version\": \"6.1.0\",\n \"resolved\": \"https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz\",\n \"integrity\": \"sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==\",\n \"license\": \"BSD-2-Clause\",\n \"engines\": {\n \"node\": \">= 6\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/fb55\"\n }\n },\n \"node_modules/cssesc\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz\",\n \"integrity\": \"sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"bin\": {\n \"cssesc\": \"bin/cssesc\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/currently-unhandled\": {\n \"version\": \"0.4.1\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"array-find-index\": \"^1.0.1\"\n },\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/dargs\": {\n \"version\": \"7.0.0\",\n \"resolved\": \"https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz\",\n \"integrity\": \"sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/data-uri-to-buffer\": {\n \"version\": \"6.0.2\",\n \"resolved\": \"https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz\",\n \"integrity\": \"sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/dateformat\": {\n \"version\": \"3.0.3\",\n \"resolved\": \"https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz\",\n \"integrity\": \"sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"*\"\n }\n },\n \"node_modules/debug\": {\n \"version\": \"4.3.4\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"2.1.2\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/decamelize\": {\n \"version\": \"1.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/decamelize-keys\": {\n \"version\": \"1.1.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"decamelize\": \"^1.1.0\",\n \"map-obj\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=0.10.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/decamelize-keys/node_modules/map-obj\": {\n \"version\": \"1.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/dedent\": {\n \"version\": \"1.5.3\",\n \"resolved\": \"https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz\",\n \"integrity\": \"sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"peerDependencies\": {\n \"babel-plugin-macros\": \"^3.1.0\"\n },\n \"peerDependenciesMeta\": {\n \"babel-plugin-macros\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/deep-is\": {\n \"version\": \"0.1.4\",\n \"license\": \"MIT\"\n },\n \"node_modules/deepmerge\": {\n \"version\": \"4.3.1\",\n \"resolved\": \"https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz\",\n \"integrity\": \"sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==\",\n \"dev\": true,\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/deepmerge-ts\": {\n \"version\": \"7.1.3\",\n \"resolved\": \"https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.3.tgz\",\n \"integrity\": \"sha512-qCSH6I0INPxd9Y1VtAiLpnYvz5O//6rCfJXKk0z66Up9/VOSr+1yS8XSKA5IWRxjocFGlzPyaZYe+jxq7OOLtQ==\",\n \"license\": \"BSD-3-Clause\",\n \"engines\": {\n \"node\": \">=16.0.0\"\n }\n },\n \"node_modules/defaults\": {\n \"version\": \"1.0.4\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"clone\": \"^1.0.2\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/defaults/node_modules/clone\": {\n \"version\": \"1.0.4\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.8\"\n }\n },\n \"node_modules/define-data-property\": {\n \"version\": \"1.1.4\",\n \"resolved\": \"https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz\",\n \"integrity\": \"sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"es-define-property\": \"^1.0.0\",\n \"es-errors\": \"^1.3.0\",\n \"gopd\": \"^1.0.1\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/define-lazy-prop\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz\",\n \"integrity\": \"sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/degenerator\": {\n \"version\": \"5.0.1\",\n \"resolved\": \"https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz\",\n \"integrity\": \"sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ast-types\": \"^0.13.4\",\n \"escodegen\": \"^2.1.0\",\n \"esprima\": \"^4.0.1\"\n },\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/delayed-stream\": {\n \"version\": \"1.0.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.4.0\"\n }\n },\n \"node_modules/depd\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/depd/-/depd-2.0.0.tgz\",\n \"integrity\": \"sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/deprecation\": {\n \"version\": \"2.3.1\",\n \"resolved\": \"https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz\",\n \"integrity\": \"sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/dequal\": {\n \"version\": \"2.0.3\",\n \"resolved\": \"https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz\",\n \"integrity\": \"sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/des.js\": {\n \"version\": \"1.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"inherits\": \"^2.0.1\",\n \"minimalistic-assert\": \"^1.0.0\"\n }\n },\n \"node_modules/detect-libc\": {\n \"version\": \"2.1.2\",\n \"resolved\": \"https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz\",\n \"integrity\": \"sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==\",\n \"license\": \"Apache-2.0\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/detect-node\": {\n \"version\": \"2.1.0\",\n \"resolved\": \"https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz\",\n \"integrity\": \"sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==\",\n \"optional\": true\n },\n \"node_modules/diff\": {\n \"version\": \"7.0.0\",\n \"resolved\": \"https://registry.npmjs.org/diff/-/diff-7.0.0.tgz\",\n \"integrity\": \"sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==\",\n \"license\": \"BSD-3-Clause\",\n \"engines\": {\n \"node\": \">=0.3.1\"\n }\n },\n \"node_modules/diff-sequences\": {\n \"version\": \"29.4.3\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^14.15.0 || ^16.10.0 || >=18.0.0\"\n }\n },\n \"node_modules/diffie-hellman\": {\n \"version\": \"5.0.3\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"bn.js\": \"^4.1.0\",\n \"miller-rabin\": \"^4.0.0\",\n \"randombytes\": \"^2.0.0\"\n }\n },\n \"node_modules/diffie-hellman/node_modules/bn.js\": {\n \"version\": \"4.12.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/dir-glob\": {\n \"version\": \"3.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"path-type\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/dom-serializer\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz\",\n \"integrity\": \"sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"domelementtype\": \"^2.3.0\",\n \"domhandler\": \"^5.0.2\",\n \"entities\": \"^4.2.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/cheeriojs/dom-serializer?sponsor=1\"\n }\n },\n \"node_modules/domain-browser\": {\n \"version\": \"1.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.4\",\n \"npm\": \">=1.2\"\n }\n },\n \"node_modules/domelementtype\": {\n \"version\": \"2.3.0\",\n \"resolved\": \"https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz\",\n \"integrity\": \"sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==\",\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/fb55\"\n }\n ],\n \"license\": \"BSD-2-Clause\"\n },\n \"node_modules/domhandler\": {\n \"version\": \"5.0.3\",\n \"resolved\": \"https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz\",\n \"integrity\": \"sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==\",\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"domelementtype\": \"^2.3.0\"\n },\n \"engines\": {\n \"node\": \">= 4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/fb55/domhandler?sponsor=1\"\n }\n },\n \"node_modules/domutils\": {\n \"version\": \"3.1.0\",\n \"resolved\": \"https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz\",\n \"integrity\": \"sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==\",\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"dom-serializer\": \"^2.0.0\",\n \"domelementtype\": \"^2.3.0\",\n \"domhandler\": \"^5.0.3\"\n },\n \"funding\": {\n \"url\": \"https://github.com/fb55/domutils?sponsor=1\"\n }\n },\n \"node_modules/dotenv\": {\n \"version\": \"16.4.7\",\n \"resolved\": \"https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz\",\n \"integrity\": \"sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==\",\n \"dev\": true,\n \"license\": \"BSD-2-Clause\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://dotenvx.com\"\n }\n },\n \"node_modules/dotenv-expand\": {\n \"version\": \"11.0.7\",\n \"resolved\": \"https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.7.tgz\",\n \"integrity\": \"sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==\",\n \"dev\": true,\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"dotenv\": \"^16.4.5\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://dotenvx.com\"\n }\n },\n \"node_modules/dunder-proto\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz\",\n \"integrity\": \"sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"call-bind-apply-helpers\": \"^1.0.1\",\n \"es-errors\": \"^1.3.0\",\n \"gopd\": \"^1.2.0\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n }\n },\n \"node_modules/duplexer\": {\n \"version\": \"0.1.2\",\n \"license\": \"MIT\"\n },\n \"node_modules/eastasianwidth\": {\n \"version\": \"0.2.0\",\n \"license\": \"MIT\"\n },\n \"node_modules/edge-paths\": {\n \"version\": \"3.0.5\",\n \"resolved\": \"https://registry.npmjs.org/edge-paths/-/edge-paths-3.0.5.tgz\",\n \"integrity\": \"sha512-sB7vSrDnFa4ezWQk9nZ/n0FdpdUuC6R1EOrlU3DL+bovcNFK28rqu2emmAUjujYEJTWIgQGqgVVWUZXMnc8iWg==\",\n \"dependencies\": {\n \"@types/which\": \"^2.0.1\",\n \"which\": \"^2.0.2\"\n },\n \"engines\": {\n \"node\": \">=14.0.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/shirshak55\"\n }\n },\n \"node_modules/edge-paths/node_modules/@types/which\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/@types/which/-/which-2.0.2.tgz\",\n \"integrity\": \"sha512-113D3mDkZDjo+EeUEHCFy0qniNc1ZpecGiAU7WSo7YDoSzolZIQKpYFHrPpjkB2nuyahcKfrmLXeQlh7gqJYdw==\",\n \"license\": \"MIT\"\n },\n \"node_modules/edgedriver\": {\n \"version\": \"6.2.0\",\n \"resolved\": \"https://registry.npmjs.org/edgedriver/-/edgedriver-6.2.0.tgz\",\n \"integrity\": \"sha512-49G6010o0VYXUMNi5OvxqE9O/kazs0qmJVqHcSHNvp1VfojO21Kb/NaJN40uy11yrlGHRp7y6a372xoCnShzlA==\",\n \"hasInstallScript\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@wdio/logger\": \"^9.18.0\",\n \"@zip.js/zip.js\": \"^2.8.11\",\n \"decamelize\": \"^6.0.1\",\n \"edge-paths\": \"^3.0.5\",\n \"fast-xml-parser\": \"^5.3.2\",\n \"http-proxy-agent\": \"^7.0.2\",\n \"https-proxy-agent\": \"^7.0.6\",\n \"which\": \"^6.0.0\"\n },\n \"bin\": {\n \"edgedriver\": \"bin/edgedriver.js\"\n },\n \"engines\": {\n \"node\": \">=20.0.0\"\n }\n },\n \"node_modules/edgedriver/node_modules/decamelize\": {\n \"version\": \"6.0.1\",\n \"resolved\": \"https://registry.npmjs.org/decamelize/-/decamelize-6.0.1.tgz\",\n \"integrity\": \"sha512-G7Cqgaelq68XHJNGlZ7lrNQyhZGsFqpwtGFexqUv4IQdjKoSYF7ipZ9UuTJZUSQXFj/XaoBLuEVIVqr8EJngEQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^12.20.0 || ^14.13.1 || >=16.0.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/edgedriver/node_modules/isexe\": {\n \"version\": \"3.1.1\",\n \"resolved\": \"https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz\",\n \"integrity\": \"sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==\",\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16\"\n }\n },\n \"node_modules/edgedriver/node_modules/which\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/which/-/which-6.0.0.tgz\",\n \"integrity\": \"sha512-f+gEpIKMR9faW/JgAgPK1D7mekkFoqbmiwvNzuhsHetni20QSgzg9Vhn0g2JSJkkfehQnqdUAx7/e15qS1lPxg==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"isexe\": \"^3.1.1\"\n },\n \"bin\": {\n \"node-which\": \"bin/which.js\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/ee-first\": {\n \"version\": \"1.1.1\",\n \"license\": \"MIT\"\n },\n \"node_modules/ejs\": {\n \"version\": \"3.1.10\",\n \"resolved\": \"https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz\",\n \"integrity\": \"sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"jake\": \"^10.8.5\"\n },\n \"bin\": {\n \"ejs\": \"bin/cli.js\"\n },\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/electron-to-chromium\": {\n \"version\": \"1.5.267\",\n \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz\",\n \"integrity\": \"sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==\",\n \"license\": \"ISC\"\n },\n \"node_modules/elliptic\": {\n \"version\": \"6.6.1\",\n \"resolved\": \"https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz\",\n \"integrity\": \"sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"bn.js\": \"^4.11.9\",\n \"brorand\": \"^1.1.0\",\n \"hash.js\": \"^1.0.0\",\n \"hmac-drbg\": \"^1.0.1\",\n \"inherits\": \"^2.0.4\",\n \"minimalistic-assert\": \"^1.0.1\",\n \"minimalistic-crypto-utils\": \"^1.0.1\"\n }\n },\n \"node_modules/elliptic/node_modules/bn.js\": {\n \"version\": \"4.12.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/emoji-regex\": {\n \"version\": \"8.0.0\",\n \"license\": \"MIT\"\n },\n \"node_modules/enabled\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz\",\n \"integrity\": \"sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==\",\n \"license\": \"MIT\"\n },\n \"node_modules/encodeurl\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz\",\n \"integrity\": \"sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/encoding\": {\n \"version\": \"0.1.13\",\n \"resolved\": \"https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz\",\n \"integrity\": \"sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"optional\": true,\n \"dependencies\": {\n \"iconv-lite\": \"^0.6.2\"\n }\n },\n \"node_modules/encoding-sniffer\": {\n \"version\": \"0.2.0\",\n \"resolved\": \"https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz\",\n \"integrity\": \"sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"iconv-lite\": \"^0.6.3\",\n \"whatwg-encoding\": \"^3.1.1\"\n },\n \"funding\": {\n \"url\": \"https://github.com/fb55/encoding-sniffer?sponsor=1\"\n }\n },\n \"node_modules/end-of-stream\": {\n \"version\": \"1.4.4\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"once\": \"^1.4.0\"\n }\n },\n \"node_modules/enhanced-resolve\": {\n \"version\": \"5.18.3\",\n \"resolved\": \"https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz\",\n \"integrity\": \"sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"graceful-fs\": \"^4.2.4\",\n \"tapable\": \"^2.2.0\"\n },\n \"engines\": {\n \"node\": \">=10.13.0\"\n }\n },\n \"node_modules/enquirer\": {\n \"version\": \"2.3.6\",\n \"resolved\": \"https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz\",\n \"integrity\": \"sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-colors\": \"^4.1.1\"\n },\n \"engines\": {\n \"node\": \">=8.6\"\n }\n },\n \"node_modules/entities\": {\n \"version\": \"4.5.0\",\n \"resolved\": \"https://registry.npmjs.org/entities/-/entities-4.5.0.tgz\",\n \"integrity\": \"sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==\",\n \"license\": \"BSD-2-Clause\",\n \"engines\": {\n \"node\": \">=0.12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/fb55/entities?sponsor=1\"\n }\n },\n \"node_modules/env-paths\": {\n \"version\": \"2.2.1\",\n \"resolved\": \"https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz\",\n \"integrity\": \"sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/envinfo\": {\n \"version\": \"7.13.0\",\n \"resolved\": \"https://registry.npmjs.org/envinfo/-/envinfo-7.13.0.tgz\",\n \"integrity\": \"sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"bin\": {\n \"envinfo\": \"dist/cli.js\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/err-code\": {\n \"version\": \"2.0.3\",\n \"resolved\": \"https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz\",\n \"integrity\": \"sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/error-ex\": {\n \"version\": \"1.3.2\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"is-arrayish\": \"^0.2.1\"\n }\n },\n \"node_modules/es-define-property\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz\",\n \"integrity\": \"sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.4\"\n }\n },\n \"node_modules/es-errors\": {\n \"version\": \"1.3.0\",\n \"resolved\": \"https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz\",\n \"integrity\": \"sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.4\"\n }\n },\n \"node_modules/es-object-atoms\": {\n \"version\": \"1.1.1\",\n \"resolved\": \"https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz\",\n \"integrity\": \"sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"es-errors\": \"^1.3.0\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n }\n },\n \"node_modules/es-set-tostringtag\": {\n \"version\": \"2.1.0\",\n \"resolved\": \"https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz\",\n \"integrity\": \"sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"es-errors\": \"^1.3.0\",\n \"get-intrinsic\": \"^1.2.6\",\n \"has-tostringtag\": \"^1.0.2\",\n \"hasown\": \"^2.0.2\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n }\n },\n \"node_modules/escalade\": {\n \"version\": \"3.2.0\",\n \"resolved\": \"https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz\",\n \"integrity\": \"sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/escape-html\": {\n \"version\": \"1.0.3\",\n \"license\": \"MIT\"\n },\n \"node_modules/escape-string-regexp\": {\n \"version\": \"1.0.5\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.8.0\"\n }\n },\n \"node_modules/escodegen\": {\n \"version\": \"2.1.0\",\n \"resolved\": \"https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz\",\n \"integrity\": \"sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==\",\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"esprima\": \"^4.0.1\",\n \"estraverse\": \"^5.2.0\",\n \"esutils\": \"^2.0.2\"\n },\n \"bin\": {\n \"escodegen\": \"bin/escodegen.js\",\n \"esgenerate\": \"bin/esgenerate.js\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"optionalDependencies\": {\n \"source-map\": \"~0.6.1\"\n }\n },\n \"node_modules/eslint\": {\n \"version\": \"9.39.2\",\n \"resolved\": \"https://registry.npmjs.org/eslint/-/eslint-9.39.2.tgz\",\n \"integrity\": \"sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@eslint-community/eslint-utils\": \"^4.8.0\",\n \"@eslint-community/regexpp\": \"^4.12.1\",\n \"@eslint/config-array\": \"^0.21.1\",\n \"@eslint/config-helpers\": \"^0.4.2\",\n \"@eslint/core\": \"^0.17.0\",\n \"@eslint/eslintrc\": \"^3.3.1\",\n \"@eslint/js\": \"9.39.2\",\n \"@eslint/plugin-kit\": \"^0.4.1\",\n \"@humanfs/node\": \"^0.16.6\",\n \"@humanwhocodes/module-importer\": \"^1.0.1\",\n \"@humanwhocodes/retry\": \"^0.4.2\",\n \"@types/estree\": \"^1.0.6\",\n \"ajv\": \"^6.12.4\",\n \"chalk\": \"^4.0.0\",\n \"cross-spawn\": \"^7.0.6\",\n \"debug\": \"^4.3.2\",\n \"escape-string-regexp\": \"^4.0.0\",\n \"eslint-scope\": \"^8.4.0\",\n \"eslint-visitor-keys\": \"^4.2.1\",\n \"espree\": \"^10.4.0\",\n \"esquery\": \"^1.5.0\",\n \"esutils\": \"^2.0.2\",\n \"fast-deep-equal\": \"^3.1.3\",\n \"file-entry-cache\": \"^8.0.0\",\n \"find-up\": \"^5.0.0\",\n \"glob-parent\": \"^6.0.2\",\n \"ignore\": \"^5.2.0\",\n \"imurmurhash\": \"^0.1.4\",\n \"is-glob\": \"^4.0.0\",\n \"json-stable-stringify-without-jsonify\": \"^1.0.1\",\n \"lodash.merge\": \"^4.6.2\",\n \"minimatch\": \"^3.1.2\",\n \"natural-compare\": \"^1.4.0\",\n \"optionator\": \"^0.9.3\"\n },\n \"bin\": {\n \"eslint\": \"bin/eslint.js\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"url\": \"https://eslint.org/donate\"\n },\n \"peerDependencies\": {\n \"jiti\": \"*\"\n },\n \"peerDependenciesMeta\": {\n \"jiti\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/eslint-compat-utils\": {\n \"version\": \"0.5.1\",\n \"resolved\": \"https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz\",\n \"integrity\": \"sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"semver\": \"^7.5.4\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"peerDependencies\": {\n \"eslint\": \">=6.0.0\"\n }\n },\n \"node_modules/eslint-config-prettier\": {\n \"version\": \"10.1.8\",\n \"resolved\": \"https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz\",\n \"integrity\": \"sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==\",\n \"license\": \"MIT\",\n \"bin\": {\n \"eslint-config-prettier\": \"bin/cli.js\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/eslint-config-prettier\"\n },\n \"peerDependencies\": {\n \"eslint\": \">=7.0.0\"\n }\n },\n \"node_modules/eslint-formatter-pretty\": {\n \"version\": \"4.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/eslint\": \"^7.2.13\",\n \"ansi-escapes\": \"^4.2.1\",\n \"chalk\": \"^4.1.0\",\n \"eslint-rule-docs\": \"^1.1.5\",\n \"log-symbols\": \"^4.0.0\",\n \"plur\": \"^4.0.0\",\n \"string-width\": \"^4.2.0\",\n \"supports-hyperlinks\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/eslint-formatter-pretty/node_modules/ansi-styles\": {\n \"version\": \"4.3.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-convert\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/eslint-formatter-pretty/node_modules/chalk\": {\n \"version\": \"4.1.2\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^4.1.0\",\n \"supports-color\": \"^7.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/chalk?sponsor=1\"\n }\n },\n \"node_modules/eslint-formatter-pretty/node_modules/color-convert\": {\n \"version\": \"2.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-name\": \"~1.1.4\"\n },\n \"engines\": {\n \"node\": \">=7.0.0\"\n }\n },\n \"node_modules/eslint-formatter-pretty/node_modules/color-name\": {\n \"version\": \"1.1.4\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/eslint-formatter-pretty/node_modules/log-symbols\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz\",\n \"integrity\": \"sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"chalk\": \"^4.1.0\",\n \"is-unicode-supported\": \"^0.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/eslint-formatter-pretty/node_modules/supports-color\": {\n \"version\": \"7.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-flag\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/eslint-import-context\": {\n \"version\": \"0.1.9\",\n \"resolved\": \"https://registry.npmjs.org/eslint-import-context/-/eslint-import-context-0.1.9.tgz\",\n \"integrity\": \"sha512-K9Hb+yRaGAGUbwjhFNHvSmmkZs9+zbuoe3kFQ4V1wYjrepUFYM2dZAfNtjbbj3qsPfUfsA68Bx/ICWQMi+C8Eg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"get-tsconfig\": \"^4.10.1\",\n \"stable-hash-x\": \"^0.2.0\"\n },\n \"engines\": {\n \"node\": \"^12.20.0 || ^14.18.0 || >=16.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/eslint-import-context\"\n },\n \"peerDependencies\": {\n \"unrs-resolver\": \"^1.0.0\"\n },\n \"peerDependenciesMeta\": {\n \"unrs-resolver\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/eslint-import-resolver-typescript\": {\n \"version\": \"4.4.4\",\n \"resolved\": \"https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-4.4.4.tgz\",\n \"integrity\": \"sha512-1iM2zeBvrYmUNTj2vSC/90JTHDth+dfOfiNKkxApWRsTJYNrc8rOdxxIf5vazX+BiAXTeOT0UvWpGI/7qIWQOw==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"debug\": \"^4.4.1\",\n \"eslint-import-context\": \"^0.1.8\",\n \"get-tsconfig\": \"^4.10.1\",\n \"is-bun-module\": \"^2.0.0\",\n \"stable-hash-x\": \"^0.2.0\",\n \"tinyglobby\": \"^0.2.14\",\n \"unrs-resolver\": \"^1.7.11\"\n },\n \"engines\": {\n \"node\": \"^16.17.0 || >=18.6.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/eslint-import-resolver-typescript\"\n },\n \"peerDependencies\": {\n \"eslint\": \"*\",\n \"eslint-plugin-import\": \"*\",\n \"eslint-plugin-import-x\": \"*\"\n },\n \"peerDependenciesMeta\": {\n \"eslint-plugin-import\": {\n \"optional\": true\n },\n \"eslint-plugin-import-x\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/eslint-import-resolver-typescript/node_modules/debug\": {\n \"version\": \"4.4.1\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.4.1.tgz\",\n \"integrity\": \"sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.3\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/eslint-import-resolver-typescript/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz\",\n \"integrity\": \"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/eslint-plugin-es-x\": {\n \"version\": \"7.8.0\",\n \"resolved\": \"https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.8.0.tgz\",\n \"integrity\": \"sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==\",\n \"funding\": [\n \"https://github.com/sponsors/ota-meshi\",\n \"https://opencollective.com/eslint\"\n ],\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@eslint-community/eslint-utils\": \"^4.1.2\",\n \"@eslint-community/regexpp\": \"^4.11.0\",\n \"eslint-compat-utils\": \"^0.5.1\"\n },\n \"engines\": {\n \"node\": \"^14.18.0 || >=16.0.0\"\n },\n \"peerDependencies\": {\n \"eslint\": \">=8\"\n }\n },\n \"node_modules/eslint-plugin-import-x\": {\n \"version\": \"4.16.1\",\n \"resolved\": \"https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.16.1.tgz\",\n \"integrity\": \"sha512-vPZZsiOKaBAIATpFE2uMI4w5IRwdv/FpQ+qZZMR4E+PeOcM4OeoEbqxRMnywdxP19TyB/3h6QBB0EWon7letSQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@typescript-eslint/types\": \"^8.35.0\",\n \"comment-parser\": \"^1.4.1\",\n \"debug\": \"^4.4.1\",\n \"eslint-import-context\": \"^0.1.9\",\n \"is-glob\": \"^4.0.3\",\n \"minimatch\": \"^9.0.3 || ^10.0.1\",\n \"semver\": \"^7.7.2\",\n \"stable-hash-x\": \"^0.2.0\",\n \"unrs-resolver\": \"^1.9.2\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/eslint-plugin-import-x\"\n },\n \"peerDependencies\": {\n \"@typescript-eslint/utils\": \"^8.0.0\",\n \"eslint\": \"^8.57.0 || ^9.0.0\",\n \"eslint-import-resolver-node\": \"*\"\n },\n \"peerDependenciesMeta\": {\n \"@typescript-eslint/utils\": {\n \"optional\": true\n },\n \"eslint-import-resolver-node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/eslint-plugin-import-x/node_modules/debug\": {\n \"version\": \"4.4.3\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.4.3.tgz\",\n \"integrity\": \"sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.3\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/eslint-plugin-import-x/node_modules/minimatch\": {\n \"version\": \"10.1.1\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz\",\n \"integrity\": \"sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==\",\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/brace-expansion\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/eslint-plugin-import-x/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz\",\n \"integrity\": \"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/eslint-plugin-mocha\": {\n \"version\": \"11.2.0\",\n \"resolved\": \"https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-11.2.0.tgz\",\n \"integrity\": \"sha512-nMdy3tEXZac8AH5Z/9hwUkSfWu8xHf4XqwB5UEQzyTQGKcNlgFeciRAjLjliIKC3dR1Ex/a2/5sqgQzvYRkkkA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@eslint-community/eslint-utils\": \"^4.4.1\",\n \"globals\": \"^15.14.0\"\n },\n \"peerDependencies\": {\n \"eslint\": \">=9.0.0\"\n }\n },\n \"node_modules/eslint-plugin-n\": {\n \"version\": \"17.23.2\",\n \"resolved\": \"https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.23.2.tgz\",\n \"integrity\": \"sha512-RhWBeb7YVPmNa2eggvJooiuehdL76/bbfj/OJewyoGT80qn5PXdz8zMOTO6YHOsI7byPt7+Ighh/i/4a5/v7hw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@eslint-community/eslint-utils\": \"^4.5.0\",\n \"enhanced-resolve\": \"^5.17.1\",\n \"eslint-plugin-es-x\": \"^7.8.0\",\n \"get-tsconfig\": \"^4.8.1\",\n \"globals\": \"^15.11.0\",\n \"globrex\": \"^0.1.2\",\n \"ignore\": \"^5.3.2\",\n \"semver\": \"^7.6.3\",\n \"ts-declaration-location\": \"^1.0.6\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/eslint\"\n },\n \"peerDependencies\": {\n \"eslint\": \">=8.23.0\"\n }\n },\n \"node_modules/eslint-plugin-promise\": {\n \"version\": \"7.2.1\",\n \"resolved\": \"https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-7.2.1.tgz\",\n \"integrity\": \"sha512-SWKjd+EuvWkYaS+uN2csvj0KoP43YTu7+phKQ5v+xw6+A0gutVX2yqCeCkC3uLCJFiPfR2dD8Es5L7yUsmvEaA==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@eslint-community/eslint-utils\": \"^4.4.0\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/eslint\"\n },\n \"peerDependencies\": {\n \"eslint\": \"^7.0.0 || ^8.0.0 || ^9.0.0\"\n }\n },\n \"node_modules/eslint-plugin-unicorn\": {\n \"version\": \"62.0.0\",\n \"resolved\": \"https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-62.0.0.tgz\",\n \"integrity\": \"sha512-HIlIkGLkvf29YEiS/ImuDZQbP12gWyx5i3C6XrRxMvVdqMroCI9qoVYCoIl17ChN+U89pn9sVwLxhIWj5nEc7g==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@babel/helper-validator-identifier\": \"^7.28.5\",\n \"@eslint-community/eslint-utils\": \"^4.9.0\",\n \"@eslint/plugin-kit\": \"^0.4.0\",\n \"change-case\": \"^5.4.4\",\n \"ci-info\": \"^4.3.1\",\n \"clean-regexp\": \"^1.0.0\",\n \"core-js-compat\": \"^3.46.0\",\n \"esquery\": \"^1.6.0\",\n \"find-up-simple\": \"^1.0.1\",\n \"globals\": \"^16.4.0\",\n \"indent-string\": \"^5.0.0\",\n \"is-builtin-module\": \"^5.0.0\",\n \"jsesc\": \"^3.1.0\",\n \"pluralize\": \"^8.0.0\",\n \"regexp-tree\": \"^0.1.27\",\n \"regjsparser\": \"^0.13.0\",\n \"semver\": \"^7.7.3\",\n \"strip-indent\": \"^4.1.1\"\n },\n \"engines\": {\n \"node\": \"^20.10.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1\"\n },\n \"peerDependencies\": {\n \"eslint\": \">=9.38.0\"\n }\n },\n \"node_modules/eslint-plugin-unicorn/node_modules/ci-info\": {\n \"version\": \"4.3.1\",\n \"resolved\": \"https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz\",\n \"integrity\": \"sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==\",\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/sibiraj-s\"\n }\n ],\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/eslint-plugin-unicorn/node_modules/globals\": {\n \"version\": \"16.5.0\",\n \"resolved\": \"https://registry.npmjs.org/globals/-/globals-16.5.0.tgz\",\n \"integrity\": \"sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/eslint-plugin-unicorn/node_modules/indent-string\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz\",\n \"integrity\": \"sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/eslint-plugin-unicorn/node_modules/semver\": {\n \"version\": \"7.7.3\",\n \"resolved\": \"https://registry.npmjs.org/semver/-/semver-7.7.3.tgz\",\n \"integrity\": \"sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==\",\n \"license\": \"ISC\",\n \"bin\": {\n \"semver\": \"bin/semver.js\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/eslint-plugin-unicorn/node_modules/strip-indent\": {\n \"version\": \"4.1.1\",\n \"resolved\": \"https://registry.npmjs.org/strip-indent/-/strip-indent-4.1.1.tgz\",\n \"integrity\": \"sha512-SlyRoSkdh1dYP0PzclLE7r0M9sgbFKKMFXpFRUMNuKhQSbC6VQIGzq3E0qsfvGJaUFJPGv6Ws1NZ/haTAjfbMA==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/eslint-rule-docs\": {\n \"version\": \"1.1.235\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/eslint-scope\": {\n \"version\": \"8.4.0\",\n \"resolved\": \"https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz\",\n \"integrity\": \"sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==\",\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"esrecurse\": \"^4.3.0\",\n \"estraverse\": \"^5.2.0\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/eslint\"\n }\n },\n \"node_modules/eslint-visitor-keys\": {\n \"version\": \"4.2.1\",\n \"resolved\": \"https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz\",\n \"integrity\": \"sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==\",\n \"license\": \"Apache-2.0\",\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/eslint\"\n }\n },\n \"node_modules/eslint/node_modules/ajv\": {\n \"version\": \"6.12.6\",\n \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz\",\n \"integrity\": \"sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"fast-deep-equal\": \"^3.1.1\",\n \"fast-json-stable-stringify\": \"^2.0.0\",\n \"json-schema-traverse\": \"^0.4.1\",\n \"uri-js\": \"^4.2.2\"\n },\n \"funding\": {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/epoberezkin\"\n }\n },\n \"node_modules/eslint/node_modules/ansi-styles\": {\n \"version\": \"4.3.0\",\n \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz\",\n \"integrity\": \"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-convert\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/eslint/node_modules/chalk\": {\n \"version\": \"4.1.2\",\n \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz\",\n \"integrity\": \"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^4.1.0\",\n \"supports-color\": \"^7.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/chalk?sponsor=1\"\n }\n },\n \"node_modules/eslint/node_modules/color-convert\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz\",\n \"integrity\": \"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-name\": \"~1.1.4\"\n },\n \"engines\": {\n \"node\": \">=7.0.0\"\n }\n },\n \"node_modules/eslint/node_modules/color-name\": {\n \"version\": \"1.1.4\",\n \"resolved\": \"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz\",\n \"integrity\": \"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/eslint/node_modules/escape-string-regexp\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz\",\n \"integrity\": \"sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/eslint/node_modules/glob-parent\": {\n \"version\": \"6.0.2\",\n \"resolved\": \"https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz\",\n \"integrity\": \"sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"is-glob\": \"^4.0.3\"\n },\n \"engines\": {\n \"node\": \">=10.13.0\"\n }\n },\n \"node_modules/eslint/node_modules/json-schema-traverse\": {\n \"version\": \"0.4.1\",\n \"resolved\": \"https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz\",\n \"integrity\": \"sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==\",\n \"license\": \"MIT\"\n },\n \"node_modules/eslint/node_modules/supports-color\": {\n \"version\": \"7.2.0\",\n \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz\",\n \"integrity\": \"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-flag\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/espree\": {\n \"version\": \"10.4.0\",\n \"resolved\": \"https://registry.npmjs.org/espree/-/espree-10.4.0.tgz\",\n \"integrity\": \"sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==\",\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"acorn\": \"^8.15.0\",\n \"acorn-jsx\": \"^5.3.2\",\n \"eslint-visitor-keys\": \"^4.2.1\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/eslint\"\n }\n },\n \"node_modules/esprima\": {\n \"version\": \"4.0.1\",\n \"license\": \"BSD-2-Clause\",\n \"bin\": {\n \"esparse\": \"bin/esparse.js\",\n \"esvalidate\": \"bin/esvalidate.js\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/esquery\": {\n \"version\": \"1.6.0\",\n \"resolved\": \"https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz\",\n \"integrity\": \"sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==\",\n \"license\": \"BSD-3-Clause\",\n \"dependencies\": {\n \"estraverse\": \"^5.1.0\"\n },\n \"engines\": {\n \"node\": \">=0.10\"\n }\n },\n \"node_modules/esrecurse\": {\n \"version\": \"4.3.0\",\n \"resolved\": \"https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz\",\n \"integrity\": \"sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==\",\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"estraverse\": \"^5.2.0\"\n },\n \"engines\": {\n \"node\": \">=4.0\"\n }\n },\n \"node_modules/estraverse\": {\n \"version\": \"5.3.0\",\n \"license\": \"BSD-2-Clause\",\n \"engines\": {\n \"node\": \">=4.0\"\n }\n },\n \"node_modules/esutils\": {\n \"version\": \"2.0.3\",\n \"license\": \"BSD-2-Clause\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/etag\": {\n \"version\": \"1.8.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/event-target-shim\": {\n \"version\": \"5.0.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/eventemitter3\": {\n \"version\": \"4.0.7\",\n \"resolved\": \"https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz\",\n \"integrity\": \"sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/events\": {\n \"version\": \"3.3.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.8.x\"\n }\n },\n \"node_modules/evp_bytestokey\": {\n \"version\": \"1.0.3\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"md5.js\": \"^1.3.4\",\n \"safe-buffer\": \"^5.1.1\"\n }\n },\n \"node_modules/execa\": {\n \"version\": \"5.1.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"cross-spawn\": \"^7.0.3\",\n \"get-stream\": \"^6.0.0\",\n \"human-signals\": \"^2.1.0\",\n \"is-stream\": \"^2.0.0\",\n \"merge-stream\": \"^2.0.0\",\n \"npm-run-path\": \"^4.0.1\",\n \"onetime\": \"^5.1.2\",\n \"signal-exit\": \"^3.0.3\",\n \"strip-final-newline\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sindresorhus/execa?sponsor=1\"\n }\n },\n \"node_modules/exponential-backoff\": {\n \"version\": \"3.1.2\",\n \"resolved\": \"https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.2.tgz\",\n \"integrity\": \"sha512-8QxYTVXUkuy7fIIoitQkPwGonB8F3Zj8eEO8Sqg9Zv/bkI7RJAzowee4gr81Hak/dUTpA2Z7VfQgoijjPNlUZA==\",\n \"dev\": true,\n \"license\": \"Apache-2.0\"\n },\n \"node_modules/express\": {\n \"version\": \"5.2.1\",\n \"resolved\": \"https://registry.npmjs.org/express/-/express-5.2.1.tgz\",\n \"integrity\": \"sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"accepts\": \"^2.0.0\",\n \"body-parser\": \"^2.2.1\",\n \"content-disposition\": \"^1.0.0\",\n \"content-type\": \"^1.0.5\",\n \"cookie\": \"^0.7.1\",\n \"cookie-signature\": \"^1.2.1\",\n \"debug\": \"^4.4.0\",\n \"depd\": \"^2.0.0\",\n \"encodeurl\": \"^2.0.0\",\n \"escape-html\": \"^1.0.3\",\n \"etag\": \"^1.8.1\",\n \"finalhandler\": \"^2.1.0\",\n \"fresh\": \"^2.0.0\",\n \"http-errors\": \"^2.0.0\",\n \"merge-descriptors\": \"^2.0.0\",\n \"mime-types\": \"^3.0.0\",\n \"on-finished\": \"^2.4.1\",\n \"once\": \"^1.4.0\",\n \"parseurl\": \"^1.3.3\",\n \"proxy-addr\": \"^2.0.7\",\n \"qs\": \"^6.14.0\",\n \"range-parser\": \"^1.2.1\",\n \"router\": \"^2.2.0\",\n \"send\": \"^1.1.0\",\n \"serve-static\": \"^2.2.0\",\n \"statuses\": \"^2.0.1\",\n \"type-is\": \"^2.0.1\",\n \"vary\": \"^1.1.2\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/express\"\n }\n },\n \"node_modules/express/node_modules/debug\": {\n \"version\": \"4.4.1\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.4.1.tgz\",\n \"integrity\": \"sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.3\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/express/node_modules/fresh\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz\",\n \"integrity\": \"sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/express/node_modules/mime-db\": {\n \"version\": \"1.54.0\",\n \"resolved\": \"https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz\",\n \"integrity\": \"sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/express/node_modules/mime-types\": {\n \"version\": \"3.0.1\",\n \"resolved\": \"https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz\",\n \"integrity\": \"sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"mime-db\": \"^1.54.0\"\n },\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/express/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz\",\n \"integrity\": \"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/extract-zip\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz\",\n \"integrity\": \"sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==\",\n \"dependencies\": {\n \"debug\": \"^4.1.1\",\n \"get-stream\": \"^5.1.0\",\n \"yauzl\": \"^2.10.0\"\n },\n \"bin\": {\n \"extract-zip\": \"cli.js\"\n },\n \"engines\": {\n \"node\": \">= 10.17.0\"\n },\n \"optionalDependencies\": {\n \"@types/yauzl\": \"^2.9.1\"\n }\n },\n \"node_modules/extract-zip/node_modules/get-stream\": {\n \"version\": \"5.2.0\",\n \"resolved\": \"https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz\",\n \"integrity\": \"sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==\",\n \"dependencies\": {\n \"pump\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/fast-deep-equal\": {\n \"version\": \"3.1.3\",\n \"license\": \"MIT\"\n },\n \"node_modules/fast-fifo\": {\n \"version\": \"1.3.2\",\n \"resolved\": \"https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz\",\n \"integrity\": \"sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==\",\n \"license\": \"MIT\"\n },\n \"node_modules/fast-glob\": {\n \"version\": \"3.3.3\",\n \"resolved\": \"https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz\",\n \"integrity\": \"sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@nodelib/fs.stat\": \"^2.0.2\",\n \"@nodelib/fs.walk\": \"^1.2.3\",\n \"glob-parent\": \"^5.1.2\",\n \"merge2\": \"^1.3.0\",\n \"micromatch\": \"^4.0.8\"\n },\n \"engines\": {\n \"node\": \">=8.6.0\"\n }\n },\n \"node_modules/fast-json-stable-stringify\": {\n \"version\": \"2.1.0\",\n \"license\": \"MIT\"\n },\n \"node_modules/fast-levenshtein\": {\n \"version\": \"2.0.6\",\n \"license\": \"MIT\"\n },\n \"node_modules/fast-uri\": {\n \"version\": \"3.0.1\",\n \"resolved\": \"https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz\",\n \"integrity\": \"sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==\",\n \"license\": \"MIT\"\n },\n \"node_modules/fast-xml-parser\": {\n \"version\": \"5.3.4\",\n \"resolved\": \"https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.3.4.tgz\",\n \"integrity\": \"sha512-EFd6afGmXlCx8H8WTZHhAoDaWaGyuIBoZJ2mknrNxug+aZKjkp0a0dlars9Izl+jF+7Gu1/5f/2h68cQpe0IiA==\",\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/NaturalIntelligence\"\n }\n ],\n \"license\": \"MIT\",\n \"dependencies\": {\n \"strnum\": \"^2.1.0\"\n },\n \"bin\": {\n \"fxparser\": \"src/cli/cli.js\"\n }\n },\n \"node_modules/fastest-levenshtein\": {\n \"version\": \"1.0.16\",\n \"resolved\": \"https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz\",\n \"integrity\": \"sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 4.9.1\"\n }\n },\n \"node_modules/fastq\": {\n \"version\": \"1.13.0\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"reusify\": \"^1.0.4\"\n }\n },\n \"node_modules/fd-slicer\": {\n \"version\": \"1.1.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"pend\": \"~1.2.0\"\n }\n },\n \"node_modules/fecha\": {\n \"version\": \"4.2.3\",\n \"license\": \"MIT\"\n },\n \"node_modules/figures\": {\n \"version\": \"3.2.0\",\n \"resolved\": \"https://registry.npmjs.org/figures/-/figures-3.2.0.tgz\",\n \"integrity\": \"sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"escape-string-regexp\": \"^1.0.5\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/file-entry-cache\": {\n \"version\": \"8.0.0\",\n \"resolved\": \"https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz\",\n \"integrity\": \"sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"flat-cache\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=16.0.0\"\n }\n },\n \"node_modules/filelist\": {\n \"version\": \"1.0.4\",\n \"resolved\": \"https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz\",\n \"integrity\": \"sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"minimatch\": \"^5.0.1\"\n }\n },\n \"node_modules/filelist/node_modules/brace-expansion\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz\",\n \"integrity\": \"sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"balanced-match\": \"^1.0.0\"\n }\n },\n \"node_modules/filelist/node_modules/minimatch\": {\n \"version\": \"5.1.6\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz\",\n \"integrity\": \"sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/fill-range\": {\n \"version\": \"7.1.1\",\n \"resolved\": \"https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz\",\n \"integrity\": \"sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"to-regex-range\": \"^5.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/finalhandler\": {\n \"version\": \"2.1.1\",\n \"resolved\": \"https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz\",\n \"integrity\": \"sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"debug\": \"^4.4.0\",\n \"encodeurl\": \"^2.0.0\",\n \"escape-html\": \"^1.0.3\",\n \"on-finished\": \"^2.4.1\",\n \"parseurl\": \"^1.3.3\",\n \"statuses\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">= 18.0.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/express\"\n }\n },\n \"node_modules/finalhandler/node_modules/debug\": {\n \"version\": \"4.4.0\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.4.0.tgz\",\n \"integrity\": \"sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.3\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/finalhandler/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz\",\n \"integrity\": \"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/find-up\": {\n \"version\": \"5.0.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"locate-path\": \"^6.0.0\",\n \"path-exists\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/find-up-simple\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.1.tgz\",\n \"integrity\": \"sha512-afd4O7zpqHeRyg4PfDQsXmlDe2PfdHtJt6Akt8jOWaApLOZk5JXs6VMR29lz03pRe9mpykrRCYIYxaJYcfpncQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/flat\": {\n \"version\": \"5.0.2\",\n \"license\": \"BSD-3-Clause\",\n \"bin\": {\n \"flat\": \"cli.js\"\n }\n },\n \"node_modules/flat-cache\": {\n \"version\": \"4.0.1\",\n \"resolved\": \"https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz\",\n \"integrity\": \"sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"flatted\": \"^3.2.9\",\n \"keyv\": \"^4.5.4\"\n },\n \"engines\": {\n \"node\": \">=16\"\n }\n },\n \"node_modules/flatted\": {\n \"version\": \"3.3.2\",\n \"resolved\": \"https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz\",\n \"integrity\": \"sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==\",\n \"license\": \"ISC\"\n },\n \"node_modules/fn.name\": {\n \"version\": \"1.1.0\",\n \"license\": \"MIT\"\n },\n \"node_modules/follow-redirects\": {\n \"version\": \"1.15.6\",\n \"resolved\": \"https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz\",\n \"integrity\": \"sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==\",\n \"funding\": [\n {\n \"type\": \"individual\",\n \"url\": \"https://github.com/sponsors/RubenVerborgh\"\n }\n ],\n \"engines\": {\n \"node\": \">=4.0\"\n },\n \"peerDependenciesMeta\": {\n \"debug\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/for-each\": {\n \"version\": \"0.3.5\",\n \"resolved\": \"https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz\",\n \"integrity\": \"sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"is-callable\": \"^1.2.7\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/foreground-child\": {\n \"version\": \"3.3.1\",\n \"resolved\": \"https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz\",\n \"integrity\": \"sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"cross-spawn\": \"^7.0.6\",\n \"signal-exit\": \"^4.0.1\"\n },\n \"engines\": {\n \"node\": \">=14\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/foreground-child/node_modules/signal-exit\": {\n \"version\": \"4.0.1\",\n \"resolved\": \"https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.1.tgz\",\n \"integrity\": \"sha512-uUWsN4aOxJAS8KOuf3QMyFtgm1pkb6I+KRZbRF/ghdf5T7sM+B1lLLzPDxswUjkmHyxQAVzEgG35E3NzDM9GVw==\",\n \"engines\": {\n \"node\": \">=14\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/form-data\": {\n \"version\": \"4.0.5\",\n \"resolved\": \"https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz\",\n \"integrity\": \"sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"asynckit\": \"^0.4.0\",\n \"combined-stream\": \"^1.0.8\",\n \"es-set-tostringtag\": \"^2.1.0\",\n \"hasown\": \"^2.0.2\",\n \"mime-types\": \"^2.1.12\"\n },\n \"engines\": {\n \"node\": \">= 6\"\n }\n },\n \"node_modules/forwarded\": {\n \"version\": \"0.2.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/fresh\": {\n \"version\": \"0.5.2\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/front-matter\": {\n \"version\": \"4.0.2\",\n \"resolved\": \"https://registry.npmjs.org/front-matter/-/front-matter-4.0.2.tgz\",\n \"integrity\": \"sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"js-yaml\": \"^3.13.1\"\n }\n },\n \"node_modules/front-matter/node_modules/argparse\": {\n \"version\": \"1.0.10\",\n \"resolved\": \"https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz\",\n \"integrity\": \"sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"sprintf-js\": \"~1.0.2\"\n }\n },\n \"node_modules/front-matter/node_modules/js-yaml\": {\n \"version\": \"3.14.2\",\n \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz\",\n \"integrity\": \"sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"argparse\": \"^1.0.7\",\n \"esprima\": \"^4.0.0\"\n },\n \"bin\": {\n \"js-yaml\": \"bin/js-yaml.js\"\n }\n },\n \"node_modules/fs-constants\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz\",\n \"integrity\": \"sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/fs-extra\": {\n \"version\": \"11.2.0\",\n \"resolved\": \"https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz\",\n \"integrity\": \"sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"graceful-fs\": \"^4.2.0\",\n \"jsonfile\": \"^6.0.1\",\n \"universalify\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=14.14\"\n }\n },\n \"node_modules/fs-minipass\": {\n \"version\": \"2.1.0\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"minipass\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">= 8\"\n }\n },\n \"node_modules/fs.realpath\": {\n \"version\": \"1.0.0\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/ftp-response-parser\": {\n \"version\": \"1.0.1\",\n \"dependencies\": {\n \"readable-stream\": \"^1.0.31\"\n },\n \"engines\": {\n \"node\": \">=0.8.0\"\n }\n },\n \"node_modules/ftp-response-parser/node_modules/readable-stream\": {\n \"version\": \"1.1.14\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"core-util-is\": \"~1.0.0\",\n \"inherits\": \"~2.0.1\",\n \"isarray\": \"0.0.1\",\n \"string_decoder\": \"~0.10.x\"\n }\n },\n \"node_modules/ftp-response-parser/node_modules/string_decoder\": {\n \"version\": \"0.10.31\",\n \"license\": \"MIT\"\n },\n \"node_modules/function-bind\": {\n \"version\": \"1.1.2\",\n \"resolved\": \"https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz\",\n \"integrity\": \"sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==\",\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/geckodriver\": {\n \"version\": \"6.1.0\",\n \"resolved\": \"https://registry.npmjs.org/geckodriver/-/geckodriver-6.1.0.tgz\",\n \"integrity\": \"sha512-ZRXLa4ZaYTTgUO4Eefw+RsQCleugU2QLb1ME7qTYxxuRj51yAhfnXaItXNs5/vUzfIaDHuZ+YnSF005hfp07nQ==\",\n \"hasInstallScript\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@wdio/logger\": \"^9.18.0\",\n \"@zip.js/zip.js\": \"^2.8.11\",\n \"decamelize\": \"^6.0.1\",\n \"http-proxy-agent\": \"^7.0.2\",\n \"https-proxy-agent\": \"^7.0.6\",\n \"modern-tar\": \"^0.7.2\"\n },\n \"bin\": {\n \"geckodriver\": \"bin/geckodriver.js\"\n },\n \"engines\": {\n \"node\": \">=20.0.0\"\n }\n },\n \"node_modules/geckodriver/node_modules/decamelize\": {\n \"version\": \"6.0.1\",\n \"resolved\": \"https://registry.npmjs.org/decamelize/-/decamelize-6.0.1.tgz\",\n \"integrity\": \"sha512-G7Cqgaelq68XHJNGlZ7lrNQyhZGsFqpwtGFexqUv4IQdjKoSYF7ipZ9UuTJZUSQXFj/XaoBLuEVIVqr8EJngEQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^12.20.0 || ^14.13.1 || >=16.0.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/get-caller-file\": {\n \"version\": \"2.0.5\",\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"6.* || 8.* || >= 10.*\"\n }\n },\n \"node_modules/get-east-asian-width\": {\n \"version\": \"1.3.0\",\n \"resolved\": \"https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz\",\n \"integrity\": \"sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/get-intrinsic\": {\n \"version\": \"1.3.0\",\n \"resolved\": \"https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz\",\n \"integrity\": \"sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"call-bind-apply-helpers\": \"^1.0.2\",\n \"es-define-property\": \"^1.0.1\",\n \"es-errors\": \"^1.3.0\",\n \"es-object-atoms\": \"^1.1.1\",\n \"function-bind\": \"^1.1.2\",\n \"get-proto\": \"^1.0.1\",\n \"gopd\": \"^1.2.0\",\n \"has-symbols\": \"^1.1.0\",\n \"hasown\": \"^2.0.2\",\n \"math-intrinsics\": \"^1.1.0\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/get-pkg-repo\": {\n \"version\": \"4.2.1\",\n \"resolved\": \"https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz\",\n \"integrity\": \"sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@hutson/parse-repository-url\": \"^3.0.0\",\n \"hosted-git-info\": \"^4.0.0\",\n \"through2\": \"^2.0.0\",\n \"yargs\": \"^16.2.0\"\n },\n \"bin\": {\n \"get-pkg-repo\": \"src/cli.js\"\n },\n \"engines\": {\n \"node\": \">=6.9.0\"\n }\n },\n \"node_modules/get-pkg-repo/node_modules/cliui\": {\n \"version\": \"7.0.4\",\n \"resolved\": \"https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz\",\n \"integrity\": \"sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"string-width\": \"^4.2.0\",\n \"strip-ansi\": \"^6.0.0\",\n \"wrap-ansi\": \"^7.0.0\"\n }\n },\n \"node_modules/get-pkg-repo/node_modules/yargs\": {\n \"version\": \"16.2.0\",\n \"resolved\": \"https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz\",\n \"integrity\": \"sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"cliui\": \"^7.0.2\",\n \"escalade\": \"^3.1.1\",\n \"get-caller-file\": \"^2.0.5\",\n \"require-directory\": \"^2.1.1\",\n \"string-width\": \"^4.2.0\",\n \"y18n\": \"^5.0.5\",\n \"yargs-parser\": \"^20.2.2\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/get-pkg-repo/node_modules/yargs-parser\": {\n \"version\": \"20.2.9\",\n \"resolved\": \"https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz\",\n \"integrity\": \"sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/get-port\": {\n \"version\": \"7.1.0\",\n \"resolved\": \"https://registry.npmjs.org/get-port/-/get-port-7.1.0.tgz\",\n \"integrity\": \"sha512-QB9NKEeDg3xxVwCCwJQ9+xycaz6pBB6iQ76wiWMl1927n0Kir6alPiP+yuiICLLU4jpMe08dXfpebuQppFA2zw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=16\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/get-proto\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz\",\n \"integrity\": \"sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"dunder-proto\": \"^1.0.1\",\n \"es-object-atoms\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n }\n },\n \"node_modules/get-stream\": {\n \"version\": \"6.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/get-tsconfig\": {\n \"version\": \"4.10.1\",\n \"resolved\": \"https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz\",\n \"integrity\": \"sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"resolve-pkg-maps\": \"^1.0.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/privatenumber/get-tsconfig?sponsor=1\"\n }\n },\n \"node_modules/get-uri\": {\n \"version\": \"6.0.3\",\n \"resolved\": \"https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz\",\n \"integrity\": \"sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"basic-ftp\": \"^5.0.2\",\n \"data-uri-to-buffer\": \"^6.0.2\",\n \"debug\": \"^4.3.4\",\n \"fs-extra\": \"^11.2.0\"\n },\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/git-raw-commits\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-3.0.0.tgz\",\n \"integrity\": \"sha512-b5OHmZ3vAgGrDn/X0kS+9qCfNKWe4K/jFnhwzVWWg0/k5eLa3060tZShrRg8Dja5kPc+YjS0Gc6y7cRr44Lpjw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"dargs\": \"^7.0.0\",\n \"meow\": \"^8.1.2\",\n \"split2\": \"^3.2.2\"\n },\n \"bin\": {\n \"git-raw-commits\": \"cli.js\"\n },\n \"engines\": {\n \"node\": \">=14\"\n }\n },\n \"node_modules/git-remote-origin-url\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz\",\n \"integrity\": \"sha512-eU+GGrZgccNJcsDH5LkXR3PB9M958hxc7sbA8DFJjrv9j4L2P/eZfKhM+QD6wyzpiv+b1BpK0XrYCxkovtjSLw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"gitconfiglocal\": \"^1.0.0\",\n \"pify\": \"^2.3.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/git-remote-origin-url/node_modules/pify\": {\n \"version\": \"2.3.0\",\n \"resolved\": \"https://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n \"integrity\": \"sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/git-semver-tags\": {\n \"version\": \"5.0.1\",\n \"resolved\": \"https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-5.0.1.tgz\",\n \"integrity\": \"sha512-hIvOeZwRbQ+7YEUmCkHqo8FOLQZCEn18yevLHADlFPZY02KJGsu5FZt9YW/lybfK2uhWFI7Qg/07LekJiTv7iA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"meow\": \"^8.1.2\",\n \"semver\": \"^7.0.0\"\n },\n \"bin\": {\n \"git-semver-tags\": \"cli.js\"\n },\n \"engines\": {\n \"node\": \">=14\"\n }\n },\n \"node_modules/git-up\": {\n \"version\": \"7.0.0\",\n \"resolved\": \"https://registry.npmjs.org/git-up/-/git-up-7.0.0.tgz\",\n \"integrity\": \"sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"is-ssh\": \"^1.4.0\",\n \"parse-url\": \"^8.1.0\"\n }\n },\n \"node_modules/git-url-parse\": {\n \"version\": \"14.0.0\",\n \"resolved\": \"https://registry.npmjs.org/git-url-parse/-/git-url-parse-14.0.0.tgz\",\n \"integrity\": \"sha512-NnLweV+2A4nCvn4U/m2AoYu0pPKlsmhK9cknG7IMwsjFY1S2jxM+mAhsDxyxfCIGfGaD+dozsyX4b6vkYc83yQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"git-up\": \"^7.0.0\"\n }\n },\n \"node_modules/gitconfiglocal\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz\",\n \"integrity\": \"sha512-spLUXeTAVHxDtKsJc8FkFVgFtMdEN9qPGpL23VfSHx4fP4+Ds097IXLvymbnDH8FnmxX5Nr9bPw3A+AQ6mWEaQ==\",\n \"dev\": true,\n \"license\": \"BSD\",\n \"dependencies\": {\n \"ini\": \"^1.3.2\"\n }\n },\n \"node_modules/glob\": {\n \"version\": \"13.0.1\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-13.0.1.tgz\",\n \"integrity\": \"sha512-B7U/vJpE3DkJ5WXTgTpTRN63uV42DseiXXKMwG14LQBXmsdeIoHAPbU/MEo6II0k5ED74uc2ZGTC6MwHFQhF6w==\",\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"minimatch\": \"^10.1.2\",\n \"minipass\": \"^7.1.2\",\n \"path-scurry\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/glob-parent\": {\n \"version\": \"5.1.2\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"is-glob\": \"^4.0.1\"\n },\n \"engines\": {\n \"node\": \">= 6\"\n }\n },\n \"node_modules/glob/node_modules/lru-cache\": {\n \"version\": \"11.2.5\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz\",\n \"integrity\": \"sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==\",\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"node_modules/glob/node_modules/minimatch\": {\n \"version\": \"10.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-10.1.2.tgz\",\n \"integrity\": \"sha512-fu656aJ0n2kcXwsnwnv9g24tkU5uSmOlTjd6WyyaKm2Z+h1qmY6bAjrcaIxF/BslFqbZ8UBtbJi7KgQOZD2PTw==\",\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/brace-expansion\": \"^5.0.1\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/glob/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/glob/node_modules/path-scurry\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz\",\n \"integrity\": \"sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==\",\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"lru-cache\": \"^11.0.0\",\n \"minipass\": \"^7.1.2\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/globals\": {\n \"version\": \"15.15.0\",\n \"resolved\": \"https://registry.npmjs.org/globals/-/globals-15.15.0.tgz\",\n \"integrity\": \"sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/globby\": {\n \"version\": \"11.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"array-union\": \"^2.1.0\",\n \"dir-glob\": \"^3.0.1\",\n \"fast-glob\": \"^3.2.9\",\n \"ignore\": \"^5.2.0\",\n \"merge2\": \"^1.4.1\",\n \"slash\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/globby/node_modules/slash\": {\n \"version\": \"3.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/globrex\": {\n \"version\": \"0.1.2\",\n \"resolved\": \"https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz\",\n \"integrity\": \"sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==\",\n \"license\": \"MIT\"\n },\n \"node_modules/gopd\": {\n \"version\": \"1.2.0\",\n \"resolved\": \"https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz\",\n \"integrity\": \"sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/graceful-fs\": {\n \"version\": \"4.2.11\",\n \"resolved\": \"https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz\",\n \"integrity\": \"sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==\"\n },\n \"node_modules/grapheme-splitter\": {\n \"version\": \"1.0.4\",\n \"license\": \"MIT\"\n },\n \"node_modules/handle-thing\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz\",\n \"integrity\": \"sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==\",\n \"optional\": true\n },\n \"node_modules/handlebars\": {\n \"version\": \"4.7.8\",\n \"resolved\": \"https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz\",\n \"integrity\": \"sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"minimist\": \"^1.2.5\",\n \"neo-async\": \"^2.6.2\",\n \"source-map\": \"^0.6.1\",\n \"wordwrap\": \"^1.0.0\"\n },\n \"bin\": {\n \"handlebars\": \"bin/handlebars\"\n },\n \"engines\": {\n \"node\": \">=0.4.7\"\n },\n \"optionalDependencies\": {\n \"uglify-js\": \"^3.1.4\"\n }\n },\n \"node_modules/hard-rejection\": {\n \"version\": \"2.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/has-flag\": {\n \"version\": \"4.0.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/has-property-descriptors\": {\n \"version\": \"1.0.2\",\n \"resolved\": \"https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz\",\n \"integrity\": \"sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"es-define-property\": \"^1.0.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/has-symbols\": {\n \"version\": \"1.1.0\",\n \"resolved\": \"https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz\",\n \"integrity\": \"sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/has-tostringtag\": {\n \"version\": \"1.0.2\",\n \"resolved\": \"https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz\",\n \"integrity\": \"sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-symbols\": \"^1.0.3\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/has-unicode\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz\",\n \"integrity\": \"sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/hash-base\": {\n \"version\": \"3.1.2\",\n \"resolved\": \"https://registry.npmjs.org/hash-base/-/hash-base-3.1.2.tgz\",\n \"integrity\": \"sha512-Bb33KbowVTIj5s7Ked1OsqHUeCpz//tPwR+E2zJgJKo9Z5XolZ9b6bdUgjmYlwnWhoOQKoTd1TYToZGn5mAYOg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"inherits\": \"^2.0.4\",\n \"readable-stream\": \"^2.3.8\",\n \"safe-buffer\": \"^5.2.1\",\n \"to-buffer\": \"^1.2.1\"\n },\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/hash-base/node_modules/isarray\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz\",\n \"integrity\": \"sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/hash-base/node_modules/readable-stream\": {\n \"version\": \"2.3.8\",\n \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz\",\n \"integrity\": \"sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"core-util-is\": \"~1.0.0\",\n \"inherits\": \"~2.0.3\",\n \"isarray\": \"~1.0.0\",\n \"process-nextick-args\": \"~2.0.0\",\n \"safe-buffer\": \"~5.1.1\",\n \"string_decoder\": \"~1.1.1\",\n \"util-deprecate\": \"~1.0.1\"\n }\n },\n \"node_modules/hash-base/node_modules/readable-stream/node_modules/safe-buffer\": {\n \"version\": \"5.1.2\",\n \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz\",\n \"integrity\": \"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/hash-base/node_modules/string_decoder\": {\n \"version\": \"1.1.1\",\n \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz\",\n \"integrity\": \"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safe-buffer\": \"~5.1.0\"\n }\n },\n \"node_modules/hash-base/node_modules/string_decoder/node_modules/safe-buffer\": {\n \"version\": \"5.1.2\",\n \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz\",\n \"integrity\": \"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/hash.js\": {\n \"version\": \"1.1.7\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"inherits\": \"^2.0.3\",\n \"minimalistic-assert\": \"^1.0.1\"\n }\n },\n \"node_modules/hasown\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz\",\n \"integrity\": \"sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"function-bind\": \"^1.1.2\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n }\n },\n \"node_modules/he\": {\n \"version\": \"1.2.0\",\n \"license\": \"MIT\",\n \"bin\": {\n \"he\": \"bin/he\"\n }\n },\n \"node_modules/hmac-drbg\": {\n \"version\": \"1.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"hash.js\": \"^1.0.3\",\n \"minimalistic-assert\": \"^1.0.0\",\n \"minimalistic-crypto-utils\": \"^1.0.1\"\n }\n },\n \"node_modules/hosted-git-info\": {\n \"version\": \"4.1.0\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"lru-cache\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/hosted-git-info/node_modules/lru-cache\": {\n \"version\": \"6.0.0\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"yallist\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/hpack.js\": {\n \"version\": \"2.1.6\",\n \"resolved\": \"https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz\",\n \"integrity\": \"sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==\",\n \"optional\": true,\n \"dependencies\": {\n \"inherits\": \"^2.0.1\",\n \"obuf\": \"^1.0.0\",\n \"readable-stream\": \"^2.0.1\",\n \"wbuf\": \"^1.1.0\"\n }\n },\n \"node_modules/hpack.js/node_modules/isarray\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz\",\n \"integrity\": \"sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==\",\n \"optional\": true\n },\n \"node_modules/hpack.js/node_modules/readable-stream\": {\n \"version\": \"2.3.8\",\n \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz\",\n \"integrity\": \"sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==\",\n \"optional\": true,\n \"dependencies\": {\n \"core-util-is\": \"~1.0.0\",\n \"inherits\": \"~2.0.3\",\n \"isarray\": \"~1.0.0\",\n \"process-nextick-args\": \"~2.0.0\",\n \"safe-buffer\": \"~5.1.1\",\n \"string_decoder\": \"~1.1.1\",\n \"util-deprecate\": \"~1.0.1\"\n }\n },\n \"node_modules/hpack.js/node_modules/safe-buffer\": {\n \"version\": \"5.1.2\",\n \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz\",\n \"integrity\": \"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==\",\n \"optional\": true\n },\n \"node_modules/hpack.js/node_modules/string_decoder\": {\n \"version\": \"1.1.1\",\n \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz\",\n \"integrity\": \"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==\",\n \"optional\": true,\n \"dependencies\": {\n \"safe-buffer\": \"~5.1.0\"\n }\n },\n \"node_modules/htmlfy\": {\n \"version\": \"0.8.1\",\n \"resolved\": \"https://registry.npmjs.org/htmlfy/-/htmlfy-0.8.1.tgz\",\n \"integrity\": \"sha512-xWROBw9+MEGwxpotll0h672KCaLrKKiCYzsyN8ZgL9cQbVumFnyvsk2JqiB9ELAV1GLj1GG/jxZUjV9OZZi/yQ==\",\n \"license\": \"MIT\"\n },\n \"node_modules/htmlparser2\": {\n \"version\": \"9.1.0\",\n \"resolved\": \"https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz\",\n \"integrity\": \"sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==\",\n \"funding\": [\n \"https://github.com/fb55/htmlparser2?sponsor=1\",\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/fb55\"\n }\n ],\n \"license\": \"MIT\",\n \"dependencies\": {\n \"domelementtype\": \"^2.3.0\",\n \"domhandler\": \"^5.0.3\",\n \"domutils\": \"^3.1.0\",\n \"entities\": \"^4.5.0\"\n }\n },\n \"node_modules/http-cache-semantics\": {\n \"version\": \"4.2.0\",\n \"resolved\": \"https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz\",\n \"integrity\": \"sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==\",\n \"dev\": true,\n \"license\": \"BSD-2-Clause\"\n },\n \"node_modules/http-deceiver\": {\n \"version\": \"1.2.7\",\n \"resolved\": \"https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz\",\n \"integrity\": \"sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==\",\n \"optional\": true\n },\n \"node_modules/http-errors\": {\n \"version\": \"2.0.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"depd\": \"2.0.0\",\n \"inherits\": \"2.0.4\",\n \"setprototypeof\": \"1.2.0\",\n \"statuses\": \"2.0.1\",\n \"toidentifier\": \"1.0.1\"\n },\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/http-proxy-agent\": {\n \"version\": \"7.0.2\",\n \"resolved\": \"https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz\",\n \"integrity\": \"sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"agent-base\": \"^7.1.0\",\n \"debug\": \"^4.3.4\"\n },\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/http-status-codes\": {\n \"version\": \"2.3.0\",\n \"resolved\": \"https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.3.0.tgz\",\n \"integrity\": \"sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==\"\n },\n \"node_modules/https-browserify\": {\n \"version\": \"1.0.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/https-proxy-agent\": {\n \"version\": \"7.0.6\",\n \"resolved\": \"https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz\",\n \"integrity\": \"sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"agent-base\": \"^7.1.2\",\n \"debug\": \"4\"\n },\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/human-signals\": {\n \"version\": \"2.1.0\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"engines\": {\n \"node\": \">=10.17.0\"\n }\n },\n \"node_modules/iconv-lite\": {\n \"version\": \"0.6.3\",\n \"resolved\": \"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz\",\n \"integrity\": \"sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safer-buffer\": \">= 2.1.2 < 3.0.0\"\n },\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/ieee754\": {\n \"version\": \"1.2.1\",\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/feross\"\n },\n {\n \"type\": \"patreon\",\n \"url\": \"https://www.patreon.com/feross\"\n },\n {\n \"type\": \"consulting\",\n \"url\": \"https://feross.org/support\"\n }\n ],\n \"license\": \"BSD-3-Clause\"\n },\n \"node_modules/ignore\": {\n \"version\": \"5.3.2\",\n \"resolved\": \"https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz\",\n \"integrity\": \"sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 4\"\n }\n },\n \"node_modules/ignore-walk\": {\n \"version\": \"8.0.0\",\n \"resolved\": \"https://registry.npmjs.org/ignore-walk/-/ignore-walk-8.0.0.tgz\",\n \"integrity\": \"sha512-FCeMZT4NiRQGh+YkeKMtWrOmBgWjHjMJ26WQWrRQyoyzqevdaGSakUaJW5xQYmjLlUVk2qUnCjYVBax9EKKg8A==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"minimatch\": \"^10.0.3\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/ignore-walk/node_modules/minimatch\": {\n \"version\": \"10.0.3\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz\",\n \"integrity\": \"sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@isaacs/brace-expansion\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/immediate\": {\n \"version\": \"3.0.6\",\n \"resolved\": \"https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz\",\n \"integrity\": \"sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==\",\n \"license\": \"MIT\"\n },\n \"node_modules/import-fresh\": {\n \"version\": \"3.3.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"parent-module\": \"^1.0.0\",\n \"resolve-from\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=6\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/import-fresh/node_modules/resolve-from\": {\n \"version\": \"4.0.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/import-local\": {\n \"version\": \"3.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"pkg-dir\": \"^4.2.0\",\n \"resolve-cwd\": \"^3.0.0\"\n },\n \"bin\": {\n \"import-local-fixture\": \"fixtures/cli.js\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/import-local/node_modules/find-up\": {\n \"version\": \"4.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"locate-path\": \"^5.0.0\",\n \"path-exists\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/import-local/node_modules/locate-path\": {\n \"version\": \"5.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-locate\": \"^4.1.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/import-local/node_modules/p-limit\": {\n \"version\": \"2.3.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-try\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=6\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/import-local/node_modules/p-locate\": {\n \"version\": \"4.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-limit\": \"^2.2.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/import-local/node_modules/pkg-dir\": {\n \"version\": \"4.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"find-up\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/import-meta-resolve\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz\",\n \"integrity\": \"sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==\",\n \"license\": \"MIT\",\n \"funding\": {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/wooorm\"\n }\n },\n \"node_modules/imurmurhash\": {\n \"version\": \"0.1.4\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.8.19\"\n }\n },\n \"node_modules/indent-string\": {\n \"version\": \"4.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/index-to-position\": {\n \"version\": \"1.2.0\",\n \"resolved\": \"https://registry.npmjs.org/index-to-position/-/index-to-position-1.2.0.tgz\",\n \"integrity\": \"sha512-Yg7+ztRkqslMAS2iFaU+Oa4KTSidr63OsFGlOrJoW981kIYO3CGCS3wA95P1mUi/IVSJkn0D479KTJpVpvFNuw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/inflight\": {\n \"version\": \"1.0.6\",\n \"resolved\": \"https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz\",\n \"integrity\": \"sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==\",\n \"deprecated\": \"This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"once\": \"^1.3.0\",\n \"wrappy\": \"1\"\n }\n },\n \"node_modules/inherits\": {\n \"version\": \"2.0.4\",\n \"license\": \"ISC\"\n },\n \"node_modules/ini\": {\n \"version\": \"1.3.8\",\n \"resolved\": \"https://registry.npmjs.org/ini/-/ini-1.3.8.tgz\",\n \"integrity\": \"sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/init-package-json\": {\n \"version\": \"8.2.2\",\n \"resolved\": \"https://registry.npmjs.org/init-package-json/-/init-package-json-8.2.2.tgz\",\n \"integrity\": \"sha512-pXVMn67Jdw2hPKLCuJZj62NC9B2OIDd1R3JwZXTHXuEnfN3Uq5kJbKOSld6YEU+KOGfMD82EzxFTYz5o0SSJoA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/package-json\": \"^7.0.0\",\n \"npm-package-arg\": \"^13.0.0\",\n \"promzard\": \"^2.0.0\",\n \"read\": \"^4.0.0\",\n \"semver\": \"^7.7.2\",\n \"validate-npm-package-license\": \"^3.0.4\",\n \"validate-npm-package-name\": \"^6.0.2\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/inquirer\": {\n \"version\": \"12.9.6\",\n \"resolved\": \"https://registry.npmjs.org/inquirer/-/inquirer-12.9.6.tgz\",\n \"integrity\": \"sha512-603xXOgyfxhuis4nfnWaZrMaotNT0Km9XwwBNWUKbIDqeCY89jGr2F9YPEMiNhU6XjIP4VoWISMBFfcc5NgrTw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@inquirer/ansi\": \"^1.0.0\",\n \"@inquirer/core\": \"^10.2.2\",\n \"@inquirer/prompts\": \"^7.8.6\",\n \"@inquirer/type\": \"^3.0.8\",\n \"mute-stream\": \"^2.0.0\",\n \"run-async\": \"^4.0.5\",\n \"rxjs\": \"^7.8.2\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"peerDependencies\": {\n \"@types/node\": \">=18\"\n },\n \"peerDependenciesMeta\": {\n \"@types/node\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/ip-address\": {\n \"version\": \"9.0.5\",\n \"resolved\": \"https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz\",\n \"integrity\": \"sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"jsbn\": \"1.1.0\",\n \"sprintf-js\": \"^1.1.3\"\n },\n \"engines\": {\n \"node\": \">= 12\"\n }\n },\n \"node_modules/ip-address/node_modules/sprintf-js\": {\n \"version\": \"1.1.3\",\n \"resolved\": \"https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz\",\n \"integrity\": \"sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==\",\n \"license\": \"BSD-3-Clause\"\n },\n \"node_modules/ipaddr.js\": {\n \"version\": \"1.9.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.10\"\n }\n },\n \"node_modules/irregular-plurals\": {\n \"version\": \"3.5.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/is-arrayish\": {\n \"version\": \"0.2.1\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/is-builtin-module\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-5.0.0.tgz\",\n \"integrity\": \"sha512-f4RqJKBUe5rQkJ2eJEJBXSticB3hGbN9j0yxxMQFqIW89Jp9WYFtzfTcRlstDKVUTRzSOTLKRfO9vIztenwtxA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"builtin-modules\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \">=18.20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/is-bun-module\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz\",\n \"integrity\": \"sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"semver\": \"^7.7.1\"\n }\n },\n \"node_modules/is-callable\": {\n \"version\": \"1.2.7\",\n \"resolved\": \"https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz\",\n \"integrity\": \"sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/is-ci\": {\n \"version\": \"3.0.1\",\n \"resolved\": \"https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz\",\n \"integrity\": \"sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ci-info\": \"^3.2.0\"\n },\n \"bin\": {\n \"is-ci\": \"bin.js\"\n }\n },\n \"node_modules/is-core-module\": {\n \"version\": \"2.16.1\",\n \"resolved\": \"https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz\",\n \"integrity\": \"sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"hasown\": \"^2.0.2\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/is-docker\": {\n \"version\": \"2.2.1\",\n \"resolved\": \"https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz\",\n \"integrity\": \"sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"bin\": {\n \"is-docker\": \"cli.js\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/is-extglob\": {\n \"version\": \"2.1.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/is-file-esm\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/is-file-esm/-/is-file-esm-1.0.0.tgz\",\n \"integrity\": \"sha512-rZlaNKb4Mr8WlRu2A9XdeoKgnO5aA53XdPHgCKVyCrQ/rWi89RET1+bq37Ru46obaQXeiX4vmFIm1vks41hoSA==\",\n \"dev\": true,\n \"dependencies\": {\n \"read-pkg-up\": \"^7.0.1\"\n }\n },\n \"node_modules/is-file-esm/node_modules/find-up\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz\",\n \"integrity\": \"sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==\",\n \"dev\": true,\n \"dependencies\": {\n \"locate-path\": \"^5.0.0\",\n \"path-exists\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/is-file-esm/node_modules/locate-path\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz\",\n \"integrity\": \"sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==\",\n \"dev\": true,\n \"dependencies\": {\n \"p-locate\": \"^4.1.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/is-file-esm/node_modules/p-limit\": {\n \"version\": \"2.3.0\",\n \"resolved\": \"https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz\",\n \"integrity\": \"sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==\",\n \"dev\": true,\n \"dependencies\": {\n \"p-try\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=6\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/is-file-esm/node_modules/p-locate\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz\",\n \"integrity\": \"sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==\",\n \"dev\": true,\n \"dependencies\": {\n \"p-limit\": \"^2.2.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/is-file-esm/node_modules/read-pkg-up\": {\n \"version\": \"7.0.1\",\n \"resolved\": \"https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz\",\n \"integrity\": \"sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==\",\n \"dev\": true,\n \"dependencies\": {\n \"find-up\": \"^4.1.0\",\n \"read-pkg\": \"^5.2.0\",\n \"type-fest\": \"^0.8.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/is-file-esm/node_modules/type-fest\": {\n \"version\": \"0.8.1\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz\",\n \"integrity\": \"sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==\",\n \"dev\": true,\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/is-fullwidth-code-point\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz\",\n \"integrity\": \"sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/is-glob\": {\n \"version\": \"4.0.3\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"is-extglob\": \"^2.1.1\"\n },\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/is-interactive\": {\n \"version\": \"1.0.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/is-number\": {\n \"version\": \"7.0.0\",\n \"resolved\": \"https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz\",\n \"integrity\": \"sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.12.0\"\n }\n },\n \"node_modules/is-obj\": {\n \"version\": \"2.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/is-path-inside\": {\n \"version\": \"3.0.3\",\n \"resolved\": \"https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz\",\n \"integrity\": \"sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/is-plain-obj\": {\n \"version\": \"1.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/is-promise\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz\",\n \"integrity\": \"sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==\",\n \"license\": \"MIT\"\n },\n \"node_modules/is-safe-filename\": {\n \"version\": \"0.1.1\",\n \"resolved\": \"https://registry.npmjs.org/is-safe-filename/-/is-safe-filename-0.1.1.tgz\",\n \"integrity\": \"sha512-4SrR7AdnY11LHfDKTZY1u6Ga3RuxZdl3YKWWShO5iyuG5h8QS4GD2tOb04peBJ5I7pXbR+CGBNEhTcwK+FzN3g==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/is-ssh\": {\n \"version\": \"1.4.1\",\n \"resolved\": \"https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.1.tgz\",\n \"integrity\": \"sha512-JNeu1wQsHjyHgn9NcWTaXq6zWSR6hqE0++zhfZlkFBbScNkyvxCdeV8sRkSBaeLKxmbpR21brail63ACNxJ0Tg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"protocols\": \"^2.0.1\"\n }\n },\n \"node_modules/is-stream\": {\n \"version\": \"2.0.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/is-text-path\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz\",\n \"integrity\": \"sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"text-extensions\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/is-typed-array\": {\n \"version\": \"1.1.15\",\n \"resolved\": \"https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz\",\n \"integrity\": \"sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"which-typed-array\": \"^1.1.16\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/is-unicode-supported\": {\n \"version\": \"0.1.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/is-wsl\": {\n \"version\": \"2.2.0\",\n \"resolved\": \"https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz\",\n \"integrity\": \"sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"is-docker\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/isarray\": {\n \"version\": \"0.0.1\",\n \"license\": \"MIT\"\n },\n \"node_modules/isexe\": {\n \"version\": \"2.0.0\",\n \"license\": \"ISC\"\n },\n \"node_modules/jackspeak\": {\n \"version\": \"2.3.6\",\n \"resolved\": \"https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz\",\n \"integrity\": \"sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==\",\n \"dev\": true,\n \"dependencies\": {\n \"@isaacs/cliui\": \"^8.0.2\"\n },\n \"engines\": {\n \"node\": \">=14\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n },\n \"optionalDependencies\": {\n \"@pkgjs/parseargs\": \"^0.11.0\"\n }\n },\n \"node_modules/jake\": {\n \"version\": \"10.9.4\",\n \"resolved\": \"https://registry.npmjs.org/jake/-/jake-10.9.4.tgz\",\n \"integrity\": \"sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"async\": \"^3.2.6\",\n \"filelist\": \"^1.0.4\",\n \"picocolors\": \"^1.1.1\"\n },\n \"bin\": {\n \"jake\": \"bin/cli.js\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/jest-diff\": {\n \"version\": \"29.5.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"chalk\": \"^4.0.0\",\n \"diff-sequences\": \"^29.4.3\",\n \"jest-get-type\": \"^29.4.3\",\n \"pretty-format\": \"^29.5.0\"\n },\n \"engines\": {\n \"node\": \"^14.15.0 || ^16.10.0 || >=18.0.0\"\n }\n },\n \"node_modules/jest-diff/node_modules/ansi-styles\": {\n \"version\": \"4.3.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-convert\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/jest-diff/node_modules/chalk\": {\n \"version\": \"4.1.2\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^4.1.0\",\n \"supports-color\": \"^7.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/chalk?sponsor=1\"\n }\n },\n \"node_modules/jest-diff/node_modules/color-convert\": {\n \"version\": \"2.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-name\": \"~1.1.4\"\n },\n \"engines\": {\n \"node\": \">=7.0.0\"\n }\n },\n \"node_modules/jest-diff/node_modules/color-name\": {\n \"version\": \"1.1.4\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/jest-diff/node_modules/pretty-format\": {\n \"version\": \"29.5.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@jest/schemas\": \"^29.4.3\",\n \"ansi-styles\": \"^5.0.0\",\n \"react-is\": \"^18.0.0\"\n },\n \"engines\": {\n \"node\": \"^14.15.0 || ^16.10.0 || >=18.0.0\"\n }\n },\n \"node_modules/jest-diff/node_modules/pretty-format/node_modules/ansi-styles\": {\n \"version\": \"5.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/jest-diff/node_modules/supports-color\": {\n \"version\": \"7.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-flag\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/jest-get-type\": {\n \"version\": \"29.4.3\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^14.15.0 || ^16.10.0 || >=18.0.0\"\n }\n },\n \"node_modules/jiti\": {\n \"version\": \"2.6.1\",\n \"resolved\": \"https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz\",\n \"integrity\": \"sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==\",\n \"license\": \"MIT\",\n \"bin\": {\n \"jiti\": \"lib/jiti-cli.mjs\"\n }\n },\n \"node_modules/js-tokens\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz\",\n \"integrity\": \"sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\",\n \"license\": \"MIT\"\n },\n \"node_modules/js-yaml\": {\n \"version\": \"4.1.1\",\n \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz\",\n \"integrity\": \"sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"argparse\": \"^2.0.1\"\n },\n \"bin\": {\n \"js-yaml\": \"bin/js-yaml.js\"\n }\n },\n \"node_modules/jsbn\": {\n \"version\": \"1.1.0\",\n \"resolved\": \"https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz\",\n \"integrity\": \"sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==\",\n \"license\": \"MIT\"\n },\n \"node_modules/jsesc\": {\n \"version\": \"3.1.0\",\n \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz\",\n \"integrity\": \"sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==\",\n \"license\": \"MIT\",\n \"bin\": {\n \"jsesc\": \"bin/jsesc\"\n },\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/jsftp\": {\n \"version\": \"2.1.3\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"debug\": \"^3.1.0\",\n \"ftp-response-parser\": \"^1.0.1\",\n \"once\": \"^1.4.0\",\n \"parse-listing\": \"^1.1.3\",\n \"stream-combiner\": \"^0.2.2\",\n \"unorm\": \"^1.4.1\"\n },\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/jsftp/node_modules/debug\": {\n \"version\": \"3.2.7\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.1\"\n }\n },\n \"node_modules/json-buffer\": {\n \"version\": \"3.0.1\",\n \"resolved\": \"https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz\",\n \"integrity\": \"sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==\",\n \"license\": \"MIT\"\n },\n \"node_modules/json-parse-better-errors\": {\n \"version\": \"1.0.2\",\n \"resolved\": \"https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz\",\n \"integrity\": \"sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/json-parse-even-better-errors\": {\n \"version\": \"2.3.1\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/json-schema\": {\n \"version\": \"0.4.0\",\n \"license\": \"(AFL-2.1 OR BSD-3-Clause)\"\n },\n \"node_modules/json-schema-to-typescript\": {\n \"version\": \"15.0.4\",\n \"resolved\": \"https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-15.0.4.tgz\",\n \"integrity\": \"sha512-Su9oK8DR4xCmDsLlyvadkXzX6+GGXJpbhwoLtOGArAG61dvbW4YQmSEno2y66ahpIdmLMg6YUf/QHLgiwvkrHQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@apidevtools/json-schema-ref-parser\": \"^11.5.5\",\n \"@types/json-schema\": \"^7.0.15\",\n \"@types/lodash\": \"^4.17.7\",\n \"is-glob\": \"^4.0.3\",\n \"js-yaml\": \"^4.1.0\",\n \"lodash\": \"^4.17.21\",\n \"minimist\": \"^1.2.8\",\n \"prettier\": \"^3.2.5\",\n \"tinyglobby\": \"^0.2.9\"\n },\n \"bin\": {\n \"json2ts\": \"dist/src/cli.js\"\n },\n \"engines\": {\n \"node\": \">=16.0.0\"\n }\n },\n \"node_modules/json-schema-traverse\": {\n \"version\": \"1.0.0\",\n \"license\": \"MIT\"\n },\n \"node_modules/json-stable-stringify-without-jsonify\": {\n \"version\": \"1.0.1\",\n \"license\": \"MIT\"\n },\n \"node_modules/json-stringify-nice\": {\n \"version\": \"1.1.4\",\n \"resolved\": \"https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz\",\n \"integrity\": \"sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/json-stringify-safe\": {\n \"version\": \"5.0.1\",\n \"resolved\": \"https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz\",\n \"integrity\": \"sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/json5\": {\n \"version\": \"2.2.3\",\n \"resolved\": \"https://registry.npmjs.org/json5/-/json5-2.2.3.tgz\",\n \"integrity\": \"sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"bin\": {\n \"json5\": \"lib/cli.js\"\n },\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/jsonc-parser\": {\n \"version\": \"3.2.0\",\n \"resolved\": \"https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz\",\n \"integrity\": \"sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/jsonfile\": {\n \"version\": \"6.1.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"universalify\": \"^2.0.0\"\n },\n \"optionalDependencies\": {\n \"graceful-fs\": \"^4.1.6\"\n }\n },\n \"node_modules/jsonparse\": {\n \"version\": \"1.3.1\",\n \"dev\": true,\n \"engines\": [\n \"node >= 0.2.0\"\n ],\n \"license\": \"MIT\"\n },\n \"node_modules/JSONStream\": {\n \"version\": \"1.3.5\",\n \"resolved\": \"https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz\",\n \"integrity\": \"sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==\",\n \"dev\": true,\n \"license\": \"(MIT OR Apache-2.0)\",\n \"dependencies\": {\n \"jsonparse\": \"^1.2.0\",\n \"through\": \">=2.2.7 <3\"\n },\n \"bin\": {\n \"JSONStream\": \"bin.js\"\n },\n \"engines\": {\n \"node\": \"*\"\n }\n },\n \"node_modules/jszip\": {\n \"version\": \"3.10.1\",\n \"resolved\": \"https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz\",\n \"integrity\": \"sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==\",\n \"license\": \"(MIT OR GPL-3.0-or-later)\",\n \"dependencies\": {\n \"lie\": \"~3.3.0\",\n \"pako\": \"~1.0.2\",\n \"readable-stream\": \"~2.3.6\",\n \"setimmediate\": \"^1.0.5\"\n }\n },\n \"node_modules/jszip/node_modules/isarray\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz\",\n \"integrity\": \"sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==\",\n \"license\": \"MIT\"\n },\n \"node_modules/jszip/node_modules/readable-stream\": {\n \"version\": \"2.3.8\",\n \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz\",\n \"integrity\": \"sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"core-util-is\": \"~1.0.0\",\n \"inherits\": \"~2.0.3\",\n \"isarray\": \"~1.0.0\",\n \"process-nextick-args\": \"~2.0.0\",\n \"safe-buffer\": \"~5.1.1\",\n \"string_decoder\": \"~1.1.1\",\n \"util-deprecate\": \"~1.0.1\"\n }\n },\n \"node_modules/jszip/node_modules/safe-buffer\": {\n \"version\": \"5.1.2\",\n \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz\",\n \"integrity\": \"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==\",\n \"license\": \"MIT\"\n },\n \"node_modules/jszip/node_modules/string_decoder\": {\n \"version\": \"1.1.1\",\n \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz\",\n \"integrity\": \"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safe-buffer\": \"~5.1.0\"\n }\n },\n \"node_modules/junk\": {\n \"version\": \"4.0.1\",\n \"resolved\": \"https://registry.npmjs.org/junk/-/junk-4.0.1.tgz\",\n \"integrity\": \"sha512-Qush0uP+G8ZScpGMZvHUiRfI0YBWuB3gVBYlI0v0vvOJt5FLicco+IkP0a50LqTTQhmts/m6tP5SWE+USyIvcQ==\",\n \"dev\": true,\n \"engines\": {\n \"node\": \">=12.20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/just-diff\": {\n \"version\": \"6.0.2\",\n \"resolved\": \"https://registry.npmjs.org/just-diff/-/just-diff-6.0.2.tgz\",\n \"integrity\": \"sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/just-diff-apply\": {\n \"version\": \"5.5.0\",\n \"resolved\": \"https://registry.npmjs.org/just-diff-apply/-/just-diff-apply-5.5.0.tgz\",\n \"integrity\": \"sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/keyv\": {\n \"version\": \"4.5.4\",\n \"resolved\": \"https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz\",\n \"integrity\": \"sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"json-buffer\": \"3.0.1\"\n }\n },\n \"node_modules/kind-of\": {\n \"version\": \"6.0.3\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/klaw\": {\n \"version\": \"4.1.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=14.14.0\"\n }\n },\n \"node_modules/kleur\": {\n \"version\": \"4.1.5\",\n \"resolved\": \"https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz\",\n \"integrity\": \"sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/kuler\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz\",\n \"integrity\": \"sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==\",\n \"license\": \"MIT\"\n },\n \"node_modules/lazystream\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz\",\n \"integrity\": \"sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==\",\n \"dependencies\": {\n \"readable-stream\": \"^2.0.5\"\n },\n \"engines\": {\n \"node\": \">= 0.6.3\"\n }\n },\n \"node_modules/lazystream/node_modules/isarray\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz\",\n \"integrity\": \"sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==\"\n },\n \"node_modules/lazystream/node_modules/readable-stream\": {\n \"version\": \"2.3.8\",\n \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz\",\n \"integrity\": \"sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==\",\n \"dependencies\": {\n \"core-util-is\": \"~1.0.0\",\n \"inherits\": \"~2.0.3\",\n \"isarray\": \"~1.0.0\",\n \"process-nextick-args\": \"~2.0.0\",\n \"safe-buffer\": \"~5.1.1\",\n \"string_decoder\": \"~1.1.1\",\n \"util-deprecate\": \"~1.0.1\"\n }\n },\n \"node_modules/lazystream/node_modules/safe-buffer\": {\n \"version\": \"5.1.2\",\n \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz\",\n \"integrity\": \"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==\"\n },\n \"node_modules/lazystream/node_modules/string_decoder\": {\n \"version\": \"1.1.1\",\n \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz\",\n \"integrity\": \"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==\",\n \"dependencies\": {\n \"safe-buffer\": \"~5.1.0\"\n }\n },\n \"node_modules/lerna\": {\n \"version\": \"9.0.3\",\n \"resolved\": \"https://registry.npmjs.org/lerna/-/lerna-9.0.3.tgz\",\n \"integrity\": \"sha512-wCsJWKX8FaGJoWX2K5gL5q7ReqQNxNsS92AW5glBe/JzWEtoM/jgXXGrEzQzORMb8rTXYFjUjpn60et+i8XugA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@lerna/create\": \"9.0.3\",\n \"@npmcli/arborist\": \"9.1.6\",\n \"@npmcli/package-json\": \"7.0.2\",\n \"@npmcli/run-script\": \"10.0.2\",\n \"@nx/devkit\": \">=21.5.2 < 23.0.0\",\n \"@octokit/plugin-enterprise-rest\": \"6.0.1\",\n \"@octokit/rest\": \"20.1.2\",\n \"aproba\": \"2.0.0\",\n \"byte-size\": \"8.1.1\",\n \"chalk\": \"4.1.0\",\n \"cmd-shim\": \"6.0.3\",\n \"color-support\": \"1.1.3\",\n \"columnify\": \"1.6.0\",\n \"console-control-strings\": \"^1.1.0\",\n \"conventional-changelog-angular\": \"7.0.0\",\n \"conventional-changelog-core\": \"5.0.1\",\n \"conventional-recommended-bump\": \"7.0.1\",\n \"cosmiconfig\": \"9.0.0\",\n \"dedent\": \"1.5.3\",\n \"envinfo\": \"7.13.0\",\n \"execa\": \"5.0.0\",\n \"fs-extra\": \"^11.2.0\",\n \"get-port\": \"5.1.1\",\n \"get-stream\": \"6.0.0\",\n \"git-url-parse\": \"14.0.0\",\n \"glob-parent\": \"6.0.2\",\n \"has-unicode\": \"2.0.1\",\n \"import-local\": \"3.1.0\",\n \"ini\": \"^1.3.8\",\n \"init-package-json\": \"8.2.2\",\n \"inquirer\": \"12.9.6\",\n \"is-ci\": \"3.0.1\",\n \"is-stream\": \"2.0.0\",\n \"jest-diff\": \">=30.0.0 < 31\",\n \"js-yaml\": \"4.1.1\",\n \"libnpmaccess\": \"10.0.3\",\n \"libnpmpublish\": \"11.1.2\",\n \"load-json-file\": \"6.2.0\",\n \"make-dir\": \"4.0.0\",\n \"make-fetch-happen\": \"15.0.2\",\n \"minimatch\": \"3.0.5\",\n \"multimatch\": \"5.0.0\",\n \"npm-package-arg\": \"13.0.1\",\n \"npm-packlist\": \"10.0.3\",\n \"npm-registry-fetch\": \"19.1.0\",\n \"nx\": \">=21.5.3 < 23.0.0\",\n \"p-map\": \"4.0.0\",\n \"p-map-series\": \"2.1.0\",\n \"p-pipe\": \"3.1.0\",\n \"p-queue\": \"6.6.2\",\n \"p-reduce\": \"2.1.0\",\n \"p-waterfall\": \"2.1.1\",\n \"pacote\": \"21.0.1\",\n \"pify\": \"5.0.0\",\n \"read-cmd-shim\": \"4.0.0\",\n \"resolve-from\": \"5.0.0\",\n \"rimraf\": \"^4.4.1\",\n \"semver\": \"7.7.2\",\n \"set-blocking\": \"^2.0.0\",\n \"signal-exit\": \"3.0.7\",\n \"slash\": \"3.0.0\",\n \"ssri\": \"12.0.0\",\n \"string-width\": \"^4.2.3\",\n \"tar\": \"6.2.1\",\n \"temp-dir\": \"1.0.0\",\n \"through\": \"2.3.8\",\n \"tinyglobby\": \"0.2.12\",\n \"typescript\": \">=3 < 6\",\n \"upath\": \"2.0.1\",\n \"uuid\": \"^11.1.0\",\n \"validate-npm-package-license\": \"3.0.4\",\n \"validate-npm-package-name\": \"6.0.2\",\n \"wide-align\": \"1.1.5\",\n \"write-file-atomic\": \"5.0.1\",\n \"write-pkg\": \"4.0.0\",\n \"yargs\": \"17.7.2\",\n \"yargs-parser\": \"21.1.1\"\n },\n \"bin\": {\n \"lerna\": \"dist/cli.js\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\"\n }\n },\n \"node_modules/lerna/node_modules/ansi-styles\": {\n \"version\": \"4.3.0\",\n \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz\",\n \"integrity\": \"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-convert\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/lerna/node_modules/chalk\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz\",\n \"integrity\": \"sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^4.1.0\",\n \"supports-color\": \"^7.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/chalk?sponsor=1\"\n }\n },\n \"node_modules/lerna/node_modules/color-convert\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz\",\n \"integrity\": \"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-name\": \"~1.1.4\"\n },\n \"engines\": {\n \"node\": \">=7.0.0\"\n }\n },\n \"node_modules/lerna/node_modules/color-name\": {\n \"version\": \"1.1.4\",\n \"resolved\": \"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz\",\n \"integrity\": \"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/lerna/node_modules/execa\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/execa/-/execa-5.0.0.tgz\",\n \"integrity\": \"sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"cross-spawn\": \"^7.0.3\",\n \"get-stream\": \"^6.0.0\",\n \"human-signals\": \"^2.1.0\",\n \"is-stream\": \"^2.0.0\",\n \"merge-stream\": \"^2.0.0\",\n \"npm-run-path\": \"^4.0.1\",\n \"onetime\": \"^5.1.2\",\n \"signal-exit\": \"^3.0.3\",\n \"strip-final-newline\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sindresorhus/execa?sponsor=1\"\n }\n },\n \"node_modules/lerna/node_modules/fdir\": {\n \"version\": \"6.5.0\",\n \"resolved\": \"https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz\",\n \"integrity\": \"sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12.0.0\"\n },\n \"peerDependencies\": {\n \"picomatch\": \"^3 || ^4\"\n },\n \"peerDependenciesMeta\": {\n \"picomatch\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/lerna/node_modules/get-port\": {\n \"version\": \"5.1.1\",\n \"resolved\": \"https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz\",\n \"integrity\": \"sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/lerna/node_modules/get-stream\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz\",\n \"integrity\": \"sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/lerna/node_modules/glob\": {\n \"version\": \"9.3.5\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-9.3.5.tgz\",\n \"integrity\": \"sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"fs.realpath\": \"^1.0.0\",\n \"minimatch\": \"^8.0.2\",\n \"minipass\": \"^4.2.4\",\n \"path-scurry\": \"^1.6.1\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/lerna/node_modules/glob-parent\": {\n \"version\": \"6.0.2\",\n \"resolved\": \"https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz\",\n \"integrity\": \"sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"is-glob\": \"^4.0.3\"\n },\n \"engines\": {\n \"node\": \">=10.13.0\"\n }\n },\n \"node_modules/lerna/node_modules/glob/node_modules/brace-expansion\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz\",\n \"integrity\": \"sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"balanced-match\": \"^1.0.0\"\n }\n },\n \"node_modules/lerna/node_modules/glob/node_modules/minimatch\": {\n \"version\": \"8.0.4\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz\",\n \"integrity\": \"sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/lerna/node_modules/is-stream\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz\",\n \"integrity\": \"sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/lerna/node_modules/jest-diff\": {\n \"version\": \"30.2.0\",\n \"resolved\": \"https://registry.npmjs.org/jest-diff/-/jest-diff-30.2.0.tgz\",\n \"integrity\": \"sha512-dQHFo3Pt4/NLlG5z4PxZ/3yZTZ1C7s9hveiOj+GCN+uT109NC2QgsoVZsVOAvbJ3RgKkvyLGXZV9+piDpWbm6A==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@jest/diff-sequences\": \"30.0.1\",\n \"@jest/get-type\": \"30.1.0\",\n \"chalk\": \"^4.1.2\",\n \"pretty-format\": \"30.2.0\"\n },\n \"engines\": {\n \"node\": \"^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0\"\n }\n },\n \"node_modules/lerna/node_modules/jest-diff/node_modules/chalk\": {\n \"version\": \"4.1.2\",\n \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz\",\n \"integrity\": \"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^4.1.0\",\n \"supports-color\": \"^7.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/chalk?sponsor=1\"\n }\n },\n \"node_modules/lerna/node_modules/make-dir\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz\",\n \"integrity\": \"sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"semver\": \"^7.5.3\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/lerna/node_modules/minimatch\": {\n \"version\": \"3.0.5\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz\",\n \"integrity\": \"sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^1.1.7\"\n },\n \"engines\": {\n \"node\": \"*\"\n }\n },\n \"node_modules/lerna/node_modules/minipass\": {\n \"version\": \"4.2.8\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz\",\n \"integrity\": \"sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/lerna/node_modules/picomatch\": {\n \"version\": \"4.0.3\",\n \"resolved\": \"https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz\",\n \"integrity\": \"sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/jonschlinkert\"\n }\n },\n \"node_modules/lerna/node_modules/rimraf\": {\n \"version\": \"4.4.1\",\n \"resolved\": \"https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz\",\n \"integrity\": \"sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"glob\": \"^9.2.0\"\n },\n \"bin\": {\n \"rimraf\": \"dist/cjs/src/bin.js\"\n },\n \"engines\": {\n \"node\": \">=14\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/lerna/node_modules/slash\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/slash/-/slash-3.0.0.tgz\",\n \"integrity\": \"sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/lerna/node_modules/supports-color\": {\n \"version\": \"7.2.0\",\n \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz\",\n \"integrity\": \"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-flag\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/lerna/node_modules/tinyglobby\": {\n \"version\": \"0.2.12\",\n \"resolved\": \"https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz\",\n \"integrity\": \"sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"fdir\": \"^6.4.3\",\n \"picomatch\": \"^4.0.2\"\n },\n \"engines\": {\n \"node\": \">=12.0.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/SuperchupuDev\"\n }\n },\n \"node_modules/levn\": {\n \"version\": \"0.4.1\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"prelude-ls\": \"^1.2.1\",\n \"type-check\": \"~0.4.0\"\n },\n \"engines\": {\n \"node\": \">= 0.8.0\"\n }\n },\n \"node_modules/libnpmaccess\": {\n \"version\": \"10.0.3\",\n \"resolved\": \"https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-10.0.3.tgz\",\n \"integrity\": \"sha512-JPHTfWJxIK+NVPdNMNGnkz4XGX56iijPbe0qFWbdt68HL+kIvSzh+euBL8npLZvl2fpaxo+1eZSdoG15f5YdIQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"npm-package-arg\": \"^13.0.0\",\n \"npm-registry-fetch\": \"^19.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/libnpmpublish\": {\n \"version\": \"11.1.2\",\n \"resolved\": \"https://registry.npmjs.org/libnpmpublish/-/libnpmpublish-11.1.2.tgz\",\n \"integrity\": \"sha512-tNcU3cLH7toloAzhOOrBDhjzgbxpyuYvkf+BPPnnJCdc5EIcdJ8JcT+SglvCQKKyZ6m9dVXtCVlJcA6csxKdEA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/package-json\": \"^7.0.0\",\n \"ci-info\": \"^4.0.0\",\n \"npm-package-arg\": \"^13.0.0\",\n \"npm-registry-fetch\": \"^19.0.0\",\n \"proc-log\": \"^5.0.0\",\n \"semver\": \"^7.3.7\",\n \"sigstore\": \"^4.0.0\",\n \"ssri\": \"^12.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/libnpmpublish/node_modules/ci-info\": {\n \"version\": \"4.3.1\",\n \"resolved\": \"https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz\",\n \"integrity\": \"sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==\",\n \"dev\": true,\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/sibiraj-s\"\n }\n ],\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/lie\": {\n \"version\": \"3.3.0\",\n \"resolved\": \"https://registry.npmjs.org/lie/-/lie-3.3.0.tgz\",\n \"integrity\": \"sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"immediate\": \"~3.0.5\"\n }\n },\n \"node_modules/lilconfig\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz\",\n \"integrity\": \"sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=14\"\n }\n },\n \"node_modules/lines-and-columns\": {\n \"version\": \"1.2.4\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/load-json-file\": {\n \"version\": \"6.2.0\",\n \"resolved\": \"https://registry.npmjs.org/load-json-file/-/load-json-file-6.2.0.tgz\",\n \"integrity\": \"sha512-gUD/epcRms75Cw8RT1pUdHugZYM5ce64ucs2GEISABwkRsOQr0q2wm/MV2TKThycIe5e0ytRweW2RZxclogCdQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"graceful-fs\": \"^4.1.15\",\n \"parse-json\": \"^5.0.0\",\n \"strip-bom\": \"^4.0.0\",\n \"type-fest\": \"^0.6.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/load-json-file/node_modules/type-fest\": {\n \"version\": \"0.6.0\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz\",\n \"integrity\": \"sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==\",\n \"dev\": true,\n \"license\": \"(MIT OR CC0-1.0)\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/locate-app\": {\n \"version\": \"2.5.0\",\n \"resolved\": \"https://registry.npmjs.org/locate-app/-/locate-app-2.5.0.tgz\",\n \"integrity\": \"sha512-xIqbzPMBYArJRmPGUZD9CzV9wOqmVtQnaAn3wrj3s6WYW0bQvPI7x+sPYUGmDTYMHefVK//zc6HEYZ1qnxIK+Q==\",\n \"funding\": [\n {\n \"type\": \"individual\",\n \"url\": \"https://buymeacoffee.com/hejny\"\n },\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/hejny/locate-app/blob/main/README.md#%EF%B8%8F-contributing\"\n }\n ],\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@promptbook/utils\": \"0.69.5\",\n \"type-fest\": \"4.26.0\",\n \"userhome\": \"1.0.1\"\n }\n },\n \"node_modules/locate-path\": {\n \"version\": \"6.0.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-locate\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/lockfile\": {\n \"version\": \"1.0.4\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"signal-exit\": \"^3.0.2\"\n }\n },\n \"node_modules/lodash\": {\n \"version\": \"4.17.23\",\n \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz\",\n \"integrity\": \"sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==\",\n \"license\": \"MIT\"\n },\n \"node_modules/lodash.clonedeep\": {\n \"version\": \"4.5.0\",\n \"license\": \"MIT\"\n },\n \"node_modules/lodash.ismatch\": {\n \"version\": \"4.4.0\",\n \"resolved\": \"https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz\",\n \"integrity\": \"sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/lodash.merge\": {\n \"version\": \"4.6.2\",\n \"license\": \"MIT\"\n },\n \"node_modules/lodash.zip\": {\n \"version\": \"4.2.0\",\n \"license\": \"MIT\"\n },\n \"node_modules/log-symbols\": {\n \"version\": \"7.0.1\",\n \"resolved\": \"https://registry.npmjs.org/log-symbols/-/log-symbols-7.0.1.tgz\",\n \"integrity\": \"sha512-ja1E3yCr9i/0hmBVaM0bfwDjnGy8I/s6PP4DFp+yP+a+mrHO4Rm7DtmnqROTUkHIkqffC84YY7AeqX6oFk0WFg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"is-unicode-supported\": \"^2.0.0\",\n \"yoctocolors\": \"^2.1.1\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/log-symbols/node_modules/is-unicode-supported\": {\n \"version\": \"2.1.0\",\n \"resolved\": \"https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz\",\n \"integrity\": \"sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/logform\": {\n \"version\": \"2.7.0\",\n \"resolved\": \"https://registry.npmjs.org/logform/-/logform-2.7.0.tgz\",\n \"integrity\": \"sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@colors/colors\": \"1.6.0\",\n \"@types/triple-beam\": \"^1.3.2\",\n \"fecha\": \"^4.2.0\",\n \"ms\": \"^2.1.1\",\n \"safe-stable-stringify\": \"^2.3.1\",\n \"triple-beam\": \"^1.3.0\"\n },\n \"engines\": {\n \"node\": \">= 12.0.0\"\n }\n },\n \"node_modules/loglevel\": {\n \"version\": \"1.8.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6.0\"\n },\n \"funding\": {\n \"type\": \"tidelift\",\n \"url\": \"https://tidelift.com/funding/github/npm/loglevel\"\n }\n },\n \"node_modules/loglevel-plugin-prefix\": {\n \"version\": \"0.8.4\",\n \"license\": \"MIT\"\n },\n \"node_modules/loud-rejection\": {\n \"version\": \"2.2.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"currently-unhandled\": \"^0.4.1\",\n \"signal-exit\": \"^3.0.2\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/lru-cache\": {\n \"version\": \"7.18.3\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz\",\n \"integrity\": \"sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==\",\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=12\"\n }\n },\n \"node_modules/make-dir\": {\n \"version\": \"2.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"pify\": \"^4.0.1\",\n \"semver\": \"^5.6.0\"\n },\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/make-dir/node_modules/pify\": {\n \"version\": \"4.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/make-dir/node_modules/semver\": {\n \"version\": \"5.7.2\",\n \"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.7.2.tgz\",\n \"integrity\": \"sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==\",\n \"dev\": true,\n \"bin\": {\n \"semver\": \"bin/semver\"\n }\n },\n \"node_modules/make-error\": {\n \"version\": \"1.3.6\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/make-fetch-happen\": {\n \"version\": \"15.0.2\",\n \"resolved\": \"https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-15.0.2.tgz\",\n \"integrity\": \"sha512-sI1NY4lWlXBAfjmCtVWIIpBypbBdhHtcjnwnv+gtCnsaOffyFil3aidszGC8hgzJe+fT1qix05sWxmD/Bmf/oQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/agent\": \"^4.0.0\",\n \"cacache\": \"^20.0.1\",\n \"http-cache-semantics\": \"^4.1.1\",\n \"minipass\": \"^7.0.2\",\n \"minipass-fetch\": \"^4.0.0\",\n \"minipass-flush\": \"^1.0.5\",\n \"minipass-pipeline\": \"^1.2.4\",\n \"negotiator\": \"^1.0.0\",\n \"proc-log\": \"^5.0.0\",\n \"promise-retry\": \"^2.0.1\",\n \"ssri\": \"^12.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/make-fetch-happen/node_modules/cacache\": {\n \"version\": \"20.0.1\",\n \"resolved\": \"https://registry.npmjs.org/cacache/-/cacache-20.0.1.tgz\",\n \"integrity\": \"sha512-+7LYcYGBYoNqTp1Rv7Ny1YjUo5E0/ftkQtraH3vkfAGgVHc+ouWdC8okAwQgQR7EVIdW6JTzTmhKFwzb+4okAQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/fs\": \"^4.0.0\",\n \"fs-minipass\": \"^3.0.0\",\n \"glob\": \"^11.0.3\",\n \"lru-cache\": \"^11.1.0\",\n \"minipass\": \"^7.0.3\",\n \"minipass-collect\": \"^2.0.1\",\n \"minipass-flush\": \"^1.0.5\",\n \"minipass-pipeline\": \"^1.2.4\",\n \"p-map\": \"^7.0.2\",\n \"ssri\": \"^12.0.0\",\n \"unique-filename\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/make-fetch-happen/node_modules/fs-minipass\": {\n \"version\": \"3.0.3\",\n \"resolved\": \"https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz\",\n \"integrity\": \"sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"minipass\": \"^7.0.3\"\n },\n \"engines\": {\n \"node\": \"^14.17.0 || ^16.13.0 || >=18.0.0\"\n }\n },\n \"node_modules/make-fetch-happen/node_modules/glob\": {\n \"version\": \"11.1.0\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-11.1.0.tgz\",\n \"integrity\": \"sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"foreground-child\": \"^3.3.1\",\n \"jackspeak\": \"^4.1.1\",\n \"minimatch\": \"^10.1.1\",\n \"minipass\": \"^7.1.2\",\n \"package-json-from-dist\": \"^1.0.0\",\n \"path-scurry\": \"^2.0.0\"\n },\n \"bin\": {\n \"glob\": \"dist/esm/bin.mjs\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/make-fetch-happen/node_modules/jackspeak\": {\n \"version\": \"4.1.1\",\n \"resolved\": \"https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz\",\n \"integrity\": \"sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/cliui\": \"^8.0.2\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/make-fetch-happen/node_modules/lru-cache\": {\n \"version\": \"11.2.2\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz\",\n \"integrity\": \"sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"node_modules/make-fetch-happen/node_modules/minimatch\": {\n \"version\": \"10.1.1\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz\",\n \"integrity\": \"sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/brace-expansion\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/make-fetch-happen/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/make-fetch-happen/node_modules/p-map\": {\n \"version\": \"7.0.3\",\n \"resolved\": \"https://registry.npmjs.org/p-map/-/p-map-7.0.3.tgz\",\n \"integrity\": \"sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/make-fetch-happen/node_modules/path-scurry\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz\",\n \"integrity\": \"sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"lru-cache\": \"^11.0.0\",\n \"minipass\": \"^7.1.2\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/map-obj\": {\n \"version\": \"4.3.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/math-intrinsics\": {\n \"version\": \"1.1.0\",\n \"resolved\": \"https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz\",\n \"integrity\": \"sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.4\"\n }\n },\n \"node_modules/md5.js\": {\n \"version\": \"1.3.5\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"hash-base\": \"^3.0.0\",\n \"inherits\": \"^2.0.1\",\n \"safe-buffer\": \"^5.1.2\"\n }\n },\n \"node_modules/media-typer\": {\n \"version\": \"1.1.0\",\n \"resolved\": \"https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz\",\n \"integrity\": \"sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/memorystream\": {\n \"version\": \"0.3.1\",\n \"dev\": true,\n \"engines\": {\n \"node\": \">= 0.10.0\"\n }\n },\n \"node_modules/meow\": {\n \"version\": \"8.1.2\",\n \"resolved\": \"https://registry.npmjs.org/meow/-/meow-8.1.2.tgz\",\n \"integrity\": \"sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/minimist\": \"^1.2.0\",\n \"camelcase-keys\": \"^6.2.2\",\n \"decamelize-keys\": \"^1.1.0\",\n \"hard-rejection\": \"^2.1.0\",\n \"minimist-options\": \"4.1.0\",\n \"normalize-package-data\": \"^3.0.0\",\n \"read-pkg-up\": \"^7.0.1\",\n \"redent\": \"^3.0.0\",\n \"trim-newlines\": \"^3.0.0\",\n \"type-fest\": \"^0.18.0\",\n \"yargs-parser\": \"^20.2.3\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/meow/node_modules/find-up\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz\",\n \"integrity\": \"sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"locate-path\": \"^5.0.0\",\n \"path-exists\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/meow/node_modules/locate-path\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz\",\n \"integrity\": \"sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-locate\": \"^4.1.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/meow/node_modules/p-limit\": {\n \"version\": \"2.3.0\",\n \"resolved\": \"https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz\",\n \"integrity\": \"sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-try\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=6\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/meow/node_modules/p-locate\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz\",\n \"integrity\": \"sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-limit\": \"^2.2.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/meow/node_modules/read-pkg-up\": {\n \"version\": \"7.0.1\",\n \"resolved\": \"https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz\",\n \"integrity\": \"sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"find-up\": \"^4.1.0\",\n \"read-pkg\": \"^5.2.0\",\n \"type-fest\": \"^0.8.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/meow/node_modules/read-pkg-up/node_modules/type-fest\": {\n \"version\": \"0.8.1\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz\",\n \"integrity\": \"sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==\",\n \"dev\": true,\n \"license\": \"(MIT OR CC0-1.0)\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/meow/node_modules/type-fest\": {\n \"version\": \"0.18.1\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz\",\n \"integrity\": \"sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==\",\n \"dev\": true,\n \"license\": \"(MIT OR CC0-1.0)\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/meow/node_modules/yargs-parser\": {\n \"version\": \"20.2.9\",\n \"resolved\": \"https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz\",\n \"integrity\": \"sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/merge-descriptors\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz\",\n \"integrity\": \"sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/merge-stream\": {\n \"version\": \"2.0.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/merge2\": {\n \"version\": \"1.4.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 8\"\n }\n },\n \"node_modules/method-override\": {\n \"version\": \"3.0.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"debug\": \"3.1.0\",\n \"methods\": \"~1.1.2\",\n \"parseurl\": \"~1.3.2\",\n \"vary\": \"~1.1.2\"\n },\n \"engines\": {\n \"node\": \">= 0.10\"\n }\n },\n \"node_modules/method-override/node_modules/debug\": {\n \"version\": \"3.1.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"2.0.0\"\n }\n },\n \"node_modules/method-override/node_modules/ms\": {\n \"version\": \"2.0.0\",\n \"license\": \"MIT\"\n },\n \"node_modules/methods\": {\n \"version\": \"1.1.2\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/micromatch\": {\n \"version\": \"4.0.8\",\n \"resolved\": \"https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz\",\n \"integrity\": \"sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"braces\": \"^3.0.3\",\n \"picomatch\": \"^2.3.1\"\n },\n \"engines\": {\n \"node\": \">=8.6\"\n }\n },\n \"node_modules/midnight-smoker\": {\n \"version\": \"8.0.0\",\n \"resolved\": \"https://registry.npmjs.org/midnight-smoker/-/midnight-smoker-8.0.0.tgz\",\n \"integrity\": \"sha512-o9kaeqJL9xxf5VKdQv4SxUtwiDTB25fUzOzR2FLtwFQUt9B/UdUCO3EgRVeFDYWesGCFln+hzv6uFbGMtLIpHg==\",\n \"dev\": true,\n \"dependencies\": {\n \"@types/semver\": \"7.5.6\",\n \"chalk\": \"4.1.2\",\n \"corepack\": \"0.23.0\",\n \"debug\": \"4.3.4\",\n \"deepmerge\": \"4.3.1\",\n \"execa\": \"5.1.1\",\n \"glob\": \"10.3.10\",\n \"is-file-esm\": \"1.0.0\",\n \"lilconfig\": \"3.0.0\",\n \"log-symbols\": \"4.1.0\",\n \"ora\": \"5.4.1\",\n \"pluralize\": \"8.0.0\",\n \"read-pkg-up\": \"7.0.1\",\n \"semver\": \"7.5.4\",\n \"source-map-support\": \"0.5.21\",\n \"strict-event-emitter-types\": \"2.0.0\",\n \"which\": \"4.0.0\",\n \"yargs\": \"17.7.2\",\n \"zod\": \"3.22.4\",\n \"zod-validation-error\": \"2.1.0\"\n },\n \"bin\": {\n \"smoker\": \"bin/smoker.js\"\n },\n \"engines\": {\n \"node\": \"^18.0.0 || ^20.0.0\",\n \"npm\": \">=8.6.0\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/@types/semver\": {\n \"version\": \"7.5.6\",\n \"resolved\": \"https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz\",\n \"integrity\": \"sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==\",\n \"dev\": true\n },\n \"node_modules/midnight-smoker/node_modules/ansi-styles\": {\n \"version\": \"4.3.0\",\n \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz\",\n \"integrity\": \"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==\",\n \"dev\": true,\n \"dependencies\": {\n \"color-convert\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/brace-expansion\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz\",\n \"integrity\": \"sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"balanced-match\": \"^1.0.0\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/chalk\": {\n \"version\": \"4.1.2\",\n \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz\",\n \"integrity\": \"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==\",\n \"dev\": true,\n \"dependencies\": {\n \"ansi-styles\": \"^4.1.0\",\n \"supports-color\": \"^7.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/chalk?sponsor=1\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/color-convert\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz\",\n \"integrity\": \"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==\",\n \"dev\": true,\n \"dependencies\": {\n \"color-name\": \"~1.1.4\"\n },\n \"engines\": {\n \"node\": \">=7.0.0\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/color-name\": {\n \"version\": \"1.1.4\",\n \"resolved\": \"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz\",\n \"integrity\": \"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==\",\n \"dev\": true\n },\n \"node_modules/midnight-smoker/node_modules/find-up\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz\",\n \"integrity\": \"sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==\",\n \"dev\": true,\n \"dependencies\": {\n \"locate-path\": \"^5.0.0\",\n \"path-exists\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/glob\": {\n \"version\": \"10.3.10\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-10.3.10.tgz\",\n \"integrity\": \"sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==\",\n \"dev\": true,\n \"dependencies\": {\n \"foreground-child\": \"^3.1.0\",\n \"jackspeak\": \"^2.3.5\",\n \"minimatch\": \"^9.0.1\",\n \"minipass\": \"^5.0.0 || ^6.0.2 || ^7.0.0\",\n \"path-scurry\": \"^1.10.1\"\n },\n \"bin\": {\n \"glob\": \"dist/esm/bin.mjs\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/isexe\": {\n \"version\": \"3.1.1\",\n \"resolved\": \"https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz\",\n \"integrity\": \"sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==\",\n \"dev\": true,\n \"engines\": {\n \"node\": \">=16\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/locate-path\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz\",\n \"integrity\": \"sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==\",\n \"dev\": true,\n \"dependencies\": {\n \"p-locate\": \"^4.1.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/log-symbols\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz\",\n \"integrity\": \"sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"chalk\": \"^4.1.0\",\n \"is-unicode-supported\": \"^0.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/lru-cache\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz\",\n \"integrity\": \"sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==\",\n \"dev\": true,\n \"dependencies\": {\n \"yallist\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/minimatch\": {\n \"version\": \"9.0.3\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz\",\n \"integrity\": \"sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==\",\n \"dev\": true,\n \"dependencies\": {\n \"brace-expansion\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/minipass\": {\n \"version\": \"7.0.4\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz\",\n \"integrity\": \"sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==\",\n \"dev\": true,\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/p-limit\": {\n \"version\": \"2.3.0\",\n \"resolved\": \"https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz\",\n \"integrity\": \"sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==\",\n \"dev\": true,\n \"dependencies\": {\n \"p-try\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=6\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/p-locate\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz\",\n \"integrity\": \"sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==\",\n \"dev\": true,\n \"dependencies\": {\n \"p-limit\": \"^2.2.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/read-pkg-up\": {\n \"version\": \"7.0.1\",\n \"resolved\": \"https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz\",\n \"integrity\": \"sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==\",\n \"dev\": true,\n \"dependencies\": {\n \"find-up\": \"^4.1.0\",\n \"read-pkg\": \"^5.2.0\",\n \"type-fest\": \"^0.8.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/semver\": {\n \"version\": \"7.5.4\",\n \"resolved\": \"https://registry.npmjs.org/semver/-/semver-7.5.4.tgz\",\n \"integrity\": \"sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==\",\n \"dev\": true,\n \"dependencies\": {\n \"lru-cache\": \"^6.0.0\"\n },\n \"bin\": {\n \"semver\": \"bin/semver.js\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/supports-color\": {\n \"version\": \"7.2.0\",\n \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz\",\n \"integrity\": \"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==\",\n \"dev\": true,\n \"dependencies\": {\n \"has-flag\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/type-fest\": {\n \"version\": \"0.8.1\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz\",\n \"integrity\": \"sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==\",\n \"dev\": true,\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/midnight-smoker/node_modules/which\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/which/-/which-4.0.0.tgz\",\n \"integrity\": \"sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==\",\n \"dev\": true,\n \"dependencies\": {\n \"isexe\": \"^3.1.1\"\n },\n \"bin\": {\n \"node-which\": \"bin/which.js\"\n },\n \"engines\": {\n \"node\": \"^16.13.0 || >=18.0.0\"\n }\n },\n \"node_modules/miller-rabin\": {\n \"version\": \"4.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"bn.js\": \"^4.0.0\",\n \"brorand\": \"^1.0.1\"\n },\n \"bin\": {\n \"miller-rabin\": \"bin/miller-rabin\"\n }\n },\n \"node_modules/miller-rabin/node_modules/bn.js\": {\n \"version\": \"4.12.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/mime-db\": {\n \"version\": \"1.52.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/mime-types\": {\n \"version\": \"2.1.35\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"mime-db\": \"1.52.0\"\n },\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/mimic-fn\": {\n \"version\": \"2.1.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/min-indent\": {\n \"version\": \"1.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/minimalistic-assert\": {\n \"version\": \"1.0.1\",\n \"devOptional\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/minimalistic-crypto-utils\": {\n \"version\": \"1.0.1\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/minimatch\": {\n \"version\": \"3.1.2\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^1.1.7\"\n },\n \"engines\": {\n \"node\": \"*\"\n }\n },\n \"node_modules/minimist\": {\n \"version\": \"1.2.8\",\n \"resolved\": \"https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz\",\n \"integrity\": \"sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==\",\n \"dev\": true,\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/minimist-options\": {\n \"version\": \"4.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"arrify\": \"^1.0.1\",\n \"is-plain-obj\": \"^1.1.0\",\n \"kind-of\": \"^6.0.3\"\n },\n \"engines\": {\n \"node\": \">= 6\"\n }\n },\n \"node_modules/minipass\": {\n \"version\": \"3.3.6\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"yallist\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/minipass-collect\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz\",\n \"integrity\": \"sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"minipass\": \"^7.0.3\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/minipass-collect/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/minipass-fetch\": {\n \"version\": \"4.0.1\",\n \"resolved\": \"https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-4.0.1.tgz\",\n \"integrity\": \"sha512-j7U11C5HXigVuutxebFadoYBbd7VSdZWggSe64NVdvWNBqGAiXPL2QVCehjmw7lY1oF9gOllYbORh+hiNgfPgQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"minipass\": \"^7.0.3\",\n \"minipass-sized\": \"^1.0.3\",\n \"minizlib\": \"^3.0.1\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n },\n \"optionalDependencies\": {\n \"encoding\": \"^0.1.13\"\n }\n },\n \"node_modules/minipass-fetch/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/minipass-fetch/node_modules/minizlib\": {\n \"version\": \"3.1.0\",\n \"resolved\": \"https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz\",\n \"integrity\": \"sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"minipass\": \"^7.1.2\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/minipass-flush\": {\n \"version\": \"1.0.5\",\n \"resolved\": \"https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz\",\n \"integrity\": \"sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"minipass\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">= 8\"\n }\n },\n \"node_modules/minipass-pipeline\": {\n \"version\": \"1.2.4\",\n \"resolved\": \"https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz\",\n \"integrity\": \"sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"minipass\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/minipass-sized\": {\n \"version\": \"1.0.3\",\n \"resolved\": \"https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz\",\n \"integrity\": \"sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"minipass\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/minizlib\": {\n \"version\": \"2.1.2\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"minipass\": \"^3.0.0\",\n \"yallist\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">= 8\"\n }\n },\n \"node_modules/mitt\": {\n \"version\": \"3.0.1\",\n \"resolved\": \"https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz\",\n \"integrity\": \"sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==\",\n \"license\": \"MIT\"\n },\n \"node_modules/mjpeg-consumer\": {\n \"version\": \"2.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8.0.0\"\n }\n },\n \"node_modules/mjpeg-server\": {\n \"version\": \"0.3.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10\"\n }\n },\n \"node_modules/mocha\": {\n \"version\": \"11.7.5\",\n \"resolved\": \"https://registry.npmjs.org/mocha/-/mocha-11.7.5.tgz\",\n \"integrity\": \"sha512-mTT6RgopEYABzXWFx+GcJ+ZQ32kp4fMf0xvpZIIfSq9Z8lC/++MtcCnQ9t5FP2veYEP95FIYSvW+U9fV4xrlig==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"browser-stdout\": \"^1.3.1\",\n \"chokidar\": \"^4.0.1\",\n \"debug\": \"^4.3.5\",\n \"diff\": \"^7.0.0\",\n \"escape-string-regexp\": \"^4.0.0\",\n \"find-up\": \"^5.0.0\",\n \"glob\": \"^10.4.5\",\n \"he\": \"^1.2.0\",\n \"is-path-inside\": \"^3.0.3\",\n \"js-yaml\": \"^4.1.0\",\n \"log-symbols\": \"^4.1.0\",\n \"minimatch\": \"^9.0.5\",\n \"ms\": \"^2.1.3\",\n \"picocolors\": \"^1.1.1\",\n \"serialize-javascript\": \"^6.0.2\",\n \"strip-json-comments\": \"^3.1.1\",\n \"supports-color\": \"^8.1.1\",\n \"workerpool\": \"^9.2.0\",\n \"yargs\": \"^17.7.2\",\n \"yargs-parser\": \"^21.1.1\",\n \"yargs-unparser\": \"^2.0.0\"\n },\n \"bin\": {\n \"_mocha\": \"bin/_mocha\",\n \"mocha\": \"bin/mocha.js\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n }\n },\n \"node_modules/mocha/node_modules/ansi-styles\": {\n \"version\": \"4.3.0\",\n \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz\",\n \"integrity\": \"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-convert\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/mocha/node_modules/brace-expansion\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz\",\n \"integrity\": \"sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"balanced-match\": \"^1.0.0\"\n }\n },\n \"node_modules/mocha/node_modules/chalk\": {\n \"version\": \"4.1.2\",\n \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz\",\n \"integrity\": \"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^4.1.0\",\n \"supports-color\": \"^7.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/chalk?sponsor=1\"\n }\n },\n \"node_modules/mocha/node_modules/chalk/node_modules/supports-color\": {\n \"version\": \"7.2.0\",\n \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz\",\n \"integrity\": \"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-flag\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/mocha/node_modules/color-convert\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz\",\n \"integrity\": \"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-name\": \"~1.1.4\"\n },\n \"engines\": {\n \"node\": \">=7.0.0\"\n }\n },\n \"node_modules/mocha/node_modules/color-name\": {\n \"version\": \"1.1.4\",\n \"resolved\": \"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz\",\n \"integrity\": \"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/mocha/node_modules/debug\": {\n \"version\": \"4.4.3\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.4.3.tgz\",\n \"integrity\": \"sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.3\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/mocha/node_modules/escape-string-regexp\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz\",\n \"integrity\": \"sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/mocha/node_modules/glob\": {\n \"version\": \"10.5.0\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-10.5.0.tgz\",\n \"integrity\": \"sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"foreground-child\": \"^3.1.0\",\n \"jackspeak\": \"^3.1.2\",\n \"minimatch\": \"^9.0.4\",\n \"minipass\": \"^7.1.2\",\n \"package-json-from-dist\": \"^1.0.0\",\n \"path-scurry\": \"^1.11.1\"\n },\n \"bin\": {\n \"glob\": \"dist/esm/bin.mjs\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/mocha/node_modules/jackspeak\": {\n \"version\": \"3.4.3\",\n \"resolved\": \"https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz\",\n \"integrity\": \"sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==\",\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/cliui\": \"^8.0.2\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n },\n \"optionalDependencies\": {\n \"@pkgjs/parseargs\": \"^0.11.0\"\n }\n },\n \"node_modules/mocha/node_modules/log-symbols\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz\",\n \"integrity\": \"sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"chalk\": \"^4.1.0\",\n \"is-unicode-supported\": \"^0.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/mocha/node_modules/minimatch\": {\n \"version\": \"9.0.5\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz\",\n \"integrity\": \"sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/mocha/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/mocha/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz\",\n \"integrity\": \"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/modern-tar\": {\n \"version\": \"0.7.2\",\n \"resolved\": \"https://registry.npmjs.org/modern-tar/-/modern-tar-0.7.2.tgz\",\n \"integrity\": \"sha512-TGG1ZRk1TAQ3neuZwahAHke3rKsSlro+ooMYtjh9sl2gGPVMLMuWiHgwC7im9T5bSM566RSo2Dko56ETgEvZcA==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18.0.0\"\n }\n },\n \"node_modules/modify-values\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz\",\n \"integrity\": \"sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/moment\": {\n \"version\": \"2.30.1\",\n \"resolved\": \"https://registry.npmjs.org/moment/-/moment-2.30.1.tgz\",\n \"integrity\": \"sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==\",\n \"engines\": {\n \"node\": \"*\"\n }\n },\n \"node_modules/morgan\": {\n \"version\": \"1.10.1\",\n \"resolved\": \"https://registry.npmjs.org/morgan/-/morgan-1.10.1.tgz\",\n \"integrity\": \"sha512-223dMRJtI/l25dJKWpgij2cMtywuG/WiUKXdvwfbhGKBhy1puASqXwFzmWZ7+K73vUPoR7SS2Qz2cI/g9MKw0A==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"basic-auth\": \"~2.0.1\",\n \"debug\": \"2.6.9\",\n \"depd\": \"~2.0.0\",\n \"on-finished\": \"~2.3.0\",\n \"on-headers\": \"~1.1.0\"\n },\n \"engines\": {\n \"node\": \">= 0.8.0\"\n }\n },\n \"node_modules/morgan/node_modules/debug\": {\n \"version\": \"2.6.9\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-2.6.9.tgz\",\n \"integrity\": \"sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"2.0.0\"\n }\n },\n \"node_modules/morgan/node_modules/ms\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.0.0.tgz\",\n \"integrity\": \"sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==\",\n \"license\": \"MIT\"\n },\n \"node_modules/morgan/node_modules/on-finished\": {\n \"version\": \"2.3.0\",\n \"resolved\": \"https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz\",\n \"integrity\": \"sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ee-first\": \"1.1.1\"\n },\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/ms\": {\n \"version\": \"2.1.2\",\n \"license\": \"MIT\"\n },\n \"node_modules/multimatch\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/multimatch/-/multimatch-5.0.0.tgz\",\n \"integrity\": \"sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/minimatch\": \"^3.0.3\",\n \"array-differ\": \"^3.0.0\",\n \"array-union\": \"^2.1.0\",\n \"arrify\": \"^2.0.1\",\n \"minimatch\": \"^3.0.4\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/multimatch/node_modules/@types/minimatch\": {\n \"version\": \"3.0.5\",\n \"resolved\": \"https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz\",\n \"integrity\": \"sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/multimatch/node_modules/arrify\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz\",\n \"integrity\": \"sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/mute-stream\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz\",\n \"integrity\": \"sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/napi-postinstall\": {\n \"version\": \"0.3.4\",\n \"resolved\": \"https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz\",\n \"integrity\": \"sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==\",\n \"license\": \"MIT\",\n \"bin\": {\n \"napi-postinstall\": \"lib/cli.js\"\n },\n \"engines\": {\n \"node\": \"^12.20.0 || ^14.18.0 || >=16.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/napi-postinstall\"\n }\n },\n \"node_modules/natural-compare\": {\n \"version\": \"1.4.0\",\n \"license\": \"MIT\"\n },\n \"node_modules/ncp\": {\n \"version\": \"2.0.0\",\n \"license\": \"MIT\",\n \"bin\": {\n \"ncp\": \"bin/ncp\"\n }\n },\n \"node_modules/negotiator\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz\",\n \"integrity\": \"sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/neo-async\": {\n \"version\": \"2.6.2\",\n \"resolved\": \"https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz\",\n \"integrity\": \"sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/netmask\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz\",\n \"integrity\": \"sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.4.0\"\n }\n },\n \"node_modules/node-gyp\": {\n \"version\": \"11.4.2\",\n \"resolved\": \"https://registry.npmjs.org/node-gyp/-/node-gyp-11.4.2.tgz\",\n \"integrity\": \"sha512-3gD+6zsrLQH7DyYOUIutaauuXrcyxeTPyQuZQCQoNPZMHMMS5m4y0xclNpvYzoK3VNzuyxT6eF4mkIL4WSZ1eQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"env-paths\": \"^2.2.0\",\n \"exponential-backoff\": \"^3.1.1\",\n \"graceful-fs\": \"^4.2.6\",\n \"make-fetch-happen\": \"^14.0.3\",\n \"nopt\": \"^8.0.0\",\n \"proc-log\": \"^5.0.0\",\n \"semver\": \"^7.3.5\",\n \"tar\": \"^7.4.3\",\n \"tinyglobby\": \"^0.2.12\",\n \"which\": \"^5.0.0\"\n },\n \"bin\": {\n \"node-gyp\": \"bin/node-gyp.js\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/node-gyp/node_modules/@npmcli/agent\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/@npmcli/agent/-/agent-3.0.0.tgz\",\n \"integrity\": \"sha512-S79NdEgDQd/NGCay6TCoVzXSj74skRZIKJcpJjC5lOq34SZzyI6MqtiiWoiVWoVrTcGjNeC4ipbh1VIHlpfF5Q==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"agent-base\": \"^7.1.0\",\n \"http-proxy-agent\": \"^7.0.0\",\n \"https-proxy-agent\": \"^7.0.1\",\n \"lru-cache\": \"^10.0.1\",\n \"socks-proxy-agent\": \"^8.0.3\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/node-gyp/node_modules/chownr\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz\",\n \"integrity\": \"sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/node-gyp/node_modules/isexe\": {\n \"version\": \"3.1.1\",\n \"resolved\": \"https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz\",\n \"integrity\": \"sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16\"\n }\n },\n \"node_modules/node-gyp/node_modules/lru-cache\": {\n \"version\": \"10.4.3\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz\",\n \"integrity\": \"sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/node-gyp/node_modules/make-fetch-happen\": {\n \"version\": \"14.0.3\",\n \"resolved\": \"https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-14.0.3.tgz\",\n \"integrity\": \"sha512-QMjGbFTP0blj97EeidG5hk/QhKQ3T4ICckQGLgz38QF7Vgbk6e6FTARN8KhKxyBbWn8R0HU+bnw8aSoFPD4qtQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/agent\": \"^3.0.0\",\n \"cacache\": \"^19.0.1\",\n \"http-cache-semantics\": \"^4.1.1\",\n \"minipass\": \"^7.0.2\",\n \"minipass-fetch\": \"^4.0.0\",\n \"minipass-flush\": \"^1.0.5\",\n \"minipass-pipeline\": \"^1.2.4\",\n \"negotiator\": \"^1.0.0\",\n \"proc-log\": \"^5.0.0\",\n \"promise-retry\": \"^2.0.1\",\n \"ssri\": \"^12.0.0\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/node-gyp/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/node-gyp/node_modules/minizlib\": {\n \"version\": \"3.1.0\",\n \"resolved\": \"https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz\",\n \"integrity\": \"sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"minipass\": \"^7.1.2\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/node-gyp/node_modules/tar\": {\n \"version\": \"7.5.3\",\n \"resolved\": \"https://registry.npmjs.org/tar/-/tar-7.5.3.tgz\",\n \"integrity\": \"sha512-ENg5JUHUm2rDD7IvKNFGzyElLXNjachNLp6RaGf4+JOgxXHkqA+gq81ZAMCUmtMtqBsoU62lcp6S27g1LCYGGQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/fs-minipass\": \"^4.0.0\",\n \"chownr\": \"^3.0.0\",\n \"minipass\": \"^7.1.2\",\n \"minizlib\": \"^3.1.0\",\n \"yallist\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/node-gyp/node_modules/which\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/which/-/which-5.0.0.tgz\",\n \"integrity\": \"sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"isexe\": \"^3.1.1\"\n },\n \"bin\": {\n \"node-which\": \"bin/which.js\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/node-gyp/node_modules/yallist\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz\",\n \"integrity\": \"sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/node-libs-browser\": {\n \"version\": \"2.2.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"assert\": \"^1.1.1\",\n \"browserify-zlib\": \"^0.2.0\",\n \"buffer\": \"^4.3.0\",\n \"console-browserify\": \"^1.1.0\",\n \"constants-browserify\": \"^1.0.0\",\n \"crypto-browserify\": \"^3.11.0\",\n \"domain-browser\": \"^1.1.1\",\n \"events\": \"^3.0.0\",\n \"https-browserify\": \"^1.0.0\",\n \"os-browserify\": \"^0.3.0\",\n \"path-browserify\": \"0.0.1\",\n \"process\": \"^0.11.10\",\n \"punycode\": \"^1.2.4\",\n \"querystring-es3\": \"^0.2.0\",\n \"readable-stream\": \"^2.3.3\",\n \"stream-browserify\": \"^2.0.1\",\n \"stream-http\": \"^2.7.2\",\n \"string_decoder\": \"^1.0.0\",\n \"timers-browserify\": \"^2.0.4\",\n \"tty-browserify\": \"0.0.0\",\n \"url\": \"^0.11.0\",\n \"util\": \"^0.11.0\",\n \"vm-browserify\": \"^1.0.1\"\n }\n },\n \"node_modules/node-libs-browser/node_modules/buffer\": {\n \"version\": \"4.9.2\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"base64-js\": \"^1.0.2\",\n \"ieee754\": \"^1.1.4\",\n \"isarray\": \"^1.0.0\"\n }\n },\n \"node_modules/node-libs-browser/node_modules/isarray\": {\n \"version\": \"1.0.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/node-libs-browser/node_modules/readable-stream\": {\n \"version\": \"2.3.7\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"core-util-is\": \"~1.0.0\",\n \"inherits\": \"~2.0.3\",\n \"isarray\": \"~1.0.0\",\n \"process-nextick-args\": \"~2.0.0\",\n \"safe-buffer\": \"~5.1.1\",\n \"string_decoder\": \"~1.1.1\",\n \"util-deprecate\": \"~1.0.1\"\n }\n },\n \"node_modules/node-libs-browser/node_modules/safe-buffer\": {\n \"version\": \"5.1.2\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/node-libs-browser/node_modules/string_decoder\": {\n \"version\": \"1.1.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safe-buffer\": \"~5.1.0\"\n }\n },\n \"node_modules/node-machine-id\": {\n \"version\": \"1.1.12\",\n \"resolved\": \"https://registry.npmjs.org/node-machine-id/-/node-machine-id-1.1.12.tgz\",\n \"integrity\": \"sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/node-releases\": {\n \"version\": \"2.0.27\",\n \"resolved\": \"https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz\",\n \"integrity\": \"sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/nopt\": {\n \"version\": \"8.1.0\",\n \"resolved\": \"https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz\",\n \"integrity\": \"sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"abbrev\": \"^3.0.0\"\n },\n \"bin\": {\n \"nopt\": \"bin/nopt.js\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/normalize-package-data\": {\n \"version\": \"3.0.3\",\n \"dev\": true,\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"hosted-git-info\": \"^4.0.1\",\n \"is-core-module\": \"^2.5.0\",\n \"semver\": \"^7.3.4\",\n \"validate-npm-package-license\": \"^3.0.1\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/normalize-path\": {\n \"version\": \"3.0.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/npm-bundled\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/npm-bundled/-/npm-bundled-4.0.0.tgz\",\n \"integrity\": \"sha512-IxaQZDMsqfQ2Lz37VvyyEtKLe8FsRZuysmedy/N06TU1RyVppYKXrO4xIhR0F+7ubIBox6Q7nir6fQI3ej39iA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"npm-normalize-package-bin\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/npm-install-checks\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-7.1.2.tgz\",\n \"integrity\": \"sha512-z9HJBCYw9Zr8BqXcllKIs5nI+QggAImbBdHphOzVYrz2CB4iQ6FzWyKmlqDZua+51nAu7FcemlbTc9VgQN5XDQ==\",\n \"dev\": true,\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"semver\": \"^7.1.1\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/npm-normalize-package-bin\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz\",\n \"integrity\": \"sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/npm-package-arg\": {\n \"version\": \"13.0.1\",\n \"resolved\": \"https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-13.0.1.tgz\",\n \"integrity\": \"sha512-6zqls5xFvJbgFjB1B2U6yITtyGBjDBORB7suI4zA4T/sZ1OmkMFlaQSNB/4K0LtXNA1t4OprAFxPisadK5O2ag==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"hosted-git-info\": \"^9.0.0\",\n \"proc-log\": \"^5.0.0\",\n \"semver\": \"^7.3.5\",\n \"validate-npm-package-name\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/npm-package-arg/node_modules/hosted-git-info\": {\n \"version\": \"9.0.0\",\n \"resolved\": \"https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.0.tgz\",\n \"integrity\": \"sha512-gEf705MZLrDPkbbhi8PnoO4ZwYgKoNL+ISZ3AjZMht2r3N5tuTwncyDi6Fv2/qDnMmZxgs0yI8WDOyR8q3G+SQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"lru-cache\": \"^11.1.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/npm-package-arg/node_modules/lru-cache\": {\n \"version\": \"11.2.2\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz\",\n \"integrity\": \"sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"node_modules/npm-packlist\": {\n \"version\": \"10.0.3\",\n \"resolved\": \"https://registry.npmjs.org/npm-packlist/-/npm-packlist-10.0.3.tgz\",\n \"integrity\": \"sha512-zPukTwJMOu5X5uvm0fztwS5Zxyvmk38H/LfidkOMt3gbZVCyro2cD/ETzwzVPcWZA3JOyPznfUN/nkyFiyUbxg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"ignore-walk\": \"^8.0.0\",\n \"proc-log\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/npm-packlist/node_modules/proc-log\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/proc-log/-/proc-log-6.0.0.tgz\",\n \"integrity\": \"sha512-KG/XsTDN901PNfPfAMmj6N/Ywg9tM+bHK8pAz+27fS4N4Pcr+4zoYBOcGSBu6ceXYNPxkLpa4ohtfxV1XcLAfA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/npm-pick-manifest\": {\n \"version\": \"10.0.0\",\n \"resolved\": \"https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-10.0.0.tgz\",\n \"integrity\": \"sha512-r4fFa4FqYY8xaM7fHecQ9Z2nE9hgNfJR+EmoKv0+chvzWkBcORX3r0FpTByP+CbOVJDladMXnPQGVN8PBLGuTQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"npm-install-checks\": \"^7.1.0\",\n \"npm-normalize-package-bin\": \"^4.0.0\",\n \"npm-package-arg\": \"^12.0.0\",\n \"semver\": \"^7.3.5\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/npm-pick-manifest/node_modules/hosted-git-info\": {\n \"version\": \"8.1.0\",\n \"resolved\": \"https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-8.1.0.tgz\",\n \"integrity\": \"sha512-Rw/B2DNQaPBICNXEm8balFz9a6WpZrkCGpcWFpy7nCj+NyhSdqXipmfvtmWt9xGfp0wZnBxB+iVpLmQMYt47Tw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"lru-cache\": \"^10.0.1\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/npm-pick-manifest/node_modules/lru-cache\": {\n \"version\": \"10.4.3\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz\",\n \"integrity\": \"sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/npm-pick-manifest/node_modules/npm-package-arg\": {\n \"version\": \"12.0.2\",\n \"resolved\": \"https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-12.0.2.tgz\",\n \"integrity\": \"sha512-f1NpFjNI9O4VbKMOlA5QoBq/vSQPORHcTZ2feJpFkTHJ9eQkdlmZEKSjcAhxTGInC7RlEyScT9ui67NaOsjFWA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"hosted-git-info\": \"^8.0.0\",\n \"proc-log\": \"^5.0.0\",\n \"semver\": \"^7.3.5\",\n \"validate-npm-package-name\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/npm-registry-fetch\": {\n \"version\": \"19.1.0\",\n \"resolved\": \"https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-19.1.0.tgz\",\n \"integrity\": \"sha512-xyZLfs7TxPu/WKjHUs0jZOPinzBAI32kEUel6za0vH+JUTnFZ5zbHI1ZoGZRDm6oMjADtrli6FxtMlk/5ABPNw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/redact\": \"^3.0.0\",\n \"jsonparse\": \"^1.3.1\",\n \"make-fetch-happen\": \"^15.0.0\",\n \"minipass\": \"^7.0.2\",\n \"minipass-fetch\": \"^4.0.0\",\n \"minizlib\": \"^3.0.1\",\n \"npm-package-arg\": \"^13.0.0\",\n \"proc-log\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/npm-registry-fetch/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/npm-registry-fetch/node_modules/minizlib\": {\n \"version\": \"3.1.0\",\n \"resolved\": \"https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz\",\n \"integrity\": \"sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"minipass\": \"^7.1.2\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/npm-run-all2\": {\n \"version\": \"8.0.4\",\n \"resolved\": \"https://registry.npmjs.org/npm-run-all2/-/npm-run-all2-8.0.4.tgz\",\n \"integrity\": \"sha512-wdbB5My48XKp2ZfJUlhnLVihzeuA1hgBnqB2J9ahV77wLS+/YAJAlN8I+X3DIFIPZ3m5L7nplmlbhNiFDmXRDA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^6.2.1\",\n \"cross-spawn\": \"^7.0.6\",\n \"memorystream\": \"^0.3.1\",\n \"picomatch\": \"^4.0.2\",\n \"pidtree\": \"^0.6.0\",\n \"read-package-json-fast\": \"^4.0.0\",\n \"shell-quote\": \"^1.7.3\",\n \"which\": \"^5.0.0\"\n },\n \"bin\": {\n \"npm-run-all\": \"bin/npm-run-all/index.js\",\n \"npm-run-all2\": \"bin/npm-run-all/index.js\",\n \"run-p\": \"bin/run-p/index.js\",\n \"run-s\": \"bin/run-s/index.js\"\n },\n \"engines\": {\n \"node\": \"^20.5.0 || >=22.0.0\",\n \"npm\": \">= 10\"\n }\n },\n \"node_modules/npm-run-all2/node_modules/ansi-styles\": {\n \"version\": \"6.2.1\",\n \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz\",\n \"integrity\": \"sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/npm-run-all2/node_modules/isexe\": {\n \"version\": \"3.1.1\",\n \"resolved\": \"https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz\",\n \"integrity\": \"sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16\"\n }\n },\n \"node_modules/npm-run-all2/node_modules/picomatch\": {\n \"version\": \"4.0.2\",\n \"resolved\": \"https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz\",\n \"integrity\": \"sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/jonschlinkert\"\n }\n },\n \"node_modules/npm-run-all2/node_modules/which\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/which/-/which-5.0.0.tgz\",\n \"integrity\": \"sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"isexe\": \"^3.1.1\"\n },\n \"bin\": {\n \"node-which\": \"bin/which.js\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/npm-run-path\": {\n \"version\": \"4.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"path-key\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/nth-check\": {\n \"version\": \"2.1.1\",\n \"resolved\": \"https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz\",\n \"integrity\": \"sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==\",\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"boolbase\": \"^1.0.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/fb55/nth-check?sponsor=1\"\n }\n },\n \"node_modules/nx\": {\n \"version\": \"21.6.2\",\n \"resolved\": \"https://registry.npmjs.org/nx/-/nx-21.6.2.tgz\",\n \"integrity\": \"sha512-bFZgAsB838vn9kk1vI6a1A9sStKyOA7Q9Ifsx7fYPth3D0GafHKu7X2/YbsC4h1TpmuejkJCPWUw2WtCOQy6IQ==\",\n \"dev\": true,\n \"hasInstallScript\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@napi-rs/wasm-runtime\": \"0.2.4\",\n \"@yarnpkg/lockfile\": \"^1.1.0\",\n \"@yarnpkg/parsers\": \"3.0.2\",\n \"@zkochan/js-yaml\": \"0.0.7\",\n \"axios\": \"^1.8.3\",\n \"chalk\": \"^4.1.0\",\n \"cli-cursor\": \"3.1.0\",\n \"cli-spinners\": \"2.6.1\",\n \"cliui\": \"^8.0.1\",\n \"dotenv\": \"~16.4.5\",\n \"dotenv-expand\": \"~11.0.6\",\n \"enquirer\": \"~2.3.6\",\n \"figures\": \"3.2.0\",\n \"flat\": \"^5.0.2\",\n \"front-matter\": \"^4.0.2\",\n \"ignore\": \"^5.0.4\",\n \"jest-diff\": \"^30.0.2\",\n \"jsonc-parser\": \"3.2.0\",\n \"lines-and-columns\": \"2.0.3\",\n \"minimatch\": \"9.0.3\",\n \"node-machine-id\": \"1.1.12\",\n \"npm-run-path\": \"^4.0.1\",\n \"open\": \"^8.4.0\",\n \"ora\": \"5.3.0\",\n \"resolve.exports\": \"2.0.3\",\n \"semver\": \"^7.5.3\",\n \"string-width\": \"^4.2.3\",\n \"tar-stream\": \"~2.2.0\",\n \"tmp\": \"~0.2.1\",\n \"tree-kill\": \"^1.2.2\",\n \"tsconfig-paths\": \"^4.1.2\",\n \"tslib\": \"^2.3.0\",\n \"yaml\": \"^2.6.0\",\n \"yargs\": \"^17.6.2\",\n \"yargs-parser\": \"21.1.1\"\n },\n \"bin\": {\n \"nx\": \"bin/nx.js\",\n \"nx-cloud\": \"bin/nx-cloud.js\"\n },\n \"optionalDependencies\": {\n \"@nx/nx-darwin-arm64\": \"*\",\n \"@nx/nx-darwin-x64\": \"*\",\n \"@nx/nx-freebsd-x64\": \"*\",\n \"@nx/nx-linux-arm-gnueabihf\": \"*\",\n \"@nx/nx-linux-arm64-gnu\": \"*\",\n \"@nx/nx-linux-arm64-musl\": \"*\",\n \"@nx/nx-linux-x64-gnu\": \"*\",\n \"@nx/nx-linux-x64-musl\": \"*\",\n \"@nx/nx-win32-arm64-msvc\": \"*\",\n \"@nx/nx-win32-x64-msvc\": \"*\"\n },\n \"peerDependencies\": {\n \"@swc-node/register\": \"^1.8.0\",\n \"@swc/core\": \"^1.3.85\"\n },\n \"peerDependenciesMeta\": {\n \"@swc-node/register\": {\n \"optional\": true\n },\n \"@swc/core\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/nx/node_modules/ansi-styles\": {\n \"version\": \"4.3.0\",\n \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz\",\n \"integrity\": \"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-convert\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/nx/node_modules/brace-expansion\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz\",\n \"integrity\": \"sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"balanced-match\": \"^1.0.0\"\n }\n },\n \"node_modules/nx/node_modules/chalk\": {\n \"version\": \"4.1.2\",\n \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz\",\n \"integrity\": \"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^4.1.0\",\n \"supports-color\": \"^7.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/chalk?sponsor=1\"\n }\n },\n \"node_modules/nx/node_modules/cli-spinners\": {\n \"version\": \"2.6.1\",\n \"resolved\": \"https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz\",\n \"integrity\": \"sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/nx/node_modules/color-convert\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz\",\n \"integrity\": \"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-name\": \"~1.1.4\"\n },\n \"engines\": {\n \"node\": \">=7.0.0\"\n }\n },\n \"node_modules/nx/node_modules/color-name\": {\n \"version\": \"1.1.4\",\n \"resolved\": \"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz\",\n \"integrity\": \"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/nx/node_modules/jest-diff\": {\n \"version\": \"30.2.0\",\n \"resolved\": \"https://registry.npmjs.org/jest-diff/-/jest-diff-30.2.0.tgz\",\n \"integrity\": \"sha512-dQHFo3Pt4/NLlG5z4PxZ/3yZTZ1C7s9hveiOj+GCN+uT109NC2QgsoVZsVOAvbJ3RgKkvyLGXZV9+piDpWbm6A==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@jest/diff-sequences\": \"30.0.1\",\n \"@jest/get-type\": \"30.1.0\",\n \"chalk\": \"^4.1.2\",\n \"pretty-format\": \"30.2.0\"\n },\n \"engines\": {\n \"node\": \"^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0\"\n }\n },\n \"node_modules/nx/node_modules/lines-and-columns\": {\n \"version\": \"2.0.3\",\n \"resolved\": \"https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.3.tgz\",\n \"integrity\": \"sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^12.20.0 || ^14.13.1 || >=16.0.0\"\n }\n },\n \"node_modules/nx/node_modules/log-symbols\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz\",\n \"integrity\": \"sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"chalk\": \"^4.1.0\",\n \"is-unicode-supported\": \"^0.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/nx/node_modules/minimatch\": {\n \"version\": \"9.0.3\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz\",\n \"integrity\": \"sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/nx/node_modules/ora\": {\n \"version\": \"5.3.0\",\n \"resolved\": \"https://registry.npmjs.org/ora/-/ora-5.3.0.tgz\",\n \"integrity\": \"sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"bl\": \"^4.0.3\",\n \"chalk\": \"^4.1.0\",\n \"cli-cursor\": \"^3.1.0\",\n \"cli-spinners\": \"^2.5.0\",\n \"is-interactive\": \"^1.0.0\",\n \"log-symbols\": \"^4.0.0\",\n \"strip-ansi\": \"^6.0.0\",\n \"wcwidth\": \"^1.0.1\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/nx/node_modules/strip-bom\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz\",\n \"integrity\": \"sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/nx/node_modules/supports-color\": {\n \"version\": \"7.2.0\",\n \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz\",\n \"integrity\": \"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-flag\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/nx/node_modules/tsconfig-paths\": {\n \"version\": \"4.2.0\",\n \"resolved\": \"https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz\",\n \"integrity\": \"sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"json5\": \"^2.2.2\",\n \"minimist\": \"^1.2.6\",\n \"strip-bom\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/object-assign\": {\n \"version\": \"4.1.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/object-inspect\": {\n \"version\": \"1.13.4\",\n \"resolved\": \"https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz\",\n \"integrity\": \"sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/obuf\": {\n \"version\": \"1.1.2\",\n \"resolved\": \"https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz\",\n \"integrity\": \"sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==\",\n \"optional\": true\n },\n \"node_modules/on-finished\": {\n \"version\": \"2.4.1\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ee-first\": \"1.1.1\"\n },\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/on-headers\": {\n \"version\": \"1.1.0\",\n \"resolved\": \"https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz\",\n \"integrity\": \"sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/once\": {\n \"version\": \"1.4.0\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"wrappy\": \"1\"\n }\n },\n \"node_modules/one-time\": {\n \"version\": \"1.0.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"fn.name\": \"1.x.x\"\n }\n },\n \"node_modules/onetime\": {\n \"version\": \"5.1.2\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"mimic-fn\": \"^2.1.0\"\n },\n \"engines\": {\n \"node\": \">=6\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/open\": {\n \"version\": \"8.4.2\",\n \"resolved\": \"https://registry.npmjs.org/open/-/open-8.4.2.tgz\",\n \"integrity\": \"sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"define-lazy-prop\": \"^2.0.0\",\n \"is-docker\": \"^2.1.1\",\n \"is-wsl\": \"^2.2.0\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/opencv-bindings\": {\n \"version\": \"4.5.5\",\n \"license\": \"ISC\"\n },\n \"node_modules/optionator\": {\n \"version\": \"0.9.3\",\n \"resolved\": \"https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz\",\n \"integrity\": \"sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==\",\n \"dependencies\": {\n \"@aashutoshrathi/word-wrap\": \"^1.2.3\",\n \"deep-is\": \"^0.1.3\",\n \"fast-levenshtein\": \"^2.0.6\",\n \"levn\": \"^0.4.1\",\n \"prelude-ls\": \"^1.2.1\",\n \"type-check\": \"^0.4.0\"\n },\n \"engines\": {\n \"node\": \">= 0.8.0\"\n }\n },\n \"node_modules/ora\": {\n \"version\": \"5.4.1\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"bl\": \"^4.1.0\",\n \"chalk\": \"^4.1.0\",\n \"cli-cursor\": \"^3.1.0\",\n \"cli-spinners\": \"^2.5.0\",\n \"is-interactive\": \"^1.0.0\",\n \"is-unicode-supported\": \"^0.1.0\",\n \"log-symbols\": \"^4.1.0\",\n \"strip-ansi\": \"^6.0.0\",\n \"wcwidth\": \"^1.0.1\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/ora/node_modules/ansi-styles\": {\n \"version\": \"4.3.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-convert\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/ora/node_modules/chalk\": {\n \"version\": \"4.1.2\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^4.1.0\",\n \"supports-color\": \"^7.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/chalk?sponsor=1\"\n }\n },\n \"node_modules/ora/node_modules/color-convert\": {\n \"version\": \"2.0.1\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-name\": \"~1.1.4\"\n },\n \"engines\": {\n \"node\": \">=7.0.0\"\n }\n },\n \"node_modules/ora/node_modules/color-name\": {\n \"version\": \"1.1.4\",\n \"license\": \"MIT\"\n },\n \"node_modules/ora/node_modules/log-symbols\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz\",\n \"integrity\": \"sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"chalk\": \"^4.1.0\",\n \"is-unicode-supported\": \"^0.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/ora/node_modules/supports-color\": {\n \"version\": \"7.2.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-flag\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/os-browserify\": {\n \"version\": \"0.3.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/p-event\": {\n \"version\": \"6.0.1\",\n \"resolved\": \"https://registry.npmjs.org/p-event/-/p-event-6.0.1.tgz\",\n \"integrity\": \"sha512-Q6Bekk5wpzW5qIyUP4gdMEujObYstZl6DMMOSenwBvV0BlE5LkDwkjs5yHbZmdCEq2o4RJx4tE1vwxFVf2FG1w==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-timeout\": \"^6.1.2\"\n },\n \"engines\": {\n \"node\": \">=16.17\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/p-event/node_modules/p-timeout\": {\n \"version\": \"6.1.4\",\n \"resolved\": \"https://registry.npmjs.org/p-timeout/-/p-timeout-6.1.4.tgz\",\n \"integrity\": \"sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=14.16\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/p-filter\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/p-filter/-/p-filter-4.1.0.tgz\",\n \"integrity\": \"sha512-37/tPdZ3oJwHaS3gNJdenCDB3Tz26i9sjhnguBtvN0vYlRIiDNnvTWkuh+0hETV9rLPdJ3rlL3yVOYPIAnM8rw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-map\": \"^7.0.1\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/p-filter/node_modules/p-map\": {\n \"version\": \"7.0.3\",\n \"resolved\": \"https://registry.npmjs.org/p-map/-/p-map-7.0.3.tgz\",\n \"integrity\": \"sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/p-finally\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz\",\n \"integrity\": \"sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/p-limit\": {\n \"version\": \"3.1.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"yocto-queue\": \"^0.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/p-locate\": {\n \"version\": \"5.0.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-limit\": \"^3.0.2\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/p-map\": {\n \"version\": \"4.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"aggregate-error\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/p-map-series\": {\n \"version\": \"2.1.0\",\n \"resolved\": \"https://registry.npmjs.org/p-map-series/-/p-map-series-2.1.0.tgz\",\n \"integrity\": \"sha512-RpYIIK1zXSNEOdwxcfe7FdvGcs7+y5n8rifMhMNWvaxRNMPINJHF5GDeuVxWqnfrcHPSCnp7Oo5yNXHId9Av2Q==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/p-pipe\": {\n \"version\": \"3.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/p-queue\": {\n \"version\": \"6.6.2\",\n \"resolved\": \"https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz\",\n \"integrity\": \"sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"eventemitter3\": \"^4.0.4\",\n \"p-timeout\": \"^3.2.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/p-reduce\": {\n \"version\": \"2.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/p-timeout\": {\n \"version\": \"3.2.0\",\n \"resolved\": \"https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz\",\n \"integrity\": \"sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-finally\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/p-try\": {\n \"version\": \"2.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/p-waterfall\": {\n \"version\": \"2.1.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-reduce\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/pac-proxy-agent\": {\n \"version\": \"7.1.0\",\n \"resolved\": \"https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.1.0.tgz\",\n \"integrity\": \"sha512-Z5FnLVVZSnX7WjBg0mhDtydeRZ1xMcATZThjySQUHqr+0ksP8kqaw23fNKkaaN/Z8gwLUs/W7xdl0I75eP2Xyw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@tootallnate/quickjs-emscripten\": \"^0.23.0\",\n \"agent-base\": \"^7.1.2\",\n \"debug\": \"^4.3.4\",\n \"get-uri\": \"^6.0.1\",\n \"http-proxy-agent\": \"^7.0.0\",\n \"https-proxy-agent\": \"^7.0.6\",\n \"pac-resolver\": \"^7.0.1\",\n \"socks-proxy-agent\": \"^8.0.5\"\n },\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/pac-resolver\": {\n \"version\": \"7.0.1\",\n \"resolved\": \"https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz\",\n \"integrity\": \"sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"degenerator\": \"^5.0.0\",\n \"netmask\": \"^2.0.2\"\n },\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/package-changed\": {\n \"version\": \"3.0.0\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"commander\": \"^6.2.0\"\n },\n \"bin\": {\n \"package-changed\": \"bin/package-changed.js\"\n }\n },\n \"node_modules/package-changed/node_modules/commander\": {\n \"version\": \"6.2.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 6\"\n }\n },\n \"node_modules/package-directory\": {\n \"version\": \"8.2.0\",\n \"resolved\": \"https://registry.npmjs.org/package-directory/-/package-directory-8.2.0.tgz\",\n \"integrity\": \"sha512-qJSu5Mo6tHmRxCy2KCYYKYgcfBdUpy9dwReaZD/xwf608AUk/MoRtIOWzgDtUeGeC7n/55yC3MI1Q+MbSoektw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"find-up-simple\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/package-json-from-dist\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz\",\n \"integrity\": \"sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==\",\n \"license\": \"BlueOak-1.0.0\"\n },\n \"node_modules/pacote\": {\n \"version\": \"21.0.1\",\n \"resolved\": \"https://registry.npmjs.org/pacote/-/pacote-21.0.1.tgz\",\n \"integrity\": \"sha512-LHGIUQUrcDIJUej53KJz1BPvUuHrItrR2yrnN0Kl9657cJ0ZT6QJHk9wWPBnQZhYT5KLyZWrk9jaYc2aKDu4yw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/git\": \"^6.0.0\",\n \"@npmcli/installed-package-contents\": \"^3.0.0\",\n \"@npmcli/package-json\": \"^7.0.0\",\n \"@npmcli/promise-spawn\": \"^8.0.0\",\n \"@npmcli/run-script\": \"^10.0.0\",\n \"cacache\": \"^20.0.0\",\n \"fs-minipass\": \"^3.0.0\",\n \"minipass\": \"^7.0.2\",\n \"npm-package-arg\": \"^13.0.0\",\n \"npm-packlist\": \"^10.0.1\",\n \"npm-pick-manifest\": \"^10.0.0\",\n \"npm-registry-fetch\": \"^19.0.0\",\n \"proc-log\": \"^5.0.0\",\n \"promise-retry\": \"^2.0.1\",\n \"sigstore\": \"^4.0.0\",\n \"ssri\": \"^12.0.0\",\n \"tar\": \"^7.4.3\"\n },\n \"bin\": {\n \"pacote\": \"bin/index.js\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/pacote/node_modules/cacache\": {\n \"version\": \"20.0.1\",\n \"resolved\": \"https://registry.npmjs.org/cacache/-/cacache-20.0.1.tgz\",\n \"integrity\": \"sha512-+7LYcYGBYoNqTp1Rv7Ny1YjUo5E0/ftkQtraH3vkfAGgVHc+ouWdC8okAwQgQR7EVIdW6JTzTmhKFwzb+4okAQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"@npmcli/fs\": \"^4.0.0\",\n \"fs-minipass\": \"^3.0.0\",\n \"glob\": \"^11.0.3\",\n \"lru-cache\": \"^11.1.0\",\n \"minipass\": \"^7.0.3\",\n \"minipass-collect\": \"^2.0.1\",\n \"minipass-flush\": \"^1.0.5\",\n \"minipass-pipeline\": \"^1.2.4\",\n \"p-map\": \"^7.0.2\",\n \"ssri\": \"^12.0.0\",\n \"unique-filename\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/pacote/node_modules/chownr\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz\",\n \"integrity\": \"sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/pacote/node_modules/fs-minipass\": {\n \"version\": \"3.0.3\",\n \"resolved\": \"https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz\",\n \"integrity\": \"sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"minipass\": \"^7.0.3\"\n },\n \"engines\": {\n \"node\": \"^14.17.0 || ^16.13.0 || >=18.0.0\"\n }\n },\n \"node_modules/pacote/node_modules/glob\": {\n \"version\": \"11.1.0\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-11.1.0.tgz\",\n \"integrity\": \"sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"foreground-child\": \"^3.3.1\",\n \"jackspeak\": \"^4.1.1\",\n \"minimatch\": \"^10.1.1\",\n \"minipass\": \"^7.1.2\",\n \"package-json-from-dist\": \"^1.0.0\",\n \"path-scurry\": \"^2.0.0\"\n },\n \"bin\": {\n \"glob\": \"dist/esm/bin.mjs\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/pacote/node_modules/jackspeak\": {\n \"version\": \"4.1.1\",\n \"resolved\": \"https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz\",\n \"integrity\": \"sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/cliui\": \"^8.0.2\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/pacote/node_modules/lru-cache\": {\n \"version\": \"11.2.2\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz\",\n \"integrity\": \"sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"node_modules/pacote/node_modules/minimatch\": {\n \"version\": \"10.1.1\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz\",\n \"integrity\": \"sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/brace-expansion\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/pacote/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/pacote/node_modules/minizlib\": {\n \"version\": \"3.1.0\",\n \"resolved\": \"https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz\",\n \"integrity\": \"sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"minipass\": \"^7.1.2\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/pacote/node_modules/p-map\": {\n \"version\": \"7.0.3\",\n \"resolved\": \"https://registry.npmjs.org/p-map/-/p-map-7.0.3.tgz\",\n \"integrity\": \"sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/pacote/node_modules/path-scurry\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz\",\n \"integrity\": \"sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"lru-cache\": \"^11.0.0\",\n \"minipass\": \"^7.1.2\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/pacote/node_modules/tar\": {\n \"version\": \"7.5.3\",\n \"resolved\": \"https://registry.npmjs.org/tar/-/tar-7.5.3.tgz\",\n \"integrity\": \"sha512-ENg5JUHUm2rDD7IvKNFGzyElLXNjachNLp6RaGf4+JOgxXHkqA+gq81ZAMCUmtMtqBsoU62lcp6S27g1LCYGGQ==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/fs-minipass\": \"^4.0.0\",\n \"chownr\": \"^3.0.0\",\n \"minipass\": \"^7.1.2\",\n \"minizlib\": \"^3.1.0\",\n \"yallist\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/pacote/node_modules/yallist\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz\",\n \"integrity\": \"sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==\",\n \"dev\": true,\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/pako\": {\n \"version\": \"1.0.11\",\n \"license\": \"(MIT AND Zlib)\"\n },\n \"node_modules/parent-module\": {\n \"version\": \"1.0.1\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"callsites\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/parse-asn1\": {\n \"version\": \"5.1.9\",\n \"resolved\": \"https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.9.tgz\",\n \"integrity\": \"sha512-fIYNuZ/HastSb80baGOuPRo1O9cf4baWw5WsAp7dBuUzeTD/BoaG8sVTdlPFksBE2lF21dN+A1AnrpIjSWqHHg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"asn1.js\": \"^4.10.1\",\n \"browserify-aes\": \"^1.2.0\",\n \"evp_bytestokey\": \"^1.0.3\",\n \"pbkdf2\": \"^3.1.5\",\n \"safe-buffer\": \"^5.2.1\"\n },\n \"engines\": {\n \"node\": \">= 0.10\"\n }\n },\n \"node_modules/parse-conflict-json\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/parse-conflict-json/-/parse-conflict-json-4.0.0.tgz\",\n \"integrity\": \"sha512-37CN2VtcuvKgHUs8+0b1uJeEsbGn61GRHz469C94P5xiOoqpDYJYwjg4RY9Vmz39WyZAVkR5++nbJwLMIgOCnQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"json-parse-even-better-errors\": \"^4.0.0\",\n \"just-diff\": \"^6.0.0\",\n \"just-diff-apply\": \"^5.2.0\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/parse-conflict-json/node_modules/json-parse-even-better-errors\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-4.0.0.tgz\",\n \"integrity\": \"sha512-lR4MXjGNgkJc7tkQ97kb2nuEMnNCyU//XYVH0MKTGcXEiSudQ5MKGKen3C5QubYy0vmq+JGitUg92uuywGEwIA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/parse-json\": {\n \"version\": \"5.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@babel/code-frame\": \"^7.0.0\",\n \"error-ex\": \"^1.3.1\",\n \"json-parse-even-better-errors\": \"^2.3.0\",\n \"lines-and-columns\": \"^1.1.6\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/parse-listing\": {\n \"version\": \"1.1.3\",\n \"engines\": {\n \"node\": \">=0.6.21\"\n }\n },\n \"node_modules/parse-path\": {\n \"version\": \"7.1.0\",\n \"resolved\": \"https://registry.npmjs.org/parse-path/-/parse-path-7.1.0.tgz\",\n \"integrity\": \"sha512-EuCycjZtfPcjWk7KTksnJ5xPMvWGA/6i4zrLYhRG0hGvC3GPU/jGUj3Cy+ZR0v30duV3e23R95T1lE2+lsndSw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"protocols\": \"^2.0.0\"\n }\n },\n \"node_modules/parse-url\": {\n \"version\": \"8.1.0\",\n \"resolved\": \"https://registry.npmjs.org/parse-url/-/parse-url-8.1.0.tgz\",\n \"integrity\": \"sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"parse-path\": \"^7.0.0\"\n }\n },\n \"node_modules/parse5\": {\n \"version\": \"7.2.1\",\n \"resolved\": \"https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz\",\n \"integrity\": \"sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"entities\": \"^4.5.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/inikulin/parse5?sponsor=1\"\n }\n },\n \"node_modules/parse5-htmlparser2-tree-adapter\": {\n \"version\": \"7.1.0\",\n \"resolved\": \"https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz\",\n \"integrity\": \"sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"domhandler\": \"^5.0.3\",\n \"parse5\": \"^7.0.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/inikulin/parse5?sponsor=1\"\n }\n },\n \"node_modules/parse5-parser-stream\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz\",\n \"integrity\": \"sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"parse5\": \"^7.0.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/inikulin/parse5?sponsor=1\"\n }\n },\n \"node_modules/parseurl\": {\n \"version\": \"1.3.3\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/path-browserify\": {\n \"version\": \"0.0.1\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/path-exists\": {\n \"version\": \"4.0.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/path-is-absolute\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz\",\n \"integrity\": \"sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/path-key\": {\n \"version\": \"3.1.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/path-parse\": {\n \"version\": \"1.0.7\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/path-scurry\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz\",\n \"integrity\": \"sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==\",\n \"dependencies\": {\n \"lru-cache\": \"^10.2.0\",\n \"minipass\": \"^5.0.0 || ^6.0.2 || ^7.0.0\"\n },\n \"engines\": {\n \"node\": \">=16 || 14 >=14.18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/path-scurry/node_modules/lru-cache\": {\n \"version\": \"10.2.0\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz\",\n \"integrity\": \"sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==\",\n \"engines\": {\n \"node\": \"14 || >=16.14\"\n }\n },\n \"node_modules/path-scurry/node_modules/minipass\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz\",\n \"integrity\": \"sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/path-to-regexp\": {\n \"version\": \"8.3.0\",\n \"resolved\": \"https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz\",\n \"integrity\": \"sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==\",\n \"license\": \"MIT\",\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/express\"\n }\n },\n \"node_modules/path-type\": {\n \"version\": \"4.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/pbkdf2\": {\n \"version\": \"3.1.5\",\n \"resolved\": \"https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.5.tgz\",\n \"integrity\": \"sha512-Q3CG/cYvCO1ye4QKkuH7EXxs3VC/rI1/trd+qX2+PolbaKG0H+bgcZzrTt96mMyRtejk+JMCiLUn3y29W8qmFQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"create-hash\": \"^1.2.0\",\n \"create-hmac\": \"^1.1.7\",\n \"ripemd160\": \"^2.0.3\",\n \"safe-buffer\": \"^5.2.1\",\n \"sha.js\": \"^2.4.12\",\n \"to-buffer\": \"^1.2.1\"\n },\n \"engines\": {\n \"node\": \">= 0.10\"\n }\n },\n \"node_modules/pend\": {\n \"version\": \"1.2.0\",\n \"license\": \"MIT\"\n },\n \"node_modules/picocolors\": {\n \"version\": \"1.1.1\",\n \"resolved\": \"https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz\",\n \"integrity\": \"sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==\",\n \"license\": \"ISC\"\n },\n \"node_modules/picomatch\": {\n \"version\": \"2.3.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8.6\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/jonschlinkert\"\n }\n },\n \"node_modules/pidtree\": {\n \"version\": \"0.6.0\",\n \"resolved\": \"https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz\",\n \"integrity\": \"sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==\",\n \"dev\": true,\n \"bin\": {\n \"pidtree\": \"bin/pidtree.js\"\n },\n \"engines\": {\n \"node\": \">=0.10\"\n }\n },\n \"node_modules/pify\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/pify/-/pify-5.0.0.tgz\",\n \"integrity\": \"sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/plist\": {\n \"version\": \"3.1.0\",\n \"resolved\": \"https://registry.npmjs.org/plist/-/plist-3.1.0.tgz\",\n \"integrity\": \"sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==\",\n \"dependencies\": {\n \"@xmldom/xmldom\": \"^0.8.8\",\n \"base64-js\": \"^1.5.1\",\n \"xmlbuilder\": \"^15.1.1\"\n },\n \"engines\": {\n \"node\": \">=10.4.0\"\n }\n },\n \"node_modules/plist/node_modules/@xmldom/xmldom\": {\n \"version\": \"0.8.10\",\n \"resolved\": \"https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz\",\n \"integrity\": \"sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10.0.0\"\n }\n },\n \"node_modules/plur\": {\n \"version\": \"4.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"irregular-plurals\": \"^3.2.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/pluralize\": {\n \"version\": \"8.0.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/possible-typed-array-names\": {\n \"version\": \"1.1.0\",\n \"resolved\": \"https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz\",\n \"integrity\": \"sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.4\"\n }\n },\n \"node_modules/postcss-selector-parser\": {\n \"version\": \"7.1.0\",\n \"resolved\": \"https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz\",\n \"integrity\": \"sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"cssesc\": \"^3.0.0\",\n \"util-deprecate\": \"^1.0.2\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/prelude-ls\": {\n \"version\": \"1.2.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.8.0\"\n }\n },\n \"node_modules/prettier\": {\n \"version\": \"3.8.1\",\n \"resolved\": \"https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz\",\n \"integrity\": \"sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"bin\": {\n \"prettier\": \"bin/prettier.cjs\"\n },\n \"engines\": {\n \"node\": \">=14\"\n },\n \"funding\": {\n \"url\": \"https://github.com/prettier/prettier?sponsor=1\"\n }\n },\n \"node_modules/pretty-format\": {\n \"version\": \"30.2.0\",\n \"resolved\": \"https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz\",\n \"integrity\": \"sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@jest/schemas\": \"30.0.5\",\n \"ansi-styles\": \"^5.2.0\",\n \"react-is\": \"^18.3.1\"\n },\n \"engines\": {\n \"node\": \"^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0\"\n }\n },\n \"node_modules/pretty-format/node_modules/@jest/schemas\": {\n \"version\": \"30.0.5\",\n \"resolved\": \"https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz\",\n \"integrity\": \"sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@sinclair/typebox\": \"^0.34.0\"\n },\n \"engines\": {\n \"node\": \"^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0\"\n }\n },\n \"node_modules/pretty-format/node_modules/@sinclair/typebox\": {\n \"version\": \"0.34.41\",\n \"resolved\": \"https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.41.tgz\",\n \"integrity\": \"sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/pretty-format/node_modules/ansi-styles\": {\n \"version\": \"5.2.0\",\n \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz\",\n \"integrity\": \"sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/proc-log\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/proc-log/-/proc-log-5.0.0.tgz\",\n \"integrity\": \"sha512-Azwzvl90HaF0aCz1JrDdXQykFakSSNPaPoiZ9fm5qJIMHioDZEi7OAdRwSm6rSoPtY3Qutnm3L7ogmg3dc+wbQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/process\": {\n \"version\": \"0.11.10\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6.0\"\n }\n },\n \"node_modules/process-nextick-args\": {\n \"version\": \"2.0.1\",\n \"license\": \"MIT\"\n },\n \"node_modules/proggy\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/proggy/-/proggy-3.0.0.tgz\",\n \"integrity\": \"sha512-QE8RApCM3IaRRxVzxrjbgNMpQEX6Wu0p0KBeoSiSEw5/bsGwZHsshF4LCxH2jp/r6BU+bqA3LrMDEYNfJnpD8Q==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/progress\": {\n \"version\": \"2.0.3\",\n \"resolved\": \"https://registry.npmjs.org/progress/-/progress-2.0.3.tgz\",\n \"integrity\": \"sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==\",\n \"engines\": {\n \"node\": \">=0.4.0\"\n }\n },\n \"node_modules/promise-all-reject-late\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz\",\n \"integrity\": \"sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/promise-call-limit\": {\n \"version\": \"3.0.2\",\n \"resolved\": \"https://registry.npmjs.org/promise-call-limit/-/promise-call-limit-3.0.2.tgz\",\n \"integrity\": \"sha512-mRPQO2T1QQVw11E7+UdCJu7S61eJVWknzml9sC1heAdj1jxl0fWMBypIt9ZOcLFf8FkG995ZD7RnVk7HH72fZw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/promise-retry\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz\",\n \"integrity\": \"sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"err-code\": \"^2.0.2\",\n \"retry\": \"^0.12.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/promzard\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/promzard/-/promzard-2.0.0.tgz\",\n \"integrity\": \"sha512-Ncd0vyS2eXGOjchIRg6PVCYKetJYrW1BSbbIo+bKdig61TB6nH2RQNF2uP+qMpsI73L/jURLWojcw8JNIKZ3gg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"read\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/protocols\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/protocols/-/protocols-2.0.2.tgz\",\n \"integrity\": \"sha512-hHVTzba3wboROl0/aWRRG9dMytgH6ow//STBZh43l/wQgmMhYhOFi0EHWAPtoCz9IAUymsyP0TSBHkhgMEGNnQ==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/proxy-addr\": {\n \"version\": \"2.0.7\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"forwarded\": \"0.2.0\",\n \"ipaddr.js\": \"1.9.1\"\n },\n \"engines\": {\n \"node\": \">= 0.10\"\n }\n },\n \"node_modules/proxy-agent\": {\n \"version\": \"6.5.0\",\n \"resolved\": \"https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz\",\n \"integrity\": \"sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"agent-base\": \"^7.1.2\",\n \"debug\": \"^4.3.4\",\n \"http-proxy-agent\": \"^7.0.1\",\n \"https-proxy-agent\": \"^7.0.6\",\n \"lru-cache\": \"^7.14.1\",\n \"pac-proxy-agent\": \"^7.1.0\",\n \"proxy-from-env\": \"^1.1.0\",\n \"socks-proxy-agent\": \"^8.0.5\"\n },\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/proxy-from-env\": {\n \"version\": \"1.1.0\",\n \"license\": \"MIT\"\n },\n \"node_modules/public-encrypt\": {\n \"version\": \"4.0.3\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"bn.js\": \"^4.1.0\",\n \"browserify-rsa\": \"^4.0.0\",\n \"create-hash\": \"^1.1.0\",\n \"parse-asn1\": \"^5.0.0\",\n \"randombytes\": \"^2.0.1\",\n \"safe-buffer\": \"^5.1.2\"\n }\n },\n \"node_modules/public-encrypt/node_modules/bn.js\": {\n \"version\": \"4.12.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/pump\": {\n \"version\": \"3.0.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"end-of-stream\": \"^1.1.0\",\n \"once\": \"^1.3.1\"\n }\n },\n \"node_modules/punycode\": {\n \"version\": \"1.4.1\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/qs\": {\n \"version\": \"6.14.1\",\n \"resolved\": \"https://registry.npmjs.org/qs/-/qs-6.14.1.tgz\",\n \"integrity\": \"sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==\",\n \"license\": \"BSD-3-Clause\",\n \"dependencies\": {\n \"side-channel\": \"^1.1.0\"\n },\n \"engines\": {\n \"node\": \">=0.6\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/query-selector-shadow-dom\": {\n \"version\": \"1.0.1\",\n \"license\": \"MIT\"\n },\n \"node_modules/querystring\": {\n \"version\": \"0.2.0\",\n \"dev\": true,\n \"engines\": {\n \"node\": \">=0.4.x\"\n }\n },\n \"node_modules/querystring-es3\": {\n \"version\": \"0.2.1\",\n \"dev\": true,\n \"engines\": {\n \"node\": \">=0.4.x\"\n }\n },\n \"node_modules/queue-microtask\": {\n \"version\": \"1.2.3\",\n \"dev\": true,\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/feross\"\n },\n {\n \"type\": \"patreon\",\n \"url\": \"https://www.patreon.com/feross\"\n },\n {\n \"type\": \"consulting\",\n \"url\": \"https://feross.org/support\"\n }\n ],\n \"license\": \"MIT\"\n },\n \"node_modules/queue-tick\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz\",\n \"integrity\": \"sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==\"\n },\n \"node_modules/quick-lru\": {\n \"version\": \"4.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/randombytes\": {\n \"version\": \"2.1.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safe-buffer\": \"^5.1.0\"\n }\n },\n \"node_modules/randomfill\": {\n \"version\": \"1.0.4\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"randombytes\": \"^2.0.5\",\n \"safe-buffer\": \"^5.1.0\"\n }\n },\n \"node_modules/range-parser\": {\n \"version\": \"1.2.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/raw-body\": {\n \"version\": \"3.0.2\",\n \"resolved\": \"https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz\",\n \"integrity\": \"sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"bytes\": \"~3.1.2\",\n \"http-errors\": \"~2.0.1\",\n \"iconv-lite\": \"~0.7.0\",\n \"unpipe\": \"~1.0.0\"\n },\n \"engines\": {\n \"node\": \">= 0.10\"\n }\n },\n \"node_modules/raw-body/node_modules/http-errors\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz\",\n \"integrity\": \"sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"depd\": \"~2.0.0\",\n \"inherits\": \"~2.0.4\",\n \"setprototypeof\": \"~1.2.0\",\n \"statuses\": \"~2.0.2\",\n \"toidentifier\": \"~1.0.1\"\n },\n \"engines\": {\n \"node\": \">= 0.8\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/express\"\n }\n },\n \"node_modules/raw-body/node_modules/iconv-lite\": {\n \"version\": \"0.7.0\",\n \"resolved\": \"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz\",\n \"integrity\": \"sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safer-buffer\": \">= 2.1.2 < 3.0.0\"\n },\n \"engines\": {\n \"node\": \">=0.10.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/express\"\n }\n },\n \"node_modules/raw-body/node_modules/statuses\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz\",\n \"integrity\": \"sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/react-is\": {\n \"version\": \"18.3.1\",\n \"resolved\": \"https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz\",\n \"integrity\": \"sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/read\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/read/-/read-4.1.0.tgz\",\n \"integrity\": \"sha512-uRfX6K+f+R8OOrYScaM3ixPY4erg69f8DN6pgTvMcA9iRc8iDhwrA4m3Yu8YYKsXJgVvum+m8PkRboZwwuLzYA==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"mute-stream\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/read-cmd-shim\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz\",\n \"integrity\": \"sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^14.17.0 || ^16.13.0 || >=18.0.0\"\n }\n },\n \"node_modules/read-package-json-fast\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-4.0.0.tgz\",\n \"integrity\": \"sha512-qpt8EwugBWDw2cgE2W+/3oxC+KTez2uSVR8JU9Q36TXPAGCaozfQUs59v4j4GFpWTaw0i6hAZSvOmu1J0uOEUg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"json-parse-even-better-errors\": \"^4.0.0\",\n \"npm-normalize-package-bin\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/read-package-json-fast/node_modules/json-parse-even-better-errors\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-4.0.0.tgz\",\n \"integrity\": \"sha512-lR4MXjGNgkJc7tkQ97kb2nuEMnNCyU//XYVH0MKTGcXEiSudQ5MKGKen3C5QubYy0vmq+JGitUg92uuywGEwIA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/read-pkg\": {\n \"version\": \"5.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/normalize-package-data\": \"^2.4.0\",\n \"normalize-package-data\": \"^2.5.0\",\n \"parse-json\": \"^5.0.0\",\n \"type-fest\": \"^0.6.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/read-pkg-up\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz\",\n \"integrity\": \"sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"find-up\": \"^2.0.0\",\n \"read-pkg\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/read-pkg-up/node_modules/find-up\": {\n \"version\": \"2.1.0\",\n \"resolved\": \"https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz\",\n \"integrity\": \"sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"locate-path\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/read-pkg-up/node_modules/hosted-git-info\": {\n \"version\": \"2.8.9\",\n \"resolved\": \"https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz\",\n \"integrity\": \"sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/read-pkg-up/node_modules/load-json-file\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz\",\n \"integrity\": \"sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"graceful-fs\": \"^4.1.2\",\n \"parse-json\": \"^4.0.0\",\n \"pify\": \"^3.0.0\",\n \"strip-bom\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/read-pkg-up/node_modules/locate-path\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz\",\n \"integrity\": \"sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-locate\": \"^2.0.0\",\n \"path-exists\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/read-pkg-up/node_modules/normalize-package-data\": {\n \"version\": \"2.5.0\",\n \"resolved\": \"https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz\",\n \"integrity\": \"sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==\",\n \"dev\": true,\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"hosted-git-info\": \"^2.1.4\",\n \"resolve\": \"^1.10.0\",\n \"semver\": \"2 || 3 || 4 || 5\",\n \"validate-npm-package-license\": \"^3.0.1\"\n }\n },\n \"node_modules/read-pkg-up/node_modules/p-limit\": {\n \"version\": \"1.3.0\",\n \"resolved\": \"https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz\",\n \"integrity\": \"sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-try\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/read-pkg-up/node_modules/p-locate\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz\",\n \"integrity\": \"sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-limit\": \"^1.1.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/read-pkg-up/node_modules/p-try\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz\",\n \"integrity\": \"sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/read-pkg-up/node_modules/parse-json\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz\",\n \"integrity\": \"sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"error-ex\": \"^1.3.1\",\n \"json-parse-better-errors\": \"^1.0.1\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/read-pkg-up/node_modules/path-exists\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz\",\n \"integrity\": \"sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/read-pkg-up/node_modules/path-type\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz\",\n \"integrity\": \"sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"pify\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/read-pkg-up/node_modules/pify\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/pify/-/pify-3.0.0.tgz\",\n \"integrity\": \"sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/read-pkg-up/node_modules/read-pkg\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz\",\n \"integrity\": \"sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"load-json-file\": \"^4.0.0\",\n \"normalize-package-data\": \"^2.3.2\",\n \"path-type\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/read-pkg-up/node_modules/semver\": {\n \"version\": \"5.7.2\",\n \"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.7.2.tgz\",\n \"integrity\": \"sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"bin\": {\n \"semver\": \"bin/semver\"\n }\n },\n \"node_modules/read-pkg-up/node_modules/strip-bom\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz\",\n \"integrity\": \"sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/read-pkg/node_modules/hosted-git-info\": {\n \"version\": \"2.8.9\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/read-pkg/node_modules/normalize-package-data\": {\n \"version\": \"2.5.0\",\n \"dev\": true,\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"hosted-git-info\": \"^2.1.4\",\n \"resolve\": \"^1.10.0\",\n \"semver\": \"2 || 3 || 4 || 5\",\n \"validate-npm-package-license\": \"^3.0.1\"\n }\n },\n \"node_modules/read-pkg/node_modules/semver\": {\n \"version\": \"5.7.2\",\n \"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.7.2.tgz\",\n \"integrity\": \"sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==\",\n \"dev\": true,\n \"bin\": {\n \"semver\": \"bin/semver\"\n }\n },\n \"node_modules/read-pkg/node_modules/type-fest\": {\n \"version\": \"0.6.0\",\n \"dev\": true,\n \"license\": \"(MIT OR CC0-1.0)\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/readable-stream\": {\n \"version\": \"3.6.2\",\n \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz\",\n \"integrity\": \"sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==\",\n \"dependencies\": {\n \"inherits\": \"^2.0.3\",\n \"string_decoder\": \"^1.1.1\",\n \"util-deprecate\": \"^1.0.1\"\n },\n \"engines\": {\n \"node\": \">= 6\"\n }\n },\n \"node_modules/readdir-glob\": {\n \"version\": \"1.1.2\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"minimatch\": \"^5.1.0\"\n }\n },\n \"node_modules/readdir-glob/node_modules/brace-expansion\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz\",\n \"integrity\": \"sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"balanced-match\": \"^1.0.0\"\n }\n },\n \"node_modules/readdir-glob/node_modules/minimatch\": {\n \"version\": \"5.1.0\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"brace-expansion\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/readdirp\": {\n \"version\": \"4.1.2\",\n \"resolved\": \"https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz\",\n \"integrity\": \"sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 14.18.0\"\n },\n \"funding\": {\n \"type\": \"individual\",\n \"url\": \"https://paulmillr.com/funding/\"\n }\n },\n \"node_modules/redent\": {\n \"version\": \"3.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"indent-string\": \"^4.0.0\",\n \"strip-indent\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/regexp-tree\": {\n \"version\": \"0.1.27\",\n \"resolved\": \"https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz\",\n \"integrity\": \"sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==\",\n \"license\": \"MIT\",\n \"bin\": {\n \"regexp-tree\": \"bin/regexp-tree\"\n }\n },\n \"node_modules/regjsparser\": {\n \"version\": \"0.13.0\",\n \"resolved\": \"https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.0.tgz\",\n \"integrity\": \"sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==\",\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"jsesc\": \"~3.1.0\"\n },\n \"bin\": {\n \"regjsparser\": \"bin/parser\"\n }\n },\n \"node_modules/require-directory\": {\n \"version\": \"2.1.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/require-from-string\": {\n \"version\": \"2.0.2\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/resolve\": {\n \"version\": \"1.22.4\",\n \"resolved\": \"https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz\",\n \"integrity\": \"sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==\",\n \"dev\": true,\n \"dependencies\": {\n \"is-core-module\": \"^2.13.0\",\n \"path-parse\": \"^1.0.7\",\n \"supports-preserve-symlinks-flag\": \"^1.0.0\"\n },\n \"bin\": {\n \"resolve\": \"bin/resolve\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/resolve-cwd\": {\n \"version\": \"3.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"resolve-from\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/resolve-from\": {\n \"version\": \"5.0.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/resolve-pkg-maps\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz\",\n \"integrity\": \"sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==\",\n \"license\": \"MIT\",\n \"funding\": {\n \"url\": \"https://github.com/privatenumber/resolve-pkg-maps?sponsor=1\"\n }\n },\n \"node_modules/resolve.exports\": {\n \"version\": \"2.0.3\",\n \"resolved\": \"https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz\",\n \"integrity\": \"sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/resq\": {\n \"version\": \"1.11.0\",\n \"resolved\": \"https://registry.npmjs.org/resq/-/resq-1.11.0.tgz\",\n \"integrity\": \"sha512-G10EBz+zAAy3zUd/CDoBbXRL6ia9kOo3xRHrMDsHljI0GDkhYlyjwoCx5+3eCC4swi1uCoZQhskuJkj7Gp57Bw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"fast-deep-equal\": \"^2.0.1\"\n }\n },\n \"node_modules/resq/node_modules/fast-deep-equal\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz\",\n \"integrity\": \"sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==\",\n \"license\": \"MIT\"\n },\n \"node_modules/restore-cursor\": {\n \"version\": \"3.1.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"onetime\": \"^5.1.0\",\n \"signal-exit\": \"^3.0.2\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/ret\": {\n \"version\": \"0.5.0\",\n \"resolved\": \"https://registry.npmjs.org/ret/-/ret-0.5.0.tgz\",\n \"integrity\": \"sha512-I1XxrZSQ+oErkRR4jYbAyEEu2I0avBvvMM5JN+6EBprOGRCs63ENqZ3vjavq8fBw2+62G5LF5XelKwuJpcvcxw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/retry\": {\n \"version\": \"0.12.0\",\n \"resolved\": \"https://registry.npmjs.org/retry/-/retry-0.12.0.tgz\",\n \"integrity\": \"sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 4\"\n }\n },\n \"node_modules/reusify\": {\n \"version\": \"1.0.4\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"iojs\": \">=1.0.0\",\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/rewiremock\": {\n \"version\": \"3.14.6\",\n \"resolved\": \"https://registry.npmjs.org/rewiremock/-/rewiremock-3.14.6.tgz\",\n \"integrity\": \"sha512-hjpS7iQUTVVh/IHV4GE1ypg4IzlgVc34gxZBarwwVrKfnjlyqHJuQdsia6Ac7m4f4k/zxxA3tX285MOstdysRQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"babel-runtime\": \"^6.26.0\",\n \"compare-module-exports\": \"^2.1.0\",\n \"node-libs-browser\": \"^2.1.0\",\n \"path-parse\": \"^1.0.5\",\n \"wipe-node-cache\": \"^2.1.2\",\n \"wipe-webpack-cache\": \"^2.1.0\"\n }\n },\n \"node_modules/rfc6902\": {\n \"version\": \"5.0.1\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/rgb2hex\": {\n \"version\": \"0.2.5\",\n \"license\": \"MIT\"\n },\n \"node_modules/rimraf\": {\n \"version\": \"6.1.2\",\n \"resolved\": \"https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz\",\n \"integrity\": \"sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==\",\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"glob\": \"^13.0.0\",\n \"package-json-from-dist\": \"^1.0.1\"\n },\n \"bin\": {\n \"rimraf\": \"dist/esm/bin.mjs\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/ripemd160\": {\n \"version\": \"2.0.3\",\n \"resolved\": \"https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.3.tgz\",\n \"integrity\": \"sha512-5Di9UC0+8h1L6ZD2d7awM7E/T4uA1fJRlx6zk/NvdCCVEoAnFqvHmCuNeIKoCeIixBX/q8uM+6ycDvF8woqosA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"hash-base\": \"^3.1.2\",\n \"inherits\": \"^2.0.4\"\n },\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/router\": {\n \"version\": \"2.2.0\",\n \"resolved\": \"https://registry.npmjs.org/router/-/router-2.2.0.tgz\",\n \"integrity\": \"sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"debug\": \"^4.4.0\",\n \"depd\": \"^2.0.0\",\n \"is-promise\": \"^4.0.0\",\n \"parseurl\": \"^1.3.3\",\n \"path-to-regexp\": \"^8.0.0\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/router/node_modules/debug\": {\n \"version\": \"4.4.1\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.4.1.tgz\",\n \"integrity\": \"sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.3\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/router/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz\",\n \"integrity\": \"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/run-async\": {\n \"version\": \"4.0.6\",\n \"resolved\": \"https://registry.npmjs.org/run-async/-/run-async-4.0.6.tgz\",\n \"integrity\": \"sha512-IoDlSLTs3Yq593mb3ZoKWKXMNu3UpObxhgA/Xuid5p4bbfi2jdY1Hj0m1K+0/tEuQTxIGMhQDqGjKb7RuxGpAQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.12.0\"\n }\n },\n \"node_modules/run-parallel\": {\n \"version\": \"1.2.0\",\n \"dev\": true,\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/feross\"\n },\n {\n \"type\": \"patreon\",\n \"url\": \"https://www.patreon.com/feross\"\n },\n {\n \"type\": \"consulting\",\n \"url\": \"https://feross.org/support\"\n }\n ],\n \"license\": \"MIT\",\n \"dependencies\": {\n \"queue-microtask\": \"^1.2.2\"\n }\n },\n \"node_modules/rxjs\": {\n \"version\": \"7.8.2\",\n \"resolved\": \"https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz\",\n \"integrity\": \"sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"tslib\": \"^2.1.0\"\n }\n },\n \"node_modules/safaridriver\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/safaridriver/-/safaridriver-1.0.0.tgz\",\n \"integrity\": \"sha512-J92IFbskyo7OYB3Dt4aTdyhag1GlInrfbPCmMteb7aBK7PwlnGz1HI0+oyNN97j7pV9DqUAVoVgkNRMrfY47mQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18.0.0\"\n }\n },\n \"node_modules/safe-buffer\": {\n \"version\": \"5.2.1\",\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/feross\"\n },\n {\n \"type\": \"patreon\",\n \"url\": \"https://www.patreon.com/feross\"\n },\n {\n \"type\": \"consulting\",\n \"url\": \"https://feross.org/support\"\n }\n ],\n \"license\": \"MIT\"\n },\n \"node_modules/safe-regex2\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/safe-regex2/-/safe-regex2-5.0.0.tgz\",\n \"integrity\": \"sha512-YwJwe5a51WlK7KbOJREPdjNrpViQBI3p4T50lfwPuDhZnE3XGVTlGvi+aolc5+RvxDD6bnUmjVsU9n1eboLUYw==\",\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/fastify\"\n },\n {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/fastify\"\n }\n ],\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ret\": \"~0.5.0\"\n }\n },\n \"node_modules/safe-stable-stringify\": {\n \"version\": \"2.4.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/safer-buffer\": {\n \"version\": \"2.1.2\",\n \"license\": \"MIT\"\n },\n \"node_modules/sanitize-filename\": {\n \"version\": \"1.6.3\",\n \"license\": \"WTFPL OR ISC\",\n \"dependencies\": {\n \"truncate-utf8-bytes\": \"^1.0.0\"\n }\n },\n \"node_modules/select-hose\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz\",\n \"integrity\": \"sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==\",\n \"optional\": true\n },\n \"node_modules/semver\": {\n \"version\": \"7.7.2\",\n \"resolved\": \"https://registry.npmjs.org/semver/-/semver-7.7.2.tgz\",\n \"integrity\": \"sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==\",\n \"license\": \"ISC\",\n \"bin\": {\n \"semver\": \"bin/semver.js\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/send\": {\n \"version\": \"1.2.0\",\n \"resolved\": \"https://registry.npmjs.org/send/-/send-1.2.0.tgz\",\n \"integrity\": \"sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"debug\": \"^4.3.5\",\n \"encodeurl\": \"^2.0.0\",\n \"escape-html\": \"^1.0.3\",\n \"etag\": \"^1.8.1\",\n \"fresh\": \"^2.0.0\",\n \"http-errors\": \"^2.0.0\",\n \"mime-types\": \"^3.0.1\",\n \"ms\": \"^2.1.3\",\n \"on-finished\": \"^2.4.1\",\n \"range-parser\": \"^1.2.1\",\n \"statuses\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n }\n },\n \"node_modules/send/node_modules/debug\": {\n \"version\": \"4.4.1\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.4.1.tgz\",\n \"integrity\": \"sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.3\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/send/node_modules/fresh\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz\",\n \"integrity\": \"sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/send/node_modules/mime-db\": {\n \"version\": \"1.54.0\",\n \"resolved\": \"https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz\",\n \"integrity\": \"sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/send/node_modules/mime-types\": {\n \"version\": \"3.0.1\",\n \"resolved\": \"https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz\",\n \"integrity\": \"sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"mime-db\": \"^1.54.0\"\n },\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/send/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"license\": \"MIT\"\n },\n \"node_modules/serialize-error\": {\n \"version\": \"12.0.0\",\n \"resolved\": \"https://registry.npmjs.org/serialize-error/-/serialize-error-12.0.0.tgz\",\n \"integrity\": \"sha512-ZYkZLAvKTKQXWuh5XpBw7CdbSzagarX39WyZ2H07CDLC5/KfsRGlIXV8d4+tfqX1M7916mRqR1QfNHSij+c9Pw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"type-fest\": \"^4.31.0\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/serialize-error/node_modules/type-fest\": {\n \"version\": \"4.41.0\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz\",\n \"integrity\": \"sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==\",\n \"license\": \"(MIT OR CC0-1.0)\",\n \"engines\": {\n \"node\": \">=16\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/serialize-javascript\": {\n \"version\": \"6.0.2\",\n \"resolved\": \"https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz\",\n \"integrity\": \"sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==\",\n \"license\": \"BSD-3-Clause\",\n \"dependencies\": {\n \"randombytes\": \"^2.1.0\"\n }\n },\n \"node_modules/serve-favicon\": {\n \"version\": \"2.5.1\",\n \"resolved\": \"https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.5.1.tgz\",\n \"integrity\": \"sha512-JndLBslCLA/ebr7rS3d+/EKkzTsTi1jI2T9l+vHfAaGJ7A7NhtDpSZ0lx81HCNWnnE0yHncG+SSnVf9IMxOwXQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"etag\": \"~1.8.1\",\n \"fresh\": \"~0.5.2\",\n \"ms\": \"~2.1.3\",\n \"parseurl\": \"~1.3.2\",\n \"safe-buffer\": \"~5.2.1\"\n },\n \"engines\": {\n \"node\": \">= 0.8.0\"\n }\n },\n \"node_modules/serve-favicon/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz\",\n \"integrity\": \"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/serve-static\": {\n \"version\": \"2.2.1\",\n \"resolved\": \"https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz\",\n \"integrity\": \"sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"encodeurl\": \"^2.0.0\",\n \"escape-html\": \"^1.0.3\",\n \"parseurl\": \"^1.3.3\",\n \"send\": \"^1.2.0\"\n },\n \"engines\": {\n \"node\": \">= 18\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/express\"\n }\n },\n \"node_modules/set-blocking\": {\n \"version\": \"2.0.0\",\n \"license\": \"ISC\"\n },\n \"node_modules/set-function-length\": {\n \"version\": \"1.2.2\",\n \"resolved\": \"https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz\",\n \"integrity\": \"sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"define-data-property\": \"^1.1.4\",\n \"es-errors\": \"^1.3.0\",\n \"function-bind\": \"^1.1.2\",\n \"get-intrinsic\": \"^1.2.4\",\n \"gopd\": \"^1.0.1\",\n \"has-property-descriptors\": \"^1.0.2\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n }\n },\n \"node_modules/setimmediate\": {\n \"version\": \"1.0.5\",\n \"license\": \"MIT\"\n },\n \"node_modules/setprototypeof\": {\n \"version\": \"1.2.0\",\n \"license\": \"ISC\"\n },\n \"node_modules/sha.js\": {\n \"version\": \"2.4.12\",\n \"resolved\": \"https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz\",\n \"integrity\": \"sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==\",\n \"dev\": true,\n \"license\": \"(MIT AND BSD-3-Clause)\",\n \"dependencies\": {\n \"inherits\": \"^2.0.4\",\n \"safe-buffer\": \"^5.2.1\",\n \"to-buffer\": \"^1.2.0\"\n },\n \"bin\": {\n \"sha.js\": \"bin.js\"\n },\n \"engines\": {\n \"node\": \">= 0.10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/sharp\": {\n \"version\": \"0.34.5\",\n \"resolved\": \"https://registry.npmjs.org/sharp/-/sharp-0.34.5.tgz\",\n \"integrity\": \"sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==\",\n \"hasInstallScript\": true,\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@img/colour\": \"^1.0.0\",\n \"detect-libc\": \"^2.1.2\",\n \"semver\": \"^7.7.3\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || ^20.3.0 || >=21.0.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/libvips\"\n },\n \"optionalDependencies\": {\n \"@img/sharp-darwin-arm64\": \"0.34.5\",\n \"@img/sharp-darwin-x64\": \"0.34.5\",\n \"@img/sharp-libvips-darwin-arm64\": \"1.2.4\",\n \"@img/sharp-libvips-darwin-x64\": \"1.2.4\",\n \"@img/sharp-libvips-linux-arm\": \"1.2.4\",\n \"@img/sharp-libvips-linux-arm64\": \"1.2.4\",\n \"@img/sharp-libvips-linux-ppc64\": \"1.2.4\",\n \"@img/sharp-libvips-linux-riscv64\": \"1.2.4\",\n \"@img/sharp-libvips-linux-s390x\": \"1.2.4\",\n \"@img/sharp-libvips-linux-x64\": \"1.2.4\",\n \"@img/sharp-libvips-linuxmusl-arm64\": \"1.2.4\",\n \"@img/sharp-libvips-linuxmusl-x64\": \"1.2.4\",\n \"@img/sharp-linux-arm\": \"0.34.5\",\n \"@img/sharp-linux-arm64\": \"0.34.5\",\n \"@img/sharp-linux-ppc64\": \"0.34.5\",\n \"@img/sharp-linux-riscv64\": \"0.34.5\",\n \"@img/sharp-linux-s390x\": \"0.34.5\",\n \"@img/sharp-linux-x64\": \"0.34.5\",\n \"@img/sharp-linuxmusl-arm64\": \"0.34.5\",\n \"@img/sharp-linuxmusl-x64\": \"0.34.5\",\n \"@img/sharp-wasm32\": \"0.34.5\",\n \"@img/sharp-win32-arm64\": \"0.34.5\",\n \"@img/sharp-win32-ia32\": \"0.34.5\",\n \"@img/sharp-win32-x64\": \"0.34.5\"\n }\n },\n \"node_modules/sharp/node_modules/semver\": {\n \"version\": \"7.7.3\",\n \"resolved\": \"https://registry.npmjs.org/semver/-/semver-7.7.3.tgz\",\n \"integrity\": \"sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==\",\n \"license\": \"ISC\",\n \"bin\": {\n \"semver\": \"bin/semver.js\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/shebang-command\": {\n \"version\": \"2.0.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"shebang-regex\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/shebang-regex\": {\n \"version\": \"3.0.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/shell-quote\": {\n \"version\": \"1.8.3\",\n \"resolved\": \"https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.3.tgz\",\n \"integrity\": \"sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/side-channel\": {\n \"version\": \"1.1.0\",\n \"resolved\": \"https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz\",\n \"integrity\": \"sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"es-errors\": \"^1.3.0\",\n \"object-inspect\": \"^1.13.3\",\n \"side-channel-list\": \"^1.0.0\",\n \"side-channel-map\": \"^1.0.1\",\n \"side-channel-weakmap\": \"^1.0.2\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/side-channel-list\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz\",\n \"integrity\": \"sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"es-errors\": \"^1.3.0\",\n \"object-inspect\": \"^1.13.3\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/side-channel-map\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz\",\n \"integrity\": \"sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"call-bound\": \"^1.0.2\",\n \"es-errors\": \"^1.3.0\",\n \"get-intrinsic\": \"^1.2.5\",\n \"object-inspect\": \"^1.13.3\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/side-channel-weakmap\": {\n \"version\": \"1.0.2\",\n \"resolved\": \"https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz\",\n \"integrity\": \"sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"call-bound\": \"^1.0.2\",\n \"es-errors\": \"^1.3.0\",\n \"get-intrinsic\": \"^1.2.5\",\n \"object-inspect\": \"^1.13.3\",\n \"side-channel-map\": \"^1.0.1\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/signal-exit\": {\n \"version\": \"3.0.7\",\n \"license\": \"ISC\"\n },\n \"node_modules/sigstore\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/sigstore/-/sigstore-4.0.0.tgz\",\n \"integrity\": \"sha512-Gw/FgHtrLM9WP8P5lLcSGh9OQcrTruWCELAiS48ik1QbL0cH+dfjomiRTUE9zzz+D1N6rOLkwXUvVmXZAsNE0Q==\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@sigstore/bundle\": \"^4.0.0\",\n \"@sigstore/core\": \"^3.0.0\",\n \"@sigstore/protobuf-specs\": \"^0.5.0\",\n \"@sigstore/sign\": \"^4.0.0\",\n \"@sigstore/tuf\": \"^4.0.0\",\n \"@sigstore/verify\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/sinon\": {\n \"version\": \"21.0.1\",\n \"resolved\": \"https://registry.npmjs.org/sinon/-/sinon-21.0.1.tgz\",\n \"integrity\": \"sha512-Z0NVCW45W8Mg5oC/27/+fCqIHFnW8kpkFOq0j9XJIev4Ld0mKmERaZv5DMLAb9fGCevjKwaEeIQz5+MBXfZcDw==\",\n \"license\": \"BSD-3-Clause\",\n \"dependencies\": {\n \"@sinonjs/commons\": \"^3.0.1\",\n \"@sinonjs/fake-timers\": \"^15.1.0\",\n \"@sinonjs/samsam\": \"^8.0.3\",\n \"diff\": \"^8.0.2\",\n \"supports-color\": \"^7.2.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/sinon\"\n }\n },\n \"node_modules/sinon-chai\": {\n \"version\": \"4.0.1\",\n \"resolved\": \"https://registry.npmjs.org/sinon-chai/-/sinon-chai-4.0.1.tgz\",\n \"integrity\": \"sha512-xMKEEV3cYHC1G+boyr7QEqi80gHznYsxVdC9CdjP5JnCWz/jPGuXQzJz3PtBcb0CcHAxar15Y5sjLBoAs6a0yA==\",\n \"dev\": true,\n \"license\": \"(BSD-2-Clause OR WTFPL)\",\n \"peerDependencies\": {\n \"chai\": \"^5.0.0 || ^6.0.0\",\n \"sinon\": \">=4.0.0\"\n }\n },\n \"node_modules/sinon/node_modules/diff\": {\n \"version\": \"8.0.3\",\n \"resolved\": \"https://registry.npmjs.org/diff/-/diff-8.0.3.tgz\",\n \"integrity\": \"sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==\",\n \"license\": \"BSD-3-Clause\",\n \"engines\": {\n \"node\": \">=0.3.1\"\n }\n },\n \"node_modules/sinon/node_modules/supports-color\": {\n \"version\": \"7.2.0\",\n \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz\",\n \"integrity\": \"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-flag\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/slash\": {\n \"version\": \"5.1.0\",\n \"resolved\": \"https://registry.npmjs.org/slash/-/slash-5.1.0.tgz\",\n \"integrity\": \"sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=14.16\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/slugify\": {\n \"version\": \"1.6.6\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8.0.0\"\n }\n },\n \"node_modules/smart-buffer\": {\n \"version\": \"4.2.0\",\n \"resolved\": \"https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz\",\n \"integrity\": \"sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 6.0.0\",\n \"npm\": \">= 3.0.0\"\n }\n },\n \"node_modules/socks\": {\n \"version\": \"2.8.3\",\n \"resolved\": \"https://registry.npmjs.org/socks/-/socks-2.8.3.tgz\",\n \"integrity\": \"sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ip-address\": \"^9.0.5\",\n \"smart-buffer\": \"^4.2.0\"\n },\n \"engines\": {\n \"node\": \">= 10.0.0\",\n \"npm\": \">= 3.0.0\"\n }\n },\n \"node_modules/socks-proxy-agent\": {\n \"version\": \"8.0.5\",\n \"resolved\": \"https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz\",\n \"integrity\": \"sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"agent-base\": \"^7.1.2\",\n \"debug\": \"^4.3.4\",\n \"socks\": \"^2.8.3\"\n },\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/source-map\": {\n \"version\": \"0.6.1\",\n \"devOptional\": true,\n \"license\": \"BSD-3-Clause\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n }\n },\n \"node_modules/source-map-support\": {\n \"version\": \"0.5.21\",\n \"resolved\": \"https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz\",\n \"integrity\": \"sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==\",\n \"dev\": true,\n \"dependencies\": {\n \"buffer-from\": \"^1.0.0\",\n \"source-map\": \"^0.6.0\"\n }\n },\n \"node_modules/spacetrim\": {\n \"version\": \"0.11.59\",\n \"resolved\": \"https://registry.npmjs.org/spacetrim/-/spacetrim-0.11.59.tgz\",\n \"integrity\": \"sha512-lLYsktklSRKprreOm7NXReW8YiX2VBjbgmXYEziOoGf/qsJqAEACaDvoTtUOycwjpaSh+bT8eu0KrJn7UNxiCg==\",\n \"funding\": [\n {\n \"type\": \"individual\",\n \"url\": \"https://buymeacoffee.com/hejny\"\n },\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/hejny/spacetrim/blob/main/README.md#%EF%B8%8F-contributing\"\n }\n ],\n \"license\": \"Apache-2.0\"\n },\n \"node_modules/spdx-correct\": {\n \"version\": \"3.1.1\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"spdx-expression-parse\": \"^3.0.0\",\n \"spdx-license-ids\": \"^3.0.0\"\n }\n },\n \"node_modules/spdx-exceptions\": {\n \"version\": \"2.3.0\",\n \"license\": \"CC-BY-3.0\"\n },\n \"node_modules/spdx-expression-parse\": {\n \"version\": \"3.0.1\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"spdx-exceptions\": \"^2.1.0\",\n \"spdx-license-ids\": \"^3.0.0\"\n }\n },\n \"node_modules/spdx-license-ids\": {\n \"version\": \"3.0.12\",\n \"license\": \"CC0-1.0\"\n },\n \"node_modules/spdy\": {\n \"version\": \"4.0.2\",\n \"resolved\": \"https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz\",\n \"integrity\": \"sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==\",\n \"optional\": true,\n \"dependencies\": {\n \"debug\": \"^4.1.0\",\n \"handle-thing\": \"^2.0.0\",\n \"http-deceiver\": \"^1.2.7\",\n \"select-hose\": \"^2.0.0\",\n \"spdy-transport\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=6.0.0\"\n }\n },\n \"node_modules/spdy-transport\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz\",\n \"integrity\": \"sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==\",\n \"optional\": true,\n \"dependencies\": {\n \"debug\": \"^4.1.0\",\n \"detect-node\": \"^2.0.4\",\n \"hpack.js\": \"^2.1.6\",\n \"obuf\": \"^1.1.2\",\n \"readable-stream\": \"^3.0.6\",\n \"wbuf\": \"^1.7.3\"\n }\n },\n \"node_modules/split\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/split/-/split-1.0.1.tgz\",\n \"integrity\": \"sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"through\": \"2\"\n },\n \"engines\": {\n \"node\": \"*\"\n }\n },\n \"node_modules/split2\": {\n \"version\": \"3.2.2\",\n \"resolved\": \"https://registry.npmjs.org/split2/-/split2-3.2.2.tgz\",\n \"integrity\": \"sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"readable-stream\": \"^3.0.0\"\n }\n },\n \"node_modules/sprintf-js\": {\n \"version\": \"1.0.3\",\n \"resolved\": \"https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz\",\n \"integrity\": \"sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==\",\n \"dev\": true,\n \"license\": \"BSD-3-Clause\"\n },\n \"node_modules/ssri\": {\n \"version\": \"12.0.0\",\n \"resolved\": \"https://registry.npmjs.org/ssri/-/ssri-12.0.0.tgz\",\n \"integrity\": \"sha512-S7iGNosepx9RadX82oimUkvr0Ct7IjJbEbs4mJcTxst8um95J3sDYU1RBEOvdu6oL1Wek2ODI5i4MAw+dZ6cAQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"minipass\": \"^7.0.3\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/ssri/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"node_modules/stable-hash-x\": {\n \"version\": \"0.2.0\",\n \"resolved\": \"https://registry.npmjs.org/stable-hash-x/-/stable-hash-x-0.2.0.tgz\",\n \"integrity\": \"sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12.0.0\"\n }\n },\n \"node_modules/stack-trace\": {\n \"version\": \"0.0.10\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \"*\"\n }\n },\n \"node_modules/statuses\": {\n \"version\": \"2.0.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/stream-browserify\": {\n \"version\": \"2.0.2\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"inherits\": \"~2.0.1\",\n \"readable-stream\": \"^2.0.2\"\n }\n },\n \"node_modules/stream-browserify/node_modules/isarray\": {\n \"version\": \"1.0.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/stream-browserify/node_modules/readable-stream\": {\n \"version\": \"2.3.7\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"core-util-is\": \"~1.0.0\",\n \"inherits\": \"~2.0.3\",\n \"isarray\": \"~1.0.0\",\n \"process-nextick-args\": \"~2.0.0\",\n \"safe-buffer\": \"~5.1.1\",\n \"string_decoder\": \"~1.1.1\",\n \"util-deprecate\": \"~1.0.1\"\n }\n },\n \"node_modules/stream-browserify/node_modules/safe-buffer\": {\n \"version\": \"5.1.2\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/stream-browserify/node_modules/string_decoder\": {\n \"version\": \"1.1.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safe-buffer\": \"~5.1.0\"\n }\n },\n \"node_modules/stream-buffers\": {\n \"version\": \"2.2.0\",\n \"license\": \"Unlicense\",\n \"engines\": {\n \"node\": \">= 0.10.0\"\n }\n },\n \"node_modules/stream-combiner\": {\n \"version\": \"0.2.2\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"duplexer\": \"~0.1.1\",\n \"through\": \"~2.3.4\"\n }\n },\n \"node_modules/stream-http\": {\n \"version\": \"2.8.3\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"builtin-status-codes\": \"^3.0.0\",\n \"inherits\": \"^2.0.1\",\n \"readable-stream\": \"^2.3.6\",\n \"to-arraybuffer\": \"^1.0.0\",\n \"xtend\": \"^4.0.0\"\n }\n },\n \"node_modules/stream-http/node_modules/isarray\": {\n \"version\": \"1.0.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/stream-http/node_modules/readable-stream\": {\n \"version\": \"2.3.7\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"core-util-is\": \"~1.0.0\",\n \"inherits\": \"~2.0.3\",\n \"isarray\": \"~1.0.0\",\n \"process-nextick-args\": \"~2.0.0\",\n \"safe-buffer\": \"~5.1.1\",\n \"string_decoder\": \"~1.1.1\",\n \"util-deprecate\": \"~1.0.1\"\n }\n },\n \"node_modules/stream-http/node_modules/safe-buffer\": {\n \"version\": \"5.1.2\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/stream-http/node_modules/string_decoder\": {\n \"version\": \"1.1.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safe-buffer\": \"~5.1.0\"\n }\n },\n \"node_modules/streamx\": {\n \"version\": \"2.21.0\",\n \"resolved\": \"https://registry.npmjs.org/streamx/-/streamx-2.21.0.tgz\",\n \"integrity\": \"sha512-Qz6MsDZXJ6ur9u+b+4xCG18TluU7PGlRfXVAAjNiGsFrBUt/ioyLkxbFaKJygoPs+/kW4VyBj0bSj89Qu0IGyg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"fast-fifo\": \"^1.3.2\",\n \"queue-tick\": \"^1.0.1\",\n \"text-decoder\": \"^1.1.0\"\n },\n \"optionalDependencies\": {\n \"bare-events\": \"^2.2.0\"\n }\n },\n \"node_modules/strict-event-emitter-types\": {\n \"version\": \"2.0.0\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/string_decoder\": {\n \"version\": \"1.3.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safe-buffer\": \"~5.2.0\"\n }\n },\n \"node_modules/string-width\": {\n \"version\": \"4.2.3\",\n \"resolved\": \"https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz\",\n \"integrity\": \"sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"emoji-regex\": \"^8.0.0\",\n \"is-fullwidth-code-point\": \"^3.0.0\",\n \"strip-ansi\": \"^6.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/string-width-cjs\": {\n \"name\": \"string-width\",\n \"version\": \"4.2.3\",\n \"resolved\": \"https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz\",\n \"integrity\": \"sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==\",\n \"dependencies\": {\n \"emoji-regex\": \"^8.0.0\",\n \"is-fullwidth-code-point\": \"^3.0.0\",\n \"strip-ansi\": \"^6.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/strip-ansi\": {\n \"version\": \"6.0.1\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-regex\": \"^5.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/strip-ansi-cjs\": {\n \"name\": \"strip-ansi\",\n \"version\": \"6.0.1\",\n \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz\",\n \"integrity\": \"sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==\",\n \"dependencies\": {\n \"ansi-regex\": \"^5.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/strip-bom\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz\",\n \"integrity\": \"sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/strip-final-newline\": {\n \"version\": \"2.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/strip-indent\": {\n \"version\": \"3.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"min-indent\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/strip-json-comments\": {\n \"version\": \"3.1.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/strnum\": {\n \"version\": \"2.1.1\",\n \"resolved\": \"https://registry.npmjs.org/strnum/-/strnum-2.1.1.tgz\",\n \"integrity\": \"sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==\",\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/NaturalIntelligence\"\n }\n ],\n \"license\": \"MIT\"\n },\n \"node_modules/supports-color\": {\n \"version\": \"8.1.1\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-flag\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/supports-color?sponsor=1\"\n }\n },\n \"node_modules/supports-hyperlinks\": {\n \"version\": \"2.3.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-flag\": \"^4.0.0\",\n \"supports-color\": \"^7.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/supports-hyperlinks/node_modules/supports-color\": {\n \"version\": \"7.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-flag\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/supports-preserve-symlinks-flag\": {\n \"version\": \"1.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/sync-monorepo-packages\": {\n \"version\": \"1.0.2\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"debug\": \"4.3.4\",\n \"find-up\": \"5.0.0\",\n \"fs-extra\": \"11.1.0\",\n \"globby\": \"10.0.2\",\n \"log-symbols\": \"3.0.0\",\n \"pluralize\": \"8.0.0\",\n \"read-pkg\": \"5.2.0\",\n \"rfc6902\": \"5.0.1\",\n \"rxjs\": \"7.6.0\",\n \"term-size\": \"2.2.1\",\n \"wrap-ansi\": \"7.0.0\",\n \"write-pkg\": \"4.0.0\",\n \"yargs\": \"17.6.2\"\n },\n \"bin\": {\n \"sync-monorepo-packages\": \"src/cli.js\"\n },\n \"engines\": {\n \"node\": \"^14.17.0 || ^16.13.0 || >=18.0.0\",\n \"npm\": \">7\"\n }\n },\n \"node_modules/sync-monorepo-packages/node_modules/@types/glob\": {\n \"version\": \"7.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/minimatch\": \"*\",\n \"@types/node\": \"*\"\n }\n },\n \"node_modules/sync-monorepo-packages/node_modules/fs-extra\": {\n \"version\": \"11.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"graceful-fs\": \"^4.2.0\",\n \"jsonfile\": \"^6.0.1\",\n \"universalify\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=14.14\"\n }\n },\n \"node_modules/sync-monorepo-packages/node_modules/glob\": {\n \"version\": \"7.2.3\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-7.2.3.tgz\",\n \"integrity\": \"sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==\",\n \"deprecated\": \"Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"fs.realpath\": \"^1.0.0\",\n \"inflight\": \"^1.0.4\",\n \"inherits\": \"2\",\n \"minimatch\": \"^3.1.1\",\n \"once\": \"^1.3.0\",\n \"path-is-absolute\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \"*\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/sync-monorepo-packages/node_modules/globby\": {\n \"version\": \"10.0.2\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/glob\": \"^7.1.1\",\n \"array-union\": \"^2.1.0\",\n \"dir-glob\": \"^3.0.1\",\n \"fast-glob\": \"^3.0.3\",\n \"glob\": \"^7.1.3\",\n \"ignore\": \"^5.1.1\",\n \"merge2\": \"^1.2.3\",\n \"slash\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/sync-monorepo-packages/node_modules/log-symbols\": {\n \"version\": \"3.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"chalk\": \"^2.4.2\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/sync-monorepo-packages/node_modules/rxjs\": {\n \"version\": \"7.6.0\",\n \"dev\": true,\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"tslib\": \"^2.1.0\"\n }\n },\n \"node_modules/sync-monorepo-packages/node_modules/slash\": {\n \"version\": \"3.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/sync-monorepo-packages/node_modules/yargs\": {\n \"version\": \"17.6.2\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"cliui\": \"^8.0.1\",\n \"escalade\": \"^3.1.1\",\n \"get-caller-file\": \"^2.0.5\",\n \"require-directory\": \"^2.1.1\",\n \"string-width\": \"^4.2.3\",\n \"y18n\": \"^5.0.5\",\n \"yargs-parser\": \"^21.1.1\"\n },\n \"engines\": {\n \"node\": \">=12\"\n }\n },\n \"node_modules/tagged-tag\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/tagged-tag/-/tagged-tag-1.0.0.tgz\",\n \"integrity\": \"sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/tapable\": {\n \"version\": \"2.3.0\",\n \"resolved\": \"https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz\",\n \"integrity\": \"sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/webpack\"\n }\n },\n \"node_modules/tar\": {\n \"version\": \"6.2.1\",\n \"resolved\": \"https://registry.npmjs.org/tar/-/tar-6.2.1.tgz\",\n \"integrity\": \"sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"chownr\": \"^2.0.0\",\n \"fs-minipass\": \"^2.0.0\",\n \"minipass\": \"^5.0.0\",\n \"minizlib\": \"^2.1.1\",\n \"mkdirp\": \"^1.0.3\",\n \"yallist\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/tar-fs\": {\n \"version\": \"3.1.1\",\n \"resolved\": \"https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.1.tgz\",\n \"integrity\": \"sha512-LZA0oaPOc2fVo82Txf3gw+AkEd38szODlptMYejQUhndHMLQ9M059uXR+AfS7DNo0NpINvSqDsvyaCrBVkptWg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"pump\": \"^3.0.0\",\n \"tar-stream\": \"^3.1.5\"\n },\n \"optionalDependencies\": {\n \"bare-fs\": \"^4.0.1\",\n \"bare-path\": \"^3.0.0\"\n }\n },\n \"node_modules/tar-fs/node_modules/tar-stream\": {\n \"version\": \"3.1.7\",\n \"resolved\": \"https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz\",\n \"integrity\": \"sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"b4a\": \"^1.6.4\",\n \"fast-fifo\": \"^1.2.0\",\n \"streamx\": \"^2.15.0\"\n }\n },\n \"node_modules/tar-stream\": {\n \"version\": \"2.2.0\",\n \"resolved\": \"https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz\",\n \"integrity\": \"sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"bl\": \"^4.0.3\",\n \"end-of-stream\": \"^1.4.1\",\n \"fs-constants\": \"^1.0.0\",\n \"inherits\": \"^2.0.3\",\n \"readable-stream\": \"^3.1.1\"\n },\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/tar/node_modules/minipass\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz\",\n \"integrity\": \"sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/tar/node_modules/mkdirp\": {\n \"version\": \"1.0.4\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"bin\": {\n \"mkdirp\": \"bin/cmd.js\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/teen_process\": {\n \"version\": \"4.0.9\",\n \"resolved\": \"https://registry.npmjs.org/teen_process/-/teen_process-4.0.9.tgz\",\n \"integrity\": \"sha512-AdH4nuHQTTiFEnib3wWnepnfa7Vz8QzOZ7EsLM8iz8pOlZmshjnODmWTt/8OA6v6A9gACURKc0OddGX28UoxFQ==\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"lodash\": \"^4.17.21\",\n \"shell-quote\": \"^1.8.1\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n }\n },\n \"node_modules/temp-dir\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz\",\n \"integrity\": \"sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/term-size\": {\n \"version\": \"2.2.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/text-decoder\": {\n \"version\": \"1.2.1\",\n \"resolved\": \"https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.1.tgz\",\n \"integrity\": \"sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==\",\n \"license\": \"Apache-2.0\"\n },\n \"node_modules/text-extensions\": {\n \"version\": \"1.9.0\",\n \"resolved\": \"https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz\",\n \"integrity\": \"sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.10\"\n }\n },\n \"node_modules/text-hex\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz\",\n \"integrity\": \"sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==\",\n \"license\": \"MIT\"\n },\n \"node_modules/through\": {\n \"version\": \"2.3.8\",\n \"license\": \"MIT\"\n },\n \"node_modules/through2\": {\n \"version\": \"2.0.5\",\n \"resolved\": \"https://registry.npmjs.org/through2/-/through2-2.0.5.tgz\",\n \"integrity\": \"sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"readable-stream\": \"~2.3.6\",\n \"xtend\": \"~4.0.1\"\n }\n },\n \"node_modules/through2/node_modules/isarray\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz\",\n \"integrity\": \"sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/through2/node_modules/readable-stream\": {\n \"version\": \"2.3.8\",\n \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz\",\n \"integrity\": \"sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"core-util-is\": \"~1.0.0\",\n \"inherits\": \"~2.0.3\",\n \"isarray\": \"~1.0.0\",\n \"process-nextick-args\": \"~2.0.0\",\n \"safe-buffer\": \"~5.1.1\",\n \"string_decoder\": \"~1.1.1\",\n \"util-deprecate\": \"~1.0.1\"\n }\n },\n \"node_modules/through2/node_modules/safe-buffer\": {\n \"version\": \"5.1.2\",\n \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz\",\n \"integrity\": \"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/through2/node_modules/string_decoder\": {\n \"version\": \"1.1.1\",\n \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz\",\n \"integrity\": \"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"safe-buffer\": \"~5.1.0\"\n }\n },\n \"node_modules/timers-browserify\": {\n \"version\": \"2.0.12\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"setimmediate\": \"^1.0.4\"\n },\n \"engines\": {\n \"node\": \">=0.6.0\"\n }\n },\n \"node_modules/tinyglobby\": {\n \"version\": \"0.2.15\",\n \"resolved\": \"https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz\",\n \"integrity\": \"sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"fdir\": \"^6.5.0\",\n \"picomatch\": \"^4.0.3\"\n },\n \"engines\": {\n \"node\": \">=12.0.0\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/SuperchupuDev\"\n }\n },\n \"node_modules/tinyglobby/node_modules/fdir\": {\n \"version\": \"6.5.0\",\n \"resolved\": \"https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz\",\n \"integrity\": \"sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12.0.0\"\n },\n \"peerDependencies\": {\n \"picomatch\": \"^3 || ^4\"\n },\n \"peerDependenciesMeta\": {\n \"picomatch\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/tinyglobby/node_modules/picomatch\": {\n \"version\": \"4.0.3\",\n \"resolved\": \"https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz\",\n \"integrity\": \"sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/jonschlinkert\"\n }\n },\n \"node_modules/tmp\": {\n \"version\": \"0.2.5\",\n \"resolved\": \"https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz\",\n \"integrity\": \"sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=14.14\"\n }\n },\n \"node_modules/to-arraybuffer\": {\n \"version\": \"1.0.1\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/to-buffer\": {\n \"version\": \"1.2.1\",\n \"resolved\": \"https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz\",\n \"integrity\": \"sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"isarray\": \"^2.0.5\",\n \"safe-buffer\": \"^5.2.1\",\n \"typed-array-buffer\": \"^1.0.3\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n }\n },\n \"node_modules/to-buffer/node_modules/isarray\": {\n \"version\": \"2.0.5\",\n \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz\",\n \"integrity\": \"sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/to-regex-range\": {\n \"version\": \"5.0.1\",\n \"resolved\": \"https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz\",\n \"integrity\": \"sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"is-number\": \"^7.0.0\"\n },\n \"engines\": {\n \"node\": \">=8.0\"\n }\n },\n \"node_modules/toidentifier\": {\n \"version\": \"1.0.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.6\"\n }\n },\n \"node_modules/tree-kill\": {\n \"version\": \"1.2.2\",\n \"resolved\": \"https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz\",\n \"integrity\": \"sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"bin\": {\n \"tree-kill\": \"cli.js\"\n }\n },\n \"node_modules/treeverse\": {\n \"version\": \"3.0.0\",\n \"resolved\": \"https://registry.npmjs.org/treeverse/-/treeverse-3.0.0.tgz\",\n \"integrity\": \"sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^14.17.0 || ^16.13.0 || >=18.0.0\"\n }\n },\n \"node_modules/trim-newlines\": {\n \"version\": \"3.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/triple-beam\": {\n \"version\": \"1.3.0\",\n \"license\": \"MIT\"\n },\n \"node_modules/truncate-utf8-bytes\": {\n \"version\": \"1.0.2\",\n \"license\": \"WTFPL\",\n \"dependencies\": {\n \"utf8-byte-length\": \"^1.0.1\"\n }\n },\n \"node_modules/ts-api-utils\": {\n \"version\": \"2.4.0\",\n \"resolved\": \"https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz\",\n \"integrity\": \"sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18.12\"\n },\n \"peerDependencies\": {\n \"typescript\": \">=4.8.4\"\n }\n },\n \"node_modules/ts-declaration-location\": {\n \"version\": \"1.0.7\",\n \"resolved\": \"https://registry.npmjs.org/ts-declaration-location/-/ts-declaration-location-1.0.7.tgz\",\n \"integrity\": \"sha512-EDyGAwH1gO0Ausm9gV6T2nUvBgXT5kGoCMJPllOaooZ+4VvJiKBdZE7wK18N1deEowhcUptS+5GXZK8U/fvpwA==\",\n \"funding\": [\n {\n \"type\": \"ko-fi\",\n \"url\": \"https://ko-fi.com/rebeccastevens\"\n },\n {\n \"type\": \"tidelift\",\n \"url\": \"https://tidelift.com/funding/github/npm/ts-declaration-location\"\n }\n ],\n \"license\": \"BSD-3-Clause\",\n \"dependencies\": {\n \"picomatch\": \"^4.0.2\"\n },\n \"peerDependencies\": {\n \"typescript\": \">=4.0.0\"\n }\n },\n \"node_modules/ts-declaration-location/node_modules/picomatch\": {\n \"version\": \"4.0.3\",\n \"resolved\": \"https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz\",\n \"integrity\": \"sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/jonschlinkert\"\n }\n },\n \"node_modules/ts-node\": {\n \"version\": \"10.9.2\",\n \"resolved\": \"https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz\",\n \"integrity\": \"sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==\",\n \"dev\": true,\n \"dependencies\": {\n \"@cspotcode/source-map-support\": \"^0.8.0\",\n \"@tsconfig/node10\": \"^1.0.7\",\n \"@tsconfig/node12\": \"^1.0.7\",\n \"@tsconfig/node14\": \"^1.0.0\",\n \"@tsconfig/node16\": \"^1.0.2\",\n \"acorn\": \"^8.4.1\",\n \"acorn-walk\": \"^8.1.1\",\n \"arg\": \"^4.1.0\",\n \"create-require\": \"^1.1.0\",\n \"diff\": \"^4.0.1\",\n \"make-error\": \"^1.1.1\",\n \"v8-compile-cache-lib\": \"^3.0.1\",\n \"yn\": \"3.1.1\"\n },\n \"bin\": {\n \"ts-node\": \"dist/bin.js\",\n \"ts-node-cwd\": \"dist/bin-cwd.js\",\n \"ts-node-esm\": \"dist/bin-esm.js\",\n \"ts-node-script\": \"dist/bin-script.js\",\n \"ts-node-transpile-only\": \"dist/bin-transpile.js\",\n \"ts-script\": \"dist/bin-script-deprecated.js\"\n },\n \"peerDependencies\": {\n \"@swc/core\": \">=1.2.50\",\n \"@swc/wasm\": \">=1.2.50\",\n \"@types/node\": \"*\",\n \"typescript\": \">=2.7\"\n },\n \"peerDependenciesMeta\": {\n \"@swc/core\": {\n \"optional\": true\n },\n \"@swc/wasm\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/ts-node/node_modules/@tsconfig/node14\": {\n \"version\": \"1.0.3\",\n \"resolved\": \"https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz\",\n \"integrity\": \"sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==\",\n \"dev\": true\n },\n \"node_modules/ts-node/node_modules/diff\": {\n \"version\": \"4.0.2\",\n \"resolved\": \"https://registry.npmjs.org/diff/-/diff-4.0.2.tgz\",\n \"integrity\": \"sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==\",\n \"dev\": true,\n \"engines\": {\n \"node\": \">=0.3.1\"\n }\n },\n \"node_modules/tsd\": {\n \"version\": \"0.33.0\",\n \"resolved\": \"https://registry.npmjs.org/tsd/-/tsd-0.33.0.tgz\",\n \"integrity\": \"sha512-/PQtykJFVw90QICG7zyPDMIyueOXKL7jOJVoX5pILnb3Ux+7QqynOxfVvarE+K+yi7BZyOSY4r+OZNWSWRiEwQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@tsd/typescript\": \"^5.9.2\",\n \"eslint-formatter-pretty\": \"^4.1.0\",\n \"globby\": \"^11.0.1\",\n \"jest-diff\": \"^29.0.3\",\n \"meow\": \"^9.0.0\",\n \"path-exists\": \"^4.0.0\",\n \"read-pkg-up\": \"^7.0.0\"\n },\n \"bin\": {\n \"tsd\": \"dist/cli.js\"\n },\n \"engines\": {\n \"node\": \">=14.16\"\n }\n },\n \"node_modules/tsd/node_modules/find-up\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz\",\n \"integrity\": \"sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"locate-path\": \"^5.0.0\",\n \"path-exists\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/tsd/node_modules/locate-path\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz\",\n \"integrity\": \"sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-locate\": \"^4.1.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/tsd/node_modules/meow\": {\n \"version\": \"9.0.0\",\n \"resolved\": \"https://registry.npmjs.org/meow/-/meow-9.0.0.tgz\",\n \"integrity\": \"sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/minimist\": \"^1.2.0\",\n \"camelcase-keys\": \"^6.2.2\",\n \"decamelize\": \"^1.2.0\",\n \"decamelize-keys\": \"^1.1.0\",\n \"hard-rejection\": \"^2.1.0\",\n \"minimist-options\": \"4.1.0\",\n \"normalize-package-data\": \"^3.0.0\",\n \"read-pkg-up\": \"^7.0.1\",\n \"redent\": \"^3.0.0\",\n \"trim-newlines\": \"^3.0.0\",\n \"type-fest\": \"^0.18.0\",\n \"yargs-parser\": \"^20.2.3\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/tsd/node_modules/p-limit\": {\n \"version\": \"2.3.0\",\n \"resolved\": \"https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz\",\n \"integrity\": \"sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-try\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \">=6\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/tsd/node_modules/p-locate\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz\",\n \"integrity\": \"sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"p-limit\": \"^2.2.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/tsd/node_modules/read-pkg-up\": {\n \"version\": \"7.0.1\",\n \"resolved\": \"https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz\",\n \"integrity\": \"sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"find-up\": \"^4.1.0\",\n \"read-pkg\": \"^5.2.0\",\n \"type-fest\": \"^0.8.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/tsd/node_modules/read-pkg-up/node_modules/type-fest\": {\n \"version\": \"0.8.1\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz\",\n \"integrity\": \"sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==\",\n \"dev\": true,\n \"license\": \"(MIT OR CC0-1.0)\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/tsd/node_modules/type-fest\": {\n \"version\": \"0.18.1\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz\",\n \"integrity\": \"sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==\",\n \"dev\": true,\n \"license\": \"(MIT OR CC0-1.0)\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/tsd/node_modules/yargs-parser\": {\n \"version\": \"20.2.9\",\n \"resolved\": \"https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz\",\n \"integrity\": \"sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/tslib\": {\n \"version\": \"2.5.0\",\n \"license\": \"0BSD\"\n },\n \"node_modules/tty-browserify\": {\n \"version\": \"0.0.0\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/tuf-js\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/tuf-js/-/tuf-js-4.0.0.tgz\",\n \"integrity\": \"sha512-Lq7ieeGvXDXwpoSmOSgLWVdsGGV9J4a77oDTAPe/Ltrqnnm/ETaRlBAQTH5JatEh8KXuE6sddf9qAv1Q2282Hg==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@tufjs/models\": \"4.0.0\",\n \"debug\": \"^4.4.1\",\n \"make-fetch-happen\": \"^15.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"node_modules/tuf-js/node_modules/debug\": {\n \"version\": \"4.4.3\",\n \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.4.3.tgz\",\n \"integrity\": \"sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ms\": \"^2.1.3\"\n },\n \"engines\": {\n \"node\": \">=6.0\"\n },\n \"peerDependenciesMeta\": {\n \"supports-color\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/tuf-js/node_modules/ms\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.3.tgz\",\n \"integrity\": \"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/type-check\": {\n \"version\": \"0.4.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"prelude-ls\": \"^1.2.1\"\n },\n \"engines\": {\n \"node\": \">= 0.8.0\"\n }\n },\n \"node_modules/type-detect\": {\n \"version\": \"4.0.8\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/type-fest\": {\n \"version\": \"4.26.0\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-4.26.0.tgz\",\n \"integrity\": \"sha512-OduNjVJsFbifKb57UqZ2EMP1i4u64Xwow3NYXUtBbD4vIwJdQd4+xl8YDou1dlm4DVrtwT/7Ky8z8WyCULVfxw==\",\n \"license\": \"(MIT OR CC0-1.0)\",\n \"engines\": {\n \"node\": \">=16\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/type-is\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz\",\n \"integrity\": \"sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"content-type\": \"^1.0.5\",\n \"media-typer\": \"^1.1.0\",\n \"mime-types\": \"^3.0.0\"\n },\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/type-is/node_modules/mime-db\": {\n \"version\": \"1.54.0\",\n \"resolved\": \"https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz\",\n \"integrity\": \"sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.6\"\n }\n },\n \"node_modules/type-is/node_modules/mime-types\": {\n \"version\": \"3.0.2\",\n \"resolved\": \"https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz\",\n \"integrity\": \"sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"mime-db\": \"^1.54.0\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/express\"\n }\n },\n \"node_modules/typed-array-buffer\": {\n \"version\": \"1.0.3\",\n \"resolved\": \"https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz\",\n \"integrity\": \"sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"call-bound\": \"^1.0.3\",\n \"es-errors\": \"^1.3.0\",\n \"is-typed-array\": \"^1.1.14\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n }\n },\n \"node_modules/typedarray\": {\n \"version\": \"0.0.6\",\n \"resolved\": \"https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz\",\n \"integrity\": \"sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/typescript\": {\n \"version\": \"5.9.3\",\n \"resolved\": \"https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz\",\n \"integrity\": \"sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==\",\n \"license\": \"Apache-2.0\",\n \"bin\": {\n \"tsc\": \"bin/tsc\",\n \"tsserver\": \"bin/tsserver\"\n },\n \"engines\": {\n \"node\": \">=14.17\"\n }\n },\n \"node_modules/typescript-eslint\": {\n \"version\": \"8.54.0\",\n \"resolved\": \"https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.54.0.tgz\",\n \"integrity\": \"sha512-CKsJ+g53QpsNPqbzUsfKVgd3Lny4yKZ1pP4qN3jdMOg/sisIDLGyDMezycquXLE5JsEU0wp3dGNdzig0/fmSVQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@typescript-eslint/eslint-plugin\": \"8.54.0\",\n \"@typescript-eslint/parser\": \"8.54.0\",\n \"@typescript-eslint/typescript-estree\": \"8.54.0\",\n \"@typescript-eslint/utils\": \"8.54.0\"\n },\n \"engines\": {\n \"node\": \"^18.18.0 || ^20.9.0 || >=21.1.0\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/typescript-eslint\"\n },\n \"peerDependencies\": {\n \"eslint\": \"^8.57.0 || ^9.0.0\",\n \"typescript\": \">=4.8.4 <6.0.0\"\n }\n },\n \"node_modules/uglify-js\": {\n \"version\": \"3.19.3\",\n \"resolved\": \"https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz\",\n \"integrity\": \"sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==\",\n \"dev\": true,\n \"license\": \"BSD-2-Clause\",\n \"optional\": true,\n \"bin\": {\n \"uglifyjs\": \"bin/uglifyjs\"\n },\n \"engines\": {\n \"node\": \">=0.8.0\"\n }\n },\n \"node_modules/undici\": {\n \"version\": \"6.23.0\",\n \"resolved\": \"https://registry.npmjs.org/undici/-/undici-6.23.0.tgz\",\n \"integrity\": \"sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18.17\"\n }\n },\n \"node_modules/undici-types\": {\n \"version\": \"6.21.0\",\n \"resolved\": \"https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz\",\n \"integrity\": \"sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==\",\n \"license\": \"MIT\"\n },\n \"node_modules/unicorn-magic\": {\n \"version\": \"0.3.0\",\n \"resolved\": \"https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz\",\n \"integrity\": \"sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/unique-filename\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/unique-filename/-/unique-filename-4.0.0.tgz\",\n \"integrity\": \"sha512-XSnEewXmQ+veP7xX2dS5Q4yZAvO40cBN2MWkJ7D/6sW4Dg6wYBNwM1Vrnz1FhH5AdeLIlUXRI9e28z1YZi71NQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"unique-slug\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/unique-slug\": {\n \"version\": \"5.0.0\",\n \"resolved\": \"https://registry.npmjs.org/unique-slug/-/unique-slug-5.0.0.tgz\",\n \"integrity\": \"sha512-9OdaqO5kwqR+1kVgHAhsp5vPNU0hnxRa26rBFNfNgM7M6pNtgzeBn3s/xbyCQL3dcjzOatcef6UUHpB/6MaETg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"imurmurhash\": \"^0.1.4\"\n },\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/universal-user-agent\": {\n \"version\": \"6.0.1\",\n \"resolved\": \"https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz\",\n \"integrity\": \"sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/universalify\": {\n \"version\": \"2.0.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 10.0.0\"\n }\n },\n \"node_modules/unorm\": {\n \"version\": \"1.6.0\",\n \"license\": \"MIT or GPL-2.0\",\n \"engines\": {\n \"node\": \">= 0.4.0\"\n }\n },\n \"node_modules/unpipe\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz\",\n \"integrity\": \"sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/unrs-resolver\": {\n \"version\": \"1.11.1\",\n \"resolved\": \"https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz\",\n \"integrity\": \"sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==\",\n \"hasInstallScript\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"napi-postinstall\": \"^0.3.0\"\n },\n \"funding\": {\n \"url\": \"https://opencollective.com/unrs-resolver\"\n },\n \"optionalDependencies\": {\n \"@unrs/resolver-binding-android-arm-eabi\": \"1.11.1\",\n \"@unrs/resolver-binding-android-arm64\": \"1.11.1\",\n \"@unrs/resolver-binding-darwin-arm64\": \"1.11.1\",\n \"@unrs/resolver-binding-darwin-x64\": \"1.11.1\",\n \"@unrs/resolver-binding-freebsd-x64\": \"1.11.1\",\n \"@unrs/resolver-binding-linux-arm-gnueabihf\": \"1.11.1\",\n \"@unrs/resolver-binding-linux-arm-musleabihf\": \"1.11.1\",\n \"@unrs/resolver-binding-linux-arm64-gnu\": \"1.11.1\",\n \"@unrs/resolver-binding-linux-arm64-musl\": \"1.11.1\",\n \"@unrs/resolver-binding-linux-ppc64-gnu\": \"1.11.1\",\n \"@unrs/resolver-binding-linux-riscv64-gnu\": \"1.11.1\",\n \"@unrs/resolver-binding-linux-riscv64-musl\": \"1.11.1\",\n \"@unrs/resolver-binding-linux-s390x-gnu\": \"1.11.1\",\n \"@unrs/resolver-binding-linux-x64-gnu\": \"1.11.1\",\n \"@unrs/resolver-binding-linux-x64-musl\": \"1.11.1\",\n \"@unrs/resolver-binding-wasm32-wasi\": \"1.11.1\",\n \"@unrs/resolver-binding-win32-arm64-msvc\": \"1.11.1\",\n \"@unrs/resolver-binding-win32-ia32-msvc\": \"1.11.1\",\n \"@unrs/resolver-binding-win32-x64-msvc\": \"1.11.1\"\n }\n },\n \"node_modules/upath\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/upath/-/upath-2.0.1.tgz\",\n \"integrity\": \"sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\",\n \"yarn\": \"*\"\n }\n },\n \"node_modules/update-browserslist-db\": {\n \"version\": \"1.2.3\",\n \"resolved\": \"https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz\",\n \"integrity\": \"sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==\",\n \"funding\": [\n {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/browserslist\"\n },\n {\n \"type\": \"tidelift\",\n \"url\": \"https://tidelift.com/funding/github/npm/browserslist\"\n },\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/ai\"\n }\n ],\n \"license\": \"MIT\",\n \"dependencies\": {\n \"escalade\": \"^3.2.0\",\n \"picocolors\": \"^1.1.1\"\n },\n \"bin\": {\n \"update-browserslist-db\": \"cli.js\"\n },\n \"peerDependencies\": {\n \"browserslist\": \">= 4.21.0\"\n }\n },\n \"node_modules/uri-js\": {\n \"version\": \"4.4.1\",\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"punycode\": \"^2.1.0\"\n }\n },\n \"node_modules/uri-js/node_modules/punycode\": {\n \"version\": \"2.1.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/url\": {\n \"version\": \"0.11.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"punycode\": \"1.3.2\",\n \"querystring\": \"0.2.0\"\n }\n },\n \"node_modules/url/node_modules/punycode\": {\n \"version\": \"1.3.2\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/urlpattern-polyfill\": {\n \"version\": \"10.0.0\",\n \"resolved\": \"https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz\",\n \"integrity\": \"sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==\",\n \"license\": \"MIT\"\n },\n \"node_modules/userhome\": {\n \"version\": \"1.0.1\",\n \"resolved\": \"https://registry.npmjs.org/userhome/-/userhome-1.0.1.tgz\",\n \"integrity\": \"sha512-5cnLm4gseXjAclKowC4IjByaGsjtAoV6PrOQOljplNB54ReUYJP8HdAFq2muHinSDAh09PPX/uXDPfdxRHvuSA==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.8.0\"\n }\n },\n \"node_modules/utf8-byte-length\": {\n \"version\": \"1.0.4\",\n \"license\": \"WTFPL\"\n },\n \"node_modules/util\": {\n \"version\": \"0.11.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"inherits\": \"2.0.3\"\n }\n },\n \"node_modules/util-deprecate\": {\n \"version\": \"1.0.2\",\n \"license\": \"MIT\"\n },\n \"node_modules/util/node_modules/inherits\": {\n \"version\": \"2.0.3\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/uuid\": {\n \"version\": \"11.1.0\",\n \"resolved\": \"https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz\",\n \"integrity\": \"sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==\",\n \"dev\": true,\n \"funding\": [\n \"https://github.com/sponsors/broofa\",\n \"https://github.com/sponsors/ctavan\"\n ],\n \"license\": \"MIT\",\n \"bin\": {\n \"uuid\": \"dist/esm/bin/uuid\"\n }\n },\n \"node_modules/v8-compile-cache-lib\": {\n \"version\": \"3.0.1\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/validate-npm-package-license\": {\n \"version\": \"3.0.4\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"spdx-correct\": \"^3.0.0\",\n \"spdx-expression-parse\": \"^3.0.0\"\n }\n },\n \"node_modules/validate-npm-package-name\": {\n \"version\": \"6.0.2\",\n \"resolved\": \"https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-6.0.2.tgz\",\n \"integrity\": \"sha512-IUoow1YUtvoBBC06dXs8bR8B9vuA3aJfmQNKMoaPG/OFsPmoQvw8xh+6Ye25Gx9DQhoEom3Pcu9MKHerm/NpUQ==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^18.17.0 || >=20.5.0\"\n }\n },\n \"node_modules/vary\": {\n \"version\": \"1.1.2\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">= 0.8\"\n }\n },\n \"node_modules/vm-browserify\": {\n \"version\": \"1.1.2\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/wait-port\": {\n \"version\": \"1.1.0\",\n \"resolved\": \"https://registry.npmjs.org/wait-port/-/wait-port-1.1.0.tgz\",\n \"integrity\": \"sha512-3e04qkoN3LxTMLakdqeWth8nih8usyg+sf1Bgdf9wwUkp05iuK1eSY/QpLvscT/+F/gA89+LpUmmgBtesbqI2Q==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"chalk\": \"^4.1.2\",\n \"commander\": \"^9.3.0\",\n \"debug\": \"^4.3.4\"\n },\n \"bin\": {\n \"wait-port\": \"bin/wait-port.js\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/wait-port/node_modules/ansi-styles\": {\n \"version\": \"4.3.0\",\n \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz\",\n \"integrity\": \"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-convert\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/wait-port/node_modules/chalk\": {\n \"version\": \"4.1.2\",\n \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz\",\n \"integrity\": \"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^4.1.0\",\n \"supports-color\": \"^7.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/chalk?sponsor=1\"\n }\n },\n \"node_modules/wait-port/node_modules/color-convert\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz\",\n \"integrity\": \"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-name\": \"~1.1.4\"\n },\n \"engines\": {\n \"node\": \">=7.0.0\"\n }\n },\n \"node_modules/wait-port/node_modules/color-name\": {\n \"version\": \"1.1.4\",\n \"resolved\": \"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz\",\n \"integrity\": \"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==\",\n \"license\": \"MIT\"\n },\n \"node_modules/wait-port/node_modules/supports-color\": {\n \"version\": \"7.2.0\",\n \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz\",\n \"integrity\": \"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"has-flag\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/walk-up-path\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/walk-up-path/-/walk-up-path-4.0.0.tgz\",\n \"integrity\": \"sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"node_modules/wbuf\": {\n \"version\": \"1.7.3\",\n \"resolved\": \"https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz\",\n \"integrity\": \"sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==\",\n \"optional\": true,\n \"dependencies\": {\n \"minimalistic-assert\": \"^1.0.0\"\n }\n },\n \"node_modules/wcwidth\": {\n \"version\": \"1.0.1\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"defaults\": \"^1.0.3\"\n }\n },\n \"node_modules/webdriver\": {\n \"version\": \"9.23.3\",\n \"resolved\": \"https://registry.npmjs.org/webdriver/-/webdriver-9.23.3.tgz\",\n \"integrity\": \"sha512-8FdXOhzkxqDI6F1dyIsQONhKLDZ9HPSEwNBnH3bD1cHnj/6nVvyYrUtDPo/+J324BuwOa1IVTH3m8mb3B2hTlA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/node\": \"^20.1.0\",\n \"@types/ws\": \"^8.5.3\",\n \"@wdio/config\": \"9.23.3\",\n \"@wdio/logger\": \"9.18.0\",\n \"@wdio/protocols\": \"9.23.3\",\n \"@wdio/types\": \"9.23.3\",\n \"@wdio/utils\": \"9.23.3\",\n \"deepmerge-ts\": \"^7.0.3\",\n \"https-proxy-agent\": \"^7.0.6\",\n \"undici\": \"^6.21.3\",\n \"ws\": \"^8.8.0\"\n },\n \"engines\": {\n \"node\": \">=18.20.0\"\n }\n },\n \"node_modules/webdriver/node_modules/@types/node\": {\n \"version\": \"20.19.25\",\n \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-20.19.25.tgz\",\n \"integrity\": \"sha512-ZsJzA5thDQMSQO788d7IocwwQbI8B5OPzmqNvpf3NY/+MHDAS759Wo0gd2WQeXYt5AAAQjzcrTVC6SKCuYgoCQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"undici-types\": \"~6.21.0\"\n }\n },\n \"node_modules/webdriverio\": {\n \"version\": \"9.23.3\",\n \"resolved\": \"https://registry.npmjs.org/webdriverio/-/webdriverio-9.23.3.tgz\",\n \"integrity\": \"sha512-1dhMsBx/GLHJsDLhg/xuEQ48JZPrbldz7qdFT+MXQZADj9CJ4bJywWtVBME648MmVMfgDvLc5g2ThGIOupSLvQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/node\": \"^20.11.30\",\n \"@types/sinonjs__fake-timers\": \"^8.1.5\",\n \"@wdio/config\": \"9.23.3\",\n \"@wdio/logger\": \"9.18.0\",\n \"@wdio/protocols\": \"9.23.3\",\n \"@wdio/repl\": \"9.16.2\",\n \"@wdio/types\": \"9.23.3\",\n \"@wdio/utils\": \"9.23.3\",\n \"archiver\": \"^7.0.1\",\n \"aria-query\": \"^5.3.0\",\n \"cheerio\": \"^1.0.0-rc.12\",\n \"css-shorthand-properties\": \"^1.1.1\",\n \"css-value\": \"^0.0.1\",\n \"grapheme-splitter\": \"^1.0.4\",\n \"htmlfy\": \"^0.8.1\",\n \"is-plain-obj\": \"^4.1.0\",\n \"jszip\": \"^3.10.1\",\n \"lodash.clonedeep\": \"^4.5.0\",\n \"lodash.zip\": \"^4.2.0\",\n \"query-selector-shadow-dom\": \"^1.0.1\",\n \"resq\": \"^1.11.0\",\n \"rgb2hex\": \"0.2.5\",\n \"serialize-error\": \"^12.0.0\",\n \"urlpattern-polyfill\": \"^10.0.0\",\n \"webdriver\": \"9.23.3\"\n },\n \"engines\": {\n \"node\": \">=18.20.0\"\n },\n \"peerDependencies\": {\n \"puppeteer-core\": \">=22.x || <=24.x\"\n },\n \"peerDependenciesMeta\": {\n \"puppeteer-core\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/webdriverio/node_modules/@types/node\": {\n \"version\": \"20.19.30\",\n \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-20.19.30.tgz\",\n \"integrity\": \"sha512-WJtwWJu7UdlvzEAUm484QNg5eAoq5QR08KDNx7g45Usrs2NtOPiX8ugDqmKdXkyL03rBqU5dYNYVQetEpBHq2g==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"undici-types\": \"~6.21.0\"\n }\n },\n \"node_modules/webdriverio/node_modules/is-plain-obj\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz\",\n \"integrity\": \"sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/whatwg-encoding\": {\n \"version\": \"3.1.1\",\n \"resolved\": \"https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz\",\n \"integrity\": \"sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"iconv-lite\": \"0.6.3\"\n },\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/whatwg-mimetype\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz\",\n \"integrity\": \"sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n }\n },\n \"node_modules/which\": {\n \"version\": \"2.0.2\",\n \"resolved\": \"https://registry.npmjs.org/which/-/which-2.0.2.tgz\",\n \"integrity\": \"sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"isexe\": \"^2.0.0\"\n },\n \"bin\": {\n \"node-which\": \"bin/node-which\"\n },\n \"engines\": {\n \"node\": \">= 8\"\n }\n },\n \"node_modules/which-typed-array\": {\n \"version\": \"1.1.19\",\n \"resolved\": \"https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz\",\n \"integrity\": \"sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"available-typed-arrays\": \"^1.0.7\",\n \"call-bind\": \"^1.0.8\",\n \"call-bound\": \"^1.0.4\",\n \"for-each\": \"^0.3.5\",\n \"get-proto\": \"^1.0.1\",\n \"gopd\": \"^1.2.0\",\n \"has-tostringtag\": \"^1.0.2\"\n },\n \"engines\": {\n \"node\": \">= 0.4\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/ljharb\"\n }\n },\n \"node_modules/wide-align\": {\n \"version\": \"1.1.5\",\n \"resolved\": \"https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz\",\n \"integrity\": \"sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"string-width\": \"^1.0.2 || 2 || 3 || 4\"\n }\n },\n \"node_modules/winston\": {\n \"version\": \"3.19.0\",\n \"resolved\": \"https://registry.npmjs.org/winston/-/winston-3.19.0.tgz\",\n \"integrity\": \"sha512-LZNJgPzfKR+/J3cHkxcpHKpKKvGfDZVPS4hfJCc4cCG0CgYzvlD6yE/S3CIL/Yt91ak327YCpiF/0MyeZHEHKA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@colors/colors\": \"^1.6.0\",\n \"@dabh/diagnostics\": \"^2.0.8\",\n \"async\": \"^3.2.3\",\n \"is-stream\": \"^2.0.0\",\n \"logform\": \"^2.7.0\",\n \"one-time\": \"^1.0.0\",\n \"readable-stream\": \"^3.4.0\",\n \"safe-stable-stringify\": \"^2.3.1\",\n \"stack-trace\": \"0.0.x\",\n \"triple-beam\": \"^1.3.0\",\n \"winston-transport\": \"^4.9.0\"\n },\n \"engines\": {\n \"node\": \">= 12.0.0\"\n }\n },\n \"node_modules/winston-transport\": {\n \"version\": \"4.9.0\",\n \"resolved\": \"https://registry.npmjs.org/winston-transport/-/winston-transport-4.9.0.tgz\",\n \"integrity\": \"sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"logform\": \"^2.7.0\",\n \"readable-stream\": \"^3.6.2\",\n \"triple-beam\": \"^1.3.0\"\n },\n \"engines\": {\n \"node\": \">= 12.0.0\"\n }\n },\n \"node_modules/wipe-node-cache\": {\n \"version\": \"2.1.2\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/wipe-webpack-cache\": {\n \"version\": \"2.1.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"wipe-node-cache\": \"^2.1.0\"\n }\n },\n \"node_modules/wordwrap\": {\n \"version\": \"1.0.0\",\n \"resolved\": \"https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz\",\n \"integrity\": \"sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==\",\n \"dev\": true,\n \"license\": \"MIT\"\n },\n \"node_modules/workerpool\": {\n \"version\": \"9.3.2\",\n \"resolved\": \"https://registry.npmjs.org/workerpool/-/workerpool-9.3.2.tgz\",\n \"integrity\": \"sha512-Xz4Nm9c+LiBHhDR5bDLnNzmj6+5F+cyEAWPMkbs2awq/dYazR/efelZzUAjB/y3kNHL+uzkHvxVVpaOfGCPV7A==\",\n \"license\": \"Apache-2.0\"\n },\n \"node_modules/wrap-ansi\": {\n \"version\": \"7.0.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^4.0.0\",\n \"string-width\": \"^4.1.0\",\n \"strip-ansi\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/wrap-ansi?sponsor=1\"\n }\n },\n \"node_modules/wrap-ansi-cjs\": {\n \"name\": \"wrap-ansi\",\n \"version\": \"7.0.0\",\n \"resolved\": \"https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz\",\n \"integrity\": \"sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==\",\n \"dependencies\": {\n \"ansi-styles\": \"^4.0.0\",\n \"string-width\": \"^4.1.0\",\n \"strip-ansi\": \"^6.0.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/wrap-ansi?sponsor=1\"\n }\n },\n \"node_modules/wrap-ansi-cjs/node_modules/ansi-styles\": {\n \"version\": \"4.3.0\",\n \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz\",\n \"integrity\": \"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==\",\n \"dependencies\": {\n \"color-convert\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/wrap-ansi-cjs/node_modules/color-convert\": {\n \"version\": \"2.0.1\",\n \"resolved\": \"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz\",\n \"integrity\": \"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==\",\n \"dependencies\": {\n \"color-name\": \"~1.1.4\"\n },\n \"engines\": {\n \"node\": \">=7.0.0\"\n }\n },\n \"node_modules/wrap-ansi-cjs/node_modules/color-name\": {\n \"version\": \"1.1.4\",\n \"resolved\": \"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz\",\n \"integrity\": \"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==\"\n },\n \"node_modules/wrap-ansi/node_modules/ansi-styles\": {\n \"version\": \"4.3.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-convert\": \"^2.0.1\"\n },\n \"engines\": {\n \"node\": \">=8\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"node_modules/wrap-ansi/node_modules/color-convert\": {\n \"version\": \"2.0.1\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"color-name\": \"~1.1.4\"\n },\n \"engines\": {\n \"node\": \">=7.0.0\"\n }\n },\n \"node_modules/wrap-ansi/node_modules/color-name\": {\n \"version\": \"1.1.4\",\n \"license\": \"MIT\"\n },\n \"node_modules/wrappy\": {\n \"version\": \"1.0.2\",\n \"license\": \"ISC\"\n },\n \"node_modules/write-file-atomic\": {\n \"version\": \"5.0.1\",\n \"resolved\": \"https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz\",\n \"integrity\": \"sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"imurmurhash\": \"^0.1.4\",\n \"signal-exit\": \"^4.0.1\"\n },\n \"engines\": {\n \"node\": \"^14.17.0 || ^16.13.0 || >=18.0.0\"\n }\n },\n \"node_modules/write-file-atomic/node_modules/signal-exit\": {\n \"version\": \"4.1.0\",\n \"resolved\": \"https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz\",\n \"integrity\": \"sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=14\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"node_modules/write-pkg\": {\n \"version\": \"4.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"sort-keys\": \"^2.0.0\",\n \"type-fest\": \"^0.4.1\",\n \"write-json-file\": \"^3.2.0\"\n },\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/write-pkg/node_modules/detect-indent\": {\n \"version\": \"5.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/write-pkg/node_modules/pify\": {\n \"version\": \"4.0.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/write-pkg/node_modules/sort-keys\": {\n \"version\": \"2.0.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"is-plain-obj\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=4\"\n }\n },\n \"node_modules/write-pkg/node_modules/type-fest\": {\n \"version\": \"0.4.1\",\n \"dev\": true,\n \"license\": \"(MIT OR CC0-1.0)\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/write-pkg/node_modules/write-file-atomic\": {\n \"version\": \"2.4.3\",\n \"dev\": true,\n \"license\": \"ISC\",\n \"dependencies\": {\n \"graceful-fs\": \"^4.1.11\",\n \"imurmurhash\": \"^0.1.4\",\n \"signal-exit\": \"^3.0.2\"\n }\n },\n \"node_modules/write-pkg/node_modules/write-json-file\": {\n \"version\": \"3.2.0\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"dependencies\": {\n \"detect-indent\": \"^5.0.0\",\n \"graceful-fs\": \"^4.1.15\",\n \"make-dir\": \"^2.1.0\",\n \"pify\": \"^4.0.1\",\n \"sort-keys\": \"^2.0.0\",\n \"write-file-atomic\": \"^2.4.2\"\n },\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/ws\": {\n \"version\": \"8.19.0\",\n \"resolved\": \"https://registry.npmjs.org/ws/-/ws-8.19.0.tgz\",\n \"integrity\": \"sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10.0.0\"\n },\n \"peerDependencies\": {\n \"bufferutil\": \"^4.0.1\",\n \"utf-8-validate\": \">=5.0.2\"\n },\n \"peerDependenciesMeta\": {\n \"bufferutil\": {\n \"optional\": true\n },\n \"utf-8-validate\": {\n \"optional\": true\n }\n }\n },\n \"node_modules/xmlbuilder\": {\n \"version\": \"15.1.1\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8.0\"\n }\n },\n \"node_modules/xpath\": {\n \"version\": \"0.0.34\",\n \"resolved\": \"https://registry.npmjs.org/xpath/-/xpath-0.0.34.tgz\",\n \"integrity\": \"sha512-FxF6+rkr1rNSQrhUNYrAFJpRXNzlDoMxeXN5qI84939ylEv3qqPFKa85Oxr6tDaJKqwW6KKyo2v26TSv3k6LeA==\",\n \"engines\": {\n \"node\": \">=0.6.0\"\n }\n },\n \"node_modules/xtend\": {\n \"version\": \"4.0.2\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=0.4\"\n }\n },\n \"node_modules/y18n\": {\n \"version\": \"5.0.8\",\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/yallist\": {\n \"version\": \"4.0.0\",\n \"dev\": true,\n \"license\": \"ISC\"\n },\n \"node_modules/yaml\": {\n \"version\": \"2.8.2\",\n \"resolved\": \"https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz\",\n \"integrity\": \"sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==\",\n \"license\": \"ISC\",\n \"bin\": {\n \"yaml\": \"bin.mjs\"\n },\n \"engines\": {\n \"node\": \">= 14.6\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/eemeli\"\n }\n },\n \"node_modules/yaml-js\": {\n \"version\": \"0.3.1\",\n \"dev\": true,\n \"license\": \"WTFPL\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/yargs\": {\n \"version\": \"17.7.2\",\n \"resolved\": \"https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz\",\n \"integrity\": \"sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"cliui\": \"^8.0.1\",\n \"escalade\": \"^3.1.1\",\n \"get-caller-file\": \"^2.0.5\",\n \"require-directory\": \"^2.1.1\",\n \"string-width\": \"^4.2.3\",\n \"y18n\": \"^5.0.5\",\n \"yargs-parser\": \"^21.1.1\"\n },\n \"engines\": {\n \"node\": \">=12\"\n }\n },\n \"node_modules/yargs-parser\": {\n \"version\": \"21.1.1\",\n \"resolved\": \"https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz\",\n \"integrity\": \"sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==\",\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=12\"\n }\n },\n \"node_modules/yargs-unparser\": {\n \"version\": \"2.0.0\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"camelcase\": \"^6.0.0\",\n \"decamelize\": \"^4.0.0\",\n \"flat\": \"^5.0.2\",\n \"is-plain-obj\": \"^2.1.0\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"node_modules/yargs-unparser/node_modules/camelcase\": {\n \"version\": \"6.3.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/yargs-unparser/node_modules/decamelize\": {\n \"version\": \"4.0.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/yargs-unparser/node_modules/is-plain-obj\": {\n \"version\": \"2.1.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=8\"\n }\n },\n \"node_modules/yauzl\": {\n \"version\": \"2.10.0\",\n \"resolved\": \"https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz\",\n \"integrity\": \"sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"buffer-crc32\": \"~0.2.3\",\n \"fd-slicer\": \"~1.1.0\"\n }\n },\n \"node_modules/yn\": {\n \"version\": \"3.1.1\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=6\"\n }\n },\n \"node_modules/yocto-queue\": {\n \"version\": \"0.1.0\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=10\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/yoctocolors\": {\n \"version\": \"2.1.2\",\n \"resolved\": \"https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.2.tgz\",\n \"integrity\": \"sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/yoctocolors-cjs\": {\n \"version\": \"2.1.3\",\n \"resolved\": \"https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz\",\n \"integrity\": \"sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==\",\n \"dev\": true,\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"node_modules/zip-stream\": {\n \"version\": \"6.0.1\",\n \"resolved\": \"https://registry.npmjs.org/zip-stream/-/zip-stream-6.0.1.tgz\",\n \"integrity\": \"sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==\",\n \"dependencies\": {\n \"archiver-utils\": \"^5.0.0\",\n \"compress-commons\": \"^6.0.2\",\n \"readable-stream\": \"^4.0.0\"\n },\n \"engines\": {\n \"node\": \">= 14\"\n }\n },\n \"node_modules/zip-stream/node_modules/buffer\": {\n \"version\": \"6.0.3\",\n \"resolved\": \"https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz\",\n \"integrity\": \"sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==\",\n \"funding\": [\n {\n \"type\": \"github\",\n \"url\": \"https://github.com/sponsors/feross\"\n },\n {\n \"type\": \"patreon\",\n \"url\": \"https://www.patreon.com/feross\"\n },\n {\n \"type\": \"consulting\",\n \"url\": \"https://feross.org/support\"\n }\n ],\n \"dependencies\": {\n \"base64-js\": \"^1.3.1\",\n \"ieee754\": \"^1.2.1\"\n }\n },\n \"node_modules/zip-stream/node_modules/readable-stream\": {\n \"version\": \"4.5.2\",\n \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz\",\n \"integrity\": \"sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==\",\n \"dependencies\": {\n \"abort-controller\": \"^3.0.0\",\n \"buffer\": \"^6.0.3\",\n \"events\": \"^3.3.0\",\n \"process\": \"^0.11.10\",\n \"string_decoder\": \"^1.3.0\"\n },\n \"engines\": {\n \"node\": \"^12.22.0 || ^14.17.0 || >=16.0.0\"\n }\n },\n \"node_modules/zod\": {\n \"version\": \"3.22.4\",\n \"resolved\": \"https://registry.npmjs.org/zod/-/zod-3.22.4.tgz\",\n \"integrity\": \"sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==\",\n \"dev\": true,\n \"funding\": {\n \"url\": \"https://github.com/sponsors/colinhacks\"\n }\n },\n \"node_modules/zod-validation-error\": {\n \"version\": \"2.1.0\",\n \"resolved\": \"https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-2.1.0.tgz\",\n \"integrity\": \"sha512-VJh93e2wb4c3tWtGgTa0OF/dTt/zoPCPzXq4V11ZjxmEAFaPi/Zss1xIZdEB5RD8GD00U0/iVXgqkF77RV7pdQ==\",\n \"dev\": true,\n \"engines\": {\n \"node\": \">=18.0.0\"\n },\n \"peerDependencies\": {\n \"zod\": \"^3.18.0\"\n }\n },\n \"packages/appium\": {\n \"version\": \"3.2.0\",\n \"hasInstallScript\": true,\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@appium/base-driver\": \"^10.2.0\",\n \"@appium/base-plugin\": \"^3.0.6\",\n \"@appium/docutils\": \"^2.2.1\",\n \"@appium/logger\": \"^2.0.4\",\n \"@appium/schema\": \"^1.0.1\",\n \"@appium/support\": \"^7.0.5\",\n \"@appium/types\": \"^1.2.0\",\n \"@sidvind/better-ajv-errors\": \"4.0.1\",\n \"ajv\": \"8.17.1\",\n \"ajv-formats\": \"3.0.1\",\n \"argparse\": \"2.0.1\",\n \"async-lock\": \"1.4.1\",\n \"axios\": \"1.13.4\",\n \"bluebird\": \"3.7.2\",\n \"lilconfig\": \"3.1.3\",\n \"lodash\": \"4.17.23\",\n \"lru-cache\": \"11.2.5\",\n \"ora\": \"5.4.1\",\n \"package-changed\": \"3.0.0\",\n \"resolve-from\": \"5.0.0\",\n \"semver\": \"7.7.3\",\n \"teen_process\": \"4.0.9\",\n \"type-fest\": \"5.4.3\",\n \"winston\": \"3.19.0\",\n \"ws\": \"8.19.0\",\n \"yaml\": \"2.8.2\"\n },\n \"bin\": {\n \"appium\": \"index.js\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n }\n },\n \"packages/appium/node_modules/lilconfig\": {\n \"version\": \"3.1.3\",\n \"resolved\": \"https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz\",\n \"integrity\": \"sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=14\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/antonk52\"\n }\n },\n \"packages/appium/node_modules/lru-cache\": {\n \"version\": \"11.2.5\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz\",\n \"integrity\": \"sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==\",\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"packages/appium/node_modules/semver\": {\n \"version\": \"7.7.3\",\n \"resolved\": \"https://registry.npmjs.org/semver/-/semver-7.7.3.tgz\",\n \"integrity\": \"sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==\",\n \"license\": \"ISC\",\n \"bin\": {\n \"semver\": \"bin/semver.js\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"packages/appium/node_modules/type-fest\": {\n \"version\": \"5.4.3\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-5.4.3.tgz\",\n \"integrity\": \"sha512-AXSAQJu79WGc79/3e9/CR77I/KQgeY1AhNvcShIH4PTcGYyC4xv6H4R4AUOwkPS5799KlVDAu8zExeCrkGquiA==\",\n \"license\": \"(MIT OR CC0-1.0)\",\n \"dependencies\": {\n \"tagged-tag\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/base-driver\": {\n \"name\": \"@appium/base-driver\",\n \"version\": \"10.2.0\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@appium/support\": \"^7.0.5\",\n \"@appium/types\": \"^1.2.0\",\n \"@colors/colors\": \"1.6.0\",\n \"async-lock\": \"1.4.1\",\n \"asyncbox\": \"6.1.0\",\n \"axios\": \"1.13.4\",\n \"bluebird\": \"3.7.2\",\n \"body-parser\": \"2.2.2\",\n \"express\": \"5.2.1\",\n \"fastest-levenshtein\": \"1.0.16\",\n \"http-status-codes\": \"2.3.0\",\n \"lodash\": \"4.17.23\",\n \"lru-cache\": \"11.2.5\",\n \"method-override\": \"3.0.0\",\n \"morgan\": \"1.10.1\",\n \"path-to-regexp\": \"8.3.0\",\n \"serve-favicon\": \"2.5.1\",\n \"type-fest\": \"5.4.3\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n },\n \"optionalDependencies\": {\n \"spdy\": \"4.0.2\"\n }\n },\n \"packages/base-driver/node_modules/lru-cache\": {\n \"version\": \"11.2.5\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz\",\n \"integrity\": \"sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==\",\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"packages/base-driver/node_modules/type-fest\": {\n \"version\": \"5.4.3\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-5.4.3.tgz\",\n \"integrity\": \"sha512-AXSAQJu79WGc79/3e9/CR77I/KQgeY1AhNvcShIH4PTcGYyC4xv6H4R4AUOwkPS5799KlVDAu8zExeCrkGquiA==\",\n \"license\": \"(MIT OR CC0-1.0)\",\n \"dependencies\": {\n \"tagged-tag\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/base-plugin\": {\n \"name\": \"@appium/base-plugin\",\n \"version\": \"3.0.6\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@appium/base-driver\": \"^10.2.0\",\n \"@appium/support\": \"^7.0.5\",\n \"@appium/types\": \"^1.2.0\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n }\n },\n \"packages/docutils\": {\n \"name\": \"@appium/docutils\",\n \"version\": \"2.2.1\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@appium/support\": \"^7.0.5\",\n \"consola\": \"3.4.2\",\n \"diff\": \"8.0.3\",\n \"lilconfig\": \"3.1.3\",\n \"lodash\": \"4.17.23\",\n \"package-directory\": \"8.2.0\",\n \"read-pkg\": \"10.0.0\",\n \"teen_process\": \"4.0.9\",\n \"type-fest\": \"5.4.3\",\n \"yaml\": \"2.8.2\",\n \"yargs\": \"18.0.0\",\n \"yargs-parser\": \"22.0.0\"\n },\n \"bin\": {\n \"appium-docs\": \"bin/appium-docs.js\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n }\n },\n \"packages/docutils/node_modules/ansi-regex\": {\n \"version\": \"6.1.0\",\n \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz\",\n \"integrity\": \"sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-regex?sponsor=1\"\n }\n },\n \"packages/docutils/node_modules/cliui\": {\n \"version\": \"9.0.1\",\n \"resolved\": \"https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz\",\n \"integrity\": \"sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"string-width\": \"^7.2.0\",\n \"strip-ansi\": \"^7.1.0\",\n \"wrap-ansi\": \"^9.0.0\"\n },\n \"engines\": {\n \"node\": \">=20\"\n }\n },\n \"packages/docutils/node_modules/diff\": {\n \"version\": \"8.0.3\",\n \"resolved\": \"https://registry.npmjs.org/diff/-/diff-8.0.3.tgz\",\n \"integrity\": \"sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==\",\n \"license\": \"BSD-3-Clause\",\n \"engines\": {\n \"node\": \">=0.3.1\"\n }\n },\n \"packages/docutils/node_modules/emoji-regex\": {\n \"version\": \"10.4.0\",\n \"resolved\": \"https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz\",\n \"integrity\": \"sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==\",\n \"license\": \"MIT\"\n },\n \"packages/docutils/node_modules/hosted-git-info\": {\n \"version\": \"9.0.2\",\n \"resolved\": \"https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz\",\n \"integrity\": \"sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"lru-cache\": \"^11.1.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"packages/docutils/node_modules/lilconfig\": {\n \"version\": \"3.1.3\",\n \"resolved\": \"https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz\",\n \"integrity\": \"sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=14\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/antonk52\"\n }\n },\n \"packages/docutils/node_modules/lru-cache\": {\n \"version\": \"11.2.4\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz\",\n \"integrity\": \"sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==\",\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"packages/docutils/node_modules/normalize-package-data\": {\n \"version\": \"8.0.0\",\n \"resolved\": \"https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-8.0.0.tgz\",\n \"integrity\": \"sha512-RWk+PI433eESQ7ounYxIp67CYuVsS1uYSonX3kA6ps/3LWfjVQa/ptEg6Y3T6uAMq1mWpX9PQ+qx+QaHpsc7gQ==\",\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"hosted-git-info\": \"^9.0.0\",\n \"semver\": \"^7.3.5\",\n \"validate-npm-package-license\": \"^3.0.4\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"packages/docutils/node_modules/parse-json\": {\n \"version\": \"8.3.0\",\n \"resolved\": \"https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz\",\n \"integrity\": \"sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@babel/code-frame\": \"^7.26.2\",\n \"index-to-position\": \"^1.1.0\",\n \"type-fest\": \"^4.39.1\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/docutils/node_modules/parse-json/node_modules/type-fest\": {\n \"version\": \"4.41.0\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz\",\n \"integrity\": \"sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==\",\n \"license\": \"(MIT OR CC0-1.0)\",\n \"engines\": {\n \"node\": \">=16\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/docutils/node_modules/read-pkg\": {\n \"version\": \"10.0.0\",\n \"resolved\": \"https://registry.npmjs.org/read-pkg/-/read-pkg-10.0.0.tgz\",\n \"integrity\": \"sha512-A70UlgfNdKI5NSvTTfHzLQj7NJRpJ4mT5tGafkllJ4wh71oYuGm/pzphHcmW4s35iox56KSK721AihodoXSc/A==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/normalize-package-data\": \"^2.4.4\",\n \"normalize-package-data\": \"^8.0.0\",\n \"parse-json\": \"^8.3.0\",\n \"type-fest\": \"^5.2.0\",\n \"unicorn-magic\": \"^0.3.0\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/docutils/node_modules/string-width\": {\n \"version\": \"7.2.0\",\n \"resolved\": \"https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz\",\n \"integrity\": \"sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"emoji-regex\": \"^10.3.0\",\n \"get-east-asian-width\": \"^1.0.0\",\n \"strip-ansi\": \"^7.1.0\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/docutils/node_modules/strip-ansi\": {\n \"version\": \"7.1.0\",\n \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz\",\n \"integrity\": \"sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-regex\": \"^6.0.1\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/strip-ansi?sponsor=1\"\n }\n },\n \"packages/docutils/node_modules/type-fest\": {\n \"version\": \"5.4.3\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-5.4.3.tgz\",\n \"integrity\": \"sha512-AXSAQJu79WGc79/3e9/CR77I/KQgeY1AhNvcShIH4PTcGYyC4xv6H4R4AUOwkPS5799KlVDAu8zExeCrkGquiA==\",\n \"license\": \"(MIT OR CC0-1.0)\",\n \"dependencies\": {\n \"tagged-tag\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/docutils/node_modules/wrap-ansi\": {\n \"version\": \"9.0.0\",\n \"resolved\": \"https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz\",\n \"integrity\": \"sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"ansi-styles\": \"^6.2.1\",\n \"string-width\": \"^7.0.0\",\n \"strip-ansi\": \"^7.1.0\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/wrap-ansi?sponsor=1\"\n }\n },\n \"packages/docutils/node_modules/wrap-ansi/node_modules/ansi-styles\": {\n \"version\": \"6.2.1\",\n \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz\",\n \"integrity\": \"sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=12\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/ansi-styles?sponsor=1\"\n }\n },\n \"packages/docutils/node_modules/yargs\": {\n \"version\": \"18.0.0\",\n \"resolved\": \"https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz\",\n \"integrity\": \"sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"cliui\": \"^9.0.1\",\n \"escalade\": \"^3.1.1\",\n \"get-caller-file\": \"^2.0.5\",\n \"string-width\": \"^7.2.0\",\n \"y18n\": \"^5.0.5\",\n \"yargs-parser\": \"^22.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=23\"\n }\n },\n \"packages/docutils/node_modules/yargs-parser\": {\n \"version\": \"22.0.0\",\n \"resolved\": \"https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz\",\n \"integrity\": \"sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==\",\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=23\"\n }\n },\n \"packages/driver-test-support\": {\n \"name\": \"@appium/driver-test-support\",\n \"version\": \"1.0.6\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"axios\": \"1.13.4\",\n \"bluebird\": \"3.7.2\",\n \"chai\": \"6.2.2\",\n \"chai-as-promised\": \"8.0.2\",\n \"get-port\": \"7.1.0\",\n \"lodash\": \"4.17.23\",\n \"sinon\": \"21.0.1\",\n \"type-fest\": \"5.4.3\"\n },\n \"devDependencies\": {\n \"@appium/types\": \"^1.2.0\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n },\n \"peerDependencies\": {\n \"appium\": \"^3.0.0-beta.0\",\n \"mocha\": \"*\"\n }\n },\n \"packages/driver-test-support/node_modules/type-fest\": {\n \"version\": \"5.4.3\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-5.4.3.tgz\",\n \"integrity\": \"sha512-AXSAQJu79WGc79/3e9/CR77I/KQgeY1AhNvcShIH4PTcGYyC4xv6H4R4AUOwkPS5799KlVDAu8zExeCrkGquiA==\",\n \"license\": \"(MIT OR CC0-1.0)\",\n \"dependencies\": {\n \"tagged-tag\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/eslint-config-appium-ts\": {\n \"name\": \"@appium/eslint-config-appium-ts\",\n \"version\": \"3.0.0\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@eslint/compat\": \"2.0.2\",\n \"@eslint/js\": \"9.39.2\",\n \"@stylistic/eslint-plugin\": \"5.7.1\",\n \"eslint-config-prettier\": \"10.1.8\",\n \"eslint-import-resolver-typescript\": \"4.4.4\",\n \"eslint-plugin-import-x\": \"4.16.1\",\n \"eslint-plugin-mocha\": \"11.2.0\",\n \"eslint-plugin-n\": \"17.23.2\",\n \"eslint-plugin-promise\": \"7.2.1\",\n \"eslint-plugin-unicorn\": \"62.0.0\",\n \"typescript-eslint\": \"8.54.0\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n },\n \"peerDependencies\": {\n \"eslint\": \"^9.0.0\"\n }\n },\n \"packages/execute-driver-plugin\": {\n \"name\": \"@appium/execute-driver-plugin\",\n \"version\": \"5.1.0\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"bluebird\": \"3.7.2\",\n \"lodash\": \"4.17.23\",\n \"webdriverio\": \"9.23.3\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n },\n \"peerDependencies\": {\n \"appium\": \"^3.0.0-beta.0\"\n }\n },\n \"packages/fake-driver\": {\n \"name\": \"@appium/fake-driver\",\n \"version\": \"6.0.2\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@xmldom/xmldom\": \"0.9.8\",\n \"bluebird\": \"3.7.2\",\n \"lodash\": \"4.17.23\",\n \"xpath\": \"0.0.34\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n },\n \"peerDependencies\": {\n \"appium\": \"^3.0.0-beta.0\"\n }\n },\n \"packages/fake-plugin\": {\n \"name\": \"@appium/fake-plugin\",\n \"version\": \"4.0.6\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@appium/base-plugin\": \"^3.0.6\",\n \"@appium/support\": \"^7.0.5\",\n \"bluebird\": \"3.7.2\",\n \"lodash\": \"4.17.23\"\n },\n \"devDependencies\": {\n \"@appium/types\": \"^1.2.0\",\n \"express\": \"5.2.1\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n },\n \"peerDependencies\": {\n \"appium\": \"^3.0.0-beta.0\"\n }\n },\n \"packages/images-plugin\": {\n \"name\": \"@appium/images-plugin\",\n \"version\": \"4.1.0\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@appium/opencv\": \"^4.1.0\",\n \"@appium/support\": \"^7.0.5\",\n \"lodash\": \"4.17.23\",\n \"lru-cache\": \"11.2.5\",\n \"sharp\": \"0.34.5\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n },\n \"peerDependencies\": {\n \"appium\": \"^3.0.0-beta.0\"\n }\n },\n \"packages/images-plugin/node_modules/lru-cache\": {\n \"version\": \"11.2.5\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz\",\n \"integrity\": \"sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==\",\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"packages/logger\": {\n \"name\": \"@appium/logger\",\n \"version\": \"2.0.4\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"console-control-strings\": \"1.1.0\",\n \"lodash\": \"4.17.23\",\n \"lru-cache\": \"11.2.5\",\n \"set-blocking\": \"2.0.0\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n }\n },\n \"packages/logger/node_modules/lru-cache\": {\n \"version\": \"11.2.5\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz\",\n \"integrity\": \"sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==\",\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"packages/opencv\": {\n \"name\": \"@appium/opencv\",\n \"version\": \"4.1.0\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"bluebird\": \"3.7.2\",\n \"lodash\": \"4.17.23\",\n \"opencv-bindings\": \"4.5.5\",\n \"sharp\": \"0.34.5\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n }\n },\n \"packages/plugin-test-support\": {\n \"name\": \"@appium/plugin-test-support\",\n \"version\": \"1.0.5\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"get-port\": \"7.1.0\",\n \"log-symbols\": \"7.0.1\",\n \"teen_process\": \"4.0.9\"\n },\n \"devDependencies\": {\n \"@appium/types\": \"^1.2.0\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n },\n \"peerDependencies\": {\n \"appium\": \"^3.0.0-beta.0\",\n \"mocha\": \"*\"\n }\n },\n \"packages/relaxed-caps-plugin\": {\n \"name\": \"@appium/relaxed-caps-plugin\",\n \"version\": \"2.0.2\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"lodash\": \"4.17.23\"\n },\n \"devDependencies\": {\n \"@appium/types\": \"^1.2.0\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n },\n \"peerDependencies\": {\n \"appium\": \"^3.0.0-beta.0\"\n }\n },\n \"packages/schema\": {\n \"name\": \"@appium/schema\",\n \"version\": \"1.0.1\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"json-schema\": \"0.4.0\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n }\n },\n \"packages/storage-plugin\": {\n \"name\": \"@appium/storage-plugin\",\n \"version\": \"1.0.5\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@appium/support\": \"^7.0.5\",\n \"async-lock\": \"1.4.1\",\n \"bluebird\": \"3.7.2\",\n \"lodash\": \"4.17.23\",\n \"lru-cache\": \"11.2.5\",\n \"rimraf\": \"6.1.2\",\n \"ws\": \"8.19.0\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n },\n \"peerDependencies\": {\n \"appium\": \"^3.0.0-beta.0\"\n }\n },\n \"packages/storage-plugin/node_modules/lru-cache\": {\n \"version\": \"11.2.5\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz\",\n \"integrity\": \"sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==\",\n \"license\": \"BlueOak-1.0.0\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"packages/strongbox\": {\n \"name\": \"@appium/strongbox\",\n \"version\": \"1.0.1\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"env-paths\": \"4.0.0\",\n \"slugify\": \"1.6.6\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n }\n },\n \"packages/strongbox/node_modules/env-paths\": {\n \"version\": \"4.0.0\",\n \"resolved\": \"https://registry.npmjs.org/env-paths/-/env-paths-4.0.0.tgz\",\n \"integrity\": \"sha512-pxP8eL2SwwaTRi/KHYwLYXinDs7gL3jxFcBYmEdYfZmZXbaVDvdppd0XBU8qVz03rDfKZMXg1omHCbsJjZrMsw==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"is-safe-filename\": \"^0.1.0\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/support\": {\n \"name\": \"@appium/support\",\n \"version\": \"7.0.5\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@appium/logger\": \"^2.0.4\",\n \"@appium/tsconfig\": \"^1.1.1\",\n \"@appium/types\": \"^1.2.0\",\n \"@colors/colors\": \"1.6.0\",\n \"archiver\": \"7.0.1\",\n \"axios\": \"1.13.4\",\n \"base64-stream\": \"1.0.0\",\n \"bluebird\": \"3.7.2\",\n \"bplist-creator\": \"0.1.1\",\n \"bplist-parser\": \"0.3.2\",\n \"form-data\": \"4.0.5\",\n \"get-stream\": \"9.0.1\",\n \"glob\": \"13.0.1\",\n \"jsftp\": \"2.1.3\",\n \"klaw\": \"4.1.0\",\n \"lockfile\": \"1.0.4\",\n \"lodash\": \"4.17.23\",\n \"log-symbols\": \"7.0.1\",\n \"moment\": \"2.30.1\",\n \"ncp\": \"2.0.0\",\n \"package-directory\": \"8.2.0\",\n \"plist\": \"3.1.0\",\n \"pluralize\": \"8.0.0\",\n \"read-pkg\": \"10.0.0\",\n \"resolve-from\": \"5.0.0\",\n \"sanitize-filename\": \"1.6.3\",\n \"semver\": \"7.7.3\",\n \"shell-quote\": \"1.8.3\",\n \"supports-color\": \"10.2.2\",\n \"teen_process\": \"4.0.9\",\n \"type-fest\": \"5.4.3\",\n \"uuid\": \"13.0.0\",\n \"which\": \"6.0.0\",\n \"yauzl\": \"3.2.0\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n },\n \"optionalDependencies\": {\n \"sharp\": \"0.34.5\"\n }\n },\n \"packages/support/node_modules/get-stream\": {\n \"version\": \"9.0.1\",\n \"resolved\": \"https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz\",\n \"integrity\": \"sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@sec-ant/readable-stream\": \"^0.4.1\",\n \"is-stream\": \"^4.0.1\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/support/node_modules/glob\": {\n \"version\": \"13.0.0\",\n \"resolved\": \"https://registry.npmjs.org/glob/-/glob-13.0.0.tgz\",\n \"integrity\": \"sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==\",\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"minimatch\": \"^10.1.1\",\n \"minipass\": \"^7.1.2\",\n \"path-scurry\": \"^2.0.0\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"packages/support/node_modules/hosted-git-info\": {\n \"version\": \"9.0.2\",\n \"resolved\": \"https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz\",\n \"integrity\": \"sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"lru-cache\": \"^11.1.0\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"packages/support/node_modules/is-stream\": {\n \"version\": \"4.0.1\",\n \"resolved\": \"https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz\",\n \"integrity\": \"sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/support/node_modules/isexe\": {\n \"version\": \"3.1.1\",\n \"resolved\": \"https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz\",\n \"integrity\": \"sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==\",\n \"engines\": {\n \"node\": \">=16\"\n }\n },\n \"packages/support/node_modules/lru-cache\": {\n \"version\": \"11.1.0\",\n \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz\",\n \"integrity\": \"sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==\",\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \"20 || >=22\"\n }\n },\n \"packages/support/node_modules/minimatch\": {\n \"version\": \"10.1.1\",\n \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz\",\n \"integrity\": \"sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==\",\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"@isaacs/brace-expansion\": \"^5.0.0\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"packages/support/node_modules/minipass\": {\n \"version\": \"7.1.2\",\n \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz\",\n \"integrity\": \"sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==\",\n \"license\": \"ISC\",\n \"engines\": {\n \"node\": \">=16 || 14 >=14.17\"\n }\n },\n \"packages/support/node_modules/normalize-package-data\": {\n \"version\": \"8.0.0\",\n \"resolved\": \"https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-8.0.0.tgz\",\n \"integrity\": \"sha512-RWk+PI433eESQ7ounYxIp67CYuVsS1uYSonX3kA6ps/3LWfjVQa/ptEg6Y3T6uAMq1mWpX9PQ+qx+QaHpsc7gQ==\",\n \"license\": \"BSD-2-Clause\",\n \"dependencies\": {\n \"hosted-git-info\": \"^9.0.0\",\n \"semver\": \"^7.3.5\",\n \"validate-npm-package-license\": \"^3.0.4\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"packages/support/node_modules/parse-json\": {\n \"version\": \"8.3.0\",\n \"resolved\": \"https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz\",\n \"integrity\": \"sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@babel/code-frame\": \"^7.26.2\",\n \"index-to-position\": \"^1.1.0\",\n \"type-fest\": \"^4.39.1\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/support/node_modules/parse-json/node_modules/type-fest\": {\n \"version\": \"4.41.0\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz\",\n \"integrity\": \"sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==\",\n \"license\": \"(MIT OR CC0-1.0)\",\n \"engines\": {\n \"node\": \">=16\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/support/node_modules/path-scurry\": {\n \"version\": \"2.0.0\",\n \"resolved\": \"https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz\",\n \"integrity\": \"sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==\",\n \"license\": \"BlueOak-1.0.0\",\n \"dependencies\": {\n \"lru-cache\": \"^11.0.0\",\n \"minipass\": \"^7.1.2\"\n },\n \"engines\": {\n \"node\": \"20 || >=22\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/isaacs\"\n }\n },\n \"packages/support/node_modules/read-pkg\": {\n \"version\": \"10.0.0\",\n \"resolved\": \"https://registry.npmjs.org/read-pkg/-/read-pkg-10.0.0.tgz\",\n \"integrity\": \"sha512-A70UlgfNdKI5NSvTTfHzLQj7NJRpJ4mT5tGafkllJ4wh71oYuGm/pzphHcmW4s35iox56KSK721AihodoXSc/A==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@types/normalize-package-data\": \"^2.4.4\",\n \"normalize-package-data\": \"^8.0.0\",\n \"parse-json\": \"^8.3.0\",\n \"type-fest\": \"^5.2.0\",\n \"unicorn-magic\": \"^0.3.0\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/support/node_modules/semver\": {\n \"version\": \"7.7.3\",\n \"resolved\": \"https://registry.npmjs.org/semver/-/semver-7.7.3.tgz\",\n \"integrity\": \"sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==\",\n \"license\": \"ISC\",\n \"bin\": {\n \"semver\": \"bin/semver.js\"\n },\n \"engines\": {\n \"node\": \">=10\"\n }\n },\n \"packages/support/node_modules/supports-color\": {\n \"version\": \"10.2.2\",\n \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz\",\n \"integrity\": \"sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"funding\": {\n \"url\": \"https://github.com/chalk/supports-color?sponsor=1\"\n }\n },\n \"packages/support/node_modules/type-fest\": {\n \"version\": \"5.4.3\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-5.4.3.tgz\",\n \"integrity\": \"sha512-AXSAQJu79WGc79/3e9/CR77I/KQgeY1AhNvcShIH4PTcGYyC4xv6H4R4AUOwkPS5799KlVDAu8zExeCrkGquiA==\",\n \"license\": \"(MIT OR CC0-1.0)\",\n \"dependencies\": {\n \"tagged-tag\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/support/node_modules/uuid\": {\n \"version\": \"13.0.0\",\n \"resolved\": \"https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz\",\n \"integrity\": \"sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==\",\n \"funding\": [\n \"https://github.com/sponsors/broofa\",\n \"https://github.com/sponsors/ctavan\"\n ],\n \"license\": \"MIT\",\n \"bin\": {\n \"uuid\": \"dist-node/bin/uuid\"\n }\n },\n \"packages/support/node_modules/which\": {\n \"version\": \"6.0.0\",\n \"resolved\": \"https://registry.npmjs.org/which/-/which-6.0.0.tgz\",\n \"integrity\": \"sha512-f+gEpIKMR9faW/JgAgPK1D7mekkFoqbmiwvNzuhsHetni20QSgzg9Vhn0g2JSJkkfehQnqdUAx7/e15qS1lPxg==\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"isexe\": \"^3.1.1\"\n },\n \"bin\": {\n \"node-which\": \"bin/which.js\"\n },\n \"engines\": {\n \"node\": \"^20.17.0 || >=22.9.0\"\n }\n },\n \"packages/support/node_modules/yauzl\": {\n \"version\": \"3.2.0\",\n \"resolved\": \"https://registry.npmjs.org/yauzl/-/yauzl-3.2.0.tgz\",\n \"integrity\": \"sha512-Ow9nuGZE+qp1u4JIPvg+uCiUr7xGQWdff7JQSk5VGYTAZMDe2q8lxJ10ygv10qmSj031Ty/6FNJpLO4o1Sgc+w==\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"buffer-crc32\": \"~0.2.3\",\n \"pend\": \"~1.2.0\"\n },\n \"engines\": {\n \"node\": \">=12\"\n }\n },\n \"packages/test-support\": {\n \"name\": \"@appium/test-support\",\n \"version\": \"4.0.5\",\n \"deprecated\": \"This module is deprecated. Use sinon directly instead (e.g., sinon.createSandbox() with Mocha hooks).\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@appium/support\": \"^7.0.5\",\n \"@colors/colors\": \"1.6.0\",\n \"bluebird\": \"3.7.2\",\n \"lodash\": \"4.17.23\",\n \"loud-rejection\": \"2.2.0\",\n \"sinon\": \"21.0.1\"\n },\n \"bin\": {\n \"android-emu-travis-post\": \"bin/android-emu-travis-post.sh\",\n \"android-emu-travis-pre\": \"bin/android-emu-travis-pre.sh\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n }\n },\n \"packages/tsconfig\": {\n \"name\": \"@appium/tsconfig\",\n \"version\": \"1.1.1\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@tsconfig/node20\": \"20.1.9\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n }\n },\n \"packages/types\": {\n \"name\": \"@appium/types\",\n \"version\": \"1.2.0\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@appium/logger\": \"^2.0.4\",\n \"@appium/schema\": \"^1.0.1\",\n \"@appium/tsconfig\": \"^1.1.1\",\n \"type-fest\": \"5.4.3\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n }\n },\n \"packages/types/node_modules/type-fest\": {\n \"version\": \"5.4.3\",\n \"resolved\": \"https://registry.npmjs.org/type-fest/-/type-fest-5.4.3.tgz\",\n \"integrity\": \"sha512-AXSAQJu79WGc79/3e9/CR77I/KQgeY1AhNvcShIH4PTcGYyC4xv6H4R4AUOwkPS5799KlVDAu8zExeCrkGquiA==\",\n \"license\": \"(MIT OR CC0-1.0)\",\n \"dependencies\": {\n \"tagged-tag\": \"^1.0.0\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"funding\": {\n \"url\": \"https://github.com/sponsors/sindresorhus\"\n }\n },\n \"packages/universal-xml-plugin\": {\n \"name\": \"@appium/universal-xml-plugin\",\n \"version\": \"2.0.4\",\n \"license\": \"Apache-2.0\",\n \"dependencies\": {\n \"@xmldom/xmldom\": \"0.9.8\",\n \"fast-xml-parser\": \"5.3.4\",\n \"lodash\": \"4.17.23\",\n \"xpath\": \"0.0.34\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n },\n \"peerDependencies\": {\n \"appium\": \"^3.0.0-beta.0\"\n }\n }\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: package.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"name\": \"appium-monorepo\",\n \"version\": \"0.0.0\",\n \"private\": true,\n \"description\": \"Automation for Apps.\",\n \"keywords\": [\n \"automation\",\n \"javascript\",\n \"selenium\",\n \"webdriver\",\n \"ios\",\n \"android\",\n \"firefoxos\",\n \"testing\"\n ],\n \"homepage\": \"https://appium.io\",\n \"bugs\": {\n \"url\": \"https://github.com/appium/appium/issues\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/appium/appium.git\"\n },\n \"license\": \"Apache-2.0\",\n \"author\": \"https://github.com/appium\",\n \"workspaces\": [\n \"packages/*\"\n ],\n \"scripts\": {\n \"build\": \"run-s build:*\",\n \"build:compile\": \"tsc -b\",\n \"build:workspaces\": \"lerna run build\",\n \"ci\": \"npm ci\",\n \"clean\": \"run-s clean:distfiles clean:workspaces\",\n \"clean:dangerously\": \"run-s clean:workspaces clean:force\",\n \"clean:deps\": \"lerna clean --yes\",\n \"clean:distfiles\": \"npx rimraf --glob \\\"./packages/*/build\\\" \\\"./packages/*/**/.tsconfig.tsbuildinfo\\\"; npx nx reset\",\n \"clean:interactive\": \"git clean -d -x -i\",\n \"clean:force\": \"git clean -d -x -f\",\n \"clean:workspaces\": \"lerna run clean || true\",\n \"crowdin-sync-docs-translations\": \"node ./scripts/crowdin-sync-docs-translations.mjs\",\n \"crowdin-update-docs\": \"node ./scripts/crowdin-update-docs-resources.mjs\",\n \"dev\": \"run-s build:compile \\\"build:workspaces\\\" \\\"build:compile -- --watch\\\"\",\n \"dev:docs\": \"npm run -w packages/appium dev:docs\",\n \"docs\": \"npm run -w packages/appium build:docs\",\n \"docs:preview\": \"npm run -w packages/appium build:docs:preview\",\n \"docs:publish\": \"npm run -w packages/appium publish:docs\",\n \"doctor\": \"node ./scripts/doctor-stub.mjs\",\n \"install-docs-deps\": \"npm run -w packages/appium install-docs-deps\",\n \"lint\": \"eslint .\",\n \"lint:ci\": \"eslint --quiet .\",\n \"lint:fix\": \"run-s \\\"lint -- --fix\\\"\",\n \"prepare\": \"run-p rebuild\",\n \"prepublishOnly\": \"run-s rebuild\",\n \"preversion\": \"run-s rebuild\",\n \"version\": \"run-s sync-pkgs stage-synced-pkgs\",\n \"rebuild\": \"run-s clean build\",\n \"reinstall\": \"run-s clean clean:deps ci\",\n \"reinstall:angry\": \"npm run clean:dangerously && npm ci\",\n \"release\": \"lerna publish\",\n \"stage-synced-pkgs\": \"git add -A packages/appium/README.md \\\"packages/*/package.json\\\"\",\n \"start\": \"appium\",\n \"sync-pkgs\": \"run-p sync-pkgs:*\",\n \"sync-pkgs:appium-readme\": \"sync-monorepo-packages --force --no-package-json --packages=packages/appium README.md\",\n \"sync-pkgs:common-fields:default\": \"sync-monorepo-packages --packages=\\\"!packages/logger\\\" --fields=author,license,bugs,homepage\",\n \"sync-pkgs:common-fields:logger\": \"sync-monorepo-packages --packages=\\\"packages/logger\\\" --fields=author,bugs,homepage\",\n \"sync-pkgs:keywords\": \"sync-monorepo-packages --field=keywords --packages=\\\"packages/*\\\" --packages=\\\"!packages/types\\\" --packages=\\\"!packages/eslint-config-appium-ts\\\" \",\n \"sync-pkgs:license\": \"sync-monorepo-packages --force --no-package-json --packages=\\\"!packages/logger\\\" LICENSE\",\n \"test\": \"run-s test:quick\",\n \"test:ci\": \"run-s test:smoke test:unit test:types test:e2e\",\n \"test:e2e\": \"lerna run test:e2e\",\n \"test:quick\": \"run-s lint test:unit test:types\",\n \"test:slow\": \"run-s test:quick test:smoke test:e2e\",\n \"test:smoke\": \"smoker --all test:smoke\",\n \"test:types\": \"lerna run test:types\",\n \"test:unit\": \"lerna run test\",\n \"upload\": \"gulp github-upload\",\n \"zip\": \"zip -qr ./appium.zip ./packages/appium\",\n \"zip-and-upload\": \"run-s zip upload\"\n },\n \"prettier\": {\n \"bracketSpacing\": false,\n \"printWidth\": 100,\n \"singleQuote\": true\n },\n \"devDependencies\": {\n \"@colors/colors\": \"1.6.0\",\n \"@eslint/js\": \"9.39.2\",\n \"@stylistic/eslint-plugin\": \"5.7.1\",\n \"@tsconfig/node20\": \"20.1.9\",\n \"@types/archiver\": \"7.0.0\",\n \"@types/argparse\": \"2.0.17\",\n \"@types/async-lock\": \"1.4.2\",\n \"@types/base64-stream\": \"1.0.5\",\n \"@types/bluebird\": \"3.5.42\",\n \"@types/chai\": \"5.2.3\",\n \"@types/chai-as-promised\": \"8.0.2\",\n \"@types/express\": \"5.0.6\",\n \"@types/jsftp\": \"2.1.5\",\n \"@types/json-schema\": \"7.0.15\",\n \"@types/klaw\": \"3.0.7\",\n \"@types/lockfile\": \"1.0.4\",\n \"@types/lodash\": \"4.17.23\",\n \"@types/method-override\": \"3.0.0\",\n \"@types/mocha\": \"10.0.10\",\n \"@types/mv\": \"2.1.4\",\n \"@types/ncp\": \"2.0.8\",\n \"@types/node\": \"24.10.10\",\n \"@types/pluralize\": \"0.0.33\",\n \"@types/semver\": \"7.7.1\",\n \"@types/serve-favicon\": \"2.5.7\",\n \"@types/shell-quote\": \"1.7.5\",\n \"@types/sinon\": \"21.0.0\",\n \"@types/sinon-chai\": \"4.0.0\",\n \"@types/which\": \"3.0.4\",\n \"@types/ws\": \"8.18.1\",\n \"@types/xmldom\": \"0.1.34\",\n \"@types/yargs\": \"17.0.35\",\n \"asyncbox\": \"6.1.0\",\n \"chai\": \"6.2.2\",\n \"chai-as-promised\": \"8.0.2\",\n \"conventional-changelog-conventionalcommits\": \"7.0.2\",\n \"cpy-cli\": \"7.0.0\",\n \"cross-env\": \"10.1.0\",\n \"eslint\": \"9.39.2\",\n \"eslint-config-prettier\": \"10.1.8\",\n \"eslint-import-resolver-typescript\": \"4.4.4\",\n \"eslint-plugin-import-x\": \"4.16.1\",\n \"eslint-plugin-mocha\": \"11.2.0\",\n \"eslint-plugin-n\": \"17.23.2\",\n \"eslint-plugin-promise\": \"7.2.1\",\n \"finalhandler\": \"2.1.1\",\n \"get-port\": \"7.1.0\",\n \"json-schema-to-typescript\": \"15.0.4\",\n \"lerna\": \"9.0.3\",\n \"log-symbols\": \"7.0.1\",\n \"midnight-smoker\": \"8.0.0\",\n \"mjpeg-consumer\": \"2.0.0\",\n \"mjpeg-server\": \"0.3.1\",\n \"mocha\": \"11.7.5\",\n \"npm-run-all2\": \"8.0.4\",\n \"prettier\": \"3.8.1\",\n \"rewiremock\": \"3.14.6\",\n \"rimraf\": \"6.1.2\",\n \"serve-static\": \"2.2.1\",\n \"sinon\": \"21.0.1\",\n \"sinon-chai\": \"4.0.1\",\n \"sync-monorepo-packages\": \"1.0.2\",\n \"teen_process\": \"4.0.9\",\n \"ts-node\": \"10.9.2\",\n \"tsd\": \"0.33.0\",\n \"typescript\": \"5.9.3\",\n \"typescript-eslint\": \"8.54.0\",\n \"webdriverio\": \"9.23.3\",\n \"ws\": \"8.19.0\",\n \"yaml-js\": \"0.3.1\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"overrides\": {\n \"@sidvind/better-ajv-errors\": {\n \"ajv\": \"8.17.1\"\n },\n \"ajv-formats\": {\n \"ajv\": \"8.17.1\"\n },\n \"http-cache-semantics\": \"4.2.0\"\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: triagers.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"repos\": [{\n \"user\": \"appium\",\n \"repo\": \"appium\",\n \"triagers\": [\"SrinivasanTarget\", \"jlipps\", \"vikramvi\"],\n \"autoLabels\": [\"NeedsTriage\"],\n \"validLabels\": [\"1.5-beta\",\"Android\",\"Bug\",\"Cannot Reproduce\",\"Documentation\",\"DriverIssue\",\"Enhancement\",\"GUI\",\"Hybrid Apps\",\"iOS\",\"Linux\",\"LogRequested\",\"Mac\",\"Mobile Chrome\",\"Mobile Safari\",\"NeedsTriage\",\"NoActivity\",\"NotABug\",\"OnGoing\",\"Question\",\"Real Devices\",\"ReproNeeded\",\"Robots\",\"SemVer:Breaking\",\"TechDebt\",\"ThirdpartyIssue\",\"Windows\"]\n }],\n \"bot\": \"triager\"\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: tsconfig.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"$schema\": \"https://json.schemastore.org/tsconfig\",\n \"extends\": \"@tsconfig/node20/tsconfig.json\",\n \"files\": [],\n \"ts-node\": {\n \"transpileOnly\": true\n },\n \"compilerOptions\": {\n \"allowJs\": true,\n \"allowSyntheticDefaultImports\": true,\n \"resolveJsonModule\": true\n },\n \"references\": [\n {\n \"path\": \"packages/appium\"\n },\n {\n \"path\": \"packages/driver-test-support\"\n },\n {\n \"path\": \"packages/plugin-test-support\"\n },\n {\n \"path\": \"packages/schema\"\n },\n {\n \"path\": \"packages/types\"\n },\n {\n \"path\": \"packages/support\"\n },\n {\n \"path\": \"packages/base-driver\"\n },\n {\n \"path\": \"packages/base-plugin\"\n },\n {\n \"path\": \"packages/test-support\"\n },\n {\n \"path\": \"packages/fake-plugin\"\n },\n {\n \"path\": \"packages/images-plugin\"\n },\n {\n \"path\": \"packages/relaxed-caps-plugin\"\n },\n {\n \"path\": \"packages/universal-xml-plugin\"\n },\n {\n \"path\": \"packages/opencv\"\n },\n {\n \"path\": \"packages/execute-driver-plugin\"\n },\n {\n \"path\": \"packages/docutils\"\n },\n {\n \"path\": \"packages/fake-driver\"\n },\n {\n \"path\": \"packages/strongbox\"\n },\n {\n \"path\": \"packages/logger\"\n },\n {\n \"path\": \"packages/storage-plugin\"\n }\n ]\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: .vscode/extensions.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"recommendations\": [\n \"stateful.runme\"\n ]\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: .vscode/launch.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"configurations\": [\n {\n \"args\": [\n \"--log-level=debug\"\n ],\n \"console\": \"integratedTerminal\",\n \"cwd\": \"${workspaceFolder}\",\n \"env\": {\n \"_FORCE_LOGS\": \"1\"\n },\n \"internalConsoleOptions\": \"openOnSessionStart\",\n \"name\": \"Run Appium\",\n \"program\": \"${workspaceFolder}/node_modules/.bin/appium\",\n \"request\": \"launch\",\n \"skipFiles\": [\n \"/**\"\n ],\n \"sourceMaps\": true,\n \"type\": \"node\"\n },\n {\n \"args\": [\n \"--colors\",\n \"--no-timeout\",\n \"${file}\"\n ],\n \"autoAttachChildProcesses\": true,\n \"console\": \"integratedTerminal\",\n \"cwd\": \"${workspaceFolder}\",\n \"internalConsoleOptions\": \"openOnSessionStart\",\n \"name\": \"Test Current File w/ Mocha\",\n \"program\": \"${workspaceFolder}/node_modules/.bin/mocha\",\n \"request\": \"launch\",\n \"runtimeArgs\": [\n \"--require\",\n \"ts-node/register\"\n ],\n \"skipFiles\": [\n \"/**\",\n \"**/node_modules/mocha/**\",\n \"**/node_modules/lodash/**\",\n \"**/node_modules/ts-node/**\"\n ],\n \"sourceMaps\": true,\n \"type\": \"node\"\n }\n ],\n \"version\": \"0.2.0\"\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: .vscode/tasks.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"version\": \"2.0.0\",\n \"tasks\": [\n {\n \"type\": \"npm\",\n \"script\": \"dev\",\n \"group\": {\n \"kind\": \"build\",\n \"isDefault\": true\n },\n \"problemMatcher\": [\n \"$tsc-watch\"\n ],\n \"label\": \"npm: dev\",\n \"detail\": \"npm run dev\",\n \"isBackground\": true\n }\n ]\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: docs/README.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n# Docs moved\n\nThe old Appium 1.x docs used to be in this directory. Now, they are available only on the [1.x\nbranch](https://github.com/appium/appium/tree/1.x/docs).\n\nCurrent Appium docs are located in [packages/appium/docs](../packages/appium/docs) in this repo.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: docs/payout.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nThis documentation is a note for the opencollective payout.\n\n1. Select `Submit expense`\n\n\"Screenshot\n\n2. Select `Appium` in `Who is paying`\n3. Select `Invite someone` and fill in a user name to pay payouts for\n4. Select `Invoice` for `Select the type of expense`\n5. Check the `I have read and understood the instructions and conditions` agreement\n6. Select `No, generate an invoice for me`\n - Keep blank for the `Additional invoice information (optional)`\n8. Fill in the description in the `Item Description`, date and amount for `Expense Items`\n - for TCs:\n - ` contribution as a TC https://github.com/appium/appium/blob/master/GOVERNANCE.md#the-technical-committee and maintaining Appium project itself (development, review etc)`\n - i.e. `2024-07 contribution as a TC https://github.com/appium/appium/blob/master/GOVERNANCE.md#the-technical-committee and maintaining Appium project itself (development, review etc)`\n - for individuals\n - `PR contribution: ` for PRs. `Community contribution in Q&A forum at https://discuss.appium.io/` for appium forums\n - E.g.\n - `PR contribution: https://github.com/appium/dotnet-client/pull/810, https://github.com/appium/dotnet-client/pull/808`\n - `PR contribution: https://github.com/appium/java-client/pull/2206, https://github.com/appium/java-client/pull/2203 and a few PRs`\n - `Community contribution in Q&A forum at https://discuss.appium.io/`\n - Translations\n - e.g.\n - `Translation contributions for https://crowdin.com/project/appium-documentation`\n - For Date\n - today\n - For Amount\n - Put the payment amount in USD\n9. Fill in title in `Title` in `Additional details`\n - Expense title: ` contribution payout`\n - e.g. `2024-07 contribution payout`\n10. Submit expense\n11. Update the expense url in our payout sheet\n12. Approve each expense after getting a response for each expense\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/CHANGELOG.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n# Change Log\n\nAll notable changes to this project will be documented in this file.\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n## [3.2.0](https://github.com/appium/appium/compare/appium@3.1.2...appium@3.2.0) (2026-01-26)\n\n\n### Features\n\n* **appium:** Add repository links to verbose extensions list ([#21813](https://github.com/appium/appium/issues/21813)) ([ce91686](https://github.com/appium/appium/commit/ce91686852b0baab5f46990f5d40db4747922924))\n\n\n### Bug Fixes\n\n* **appium:** appium symlink behavior across drivers/plugins installations ([#21837](https://github.com/appium/appium/issues/21837)) ([529aeb4](https://github.com/appium/appium/commit/529aeb48f10419e21555cec05835ff07bb0e2e51))\n* apply npm run lint:fix ([#21867](https://github.com/appium/appium/issues/21867)) ([5e28714](https://github.com/appium/appium/commit/5e28714442cf59ee35b085e01e82c3f5483891fd))\n* **docs:** add missing verbose flag for CLI list command ([#21814](https://github.com/appium/appium/issues/21814)) ([dcfaa88](https://github.com/appium/appium/commit/dcfaa88830f6a5c608c92f5ae72445e065261d38))\n\n\n\n## [3.1.2](https://github.com/appium/appium/compare/appium@3.1.1...appium@3.1.2) (2025-12-04)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [3.1.1](https://github.com/appium/appium/compare/appium@3.1.0...appium@3.1.1) (2025-11-12)\n\n\n### Bug Fixes\n\n* **appium:** Inject symlinks for all installed extensions ([#21664](https://github.com/appium/appium/issues/21664)) ([8f5aac3](https://github.com/appium/appium/commit/8f5aac3722c9572d61f7e6bef20fe43bb14e0674))\n\n\n\n## [3.1.0](https://github.com/appium/appium/compare/appium@3.0.2...appium@3.1.0) (2025-10-08)\n\n\n### Features\n\n* add 21 WebDriver extension endpoints ([#21577](https://github.com/appium/appium/issues/21577)) ([7f906fc](https://github.com/appium/appium/commit/7f906fcf9a0dd84f348b0b3a79da818281f21835))\n* add inspector to plugins installed via `appium setup` ([#21578](https://github.com/appium/appium/issues/21578)) ([1753dcd](https://github.com/appium/appium/commit/1753dcd5e9f4ee3a9bd869f2e846a8a1c68b6970))\n* add W3C printPage endpoint ([#21576](https://github.com/appium/appium/issues/21576)) ([cbea4f2](https://github.com/appium/appium/commit/cbea4f2e97d2d291bd67fd98359b37caab1b21fa))\n\n\n### Bug Fixes\n\n* **appium:** fix base path handling in bidi ([#21611](https://github.com/appium/appium/issues/21611)) ([dad0757](https://github.com/appium/appium/commit/dad07575c9d754751160a53e0fb8053bbddac75b))\n\n\n\n## [3.0.2](https://github.com/appium/appium/compare/appium@3.0.1...appium@3.0.2) (2025-09-09)\n\n\n### Bug Fixes\n\n* **appium:** Return a non-zero exit code if an extension script execution fails ([#21563](https://github.com/appium/appium/issues/21563)) ([5d73a4f](https://github.com/appium/appium/commit/5d73a4fb49a39bd4b81f51763e62f4e52b650f06))\n\n\n\n## [3.0.1](https://github.com/appium/appium/compare/appium@3.0.0...appium@3.0.1) (2025-08-20)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [3.0.0](https://github.com/appium/appium/compare/appium@3.0.0-rc.2...appium@3.0.0) (2025-08-18)\n\n### Appium 3 Is Here! \ud83d\ude80\n\n[See the blog post](https://appium.io/docs/en/latest/blog/2025/08/07/-appium-3/)\nand [the migration guide](https://appium.io/docs/en/latest/guides/migrating-2-to-3/) for more details.\n\n\n\n\n\n## [3.0.0-rc.2](https://github.com/appium/appium/compare/appium@2.16.2...appium@3.0.0-rc.2) (2025-08-14)\n\n\n### \u26a0 BREAKING CHANGES\n\n* set minimum Node.js version to v20.19.0 (#21394)\n\n### Features\n\n* **appium:** add inspector in preset plugin ([#21114](https://github.com/appium/appium/issues/21114)) ([fdb5c7f](https://github.com/appium/appium/commit/fdb5c7fc4a4ec4078195f879d6c1e2e0e3397419))\n* **base-driver:** Make extension name prefix mandatory ([#21110](https://github.com/appium/appium/issues/21110)) ([9402291](https://github.com/appium/appium/commit/9402291f1c634bcb376ff69aef7a7b4d0628cbd4))\n* **base-driver:** Migrate errors to typescript ([#21157](https://github.com/appium/appium/issues/21157)) ([d904726](https://github.com/appium/appium/commit/d904726d56353365612c6e0a7dfdb209cc34132b))\n* **base-driver:** Remove dependency to validate.js ([#21175](https://github.com/appium/appium/issues/21175)) ([661c5d0](https://github.com/appium/appium/commit/661c5d0bd31f65690fe61c0e396833251c5bae84))\n* **base-driver:** Remove deprecated routes ([#21134](https://github.com/appium/appium/issues/21134)) ([4716f40](https://github.com/appium/appium/commit/4716f40226da0a1743f4e570a99c67ce9d581b50))\n\n\n### Bug Fixes\n\n* **appium:** Add appium module symlink while installing extensions ([#21389](https://github.com/appium/appium/issues/21389)) ([1859ea1](https://github.com/appium/appium/commit/1859ea1c3efc37a3537f55bbfe06d6532b02d7e9))\n* use v3 syntax for winston ([#21363](https://github.com/appium/appium/issues/21363)) ([2c94133](https://github.com/appium/appium/commit/2c94133390d04f6160044a1c8bbb31f7925fced8))\n\n\n### Miscellaneous Chores\n\n* set minimum Node.js version to v20.19.0 ([#21394](https://github.com/appium/appium/issues/21394)) ([37e22c4](https://github.com/appium/appium/commit/37e22c4f9c9920cea3f340841ab1b7c60e3147e9))\n\n\n\n## [2.19.0](https://github.com/appium/appium/compare/appium@2.18.0...appium@2.19.0) (2025-06-01)\n\n\n### Features\n\n* **appium:** implement GET /appium/sessions and deprecate GET /sessions ([#21233](https://github.com/appium/appium/issues/21233)) ([5f6bdfc](https://github.com/appium/appium/commit/5f6bdfc5dfbddab1782a4a86b450c9654ddbd65f))\n\n\n\n## [2.18.0](https://github.com/appium/appium/compare/appium@2.17.1...appium@2.18.0) (2025-04-25)\n\n\n### Features\n\n* **base-driver:** Accept `x-request-id` as override to generated requestId in `handleLogContext` ([#21154](https://github.com/appium/appium/issues/21154)) ([a82476f](https://github.com/appium/appium/commit/a82476f2fcb4aa3a3c4660d96fdd261a98afa4af))\n\n\n\n## [2.17.1](https://github.com/appium/appium/compare/appium@2.17.0...appium@2.17.1) (2025-03-17)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.17.0](https://github.com/appium/appium/compare/appium@2.16.2...appium@2.17.0) (2025-03-11)\n\n\n### Features\n\n* **images-plugin:** supports image elements included in actions. ([#21055](https://github.com/appium/appium/issues/21055)) ([0c50504](https://github.com/appium/appium/commit/0c50504266eb5553dafd08bfb6161f643357114f))\n\n\n\n## [2.16.2](https://github.com/appium/appium/compare/appium@2.16.1...appium@2.16.2) (2025-02-20)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.16.1](https://github.com/appium/appium/compare/appium@2.16.0...appium@2.16.1) (2025-02-20)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.16.0](https://github.com/appium/appium/compare/appium@2.15.0...appium@2.16.0) (2025-02-19)\n\n\n### Features\n\n* Add /appium/extensions API to list available extensions ([#20931](https://github.com/appium/appium/issues/20931)) ([a6b6077](https://github.com/appium/appium/commit/a6b6077ecd0749598f52d9f29b3220f47d7ad636))\n* add /appium/sessions, /session/:sessionId/appium/capabilities and deprecated marks will be removed in the future ([#20936](https://github.com/appium/appium/issues/20936)) ([eeb59ca](https://github.com/appium/appium/commit/eeb59cab071fdafa44f091e9d0e2676414c85c5d))\n* Add BiDi commands to the listCommands API output ([#20925](https://github.com/appium/appium/issues/20925)) ([2635dcb](https://github.com/appium/appium/commit/2635dcb457be2dc02dfbee5ad4c6ab132f5af8de))\n* **appium:** Add a command line parameter to configure HTTP server request timeout ([#21003](https://github.com/appium/appium/issues/21003)) ([eb1b156](https://github.com/appium/appium/commit/eb1b156146bc338da9c6ded5a2c5beab22ac0ed8))\n* **base-driver:** Add an API to list commands ([#20914](https://github.com/appium/appium/issues/20914)) ([059f1cb](https://github.com/appium/appium/commit/059f1cb698ccdbc58494af9303c5bf264a1893d9))\n\n\n### Bug Fixes\n\n* **appium:** add await for async function ([#20974](https://github.com/appium/appium/issues/20974)) ([21e2aab](https://github.com/appium/appium/commit/21e2aabc391fefe0dff8e29fe1cd6be908d5b3d0))\n* **appium:** Wait for upstream web socket to open before sending data to it ([#20953](https://github.com/appium/appium/issues/20953)) ([3cfe3af](https://github.com/appium/appium/commit/3cfe3af1c8d88c8ec79d2d89c7e76d697205c86b))\n* **execute-driver-plugin:** update dependency webdriverio to v9.5.3 ([#20895](https://github.com/appium/appium/issues/20895)) ([8741474](https://github.com/appium/appium/commit/874147449a26bbec03b08e7e95fb9e4c6b5881af))\n* **execute-driver-plugin:** update dependency webdriverio to v9.5.4 ([#20898](https://github.com/appium/appium/issues/20898)) ([7f91d5c](https://github.com/appium/appium/commit/7f91d5cba850100124088d774ba8704e3765863f))\n* **execute-driver-plugin:** update dependency webdriverio to v9.5.7 ([#20903](https://github.com/appium/appium/issues/20903)) ([c60fdc8](https://github.com/appium/appium/commit/c60fdc8d847b4aeed2d8b8307180194ee32e5ca9))\n* **execute-driver-plugin:** update dependency webdriverio to v9.7.0 ([#20930](https://github.com/appium/appium/issues/20930)) ([5780982](https://github.com/appium/appium/commit/57809826a410b71dca155f59e081f77dcaf671ed))\n* **execute-driver-plugin:** update dependency webdriverio to v9.7.1 ([#20934](https://github.com/appium/appium/issues/20934)) ([50fa5d6](https://github.com/appium/appium/commit/50fa5d670bd967200a78e5b4b8a54d5c9b85901b))\n* **execute-driver-plugin:** update dependency webdriverio to v9.7.2 ([#20944](https://github.com/appium/appium/issues/20944)) ([f5e0819](https://github.com/appium/appium/commit/f5e0819f505b55421b7d260f69a41ae980390a91))\n* **execute-driver-plugin:** update dependency webdriverio to v9.8.0 ([#20964](https://github.com/appium/appium/issues/20964)) ([ce32226](https://github.com/appium/appium/commit/ce32226cb57fb3f07bf4862dbbfcba227ff1230c))\n* **execute-driver-plugin:** update dependency webdriverio to v9.9.0 ([#20994](https://github.com/appium/appium/issues/20994)) ([b3c877f](https://github.com/appium/appium/commit/b3c877f66ddf3ccf7a25ca1f7a3952c660bd7dda))\n* **execute-driver-plugin:** update dependency webdriverio to v9.9.1 ([#20996](https://github.com/appium/appium/issues/20996)) ([c6a080f](https://github.com/appium/appium/commit/c6a080f7ade03a49a274ce6fbc84629406fdc2a7))\n* **execute-driver-plugin:** update dependency webdriverio to v9.9.3 ([#21005](https://github.com/appium/appium/issues/21005)) ([686a630](https://github.com/appium/appium/commit/686a630fbdf525db16b42fdfc1bbdaf6426b41d0))\n* **support:** update dependency semver to v7.7.0 ([#20948](https://github.com/appium/appium/issues/20948)) ([81ebd75](https://github.com/appium/appium/commit/81ebd758cb8a87d388124036e5158207041a6b2f))\n* **support:** update dependency semver to v7.7.1 ([#20961](https://github.com/appium/appium/issues/20961)) ([4c08944](https://github.com/appium/appium/commit/4c089440e655fbe3c8da919f8f625b7d7179f00a))\n* **types:** update dependency type-fest to v4.32.0 ([#20900](https://github.com/appium/appium/issues/20900)) ([fbc8530](https://github.com/appium/appium/commit/fbc85308a5398e7c9966792da713e60e47ed7f00))\n* **types:** update dependency type-fest to v4.33.0 ([#20923](https://github.com/appium/appium/issues/20923)) ([2409d32](https://github.com/appium/appium/commit/2409d3223a77aa7e84e0cb05a70be3bfa0c69157))\n* **types:** update dependency type-fest to v4.34.1 ([#20971](https://github.com/appium/appium/issues/20971)) ([0a7490e](https://github.com/appium/appium/commit/0a7490ed53ccfa9243df779e74bafadfc8415c87))\n* **types:** update dependency type-fest to v4.35.0 ([#20999](https://github.com/appium/appium/issues/20999)) ([3dc7336](https://github.com/appium/appium/commit/3dc7336b5fce10b9c1b095cd7a8a1841dbc3de12))\n\n\n\n## [2.15.0](https://github.com/appium/appium/compare/appium@2.14.1...appium@2.15.0) (2025-01-08)\n\n\n### Features\n\n* **appium,base-driver,base-plugin:** allow plugins to define custom bidi commands and emit bidi events ([#20876](https://github.com/appium/appium/issues/20876)) ([8df1c21](https://github.com/appium/appium/commit/8df1c217a15d30300c04b9f59cdbdffa70325828))\n\n\n\n## [2.14.1](https://github.com/appium/appium/compare/appium@2.14.0...appium@2.14.1) (2025-01-06)\n\n\n### Bug Fixes\n\n* **appium:** Do not update BiDi commands for drivers which don't support it ([#20879](https://github.com/appium/appium/issues/20879)) ([13d8b03](https://github.com/appium/appium/commit/13d8b03cc185c5f4e0631002614981ee6f86fab4))\n* **execute-driver-plugin:** update dependency webdriverio to v9.5.1 ([#20875](https://github.com/appium/appium/issues/20875)) ([93e4288](https://github.com/appium/appium/commit/93e4288253c07a844e6e10f0dd040b1a40eb92ff))\n* **support:** update dependency teen_process to v2.2.3 ([#20882](https://github.com/appium/appium/issues/20882)) ([488e5de](https://github.com/appium/appium/commit/488e5dea82d3c525acf483952570e32f319f3722))\n\n\n\n## [2.14.0](https://github.com/appium/appium/compare/appium@2.13.1...appium@2.14.0) (2025-01-02)\n\n\n### Features\n\n* **appium:** Add session.status BiDi command ([#20839](https://github.com/appium/appium/issues/20839)) ([64e768e](https://github.com/appium/appium/commit/64e768efb7bebd6b5a24d55206d1cad00812777c))\n* **appium:** allow drivers to define their own bidi commands ([#20828](https://github.com/appium/appium/issues/20828)) ([a917ec6](https://github.com/appium/appium/commit/a917ec6ceda2166fb3dcbff6b2768f700db9e103))\n* **appium:** Update entry point resolution logic for ESM extensions ([#20866](https://github.com/appium/appium/issues/20866)) ([bbfc040](https://github.com/appium/appium/commit/bbfc04026f0629d89d8b313616b852896481d08d))\n\n\n### Bug Fixes\n\n* **appium:** update CLI help messages ([#20825](https://github.com/appium/appium/issues/20825)) ([04e2d11](https://github.com/appium/appium/commit/04e2d1154b67c34607ab7a1e2a44b9b4bcfb998f))\n* **docutils:** update dependency yaml to v2.7.0 ([#20870](https://github.com/appium/appium/issues/20870)) ([389a3e8](https://github.com/appium/appium/commit/389a3e83ac0069504338f7182a4e938cd391de7e))\n* **execute-driver-plugin:** update dependency webdriverio to v9.4.5 ([#20847](https://github.com/appium/appium/issues/20847)) ([4474412](https://github.com/appium/appium/commit/4474412a60a82556f43fd3f3fb4f4ea2e4bc11ee))\n* **execute-driver-plugin:** update dependency webdriverio to v9.5.0 ([#20871](https://github.com/appium/appium/issues/20871)) ([990a066](https://github.com/appium/appium/commit/990a0667e3442bf01aaf67327066517d6310c371))\n* Reduce linter warnings ([#20860](https://github.com/appium/appium/issues/20860)) ([65658cc](https://github.com/appium/appium/commit/65658ccbdde9144c45cb5aad6a9089a5d6f3a0a3))\n* **types:** update dependency type-fest to v4 ([#20838](https://github.com/appium/appium/issues/20838)) ([a5897dd](https://github.com/appium/appium/commit/a5897dd25a277a42b0c650a52274ba2c891ac3b0))\n* **types:** update dependency type-fest to v4 ([#20843](https://github.com/appium/appium/issues/20843)) ([7abecad](https://github.com/appium/appium/commit/7abecaddd3ed64c7be321650b2a17990e74a7222))\n* **types:** update dependency type-fest to v4.31.0 ([#20857](https://github.com/appium/appium/issues/20857)) ([24abb38](https://github.com/appium/appium/commit/24abb385e54f57457c4fb3f2b654cb63645e7ccd))\n\n\n\n## [2.13.1](https://github.com/appium/appium/compare/appium@2.13.0...appium@2.13.1) (2024-12-05)\n\n\n### Bug Fixes\n\n* **docutils:** update dependency lilconfig to v3.1.3 ([#20803](https://github.com/appium/appium/issues/20803)) ([93fa5cc](https://github.com/appium/appium/commit/93fa5ccb06eb5089bb3e8a8d9e67dad7f4446a0a))\n* **support:** update dependency axios to v1.7.9 ([#20811](https://github.com/appium/appium/issues/20811)) ([69f100a](https://github.com/appium/appium/commit/69f100ad3e12030708dee4b8a74005dd41976e37))\n* **support:** update dependency teen_process to v2.2.2 ([#20808](https://github.com/appium/appium/issues/20808)) ([c91683f](https://github.com/appium/appium/commit/c91683f50feea937ff8568eab6366465a6cf9a3e))\n* **types:** update dependency type-fest to v4.30.0 ([#20802](https://github.com/appium/appium/issues/20802)) ([8590432](https://github.com/appium/appium/commit/8590432955eb7663e35847db541b9ead3f845a36))\n\n\n\n## [2.13.0](https://github.com/appium/appium/compare/appium@2.12.2...appium@2.13.0) (2024-12-02)\n\n\n### Features\n\n* **base-driver:** Allow to prefix feature names with automation names ([#20793](https://github.com/appium/appium/issues/20793)) ([942057d](https://github.com/appium/appium/commit/942057d26cbf51539f34b6b7ff8a3c1d07821687))\n\n\n### Bug Fixes\n\n* **types:** update dependency type-fest to v4.29.1 ([#20795](https://github.com/appium/appium/issues/20795)) ([6ba31fe](https://github.com/appium/appium/commit/6ba31fe5766f69cb010a4cac81233f4c3cbcf80f))\n\n\n\n## [2.12.2](https://github.com/appium/appium/compare/appium@2.12.1...appium@2.12.2) (2024-11-29)\n\n\n### Bug Fixes\n\n* **appium:** correctly handle git/github install types (fix [#20781](https://github.com/appium/appium/issues/20781)) ([#20788](https://github.com/appium/appium/issues/20788)) ([522f05d](https://github.com/appium/appium/commit/522f05d25ecdf65e2ae22bd7830a250346fc5752))\n* **appium:** update dependency winston to v3.16.0 ([275da08](https://github.com/appium/appium/commit/275da089e45daba030fbc53d3943e2a9929b27e4))\n* **appium:** update dependency winston to v3.17.0 ([#20736](https://github.com/appium/appium/issues/20736)) ([f91d8c8](https://github.com/appium/appium/commit/f91d8c8812b77c8739b23d4d49c15a44e19cbcbe))\n* **docutils:** update dependency yaml to v2.6.1 ([#20762](https://github.com/appium/appium/issues/20762)) ([a5389e6](https://github.com/appium/appium/commit/a5389e648af22570a55e70de71c159874362ffd9))\n* **support:** update dependency axios to v1.7.8 ([#20778](https://github.com/appium/appium/issues/20778)) ([f9920e2](https://github.com/appium/appium/commit/f9920e2c1b02e3587e5d5fa00ac59055ab57fedd))\n* **types:** update dependency type-fest to v4.27.0 ([#20754](https://github.com/appium/appium/issues/20754)) ([d6b4079](https://github.com/appium/appium/commit/d6b40797d387711df94c29984af91308da27f92b))\n* **types:** update dependency type-fest to v4.28.0 ([#20775](https://github.com/appium/appium/issues/20775)) ([a25d8f1](https://github.com/appium/appium/commit/a25d8f129c8baf76ab40ce3b8d053f7da77f14b3))\n* **types:** update dependency type-fest to v4.29.0 ([#20783](https://github.com/appium/appium/issues/20783)) ([b6aa5ac](https://github.com/appium/appium/commit/b6aa5ace6e54709dba54bc62a902d91851ab7ef1))\n\n\n\n## [2.12.1](https://github.com/appium/appium/compare/appium@2.12.0...appium@2.12.1) (2024-10-24)\n\n\n### Bug Fixes\n\n* **docutils:** restore support for Python <3.12 ([#20675](https://github.com/appium/appium/issues/20675)) ([00cd1b4](https://github.com/appium/appium/commit/00cd1b4b0fcf24d0014dac780223e5866f39c9ce))\n* **support:** update definitelytyped ([#20691](https://github.com/appium/appium/issues/20691)) ([846dd52](https://github.com/appium/appium/commit/846dd5288608d886f924d2791291475c956d53f7))\n\n\n\n## [2.12.0](https://github.com/appium/appium/compare/appium@2.11.5...appium@2.12.0) (2024-10-15)\n\n\n### Features\n\n* **appium:** Make server graceful shutdown timeout configurable via command line args ([#20641](https://github.com/appium/appium/issues/20641)) ([5661888](https://github.com/appium/appium/commit/56618886ed007df3c28ce98beb4ff91bc47da2a2))\n\n\n### Bug Fixes\n\n* **appium:** update dependency winston to v3.15.0 ([ab12235](https://github.com/appium/appium/commit/ab12235483262a1c5a1dd8a32b1792a4b096bfc6))\n* **docutils:** support Python 3.12+ ([#20666](https://github.com/appium/appium/issues/20666)) ([8d7cec9](https://github.com/appium/appium/commit/8d7cec96d8df60644493a7e2f735b4bb0d3783be))\n* **docutils:** update dependency yaml to v2.6.0 ([ed6c6dd](https://github.com/appium/appium/commit/ed6c6dd5441e26fc1eb58de9b78def49d930a128))\n* **execute-driver-plugin:** update dependency webdriverio to v8.40.6 ([796ca9f](https://github.com/appium/appium/commit/796ca9f98f69616b9c890325bbfb0c573a8bc765))\n\n\n\n## [2.11.5](https://github.com/appium/appium/compare/appium@2.11.4...appium@2.11.5) (2024-09-26)\n\n\n### Bug Fixes\n\n* **appium:** Return hostname as web socket url for BiDi if a broadcast address is assigned to the server ([#20603](https://github.com/appium/appium/issues/20603)) ([f0de55d](https://github.com/appium/appium/commit/f0de55da0da2fc0305876a948704c1f0a2a5990f))\n\n\n\n## [2.11.4](https://github.com/appium/appium/compare/appium@2.11.3...appium@2.11.4) (2024-09-16)\n\n\n### Bug Fixes\n\n* **appium:** Fix the condition for secure websocket ([#20497](https://github.com/appium/appium/issues/20497)) ([efdb1ce](https://github.com/appium/appium/commit/efdb1ce6ce1de5120f2f35ebe84abfa73ed5198a))\n* **appium:** update dependency @sidvind/better-ajv-errors to v3 ([#20552](https://github.com/appium/appium/issues/20552)) ([0ee7716](https://github.com/appium/appium/commit/0ee7716cf0644cfc6795f0949d8253d4c0b36597))\n* **appium:** update dependency winston to v3.14.2 ([#20465](https://github.com/appium/appium/issues/20465)) ([893fc04](https://github.com/appium/appium/commit/893fc040e16ec07c83d12c7c89180d962b0f6e68))\n* **base-driver:** Add a server flag to check if it operates a secure protocol ([#20449](https://github.com/appium/appium/issues/20449)) ([622b245](https://github.com/appium/appium/commit/622b245ea38793280d9785a59a0416ce025862fe))\n* **docutils:** update dependency yaml to v2.5.1 ([750872a](https://github.com/appium/appium/commit/750872af4756d2efcd19fe98762f82ecaa59d59a))\n* **execute-driver-plugin:** update dependency webdriverio to v8.40.3 ([4608563](https://github.com/appium/appium/commit/46085635a92c3a2b2b1b3ecf3966a174248a2829))\n* **execute-driver-plugin:** update dependency webdriverio to v8.40.5 ([dcb6de2](https://github.com/appium/appium/commit/dcb6de22eaabdcea2517cd9b7db120d681f0e38e))\n* **support:** update dependency axios to v1.7.4 ([d17d022](https://github.com/appium/appium/commit/d17d0222245ab94a78e578c0398734e65a89ba68))\n* **support:** update dependency axios to v1.7.5 ([fedabb1](https://github.com/appium/appium/commit/fedabb1fdc7af10f9e4b06ea23815c4bc7c6bf5e))\n* **support:** update dependency axios to v1.7.7 ([7fe67a2](https://github.com/appium/appium/commit/7fe67a286a15a917ce3b1b47a08e982e65bbd9e4))\n* **types:** update dependency type-fest to v4 ([#20467](https://github.com/appium/appium/issues/20467)) ([482a1f7](https://github.com/appium/appium/commit/482a1f7bbfbf6478ee09bb1668b830ddbf13b143))\n* **types:** update dependency type-fest to v4 ([#20471](https://github.com/appium/appium/issues/20471)) ([9a66f48](https://github.com/appium/appium/commit/9a66f4800141cc86c90d58ca1103bab0066081bc))\n* **types:** update dependency type-fest to v4 ([#20548](https://github.com/appium/appium/issues/20548)) ([5b8cb76](https://github.com/appium/appium/commit/5b8cb76ea3cda75095e79c91539be73feeadf869))\n* **types:** update dependency type-fest to v4.26.0 ([#20511](https://github.com/appium/appium/issues/20511)) ([8f20c97](https://github.com/appium/appium/commit/8f20c973f4a6d3380163b6afd7f113808453a62d))\n\n\n\n## [2.11.3](https://github.com/appium/appium/compare/appium@2.11.2...appium@2.11.3) (2024-08-07)\n\n\n### Bug Fixes\n\n* **appium:** update dependency ajv to v8.17.1 ([7528971](https://github.com/appium/appium/commit/75289711ee344ac9a11a572f13ddb0471e2cbf79))\n* **appium:** update dependency winston to v3.13.1 ([dcfec17](https://github.com/appium/appium/commit/dcfec17d1ceab90939b5f199854ba630829e3d1f))\n* **docutils:** update dependency yaml to v2.5.0 ([0c755f5](https://github.com/appium/appium/commit/0c755f503c49e459315616e51be0c0776089b2bb))\n* **execute-driver-plugin:** update dependency webdriverio to v8.40.0 ([#20442](https://github.com/appium/appium/issues/20442)) ([b4612e0](https://github.com/appium/appium/commit/b4612e0c7a21902a3cab658fbdc05f3b48c55d0d))\n* **logger:** update dependency lru-cache to v10.4.3 ([#20364](https://github.com/appium/appium/issues/20364)) ([8d79467](https://github.com/appium/appium/commit/8d79467da8a0733ac3e49b9152bd6905989a57ca))\n* **support:** update dependency axios to v1.7.3 ([1ca77c6](https://github.com/appium/appium/commit/1ca77c6dedbff4552aba9c97cf5406c7552d1a01))\n* **support:** update dependency semver to v7.6.3 ([5a9ab97](https://github.com/appium/appium/commit/5a9ab9792402e31d3903fb1a3b08329a67b6a2a2))\n* **types:** update dependency type-fest to v4.22.0 ([#20387](https://github.com/appium/appium/issues/20387)) ([47405dd](https://github.com/appium/appium/commit/47405dda8a5de17c72fb721b0c043e0dd4f6b35a))\n* **types:** update dependency type-fest to v4.23.0 ([#20396](https://github.com/appium/appium/issues/20396)) ([0e8e3c7](https://github.com/appium/appium/commit/0e8e3c71441d02d22f015f08df5223909f5fbb93))\n\n\n\n## [2.11.2](https://github.com/appium/appium/compare/appium@2.11.1...appium@2.11.2) (2024-07-10)\n\n\n### Bug Fixes\n\n* **appium:** update dependency ws to v8.18.0 ([44e4231](https://github.com/appium/appium/commit/44e423110ad6c8bd7d846cc334fafe931fea43f9))\n* **execute-driver-plugin:** update dependency webdriverio to v8.39.1 ([c2f3a61](https://github.com/appium/appium/commit/c2f3a618e413c7f21057ba6d9002dc1fe4507e6f))\n* **support:** update dependency teen_process to v2.1.10 ([86f843b](https://github.com/appium/appium/commit/86f843b9e1fc56576d7a08bf95838a58971e98b3))\n* **support:** update dependency teen_process to v2.1.7 ([5226fa8](https://github.com/appium/appium/commit/5226fa897b90e9fec9be3e79a7d48fc7b4e0016d))\n* **support:** update dependency teen_process to v2.2.0 ([06607da](https://github.com/appium/appium/commit/06607da92e93d015747fd6d6d5bdabe1b3ac58d2))\n* **types:** update dependency type-fest to v4.21.0 ([#20335](https://github.com/appium/appium/issues/20335)) ([8894b9a](https://github.com/appium/appium/commit/8894b9adf709646108cc8d6426bbb690550609f2))\n\n\n\n## [2.11.1](https://github.com/appium/appium/compare/appium@2.11.0...appium@2.11.1) (2024-06-28)\n\n\n### Bug Fixes\n\n* **images-plugin:** update dependency lru-cache to v10.3.0 ([#20306](https://github.com/appium/appium/issues/20306)) ([e43c7a4](https://github.com/appium/appium/commit/e43c7a4dce1f50fbd4d028cbeac5677422210b20))\n\n\n\n## [2.11.0](https://github.com/appium/appium/compare/appium@2.10.3...appium@2.11.0) (2024-06-27)\n\n\n### Features\n\n* **appium:** Improve context logging ([#20250](https://github.com/appium/appium/issues/20250)) ([f675abc](https://github.com/appium/appium/commit/f675abc27b3e6beac2431cc71afb5fc2c2f70534))\n* **appium:** show extension update info message for newer major versions ([#20283](https://github.com/appium/appium/issues/20283)) ([f2c8b69](https://github.com/appium/appium/commit/f2c8b696085ba862553476f23509cac0674a447c))\n* **appium:** show spinner during extension uninstall ([#20282](https://github.com/appium/appium/issues/20282)) ([f250793](https://github.com/appium/appium/commit/f25079354bfd646810813ae47244a1e2e962dbfb))\n\n\n### Bug Fixes\n\n* **appium:** update dependency ws to v8.17.1 ([d2b24da](https://github.com/appium/appium/commit/d2b24daba056373160d680ec5f017b28e9cbde1a))\n* **execute-driver-plugin:** update dependency webdriverio to v8.39.0 ([faf9623](https://github.com/appium/appium/commit/faf9623a65868a6330d062076074da7c1c3acb2a))\n* **support:** update dependency teen_process to v2.1.5 ([bc388db](https://github.com/appium/appium/commit/bc388db1116f411f4b241105f5feae30418c9a27))\n* **support:** update dependency teen_process to v2.1.6 ([5412461](https://github.com/appium/appium/commit/541246184dc7521c825ec1902775e681ea6f0db3))\n* **types:** update dependency type-fest to v4.20.1 ([#20255](https://github.com/appium/appium/issues/20255)) ([1984553](https://github.com/appium/appium/commit/19845531f558e2b16dfae807c768e1b9f2cab25d))\n\n\n\n## [2.10.3](https://github.com/appium/appium/compare/appium@2.10.2...appium@2.10.3) (2024-06-11)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.10.2](https://github.com/appium/appium/compare/appium@2.10.1...appium@2.10.2) (2024-06-11)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.10.1](https://github.com/appium/appium/compare/appium@2.10.0...appium@2.10.1) (2024-06-11)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.10.0](https://github.com/appium/appium/compare/appium@2.9.0...appium@2.10.0) (2024-06-10)\n\n\n### Features\n\n* **appium:** Add a possibility to print logs in json format ([#20224](https://github.com/appium/appium/issues/20224)) ([1e86537](https://github.com/appium/appium/commit/1e86537e944f6beb7dbe72b35c267ae1dd9ebd36))\n* **appium:** Add session signature to all logs ([#20202](https://github.com/appium/appium/issues/20202)) ([#20214](https://github.com/appium/appium/issues/20214)) ([0363aab](https://github.com/appium/appium/commit/0363aab8ba4fe0ec49845db2f493001aa873578b)), closes [#20222](https://github.com/appium/appium/issues/20222)\n* **logger:** Add the debug level to the default logger ([#20219](https://github.com/appium/appium/issues/20219)) ([8ee7d07](https://github.com/appium/appium/commit/8ee7d07af4e2375d2eb7c23badaaac34685bc59c))\n* **support:** Move SecureValuesPreprocessor to @appum/logger ([#20228](https://github.com/appium/appium/issues/20228)) ([dbc3b66](https://github.com/appium/appium/commit/dbc3b668a0a7a815d23f1cae4207d435fc09034d))\n\n\n### Bug Fixes\n\n* **docutils:** update dependency lilconfig to v3.1.2 ([1828501](https://github.com/appium/appium/commit/1828501c66d0c5f8f295c67cd12d6691f8020780))\n* **docutils:** update dependency yaml to v2.4.5 ([6a08c95](https://github.com/appium/appium/commit/6a08c95fc9bda5cf39b8a6d98e5394658355a38e))\n* **types:** update dependency type-fest to v4.20.0 ([#20227](https://github.com/appium/appium/issues/20227)) ([ea00626](https://github.com/appium/appium/commit/ea00626091e3ce87f6e3ed7a61003295272835e3))\n\n\n\n## [2.9.0](https://github.com/appium/appium/compare/appium@2.8.0...appium@2.9.0) (2024-06-06)\n\n\n### Features\n\n* **appium:** Add session signature to all logs ([#20202](https://github.com/appium/appium/issues/20202)) ([b3f8a47](https://github.com/appium/appium/commit/b3f8a47c2d3fa029bdb5592d7130c6d1664e53b5))\n\n\n### Bug Fixes\n\n* **appium:** Revert changes in 20203 and 20202 ([#20209](https://github.com/appium/appium/issues/20209)) ([40def9d](https://github.com/appium/appium/commit/40def9dbdbde64706111900967d66735257b7404)), closes [#20202](https://github.com/appium/appium/issues/20202) [#20203](https://github.com/appium/appium/issues/20203)\n\n\n\n## [2.8.0](https://github.com/appium/appium/compare/appium@2.7.0...appium@2.8.0) (2024-06-06)\n\n\n### Features\n\n* **logger:** Add the 'debug' level to the default logger ([#20203](https://github.com/appium/appium/issues/20203)) ([7fd9d5f](https://github.com/appium/appium/commit/7fd9d5f6261b385c234580c2bfee4d576905458b))\n\n\n### Bug Fixes\n\n* add logger dependencies in package.json ([#20205](https://github.com/appium/appium/issues/20205)) ([3fbc4f1](https://github.com/appium/appium/commit/3fbc4f1fe07eadf9c7a2ef8fc9f4ba78dc3486a3))\n\n\n\n## [2.7.0](https://github.com/appium/appium/compare/appium@2.6.0...appium@2.7.0) (2024-06-06)\n\n\n### Features\n\n* **appium:** Replace npmlog with the local fork ([#20190](https://github.com/appium/appium/issues/20190)) ([8915934](https://github.com/appium/appium/commit/8915934270243bfb46c4d104a098ce1cc481b0ff))\n* **base-driver:** Make addition of search query params to cache optional ([#20195](https://github.com/appium/appium/issues/20195)) ([21316e9](https://github.com/appium/appium/commit/21316e94d05b2f97aa0349a82da229713e92446c))\n\n\n### Bug Fixes\n\n* **appium:** ensure ws close code is valid ([#20178](https://github.com/appium/appium/issues/20178)) ([65c47ac](https://github.com/appium/appium/commit/65c47acf5954bbf1947e896ef79c81a9b3c712a5))\n* **appium:** update dependency ajv to v8.16.0 ([ae7f74a](https://github.com/appium/appium/commit/ae7f74a0144d233653443622a84d49b1cb4e6222))\n* **docutils:** update dependency yaml to v2.4.3 ([848eb00](https://github.com/appium/appium/commit/848eb00afbd1cab76a6a1c3d0f4a2a0b1acee0d0))\n* **execute-driver-plugin:** update dependency webdriverio to v8.38.2 ([c8f9979](https://github.com/appium/appium/commit/c8f997973cc21673f95d02c92d43a2981b8713b8))\n* **support:** update dependency teen_process to v2.1.4 ([96a7a3f](https://github.com/appium/appium/commit/96a7a3f23bead7c1d18700550138cd2d70ce5e3c))\n* **types:** update dependency type-fest to v4.19.0 ([#20193](https://github.com/appium/appium/issues/20193)) ([db62358](https://github.com/appium/appium/commit/db62358dbac25de2a75fdc7493338d98b1422c84))\n\n\n\n## [2.6.0](https://github.com/appium/appium/compare/appium@2.5.4...appium@2.6.0) (2024-05-27)\n\n\n### Features\n\n* **appium:** Add --show-debug-info CLI argument ([#20108](https://github.com/appium/appium/issues/20108)) ([6f602d3](https://github.com/appium/appium/commit/6f602d3e501dbd9d44f6e7ba220f45ff1d4dfde8))\n* **appium:** prepare setup subcommand as shortcut for drivers/plugins installation ([#20102](https://github.com/appium/appium/issues/20102)) ([2b2fb18](https://github.com/appium/appium/commit/2b2fb185a6bc882717e4aa0580b0136bf5ae2942))\n* **base-driver:** Add env variables to control applications cache ([#20042](https://github.com/appium/appium/issues/20042)) ([4e8c91c](https://github.com/appium/appium/commit/4e8c91c8f647e545344d5b49282628413e1ccb19))\n\n\n### Bug Fixes\n\n* **appium:** Do not crash the process if there was an exception in a winston transport ([#20065](https://github.com/appium/appium/issues/20065)) ([0492fe4](https://github.com/appium/appium/commit/0492fe49dc34b3ef345a988bf56e49daf8dfcffe))\n* **appium:** update dependency ajv to v8.13.0 ([448e94e](https://github.com/appium/appium/commit/448e94ee50fa127ae93e657a3958726aa13e7df8))\n* **appium:** update dependency ajv to v8.14.0 ([e3dcd66](https://github.com/appium/appium/commit/e3dcd66714be603a8acbb3364f538c60772e76bd))\n* **appium:** update dependency ws to v8.17.0 ([395dc22](https://github.com/appium/appium/commit/395dc225e4d7f47dc55134fba9fb9306cabf7e19))\n* **docutils:** update dependency yaml to v2.4.2 ([0211174](https://github.com/appium/appium/commit/0211174300cf91c1cad2364d8ce3de7100139f5c))\n* **execute-driver-plugin:** update dependency webdriverio to v8.37.0 ([27ff9a0](https://github.com/appium/appium/commit/27ff9a00ef65a66aea8da8e3be5ffebb6d8c65e1))\n* **execute-driver-plugin:** update dependency webdriverio to v8.38.0 ([e80b682](https://github.com/appium/appium/commit/e80b6826efbe14ecfa6c0ff1f6aceb4db99b82d8))\n* **support:** update dependency axios to v1.7.1 ([11510cb](https://github.com/appium/appium/commit/11510cb1a5d50a20ced884e5404d0be1e04ff142))\n* **support:** update dependency axios to v1.7.2 ([a876f11](https://github.com/appium/appium/commit/a876f112b51dd25f70094b9e75330b9558050e42))\n* **support:** update dependency semver to v7.6.1 ([b5fd5b6](https://github.com/appium/appium/commit/b5fd5b6d2c585be8391b80ac67207da610e8ea64))\n* **support:** update dependency semver to v7.6.2 ([1b4f36c](https://github.com/appium/appium/commit/1b4f36cebe7aaf99976f24346b2d1325b79fc55c))\n* **support:** update dependency teen_process to v2.1.3 ([b34ce3c](https://github.com/appium/appium/commit/b34ce3cff0279be5bb5dcb9228f7e058d27a5e72))\n* **types:** update dependency type-fest to v4.18.2 ([#20103](https://github.com/appium/appium/issues/20103)) ([3b43be1](https://github.com/appium/appium/commit/3b43be17321f2ca16bac0abedabf9ef8cffa098a))\n* **types:** update dependency type-fest to v4.18.3 ([#20149](https://github.com/appium/appium/issues/20149)) ([d5369f8](https://github.com/appium/appium/commit/d5369f8b08e7439282c5a211e684b154cc9f0051))\n\n\n\n## [2.5.4](https://github.com/appium/appium/compare/appium@2.5.3...appium@2.5.4) (2024-04-21)\n\n\n### Bug Fixes\n\n* **execute-driver-plugin:** update dependency webdriverio to v8.36.1 ([9ad20ff](https://github.com/appium/appium/commit/9ad20ff1c266923f3efe50bfe2ae4b1ab8ecb20a))\n\n\n\n## [2.5.3](https://github.com/appium/appium/compare/appium@2.5.2...appium@2.5.3) (2024-04-16)\n\n\n### Bug Fixes\n\n* **execute-driver-plugin:** update dependency webdriverio to v8.36.0 ([#19998](https://github.com/appium/appium/issues/19998)) ([72f3284](https://github.com/appium/appium/commit/72f32848b68e6ef8c047f700ffd0be7d68c49aba))\n\n\n\n## [2.5.2](https://github.com/appium/appium/compare/appium@2.5.1...appium@2.5.2) (2024-04-08)\n\n\n### Bug Fixes\n\n* **appium:** make --log-filters work ([#19825](https://github.com/appium/appium/issues/19825)) ([0d5a0a5](https://github.com/appium/appium/commit/0d5a0a572787d913412bbfd70835e5ba8f94334c))\n* **appium:** update definitelytyped ([2687fa4](https://github.com/appium/appium/commit/2687fa47a0c2f11983e5ccb2ee17eaae9279469d))\n* **appium:** update definitelytyped ([68456b8](https://github.com/appium/appium/commit/68456b8aea3c6ae7225814748fb36d9d4117cc9f))\n* **appium:** update dependency ajv-formats to v3 ([#19957](https://github.com/appium/appium/issues/19957)) ([59ef09d](https://github.com/appium/appium/commit/59ef09d9558f1a6a9f4ee3d81d4cb0b7218706b4))\n* **appium:** update dependency winston to v3.12.0 ([8eb4e88](https://github.com/appium/appium/commit/8eb4e888f624acfc1d42977eeda2d4c1ae139efc))\n* **appium:** update dependency winston to v3.13.0 ([03f8dc9](https://github.com/appium/appium/commit/03f8dc9b18f226975f025ceda7e1d907de8b45d5))\n* **docutils:** update dependency lilconfig to v3.1.0 ([f92640a](https://github.com/appium/appium/commit/f92640a824644545b680e23c7f3ec7f51de9df98))\n* **docutils:** update dependency lilconfig to v3.1.1 ([e04e4e9](https://github.com/appium/appium/commit/e04e4e902a212cf17ca79b3edc0b7545a1af507b))\n* **docutils:** update dependency typescript to v5.4.2 ([#19876](https://github.com/appium/appium/issues/19876)) ([2448fa0](https://github.com/appium/appium/commit/2448fa0145620657ccc72b5637f1b7737fe52580))\n* **docutils:** update dependency yaml to v2.4.0 ([26ded7a](https://github.com/appium/appium/commit/26ded7a4cce1fa9bca28521e4b60cad0edacbe96))\n* **docutils:** update dependency yaml to v2.4.1 ([636d6b3](https://github.com/appium/appium/commit/636d6b3802268ec6532f9f3a958f304c6760d172))\n* **execute-driver-plugin:** update dependency webdriverio to v8.32.0 ([d25a0fc](https://github.com/appium/appium/commit/d25a0fca9b3a94880525fd956068f59427a40b26))\n* **execute-driver-plugin:** update dependency webdriverio to v8.32.1 ([ea8c74b](https://github.com/appium/appium/commit/ea8c74b372e73e88cf0303aa17db943014416e64))\n* **execute-driver-plugin:** update dependency webdriverio to v8.32.2 ([#19807](https://github.com/appium/appium/issues/19807)) ([6c034aa](https://github.com/appium/appium/commit/6c034aa84af573d36fa934c71d3d4ff328772553))\n* **execute-driver-plugin:** update dependency webdriverio to v8.32.3 ([f837a6a](https://github.com/appium/appium/commit/f837a6a9eaf34914ffdbfddcc3cb2f7e7427bc63))\n* **execute-driver-plugin:** update dependency webdriverio to v8.32.4 ([7516d41](https://github.com/appium/appium/commit/7516d4135a1eec37ba298f407254d825961795af))\n* **execute-driver-plugin:** update dependency webdriverio to v8.33.1 ([#19877](https://github.com/appium/appium/issues/19877)) ([0e6c3ee](https://github.com/appium/appium/commit/0e6c3eede250193fad390387ec494918367176d9))\n* **execute-driver-plugin:** update dependency webdriverio to v8.34.1 ([7fc7446](https://github.com/appium/appium/commit/7fc7446612f3257fa421dfec006d02730df10f59))\n* **execute-driver-plugin:** update dependency webdriverio to v8.35.1 ([63d7550](https://github.com/appium/appium/commit/63d7550d02f049a5c3bea5d27e7e8385d7698a4f))\n* **support:** update dependency @types/semver to v7.5.8 ([d1705e2](https://github.com/appium/appium/commit/d1705e2818d435b4c37cb70753af1de5427378e2))\n* **support:** update dependency axios to v1.6.8 ([bd6ab81](https://github.com/appium/appium/commit/bd6ab81c9408ab0f90fc25fc112f9257ec2973ad))\n\n\n\n## [2.5.1](https://github.com/appium/appium/compare/appium@2.5.0...appium@2.5.1) (2024-02-13)\n\n\n### Bug Fixes\n\n* **execute-driver-plugin:** update dependency webdriverio to v8.31.1 ([db0eec0](https://github.com/appium/appium/commit/db0eec05c58fe970351a309a01507cad824bdad2))\n* **support:** update dependency @types/semver to v7.5.7 ([bd8a92f](https://github.com/appium/appium/commit/bd8a92f588d40c97fbe51f8bd3b7835c96e9fe8f))\n* **support:** update dependency semver to v7.6.0 ([7b40a32](https://github.com/appium/appium/commit/7b40a3225ebe0f5976a26d05db2f22ba7b13a130))\n\n\n\n## [2.5.0](https://github.com/appium/appium/compare/appium@2.4.1...appium@2.5.0) (2024-02-06)\n\n\n### Features\n\n* **appium:** Set a proper exit code if any of required doctor checks fails ([#19617](https://github.com/appium/appium/issues/19617)) ([f4011f1](https://github.com/appium/appium/commit/f4011f17d4d03bc854c43462848a4c38427acb85))\n\n\n### Bug Fixes\n\n* **appium:** Tune warning messages about installed extensions ([#19612](https://github.com/appium/appium/issues/19612)) ([5cd9ca5](https://github.com/appium/appium/commit/5cd9ca5c21393c70d259f7525d2c9d35b7eeb2a2))\n* **execute-driver-plugin:** update dependency webdriverio to v8.27.2 ([35f1dba](https://github.com/appium/appium/commit/35f1dbabf6e852c4ae84ec128879bc7e61321a16))\n* **execute-driver-plugin:** update dependency webdriverio to v8.28.0 ([e8e0444](https://github.com/appium/appium/commit/e8e0444bd28d94963090065a813a4b10be665caa))\n* **execute-driver-plugin:** update dependency webdriverio to v8.28.6 ([da84efc](https://github.com/appium/appium/commit/da84efc42dd62b2be07a52dd4379791e2cef6eb2))\n* **execute-driver-plugin:** update dependency webdriverio to v8.28.8 ([1fdf117](https://github.com/appium/appium/commit/1fdf117c63f6e9871f4de3c0bd93ecbdb13a9235))\n* **execute-driver-plugin:** update dependency webdriverio to v8.29.0 ([6f0101e](https://github.com/appium/appium/commit/6f0101eb6343eb8b372e00a6b71d2b2ee909404c))\n* **execute-driver-plugin:** update dependency webdriverio to v8.29.1 ([fb0f8f7](https://github.com/appium/appium/commit/fb0f8f776c6a03174f4569efa60d817a930809cf))\n* **execute-driver-plugin:** update dependency webdriverio to v8.29.3 ([6dacb5e](https://github.com/appium/appium/commit/6dacb5e70ca3529a080f629f5245c2b676746e2c))\n* **execute-driver-plugin:** update dependency webdriverio to v8.29.7 ([52a6f96](https://github.com/appium/appium/commit/52a6f96e085ff13acdf8d5013673861b7e0da818))\n* **execute-driver-plugin:** update dependency webdriverio to v8.30.0 ([91320dd](https://github.com/appium/appium/commit/91320ddd02dca89a8cec258d0ab44a49d344d71c))\n* **support:** update dependency axios to v1.6.4 ([332cc48](https://github.com/appium/appium/commit/332cc48a09b5532a8d51f85f3a24785e2c754e00))\n* **support:** update dependency axios to v1.6.5 ([#19616](https://github.com/appium/appium/issues/19616)) ([ac73522](https://github.com/appium/appium/commit/ac73522351b31bd6c11972c61daa8b6b8d18fb91))\n* **support:** update dependency axios to v1.6.6 ([6313704](https://github.com/appium/appium/commit/6313704ee5a8ee3aee726eb512ef259b6fa1041c))\n* **support:** update dependency axios to v1.6.7 ([795092a](https://github.com/appium/appium/commit/795092a97f6d7569cccc4b5c166f52fef821514b))\n* **types:** update dependency type-fest to v4.10 ([#19694](https://github.com/appium/appium/issues/19694)) ([966d305](https://github.com/appium/appium/commit/966d305e5eade9369a3875243bcad951df88545c))\n* **types:** update dependency type-fest to v4.10.1 ([#19703](https://github.com/appium/appium/issues/19703)) ([501395c](https://github.com/appium/appium/commit/501395c9489320b84ab49ff78af4270f66070d62))\n\n\n\n## [2.4.1](https://github.com/appium/appium/compare/appium@2.4.0...appium@2.4.1) (2024-01-04)\n\n\n### Bug Fixes\n\n* **appium:** Properly handle version check for aliases ([474f3ce](https://github.com/appium/appium/commit/474f3ce092c68981655d9deba546a6202acea141))\n\n\n\n## [2.4.0](https://github.com/appium/appium/compare/appium@2.3.0...appium@2.4.0) (2024-01-03)\n\n\n### Features\n\n* add webdriver bidi support ([2b21e66](https://github.com/appium/appium/commit/2b21e66891e8ab8c3929f04f32e94eb4efdba691))\n* **appium,support:** Add common shortcuts for doctor checks ([#19562](https://github.com/appium/appium/issues/19562)) ([893b9e1](https://github.com/appium/appium/commit/893b9e15d64d2356ea339596e805543df51fa505))\n* **appium:** Make doctor extensible ([#19542](https://github.com/appium/appium/issues/19542)) ([a30286b](https://github.com/appium/appium/commit/a30286b6e7b9753f73e55a8f9db14211b3124578))\n* **appium:** Print the list of available extension scripts if no script name is provided ([#19539](https://github.com/appium/appium/issues/19539)) ([dc2cedf](https://github.com/appium/appium/commit/dc2cedfecd19581321f6947ef1c847065ba2d3d6))\n* Deny install/upgrade of packages which server dep does not meet the current Appium version ([#19575](https://github.com/appium/appium/issues/19575)) ([73bf68c](https://github.com/appium/appium/commit/73bf68cc602de0999e1956110be225c3fd9087c2))\n\n\n### Bug Fixes\n\n* **appium:** update dependency ws to v8.15.1 ([92d1172](https://github.com/appium/appium/commit/92d117298442e72ae262f224733068ddf147f4c8))\n* **appium:** update dependency ws to v8.16.0 ([#19586](https://github.com/appium/appium/issues/19586)) ([fe5245a](https://github.com/appium/appium/commit/fe5245a42784181a9cd7a8ff6b095a622ae40920))\n* **base-driver:** update dependency async-lock to v1.4.1 ([a304a1f](https://github.com/appium/appium/commit/a304a1f78e658f6f70cbe8e1efd6d06b81d8d34e))\n* **docutils:** update dependency lilconfig to v3 ([#19489](https://github.com/appium/appium/issues/19489)) ([ea8394a](https://github.com/appium/appium/commit/ea8394a888c835bc54f7f68174a4b6cae85339ea))\n* **execute-driver-plugin:** update dependency webdriverio to v8.26.3 ([ff767b7](https://github.com/appium/appium/commit/ff767b7f25e97ec9643f691b57ca6ba159dcdcf9))\n* **execute-driver-plugin:** update dependency webdriverio to v8.27.0 ([9b06b87](https://github.com/appium/appium/commit/9b06b871eb3d9c60428130442ea7ab433ce4df31))\n* **support:** update dependency axios to v1.6.3 ([441b284](https://github.com/appium/appium/commit/441b2848dae28472356f37fc5d51ac27af7bbe29))\n* **types:** update dependency type-fest to v4 ([#19592](https://github.com/appium/appium/issues/19592)) ([94b3580](https://github.com/appium/appium/commit/94b358022fdba3050ef94c1f881895f07e24fb75))\n\n\n\n## [2.3.0](https://github.com/appium/appium/compare/appium@2.2.3...appium@2.3.0) (2023-12-18)\n\n\n### Features\n\n* **appium:** Load drivers and plugins asynchronously ([#19512](https://github.com/appium/appium/issues/19512)) ([06e7f34](https://github.com/appium/appium/commit/06e7f3489dff820fa16b16e47417acd0c10e0b05))\n* **docs:** enhance documentation ([#19528](https://github.com/appium/appium/issues/19528)) ([a7d70f3](https://github.com/appium/appium/commit/a7d70f388020ab7f942ec2b4b94c4a2a61b110b5))\n\n\n### Bug Fixes\n\n* **appium:** Respect the value of no-perms-check server arg ([#19518](https://github.com/appium/appium/issues/19518)) ([22ca747](https://github.com/appium/appium/commit/22ca74710718ddeda0526acd9dd3dd1703001e22))\n* **appium:** update dependency @sidvind/better-ajv-errors to v2.1.2 ([9b07df9](https://github.com/appium/appium/commit/9b07df99592852cbf1096fc4bd94ffd4395c423d))\n* **appium:** update dependency @sidvind/better-ajv-errors to v2.1.3 ([78d85f7](https://github.com/appium/appium/commit/78d85f77e8e1e0493a66afc6123f7bc6bc5c8d17))\n* **appium:** Verify if script path is always under the module root ([#19543](https://github.com/appium/appium/issues/19543)) ([e25dd38](https://github.com/appium/appium/commit/e25dd38cd593d478c07012b4aa14fcd96788d294))\n* **docutils:** remove `@appium/typedoc-plugin-appium` and all other uses of `typedoc` ([#19465](https://github.com/appium/appium/issues/19465)) ([7528fcf](https://github.com/appium/appium/commit/7528fcf890f79f4017f5e718bb1952bf907ee479))\n* **docutils:** update dependency mike to v2.0.0 ([#19485](https://github.com/appium/appium/issues/19485)) ([0003304](https://github.com/appium/appium/commit/00033044e08f932b5daf1234cfb381c6f46c8bb8))\n* **execute-driver-plugin:** update dependency webdriverio to v8.26.0 ([dfd1707](https://github.com/appium/appium/commit/dfd17074e94b2406caa87184ac73d992706e8e4d))\n* **execute-driver-plugin:** update dependency webdriverio to v8.26.1 ([070cdfe](https://github.com/appium/appium/commit/070cdfe44f3dcd1c5530512b70191719a0047b8c))\n* **execute-driver-plugin:** update dependency webdriverio to v8.26.2 ([#19537](https://github.com/appium/appium/issues/19537)) ([1f2c053](https://github.com/appium/appium/commit/1f2c053573f0df91449365dfe19dbd350f09ee89))\n* **support:** update dependency teen_process to v2.0.109 ([85dce4a](https://github.com/appium/appium/commit/85dce4a72b21e017b4661ddf997c096817e5fd7f))\n* **support:** update dependency teen_process to v2.0.110 ([b602693](https://github.com/appium/appium/commit/b60269371662de4c42ccd7586512c9d685d95d52))\n* **support:** update dependency teen_process to v2.0.112 ([#19491](https://github.com/appium/appium/issues/19491)) ([d2d8ea7](https://github.com/appium/appium/commit/d2d8ea7a105eb93f59793fbc4d3438a66a191cd8))\n* **support:** update dependency teen_process to v2.1.1 ([b79ed2b](https://github.com/appium/appium/commit/b79ed2bed5329b904b15fa5b1fbde7885087c9ad))\n* **types:** update dependency type-fest to v4 ([#19104](https://github.com/appium/appium/issues/19104)) ([8bfa1b5](https://github.com/appium/appium/commit/8bfa1b5a4d090b0102dbb914c9b72aea52d96788))\n\n\n\n## [2.2.3](https://github.com/appium/appium/compare/appium@2.2.2...appium@2.2.3) (2023-12-04)\n\n\n### Bug Fixes\n\n* **support:** update definitelytyped ([2c02be4](https://github.com/appium/appium/commit/2c02be440c21db0bf8a3832143e61ef8fb30a2cf))\n* **support:** update dependency axios to v1.6.2 ([fda40e6](https://github.com/appium/appium/commit/fda40e60410e97d5ba5093442aad0b2d63d3d539))\n* **support:** update dependency teen_process to v2.0.100 ([e50b53f](https://github.com/appium/appium/commit/e50b53fbea4aa3709adc3df4baf4945124d6a217))\n* **support:** update dependency teen_process to v2.0.101 ([b837f8c](https://github.com/appium/appium/commit/b837f8ce14bd48edb6af62bca718a708d2b65f09))\n* **support:** update dependency teen_process to v2.0.87 ([4df1712](https://github.com/appium/appium/commit/4df1712d9b0c3155e95e38a1aa552f036d37dcfe))\n* **support:** update dependency teen_process to v2.0.89 ([c129111](https://github.com/appium/appium/commit/c1291116989159eb7e08d303354bc00262a9e784))\n* **support:** update dependency teen_process to v2.0.91 ([6cedd48](https://github.com/appium/appium/commit/6cedd485d7007455151c6efc03dd6172d4a31259))\n* **support:** update teen_process-related packages ([c637b05](https://github.com/appium/appium/commit/c637b052f45e0ae7ce68d29b9739718549302756))\n\n\n\n## [2.2.2](https://github.com/appium/appium/compare/appium@2.2.1...appium@2.2.2) (2023-11-14)\n\n\n### Bug Fixes\n\n* **appium:** Load plugins in the same order that was used for the CLI command ([#19388](https://github.com/appium/appium/issues/19388)) ([7124eb6](https://github.com/appium/appium/commit/7124eb6075be0fabd83e9023a47b5a8f4c181a52))\n* **docutils:** update dependency yaml to v2.3.4 ([a215a89](https://github.com/appium/appium/commit/a215a89f684c50da24d669d60a73fb6268b05c7f))\n* **support:** update definitelytyped ([5ae8df3](https://github.com/appium/appium/commit/5ae8df3c36c7f03fbf3420087b532086f6742348))\n* **support:** update dependency axios to v1.6.0 ([699c493](https://github.com/appium/appium/commit/699c49306c38e222d618a9611482b06a3e6806aa))\n* **support:** update dependency axios to v1.6.1 ([9b14205](https://github.com/appium/appium/commit/9b14205288ef09fd4a1144fc93c82b2bb2ed2ec0))\n* **support:** update dependency teen_process to v2.0.57 ([1fbd503](https://github.com/appium/appium/commit/1fbd503a66b965a9b32bbb6702062861a8480333))\n* **support:** update dependency teen_process to v2.0.63 ([fa57192](https://github.com/appium/appium/commit/fa571925b7ac980cc99c8d23f659420eacd8546c))\n* **support:** update dependency teen_process to v2.0.64 ([332bb59](https://github.com/appium/appium/commit/332bb59ee3fdd14c03f6b3c4fd6587a30319d568))\n* **support:** update dependency teen_process to v2.0.66 ([3205b5d](https://github.com/appium/appium/commit/3205b5d06f073f1e5c7735c6e36ad08fdf091182))\n* **support:** update dependency teen_process to v2.0.67 ([3b5ae2a](https://github.com/appium/appium/commit/3b5ae2ab17c74c9890b53c081aec146152f11c7a))\n* **support:** update dependency teen_process to v2.0.73 ([8e453be](https://github.com/appium/appium/commit/8e453bed3f440c1dcf82f016f7d4431365b9cdff))\n* **support:** update dependency teen_process to v2.0.75 ([fbb6fd9](https://github.com/appium/appium/commit/fbb6fd9a2780eb00c15584abeaf644a1fcdecb4d))\n* **support:** update teen_process-related packages ([84d96db](https://github.com/appium/appium/commit/84d96dbae45dfe56218d32330f8ff2d26b750fb7))\n* **support:** update teen_process-related packages ([3d0b97c](https://github.com/appium/appium/commit/3d0b97cae76c616da0aea5b92cebcd38d59263b7))\n\n\n\n## [2.2.1](https://github.com/appium/appium/compare/appium@2.2.0...appium@2.2.1) (2023-10-19)\n\n\n### Bug Fixes\n\n* **appium:** Make sure type definitions are always in sync across modules ([#19323](https://github.com/appium/appium/issues/19323)) ([de39013](https://github.com/appium/appium/commit/de39013ae501d4fc11988435737efb862cc1d820))\n* **support:** update definitelytyped ([a306ce7](https://github.com/appium/appium/commit/a306ce741a806d21bc44f3b979803b8af5da99aa))\n\n\n\n## [2.2.0](https://github.com/appium/appium/compare/appium@2.1.3...appium@2.2.0) (2023-10-18)\n\n\n### Features\n\n* **base-driver:** Add server support of TLS and SPDY protocols ([#19105](https://github.com/appium/appium/issues/19105)) ([5926919](https://github.com/appium/appium/commit/5926919177e3df675723c80d800f933fdbda5824))\n\n\n### Bug Fixes\n\n* **appium:** Fix creation of logging prefixes ([#19212](https://github.com/appium/appium/issues/19212)) ([805f69d](https://github.com/appium/appium/commit/805f69de354ebf0b1e8ffeb64c85833b5d533b4c))\n* **appium:** update dependency winston to v3.11.0 ([f697cda](https://github.com/appium/appium/commit/f697cda9af2b61344b55b5af0f2bfc1fd034334b))\n* **docutils:** update dependency yaml to v2.3.2 ([1a3d408](https://github.com/appium/appium/commit/1a3d408e239e4a9a7070923a90aca70df1dda908))\n* **docutils:** update dependency yaml to v2.3.3 ([caf600b](https://github.com/appium/appium/commit/caf600bffd5f25971d0270e9990b2640a671e366))\n* **images-plugin:** update dependency lru-cache to v10 ([#19050](https://github.com/appium/appium/issues/19050)) ([72a806b](https://github.com/appium/appium/commit/72a806bec7c3a80747192d24dfd9d8286a751810))\n* **opencv:** update definitelytyped ([d2a9a99](https://github.com/appium/appium/commit/d2a9a99418af9ce9b569bb9b98ee396faab932bb))\n* **support:** update definitelytyped ([3b44c7d](https://github.com/appium/appium/commit/3b44c7d8f5b89f9357dfe6bb56b54799bbe0a921))\n* **support:** update definitelytyped ([595d460](https://github.com/appium/appium/commit/595d460ac8dc41d310f9e4f653acbad3c7fd50b9))\n* **support:** update definitelytyped ([b6a76ce](https://github.com/appium/appium/commit/b6a76ce91e2765c22f84e389b93f780e0b4490c0))\n* **support:** update definitelytyped ([3e73600](https://github.com/appium/appium/commit/3e7360021dba0f8e8967094476fe92646ba5e35b))\n* **support:** update dependency @types/semver to v7.5.1 ([a0f59d0](https://github.com/appium/appium/commit/a0f59d05945e627602407d1d42e7a3a58861b11f))\n* **support:** update dependency @types/teen_process to v2.0.1 ([d2f19aa](https://github.com/appium/appium/commit/d2f19aab935cc6ec00a51f042b5f02674a772198))\n* **support:** update dependency axios to v1.5.0 ([08913cd](https://github.com/appium/appium/commit/08913cddde295f616f0fb376cc2cb71a9409a253))\n* **support:** update dependency axios to v1.5.1 ([#19217](https://github.com/appium/appium/issues/19217)) ([3df047d](https://github.com/appium/appium/commit/3df047d128d5d032826c8f5fb605b019078b717d))\n* **support:** update dependency teen_process to v2.0.10 ([bc1b56a](https://github.com/appium/appium/commit/bc1b56a3c162ed8686d3d7956c30eb1f7682b1a7))\n* **support:** update dependency teen_process to v2.0.12 ([c5d6df7](https://github.com/appium/appium/commit/c5d6df7a000d64e8591a56ce5ef65baa2071a36b))\n* **support:** update dependency teen_process to v2.0.13 ([a0c4b84](https://github.com/appium/appium/commit/a0c4b84fb7d3977b7a4ca0a07fadd49ee355791a))\n* **support:** update dependency teen_process to v2.0.18 ([ffeebc7](https://github.com/appium/appium/commit/ffeebc74b72e5eadf658325e67708ae6ed5b8346))\n* **support:** update dependency teen_process to v2.0.19 ([2ef40fe](https://github.com/appium/appium/commit/2ef40febdc717f54ea618ecfe1058b858fe2daf9))\n* **support:** update dependency teen_process to v2.0.23 ([1b0459e](https://github.com/appium/appium/commit/1b0459edd656514d8706aab8e21cd4d40de2ec5d))\n* **support:** update dependency teen_process to v2.0.24 ([bc72c66](https://github.com/appium/appium/commit/bc72c6676a5412b60e74bb143a223738ce059977))\n* **support:** update dependency teen_process to v2.0.27 ([03b2aa6](https://github.com/appium/appium/commit/03b2aa6b6e45fa0ea24c4691b039255bc4399733))\n* **support:** update dependency teen_process to v2.0.30 ([7cdb142](https://github.com/appium/appium/commit/7cdb1429a1104ad3699547f2a2dd9b237135891a))\n* **support:** update dependency teen_process to v2.0.34 ([#19218](https://github.com/appium/appium/issues/19218)) ([c28fcef](https://github.com/appium/appium/commit/c28fcefa725fbce5a0464e57946051e3cb023d85))\n* **support:** update dependency teen_process to v2.0.37 ([6d894be](https://github.com/appium/appium/commit/6d894bef6f377ebfdffdeb1adde7a72624844414))\n* **support:** update dependency teen_process to v2.0.38 ([a32dc11](https://github.com/appium/appium/commit/a32dc1110125d0f1fac9c66c17f1309145a634c7))\n* **support:** update dependency teen_process to v2.0.40 ([2837bcd](https://github.com/appium/appium/commit/2837bcdeb19532fe973a2902db5c8d730252d962))\n* **support:** update dependency teen_process to v2.0.41 ([1a34396](https://github.com/appium/appium/commit/1a34396339f71d40353d323feaf78afcf2269fc9))\n* **support:** update dependency teen_process to v2.0.42 ([e2a670e](https://github.com/appium/appium/commit/e2a670e1c4a0f061b0bfb08a6b534d9deb7bdd9c))\n* **support:** update dependency teen_process to v2.0.45 ([ea731bf](https://github.com/appium/appium/commit/ea731bf117d680496fce453ac42cfee7f05ada60))\n* **support:** update dependency teen_process to v2.0.48 ([eebc651](https://github.com/appium/appium/commit/eebc651f31c282baa7e77a6384d3ee8efc0072d6))\n* **support:** update dependency teen_process to v2.0.50 ([ca3e5d9](https://github.com/appium/appium/commit/ca3e5d90e4c51fc1dda32154e1d77e65cb44fb54))\n* **support:** update dependency teen_process to v2.0.9 ([6c7f3ef](https://github.com/appium/appium/commit/6c7f3ef670d441bdc4b693948a19dcbdc54e4764))\n\n\n\n## [2.1.3](https://github.com/appium/appium/compare/appium@2.1.2...appium@2.1.3) (2023-08-23)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.1.2](https://github.com/appium/appium/compare/appium@2.1.1...appium@2.1.2) (2023-08-22)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.1.1](https://github.com/appium/appium/compare/appium@2.1.0...appium@2.1.1) (2023-08-21)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.1.0](https://github.com/appium/appium/compare/appium@2.0.1...appium@2.1.0) (2023-08-17)\n\n\n### Features\n\n* **base-driver:** Make it possible to provide settings as a map in session capabilities ([#18970](https://github.com/appium/appium/issues/18970)) ([aaf58c3](https://github.com/appium/appium/commit/aaf58c3de66fee2eb10225d05e156e7416a4ac79))\n\n\n### Bug Fixes\n\n* **appium:** Fix the plural form ([97d8f0d](https://github.com/appium/appium/commit/97d8f0df44d915b346a6ecd0d052369dd80a9569))\n* **appium:** update dependency winston to v3.10.0 ([b85a92a](https://github.com/appium/appium/commit/b85a92a912b3d2854e8102b41119fc780e1a6cc2))\n* **appium:** Update the GET /status response to be in sync with the standard ([#18972](https://github.com/appium/appium/issues/18972)) ([5a26111](https://github.com/appium/appium/commit/5a2611137b2a7428bb2e593fc945e21874c4cdae))\n* **support:** update dependency glob to v10 ([#18490](https://github.com/appium/appium/issues/18490)) ([aaf31a5](https://github.com/appium/appium/commit/aaf31a577cb0b9cbe22646dcd888dc393a03aa11))\n* **support:** update dependency semver to v7.5.4 ([03ddcdf](https://github.com/appium/appium/commit/03ddcdfcafbccf6698868a272e499cbdac41d791))\n* **types:** update dependency type-fest to v3.13.1 ([fb34ab9](https://github.com/appium/appium/commit/fb34ab917216121d2b554677a12f07a03393d218))\n\n\n\n## [2.0.1](https://github.com/appium/appium/compare/appium@2.0.0...appium@2.0.1) (2023-07-24)\n\n\n### Bug Fixes\n\n* **appium:** ensure plugin commands reset newCommandTimeout ([41836a4](https://github.com/appium/appium/commit/41836a4a7bfb0d7602839c081a4e3c4792e869df))\n* **support:** update dependency teen_process to v2.0.4 ([151c19c](https://github.com/appium/appium/commit/151c19c1c3b4c9b94aba10033c2d863f567d849b))\n\n\n\n## [2.0.0-rc.5](https://github.com/appium/appium/compare/appium@2.0.0-rc.4...appium@2.0.0-rc.5) (2023-07-03)\n\n\n### Bug Fixes\n\n* **appium:** restrict address to ipv6/hostname ([#18824](https://github.com/appium/appium/issues/18824)) ([f09fbb6](https://github.com/appium/appium/commit/f09fbb64dce0e179a007f3a0ae9800e61fbe90eb)), closes [#18716](https://github.com/appium/appium/issues/18716)\n* **appium:** type fixes for ts v5 ([c13333b](https://github.com/appium/appium/commit/c13333bb979ee3409e6a62a5800c629781553b42))\n* **support:** update dependency semver to v7.5.3 ([ed1856d](https://github.com/appium/appium/commit/ed1856d720c442842d5c3fe5f6caeccb8229b5f1))\n\n\n\n## [2.0.0-rc.4](https://github.com/appium/appium/compare/appium@2.0.0-rc.3...appium@2.0.0-rc.4) (2023-06-29)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.0.0-rc.3](https://github.com/appium/appium/compare/appium@2.0.0-rc.2...appium@2.0.0-rc.3) (2023-06-15)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.0.0-rc.2](https://github.com/appium/appium/compare/appium@2.0.0-rc.1...appium@2.0.0-rc.2) (2023-06-14)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.0.0-rc.1](https://github.com/appium/appium/compare/appium@2.0.0-beta.71...appium@2.0.0-rc.1) (2023-06-14)\n\n\n### Features\n\n* **appium:** Allow to provide ipv6 addresses and handle broadcast addresses in logs ([#18674](https://github.com/appium/appium/issues/18674)) ([8f63dab](https://github.com/appium/appium/commit/8f63dabb5dca882e522026f243e3445f5418874b))\n\n\n### Bug Fixes\n\n* **appium:** update dependency winston to v3.9.0 ([a98d9c3](https://github.com/appium/appium/commit/a98d9c33c761af6870411721cc0d6c4491b43940))\n* **docutils:** update dependency yaml to v2.3.0 ([325d237](https://github.com/appium/appium/commit/325d2372078ee01e8fb58613ffd13417f2527151))\n* **docutils:** update dependency yaml to v2.3.1 ([1a2260b](https://github.com/appium/appium/commit/1a2260bb15d75e4f4c23551dc61529108a7b0d88))\n* ensure logServerAddress gets an actual URL ([#18754](https://github.com/appium/appium/issues/18754)) ([901ac71](https://github.com/appium/appium/commit/901ac711c4e2207f30d93ad177a332b7d6f23c38))\n* **support:** update dependency @types/semver to v7.5.0 ([528dcfe](https://github.com/appium/appium/commit/528dcfe324e75e48471cdb694448c2a09ec2d828))\n* **support:** update dependency semver to v7.5.1 ([5a55509](https://github.com/appium/appium/commit/5a555090c5322318f845415d743ee5c645fb94a0))\n* **types:** fix broken appium config schema types, temporarily ([fd2c72f](https://github.com/appium/appium/commit/fd2c72fd886ecaaf0f6588a328ff8a268a54fb55))\n* **types:** update dependency type-fest to v3.11.0 ([19277f6](https://github.com/appium/appium/commit/19277f6e14a56e52b4669d633e148ad4a3da2c7a))\n* **types:** update dependency type-fest to v3.11.1 ([56499eb](https://github.com/appium/appium/commit/56499eb997b551739bed628f057de7987674ea7f))\n\n\n\n## [2.0.0-beta.71](https://github.com/appium/appium/compare/appium@2.0.0-beta.70...appium@2.0.0-beta.71) (2023-05-19)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.0.0-beta.70](https://github.com/appium/appium/compare/appium@2.0.0-beta.69...appium@2.0.0-beta.70) (2023-05-19)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.0.0-beta.69](https://github.com/appium/appium/compare/appium@2.0.0-beta.68...appium@2.0.0-beta.69) (2023-05-19)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.0.0-beta.68](https://github.com/appium/appium/compare/appium@2.0.0-beta.67...appium@2.0.0-beta.68) (2023-05-19)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.0.0-beta.67](https://github.com/appium/appium/compare/appium@2.0.0-beta.66...appium@2.0.0-beta.67) (2023-05-17)\n\n\n### Bug Fixes\n\n* **docutils:** update dependency yaml to v2.2.2 ([ddadd69](https://github.com/appium/appium/commit/ddadd6977d76a8a5ce1559d2a4ff4a31b58fb42f))\n* **execute-driver-plugin:** update dependency webdriverio to v7.31.1 ([6499eea](https://github.com/appium/appium/commit/6499eea0af6aea1bfb69b1e36c4c445e3ab05b82))\n* **support:** update dependency axios to v1.3.6 ([6692227](https://github.com/appium/appium/commit/66922279b7742a08613f472585a4a1cb70f80683))\n* **support:** update dependency axios to v1.4.0 ([91a6bc5](https://github.com/appium/appium/commit/91a6bc5925ab8ffc4ab6d05883900f7d186e49a9))\n* **support:** update dependency semver to v7.5.0 ([c568523](https://github.com/appium/appium/commit/c568523e017a8b52bdf5132a48bbfde791de704f))\n* **types:** update dependency type-fest to v3.10.0 ([3c4d3ac](https://github.com/appium/appium/commit/3c4d3acc09d2ca1ed74dc77c18c62482e4c70239))\n* **types:** update dependency type-fest to v3.9.0 ([94a207f](https://github.com/appium/appium/commit/94a207fc9718068f3657c51cc8be0ef682f16b11))\n\n\n\n## [2.0.0-beta.66](https://github.com/appium/appium/compare/appium@2.0.0-beta.65...appium@2.0.0-beta.66) (2023-04-20)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.0.0-beta.65](https://github.com/appium/appium/compare/appium@2.0.0-beta.64...appium@2.0.0-beta.65) (2023-04-18)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n## [2.0.0-beta.64](https://github.com/appium/appium/compare/appium@2.0.0-beta.63...appium@2.0.0-beta.64) (2023-04-14)\n\n\n### Bug Fixes\n\n* **support:** update dependency semver to v7.4.0 ([6ae86bd](https://github.com/appium/appium/commit/6ae86bd5c7be879a4d8852951d73eb2f68128df3))\n\n\n\n## [2.0.0-beta.63](https://github.com/appium/appium/compare/appium@2.0.0-beta.62...appium@2.0.0-beta.63) (2023-04-12)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n# [2.0.0-beta.62](https://github.com/appium/appium/compare/appium@2.0.0-beta.61...appium@2.0.0-beta.62) (2023-04-10)\n\n\n### Bug Fixes\n\n* **support:** update dependency axios to v1.3.5 ([6cf1480](https://github.com/appium/appium/commit/6cf14802b70a462beffc12a1134476596060c005))\n* **types:** update dependency type-fest to v3.8.0 ([d6c42e9](https://github.com/appium/appium/commit/d6c42e99c08efce0b34796d5982ce379fca044d3))\n\n\n### Features\n\n* **appium:** make \"ls\" alias of \"list\" ([5ab2fea](https://github.com/appium/appium/commit/5ab2fea5768ef8c67270d49c920b9515ca1ff1e4))\n\n\n\n\n\n# [2.0.0-beta.61](https://github.com/appium/appium/compare/appium@2.0.0-beta.60...appium@2.0.0-beta.61) (2023-04-05)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n# [2.0.0-beta.60](https://github.com/appium/appium/compare/appium@2.0.0-beta.59...appium@2.0.0-beta.60) (2023-04-04)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n# [2.0.0-beta.59](https://github.com/appium/appium/compare/appium@2.0.0-beta.58...appium@2.0.0-beta.59) (2023-04-03)\n\n\n### Bug Fixes\n\n* **appium:** update dependency package-changed to v3 ([bbcaec9](https://github.com/appium/appium/commit/bbcaec9c05e93d522ae72e30368cecc876e16db7))\n* **types:** update dependency type-fest to v3.7.2 ([5580539](https://github.com/appium/appium/commit/55805390b5a0c6aa718bb357b30f66651f3db281))\n\n\n\n\n\n# [2.0.0-beta.58](https://github.com/appium/appium/compare/appium@2.0.0-beta.57...appium@2.0.0-beta.58) (2023-03-28)\n\n\n### Bug Fixes\n\n* **appium,types,base-driver,fake-driver,driver-test-support:** normalize constraint defaults ([3c9fa7b](https://github.com/appium/appium/commit/3c9fa7ba73b639e610e1f3d41d239a9402845b4c))\n* **appium:** remove longjohn ([0c52b50](https://github.com/appium/appium/commit/0c52b50e6595a16287d0bb71960fb2e08278de6f)), closes [#18357](https://github.com/appium/appium/issues/18357)\n* backwards-compatible fixes for TS v5.x ([4974403](https://github.com/appium/appium/commit/49744036619ecc239e0e6255a13d38cafd709920))\n* **types:** update dependency type-fest to v3.7.0 ([6912fa1](https://github.com/appium/appium/commit/6912fa14f2a7d338f17e1bed060e959de7aba1d6))\n* **types:** update dependency type-fest to v3.7.1 ([bc860c7](https://github.com/appium/appium/commit/bc860c733a73760f0c42cbfb384e04d50c376d5e))\n\n\n### Features\n\n* **appium:** improvements to ext commands when running extension in development ([d9b47bc](https://github.com/appium/appium/commit/d9b47bc86434c50382221397cf39c10e661c1ea9)), closes [#18277](https://github.com/appium/appium/issues/18277)\n\n\n\n\n\n# [2.0.0-beta.57](https://github.com/appium/appium/compare/appium@2.0.0-beta.56...appium@2.0.0-beta.57) (2023-03-08)\n\n\n### Bug Fixes\n\n* **appium,fake-driver:** expose child process when running an extension script ([e9dae3f](https://github.com/appium/appium/commit/e9dae3f6d006dcf89b6c0b6fb491be15acfed98b))\n* **appium,support:** fs.readPackageJsonFrom() returns proper type ([9ccbab5](https://github.com/appium/appium/commit/9ccbab5dc02d0019b0cad903772cda872d9fd5fb))\n* **docutils:** update dependency lilconfig to v2.1.0 ([4ed745a](https://github.com/appium/appium/commit/4ed745a95ffc6a43f76003eba62019c16a4c6cf2))\n* **execute-driver-plugin:** update dependency webdriverio to v7.30.2 ([49694f5](https://github.com/appium/appium/commit/49694f50a4680138cc92aba1eee294c927d712cf))\n* **types:** update dependency type-fest to v3.6.1 ([471a4b5](https://github.com/appium/appium/commit/471a4b57e622ff077d59f577a78341268700c48d))\n\n\n\n\n\n# [2.0.0-beta.56](https://github.com/appium/appium/compare/appium@2.0.0-beta.55...appium@2.0.0-beta.56) (2023-02-24)\n\n\n### Bug Fixes\n\n* appium:options should work via --default-capabilities ([11e7ad0](https://github.com/appium/appium/commit/11e7ad0cd403ab1dc100f581cdf93772e3449db3)), closes [#18191](https://github.com/appium/appium/issues/18191)\n* **execute-driver-plugin:** update dependency webdriverio to v7.30.1 ([547b8a4](https://github.com/appium/appium/commit/547b8a45c4b5629720b0f4bdb0485a861aecbebf))\n* **support:** update dependency axios to v1.3.4 ([49f157d](https://github.com/appium/appium/commit/49f157d63e3bdbd205527a5dc8f997df68540546))\n* **types:** update dependency type-fest to v3.5.7 ([b4416c5](https://github.com/appium/appium/commit/b4416c5c0f40200b36909a1fbb492d8c4a212108))\n* **types:** update dependency type-fest to v3.6.0 ([08a6f3a](https://github.com/appium/appium/commit/08a6f3a308c7ee162e992629888557b31e50a26e))\n* update axios to v1.3.3 ([8f9de63](https://github.com/appium/appium/commit/8f9de63e4a622712db545ab63f9f4ce6654e4a91))\n\n\n\n\n\n# [2.0.0-beta.55](https://github.com/appium/appium/compare/appium@2.0.0-beta.54...appium@2.0.0-beta.55) (2023-02-09)\n\n\n### Bug Fixes\n\n* **docutils:** fix bad option name and ignore most falsy args ([5446e5c](https://github.com/appium/appium/commit/5446e5c7a755be081f46f1ed1ca8c13665d9a772))\n\n\n\n\n\n# [2.0.0-beta.54](https://github.com/appium/appium/compare/appium@2.0.0-beta.53...appium@2.0.0-beta.54) (2023-02-09)\n\n\n### Bug Fixes\n\n* add missing ' in an error message ([#18105](https://github.com/appium/appium/issues/18105)) ([0f95213](https://github.com/appium/appium/commit/0f952133987a5da176442eff22d5981ed8959fbe))\n* **appium:** fix broken autoinstall script ([2b3e576](https://github.com/appium/appium/commit/2b3e576393e2dd6a33172632f1e009853e83a8e2))\n* **appium:** update dependency package-changed to v2 ([0d7390f](https://github.com/appium/appium/commit/0d7390faa4df51f67eed74d8539c34a8a67f7ed0))\n* **execute-driver-plugin:** update dependency webdriverio to v7.30.0 ([444b988](https://github.com/appium/appium/commit/444b9886a2ef76f16a477ed2e1f6d3eadd542da3))\n* **support:** update dependency axios to v1.2.3 ([20c176b](https://github.com/appium/appium/commit/20c176bae7d0a4f928082fe1a9237f995b8bd58e))\n* **typedoc-plugin-appium:** use simple filenames for ExtensionReflection objects ([6c26b97](https://github.com/appium/appium/commit/6c26b971246de09ce07b85a34122273f4fad3125)), closes [#18110](https://github.com/appium/appium/issues/18110)\n* **types:** update dependency type-fest to v3.5.4 ([cfb5297](https://github.com/appium/appium/commit/cfb529772cff3a2b7e9ff36e12444b603906a769))\n* **types:** update dependency type-fest to v3.5.5 ([9bf320c](https://github.com/appium/appium/commit/9bf320c87ccf574f933a8247a851b4f848c39fa1))\n* **types:** update dependency type-fest to v3.5.6 ([775c990](https://github.com/appium/appium/commit/775c990f9d4176e78936a071968a788e19048519))\n\n\n\n\n\n# [2.0.0-beta.53](https://github.com/appium/appium/compare/appium@2.0.0-beta.52...appium@2.0.0-beta.53) (2023-01-23)\n\n\n### Bug Fixes\n\n* **docs:** fix filename of basedriver commands ([18772f4](https://github.com/appium/appium/commit/18772f4f0d04d4c27135b6a66732bd9518568bdf))\n* **support:** update dependency glob to v8.1.0 ([d7b35ab](https://github.com/appium/appium/commit/d7b35ab28b8afd0f93f775a223373956a57ee881))\n* **types:** update dependency type-fest to v3.5.2 ([64fd8ce](https://github.com/appium/appium/commit/64fd8ce94018b0bb7ccb2baade8d525703f41c45))\n* **types:** update dependency type-fest to v3.5.3 ([6c4ba8c](https://github.com/appium/appium/commit/6c4ba8caa508840640f05eea1ab41ecb290312aa))\n\n\n\n\n\n# [2.0.0-beta.52](https://github.com/appium/appium/compare/appium@2.0.0-beta.51...appium@2.0.0-beta.52) (2023-01-13)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n# [2.0.0-beta.51](https://github.com/appium/appium/compare/appium@2.0.0-beta.50...appium@2.0.0-beta.51) (2023-01-13)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n# [2.0.0-beta.50](https://github.com/appium/appium/compare/appium@2.0.0-beta.49...appium@2.0.0-beta.50) (2023-01-13)\n\n**Note:** Version bump only for package appium\n\n\n\n\n\n# [2.0.0-beta.49](https://github.com/appium/appium/compare/appium@2.0.0-beta.48...appium@2.0.0-beta.49) (2023-01-13)\n\n\n### Bug Fixes\n\n* **appium:** inability to find automationName inside appium:options ([#17966](https://github.com/appium/appium/issues/17966)) ([23224cf](https://github.com/appium/appium/commit/23224cf002b7dd9e4e5d8426b4bbe1cb28f62605))\n* **appium:** update dependency ajv to v8.12.0 ([783989b](https://github.com/appium/appium/commit/783989b56c80ebc0eebf693c168754130627b55f))\n* **appium:** update dependency yaml to v2.2.0 ([28c6204](https://github.com/appium/appium/commit/28c6204b751ead304cce21d534c91381fa39d79d))\n* **appium:** update dependency yaml to v2.2.1 ([b763880](https://github.com/appium/appium/commit/b763880779abaea900ac2c129dfb009b0e8ed0a9))\n* **execute-driver-plugin:** update dependency webdriverio to v7.28.1 ([2bb4f32](https://github.com/appium/appium/commit/2bb4f32329938e15062e42b585dd760cca5ae17b))\n* **execute-driver-plugin:** update dependency webdriverio to v7.29.0 ([a3fad3e](https://github.com/appium/appium/commit/a3fad3ed28822b1dfaae72cbfb8d7906ec35e158))\n* **execute-driver-plugin:** update dependency webdriverio to v7.29.1 ([7c59380](https://github.com/appium/appium/commit/7c59380e6b97691ff16a8d98a912d67b7972593a))\n* **support:** update dependency axios to v1.2.2 ([5291ca6](https://github.com/appium/appium/commit/5291ca672b3b47c5270e9fd85de3e4ed76a650e0))\n* **types:** update dependency type-fest to v3.5.0 ([8c8bfe8](https://github.com/appium/appium/commit/8c8bfe824dbe062e24cfe9fc6e1afa2f68cc6e4c))\n* **types:** update dependency type-fest to v3.5.1 ([4b5ab4d](https://github.com/appium/appium/commit/4b5ab4da7be925d0592c18e8f46a9ce30fbddf8e))\n\n\n### Features\n\n* **base-driver:** deprecate non-standard routes ([7055a0b](https://github.com/appium/appium/commit/7055a0b28193f677b21541ddada3c4a314f90f5b))\n* **typedoc-appium-plugin:** implement cross-referencing of methods ([8b33414](https://github.com/appium/appium/commit/8b334149018f7d49448da9e7982356c72bcd468e))\n\n\n\n\n\n# [2.0.0-beta.48](https://github.com/appium/appium/compare/appium@2.0.0-beta.47...appium@2.0.0-beta.48) (2022-12-21)\n\n### Bug Fixes\n\n- **appium:** ensure migration always gets applied ([20667be](https://github.com/appium/appium/commit/20667be9a21e71963ecb7e25e1b8d51864bce011))\n- **appium:** fix manifest migrations ([df250cc](https://github.com/appium/appium/commit/df250cc1e024f4971abe7e756594f7feee32cba6))\n- **execute-driver-plugin:** update dependency webdriverio to v7.28.0 ([f81e2e9](https://github.com/appium/appium/commit/f81e2e92eff25c33d36f767209f423227d288218))\n- **types:** update dependency type-fest to v3.4.0 ([37f71c3](https://github.com/appium/appium/commit/37f71c327a7c1a6d882b5198af6fedc9e8d51496))\n\n### Features\n\n- **appium:** add chromium driver to list of officially supported drivers ([#17939](https://github.com/appium/appium/issues/17939)) ([fe67e4c](https://github.com/appium/appium/commit/fe67e4cb2fca977dd9994f1cfbba4a0edc61ef83))\n\n# [2.0.0-beta.47](https://github.com/appium/appium/compare/appium@2.0.0-beta.46...appium@2.0.0-beta.47) (2022-12-14)\n\n### Bug Fixes\n\n- **appium:** --show-config shouid only show CLI args if any were used ([3de553a](https://github.com/appium/appium/commit/3de553ad3a58313c14c12880d099d59ba03cd559))\n- **appium,support:** re-enable log-filters ([b3b6427](https://github.com/appium/appium/commit/b3b642778aae6138f246c4fa9ecb32b017c25f7a))\n- **appium,types:** cliArgs is never undefined ([e66dbb5](https://github.com/appium/appium/commit/e66dbb55cb43ecb4d01e8b9bf1cb8476a9e21639))\n- **appium:** do not pollute pre-config parsed args with config file & defaults ([5dcd2e2](https://github.com/appium/appium/commit/5dcd2e2d303b905fe96e8566fbf6fa80d8687595))\n- **appium:** ensure appiumCliDest is recognized by config file normalizer ([1f89d7c](https://github.com/appium/appium/commit/1f89d7c2ffcad823bb0dbac54cb747ac24aa40ef)), closes [#17638](https://github.com/appium/appium/issues/17638)\n- **appium:** fix problematic ExtManifestWithSchema type ([6d514c5](https://github.com/appium/appium/commit/6d514c54b365197eacc37d01324a78eb508002c5))\n- **appium:** fixup ([6c61eb8](https://github.com/appium/appium/commit/6c61eb8f4ed0f19edc0fa4affe9e374e6b4e426a))\n- **appium:** squelch deprecation warning out of argparser ([f4d1b81](https://github.com/appium/appium/commit/f4d1b817a10302b407a84fe644c968bf17ba89a1))\n- **appium:** store path to installed extension ([10d1438](https://github.com/appium/appium/commit/10d1438af7e5bc2b523cf775c65199abe000e747))\n- **appium:** update dependency ajv to v8.11.2 ([5a794ce](https://github.com/appium/appium/commit/5a794ce1b61e433e568964551c805aa9c82af3ca))\n- **execute-driver-plugin:** update dependency webdriverio to v7.27.0 ([edb3251](https://github.com/appium/appium/commit/edb325131b809edae3e73db8d43322dda915b201))\n- **fake-driver:** update dependency asyncbox to v2.9.4 ([70a9c14](https://github.com/appium/appium/commit/70a9c144fc0bd80c4459223d5c8170a4d541db6c))\n- **opencv:** update definitelytyped ([32557f4](https://github.com/appium/appium/commit/32557f4bca5acc2f89cfd3a70f369cebeb94c588))\n- **schema:** add definition for log filters ([09c5901](https://github.com/appium/appium/commit/09c59017193b0fd839e41e44400872ab592d177a))\n- **support:** Make upgradable versions parsing more permissive ([#17666](https://github.com/appium/appium/issues/17666)) ([32a2616](https://github.com/appium/appium/commit/32a2616c3600e0ba91a29981d9af27fb4fede833))\n- **support:** update dependency axios to v1.2.0 ([b80b88b](https://github.com/appium/appium/commit/b80b88bd9cf2d6325ea6104449170b8339bf23e0))\n- **support:** update dependency axios to v1.2.1 ([07d6ef6](https://github.com/appium/appium/commit/07d6ef6b8cc1608da8860f601a80ec0f6a7a7598))\n- **support:** update dependency npmlog to v7 ([68778ca](https://github.com/appium/appium/commit/68778ca5c5f92ae973fb7055d84030630b31e1e9))\n- **types:** update dependency type-fest to v3.2.0 ([f5da9f3](https://github.com/appium/appium/commit/f5da9f31a31b62d32b076857891cb027887fdbaf))\n- **types:** update dependency type-fest to v3.3.0 ([33aef07](https://github.com/appium/appium/commit/33aef07d245627e67823a3b344cdf612e4452551))\n- **types:** update webdriverio monorepo to v7.26.0 ([2a445ad](https://github.com/appium/appium/commit/2a445addffb5c972c7dcac50a1bf25601efa003d))\n\n- chore!: set engines to minimum Node.js v14.17.0 ([a1dbe6c](https://github.com/appium/appium/commit/a1dbe6c43efe76604943a607d402f4c8b864d652))\n\n### Features\n\n- **appium,support:** use npm link for local installs ([b5be1fe](https://github.com/appium/appium/commit/b5be1fe93bc73953d7da17938d41f1db1b76143d))\n- **appium:** Add colorized console logs to Appium (2.x) ([#17481](https://github.com/appium/appium/issues/17481)) ([fe4c6d6](https://github.com/appium/appium/commit/fe4c6d68a078cefa6bcdc9258e3f25b311bfe521))\n- **appium:** add easy access to a few more drivers and plugins ([#17878](https://github.com/appium/appium/issues/17878)) ([5d60c45](https://github.com/appium/appium/commit/5d60c45cce83f664d0cbac256936d5ed0e43aec6))\n- **appium:** implement schema migrations ([13df5c7](https://github.com/appium/appium/commit/13df5c74e0ef1acae46d2ef821ed01d9118eab05))\n- experimental support for typedoc generation ([4746080](https://github.com/appium/appium/commit/4746080e54ed8bb494cbc7c6ce83db503bf6bb52))\n- **schema:** allow root $schema prop ([726a7e1](https://github.com/appium/appium/commit/726a7e10deadcc8150a549fb853fbf5cca033248))\n- **types:** add declarations for versioned manifest files and their types ([2092360](https://github.com/appium/appium/commit/209236023d5f23e2ccb94be6959babd8702a65bc))\n\n### BREAKING CHANGES\n\n- Appium now supports version range `^14.17.0 || ^16.13.0 || >=18.0.0`\n\n# [2.0.0-beta.46](https://github.com/appium/appium/compare/appium@2.0.0-beta.45...appium@2.0.0-beta.46) (2022-10-14)\n\n**Note:** Version bump only for package appium\n\n# [2.0.0-beta.45](https://github.com/appium/appium/compare/appium@2.0.0-beta.44...appium@2.0.0-beta.45) (2022-10-13)\n\n### Features\n\n- **appium,support:** enable detection of local extensions for improved DX ([b186928](https://github.com/appium/appium/commit/b186928e60493e7603dc3b27725dad8ee20d3750))\n\n# [2.0.0-beta.44](https://github.com/appium/appium/compare/appium@2.0.0-beta.43...appium@2.0.0-beta.44) (2022-09-07)\n\n### Bug Fixes\n\n- **appium:** do not throw ENAMETOOLONG on long cli arg ([cfdf898](https://github.com/appium/appium/commit/cfdf898e04e94032e3dd48b595caa4b6f0828289))\n- **appium:** eat update info errors ([7d7bb7a](https://github.com/appium/appium/commit/7d7bb7abc3173d29b843b3b238465d9914eaf091)), closes [#17357](https://github.com/appium/appium/issues/17357)\n\n### chore\n\n- **appium:** remove test export ([6820f5e](https://github.com/appium/appium/commit/6820f5ec4e62fbb5e91ce739d8aadb7f7b7a7a74)), closes [#17398](https://github.com/appium/appium/issues/17398)\n\n### Features\n\n- **appium:** Adjust NODE_PATH so NPM could properly resolve component peer dependencies ([#17325](https://github.com/appium/appium/issues/17325)) ([39d5cee](https://github.com/appium/appium/commit/39d5cee1b71f611e810900d3faed8e0fed6e1ce0))\n- **support:** Move module root detection utility into support package ([#17427](https://github.com/appium/appium/issues/17427)) ([5ab7829](https://github.com/appium/appium/commit/5ab78297e172bc6a5751c636f81b3b202fbe2743))\n\n### BREAKING CHANGES\n\n- **appium:** This removes the `test` export from `appium`. `import * from 'appium/test'` is no longer supported.\n\nUse `@appium/test-support`, `@appium/driver-test-support` or `@appium/plugin-test-support` instead.\n\n# [2.0.0-beta.43](https://github.com/appium/appium/compare/appium@2.0.0-beta.42...appium@2.0.0-beta.43) (2022-08-10)\n\n### Bug Fixes\n\n- **appium:** fix busted config file normalization algorithm ([dc4835f](https://github.com/appium/appium/commit/dc4835f293f371c36873801a0060bb22eead2cc0))\n\n### Features\n\n- **appium,base-driver,fake-driver,fake-plugin,test-support,types:** updateServer receives cliArgs param ([d4b9833](https://github.com/appium/appium/commit/d4b983328af21d1e5c27a91e438e7934eb152ab1)), closes [#17304](https://github.com/appium/appium/issues/17304)\n- **base-driver,fake-driver,appium:** add convenience methods for defining execute script overloads ([#17321](https://github.com/appium/appium/issues/17321)) ([337ec3e](https://github.com/appium/appium/commit/337ec3e7ba216dd6f8cdc88143ecaa4c75f5d266))\n\n# [2.0.0-beta.42](https://github.com/appium/appium/compare/appium@2.0.0-beta.41...appium@2.0.0-beta.42) (2022-08-03)\n\n### Bug Fixes\n\n- **appium,base-driver,base-plugin,doctor,docutils,eslint-config-appium,execute-driver-plugin,fake-driver,fake-plugin,gulp-plugins,images-plugin,opencv,relaxed-caps-plugin,schema,support,test-support,types,universal-xml-plugin:** update engines ([d8d2382](https://github.com/appium/appium/commit/d8d2382327ba7b7db8a4d1cad987c0e60184c92d))\n- **appium:** add npm version check ([27ac2fa](https://github.com/appium/appium/commit/27ac2fa125bbfbe2e2ad5a3e7bf31d518510aa2d))\n- **appium:** partially revert 2a6a056187ce925d5776b7acc4954b10ecf9221b ([b7e905e](https://github.com/appium/appium/commit/b7e905eaf188f0f23f279620d8ce7dfba60f0b25))\n\n### Features\n\n- **appium:** pass unknown args to extension scripts ([faff3ce](https://github.com/appium/appium/commit/faff3ce3471abaea24d2cb4c3e3b75b1af5ac3a1)), closes [#17250](https://github.com/appium/appium/issues/17250)\n\n# [2.0.0-beta.41](https://github.com/appium/appium/compare/appium@2.0.0-beta.40...appium@2.0.0-beta.41) (2022-07-28)\n\n### Bug Fixes\n\n- **appium,support:** fix installation problems ([2a6a056](https://github.com/appium/appium/commit/2a6a056187ce925d5776b7acc4954b10ecf9221b)), closes [#17073](https://github.com/appium/appium/issues/17073)\n- **appium,types:** include @appium/types in appium ([a0a6166](https://github.com/appium/appium/commit/a0a6166738f3db32f2512681914c4c5410cd4b28))\n- **appium:** fix incorrect count of errors and warnings ([1e42c23](https://github.com/appium/appium/commit/1e42c2378cb762d5f327139c027e2071918b5c17))\n- **appium:** postinstall: never assume local appium if it is being installed globally ([965752f](https://github.com/appium/appium/commit/965752f288ba5d74ab24f41d780c46cc8ff14984)), closes [#17054](https://github.com/appium/appium/issues/17054)\n- **appium:** remove references to js in typescript code ([d3f90d5](https://github.com/appium/appium/commit/d3f90d5ed6e887feffcabfc8aabd012e43c37e63))\n- moved type packages to deps of specific packages ([f9129df](https://github.com/appium/appium/commit/f9129dfee32fcc3f89ffcfa69fb83b7c2419c24f))\n- Update the way build info is fetched from GitHub ([#17078](https://github.com/appium/appium/issues/17078)) ([d2a3adc](https://github.com/appium/appium/commit/d2a3adc2e361d5f0cff11094e8884e3270f5c94c))\n\n### Features\n\n- **appium,base-driver,base-plugin,test-support,types:** move test fixtures into test-support ([70d88cb](https://github.com/appium/appium/commit/70d88cb86f28354efe313cc6be6a0afef20b38b3))\n\n# [2.0.0-beta.40](https://github.com/appium/appium/compare/appium@2.0.0-beta.39...appium@2.0.0-beta.40) (2022-06-04)\n\n**Note:** Version bump only for package appium\n\n# [2.0.0-beta.39](https://github.com/appium/appium/compare/appium@2.0.0-beta.38...appium@2.0.0-beta.39) (2022-06-03)\n\n**Note:** Version bump only for package appium\n\n# [2.0.0-beta.38](https://github.com/appium/appium/compare/appium@2.0.0-beta.37...appium@2.0.0-beta.38) (2022-06-01)\n\n**Note:** Version bump only for package appium\n\n# [2.0.0-beta.37](https://github.com/appium/appium/compare/appium@2.0.0-beta.36...appium@2.0.0-beta.37) (2022-05-31)\n\n**Note:** Version bump only for package appium\n\n# [2.0.0-beta.36](https://github.com/appium/appium/compare/appium@2.0.0-beta.35...appium@2.0.0-beta.36) (2022-05-31)\n\n### Bug Fixes\n\n- **appium:** fix extension autoinstall postinstall script ([3e2c05d](https://github.com/appium/appium/commit/3e2c05d8a290072484afde34fe5fd968618f6359)), closes [#16924](https://github.com/appium/appium/issues/16924)\n\n### Features\n\n- **appium,support:** extension check improvements ([6b224f5](https://github.com/appium/appium/commit/6b224f545f44b8e6ad9d587c7157bc67d7d11439))\n- **appium:** appium now expects extensions to use peer dependencies ([48f1d99](https://github.com/appium/appium/commit/48f1d990871dbcd4ab3042c19dc4f43ca89bf80f))\n\n# [2.0.0-beta.35](https://github.com/appium/appium/compare/appium@2.0.0-beta.34...appium@2.0.0-beta.35) (2022-05-03)\n\n**Note:** Version bump only for package appium\n\n# [2.0.0-beta.34](https://github.com/appium/appium/compare/appium@2.0.0-beta.33...appium@2.0.0-beta.34) (2022-05-02)\n\n**Note:** Version bump only for package appium\n\n# [2.0.0-beta.33](https://github.com/appium/appium/compare/appium@2.0.0-beta.32...appium@2.0.0-beta.33) (2022-04-20)\n\n**Note:** Version bump only for package appium\n\n# [2.0.0-beta.32](https://github.com/appium/appium/compare/appium@2.0.0-beta.31...appium@2.0.0-beta.32) (2022-04-20)\n\n**Note:** Version bump only for package appium\n\n# [2.0.0-beta.31](https://github.com/appium/appium/compare/appium@2.0.0-beta.30...appium@2.0.0-beta.31) (2022-04-20)\n\n### Bug Fixes\n\n- **appium,types:** avoid call to assignServer() ([cd08daf](https://github.com/appium/appium/commit/cd08dafabcc16e718a5bdc6b96d5a7bcbfe6e1be))\n- **appium:** fix some argument-related types ([37cb3bd](https://github.com/appium/appium/commit/37cb3bd80c76f003940e680b7925b5c3bdc5144c))\n- **appium:** make types actually consumable ([8b814c9](https://github.com/appium/appium/commit/8b814c9243a7b51ecd0bc619146063aa5b0ccb76))\n\n# [2.0.0-beta.30](https://github.com/appium/appium/compare/appium@2.0.0-beta.29...appium@2.0.0-beta.30) (2022-04-12)\n\n**Note:** Version bump only for package appium\n\n# [2.0.0-beta.29](https://github.com/appium/appium/compare/appium@2.0.0-beta.28...appium@2.0.0-beta.29) (2022-04-12)\n\n### Bug Fixes\n\n- **appium:** Properly detect if a command is a session command ([#16737](https://github.com/appium/appium/issues/16737)) ([f8a5144](https://github.com/appium/appium/commit/f8a51443e490d9a373778499bfc440e8464ca2ed))\n\n# [2.0.0-beta.28](https://github.com/appium/appium/compare/appium@2.0.0-beta.27...appium@2.0.0-beta.28) (2022-04-07)\n\n### Bug Fixes\n\n- **appium:** allow multiple drivers to be installed ([0bbec13](https://github.com/appium/appium/commit/0bbec13d1e386b2fdf3f9cdcb43da78d6834f28f)), closes [#16674](https://github.com/appium/appium/issues/16674)\n\n### Features\n\n- **appium:** generate declaration files ([#16597](https://github.com/appium/appium/issues/16597)) ([06a6054](https://github.com/appium/appium/commit/06a605420d761a830be267f0f96e12f4caa2c534))\n\n# [2.0.0-beta.27](https://github.com/appium/appium/compare/appium@2.0.0-beta.26...appium@2.0.0-beta.27) (2022-03-23)\n\n### Bug Fixes\n\n- **base-driver:** Use WeakRef to reference the driver instance in the log prefix generator ([#16636](https://github.com/appium/appium/issues/16636)) ([bbfc7ef](https://github.com/appium/appium/commit/bbfc7ef51d8a5c7e99072ee599ce2a6265017ea4))\n\n# [2.0.0-beta.26](https://github.com/appium/appium/compare/appium@2.0.0-beta.25...appium@2.0.0-beta.26) (2022-03-22)\n\n### Bug Fixes\n\n- **appium:** Increase the default limit of process listeners ([#16471](https://github.com/appium/appium/issues/16471)) ([a8315f3](https://github.com/appium/appium/commit/a8315f3f87862b3deeae90b4e21b133e9e3e78d5))\n- **appium:** make sure logsink init happens first since it patches npmlog globally (fix [#16519](https://github.com/appium/appium/issues/16519)) ([5abf852](https://github.com/appium/appium/commit/5abf85204614b47d2363097a5356f4bddf697352))\n- **appium:** remove bad log ([1dbeee2](https://github.com/appium/appium/commit/1dbeee200677a9c0452bb8c24d78da1e2b5e181c))\n\n### Features\n\n- **appium:** allow installation of extensions via `npm` ([d89fb9b](https://github.com/appium/appium/commit/d89fb9b354b274f2ba410527d25d73af6743d76c))\n- **support:** move npm module into support ([2fbd49f](https://github.com/appium/appium/commit/2fbd49fed4cdf10fe1f4b374b5b44ae327ab3f85))\n\n# [2.0.0-beta.25](https://github.com/appium/appium/compare/appium@2.0.0-beta.24...appium@2.0.0-beta.25) (2022-01-21)\n\n### Bug Fixes\n\n- **appium:** make show-config more right ([7470ed0](https://github.com/appium/appium/commit/7470ed00b2a8a8ebc39d62184a6ba5819b22f264)), closes [#16340](https://github.com/appium/appium/issues/16340)\n\n# [2.0.0-beta.24](https://github.com/appium/appium/compare/appium@2.0.0-beta.23...appium@2.0.0-beta.24) (2022-01-11)\n\n### Bug Fixes\n\n- **appium:** correctly apply extension defaults ([20d95e4](https://github.com/appium/appium/commit/20d95e45313fc6aac30a2cf7b8f7bef156a17851))\n- **appium:** disallow unsupported schemas ([e074fee](https://github.com/appium/appium/commit/e074fee89f90a654407d01d3f3aea6b839bbf24f))\n- **appium:** fix behavior of ReadonlyMap to be compatible with Map ([88e351f](https://github.com/appium/appium/commit/88e351fc2da682bb4c8607259e001ed7e0f5d964))\n- **appium:** fix incorrect handling of delete session with regard to plugin driver assignment ([7b3893a](https://github.com/appium/appium/commit/7b3893a36202018de7c2124c2028bfbbd8a9d7fd))\n- **appium:** make object dumps less weird ([74a5911](https://github.com/appium/appium/commit/74a5911515f6c50f71fe6f18ddaa4f4fd2ed6d43))\n- Switch colors package to a non-compomised repository ([#16317](https://github.com/appium/appium/issues/16317)) ([40a6f05](https://github.com/appium/appium/commit/40a6f054dca3d94fc88773af9c6336ba12ebfb81))\n\n### Features\n\n- **appium:** add --show-config ([#16207](https://github.com/appium/appium/issues/16207)) ([af96879](https://github.com/appium/appium/commit/af96879cfdbbe40773182c29a49fbf2f3cf7e233)), closes [#15672](https://github.com/appium/appium/issues/15672)\n\n# [2.0.0-beta.23](https://github.com/appium/appium/compare/appium@2.0.0-beta.22...appium@2.0.0-beta.23) (2021-11-23)\n\n### Features\n\n- **appium:** make server host/port information available to drivers and thereby plugins ([221a3ec](https://github.com/appium/appium/commit/221a3ecd5211fadcd375fe6d6c9df11f1af201a2))\n\n# [2.0.0-beta.22](https://github.com/appium/appium/compare/appium@2.0.0-beta.21...appium@2.0.0-beta.22) (2021-11-19)\n\n### Bug Fixes\n\n- **appium:** create cjs wrapper ([24596d6](https://github.com/appium/appium/commit/24596d67b04590acb568322098c88efc190f6318))\n- **appium:** enable --relaxed-security ([46a2041](https://github.com/appium/appium/commit/46a2041fbdc80b6210d0214a4d9fb71312d57e1b)), closes [/github.com/appium/appium/discussions/16103#discussioncomment-1655985](https://github.com//github.com/appium/appium/discussions/16103/issues/discussioncomment-1655985)\n\n### Features\n\n- **appium:** support for deprecated arguments ([aa69388](https://github.com/appium/appium/commit/aa69388c7a296d4d1e39a1ba0fbe23035a5ae8c5))\n\n# [2.0.0-beta.21](https://github.com/appium/appium/compare/appium@2.0.0-beta.20...appium@2.0.0-beta.21) (2021-11-16)\n\n### Bug Fixes\n\n- **appium:** resolve-from is a dependency ([5443b57](https://github.com/appium/appium/commit/5443b570adf41042c4735410b1425d248adfd0a9))\n\n# [2.0.0-beta.20](https://github.com/appium/appium/compare/appium@2.0.0-beta.19...appium@2.0.0-beta.20) (2021-11-15)\n\n### Bug Fixes\n\n- **appium:** add missing support for schema-as-object ([e951010](https://github.com/appium/appium/commit/e951010055118f6be1614abe40f5701daacb441c))\n- **appium:** add types for parsed argument object ([95dfe24](https://github.com/appium/appium/commit/95dfe24176bb7ff6957b7942164280a3a2fbd155))\n- **appium:** avoid deprecation warning from argparse ([fc56662](https://github.com/appium/appium/commit/fc566628f599e8a529f30344d291f2351665c5f7))\n- **appium:** bad type name ([a7fa66b](https://github.com/appium/appium/commit/a7fa66bb7dfb321cf2bf7c90e5e739841a8753e9))\n- **appium:** fix interaction of plugins with proxying ([7091008](https://github.com/appium/appium/commit/70910087d11100fe47627754ade379a2d3a7ff5d))\n- **appium:** if a sessionless plugin is used for createSession, promote it to a session plugin ([3f1bb4c](https://github.com/appium/appium/commit/3f1bb4c9c38046699e6d8be3dcd257bc53345eb9))\n- **appium:** properly validates config files containing extension config ([b7c230c](https://github.com/appium/appium/commit/b7c230c1e9da9206ea050387bc72c5dda3b31620))\n- **appium:** remove extra logging from config-file ([7381a13](https://github.com/appium/appium/commit/7381a13da3e76f7051639d3ab2ba376fbb625e80))\n- **appium:** restore missing call to validate extensions ([1a860ca](https://github.com/appium/appium/commit/1a860cade2fd3eac151c81c4efcd11364ee35479))\n- **appium:** stop calling plugins 'sessionless' since the name is immutable ([ead3e07](https://github.com/appium/appium/commit/ead3e0723f912a2c7e825d397fe2d4272ce3d6d0))\n\n### Features\n\n- **appium:** allow plugins to react to unexpected session shutdowns ([fff6b2e](https://github.com/appium/appium/commit/fff6b2eb004166fc147251c513086b72be857fbd))\n- **appium:** configuration file and schema support ([d52c36e](https://github.com/appium/appium/commit/d52c36e1eaaccc8b47de514bdeeef55ac348ecb8))\n\n# [2.0.0-beta.19](https://github.com/appium/appium/compare/appium@2.0.0-beta.18...appium@2.0.0-beta.19) (2021-11-09)\n\n**Note:** Version bump only for package appium\n\n# [2.0.0-beta.18](https://github.com/appium/appium/compare/appium@2.0.0-beta.17...appium@2.0.0-beta.18) (2021-09-16)\n\n**Note:** Version bump only for package appium\n\n# [2.0.0-beta.17](https://github.com/appium/appium/compare/appium@2.0.0-beta.16...appium@2.0.0-beta.17) (2021-09-16)\n\n**Note:** Version bump only for package appium\n\n# [2.0.0-beta.16](https://github.com/appium/appium/compare/appium@2.0.0-beta.15...appium@2.0.0-beta.16) (2021-09-15)\n\n### Features\n\n- **appium:** add env var to trigger reloading of extensions ([ff3bb4f](https://github.com/appium/appium/commit/ff3bb4f4b538ee5136fdc6356ca00e09fcdc5533))\n\n# [2.0.0-beta.15](https://github.com/appium/appium/compare/appium@2.0.0-beta.14...appium@2.0.0-beta.15) (2021-09-14)\n\n**Note:** Version bump only for package appium\n\n# [2.0.0-beta.14](https://github.com/appium/appium/compare/appium@2.0.0-beta.13...appium@2.0.0-beta.14) (2021-09-14)\n\n### Features\n\n- **appium:** support plugin-specific args via --plugin-args ([c8f12d1](https://github.com/appium/appium/commit/c8f12d1e95b84e225def500a05fddf440df8991a))\n\n# [2.0.0-beta.13](https://github.com/appium/appium/compare/appium@2.0.0-beta.12...appium@2.0.0-beta.13) (2021-08-16)\n\n# 2.0.0-beta (2021-08-13)\n\n### Bug Fixes\n\n- **appium:** load plugins before main server to allow plugin monkeypatching ([#15441](https://github.com/appium/appium/issues/15441)) ([52f4fc6](https://github.com/appium/appium/commit/52f4fc6a2cbdb612888ab2a23a704be32594a006))\n- **appium:** update references to @appium/support ([9295d0c](https://github.com/appium/appium/commit/9295d0c68284443ecd73add1f8fe0ff7910a7d7d))\n- **appium:** use proper base driver package & random ports ([e14d4fb](https://github.com/appium/appium/commit/e14d4fbd0fce16f208569b0cb9149b6307f78a5f))\n- **appium:** when updating extensions, make sure to actually remove the previous one first to avoid npm reinstall issues ([4839419](https://github.com/appium/appium/commit/483941974881bf2ad362c6e6cc35883743abcd2a))\n- **appium:** when updating extensions, package fields should also be updated in extensions.yaml ([756688b](https://github.com/appium/appium/commit/756688bddb624a6e9a5b5b6403db76eac65774f3))\n- do not assume git root and package.json have the same parent dir ([3c5fba7](https://github.com/appium/appium/commit/3c5fba7b38e02f4216d3a26340948d070f7ea9d9))\n- doc generation ([9e33c7a](https://github.com/appium/appium/commit/9e33c7ac1135306c6f0d1ff83b8076aecb54c554))\n- e2e-tests ([2499b49](https://github.com/appium/appium/commit/2499b49936660280eefaeb26cb3e4e9f82e36c20))\n- use random test port ([935b1f8](https://github.com/appium/appium/commit/935b1f80a47e89ccdf81781f35be5123bf8673d5))\n\n### Features\n\n- add \"run\" command to the client interface in order to allow running driver-defined scripts ([#15356](https://github.com/appium/appium/issues/15356)) ([a265476](https://github.com/appium/appium/commit/a2654762b6a9156380bcdf53df4cb0a8deb061fa))\n- **appium:** Add driver and plugin server arg injection feature ([#15388](https://github.com/appium/appium/issues/15388)) ([d3c11e3](https://github.com/appium/appium/commit/d3c11e364dffff87ac38ac8dc3ad65a1e4534a9a))\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/README.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n

\n \n \"Appium\"\n \n

\n

\n Cross-platform test automation for native, hybrid, mobile web and desktop apps.\n

\n\n
\n\n[![NPM version](https://badge.fury.io/js/appium.svg)](https://npmjs.org/package/appium)\n[![Monthly Downloads](https://img.shields.io/npm/dm/appium.svg)](https://npmjs.org/package/appium)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium?ref=badge_shield)\n[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/)\n[![CeasefireInGaza](https://img.shields.io/badge/Ceasefire_Now-%F0%9F%87%B5%F0%9F%87%B8-red?style=flat)](https://www.unrwa.org/)\n\n
\n\n***\n\n

\n Documentation |\n Get Started |\n Ecosystem |\n Changelog |\n Contributing Guide |\n Discussion Forum\n

\n\n***\n\nAppium is an open-source automation framework that provides\n[WebDriver](https://www.w3.org/TR/webdriver/)-based automation possibilities for a wide range of\ndifferent mobile, desktop and IoT platforms. Appium is modular and extensible, and supports multiple\nprogramming languages, which means there is an entire ecosystem of related software:\n* [__Drivers__](#drivers) add support for automating specific platforms\n* [__Clients__](#clients) allow writing Appium tests in your programming language of choice\n* [__Plugins__](#plugins) allow to further extend Appium functionality\n\n## Upgrading From Older Versions\n\nThe Appium team only provides support for the most recent version of Appium. If you wish to upgrade from\nan older major Appium version, please refer to the migration guides:\n\n* [Appium v2 to v3](https://appium.io/docs/en/latest/guides/migrating-2-to-3/)\n* [Appium v1 to v2](https://appium.io/docs/en/latest/guides/migrating-1-to-2/)\n\n## Installation\n\nAppium can be installed using `npm` (other package managers are not currently supported). Please\ncheck the [installation docs](http://appium.io/docs/en/latest/quickstart/install/) for the\nsystem requirements and further information.\n\nIf upgrading from Appium 1, make sure Appium 1 is fully uninstalled (`npm uninstall -g appium`).\nUnexpected errors might appear if this has not been done.\n\n```bash\nnpm i -g appium\n```\n\nNote that this will only install the core Appium server, which cannot automate anything on its own.\nPlease install [drivers](#drivers) for your target platforms in order to automate them.\n\n## Drivers\n\nAppium supports app automation across a variety of platforms, like iOS, Android, macOS, Windows,\nand more. Each platform is supported by one or more \"drivers\", which know how to automate that\nparticular platform. You can find a full list of officially-supported and third-party drivers in\n[Appium Ecosystem's Drivers page](http://appium.io/docs/en/latest/ecosystem/drivers/).\n\nDriver management is done using [Appium's Extension command-line interface](http://appium.io/docs/en/latest/cli/extensions/):\n\n```bash\n# Install an official driver from npm (see documentation for a list of such drivers)\nappium driver install \n# Install any driver from npm\nappium driver install --source=npm \n# See documentation for installation from other sources\n\n# List already installed drivers\nappium driver list --installed\n# Update a driver (it must be already installed)\n# This will NOT update the major version, in order to prevent breaking changes\nappium driver update \n# Update a driver to the most recent version (may include breaking changes)\nappium driver update --unsafe\n# Uninstall a driver (it won't last forever, will it?)\nappium driver uninstall \n```\n\n## Clients\n\nClient libraries enable writing Appium tests in different programming languages. There are\nofficially-supported clients for Java, Python, Ruby, and .NET C#, as well as third-party clients\nfor other languages. You can find a full list of clients in\n[Appium Ecosystem's Clients page](http://appium.io/docs/en/latest/ecosystem/clients/).\n\n## Plugins\n\nPlugins allow you to extend server functionality without changing the server code. The main\ndifference between drivers and plugins is that the latter must be explicitly enabled on\nAppium server startup (all installed drivers are enabled by default):\n\n```bash\nappium --use-plugins=\n```\n\nYou can find a full list of officially-supported and third-party plugins in\n[Appium Ecosystem's Plugins page](http://appium.io/docs/en/latest/ecosystem/plugins/).\n\nSimilarly to drivers, plugin management is also done using\n[Appium's Extension command-line interface](http://appium.io/docs/en/latest/cli/extensions/):\n\n```bash\n# Install an official plugin from npm (see documentation for a list of such plugins)\nappium plugin install \n# Install any plugin from npm\nappium plugin install --source=npm \n# See documentation for installation from other sources\n\n# List already installed plugins\nappium plugin list --installed\n# Update a plugin (it must be already installed)\n# This will NOT update the major version, in order to prevent breaking changes\nappium plugin update \n# Update a plugin to the most recent version (may include breaking changes)\nappium plugin update --unsafe\n# Uninstall a plugin\nappium plugin uninstall \n```\n\n## Server Command Line Interface\n\nIn order to start sending commands to the Appium server, it must be running on the URL and port\nwhere your client library expects it to listen. [Appium's command-line interface](http://appium.io/docs/en/latest/cli/server/)\nis used to launch and configure the server:\n\n```bash\n# Start the server on the default host (0.0.0.0) and port (4723)\nappium server\n# You can also omit the 'server' subcommand\nappium\n# Start the server on the given host, port and use a custom base path prefix (the default prefix is '/')\nappium --address 127.0.0.1 --port 9000 --base-path /wd/hub\n```\n\nAppium supports execution of parallel server processes, as well as parallel driver sessions within a\nsingle server process. Refer the corresponding driver documentations regarding which mode is optimal\nfor the particular driver or whether it supports parallel sessions.\n\n## Why Appium?\n\n1. You usually don't have to recompile your app or modify it in any way, due to the use of standard\n automation APIs on all platforms.\n2. You can write tests with your favorite dev tools using any WebDriver-compatible language such as\n Java, Python, Ruby and C#. There are also third party client implementations for other languages.\n3. You can use any testing framework.\n4. Some drivers like `xcuitest` and `uiautomator2` have built-in mobile web and hybrid app support.\n Within the same script, you can switch seamlessly between native app automation and webview\n automation, all using the WebDriver model that's already the standard for web automation.\n5. You can run your automated tests locally and in a cloud. There are multiple cloud providers that\n support various Appium drivers (mostly targeting iOS and Android mobile automation).\n6. [Appium Inspector](https://github.com/appium/appium-inspector) can be used to visually inspect\n the page source of applications across different platforms, facilitating easier test development.\n\nInvesting in the [WebDriver](https://w3c.github.io/webdriver/webdriver-spec.html) protocol means you\nare betting on a single, free, and open protocol for testing that has become a web standard. Don't\nlock yourself into a proprietary stack.\n\nFor example, if you use Apple's XCUITest library without Appium, you can only write tests using\nObj-C/Swift, and you can only run tests through Xcode. Similarly, with Google's UiAutomator or\nEspresso, you can only write tests in Java/Kotlin. Appium opens up the possibility of true\ncross-platform native app automation, for mobile and beyond!\n\nIf you are looking for a more comprehensive description of what this is all about, please read our\ndocumentation on [How Does Appium Work?](https://appium.io/docs/en/latest/intro/appium/).\n\n## Sponsors\n\nAppium has a [Sponsorship Program](GOVERNANCE.md#sponsorship)! If you or your company uses Appium\nand wants to give back financially to the project, we use these funds to [encourage development and\ncontributions](GOVERNANCE.md#compensation-scheme), as well as support other open source projects we\nrely on. [Become a sponsor](https://opencollective.com/appium) via our OpenCollective page.\n\n### Development and Strategic Partners\n\nAppium is incredibly grateful to our Development and Strategic Partners for their sustained\ncontribution of project development and leadership!\n\n

\n \n \n \n \n \"Browserstack\"/\n \n \n

\n\n

\n \n \n \n \n \"TestMu\n \n \n

\n\n### Other Sponsors\n\nA full list of sponsors is available at our [Sponsors page](https://appium.io/docs/en/latest/sponsors/).\n\n## License\n\n[Apache-2.0](./LICENSE)\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium?ref=badge_large)\n\n`@appium/logger` package is under [ISC](./packages/logger/LICENSE) License.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/driver.d.ts\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nexport * from '@appium/base-driver';\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/driver.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n'use strict';\n\n// @ts-check\n\n/**\n * This module is here to re-export `@appium/base-driver` for Appium extensions.\n *\n * @see https://npm.im/@appium/base-driver\n * @example\n * const { BaseDriver, errors } = require('appium/driver');\n */\n\n/** @type {import('@appium/base-driver')} */\nmodule.exports = require('@appium/base-driver');\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/index.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n#!/usr/bin/env node\n\nconst appium = require('./build/lib/main.js');\n\nif (require.main === module) {\n appium.main();\n}\n\nmodule.exports = appium;\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/package.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"name\": \"appium\",\n \"version\": \"3.2.0\",\n \"description\": \"Automation for Apps.\",\n \"keywords\": [\n \"automation\",\n \"javascript\",\n \"selenium\",\n \"webdriver\",\n \"ios\",\n \"android\",\n \"firefoxos\",\n \"testing\"\n ],\n \"homepage\": \"https://appium.io\",\n \"bugs\": {\n \"url\": \"https://github.com/appium/appium/issues\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/appium/appium.git\",\n \"directory\": \"packages/appium\"\n },\n \"license\": \"Apache-2.0\",\n \"author\": \"https://github.com/appium\",\n \"types\": \"./build/lib/main.d.ts\",\n \"bin\": {\n \"appium\": \"index.js\"\n },\n \"directories\": {\n \"lib\": \"./lib\"\n },\n \"files\": [\n \"lib\",\n \"build\",\n \"index.js\",\n \"driver.*\",\n \"support.*\",\n \"plugin.*\",\n \"scripts/autoinstall-extensions.js\",\n \"types\",\n \"tsconfig.json\",\n \"!build/tsconfig.tsbuildinfo\",\n \"!build/test\"\n ],\n \"scripts\": {\n \"build:docs\": \"node docs/scripts/build-docs.js\",\n \"build:docs:preview\": \"cross-env APPIUM_DOCS_PREVIEW=1 npm run build:docs\",\n \"build:docs:cli\": \"node docs/scripts/gen-cli-args-docs.js\",\n \"build:docs:reference\": \"node docs/scripts/build-reference.js\",\n \"dev:docs\": \"npm run dev:docs:en\",\n \"dev:docs:en\": \"appium-docs build --serve --mkdocs-yml ./docs/mkdocs-en.yml\",\n \"dev:docs:ja\": \"appium-docs build --serve --mkdocs-yml ./docs/mkdocs-ja.yml\",\n \"dev:docs:zh\": \"appium-docs build --serve --mkdocs-yml ./docs/mkdocs-zh.yml\",\n \"install-docs-deps\": \"appium-docs init --no-mkdocs\",\n \"postinstall\": \"node ./scripts/autoinstall-extensions.js\",\n \"publish:docs\": \"cross-env APPIUM_DOCS_PUBLISH=1 npm run build:docs\",\n \"test\": \"npm run test:unit\",\n \"test:e2e\": \"mocha --exit --timeout 1m --slow 30s \\\"./test/e2e/**/*.spec.js\\\"\",\n \"test:smoke\": \"cross-env APPIUM_HOME=./local_appium_home node ./index.js driver install uiautomator2 && cross-env APPIUM_HOME=./local_appium_home node ./index.js driver list\",\n \"test:unit\": \"mocha \\\"./test/unit/**/*.spec.js\\\"\"\n },\n \"dependencies\": {\n \"@appium/base-driver\": \"^10.2.0\",\n \"@appium/base-plugin\": \"^3.0.6\",\n \"@appium/docutils\": \"^2.2.1\",\n \"@appium/logger\": \"^2.0.4\",\n \"@appium/schema\": \"^1.0.1\",\n \"@appium/support\": \"^7.0.5\",\n \"@appium/types\": \"^1.2.0\",\n \"@sidvind/better-ajv-errors\": \"4.0.1\",\n \"ajv\": \"8.17.1\",\n \"ajv-formats\": \"3.0.1\",\n \"argparse\": \"2.0.1\",\n \"async-lock\": \"1.4.1\",\n \"axios\": \"1.13.4\",\n \"bluebird\": \"3.7.2\",\n \"lilconfig\": \"3.1.3\",\n \"lodash\": \"4.17.23\",\n \"lru-cache\": \"11.2.5\",\n \"ora\": \"5.4.1\",\n \"package-changed\": \"3.0.0\",\n \"resolve-from\": \"5.0.0\",\n \"semver\": \"7.7.3\",\n \"teen_process\": \"4.0.9\",\n \"type-fest\": \"5.4.3\",\n \"winston\": \"3.19.0\",\n \"ws\": \"8.19.0\",\n \"yaml\": \"2.8.2\"\n },\n \"engines\": {\n \"node\": \"^20.19.0 || ^22.12.0 || >=24.0.0\",\n \"npm\": \">=10\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"gitHead\": \"f7b20335eab4022e5cbbb627ec86866a994444f8\"\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/plugin.d.ts\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nexport * from '@appium/base-plugin';\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/plugin.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n'use strict';\n\n// @ts-check\n\n/**\n * This module is here to re-export `@appium/base-plugin` for Appium extensions.\n *\n * @see https://npm.im/@appium/base-plugin\n * @example\n * const { BasePlugin } = require('appium/plugin');\n */\n\nmodule.exports = require('@appium/base-plugin');\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/support.d.ts\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nexport * from '@appium/support';\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/support.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n'use strict';\n\n// @ts-check\n\n/**\n * This module is here to re-export `@appium/support` for Appium extensions.\n *\n * @see https://npm.im/@appium/support\n * @example\n * const { fs, npm } = require('appium/support');\n */\n\nmodule.exports = require('@appium/support');\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/tsconfig.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"extends\": \"@appium/tsconfig/tsconfig.json\",\n \"compilerOptions\": {\n \"rootDir\": \".\",\n \"outDir\": \"build\",\n \"paths\": {\n \"@appium/support\": [\"../support\"],\n \"@appium/base-driver\": [\"../base-driver\"],\n \"@appium/base-plugin\": [\"../base-plugin\"],\n \"@appium/types\": [\"../types\"],\n \"@appium/schema\": [\"../schema\"],\n \"appium\": [\".\"]\n },\n \"checkJs\": true\n },\n \"include\": [\"lib\", \"types\"],\n \"references\": [\n {\"path\": \"../schema\"},\n {\"path\": \"../types\"},\n {\"path\": \"../support\"},\n {\"path\": \"../base-driver\"},\n {\"path\": \"../base-plugin\"},\n {\"path\": \"../test-support\"}\n ]\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - navigation\n - toc\n\ntitle: Welcome\n---\n\n\n
\n \n
\n\nWelcome to the Appium documentation! Appium is an open-source project and ecosystem of related\nsoftware, designed to facilitate UI automation of many app platforms, including mobile (iOS,\nAndroid, Tizen), browser (Chrome, Firefox, Safari), desktop (macOS, Windows), TV (Roku, tvOS,\nAndroid TV, Samsung), and more!\n\n\n
\n Appium is extremely grateful for the support of its key partners! (Learn more about our\n sponsorship program and contributor compensation scheme here)\n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n\n## Explore the Documentation\n\n
\n\n- Check out the [__Introduction__](./intro/index.md) to make sure you understand the key concepts\n- Go through the [__Quickstart__](./quickstart/index.md) to get set up and run a basic Android test\n- Visit the [__Ecosystem__](./ecosystem/index.md) page for a list of drivers, clients and plugins you may want to use\n- Consult the [__Reference__](./reference/index.md) page for information on the Appium CLI and supported endpoints\n- Read the different [__Guides__](./guides/migrating-2-to-3.md) for a variety of instructions, tips and tricks\n- Check out various third-party [__Resources__](./resources/index.md) to explore Appium around the web\n- For creating your own Appium extensions, see the [__Developer__](./developing/index.md) documentation\n- For contributions to Appium itself, refer to the [__Contributing__](./contributing/index.md) page\n- Have a look at the [__Appium Blog__](./blog/index.md) to learn what's new in the project\n\n
\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/blog/posts/announcing-appiumconf2024.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - srini\n - sai\ndate: 2024-07-13\n---\n\n# Appium Conf 2024: Call for Proposals Now Open!\n\nWe're thrilled to announce that Appium Conf is back and going online for 2024! This is the official Appium conference where you can learn all about what's new in Appium 2.0 and explore the latest in automating tests for devices, mobile apps, and desktop applications.\n\n\n
\n \n \"Appium\n\n
\n\n\n## Mark Your Calendars: September 13, 2024\n\nJoin us on September 13, 2024, for a full day of inspiring and practical talks from the Appium team and the world's top mobile testing and automation experts. With Appium 2.0 now well-established, this is your opportunity to dive deep and learn how to maximize its potential.\n\n## Why Attend Appium Conf 2024?\n\n1. **Gain Insights**: Hear interesting insights and inspiring case studies from global experts and the core Appium team.\n2. **Improve Your Strategy**: Gain valuable knowledge to enhance your own automation strategy.\n3. **Network**: Make connections with Appium users from around the globe.\n4. **Learn from Specialists**: Benefit from Appium specialists' expertise on a variety of topics.\n\n## Call for Proposals: Share Your Knowledge!\n\nWe're looking for a diverse range of speakers from around the globe who are eager to share innovative ideas and use-cases of mobile test automation. If you have experience with Appium and insights that could benefit the community of test practitioners, we want to hear from you!\n\nDon't miss this chance to contribute to the Appium community and showcase your expertise on a global stage.\n\n## How to Submit Your Proposal\n\nVisit our website at [https://appiumconf.com/](https://appiumconf.com/) and [Submit a Proposal](https://confengine.com/conferences/appium-conf-2024/proposals?utm_medium=referal&utm_source=appium.io&utm_campaign=launch). We're excited to see your innovative ideas and experiences with Appium!\n\n## Stay Tuned\n\nKeep an eye on our website and social media channels for updates on the conference schedule, keynote speakers, and more exciting details about Appium Conf 2024.\n\nJoin us in shaping the future of mobile and device test automation. Submit your proposal today and be part of this exciting event!\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/blog/posts/announcing-browserstack-as-strategic-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-06-10\n---\n\n# Announcing BrowserStack as Appium's Strategic Partner\n\nWe have another exciting announcement for you! As part of our recently-announced [sponsorship and\ncontributor compensation\nprogram](https://appium.io/docs/en/latest/blog/2024/05/14/announcing-appiums-sponsorship-program/),\nwe are obviously in need of significant funding to support giving back to our contributor\ncommunity. We are therefore extremely happy to announce one of our brand new exclusive Strategic Partners: BrowserStack!\n\n\n\n\n\nBrowserStack has long been recognized in the industry as having extensive support for Appium,\nallowing you to run functional and visual regression tests for your native and hybrid apps at scale\nacross a variety of devices and platforms.\n\nAs a token of this collaboration, BrowserStack is extending a special premium access of\nBrowserStack App Automate product to Appium users. Discover more about this special offer at\n[browserstack.com](https://www.browserstack.com/browserstack-appium?utm_campaigncode=701OW00000AoUTQYA3&utm_medium=partnered&utm_source=appium&utm_term=partannouncement)\n\nWith the decision to come on board as Strategic Partner, BrowserStack is making a huge investment\nin Appium and the Appium community. BrowserStack is very interested in supporting the development\nof the Appium contributor base, and is proud to be a key part of our contributor compensation\nscheme. Without Strategic Partners like BrowserStack, we would not be able to maintain such\na program! We welcome them with gratitude!\n\n**About BrowserStack**\n\nBrowserStack is the world\u2019s leading software testing platform powering over two million tests every\nday across 19 global data centers. BrowserStack helps Tesco, Shell, NVIDIA, Discovery, Wells Fargo,\nand over 50,000 customers deliver quality software at speed by moving testing to their Cloud.\nBrowserStack\u2019s platform provides instant access to 20,000+ real mobile devices on a highly reliable\ncloud infrastructure that effortlessly scales as testing needs grow. With BrowserStack, Dev and QA\nteams can move fast while delivering an amazing experience for every customer.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/blog/posts/announcing-headspin-as-development-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-06-06\n---\n\n# Announcing HeadSpin as Appium's Development Partner\n\nRecently, we announced a new [sponsorship and contributor compensation program](https://appium.io/docs/en/latest/blog/2024/05/14/announcing-appiums-sponsorship-program/) for the Appium\nproject. As part of this program, we felt it was important to have a place to recognize those\ncompanies who make an extremely valuable kind of contribution to the project: dedicated maintainer\ntime. Appium only survives because of the tireless efforts of the core maintainers, and some of us\nare only able to do this work because it is donated on behalf of our day jobs. We're therefore very\nexcited to announce our first Development Partner: HeadSpin!\n\n\n\n
\n \n
\n\nHeadSpin is a real device performance and UX analysis cloud, with full support for Appium. When you\nrun your Appium tests on HeadSpin, you get access to comprehensive performance reports about your\napp, including potential network, system resource, or user experience issues. HeadSpin supports\na variety of complex testing modes, including hooking up your own devices to the cloud, injecting\nand receiving video and audio to/from devices, working with media (streaming) platforms, and more.\n\nHeadSpin has been one of the Appium project's biggest supporters for a long time, and currently\nemploys two of Appium's core maintainers, donating a significant portion of their time towards the\ndevelopment, maintenance, support, and leadership of open source Appium repos. HeadSpin has also\nworked hard towards Appium's vision of a robust Appium ecosystem, contributing several\nHeadSpin-maintained Appium drivers and plugins to the community:\n\n- A [Roku TV driver](https://github.com/headspinio/appium-roku-driver)\n- A [Tizen TV driver](https://github.com/headspinio/appium-tizen-tv-driver/)\n- A [LG webOS TV driver](https://github.com/headspinio/appium-lg-webos-driver/)\n- A [Unity game automation plugin](https://github.com/headspinio/appium-altunity-plugin)\n\nThese are all free and open source Appium components that HeadSpin has donated to the community\nwith the goal of fostering collaboration in these areas of media app automation.\n\nLooking to the future, HeadSpin plans to continue supporting Appium in significant ways, both as\na Development Partner and a significant contributor to the Appium ecosystem. The Appium project is\ndeeply indebted to HeadSpin for all of its support, and is proud to take this moment to recognize\nHeadSpin as our first official Development Partner!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/blog/posts/announcing-lambdatest-as-development-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - sai\n - srini\ndate: 2025-11-25\n---\n\n# Announcing LambdaTest as Appium's Newest Development Partner\n\nAs part of our ongoing effort to recognize organizations that meaningfully support the Appium project through dedicated maintainer time, we are excited to welcome our newest Development Partner: LambdaTest!\nLambdaTest has long been an active participant in the automated testing ecosystem. Today, they are officially formalizing their commitment by investing people\u2014dedicated engineers who will directly support Appium's development, maintenance, and ecosystem growth.\nThis kind of hands-on contribution is crucial for ensuring Appium continues to evolve. We deeply value partners who empower their engineering teams to contribute code directly to open source rather than just sponsorship.\n\n\n\n\n\n\nLambdaTest engineers are already contributing actively across several key Appium repositories. Their current focus includes:\n **appium-mcp** \u2013 Supporting Appium's implementation of the Model Context Protocol (MCP) to drive forward modern AI-assisted capabilities.\n **appium-remote-xpc** \u2013 Contributing to the native macOS/XPC-based remote execution layer, essential for iOS automation.\n **appium-tun-tap** \u2013 Assisting in the development and maintenance of network virtualization and tunneling components for advanced testing scenarios.\n\nThese contributions strengthen critical infrastructure within the Appium ecosystem and demonstrate LambdaTest's commitment to deep technical involvement in the project's evolution.\nAbout LambdaTest\n\nLambdaTest\u2019s platform already serves a massive community of Appium users. As a GenAI-powered Quality Engineering Platform, they provide a full-stack testing cloud with 10,000+ real mobile devices and 3,000+ browsers.\nBeyond standard infrastructure, they are pushing the boundaries of test execution with AI-native test management and next-generation agents like KaneAI. By supporting Appium alongside Selenium, Playwright, and other major frameworks, LambdaTest helps teams orchestrate intelligent automation at cloud scale.\n\nLambdaTest will continue contributing people, code, and development expertise to strengthen Appium's core functionality. Their commitment represents a significant investment into the future of the framework, and we're thrilled to have them collaborating with us at this deeper level.\nThe Appium project is proud to recognize LambdaTest as our newest official Development Partner. We can't wait to see what we'll build together!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/blog/posts/announcing-lambdatest-as-strategic-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2025-07-01\n---\n\n# Announcing LambdaTest as Appium Strategic Partner\n\nAfter recently celebrating the 1-year anniversary of our [Sponsorship Program and Compensation\nScheme](https://appium.io/docs/en/latest/blog/2024/05/14/announcing-appiums-sponsorship-program/),\nthe Appium project is very excited to announce that LambdaTest\nis coming on board as one of our Strategic Partners!\n\n\n\n\n\nHaving long been active in the Appium community and the automated testing industry, LambdaTest is\nnow significantly stepping up their investment into these areas. With the decision to come on board\nas a Strategic Partner, LambdaTest will support the Appium project through financial contribution\nas well as contribution of code and project maintenance. Obviously, without the generous support of\npartners like LambdaTest, we would not be able to continue our contributor compensation scheme,\nwhich has seen the release of a substantial amount of funds to Appium maintainers and contributors\nover the last year. Thanks again to LambdaTest, and stay tuned for more collaboration updates\nthroughout the year!\n\n**About LambdaTest**\n\nLambdaTest is a GenAI-powered Quality Engineering Platform that empowers teams to test\nintelligently, smarter, and ship faster. Built for scale, it offers a full-stack testing cloud with\n10K+ real mobile devices and 3,000+ browsers. With AI-native test management, MCP servers, and\nagent-based automation, LambdaTest supports Selenium, Appium, Playwright, and all major frameworks.\nAI Agents like HyperExecute and KaneAI bring the power of AI and cloud into your software testing\nworkflow, enabling seamless automation testing with 120+ integrations. LambdaTest Agents accelerate\nyour testing throughout the entire SDLC, from test planning and authoring to automation,\ninfrastructure, execution, RCA, and reporting.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/blog/posts/announcing-sauce-labs-as-strategic-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-06-10\n---\n\n# Announcing Sauce Labs as Appium's Strategic Partner\n\nThe good news surrounding our new [sponsorship and contributor compensation\nprogram](https://appium.io/docs/en/latest/blog/2024/05/14/announcing-appiums-sponsorship-program/)\njust keeps coming! Effective immediately we are fortunate and excited to be able to welcome a new Strategic Partner to\nthe Appium project: Sauce Labs!\n\n\n\n
\n \n
\n\nSauce Labs has a long history of support for the Appium project. In fact, Appium was initially\nincubated at Sauce Labs under the direction of [@jlipps](https://github.com/jlipps), in the early\ndays of mobile automation. Sauce Labs always envisioned Appium as being a project for and by the\ncommunity, and cemented this perspective in 2016 with the donation of Appium to the JS Foundation\n(now the [OpenJS Foundation](https://openjsf.org/)). To this day, developers associated with Sauce\nLabs continue to help maintain various parts of the Appium project.\n\nNow, Sauce Labs is making a further commitment to support Appium financially as a way to enable\nour new contributor compensation program. We're very excited about this program as a vehicle for\ngetting more people involved in Appium's development and maintenance. With the help of Strategic\nPartners like Sauce Labs, our project will be better able to meet the needs of our constantly\ngrowing userbase, and attract new developers (like you?) to build the Appium ecosystem together.\nNeedless to say, we are extremely grateful for Sauce Labs's support!\n\n**About Sauce Labs**\n\nSauce Labs is the leader in continuous quality. Our Platform for Test helps organizations transform software testing from a chore to a competitive advantage. With decades of expertise and deep roots in the Selenium and Appium open source communities, high performing software teams use our platform to execute any testing workload across thousands of different devices, browsers, and operating systems\u2014anywhere, any time, and at any scale. For more information, please visit [saucelabs.com](https://saucelabs.com).\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/blog/posts/announcing-sponsorship-program.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-05-14\n---\n\n# Announcing Appium's Sponsorship Program\n\nOver the last several months, the Appium team has been working on a sponsorship program that is\ndesigned to help give back to Appium's contributors as well as to recognize important partner\nindividuals or companies in the industry. This program is now officially launching! Let's dive into\nsome of the details.\n\n\n\nFirst of all, the details and fine print will always be available at Appium's [Governance\ndocument](https://github.com/appium/appium/blob/master/GOVERNANCE.md), which outlines how the\nproject is run, who makes project decisions, etc... This document will be kept up to date with the\nlatest details of the program, so that's the place to bookmark for reference!\n\nAs of now, Appium has opened up sponsorship opportunities via our [OpenCollective\npage](https://opencollective.com/appium). OpenCollective is a service which allows people to donate\nto open source groups. We've defined a number of giving tiers for donations, within a very wide\nrange, and welcome any financial amount with gratitude! Based on the donation tier, sponsorship\ncomes with a variety of benefits, including recognition at different places in the Appium repo,\ndocs, and website. In addition to financial sponsorship, the project has decided to recognize\nsignificant donations of project leadership and maintenance efforts from companies who have\ninvested heavily into Appium with their employees' time (we call these \"Development Partners\").\n\nWhat will the project do with the funds raised through this sponsorship program? We aim to give it\nall back to the Appium community! With the details again available at our [Governance document](https://github.com/appium/appium/blob/master/GOVERNANCE.md),\nwe have implemented a scheme very much inspired by our friends at [WebdriverIO](https://webdriver.io/blog/2024/02/15/new-contributor-stipend-program) (thanks WDIO\nfriends!) There are three groups of contributors to Appium that this scheme supports: (1) project\nmaintainers (those who devote consistent time to leading the project), (2) project contributors\n(anyone in the wider community that contributes code or documentation), and (3) upstream projects\n(other open source projects Appium relies heavily on to work well). Each month, the funds raised\nvia sponsorship will be distributed in different amounts to each of these groups. So if you\nmake a valuable contribution to Appium moving forward, you'll be eligible to get some cash as\na thank-you! (You'll need to have your own OpenCollective account in good standing to receive\nfunds).\n\nWe're very excited about this new program, and hope that it helps existing and new contributors to\nfeel even better about donating their time to making Appium better. And of course, none of this\nwould be possible without the amazing Partners and Sponsors we hope to attract! On that note, stay\ntuned over the next few weeks as we unveil some of our initial program launch Partners! And if you\nor your company would like to participate by supporting Appium financially, you are most welcome.\nJust head over to our OpenCollective page and choose the tier that reflects your desired\ncontribution level.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/blog/posts/appium3.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - sai\n - srini\n - jlipps\ndate: 2025-08-07\n---\n\n# \ud83d\ude80 Appium 3\n\nAppium 3 is here \u2014 and while it's not as massive a leap as Appium 2, it introduces a few essential\nbreaking changes that developers and QA engineers should be aware of.\n\n\n\nThe main idea behind Appium 3 is to clear out old cruft so that Appium can be leaner moving\nforward, and rely on newer versions of software with better performance and security\ncharacteristics. We're also getting rid of legacy behaviors and protocols that we deprecated as\npart of Appium 2.\n\nFor you as a user, there's not much to worry about. The breaking changes are minimal:\n\n- Node.js / NPM minimum version bump (to 20.19 / 10)\n- Removal of certain deprecated endpoints\n- Security feature flag prefix requirements (e.g. `adb_shell` to `uiautomator2:adb_shell`)\n\nIn terms of new features, we've been adding them incrementally rather than saving them up for\nAppium 3. But with this release we are excited to share these new capabilities:\n\n- `appium plugin install inspector` (Use Appium to host the Inspector rather than downloading it as a separate app)\n- Clients can set the `X-Appium-Is-Sensitive` HTTP header on requests to direct the server to mask the data in the request in the logs, so that when you send a password into an input box, the password's actual value is not logged in plaintext. ([Learn more](../../developing/sensitive.md))\n\nOf course, we have a full [Appium 3 migration guide](../../guides/migrating-2-to-3.md) to make sure\nyou know all the details and can deeply understand the consequences of upgrading to Appium 3 in\nyour environment.\n\n---\n\n**Ready to make the leap?** Appium 3 is a great step forward in creating more secure, maintainable,\nand W3C-compliant test automation pipelines. Happy testing!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/blog/posts/hello-world.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-03-07\n---\n\n# Hello World!\n\nThis is the first post in the Appium blog. There's not much to see here yet. We're creating this\nspace so we can make announcements or post other news, or information about events, that don't\nreally fit inside the documentation itself.\n\n\n\nStay tuned for more!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/contributing/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - navigation\n\ntitle: Contributing to Appium\n---\n\nThe Appium project would not exist without the many contributions of code, documentation,\nmaintenance, and support from companies and volunteers. As such, we welcome contributions!\n\nThere are a lot of different ways to help the project - see below for everything you can do and the\nprocesses to follow for each contribution method. Note that no matter how you contribute, your\nparticipation is governed by our [Code of Conduct](https://github.com/appium/appium/blob/master/CONDUCT.md).\n\n## Join the Discussion Forum\n\nYou don't need to know the internals of Appium to be able to contribute! If you have experience with\nusing Appium and feel like sharing your knowledge with others, consider helping out users on the\nAppium forums at [discuss.appium.io](https://discuss.appium.io/). Hop on over and see if there are\nany questions that you can answer.\n\n## Report Bugs or Feature Requests\n\nIf you've encountered a bug, or have a cool feature in mind that you think Appium should support,\nmake sure to let us know at our [GitHub issue tracker](https://github.com/appium/appium/issues).\nPlease use the appropriate issue form template when creating your issue.\n\n## Triage Issues\n\nIn addition to creating issues, you can also help us investigate already reported issues. All you\nneed is enough familiarity with Appium to try and reproduce bugs.\n\nYou can get started by checking our [GitHub issue tracker](https://github.com/appium/appium/issues)\nfor issues with labels such as `Needs Triage` or `Needs Info`, and leaving relevant comments:\n\n- If the issue is a duplicate, drop a link to the original issue\n- If the user has not provided enough information (such as Appium logs), ask them for more details\n- If you can reproduce the problem on your own environment, provide all the information that you think\n would help us track down the cause of the issue\n\nFor further information on triaging Appium issues (for any Appium project repository), please contact\nany member of the [Technical Committee](https://github.com/appium/appium/blob/master/GOVERNANCE.md#the-technical-committee).\n\n## Contribute Code\n\nWe are always open to pull requests for improving the Appium code or documentation!\n\n!!! info\n\n Developer information may not be kept up to date as frequently as user-facing information, or\n it may be most relevant in its current form on the online repository, not in this published\n version. Make sure to check the repo or discuss with maintainers. We would be glad to help\n new contributors get started!\n\nStart by cloning the repository (we recommend [forking](https://github.com/appium/appium/fork)\nit first):\n```sh\ngit clone https://github.com/appium/appium.git\ncd appium\n```\n\n!!! info\n\n If you are VS Code user, you can easily check out the project using [Runme](https://runme.dev/api/runme?repository=https%3A%2F%2Fgithub.com%2Fappium%2Fappium.git&fileToOpen=packages%2Fappium%2Fdocs%2Fen%2Fcontributing%2Findex.md).\n\nInstall dependencies:\n```sh\nnpm install\n```\n\nFrom here on there are several things you can do.\n\nBuild the project:\n```sh\nnpm run build\n```\n\nBuild the project and watch for changes:\n```sh\nnpm run dev\n```\n\nStart the locally built Appium server:\n```sh\nnpm start\n```\n\nRun various tests:\n```sh\nnpm run lint\nnpm run test:unit\nnpm run test:types\nnpm run test:smoke\nnpm run test:e2e\nnpm run test:quick # unit and types\nnpm run test:slow # everything\n```\n\nYou can also run tests for specific workspaces, e.g.:\n\n```sh\nexport APPIUM_WORKSPACE=@appium/base-driver\nnpm run test:unit -w $APPIUM_WORKSPACE\n```\n\n### Documentation\n\nThe documentation for this project is [available in the project repository itself](https://github.com/appium/appium/tree/master/packages/appium/docs).\nIt is contained in Markdown files, which are built by our documentation system in the\n`@appium/docutils` module. This module is based on [MkDocs](https://www.mkdocs.org/) and therefore\nrequires [Python](https://www.python.org/) to be installed on your system.\n\nInstall Python dependencies:\n```sh\nnpm run install-docs-deps\n```\n\nAfter making your changes, you can run the documentation server in dev mode:\n```sh\nnpm run dev:docs\n```\n\nYou can then view the documentation at `http://127.0.0.1:8000/docs/en`.\n\n## Translating Appium Documentation\n\nThe process of Appium documents localization into languages other than English is automated and is done via\nthe [Crowdin Translations Management System](https://crowdin.com). Do not edit any translated documents\ndirectly in the GitHub Appium repository as they are going to be replaced with ones exported from Crowdin\nduring an upcoming sync.\n\n### Where To Start\n\nIf you would like to contribute to the translation of Appium documents into your language then simply join\nthe translators group for the [Appium Documentation](https://crowdin.com/project/appium-documentation)\nCrowdin project, and start translating documents there. If you see that your language is missing from\nthe list of available Crowdin languages then simply let us know by creating an\n[issue](https://github.com/appium/appium/issues).\n\n### Source Language Updates\n\nChanges in documents are synchronized to Crowdin automatically via the `Update Crowdin English Docs` GitHub action.\nThis action is triggered automatically as soon as there are any changes under `packages/appium/docs/en/**.md`\nor `packages/appium/docs/mkdocs-en.yml`.\n\n### Fetching Translated Documents\n\nIn order to fetch translated files from Crowdin to the GitHub repository it is necessary to trigger\nthe `Sync Crowdin Docs Translations` action. This action should also automatically create a PR with\ncorresponding translated resources included.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/developing/build-docs.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Building Documentation\n---\n\nOnce you've [built a driver](./build-drivers.md) or [built a plugin](./build-plugins.md) for Appium,\nyou will hopefully want to document how that extension works for your users. The most basic way of\ndoing this is to write up a quick `README.md` and keep it in the root of your project's repository.\nHowever, this can involve a lot of effort.\n\nThe Appium project has built tools to help with this, and we've packaged up these tools so our\necosystem developers building drivers and plugins can _also_ use them. The best way to get going\nwith these tools is probably to look at an existing Appium driver repo to see how it's done, for\nexample the [XCUITest driver repo](https://github.com/appium/appium-xcuitest-driver). But this guide\nwill outline the basic approach.\n\n### Conceptual architecture\n\nAppium settled on [MkDocs](https://www.mkdocs.org/) as a Markdown-based documentation site\ngenerator. It uses a Python toolchain (and not Node.js), but it turned out to be the best option\nfor our purposes. You can adjust this, but by default Appium's utilities also assume that you'll be\nusing the [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) theme/extension for\nMkDocs.\n\nIn order to make different versions of your docs available (one for each minor release of your\nextension, typically), we also bundle [Mike](https://github.com/jimporter/mike).\n\nFrom here, building a basic docs site is as easy as collecting your Markdown files together and\ndefining how you want them to be organized.\n\n### Prerequisites\n\nTo take advantage of Appium's documentation utilities, you'll need to install:\n\n- [Python v3+](https://www.python.org/downloads/)\n- [pip](https://pip.pypa.io/en/stable/installation/) (this may be installed automatically with Python)\n- The `@appium/docutils` package:\n\n ```bash\n npm install --save-dev @appium/docutils\n ```\n\n### Initializing an Extension for Building Docs\n\nTo prepare your extension for generating documentation, run the following command:\n\n```bash\nnpx appium-docs init\n```\n\nThis will:\n\n1. Create a `tsconfig.json` if one does not already exist. This is necessary even if your extension\nis not written in TypeScript.\n2. Create a `mkdocs.yml` with the necessary configuration for MkDocs.\n\n### Documenting Your Extension\n\nAt this point, you can begin documenting your extension. By default, MkDocs will look for Markdown\nfiles in the `docs` directory. You can therefore create your Markdown documentation files, place\nthem in `docs`, and add links to these files in `mkdocs.yml`.\n\nRefer to the [MkDocs documentation](https://www.mkdocs.org/user-guide/writing-your-docs/) for\ninformation on how to organize and structure your documentation. \n\n### Building the Docs\n\nAt this point, you can use the `appium-docs` CLI tool. Run this tool with no arguments to get the\nfull help output and see all the available subcommands and parameters. Here are a few usage\nexamples:\n\n```bash\n# Generate reference and build the mkdocs site into the site dir\nnpx appium-docs build\n\n# Same as build, but host the docs on a local dev server\n# and watch for changes and rebuild when files change\nnpx appium-docs build --serve\n\n# Build the docs and deploy them with mike versioning to the docs-site branch\n# using the included commit message.\n# This is particularly useful for pushing content to a GitHub pages branch!\nnpx appium-docs build \\\n --deploy \\\n -b docs-site \\\n -m 'docs: auto-build docs for appium-xcuitest-driver@%s'\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/developing/build-doctor-checks.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Building Doctor Checks\n---\n\nThe idea of Appium Doctor is to assist users with driver or plugin preconditions setup. Sometimes such\npreconditions might be quite complicated and require non-trivial technical knowledge. Doctor checks,\nwhich are vanilla Node.js class instances written by extension authors, simplify\nthe setup process by automating diagnostics and possible fixes for the found issues. These checks\nmight also be interactive to ensure better usage experience.\n\nThis tutorial is supposed to be used by plugin or driver authors that would like to help their users\nto deal with complicated setup or configuration steps.\n\n## Adding Doctor Checks\n\n### Typing Requirements\n\nThe term `Doctor Check` literally describes a single javascript class instance that implements the\n[IDoctorCheck interface](https://github.com/appium/appium/blob/master/packages/types/lib/doctor.ts).\nThe interface defines the following methods and properties:\n\n- `diagnose(): Promise`: Contains the code to diagnose a possible issue\n- `fix(): Promise`: Either fixes the actual problem if `hasAutofix()` returns true or\n returns a string description for possible manual fixes. If this method throws an exception named\n `FixSkippedError` and `hasAutofix()` returns true then the result of the method invocation\n is going to be ignored.\n- `hasAutofix(): boolean`: Whether calling `fix()` would resolve the found issue\n- `isOptional(): boolean`: Whether the found issue can be ignored and is not a showstopper\n- `log: AppiumLogger`: May be used for logging. This property may be assigned\n by the instance itself or by the Appium server if it is left unassigned.\n\nThe `DoctorCheckResult` object returned by the `diagnose()` method must contain the following properties:\n\n- `ok: boolean`: Whether the diagnosis found no issues\n- `optional: boolean`: Whether the diagnosed issue is safe to ignore\n- `message: string`: The text message describing the diagnostic result\n\n### Manifest Requirements\n\nA single extension may export multiple Doctor checks to Appium. In order for these checks to be properly\npicked up by the server CLI after the corresponding extension is installed they might be listed in the\npackage .json manifest under the `appium.doctor.checks` section similar to the definition below:\n\n```json\n // ...\n \"appium\": {\n \"driverName\": \"fake\",\n \"automationName\": \"Fake\",\n \"platformNames\": [\n \"Fake\"\n ],\n \"mainClass\": \"FakeDriver\",\n \"schema\": \"./build/lib/fake-driver-schema.js\",\n \"scripts\": {\n \"fake-error\": \"./build/lib/scripts/fake-error.js\",\n \"fake-success\": \"./build/lib/scripts/fake-success.js\",\n \"fake-stdin\": \"./build/lib/scripts/fake-stdin.js\"\n },\n \"doctor\": {\n \"checks\": [\n \"./doctor/fake1.js\",\n \"./doctor/fake2.js\"\n // ...\n ]\n }\n },\n // ...\n```\n\nAlso, it makes sense to include the [@appium/types](https://www.npmjs.com/package/@appium/types) import\nto the package dev dependencies.\n\n### Implementation Example\n\nThe below example is a \"raw\" Node.JS implementation that does not use any transpilation:\n\n```js\nconst {fs, doctor} = require('@appium/support');\n\n/** @satisfies {import('@appium/types').IDoctorCheck} */\nclass EnvVarAndPathCheck {\n /**\n * @param {string} varName\n */\n constructor(varName) {\n this.varName = varName;\n }\n\n async diagnose() {\n const varValue = process.env[this.varName];\n if (typeof varValue === 'undefined') {\n return doctor.nok(`${this.varName} environment variable is NOT set!`);\n }\n\n if (await fs.exists(varValue)) {\n return doctor.ok(`${this.varName} is set to: ${varValue}`);\n }\n\n return doctor.nok(`${this.varName} is set to '${varValue}' but this is NOT a valid path!`);\n }\n\n async fix() {\n return (\n `Make sure the environment variable ${this.varName} is properly configured for the Appium server process`\n );\n }\n\n hasAutofix() {\n return false;\n }\n\n isOptional() {\n return false;\n }\n}\n\nconst androidHomeCheck = new EnvVarAndPathCheck('ANDROID_HOME');\n\nmodule.exports = {androidHomeCheck};\n\n/**\n * @typedef {import('@appium/types').DoctorCheckResult} CheckResult\n */\n```\n\nThis file could be saved as `doctor/android-home-check.js` and then added to the package.json manifest\nas\n\n```json\n // ...\n \"appium\": {\n // ...\n \"doctor\": {\n \"checks\": [\n \"./doctor/android-home-check.js\",\n ]\n }\n // ...\n },\n // ...\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/developing/build-drivers.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Building Drivers\n---\n\nAppium wants to make it easy for anyone to develop their own automation drivers as part of the\nAppium ecosystem. This guide will explain what's involved and how you can accomplish various driver\ndevelopment tasks using the tools Appium provides. This guide assumes you (1) are a competent user of\nAppium, (2) are a competent Node.js developer, and (3) that you have read and understood the\n[Driver Intro](../intro/drivers.md).\n\nIf that describes you, great! This guide will get you started.\n\n## Before you create your driver\n\nBefore you get to work implementing your driver, it's important to have a few things sorted out.\nFor example, you need to know what your driver will do. Which platform is it trying to expose\nWebDriver automation for?\n\nAppium doesn't magically give you the power to automate any platform. All it does is give you a set\nof convenient tools for implementing the WebDriver Protocol. So if you want to create, for example,\na driver for a new app platform, you'll need to know how to automate apps on that platform *without Appium*.\n\nThis usually means that you need to be very familiar with app development for a given platform. And\nit usually means that you will rely on tools or SDKs provided by the platform vendor.\n\nBasically, if you can't answer the question **\"how would I launch, remotely trigger behaviours, and\nread state from an app on this platform?\" then you're not quite ready to write an Appium driver**.\nMake sure you do the research to feel comfortable that there *is* a path forward. Once there is,\ncoding it up and making it available as an Appium driver should be the easy part!\n\n## Other drivers to reference\n\nOne of the greatest things about building an Appium driver is that there are already a number of\nopen source Appium drivers which you can look at for reference. There is\na [fake-driver](https://github.com/appium/appium/tree/master/packages/fake-driver) sample driver which\ndoes basically nothing other than showcase some of the things described in this guide.\n\nAnd of course, all of Appium's official drivers are open source and available in repositories at\nthe project's GitHub organization. So if you ever find yourself asking, \"how does a driver do X?\",\nread the code for these drivers! Also don't be afraid to ask questions of the Appium developers if\nyou get stuck; we're always happy to help make sure the driver development experience is a good\none!\n\n## Basic requirements for Appium drivers\n\nThese are the things your driver *must* do (or be), if you want it to be a valid Appium driver.\n\n### Node.js package with Appium extension metadata\n\nAll Appium drivers are fundamentally Node.js packages, and therefore must have a valid\n`package.json`. Your driver is not _limited_ to Node.js, but it must provide an adapter written in Node.js so it can be loaded by Appium.\n\nYour `package.json` must include `appium` as a `peerDependency`. The requirements for the\ndependency versions should be as loose as possible (unless you happen to know your driver will only\nwork with certain versions of Appium). For Appium 2, for example, this would look something like\n`^2.0.0`, declaring that your driver works with any version of Appium that starts with 2.x.\n\nYour `package.json` must contain an `appium` field, like this (we call this the 'Appium extension\nmetadata'):\n\n```json\n{\n ...,\n \"appium\": {\n \"driverName\": \"fake\",\n \"automationName\": \"Fake\",\n \"platformNames\": [\n \"Fake\"\n ],\n \"mainClass\": \"FakeDriver\"\n },\n ...\n}\n```\n\nThe required subfields are:\n\n* `driverName`: this should be a short name for your driver.\n* `automationName`: this should be the string users will use for their `appium:automationName`\n capability to tell Appium to use *your* driver.\n* `platformNames`: this is an array of one or more platform names considered valid for your driver.\n When a user sends in the `platformName` capability to start a session, it must be included in\n this list for your driver to handle the session. Known platform name strings include: `iOS`,\n `tvOS`, `macOS`, `Windows`, `Android`.\n* `mainClass`: this is a named export (in CommonJS style) from your `main` field. It must be a\n class which extends Appium's `BaseDriver` (see below).\n\n### Extend Appium's `BaseDriver` class\n\nUltimately, your driver is much easier to write because most of the hard work of implementing the\nWebDriver protocol and handling certain common logic is taken care of already by Appium. This is\nall encoded up as a class which Appium exports for you to use, called `BaseDriver`. It is exported\nfrom `appium/driver`, so you can use one of these styles to import it and create your *own* class\nthat extends it:\n\n```js\nimport {BaseDriver} from 'appium/driver';\n// or: const {BaseDriver} = require('appium/driver');\n\nexport class MyDriver extends BaseDriver {\n}\n```\n\n### Make your driver available\n\nThat's basically it! With a Node.js package exporting a driver class and with correct Appium\nextension metadata, you've got yourself an Appium driver! Now it doesn't *do* anything, but you can\nload it up in Appium, start and stop sessions with it, etc...\n\nTo make it available to users, you could publish it via NPM. When you do so, your driver will be\ninstallable via the Appium CLI:\n\n```\nappium driver install --source=npm \n```\n\nIt's a good idea to test your driver first, of course. One way to see how it works within Appium is\nto install it locally first:\n\n```\nappium driver install --source=local /path/to/your/driver\n```\n\n### Developing your driver\n\nHow you develop your driver is up to you. It is convenient, however, to run it from within Appium\nwithout having to do lots of publishing and installing. The most straightforward way to do this is\nto include the most recent version of Appium as a `devDependency`, and then also your own driver,\nlike this:\n\n```json\n{\n \"devDependencies\": {\n ...,\n \"appium\": \"^2.0.0\",\n \"your-driver\": \"file:.\",\n ...\n }\n}\n```\n\nNow, you can run Appium locally (`npm exec appium` or `npx appium`), and because your driver is\nlisted as a dependency alongside it, it will be automatically \"installed\" and available. You can\ndesign your e2e tests this way, or if you're writing them in Node.js, you can simply import\nAppium's start server methods to handle starting and stopping the Appium server in Node. (TODO:\nreference an implementation of this in one of the open source drivers when ready).\n\nAnother way to do local development with an existing Appium server install is to simply install\nyour driver locally:\n\n```\nappium driver install --source=local /path/to/your/driver/dev/dir\n```\n\n### Refreshing your driver during development\n\nWhen the Appium server starts, it loads your driver into memory. Changes to your driver code will\nnot take effect until the next time the Appium server starts. Simply starting a new session is not\nsufficient to cause your driver's code to be reloaded.\n\nHowever, you can set the `APPIUM_RELOAD_EXTENSIONS` environment variable to `1` to request that\nAppium clear its module cache and reload extensions whenever a new session is requested. This may\nobviate the need to restart the server when you make code changes to your driver.\n\n## Standard driver implementation ideas\n\nThese are things you will probably find yourself wanting to do when creating a driver.\n\n### Set up state in a constructor\n\nIf you define your own constructor, you'll need to call `super` to make sure all the standard state\nis set up correctly:\n\n```js\nconstructor(...args) {\n super(...args);\n // now do your own thing\n}\n```\n\nThe `args` parameter here is the object containing all the CLI args used to start the Appium\nserver.\n\n### Define and validate accepted capabilities\n\nYou can define your own capabilities and basic validation for them. Users will always be able to\nsend in capabilities that you don't define, but if they send in capabilities you have explicitly\ndefined, then Appium will validate that they are of the correct type (and will check for the\npresence of required capabilities).\n\nIf you want to turn capability validation off entirely, set `this.shouldValidateCaps` to `false` in\nyour constructor.\n\nTo give Appium your validation constraints, set `this.desiredCapConstraints` to a validation object\nin your constructor. Validation objects can be somewhat complex. Here's an example from the\nUiAutomator2 driver:\n\n```js\n{\n app: {\n presence: true,\n isString: true\n },\n automationName: {\n isString: true\n },\n browserName: {\n isString: true\n },\n launchTimeout: {\n isNumber: true\n },\n}\n```\n\n### Start a session and read capabilities\n\nAppium's `BaseDriver` already implements the `createSession` command, so you don't have to. However\nit's very common to need to perform your own startup actions (launching an app, running some\nplatform code, or doing different things based on capabilities you have defined for your driver).\nSo you'll probably end up overriding `createSession`. You can do so by defining the method in your\ndriver:\n\n```js\nasync createSession(jwpCaps, reqCaps, w3cCaps, otherDriverData) {\n const [sessionId, caps] = super.createSession(w3cCaps);\n // do your own stuff here\n return [sessionId, caps];\n}\n```\n\nFor legacy reasons, your function will receive old-style JSON Wire Protocol desired and required\ncaps as the first two arguments. Given that the old protocol isn't supported anymore and clients\nhave all been updated, you can instead only rely on the `w3cCaps` parameter. (For a discussion\nabout what `otherDriverData` is about, see the section below on concurrent drivers).\n\nYou'll want to make sure to call `super.createSession` in order to get the session ID as well as\nthe processed capabilities (note that capabilities are also set on `this.caps`; modifying `caps`\nlocally here would have no effect other than changing what the user sees in the create session\nresponse).\n\nSo that's it! You can fill out the middle section with whatever startup logic your driver requires.\n\n### End a session\n\nIf your driver requires any cleanup or shutdown logic, it's best to do it as part of overriding the\nimplementation of `deleteSession`:\n\n```js\nasync deleteSession() {\n // do your own cleanup here\n // don't forget to call super!\n await super.deleteSession();\n}\n```\n\nIt's very important not to throw any errors here if possible so that all parts of session cleanup\ncan succeed!\n\n### Access capabilities and CLI args\n\nYou'll often want to read parameters the user has set for the session, whether as CLI args or as\ncapabilities. The easiest way to do this is to access `this.opts`, which is a merge of all options,\nfrom the CLI or from capabilities. So for example to access the `appium:app` capability, you could\nsimply get the value of `this.opts.app`.\n\nIf you care about knowing whether something was sent in as a CLI arg *or* a capability, you can\naccess the `this.cliArgs` and `this.caps` objects explicitly.\n\nIn all cases, the `appium:` capability prefix will have been stripped away by the time you are\naccessing values here, for convenience.\n\n### Implement WebDriver classic commands\n\nYou handle WebDriver commands by implementing functions in your driver class. Each member of the\nWebDriver Protocol, plus the various Appium extensions, has a corresponding function that you\nimplement if you want to support that command in your driver. The best way to see which commands\nAppium supports and which method you need to implement for each command is to look at Appium's\n[routes.js](https://github.com/appium/appium/blob/master/packages/base-driver/lib/protocol/routes.js).\nEach route object in this file tells you the command name as well as the parameters you'd expect to\nreceive for that command.\n\nLet's take this block for example:\n```js\n'/session/:sessionId/url': {\n GET: {command: 'getUrl'},\n POST: {command: 'setUrl', payloadParams: {required: ['url']}},\n}\n```\n\nHere we see that the route `/session/:sessionId/url` is mapped to two commands, one for a `GET`\nrequest and one for a `POST` request. If we want to allow our driver to change the \"url\" (or\nwhatever that might mean for our driver), we can therefore implement the `setUrl` command, knowing\nit will take the `url` parameter:\n\n```js\nasync setUrl(url) {\n // your implementation here\n}\n```\n\nA few notes:\n- all command methods should be `async` functions or otherwise return a `Promise`\n- you don't need to worry about protocol encoding/decoding. You will get JS objects as params, and\n can return JSON-serializable objects in response. Appium will take care of wrapping it up in the\n WebDriver protocol response format, turning it into JSON, etc...\n- all session-based commands receive the `sessionId` parameter as the last parameter\n- all element-based commands receive the `elementId` parameter as the second-to-last parameter\n- if your driver doesn't implement a command, users can still try to access the command, and will\n get a `501 Not Yet Implemented` response error.\n\n### Implement WebDriver BiDi commands\n\n[WebDriver BiDi](https://w3c.github.io/webdriver-bidi) is a newer version of the WebDriver spec\nwhich is implemented over Websockets instead of HTTP. As an Appium driver author you can take\nadvantage of Appium's BiDi support without having to know anything about the BiDi protocol or\nWebsockets. Implementing handlers for BiDi commands works just the same as implementing handlers\nfor WebDriver classic commands (described in the previous section). You simply define a method on\nyour driver of the appropriate name, and it will be called when the BiDi command is requested by\nthe client. To see which specific names you should use for BiDi commands, have a look at\n[bidi-commands.js](https://github.com/appium/appium/blob/master/packages/base-driver/lib/protocol/bidi-commands.js)\n\nYou are not limited to BiDi commands that are defined in the official BiDi specification. If you\nwish to define new commands, you may do so; you just need to tell Appium about them! See\n[below](#extend-the-existing-protocol-with-new-commands) for more information.\n\n### Implement element finding\n\nElement finding is a special command implementation case. You don't actually want to override\n`findElement` or `findElements`, even though those are what are listed in `routes.js`. Appium does\na lot of work for you if instead you implement this function:\n\n```js\nasync findElOrEls(strategy, selector, mult, context) {\n // find your element here\n}\n```\n\nHere's what gets passed in:\n\n- `strategy` - a string, the locator strategy being used\n- `selector` - a string, the selector\n- `mult` - boolean, whether the user has requested one element or all elements matching the\n selector\n- `context` - (optional) if defined, will be a W3C Element (i.e., a JS object with the W3C element\n identifier as the key and the element ID as the value)\n\nAnd you need to return one of the following:\n\n- a single W3C element (an object as described above)\n- an array of W3C elements\n\nNote that you can import that W3C web element identifier from `appium/support`:\n\n```js\nimport {util} from 'appium/support';\nconst { W3C_WEB_ELEMENT_IDENTIFIER } = util;\n```\n\nWhat you do with elements is up to you! Usually you end up keeping a cache map of IDs to actual\nelement \"objects\" or whatever the equivalent is for your platform.\n\n### Define valid locator strategies\n\nYour driver might only support a subset of the standard WebDriver locator strategies, or it might\nadd its own custom locator strategies. To tell Appium which strategies are considered valid for\nyour driver, create an array of strategies and assign it to `this.locatorStrategies`:\n\n```js\nthis.locatorStrategies = ['xpath', 'custom-strategy'];\n```\n\nAppium will throw an error if the user attempts to use any strategies other than the allowed ones,\nwhich enables you to keep your element finding code clean and deal with only the strategies you\nknow about.\n\nBy default, the list of valid strategies is empty, so if your driver isn't simply proxying to\nanother WebDriver endpoint, you'll need to define some. The protocol-standard locator strategies\nare defined [here](https://www.w3.org/TR/webdriver/#locator-strategies).\n\n### Throw WebDriver-specific errors\n\nThe WebDriver spec defines a [set of error\ncodes](https://github.com/jlipps/simple-wd-spec#error-codes) to accompany command responses if an\nerror occurred. Appium has created error classes for each of these codes, so you can throw the\nappropriate error from inside a command, and it will do the right thing in terms of the protocol\nresponse to the user. To get access to these error classes, import them from `appium/driver`:\n\n```\nimport {errors} from 'appium/driver';\n\nthrow new errors.NoSuchElementError();\n```\n\n### Log messages to the Appium log\n\nYou can always use `console.log`, of course, but Appium provides a nice logger for you as\n`this.log` (it has `.info`, `.debug`, `.log`, `.warn`, `.error` methods on it for differing log\nlevels). If you want to create an Appium logger outside of a driver context (say in a script or\nhelper file), you can always construct your own too:\n\n```js\nimport {logging} from 'appium/support';\nconst log = logging.getLogger('MyDriver');\n```\n\n## Further possibilities for Appium drivers\n\nThese are things your driver *can* do to take advantage of extra driver features or do its job more\nconveniently.\n\n### Add a schema for custom command line arguments\n\nYou can add custom CLI args if you want your driver to receive data from the command line when the\nAppium server is started (for example, ports that a server administrator should set that should not\nbe passed in as capabilities.\n\nTo define CLI arguments (or configuration properties) for the Appium server, your extension must provide a _schema_. In\nthe `appium` property of your extension's `package.json`, add a `schema` property. This will either\na) be a schema itself, or b) be a path to a schema file.\n\nThe rules for these schemas:\n\n- Schemas must conform to [JSON Schema Draft-07](https://ajv.js.org/json-schema.html#draft-07).\n- If the `schema` property is a path to a schema file, the file must be in JSON or JS (CommonJS) format.\n- Custom `$id` values are unsupported. To use `$ref`, provide a value relative to the schema root, e.g., `/properties/foo`.\n- Known values of the `format` keyword are likely supported, but various other keywords may be unsupported. If you find a keyword that is unsupported which you need to use, please [ask for support](https://github.com/appium/appium/issues/new) or send a PR!\n- The schema must be of type `object` (`{\"type\": \"object\"}`), containing the arguments in a `properties` keyword. Nested properties are unsupported.\n\nExample:\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"test-web-server-port\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"maximum\": 65535,\n \"description\": \"The port to use for the test web server\"\n },\n \"test-web-server-host\": {\n \"type\": \"string\",\n \"description\": \"The host to use for the test web server\",\n \"default\": \"sillyhost\"\n }\n }\n}\n```\n\nThe above schema defines two properties which can be set via CLI argument or configuration file. If\nthis extension is a _driver_ and its name is \"horace\", the CLI args would be\n`--driver-horace-test-web-server-port` and `--driver-horace-test-web-server-host`, respectively.\nAlternatively, a user could provide a configuration file containing:\n\n```json\n{\n \"server\": {\n \"driver\": {\n \"horace\": {\n \"test-web-server-port\": 1234,\n \"test-web-server-host\": \"localhorse\"\n }\n }\n }\n}\n```\n\n### Add driver scripts\n\nSometimes you might want users of your driver to be able to run scripts outside the context of\na session (for example, to run a script that pre-builds aspects of your driver). To support this,\nyou can add a map of script names and JS files to the `scripts` field within your Appium extension\nmetadata. So let's say you've created a script in your project that lives in a `scripts` directory\nin your project, named `driver-prebuild.js`. Then you could add a `scripts` field like this:\n\n```json\n{\n \"scripts\": {\n \"prebuild\": \"./scripts/driver-prebuild.js\"\n }\n}\n```\n\nNow, assuming your driver is named `mydriver`, users of your driver can run `appium driver run\nmydriver prebuild`, and your script will execute.\n\n### Proxy commands to another WebDriver implementation\n\nA very common design architecture for Appium drivers is to have some kind of platform-specific\nWebDriver implementation that the Appium driver interfaces with. For example, the Appium\nUiAutomator2 driver interfaces with a special (Java-based) server running on the Android device. In\nwebview mode, it also interfaces with Chromedriver.\n\nIf you find yourself in this situation, it is extremely easy to tell Appium that your driver is\njust going to be proxying WebDriver commands straight to another endpoint.\n\nFirst, let Appium know that your driver *can* proxy by implementing the `canProxy` method:\n\n```js\ncanProxy() {\n return true;\n}\n```\n\nNext, tell Appium which WebDriver routes it should *not* attempt to proxy (there often end up being\ncertain routes that you don't want to forward on):\n\n```js\ngetProxyAvoidList() {\n return [\n ['POST', new RegExp('^/session/[^/]+/appium')]\n ];\n}\n```\n\nThe proxy avoidance list should be an array of arrays, where each inner array has an HTTP method as\nits first member, and a regular expression as its second. If the regular expression matches the\nroute, then the route will not be proxied and instead will be handled by your driver. In this\nexample, we are avoiding proxying all `POST` routes that have the `appium` prefix.\n\nNext, we have to set up the proxying itself. The way to do this is to use a special class from\nAppium called `JWProxy`. (The name means \"JSON Wire Proxy\" and is related to a legacy\nimplementation of the protocol). You'll want to create a `JWProxy` object using the details required to\nconnect to the remote server:\n\n```js\n// import {JWProxy} from 'appium/driver';\n\nconst proxy = new JWProxy({\n server: 'remote.server',\n port: 1234,\n base: '/',\n});\n\nthis.proxyReqRes = proxy.proxyReqRes.bind(proxy);\nthis.proxyCommand = proxy.command.bind(proxy);\n```\n\nHere we are creating a proxy object and assigning some of its methods to `this` under the names\n`proxyReqRes` and `proxyCommand`. This is required for Appium to use the proxy, so don't forget\nthis step! The `JWProxy` has a variety of other options which you can check out in the source code,\nas well. (TODO: publish options as API docs and link here).\n\nFinally, we need a way to tell Appium when the proxy is active. For your driver it might always\nbe active, or it might only be active when in a certain context. You can define the logic as an\nimplementation of `proxyActive`:\n\n```js\nproxyActive() {\n return true; // or use custom logic\n}\n```\n\nWith those pieces in play, you won't have to reimplement anything that's already implemented by the\nremote endpoint you're proxying to. Appium will take care of all the proxying for you.\n\n### Proxy BiDi commands to another BiDi implementation\n\nAll of the above about proxying WebDriver commands is conceptually also valid for proxying BiDi\ncommands specifically. In order to enable BiDi proxying, you need to implement `get bidiProxyUrl`\non your driver. This should return a Websocket URL which is the address of the upstream socket you\nwant BiDi commands to be proxied to.\n\nThe intended pattern here is for you to start a session on the upstream implementation, check\nwhether it has an active BiDi socket in the returned capabilities (e.g., the `webSocketUrl`\ncapability), and then to set an internal field to that value, so that it can be returned by `get\nbidiProxyUrl`. Once all this is in place, Appium will proxy BiDi commands from the client straight\nto the upstream connection.\n\n### Extend the existing protocol with new commands\n\nYou may find that the existing commands don't cut it for your driver. If you want to expose\nbehaviours that don't map to any of the existing commands, you can create new commands in one of\nthree ways:\n\n1. Extending the classic WebDriver protocol and creating client-side plugins to access the extensions via the classic HTTP interface\n1. Extending the WebDriver BiDi protocol with new modules and methods, accessed from a client via the BiDi interface\n1. Overloading the Execute Script command by defining [Execute\n Methods](../guides/execute-methods.md)\n\nIf you want to follow the first path, you can direct Appium to recognize new methods and add them\nto its set of allowed HTTP routes and command names. You do this by assigning the `newMethodMap`\nstatic variable in your driver class to an object of the same form as Appium's `routes.js` object.\nFor example, here is the `newMethodMap` for the `FakeDriver` example driver:\n\n```js\nstatic newMethodMap = {\n '/session/:sessionId/fakedriver': {\n GET: {command: 'getFakeThing'},\n POST: {command: 'setFakeThing', payloadParams: {required: ['thing']}},\n },\n '/session/:sessionId/fakedriverargs': {\n GET: {command: 'getFakeDriverArgs'},\n },\n};\n```\n\nIn this example we're adding a few new routes and a total of 3 new commands. For more examples of\nhow to define commands in this way, it's best to have a look through `routes.js`. Now all you need\nto do is implement the command handlers in the same way you'd implement any other Appium command.\n\nThe downside of this way of adding new commands is that people using the standard Appium clients\nwon't have nice client-side functions designed to target these endpoints. So you would need to\ncreate and release client-side plugins for each language you want to support (directions or\nexamples can be found at the relevant client docs).\n\nThe second way of adding new commands is adding them as BiDi commands (accessed via the BiDi\nwebsocket interface, rather than the classic HTTP interface). BiDi commands come in two parts:\na \"module\", which is basically a container or namespace, and a \"command\", which is the name of your\nnew command.\n\nAs with the first method, you teach Appium to recognize your new BiDi commands by adding a static\nfield to your driver class, called `newBidiCommands`. It has a format similar to `newMethodMap`.\nBasically it encapsulates information about the BiDi module, BiDi command name, reference to your\ndriver instance method that will handle the command, and required and optional parameters. Here's\nan example of a `newBidiCommands` as implemented on an imaginary driver:\n\n```js\nstatic newBidiCommands = {\n 'appium:video': {\n startFramerateCapture: {\n command: 'startFrameCap',\n params: {\n required: ['videoSource'],\n optional: ['showOnScreen'],\n }\n },\n stopFramerateCapture: {\n command: 'stopFrameCap',\n },\n }\n};\n```\n\nIn this imaginary example, we have defined two new BiDi commands:\n`appium:video.startFramerateCapture` and `appium:video.stopFramerateCapture`. Note first of all\nthat, because we are defining a custom BiDi command, we should include a 'vendor prefix' (in this\ncase, `appium:`, though you should pick something that represents your project). The first command\ntakes a required and an optional parameter, and the second does not. When combined with generic\nBiDi support in your driver (see [the section on BiDi](#implement-webdriver-bidi-commands) above),\nand given an implementation of the appropriate methods on your driver (e.g. `startFrameCap` and\n`stopFrameCap` in this example), clients would be able to send these BiDi commands using whatever\nmechanism normally exists for doing so in the client library.\n\nAn alternative to these other ways of doing things is to overload a command which all WebDriver clients\nhave access to already: Execute Script. Appium provides some a convenient tool for making this\neasy. Let's say you are building a driver for stereo system called `soundz`, and you wanted to\ncreate a command for playing a song by name. You could expose this to your users in such a way that\nthey call something like:\n\n```js\n// webdriverio example. Calling webdriverio's `executeScript` command is what trigger's Appium's\n// Execute Script command handler\ndriver.executeScript('soundz: playSong', [{song: 'Stairway to Heaven', artist: 'Led Zeppelin'}]);\n```\n\nThen in your driver code you can define the static property `executeMethodMap` as a mapping of\nscript names to methods on your driver. It has the same basic form as `newMethodMap`, described\nabove. Once `executeMethodMap` is defined, you'll also need to implement the Execute Script command\nhandler, which according to Appium's routes mapping is called `execute`. The implementation can\ncall a single helper function, `this.executeMethod`, which takes care of looking at the script and\narguments the user sent in and routing it to the correct custom handler you've defined. Here's an\nexample:\n\n```js\nstatic executeMethodMap = {\n 'soundz: playSong', {\n command: 'soundzPlaySong',\n params: {required: ['song', 'artist'], optional: []},\n }\n}\n\nasync soundzPlaySong(song, artist) {\n // play the song based on song and artist details\n}\n\nasync execute(script, args) {\n return await this.executeMethod(script, args);\n}\n```\n\nA couple notes about this system:\n1. The arguments array sent via the call to Execute Script must contain only zero or one element(s). The\n first item in the list is considered to be the parameters object for your method. These parameters\n will be parsed, validated, and then applied to your overload method in the order specified in\n `executeMethodMap` (the order specified in the `required` parameters list, followed by the\n `optional` parameters list). I.e., this framework assumes only a single actual argument sent in via\n Execute Script (and this argument should be an object with keys/values representing the\n parameters your execute method expects).\n1. Appium does not automatically implement `execute` (the Execute Script handler) for you. You may\n wish, for example, to only call the `executeMethod` helper function when you're not in proxy\n mode!\n1. The `executeMethod` helper will reject with an error if a script name doesn't match one of the\n script names defined as a command in `executeMethodMap`, or if there are missing parameters.\n\nOne of the nice things about the Execute Method strategy is that methods implemented in this way\nwill be available via the classic or BiDi interfaces (since they will result in the same Appium\nhandlers being called).\n\n\n### Build Appium Doctor checks\n\nYour users can run `appium driver doctor ` to run installation and health checks. Visit\nthe [Building Doctor Checks](./build-doctor-checks.md) guide for more information on this\ncapability.\n\n### Implement handling of Appium settings\n\nAppium users can send parameters to your driver via CLI args as well as via capabilities. But these\ncannot change during the course of a test, and sometimes users want to adjust parameters mid-test.\nAppium has a [Settings](../guides/settings.md) API for this purpose.\n\nTo support settings in your own driver, first of all define `this.settings` to be an instance of\nthe appropriate class, in your constructor:\n\n```js\n// import {DeviceSettings} from 'appium/driver';\n\nthis.settings = new DeviceSettings();\n```\n\nNow, you can read user settings any time simply by calling `this.settings.getSettings()`. This will\nreturn a JS object where the settings names are keys and have their corresponding values.\n\nIf you want to assign some default settings, or run some code on your end whenever settings are\nupdated, you can do both of these things as well.\n\n```js\nconstructor() {\n const defaults = {setting1: 'value1'};\n this.settings = new DeviceSettings(defaults, this.onSettingsUpdate.bind(this));\n}\n\nasync onSettingsUpdate(key, value) {\n // do anything you want here with key and value\n}\n```\n\n### Emit BiDi events\n\nWith the WebDriver BiDi protocol, clients can subscribe to arbitrary events which can be sent\nasynchronously to the client over the BiDi socket connection. As an Appium driver author you don't\nneed to worry about event subscription. If you want to emit an event with a certain method name and\npayload, it's as easy as using the built-in event emitter with the `bidiEvent` event.\n\nAs an\nexample, let's say our driver wants to periodically emit CPU load information. We could define an\nevent called `system.cpu`, and a payload that looks like `{load: 0.97}` to signify 97% CPU usage.\nWhenever we want, our driver can simply call the following code (assuming we have the current load\nin `this.currentCpuLoad`):\n\n```js\nthis.eventEmitter.emit('bidiEvent', {\n method: 'appium:system.cpu',\n params: {load: this.currentCpuLoad},\n})\n```\n\nNow, if the client has subscribed to the `system.cpu` event, it will be notified with the load\nwhenever the driver emits it.\n\n### Make itself aware of resources other concurrent drivers are using\n\nLet's say your driver uses up some system resources, like ports. There are a few ways to make sure\nthat multiple simultaneous sessions don't use the same resources:\n\n1. Have your users specify resource IDs via capabilities (`appium:driverPort` etc)\n1. Just always use free resources (find a new random port for each session)\n1. Have each driver express what resources it is using, then examine currently-used resources from\n other drivers when a new session begins.\n\nTo support this third strategy, you can implement `get driverData` in your driver to return what\nsorts of resources your driver is currently using, for example:\n\n```js\nget driverData() {\n return {specialPort: 1234, specialFile: /path/to/file}\n}\n```\n\nNow, when a new session is started on your driver, the `driverData` response from any other\nsimultaneously running drivers (of the same type) will also be included, as the last parameter of\nthe `createSession` method:\n\n```js\nasync createSession(jwpCaps, reqCaps, w3cCaps, driverData)\n```\n\nYou can dig into this `driverData` array to see what resources other drivers are using to help\ndetermine which ones you want to use for this particular session.\n\n!!! warning\n\n Be careful here, since `driverData` is only passed between sessions of a single running Appium\n server. There's nothing to stop a user from running multiple Appium servers and requesting your\n driver simultaneously on each of them. In this case, you won't be able to ensure independence\n of resources via `driverData`, so you might consider using file-based locking mechanisms or\n something similar.\n\n!!! warning\n\n It's also important to note you will only receive `driverData` for other instances of *your*\n driver. So unrelated drivers also running may still be using some system resources. In general\n Appium doesn't provide any features for ensuring unrelated drivers don't interfere with one\n another, so it's up to the drivers to allow users to specify resource locations or addresses to\n avoid clashes.\n\n### Log events to the Appium event timeline\n\nAppium has an [Event Timing API](../guides/event-timing.md) which allows users to get timestamps\nfor certain server-side events (like commands, startup milestones, etc...) and display them on\na timeline. The feature basically exists to allow introspection of timing for internal events to\nhelp with debugging or running analysis on Appium driver internals. You can add your own events to\nthe event log:\n\n```js\nthis.logEvent(name);\n```\n\nSimply provide a name for the event and it will be added at the current time, and made accessible\nas part of the event log for users.\n\n### Hide behaviour behind security flags\n\nAppium has a feature-flag based [security model](../guides/security.md) that allows driver authors\nto hide certain features behind security flags. What this means is that if you have a feature you\ndeem insecure and want to require server admins to opt in to it, you can require that they enable\nthe feature by adding it to the `--allow-insecure` list or turning off server security entirely.\n\nTo support the check within your own driver, you can call `this.isFeatureEnabled(featureName)` to\ndetermine whether a feature of the given name has been enabled. Or, if you want to simply\nshort-circuit and throw an error if the feature isn't enabled, you can call\n`this.assertFeatureEnabled(featureName)`.\n\n### Use a temp dir for files\n\nIf you want to use a temporary directory for files your driver creates that are not important to\nkeep around between computer or server restarts, you can simply read from `this.opts.tmpDir`. This\nreads the temporary directory location from `@appium/support`, potentially overridden by a CLI\nflag. I.e., it's safer than writing to your own temporary directory because the location here plays\nnicely with possible user configuration. `this.opts.tmpDir` is a string, the path to the dir.\n\n### Deal with unexpected shutdowns or crashes\n\nYour driver might run into a situation where it can't continue operating normally. For example, it\nmight detect that some external service has crashed and nothing will work anymore. In this case, it\ncan call `this.startUnexpectedShutdown(err)` with an error object including any details, and Appium\nwill attempt to gracefully handle any remaining requests before shutting down the session.\n\nIf you want to perform some of your own cleanup logic when you encounter this condition, you can\neither do so immediately before calling `this.startUnexpectedShutdown`, or you can attach a handler\nto the unexpected shutdown event and run your cleanup logic \"out of band\" so to speak:\n\n```js\nthis.onUnexpectedShutdown(handler)\n```\n\n`handler` should be a function which receives an error object (representing the reason for the\nunexpected shutdown).\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/developing/build-plugins.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Building Plugins\n---\n\nThis is a high-level guide for developing Appium plugins, which is not something most Appium users\nneed to know or care about. If you are not familiar with Appium plugins yet from a user\nperspective, check out the [list of plugins](../ecosystem/plugins.md) to play around with some and get\nan idea of the sorts of things that plugins can do. Plugins are a powerful system for augmenting\nAppium's functionality or changing the way Appium works. They can be distributed to other Appium\nusers and can extend Appium's ecosystem in all kinds of interesting ways! (There is also\na significant amount of overlap here with developing Appium drivers, so you may also want to check\nout the [building drivers](./build-drivers.md) guide for further inspiration.)\n\n## Before you create your plugin\n\nBefore creating your plugin, it's good to have a general idea of what you want your plugin to\naccomplish and whether it will be possible to implement it given the restrictions of the Appium\nplatform. Reading through this guide will help you understand what's possible. In general, Appium's\nplugin system is extremely powerful and no attempts have been made to artificially limit what's\npossible with them (which is a main reason that all plugins are opt-in by the system administrator\nresponsible for starting the Appium server---plugins are powerful and should only be used when\nexplicitly trusted!).\n\n## Other plugins to reference\n\nThere are a wide variety of open source Appium plugins available for perusal. It's definitely\nrecommended to explore the code for some other plugins before embarking on writing your own. The\nAppium team maintains a set of official plugins in the [Appium GitHub\nrepo](https://github.com/appium/appium). Links to other open source plugins can be found in the\n[Plugin list](../ecosystem/plugins.md)\n\n## Basic requirements for plugins\n\nThese are the things your plugin *must* do (or be), if you want it to be a valid Appium plugin.\n\n### Node.js package with Appium extension metadata\n\nAll Appium plugins are fundamentally Node.js packages, and therefore must have a valid\n`package.json`. Your driver is not _limited_ to Node.js, but it must provide an adapter written in\nNode.js so it can be loaded by Appium.\n\nYour `package.json` must include `appium` as a `peerDependency`. The requirements for the\ndependency versions should be as loose as possible (unless you happen to know your plugin will only\nwork with certain versions of Appium). For Appium 2, for example, this would look something like\n`^2.0.0`, declaring that your plugin works with any version of Appium that starts with 2.x.\n\nYour `package.json` must contain an `appium` field, like this (we call this the 'Appium extension\nmetadata'):\n\n ```json\n {\n ...,\n \"appium\": {\n \"pluginName\": \"fake\",\n \"mainClass\": \"FakePlugin\"\n },\n ...\n }\n ```\n\nThe required subfields are:\n\n* `pluginName`: this should be a short name for your plugin.\n* `mainClass`: this is a named export (in CommonJS style) from your `main` field. It must be a\n class which extends Appium's `BasePlugin` (see below).\n\n### Extend Appium's `BasePlugin` class\n\nUltimately, your plugin is much easier to write because most of the hard work of defining patterns\nfor overriding commands is done for you. This is\nall encoded up as a class which Appium exports for you to use, called `BasePlugin`. It is exported\nfrom `appium/plugin`, so you can use one of these styles to import it and create your *own* class\nthat extends it:\n\n```js\nimport {BasePlugin} from 'appium/plugin';\n// or: const {BasePlugin} = require('appium/plugin');\n\nexport class MyPlugin extends BasePlugin {\n // class methods here\n}\n```\n\n!!! note\n\n In all the code samples below, whenever we reference an example method, it is assumed\n that it is defined _within_ the class, though this is not explicitly written, for the sake of\n clarity and space.\n\n### Make your plugin available\n\nThat's basically it! With a Node.js package exporting a plugin class and with correct Appium\nextension metadata, you've got yourself an Appium plugin! Now it doesn't *do* anything, but you can\nload it up in Appium, activate it, etc...\n\nTo make it available to users, you could publish it via NPM. When you do so, your plugin will be\ninstallable via the Appium CLI:\n\n```\nappium plugin install --source=npm \n```\n\nIt's a good idea to test your plugin first, of course. One way to see how it works within Appium is\nto install it locally first:\n\n```\nappium plugin install --source=local /path/to/your/plugin\n```\n\nAnd of course, plugins must be \"activated\" during Appium server start, so make sure you direct your\nusers to do so:\n\n```\nappium --use-plugins=plugin-name\n```\n\n### Developing your plugin\n\nHow you develop your plugin is up to you. It is convenient, however, to run it from within Appium\nwithout having to do lots of publishing and installing. The most straightforward way to do this is\nto include the most recent version of Appium as a `devDependency` (although its being already\nincluded as a `peerDependency` is sufficient in newer versions of NPM), and then also your own plugin,\nlike this:\n\n```json\n{\n \"devDependencies\": {\n ...,\n \"appium\": \"^2.0.0\",\n \"your-plugin\": \"file:.\",\n ...\n }\n}\n```\n\nNow, you can run Appium locally (`npm exec appium` or `npx appium`), and because your plugin is\nlisted as a dependency alongside it, it will be automatically \"installed\" and available. You can\ndesign your e2e tests this way, or if you're writing them in Node.js, you can simply import\nAppium's start server methods to handle starting and stopping the Appium server in Node.\n\nOf course, you can always install it locally as described above as well.\n\nAnytime you make changes to your plugin code, you'll need to restart the Appium server to make sure\nit picks up the latest code. As with drivers, you can set the `APPIUM_RELOAD_EXTENSIONS`\nenvironment variable if you wish Appium to try to re-require your plugin module when a new session\nstarts.\n\n## Standard plugin implementation ideas\n\nThese are things you will probably find yourself wanting to do when creating a plugin.\n\n### Set up state in a constructor\n\nIf you define your own constructor, you'll need to call `super` to make sure all the standard state\nis set up correctly:\n\n```js\nconstructor(...args) {\n super(...args);\n // now do your own thing\n}\n```\n\nThe `args` parameter here is the object containing all the CLI args used to start the Appium\nserver.\n\n### Intercept and handle specific Appium commands\n\nThis is the most normal behavior for Appium plugins -- to modify or replace the execution of one or\nmore commands that would normally be handled by the active driver. To override the default command\nhandling, you need to implement `async` methods in your class with the same name as the Appium\ncommands to be handled (just exactly how [drivers themselves are\nimplemented](./build-drivers.md#implement-webdriver-classic-commands)). Curious what command names there\nare? They are defined in the Appium base driver's\n[routes.js](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js) file,\nand of course you can add more as defined in the next section.\n\nEach command method is sent the following arguments:\n\n1. `next`: This is a reference to an `async` function which encapsulates the chain of behaviors which would take place if this plugin were not handling the command. You can choose to call the next behavior in the chain at any point in your logic (by making sure to include `await next()` somewhere), or not. If you don't, it means the default behavior (or any plugins registered after this one) won't be run.\n1. `driver`: This is the object representing the driver handling the current session. You have access to it for any work you need to do, for example calling other driver methods, checking capabilities or settings, etc...\n1. `...args`: A spread array with any arguments that have been applied to the command by the user.\n\nFor example, if we wanted to override the `setUrl` command to simply add some extra logging on top,\nwe would implement as follows:\n\n```js\nasync setUrl(next, driver, url) {\n this.log(`Let's get the page source for some reason before navigating to '${url}'!`);\n await driver.getPageSource();\n const result = await next();\n this.log(`We can also log after the original behaviour`);\n return result;\n}\n```\n\n### Intercept and handle _all_ Appium commands\n\nYou might find yourself in a position where you want to handle *all* commands, in order to inspect\npayloads to determine whether or not to act in some way. If so, you can implement `async handle`,\nand any command that is not handled by one of your named methods will be handled by this method\ninstead. It takes the following parameters (with all the same semantics as above):\n\n1. `next`\n1. `driver`\n1. `cmdName` - string representing the command being run\n1. `...args`\n\nFor example, let's say we want to log timing for all Appium commands as part of a plugin. We could\ndo this by implementing `handle` in our plugin class as follows:\n\n```js\nasync handle(next, driver, cmdName, ...args) {\n const start = Date.now();\n try {\n const result = await next();\n } finally {\n const elapsedMs = Date.now() - start;\n this.log(`Command '${cmdName}' took ${elapsedMs}`);\n }\n return result;\n}\n```\n\n### Working with driver proxies\n\nThere is a bit of a gotcha with handling Appium commands. Appium drivers have the ability to turn\non a special 'proxy' mode, wherein the Appium server process takes a look at incoming URLs, and\ndecides whether to forward them on to some upstream WebDriver server. It could happen that\na command which a plugin wants to handle is designated as a command which is being proxied to an\nupstream server. In this case, we might run into a problem, because the plugin never gets a chance to\nhandle that command! The way Appium handles this is as follows:\n\n1. When a command comes in, before deciding whether to proxy the command, the main protocol handler\n checks to see whether a plugin would handle the command.\n2. If a plugin would *not* handle the command--all proceeds as normal, and the request is either\n proxied or not, based on the driver's proxy mode.\n3. If a plugin *would* handle the command, then the proxy behavior is skipped for the time being,\n and wrapped up as the `next` function sent to the plugin. So if you have a command handler in\n your plugin, and you want to be sure that the default driver proxying *does* take place, then\n simply `await next()` instead of (or in addition to) whatever your plugin handler is doing.\n\n### Throw WebDriver-specific errors\n\nThe WebDriver spec defines a [set of error\ncodes](https://github.com/jlipps/simple-wd-spec#error-codes) to accompany command responses if an\nerror occurred. Appium has created error classes for each of these codes, so you can throw the\nappropriate error from inside a command, and it will do the right thing in terms of the protocol\nresponse to the user. To get access to these error classes, import them from `appium/driver`:\n\n```js\nimport {errors} from 'appium/driver';\n\nthrow new errors.NoSuchElementError();\n```\n\n### Log messages to the Appium log\n\nYou can always use `console.log`, of course, but Appium provides a nice logger for you as\n`this.logger` (it has `.info`, `.debug`, `.log`, `.warn`, `.error` methods on it for differing log\nlevels). If you want to create an Appium logger outside of a plugin context (say in a script or\nhelper file), you can always construct your own too:\n\n```js\nimport {logging} from 'appium/support';\nconst log = logging.getLogger('MyPlugin');\n```\n\n## Further possibilities for Appium plugins\n\nThese are things your plugin *can* do to take advantage of extra plugin features or do its job more\nconveniently.\n\n### Add a schema for custom command line arguments\n\nYou can add custom CLI args if you want your plugin to receive data from the command line when the\nAppium server is started (for example, ports that a server administrator should set that should not\nbe passed in as capabilities).\n\nThis works largely the same for plugins as it does for drivers, so for more details have a look at\n[the equivalent section in the building drivers\ndoc](./build-drivers.md#add-a-schema-for-custom-command-line-arguments).\n\nThe only difference is that to construct the CLI argument name, you prefix it with\n`--plugin-`. So for example, if you have a plugin named `pluggo` and a CLI arg defined with\nthe name `electro-port`, you can set it when starting Appium via `--plugin-pluggo-electro-port`.\n\nSetting args via a configuration file is also supported, as it is for drivers, but under the\n`plugin` field instead. For example:\n\n```json\n{\n \"server\": {\n \"plugin\": {\n \"pluggo\": {\n \"electro-port\": 1234\n }\n }\n }\n}\n```\n\n### Add plugin scripts\n\nSometimes you might want users of your plugin to be able to run scripts outside the context of\na session (for example, to run a script that pre-builds aspects of your plugin). To support this,\nyou can add a map of script names and JS files to the `scripts` field within your Appium extension\nmetadata. So let's say you've created a script in your project that lives in a `scripts` directory\nin your project, named `plugin-prebuild.js`. Then you could add a `scripts` field like this:\n\n```json\n{\n \"scripts\": {\n \"prebuild\": \"./scripts/plugin-prebuild.js\"\n }\n}\n```\n\nNow, assuming your plugin is named `myplugin`, users of your plugin can run `appium plugin run\nmyplugin prebuild`, and your script will execute.\n\n### Add new Appium commands\n\nIf you want to offer functionality that doesn't map to any of the existing commands supported by\ndrivers, you can create new commands in one of two ways, just as is possible for drivers:\n\n1. Extending the WebDriver protocol and creating client-side plugins to access the extensions\n1. Extending the WebDriver BiDi protocol with new modules and methods, accessed from a client via the BiDi interface\n1. Overloading the Execute Script command by defining [Execute\n Methods](../guides/execute-methods.md)\n\n#### Extending the HTTP Protocol\n\nIf you want to follow the first path, you can direct Appium to recognize new methods and add them\nto its set of allowed HTTP routes and command names. You do this by assigning the `newMethodMap`\nstatic variable in your driver class to an object of the same form as Appium's `routes.js` object.\nFor example, here is part of the `newMethodMap` for the `FakePlugin` example driver:\n\n```js\nstatic newMethodMap = {\n '/session/:sessionId/fake_data': {\n GET: {command: 'getFakeSessionData', neverProxy: true},\n POST: {\n command: 'setFakeSessionData',\n payloadParams: {required: ['data']},\n neverProxy: true,\n },\n },\n '/session/:sessionId/fakepluginargs': {\n GET: {command: 'getFakePluginArgs', neverProxy: true},\n },\n};\n```\n\n!!! note\n\n If you're using TypeScript, static member objects like these should be defined `as const`.\n\nIn this example we're adding a few new routes and a total of 3 new commands. For more examples of\nhow to define commands in this way, it's best to have a look through `routes.js`. Now all you need\nto do is implement the command handlers in the same way you'd implement any other Appium command.\n\nNote also the special `neverProxy` key for commands; this is generally a good idea to set to `true`\nfor plugins, since your plugin might be active for a driver that is put into proxy mode but hasn't\nbothered to decline proxying for these (new and therefore unknown) commands. Setting `neverProxy`\nto `true` here will cause Appium to never proxy these routes and therefore ensure your plugin\nhandles them, even if a driver is in proxy mode.\n\nThe downside of adding new commands via `newMethodMap` is that people using the standard Appium\nclients won't have nice client-side functions designed to target these endpoints. So you would need\nto create and release client-side plugins for each language you want to support (directions or\nexamples can be found at the relevant client docs).\n\n#### Extending the BiDi Protocol\n\nYou can also make new commands accessible via the WebDriver BiDi (WebSocket-based) protocol. BiDi\ncommands come in two parts: a \"module\", which is basically a container or namespace, and\na \"command\", which is the name of your new command.\n\nAs with the first method, you teach Appium to recognize your new BiDi commands by adding a static\nfield to your driver class, called `newBidiCommands`. It has a format similar to `newMethodMap`.\nBasically it encapsulates information about the BiDi module, BiDi command name, reference to your\ndriver instance method that will handle the command, and required and optional parameters. Here's\nan example of a `newBidiCommands` as implemented on an imaginary driver:\n\n```js\nstatic newBidiCommands = {\n 'appium:video': {\n startFramerateCapture: {\n command: 'startFrameCap',\n params: {\n required: ['videoSource'],\n optional: ['showOnScreen'],\n }\n },\n stopFramerateCapture: {\n command: 'stopFrameCap',\n },\n }\n};\n```\n\nIn this imaginary example, we have defined two new BiDi commands: `appium:video.startFramerateCapture` and\n`appium:video.stopFramerateCapture`. The first command takes a required and an optional parameter, and the\nsecond does not. When you have implemented the `startFrameCap` and `stopFrameCap` methods on your\nplugin class, they will be called whenever the BiDi commands are triggered by a client. The\nsignatures for these methods would look as follows:\n\n```js\nasync startFrameCap(next: () => Promise, driver: DriverClass, videoSource: string, showOnScreen: boolean): Promise;\nasync stopFrameCap(next: () => Promise, driver: DriverClass): Promise;\n```\n\nAs with adding or overriding existing HTTP protocol commands, these methods are injected with\na `next` parameter and a `driver` parameter. The `driver` object represents the driver currently\nowning the session, and calling `await next()` will execute/return the behavior that would execute\nwere the plugin not active (i.e., the driver's own handling of that method, or the chain of\ncommands executed with the same name by other active plugins).\n\nNote that, currently, if a driver has BiDi proxying turned on, plugins will not be able to override\nBiDi methods handled by the proxy. Also note that since these are custom BiDi commands, our module\nname should include a vendor prefix (we chose `appium:`, but you can/should choose something that\nmakes sense for your extension).\n\n#### Overloading Execute Script\n\nAn alternative to these ways of doing things is to overload a command which all WebDriver clients\nhave access to already: Execute Script. Make sure to read the section on [adding new\ncommands](./build-drivers.md#extend-the-existing-protocol-with-new-commands) in\nthe Building Drivers guide to understand the way this works in general. The way it works with\nplugins is only slightly different. Let's look at an example taken from Appium's `fake-plugin`:\n\n```js\nstatic executeMethodMap = {\n 'fake: plugMeIn': {\n command: 'plugMeIn',\n params: {required: ['socket']},\n },\n};\n\nasync plugMeIn(next, driver, socket) {\n return `Plugged in to ${socket}`;\n}\n\nasync execute(next, driver, script, args) {\n return await this.executeMethod(next, driver, script, args);\n}\n```\n\nWe have three important components shown here which make this system work, all of which are defined\ninside the plugin class:\n\n1. The `executeMethodMap`, defined in just the same way as for drivers\n1. The implementation of the command method as defined in `executeMethodMap` (in this case,\n `plugMeIn`)\n1. The overriding/handling of the `execute` command. Just like any plugin command handlers, the\nfirst two arguments are `next` and `driver`, followed by the script name and args. `BasePlugin`\nimplements a helper method which we can simply call with all of these arguments.\n\nOverriding Execute Methods from drivers works as you'd expect: if your plugin defines an Execute\nMethod with the same name as that of a driver, your command (in this case `plugMeIn`) will be\ncalled first. You can choose to run the driver's original behaviour via `next` if you want.\n\n### Emit BiDi Events\n\nYour plugin can emit custom BiDi events in [exactly the same way as Appium\ndrivers](./build-drivers.md#emit-bidi-events).\n\n### Build Appium Doctor checks\n\nYour users can run `appium plugin doctor ` to run installation and health checks. Visit\nthe [Building Doctor Checks](./build-doctor-checks.md) guide for more information on this\ncapability.\n\n### Update the Appium server object\n\nYou probably don't normally need to update the Appium server object (which is an\n[Express](https://expressjs.com/) server having already been\n[configured](https://github.com/appium/appium/blob/master/packages/base-driver/lib/express/server.js)\nin a variety of ways). But, for example, you could add new Express middleware to the server to\nsupport your plugin's requirements. To update the server you must implement the `static async\nupdateServer` method in your class. This method takes three parameters:\n\n* `expressApp`: the Express app object\n* `httpServer`: the Node HTTP server object\n* `cliArgs`: a map of the CLI args used to start the Appium server\n\nYou can do whatever you want with them inside the `updateServer` method. You might want to\nreference how these objects are created and worked with in the BaseDriver code, so that you know\nyou're not undoing or overriding anything standard and important. But if you insist, you can, with\nresults you'll need to test! Warning: this should be considered an advanced feature and requires\nknowledge of Express, as well as the care not to do anything that could affect the operation of\nother parts of the Appium server!\n\n### Handle unexpected session shutdown\n\nWhen developing a plugin you may want to add some cleanup logic for when a session ends. You would\nnaturally do this by adding a handler for `deleteSession`. This works in most cases, except when\nthe session does not finish cleanly. Appium sometimes determines that a session has finished\nunexpectedly, and in these situations, Appium will look for a method called `onUnexpectedShutdown`\nin your plugin class, which will be called (passing the current session driver as the first\nparameter, and the error object representing the cause of the shutdown as the second), giving you\nan opportunity to take any steps that might be necessary to clean up from the session. For example,\nkeeping in mind that the function is not `await`ed you could implement something like this:\n\n```js\nasync onUnexpectedShutdown(driver, cause) {\n try {\n // do some cleanup\n } catch (e) {\n // log any errors; don't allow anything to be thrown as they will be unhandled rejections\n }\n}\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/developing/config-system.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium's Config System\n---\n\nAppium includes support for [configuration files](../guides/config.md). A configuration file is\nintended to have (nearly) 1:1 parity with command-line arguments. An end user can supply Appium with\na configuration file, CLI args, or both (the args have precedence over the config file).\n\nThis document will be a technical overview of how the configuration system works. It is intended\nfor Appium contributors, but will also explain the system's fundamental features.\n\n## Reading a Config File\n\nA config file is a JSON, JavaScript, or YAML file which can be validated against a schema. By\ndefault, this file will be named `.appiumrc.{json,js,yaml,yml}` and should be in the root of the\nproject which depends upon `appium`. Other filenames and locations are supported via the `--config\n` flag. For obvious reasons, the `config` argument is disallowed within config files.\n\nIn lieu of a separate file, configuration can be embedded in a project's `package.json` using the\n`appiumConfig` property, e.g.,:\n\n```json\n{\n \"appiumConfig\": {\n \"server\": {\n \"port\": 12345\n }\n }\n}\n```\n\nWhen an Appium server is started via the `appium` executable, the `init` function in `lib/main.js`\nwill call into `lib/config-file.js` to load and/or search for a configuration file and in\n`package.json`.\n\n!!! note\n\n It is not an error if configuration isn't found!\n\nThe [`lilconfig`](https://npm.im/lilconfig) package provides the search & load functionality; refer\nto its documentation for more information about the search paths. Additionally, Appium provides\nsupport for config files written in YAML via the package [`yaml`](https://npm.im/yaml).\n\nIf a config file is found and successfully [validated](#validation), the result will be merged with\na set of defaults and any additional CLI arguments. CLI arguments have precedence over config\nfiles, and config files have precedence over defaults.\n\n## Validation\n\nThe same system is used for _both_ validation of config files _and_ command-line arguments.\n\nThe package [`ajv`](https://npm.im/ajv) provides validation. Of course, to make `ajv` validate\nanything, it must be provided a _schema_.\n\nThe _base_ schema is a [JSON Schema\nDraft-7](https://json-schema.org/draft/2020-12/json-schema-core.html)-compliant object exported by\n`lib/schema/appium-config-schema.js`. This schema defines configuration _native to Appium_, and\nonly concerns its behavior as a _server_; it does not define configuration for any other\nfunctionality (e.g., the `plugin` or `driver` subcommands).\n\n!!! warning\n\n Note that this file is the _base_ schema; this will become painfully relevant.\n\nThis file is is _not_ a JSON file, because a) JSON is painful to work with for humans, b) is\nespecially reviled by @jlipps, and c) `ajv` accepts objects, not JSON files.\n\nIt is more straightforward to explain how config files are validated, so we'll start there.\n\n### Validating Config Files\n\nWhen a config file is found (`lib/config-file.js`), it will call the `validate` function exported\nfrom `lib/schema/schema.js` with the contents of the config file. In turn, this asks `ajv` to\nvalidate the data against the schema that Appium has provided it.\n\nIf the config file is invalid, errors will be generated to be displayed to the user. Finally, the\n`init` function will detect these errors, display them, and the process will exit.\n\nI hope that made sense, because this is the easy part.\n\n### Validating CLI Arguments\n\nAs mentioned earlier, the same system is used for validating both config files and CLI arguments.\n\nTotally not judging, but Appium uses [`argparse`](https://npm.im/argparse) for its CLI argument\nparsing. This package, and others like it, provides an API to define the arguments a command-line\nNode.js script accepts, and will ultimately return an object representation of the user-supplied\narguments.\n\nJust as the schema defines what's allowed in a config file, it also defines what's allowed on the\ncommand-line.\n\n#### Defining CLI Arguments via Schema\n\nCLI arguments must be _defined_ before their values can be validated.\n\nA JSON schema isn't a natural fit for defining CLI args--it needs some grease to make it work--but\nit's close enough that we can do so with an adapter and some custom metadata.\n\nIn `lib/cli/parser.js`, there's a wrapper around `argparse`'s `ArgumentParser`; it's called (wait\nfor it)... `ArgParser`. The wrapper exists because we're doing some custom things with `argparse`,\nbut is has nothing to do with the schema directly.\n\nAn `ArgParser` instance is created and its `parseArgs()` method is called with the raw CLI\narguments. The definition of the accepted arguments comes from `lib/cli/args.js` in part--here, all\nof the arguments _not_ intended for use with the `server` subcommand are hard-coded (e.g., the\n`driver` subcommand and _its_ subcommands). `args.js` also contains a function `getServerArgs()`,\nwhich in turn calls into `toParserArgs` in `lib/schema/cli-args.js`. `lib/schema/cli-args.js` can\nbe considered the \"adapter\" layer between `argparse` and the schema.\n\n`toParserArgs` uses the `flattenSchema` function exported by `lib/schema/schema.js`, which\n\"squashes\" the schema into a key/value representation. Then, `toParserArgs` iterates over each\nkey/value pair and \"converts\" it into a suitable `ArgumentOption` object for final handoff to\n`ArgParser`.\n\nThis adapter (`cli-args.js`) is where most of the mess is hidden; let's explore this rat's nest\na bit further.\n\n##### CLI & Schema Incongruities\n\nThe conversion algorithm (see function `subSchemaToArgDef` in `lib/schema/cli-args.js`) is mostly\njust hacks and special cases neatly packed into a function. Things that don't cleanly map from\n`argparse` to a JSON schema include, but are not limited to:\n\n- A schema cannot natively express \"store the value of `--foo=` in a property called `bar`\" in a schema (this corresponds to the `ArgumentOption['dest']` prop).\n- A schema cannot natively express aliases; e.g., `--verbose` can also be `-v`\n- A schema `enum` is not restricted to multiple types, but `argparse`'s equivalent `ArgumentOption['choices']` prop _is_\n- A schema does not know about `argparse`'s concept of \"actions\" (note that Appium is not currently using custom actions--though it did, and it could again).\n- `argparse` has no native type for `email`, `hostname`, `ipv4`, `uri` etc., and the schema does\n- Schema validation only _validates_, it does not perform translation, transformation, or coercion (mostly). `argparse` allows this.\n- Schemas allow the `null` type, for whatever reason. Ever pass `null` on the CLI?\n- `argparse` does not understand anything other than primitives; no objects, arrays, etc., and certainly not arrays of a particular type.\n\nAll of the above cases and others are handled by the adapter.\n\n!!! warning\n\n Some decisions made in the adapter were arrived at via coin toss. If you are curious about why\n something is the way it is, it's likely that it had to do _something_.\n\nLet's look more closely at handling types.\n\n#### Argument Types via `ajv`\n\nWhile `argparse` allows consumers, via its API, to define the _type_ of various arguments (e.g.,\na string, number, boolean flag, etc.), Appium mostly avoids these built-in types. _Why is that?_\nWell:\n\n1. We already know the type of an argument, because we've defined it in a schema.\n2. `ajv` provides validation against a schema.\n3. A schema allows for greater expression of types, allowed values, etc., than `argparse` can provide natively.\n4. The expressiveness of a schema allows for better error messaging.\n\nTo that end, the adapter eschews `argparse`'s built-in types (see allowed string values of\n`ArgumentOption['type']`) and instead abuses the ability to provide a _function_ as a `type`. The\nexception is _boolean_ flags, which do not have a `type`, but rather `action: 'store_true'`. The\nworld may never know why.\n\n##### Types as Functions\n\nWhen a `type` is a function, the function performs both validation _and_ coercion (if necessary).\nSo what are these functions?\n\n> Note: `type` is _omitted_ (and thus _not_ a function) from the `ArgumentOption` if the property\n> type is `boolean`, and is instead provided an `action` property of `store_true`. Yes, this is\n> weird. No, I don't know why.\n\nWell... it depends upon the schema. But generally speaking, we create a _pipeline_ of functions,\neach corresponding to a keyword in the schema. Let's take the example of the `port` argument. In\nlieu of asking the OS which ports the `appium`-running user can bind to, this argument is expected\nto be an integer between 1 and 65535. This turns out to be two functions which we combine into\na pipeline:\n\n1. Convert the value to an integer, if possible. Because _every value in `process.argv` is a string_, we must coerce if we want a number.\n2. Use `ajv` to validate the integer against the schema for `port`. A schema lets us define a range via the `minimum` and `maximum` keywords. Read more about how this works in\n\nMuch like the config file validation, if errors are detected, Appium nicely tells the end-user and\nthe process exits w/ some help text.\n\nFor other arguments which are naturally of non-primitive types, things are not so straightforward.\n\n##### Transformers\n\nRemember how `argparse` doesn't understand arrays? What if the most ergonomic way to express\na value is, in fact, an array?\n\nWell, Appium can't accept an array on the CLI, even though it can accept one in the config file.\nBut Appium _can_ accept a comma-delimited string (a CSV \"line\"). Or a string filepath referring to\na file which _contains_ a delimited list. Either way: by the time the value gets out of the\nargument parser, it should be an array.\n\nAnd as mentioned above, the native facilities of a JSON schema cannot express this. However, it's\npossible to define a _custom keyword_ which Appium can then detect and handle accordingly. So\nthat's what Appium does.\n\nIn this case, a custom keyword `appiumCliTransformer` is registered with `ajv`. The value of\n`appiumCliTransformer` (at the time of this writing) can be `csv` or `json`. In the base schema\nfile, `appium-config-schema.js`, Appium uses `appiumCliTransformer: 'csv'` if this behavior is\ndesired.\n\n!!! note\n\n Any property defined in the schema having type `array` will _automatically_ uses the `csv`\n transformer. Likewise, a property having type `object` will use the `json` transformer. It's\n conceivable that `array` may want to use the `json` transformer, but otherwise, the presence of\n the `appiumCliTransformer` keyword on an `array`-or-`object`-typed property is not strictly\n necessary.\n\nThe adapter (remember the adapter?) creates a pipeline function including a special \"CSV\ntransformer\" (transformers are defined in `lib/schema/cli-transformers.js`), and uses this function\nas the `type` property of the `ArgumentOption` passed into `argparse`. In this case, the `type:\n'array'` in the schema is ignored.\n\n!!! note\n\n The config file doesn't _need_ to perform any complex transformation of values, because it\n naturally allows Appium to define exactly what it expects. So Appium does no post-processing of\n config file values.\n\nProperties that do not need this special treatment use `ajv` directly for validation. How this\nworks requires some explanation, so that's next.\n\n#### Validation of Individual Arguments via `ajv`\n\nWhen we think of a JSON schema, we tend to think, \"I have this JSON file and I want to validate it\nagainst the schema\". That's valid, and in fact Appium does just that with config files! However,\nAppium does not do this when validating arguments.\n\n!!! note\n\n During implementation, I was tempted to mash all of the arguments together into\n a config-file-like data structure and then validate it all at once. I think that would have\n been _possible_, but since an object full of CLI arguments is a flat key/value structure and\n the schema is not, this seemed like trouble.\n\nInstead, Appium validates a value against a specific property _within_ the schema. To do this, it\nmaintains a mapping between a CLI argument definition and its corresponding property. The mapping\nitself is a `Map` with a unique identifier for the argument as the key, and an `ArgSpec`\n(`lib/schema/arg-spec.js`) object as the value.\n\nAn `ArgSpec` object stores the following metadata:\n\n| Property Name | Description |\n| --------------- | ------------------------------------------------------------------------------------- |\n| `name` | Canonical name of the argument, corresponding to the property name in the schema. |\n| `extType?` | `driver` or `plugin`, if appropriate |\n| `extName?` | Extension name, if appropriate |\n| `ref` | Computed `$id` of the property in the schema |\n| `arg` | Argument as accepted on CLI, without leading dashes |\n| `dest` | Property name in parsed arguments object (as returned by `argparse`'s `parse_args()`) |\n| `defaultValue?` | Value of the `default` keyword in schema, if appropriate |\n\nWhen a schema is [finalized](#schema-loading), the `Map` is populated with `ArgSpec` objects\nfor all known arguments.\n\nSo when the adapter is creating the pipeline of functions for the argument's `type`, it already has\nan `ArgSpec` for the argument. It creates a function which calls `validate(value, ref)` (in\n`lib/schema/schema.js`) where `value` is whatever the user provided, and `ref` is the `ref`\nproperty of the `ArgSpec`. The concept is that `ajv` can validate using _any_ `ref` it knows about;\neach property in a schema can be referenced by this `ref` whether it's defined or not. To help\nvisualize, if a schema is:\n\n```json\n{\n \"$id\": \"my-schema.json\",\n \"type\": \"object\",\n \"properties\": {\n \"foo\": {\n \"type\": \"number\"\n }\n }\n}\n```\n\nThe `ref` of `foo` would be `my-schema.json#/properties/foo`. Assuming our `Ajv` instance knows\nabout this `my-schema.json`, then we can call its `getSchema(ref)` method (which has a `schema`\nproperty, but is a misnomer nonetheless) to get a validation function; `validate(value, ref)` in\n`schema.js` calls this validation function.\n\n!!! note\n\n The schema spec says a schema author can supply an explicit `$id` keyword to override this;\n it's unsupported by Appium at this time. If needed, extension authors must carefully use `$ref`\n without custom `$id`s. It's highly unlikely an extension would have a schema so complicated as\n to need this, however; Appium itself doesn't even use `$ref` to define its own properties!\n\nNext, let's take a look at how Appium loads schemas. This actually happens _before_ any argument\nvalidation.\n\n## Schema Loading\n\nLet's ignore extensions for a moment, and start with the base schema.\n\nWhen something first imports the `lib/schema/schema.js` module, an instance of an `AppiumSchema` is\ncreated. This is a singleton, and its methods are exported from the module (all of which are bound\nto the instance).\n\nThe constructor does very little; it instantiates an `Ajv` instance and configures it with Appium's\n[custom keywords](#custom-keyword-reference) and adds support for the `format` keyword via the\n[ajv-formats](https://npm.im/ajv-formats) module.\n\nOtherwise, the `AppiumSchema` instance does not interact with the `Ajv` instance until its\n`finalize()` method (exported as `finalizeSchema()`) is called. When this method is called, we're\nsaying \"we are not going to add any more schemas; go ahead and create `ArgSpec` objects and\nregister schemas with `ajv`\".\n\nWhen does finalization happen? Well:\n\n1. When the `appium` executable begins, it _checks for and configures extensions_ (hand-wave) in `APPIUM_HOME`.\n2. Only then does it start to think about arguments--it instantiates an `ArgParser`, which (as you'll recall) runs the adapter to convert the schema to arguments.\n3. _Finalization happens here_--when creating the parser. Appium need the schema(s) to be registered with `ajv` in order to create validation functions for arguments.\n4. Thereafter, Appium parses the arguments with the `ArgParser`.\n5. Finally, decides what to do with the returned object.\n\nWithout extensions, `finalize()` still knows about the Appium base schema\n(`appium-config-schema.js`), and just registers that. However, step 1. above is doing a _lot of\nwork_, so let's look at how extensions come into play.\n\n## Extension Support\n\nOne of the design goals of this system is the following:\n\n_An extension should be able to register custom CLI arguments with the Appium, and a user should be\nable to use them like any other argument_.\n\nPreviously, Appium accepted arguments in this manner (via `--driverArgs`), but validation was\nhand-rolled and required extension implementors to use a custom API. It also required the user to\nawkwardly pass a JSON string as the configuration on the command-line. Further, no contextual help\n(via `--help`) existed for these arguments.\n\nNow, by providing a schema for its options, a driver or plugin can register CLI arguments and\nconfig file schemas with Appium.\n\nTo register a schema, an extension must provide the `appium.schema` property in its `package.json`.\nThe value may be a schema or a path to a schema. If the latter, the schema should be JSON or\na CommonJS module (ESM not supported at this time, nor is YAML).\n\nFor any property in this schema, the property will appear as a CLI argument of the form\n`----`. For example, if the `fake` driver provides\na property `foo`, the argument will be `--driver-fake-foo`, and will show in `appium server --help`\nlike any other CLI argument.\n\nThe corresponding property in a config file would be\n`server...`, e.g.:\n\n```json\n{\n \"server\": {\n \"driver\": {\n \"fake\": {\n \"foo\": \"bar\"\n }\n }\n }\n}\n```\n\nThe naming convention described above avoids problems of one extension type having a name conflict\nwith a different extension type.\n\n!!! note\n\n While an extension can provide aliases via `appiumCliAliases`, \"short\" flags are disallowed,\n since all arguments from extensions are prefixed with `----`.\n The extension name and argument name will be kebab-cased for the CLI, according to [Lodash's\n rules](https://lodash.com/docs/4.17.15#kebabCase) around kebab-casing.\n\nThe schema object will look much like Appium's base schema, but it will only have top-level\nproperties (nested properties are currently unsupported). Example:\n\n```json\n{\n \"title\": \"my rad schema for the cowabunga driver\",\n \"type\": \"object\",\n \"properties\": {\n \"fizz\": {\n \"type\": \"string\",\n \"default\": \"buzz\",\n \"$comment\": \"corresponds to CLI --driver-cowabunga-fizz\"\n }\n }\n}\n```\n\nAs written in a user's config file, this would be the `server.driver.cowabunga.fizz` property.\n\nWhen extensions are loaded, the `schema` property is verified and the schema is registered with the\n`AppiumSchema` (it is _not_ registered with `Ajv` until `finalize()` is called).\n\nDuring finalization, each registered schema is added to the `Ajv` instance. The schema is assigned\nan `$id` based on the extension type and name (which overrides whatever the extension provides, if\nanything). Schemas are also forced to disallowed unknown arguments via the `additionalProperties:\nfalse` keyword.\n\nBehind the scenes, the base schema has `driver` and `plugin` properties which are objects. When\nfinalized, a property is added to each--corresponding to an extension name--and the value of this\nproperty is a reference to the `$id` of a property in the extension schema. For example, the\n`server.driver` property will look like this:\n\n```json\n{\n \"driver\": {\n \"cowabunga\": {\n \"$ref\": \"driver-cowabunga.json\"\n }\n }\n}\n```\n\nThis is why we call it the \"base\" schema--it is _mutated_ when extensions provide schemas. The\nextension schemas are kept separately, but the _references_ are added to the schema before it's\nultimately added to `ajv`. This works because an `Ajv` instance understands references _from_ any\nschema it knows about _to_ any schema it knows about.\n\n!!! note\n\n This makes it impossible to provide a complete static schema for Appium _and_ the installed\n extensions (as of Nov 5 2021). A static `.json` schema _is_ generated from the base (via a Gulp\n task), but it does not contain any extension schemas. The static schema also has uses beyond\n Appium; e.g., IDEs can provide contextual error-checking of config files this way. Let's solve\n this?\n\nJust like how we look up the reference ID of a particular argument in the base schema, validation\nof arguments from extensions happens the exact same way. If the `cowabunga` driver has the schema\nID `driver-cowabunga.json`, then the `fizz` property can be referenced from any schema registered\nwith `ajv` via `driver-cowabunga.json#/properties/fizz`. \"Base\" schema arguments begin with\n`appium.json#properties/` instead.\n\n## Development Environment Support\n\nDuring the flow of development, a couple extra tasks have been automated to maintain the base\nschema:\n\n- As a post-transpilation step, a `lib/appium-config.schema.json` gets generated from\n- `lib/schema/appium-config-schema.js` (in addition to its CJS counterpart generated by Babel).\n- This file is under version control. It ends up being _copied_ to\n- `build/lib/appium-config.schema.json` in this step. A pre-commit hook (see\n- `scripts/generate-schema-declarations.js` in the root monorepo) generates\n- a `types/appium-config-schema.d.ts` from the above JSON file. The types in `types/types.d.ts`\n- depend upon this file. This file is under version control.\n\n## Custom Keyword Reference\n\nKeywords are defined in `lib/schema/keywords.js`.\n\n- `appiumCliAliases`: allows a schema to express aliases (e.g., a CLI argument can be `--verbose` or `-v`). This is an array of strings. Strings shorter than three (3) characters will begin with a single dash (`-`) instead of a double-dash (`--`). Note that any argument provided by an extension will begin with a double-dash, because these are required to have the `----` prefix.\n- `appiumCliDest`: allows a schema to specify a custom property name in the post-`argprase` arguments objects. If not set, this becomes a camelCased string.\n- `appiumCliDescription`: allows a schema to override the description of the argument when displayed on the command-line. This is useful paired with `appiumCliTransformer` (or `array`/`object`-typed properties), since there's a substantial difference between what a CLI-using user can provide vs. what a config-file-using user can provide.\n- `appiumCliTransformer`: currently a choice between `csv` and `json`. These are custom functions which post-process a value. They are not used when loading & validating config files, but the idea should be that they result in the same object you'd get if you used whatever the config file wanted (e.g., an array of strings). `csv` is for comma-delimited strings and CSV files; `json` is for raw JSON strings and `.json` files.\n- `appiumCliIgnore`: If `true`, do not support this property on the CLI.\n- `appiumDeprecated`: If `true`, the property is considered \"deprecated\", and will be displayed as such to the user (e.g., in the `--help` output). Note the JSON Schema draft-2019-09 introduces a new keyword `deprecated` which we should use instead if upgrading to this metaschema. When doing so, `appiumDeprecated` should itself be marked as `deprecated`.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/developing/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Developing Appium Extensions\n---\n\nAppium is built with a modular structure, which means that Appium extensions (drivers and plugins)\nare decoupled from the main Appium module, and you only need to install the extensions that you\nwant to use. This modular structure also unlocks the ability to develop entirely new extensions!\n\nThis section of the Appium documentation is intended to help aspiring developers with creating their\nown Appium extension:\n\n* For creating a driver, see the [Build Drivers](./build-drivers.md) page\n* For creating a plugin, take a look at the [Build Plugins](build-plugins.md) page\n* Drivers and plugins both need documentation, so check out the [Build Documentation](./build-docs.md) page\n* For creating a doctor check, see the [Building Doctor Checks](./build-doctor-checks.md) page\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/developing/sensitive.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Masking Sensitive Log Data\n---\n\nSince Appium server version 2.18.0 there is a possibility to mask sensitive\nvalues in logs. The below tutorial explains how to use this feature in third-party\nextensions.\n\n## Why It Might Be Useful\n\nIt is the right call to hide sensitive information, like passwords, tokens, etc.\nfrom server logs, so it does not accidentally leak if these logs end up in wrong hands.\nAppium server already provides a way to manipulate logs records via\n[filtering](../guides/log-filters.md), although it has its own limitations.\nThe current approach is more sophisticated though, and requires some fine-tuning\non the driver/plugin side.\n\n## How To\n\nThe assumption is that your extension uses the standard built-in\n[@appium/logger](https://www.npmjs.com/package/@appium/logger).\nIn order to get some value in logs replaced by a generic mask it is necessary:\n\n- Change the logging expression to wrap sensitive values and format them, for example:\n\n ```js\n this.log.info(`Value: ${value}`);\n ```\n\n becomes\n\n ```js\n import {logger} from '@appium/support';\n\n this.log.info('Value: %s', logger.markSensitive(value));\n ```\n\n The formatting happens via the standard Node.js's\n [util.format](https://nodejs.org/api/util.html#utilformatformat-args) API.\n\n- While sending the appropriate server request, where this log line is used and should be masked,\n add the custom header `X-Appium-Is-Sensitive` with its value set to `1` or `true` (case-insensitive).\n Without such header the above log value is not going to be masked.\n This way it is possible to conditionally mask log records depending on which\n request is being handled by the extension if the log expression is used in the\n common section.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/ecosystem/clients.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Clients\n---\n\nYou need a client to write and run Appium scripts. You'll want to become very\nfamiliar with your client documentation (as well as the documentation of any Selenium client that\nthe Appium client depends on) since that will be your primary interface to Appium.\n\nTo learn more about clients, check out the [Client Intro](../intro/clients.md).\n\n!!! note\n\n If you maintain an Appium client that you would like to be listed here, feel free to create a PR!\n\n## Official Clients\n\nThese clients are currently maintained by the Appium team:\n\n### [Java Client](https://github.com/appium/java-client)\n\nLanguage: :fontawesome-brands-java: Java\n\n=== \"Setup With Maven\"\n\n ```xml\n \n io.appium\n java-client\n ${version.you.require}\n test\n \n ```\n=== \"Setup With Gradle\"\n\n ```groovy\n dependencies {\n testImplementation 'io.appium:java-client:${version.you.require}'\n }\n ```\n\n### [Python Client](https://github.com/appium/python-client)\n\nLanguage: :fontawesome-brands-python: Python\n\n```sh title=\"Install From PyPi\"\npip install Appium-Python-Client\n```\n\n### [Ruby Core Client](https://github.com/appium/ruby_lib_core)\n\nLanguage: :material-language-ruby: Ruby\n\n```sh title=\"Install From RubyGems\"\ngem install appium_lib_core\n```\n\n### [Ruby Client](https://github.com/appium/ruby_lib)\n\nLanguage: :material-language-ruby: Ruby\n\nThis client is a wrapper for the Ruby Core Client with several helper methods, though this may\nadd additional complexity, therefore the Ruby Core Client is recommended instead.\n\n```sh title=\"Install From RubyGems\"\ngem install appium_lib\n```\n\n### [.NET Client](https://github.com/appium/dotnet-client)\n\nLanguage: :simple-dotnet: C#\n\n```sh title=\"Install Using .NET CLI\"\ndotnet add package Appium.WebDriver\n```\n\n## Other Clients\n\nThese clients are not maintained by the Appium team and can be used with other languages.\n\nIn general, any W3C WebDriver spec-compatible client will also integrate well with Appium, though\nsome Appium-specific commands may not be implemented in other clients.\n\n### [WebdriverIO](https://webdriver.io/docs/appium)\n\nLanguage: :material-language-javascript: :material-language-typescript: JavaScript/TypeScript\n\n```sh title=\"Setup Using npm\"\nnpm init wdio@latest .\n```\n\n### [Nightwatch.js](https://nightwatchjs.org/guide/mobile-app-testing/introduction.html)\n\nLanguage: :material-language-javascript: :material-language-typescript: JavaScript/TypeScript\n\n=== \"Setup For Android\"\n\n ```sh\n npx @nightwatch/mobile-helper android --appium\n ```\n\n=== \"Setup For iOS\"\n\n ```sh\n npx @nightwatch/mobile-helper ios --appium\n ```\n\n### [RobotFramework AppiumLibrary](https://github.com/serhatbolsu/robotframework-appiumlibrary)\n\nLanguage: :simple-robotframework: Robot Framework\n\n```sh title=\"Install From PyPi\"\npip install robotframework-appiumlibrary\n```\n\n### [multicatch's appium-client](https://github.com/multicatch/appium-client)\n\nLanguage: :simple-rust: Rust\n\n```sh title=\"Install Using Cargo\"\ncargo add appium-client\n```\n\n### [SwiftAppium](https://github.com/milcgroup/swiftappium)\n\nLanguage: :material-language-swift: Swift\n\n```sh title=\"Install and Setup\"\ngit clone https://github.com/milcgroup/SwiftAppium.git\ncd SwiftAppium\nswift build\nswift run swiftappium\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/ecosystem/drivers.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Drivers\n---\n\nYou can't use Appium without a driver! Here you can find a list of all known Appium drivers,\nalong with their installation commands and links to their documentation.\n\nTo learn more about drivers, check out the [Driver Intro](../intro/drivers.md).\n\n!!! note\n\n If you maintain an Appium driver that you would like to be listed here, feel free to create a PR!\n\n## Official Drivers\n\nThese drivers are currently maintained by the Appium team:\n\n### [Chromium](https://github.com/appium/appium-chromium-driver)\n\n* Target: Desktop and mobile Chromium browsers (Chrome, Microsoft Edge, etc.)\n* Mode: Web\n\n```sh title=\"Install This Driver\"\nappium driver install chromium\n```\n\n### [Espresso](https://github.com/appium/appium-espresso-driver)\n\n* Target: Android applications\n* Mode: Native\n\n```sh title=\"Install This Driver\"\nappium driver install espresso\n```\n\n### [Gecko](https://github.com/appium/appium-geckodriver)\n\n* Target: Desktop and mobile Gecko browsers (Firefox)\n* Mode: Web\n\n```sh title=\"Install This Driver\"\nappium driver install gecko\n```\n\n### [Mac2](https://github.com/appium/appium-mac2-driver)\n\n* Target: macOS applications\n* Mode: Native\n\n```sh title=\"Install This Driver\"\nappium driver install mac2\n```\n\n### [Safari](https://github.com/appium/appium-safari-driver)\n\n* Target: Desktop and mobile Safari browsers\n* Mode: Web\n\n```sh title=\"Install This Driver\"\nappium driver install safari\n```\n\n### [UiAutomator2](https://github.com/appium/appium-uiautomator2-driver)\n\n* Target: Android, Android TV, Android Wear applications\n* Modes: Native, Hybrid, Web\n\n```sh title=\"Install This Driver\"\nappium driver install uiautomator2\n```\n\n### [Windows](https://github.com/appium/appium-windows-driver)\n\n!!! warning\n\n Only the Node.js-based driver part is maintained by the Appium team. The server part\n (WinAppDriver executable) is provided by Microsoft, but has not been maintained since 2022.\n\n* Target: Windows applications\n* Mode: Native\n\n```sh title=\"Install This Driver\"\nappium driver install windows\n```\n\n### [XCUITest](https://appium.github.io/appium-xcuitest-driver/)\n\n* Target: iOS, iPadOS, tvOS applications\n* Modes: Native, Hybrid, Web\n\n```sh title=\"Install This Driver\"\nappium driver install xcuitest\n```\n\n## Other Drivers\n\nThese drivers are not maintained by the Appium team and can be used to target other platforms:\n\n### [Flutter](https://github.com/appium/appium-flutter-driver)\n\n* Target: iOS and Android applications built with Flutter\n* Mode: Native\n* Supported by: Appium Team / Community\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-flutter-driver\n```\n\n### [Flutter Integration](https://github.com/AppiumTestDistribution/appium-flutter-integration-driver)\n\n* Target: iOS and Android applications built with Flutter\n* Mode: Native\n* Supported by: Community / `@AppiumTestDistribution`\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-flutter-integration-driver\n```\n\n### [LG WebOS](https://github.com/headspinio/appium-lg-webos-driver)\n\n* Target: LG TV web applications\n* Mode: Web\n* Supported by: HeadSpin\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-lg-webos-driver\n```\n\n### [Linux](https://github.com/fantonglang/appium-linux-driver)\n\n!!! warning\n\n This driver has not been maintained since 2022 and requires a custom Appium installation\n\n* Target: Linux applications\n* Mode: Native\n* Supported by: `@fantonglang`\n\n```sh title=\"Install This Driver\"\ngit clone https://github.com/fantonglang/appium\ncd appium\nyarn install\nnode ./\n```\n\n### [NovaWindows](https://github.com/AutomateThePlanet/appium-novawindows-driver)\n\n!!! info\n\n This driver is recommended as a drop-in replacement for the partially unmaintained\n [Windows driver](#windows)\n\n* Target: Windows applications\n* Mode: Native\n* Supported by: Community / Automate The Planet\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-novawindows-driver\n```\n\n### [Roku](https://github.com/headspinio/appium-roku-driver)\n\n* Target: Roku channels (applications)\n* Mode: Native\n* Supported by: HeadSpin\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm @headspinio/appium-roku-driver\n```\n\n### [Tizen](https://github.com/Samsung/appium-tizen-driver)\n\n!!! warning\n\n This driver has not been maintained since 2020 and is only compatible with Appium 1\n\n* Target: Tizen applications\n* Mode: Native\n* Supported by: Community / Samsung\n\n```sh title=\"Install This Driver\"\nnpm install appium-tizen-driver\n```\n\n### [TizenTV](https://github.com/headspinio/appium-tizen-tv-driver)\n\n* Target: Tizen TV web applications\n* Mode: Web\n* Supported by: HeadSpin\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-tizen-tv-driver\n```\n\n### [You.i Engine](https://github.com/YOU-i-Labs/appium-youiengine-driver)\n\n!!! warning\n\n This driver has not been maintained since 2022 and is only compatible with Appium 1\n\n* Target: iOS, Android, macOS, Linux, tvOS applications built with You.i Engine\n* Mode: Native\n* Supported by: Community / You.i\n\n```sh title=\"Install This Driver\"\nnpm install appium-youiengine-driver\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/ecosystem/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: The Appium Ecosystem\n---\n\nAppium has a wide ecosystem of related software and tools. This section of the Appium documentation\naims to compile a listing of various officially-supported and community-supported Appium projects:\n\n
\n\n- :material-car: __Drivers__\n\n ---\n\n Link Appium to your test device\n\n [:octicons-arrow-right-24: View all drivers](./drivers.md)\n\n- :octicons-code-16: __Clients__\n\n ---\n\n Link Appium to your automation code\n\n [:octicons-arrow-right-24: View all clients](./clients.md)\n\n- :fontawesome-solid-plug: __Plugins__\n\n ---\n\n Modify and extend Appium functionality\n\n [:octicons-arrow-right-24: View all plugins](./plugins.md)\n\n- :material-wrench: __Tools__\n\n ---\n\n Interact with Appium in other ways\n\n [:octicons-arrow-right-24: View all tools](./tools.md)\n\n
\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/ecosystem/plugins.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Plugins\n---\n\nPlugins offer various ways to extend or modify Appium's behaviour. They are _completely optional_\nand are not needed for standard automation functionality, but you may find them to be useful\nfor more specialised automation workflows.\n\n!!! note\n\n If you maintain an Appium plugin that you would like to be listed here, feel free to create a PR!\n\n## Official Plugins\n\nThese plugins are are currently maintained by the Appium team:\n\n### [Execute Driver](https://github.com/appium/appium/tree/master/packages/execute-driver-plugin)\n\nRun entire batches of commands in a single call to the Appium server\n\n```sh title=\"Install This Plugin\"\nappium plugin install execute-driver\n```\n\n### [Images](https://github.com/appium/appium/tree/master/packages/images-plugin)\n\nAdd support for image matching and comparison features\n\n```sh title=\"Install This Plugin\"\nappium plugin install images\n```\n\n### [Inspector](https://github.com/appium/appium-inspector/tree/main/plugins)\n\nIntegrate the [Appium Inspector](https://appium.github.io/appium-inspector/) directly into your\nAppium server installation\n\n```sh title=\"Install This Plugin\"\nappium plugin install inspector\n```\n\n### [Relaxed Caps](https://github.com/appium/appium/tree/master/packages/relaxed-caps-plugin)\n\nRelax Appium's requirement for vendor prefixes on capabilities\n\n```sh title=\"Install This Plugin\"\nappium plugin install relaxed-caps\n```\n\n### [Storage](https://github.com/appium/appium/tree/master/packages/storage-plugin)\n\nAdd server-side storage with client-side management\n\n```sh title=\"Install This Plugin\"\nappium plugin install storage\n```\n\n### [Universal XML](https://github.com/appium/appium/tree/master/packages/universal-xml-plugin)\n\nTranslate the default iOS and Android XML formats into a common format\n\n```sh title=\"Install This Plugin\"\nappium plugin install universal-xml\n```\n\n## Other Plugins\n\nThese plugins are not maintained by the Appium team and can provide additional functionality:\n\n### [AltUnity](https://github.com/headspinio/appium-altunity-plugin)\n\nTarget Unity games and apps for automation via the AltUnityTester framework\n\nSupported by: HeadSpin\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-altunity-plugin\n```\n\n### [Device Farm](https://github.com/AppiumTestDistribution/appium-device-farm)\n\nManage and create driver sessions on connected Android devices and iOS simulators\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-device-farm\n```\n\n### [Gestures](https://github.com/AppiumTestDistribution/appium-gestures-plugin)\n\nPerform basic gestures using W3C Actions\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-gestures-plugin\n```\n\n### [Interceptor](https://github.com/AppiumTestDistribution/appium-interceptor-plugin)\n\nIntercept and mock API requests and responses\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-interceptor\n```\n\n### [OCR](https://github.com/jlipps/appium-ocr-plugin)\n\nFind elements via OCR text\n\nSupported by: `@jlipps`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-ocr-plugin\n```\n\n### [Reporter](https://github.com/AppiumTestDistribution/appium-reporter-plugin)\n\nGenerate standalone consolidated HTML reports with screenshots\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-reporter-plugin\n```\n\n### [Wait](https://github.com/AppiumTestDistribution/appium-wait-plugin)\n\nManage global element wait timeouts\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-wait-plugin\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/ecosystem/tools.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium-Related Tools\n---\n\nThe Appium ecosystem also includes several tools that have been created to assist with things not\ndirectly related to running tests, such as Appium installation, test development, and more.\n\n!!! note\n\n If you maintain an Appium tool that you would like to be listed here, feel free to create a PR!\n\n## Official Tools\n\nThese tools are currently maintained by the Appium team:\n\n### [Appium Inspector](https://appium.github.io/appium-inspector/)\n\nAppium has a graphical client which can be used to inspect application screenshots, view the\napplication hierarchy, search for elements, run Appium commands, record app interactions, and more.\nIt can be very useful for Appium test development.\n\n=== \"Install as an Appium Plugin\"\n\n ```bash\n appium plugin install inspector\n ```\n=== \"Install Standalone\"\n\n Download the app from the Appium Inspector repo's [GitHub Releases section](https://github.com/appium/appium-inspector/releases).\n\n### [Appium MCP](https://github.com/appium/appium-mcp)\n\nAppium MCP is a Model Context Protocol (MCP) server that provides mobile test development and\nautomation capabilities using Appium.\n\n```json title=\"Install This Tool\"\n// Add the following to your MCP client configuration\n{\n \"appium-mcp\": {\n \"disabled\": false,\n \"timeout\": 100,\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\"appium-mcp@latest\"],\n \"env\": {\n \"ANDROID_HOME\": \"/path/to/android/sdk\"\n }\n }\n}\n```\n\n## Extension Tools\n\nAppium driver or plugin developers can choose to include these tools in their driver/plugin:\n\n### Appium Doctor\n\nThe Appium Doctor tool can be used to validate whether all prerequisites and other environment\ndetails needed for the driver/plugin have been set up correctly. The tool can be accessed via the\n[`doctor` command in the Appium CLI](../reference/cli/extensions.md#doctor):\n\n```sh\nappium {driver|plugin} doctor \n```\n\nIt shows no results if the driver/plugin does not have such validation checks.\n\n!!! note\n\n If you maintain an Appium extension and would like to add Appium Doctor support for it, check\n out the documentation on [Building Doctor Checks](../developing/build-doctor-checks.md).\n\n## Other Tools\n\nThese tools are not maintained by the Appium team:\n\n### [Appium Installer](https://github.com/AppiumTestDistribution/appium-installer)\n\nAppium Installer is a command-line tool for simplifying setups of new Appium test environments.\nIt includes commands for installing Appium, its drivers and plugins, as well as validating\nprerequisites for iOS or Android emulators or real devices.\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Tool\"\nnpm install -g appium-installer\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/branch-testing.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Local Validation Of Extension PRs\n---\n\nSometimes it might be necessary to validate if a remote driver or a plugin PR works for the particular local\nenvironment before it is merged or published. This tutorial describes how to achieve that.\n\n## Requirements\n\n- Recent LTS version of NodeJS. Check [Node.js main page](https://nodejs.org) for the download link.\n- Recent version of the Appium server. Use the following commands to ensure you have\n the latest version installed: `npm uninstall appium` and `npm install -g appium`.\n- [Git](https://git-scm.com/) should be available locally.\n\n## Installation\n\n- [Check out](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally) the PR locally.\n There is also an option (although it is less flexible, because you won't be able to easily fetch\n any changes to this PR later) to simply [download](https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives) and unzip the sources\n locally. If you choose the later option then no `git` tool would be necessary.\n- Navigate to the local driver or plugin folder and run `npm i` from that folder.\n- Make sure you don't have the given driver or plugin already installed. Use the `appium driver uninstall `\n or `appium plugin uninstall ` CLI in order to delete any leftovers. The value of\n ``/`` depends on the actual driver or plugin name the PR has been prepared for.\n If you are not sure which name you need to use then check the content of the `package.json` manifest,\n which must be always located under the root folder of the fetched sources. You should be looking for\n the `\"appium\" -> \"driverName\"` entry value there.\n- Change the current folder to the one, which is NOT the driver/plugin folder root or its subfolder.\n Also, make sure your current working folder does not contain any extra `package.json` file. If\n it does then simply navigate to any other folder that does not.\n- Run the following command in order to link the driver/plugin sources to the Appium server:\n `appium driver install --source=local ` or\n `appium plugin install --source=local `.\n- Stop the Appium server if it is running and start it again (`appium server --use-drivers=`)\n to check the list of loaded drivers. If the linking succeeded then you must see the driver name and the path to its\n parent folder in the server logs. In case of a plugin it is required to explicitly request\n this plugin to be loaded upon server startup: `appium server --use-plugins=`.\n\n## Update\n\nAfter you have tested the PR and there are issues it might be necessary to update the local branch with\nthe recent changes from Git. Follow the next steps for that:\n\n- Navigate to the parent folder of your local driver/plugin and run `git pull`.\n- Stop Appium server if it is running.\n- Run `npm i` in the parent folder of your local driver/plugin to rebuild it and update any dependencies if necessary.\n- Start Appium server again similarly to how this is done in the corresponding [Installation](#installation) step above.\n\n## Switching Back To a Stable Release\n\nAfter the PR is merged there is no need to use the local plugin/driver deployment anymore, and it makes sense\nto switch back to the package managed by NPM. Follow the next steps for that:\n\n- Unlink the installed driver/plugin from the server by running `appium driver uninstall ` or\n `appium plugin uninstall `.\n- Delete the local source folder (`rm -rf `).\n- Install the driver or the plugin from NPM. Check the component README in order to find a proper command for that.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/caching.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Caching of Application Bundles\n---\n\nAppium's base driver provides a feature which enables caching of application builds provided, for example,\nas `app` capability value or to endpoints similar to the `installApp` one. This article explains common caching\nprinciples, so you could create more performant and efficient test suite execution strategies.\n\n## Why Caching Is Necessary\n\nMobile application bundles could reach hundreds of megabytes is size. This could become a serious\nperformance issue if a test suite is executed, and it is necessary to fetch/extract the same application\nbundle for each test.\n\n## What Is Cached\n\nCaching could be applied to application bundles generated by\n[`configureApp`](https://github.com/appium/appium/blob/master/packages/base-driver/lib/basedriver/helpers.js#L107) helper call.\nInherited drivers can customize their caching logic by providing own `onPostProcess`\n(or both `inDownload` and `onPostProcess`) property definition, but the general\nrule of thumb is that we need to cache locally all application bundles need to be downloaded and/or extracted\nfirst before they could be actually installed on the device under test. On iOS, for example, these are `.ipa` or\n`.zip` compressed application bundles, or .`aab` on Android.\n\n## Caching of Remote Application Bundles\n\nIn order to validate whether an app bundle downloaded from the given URL could be (re)used from the cache the following\nsteps are applied:\n\n1. The script checks if the given URL is already present in the cache.\n If yes then it tries to fetch previously remembered\n [Last-Modified](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified)\n or [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header values for it.\n2. If `ETag` value is present then it is put into\n [If-None-Match request header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match).\n Else if `Last-Modified` header value is present then it is put into\n [If-Modified-Since request header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since).\n Otherwise, no caching is applied.\n3. If the response status is equal to `304` then the previously cached binary is used,\n otherwise the cached entry is reset and refreshed.\n\n## Caching of Local Application Bundles\n\nIt only makes sense to cache application bundles if they need some preprocessing before being installed on the device under test.\nFor example, on iOS `.ipa` bundles must be unzipped, because the system installer only works with `.app` folders.\n\n1. The script verifies if the given bundle path is already present in the cache. If the bundle was not in the cache yet\nthen it gets preprocessed and added there.\n2. The script validates the hashsum of the bundle and compares it to the previously stored one. If hash sums don't match\nthen the cached item gets deleted and the preprocessing of the bundle repeats.\n\n## How The Cache File System Is Configured\n\nThe cache where the base driver keeps all application bundles is located in the system temp folder. It is configured\non per-process basis, so each test session initialized in scope of the same Appium server process takes advantages\nof it. It is a [LRU Cache](https://www.npmjs.com/package/lru-cache) with the following limitations:\n\n- Max items: 1024. You may customize it by providing a new value to\n the [APPIUM_APPS_CACHE_MAX_ITEMS](../reference/cli/env-vars.md) environment variable.\n Do not set it to a lower number than the amount of apps in all parallel sessions per process.\n- Max time to live (TTL) for each entry: 24 hours.\n You may customize it by providing a new value to the\n [APPIUM_APPS_CACHE_MAX_AGE](../reference/cli/env-vars.md) environment variable.\n Do not set it to a lower number than the duration of a single session startup.\n- TTL is refreshed for each entry upon access\n- By default the full application URL is used as cache key. You may change this behavior\n by enabling the [APPIUM_APPS_CACHE_IGNORE_URL_QUERY](../reference/cli/env-vars.md) environment variable.\n If the above option is enabled then the 'search' part of the app URL will be cut off from cache keys.\n See the corresponding [feature request](https://discuss.appium.io/t/regarding-app-caching-when-using-aws-s3-presigned-urls/42713)\n for more details.\n\n!!! warning\n\n Note: The cache root folder is set up for automatic deletion on Appium process termination. This would only\n work if Appium server is killed with `SIGINT` or `SIGTERM`. If `SIGKILL` is used then no cache cleanup\n would be performed.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/caps.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Session Capabilities\n---\n\n\"Capabilities\" is the name given to the set of parameters used to start an Appium session. The\ninformation in the set describes what sort of \"capabilities\" you want your session to have, for\nexample, a certain mobile operating system or a certain version of a device. Capabilities are\nrepresented as key-value pairs, with values allowed to be any valid JSON type, including\nother objects.\n\nThe W3C WebDriver spec's [section on Capabilities](https://w3c.github.io/webdriver/#capabilities)\nidentifies a small set of 10 standard capabilities, including the following:\n\n| Capability Name | Type | Description |\n|------------------|----------|------------------------------------------------|\n| `browserName` | `string` | The name of the browser to launch and automate |\n| `browserVersion` | `string` | The specific version of the browser |\n| `platformName` | `string` | The type of platform hosting the browser |\n\n## Common Appium Capabilities\n\nAppium understands these browser-focused capabilities, but introduces a number of additional\ncapabilities. According to the WebDriver spec, any\nnon-standard \"extension capabilities\" must include a namespace prefix (signifying the vendor\nintroducing the capability), ending in a `:`. Appium's vendor prefix is\n`appium:`, and so any Appium-specific capabilities must include this prefix. Depending on which\nclient you are using, the prefix may be added automatically or in conjunction with certain\ninterfaces, but it is always a good practice to explicitly include it for clarity.\n\nHere is a list of all the globally-recognized Appium capabilities:\n\n!!! info\n\n Individual drivers and plugins can support other capabilities, so refer to their documentation\n for lists of specific capability names. Some drivers may also not support all of these capabilities\n\n|
Capability
| Type | Required? | Description |\n|--------------------------------------------|-----------|-----------|----------------------------|\n| `platformName` | `string` | yes | The type of platform hosting the app or browser |\n| `appium:automationName` | `string` | yes | The name of the Appium driver to use |\n| `browserName` | `string` | no | The name of the browser to launch and automate, if the driver supports web browsers as a special case |\n| `appium:app` | `string` | no | The path to an installable application |\n| `appium:deviceName` | `string` | no | The name of a particular device to automate, e.g., `iPhone 14` (currently only actually useful for specifying iOS simulators, since in other situations it's typically recommended to use a specific device id via the `appium:udid` capability). |\n| `appium:platformVersion` | `string` | no | The version of a platform, e.g., for iOS, `16.0` |\n| `appium:newCommandTimeout` | `number` | no | The number of seconds the Appium server should wait for clients to send commands before deciding that the client has gone away and the session should shut down. `60` seconds by default. Setting it to zero disables the timer. |\n| `appium:noReset` | `boolean` | no | If true, instruct an Appium driver to avoid its usual reset logic during session start and cleanup (default `false`) |\n| `appium:fullReset` | `boolean` | no | If true, instruct an Appium driver to augment its usual reset logic with additional steps to ensure maximum environmental reproducibility (default `false`) |\n| `appium:eventTimings` | `boolean` | no | If true, instruct an Appium driver to collect [Event Timings](./event-timing.md) (default `false`) |\n| `appium:printPageSourceOnFindFailure` | `boolean` | no | If true, collect the page source and print it to the Appium log whenever a request to find an element fails (default `false`) |\n\n\nSome drivers place more complex constraints on capabilities as a group. For example, while the\n`appium:app` and `browserName` capabilities are listed above as optional, if you want to launch\na session with a specific app, the XCUITest driver requires that at least one of `appium:app`,\n`browserName`, or `appium:bundleId` are included in the capabilities (otherwise it will not know\nwhat app to install and/or launch and will simply open a session on the home screen). Each driver\nwill document how it interprets these capabilities and any other platform-specific requirements.\n\n!!! note\n\n Capabilities are like parameters used when starting a session. After the capabilities are sent\n and the session is started, they cannot be changed. If a driver supports updating aspects of\n its behaviour in the course of a session, it will provide a [Setting](./settings.md) for this\n purpose instead of, or in addition to, a capability.\n\nEach Appium client has its own way of constructing capabilities and starting a session. For\nexamples of doing this in each client library, head to the [Ecosystem](../ecosystem/index.md) page\nand click through to the appropriate client documentation.\n\n## BiDi Protocol Support\n\nAppium supports [WebDriver BiDi](https://w3c.github.io/webdriver-bidi/) protocol since base\u2013driver 9.5.0.\nThe actual behavior depends on individual drivers while the Appium and the base\uff70driver support the protocol.\nPlease make sure if a driver supports the protocol and what kind of commands/events it supports in the documentation.\n\n| Capability Name | Type | Description |\n|-----------------|-----------|-----------------------------------------|\n| `webSocketUrl` | `boolean` | To enable BiDi protocol in the session. |\n\n## Using `appium:options` to Group Capabilities\n\nIf you use a lot of `appium:` capabilities in your tests, it can get a little repetitive. You can\ncombine all capabilities as an object value of a single `appium:options` capability instead, in\nwhich case you don't need to use prefixes on the capabilities inside the object. For example:\n\n```json\n{\n \"platformName\": \"iOS\",\n \"appium:options\": {\n \"automationName\": \"XCUITest\",\n \"platformVersion\": \"16.0\",\n \"app\": \"/path/to/your.app\",\n \"deviceName\": \"iPhone 12\",\n \"noReset\": true\n }\n}\n```\n\nNote that constructing a capability value which is itself an object differs by language; refer to\nyour client documentation for further examples on how to achieve this.\n\n!!! warning\n\n If you include the same capabilities both inside and outside of `appium:options`, the values\n inside of `appium:options` take precedence.\n\n## Always-Match and First-Match Capabilities\n\nThe W3C spec allows clients to give the Appium server some flexibility in the kind of session it\ncreates in response to a new session request. This is through the concept of \"always-match\" and\n\"first-match\" capabilities:\n\n- Always-match capabilities consist of a single set of capabilities, every member of which must\n be satisfied by the server in order for the new session request to proceed.\n- First-match capabilities consist of an array of capability sets. Each set is merged with the\n always-match capabilities, and the first set that the server knows how to handle will be the set\n that is used to start the session.\n\n!!! note\n\n Check out the [spec itself](https://w3c.github.io/webdriver/#processing-capabilities) or\n a [summarized version](https://github.com/jlipps/simple-wd-spec#processing-capabilities) for\n a more in-depth description of how capabilities are processed.\n\nIn practice, use of first-match capabilities is not necessary or recommended for use with Appium.\nInstead, we recommend that you define the explicit set of capabilities you want the Appium\nserver to handle. These will be encoded as the always-match capabilities, and the array of\nfirst-match capabilities will be empty.\n\nThat being said, Appium _does_ understand always-match and first-match capabilities as\ndefined in the W3C spec, so if you use these features, Appium will work as expected. The process of\ndefining always-match and first-match capabilities is unique to each client library, so refer to\nthe documentation for your client library to see examples of how it works.\n\n## Special Notes for Cloud Providers\n\n!!! warning\n\n This section is not intended for end-users of Appium; it is intended for developers building\n Appium-compatible cloud services.\n\nWhen managing an Appium cloud, your users may wish to target various independent versions of Appium\ndrivers and plugins. It is of course up to each service provider how they wish to implement the\ndiscovery, installation, and availability of any official or third party drivers or plugins. But\nthe Appium team does provide several suggestions, for consistency across the industry. _These are\nrecommendations only,_ and not a standard, but adopting it will help users to navigate the increased\ncomplexity that working with Appium in a cloud environment may bring.\n\n### Suggested capabilities\n\nIn addition to the standard `platformName`, `appium:deviceName`, `appium:automationName`, and\n`appium:platformVersion`, we recommend adopting the capability `$cloud:appiumOptions`, where the\nlabel `$cloud` is not meant to be interpreted literally but instead should be replaced by your\nvendor prefix (so for HeadSpin it would be `headspin`, Sauce Labs it would be `sauce`, and\nBrowserStack it would be `browserstack`, to name just a few examples). The `$cloud:appiumOptions`\ncapability would itself be a JSON object, with the following internal keys:\n\n|
Capability
| Usage | Example |\n| ---------------------------------------- | ------ | ------- |\n| `version` | The version of the Appium server that is used to host and manage drivers. If omitted, the behavior is left up to the provider, but the recommendation would be to provide the latest official version. | `2.0.0` |\n| `automationVersion` | The version of the driver (as specified by `appium:automationName`) that should be used. | `1.55.2` |\n| `automation` | The name of a custom driver to use (see below for more info). This would override `appium:automationName` and `$cloud:automationVersion`. | `{\"name\": \"@org/custom-driver\", \"source\": \"github\", \"package\": \"custom-driver\"}` |\n| `plugins` | The list of plugins (and potentially versions of plugins) that should be activated (see below for more info). | `[\"images\", \"universal-xml\"]` |\n\n### Basic example\n\nAppium extensions (drivers and plugins) have a set of properties that specify where they can be\ninstalled from. Cloud providers are obviously under no obligation to provide support for\narbitrarily specified extensions, seeing as these may represent untrusted code running in a managed\nenvironment. In the case where arbitrary extensions are not supported, the `appium:automationName`,\n`$cloud:automationVersion`, and `$cloud:appiumPlugins` capabilities should be sufficient. See the\nfollowing JSON object representing capabilities for a session:\n\n```json\n{\n \"platformName\": \"iOS\",\n \"appium:platformVersion\": \"14.4\",\n \"appium:deviceName\": \"iPhone 11\",\n \"appium:app\": \"Some-App.app.zip\",\n \"appium:automationName\": \"XCUITest\",\n \"$cloud:appiumOptions\": {\n \"version\": \"2.0.0\",\n \"automationVersion\": \"3.52.0\",\n \"plugins\": [\"images\"]\n }\n}\n```\n\nThis set of capabilities requests an Appium 2+ server supporting the XCUITest driver at version\n`3.52.0`, and the `images` plugin active. This set is easy for a cloud provider to verify. The\ncloud provider can obviously do anything it wants in response to these capabilities, including\ndownloading Appium and driver and plugin packages on the fly, or erroring out if the versions\nrequested are not in a supported set, or if the plugin is not supported, etc...\n\n### Basic example with `appium:options`\n\nThe previous example still looks a bit disorganized, so of course we also recommend that cloud\nproviders support the `appium:options` capability as detailed above, which could turn the previous\nset of capabilities into the following:\n\n```json\n{\n \"platformName\": \"iOS\",\n \"appium:options\": {\n \"platformVersion\": \"14.4\",\n \"deviceName\": \"iPhone 11\",\n \"app\": \"Some-App.app.zip\",\n \"automationName\": \"XCUITest\"\n },\n \"$cloud:appiumOptions\": {\n \"version\": \"2.0.0\",\n \"automationVersion\": \"3.52.0\",\n \"plugins\": [\"images\"]\n }\n}\n```\n\n### Extension objects\n\nSome service providers may wish to dynamically allow access to all of the features of the Appium\n2 CLI, including downloading arbitrary drivers and plugins. To represent these extensions, we can\ndefine special JSON \"extension objects\", with the following keys:\n\n- `name`: the name of the extension. This would be an `npm` package name (if downloading from `npm`),\n or a `git` or GitHub spec (if downloading from a `git` server or GitHub).\n- `version`: the version of the extension, e.g., the `npm` package version or `git` SHA.\n- (optional) `source`: a denotation of where the extension can be downloaded from. It is recommended\n to support the following values: `appium`, `npm`, `git`, `github`. Here, `appium` means \"Appium's\n own official list\", and should be the default value if this key is not included.\n- (optional) `package`: when downloading extensions from `git` or GitHub, the `npm` package name of\n the extension must also be provided. This is optional for non-`git` sources.\n\nSince each session is handled by a single driver, the `$cloud:appiumOptions`/`$automation`\ncapability could be used with an extension object value to denote this driver, for example:\n\n```json\n{\n \"$cloud:appiumOptions\": {\n \"automation\": {\n \"name\": \"git+https://some-git-host.com/custom-driver-project.git\",\n \"version\": \"some-git-sha\",\n \"source\": \"git\",\n \"package\": \"driver-npm-package-name\"\n }\n }\n}\n```\n\nAnd since sessions can handle multiple plugins, each value in the list of `$cloud:appiumPlugins`\ncould also be an extension object rather than a string, so that specific versions could be\nrequested:\n\n```json\n{\n \"$cloud:appiumOptions\": {\n \"plugins\": [{\n \"name\": \"images\",\n \"version\": \"1.1.0\"\n }, {\n \"name\": \"my-github-org/my-custom-plugin\",\n \"version\": \"a83f2e\",\n \"source\": \"github\",\n \"package\": \"custom-plugin\"\n }]\n }\n}\n```\n\nThese serve as illustrative examples for the recommendations here. Of course, it is up to the\nservice providers to implement the handling of these capabilities at their front end / load\nbalancer, to perform any error checking, or to actually run any of the `appium driver` or `appium\nplugin` CLI commands that support the end user's request. This section is merely a suggestion as to\nhow service providers might design their user-facing capabilities API in a way which in principle\nsupports all of the capabilities that Appium itself would provide to the end user if they were\nrunning Appium on their own.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/config.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: The Appium Config File\n---\n\nInstead of passing arguments on the command line to Appium, you may add them to a special config\nfile. Appium will read values from this config file when it runs. (Please note that CLI arguments\nhave _precedence_ over configuration files; if a value is set in a config file _and_ via CLI\nargument, the CLI argument is preferred.)\n\n## Supported Config File Formats\n\nYou can store your config data in the following kinds of files:\n\n- JSON\n- YAML\n- JS (a JavaScript file exporting a JS object)\n- CJS (the same as above; the extension is for common JS)\n\n!!! warning\n\n Note: Configuration files in ESM format are not currently supported.\n\n## Supported Config File Locations\n\nConfiguration files can be named anything, but the following filenames will be automatically\ndiscovered and loaded by Appium:\n\n- `.appiumrc.json` (recommended)\n- `.appiumrc.yaml`\n- `.appiumrc.yml`\n- `.appiumrc.js`\n- `.appiumrc.cjs`\n- `appium.config.js`\n- `appium.config.cjs`\n- `.appiumrc` (which is considered to be JSON)\n\nFurther, _if your project uses Node.js,_ you can use store the configuration inside an `appium`\nproperty in your `package.json` and it will be automatically discovered.\n\n### Config File Search\n\nAppium will search _up_ the directory tree from the current working directory for one of these\nfiles. If it reaches the current user's home directory or filesystem root, it will stop looking.\n\nTo specify a _custom_ location for your config file, use `appium --config /path/to/config/file`.\n\n#### Configuration File Format\n\nFirst, you might want to look at some examples:\n\n- [Appium Configuration - JSON](https://github.com/appium/appium/blob/master/packages/appium/sample-code/appium.config.sample.json)\n- [Appium Configuration - YAML](https://github.com/appium/appium/blob/master/packages/appium/sample-code/appium.config.sample.yaml)\n- [Appium Configuration - JS](https://github.com/appium/appium/blob/master/packages/appium/sample-code/appium.config.sample.js)\n\nA description of the format is available, as well:\n\n- [Appium Configuration File JSON Schema](https://github.com/appium/appium/blob/master/packages/schema/lib/appium-config.schema.json)\n- [TypeScript declarations for Appium Configuration](https://github.com/appium/appium/blob/master/packages/types/lib/config.ts)\n\nTo describe in words, the config file will have a root `server` property, and all arguments are\nchild properties. For certain properties which must be supplied on the command-line as\ncomma-delimited lists, JSON strings, and/or external filepaths, these instead will be of their\n\"native\" type. For example, `--use-plugins ` needs `` to be comma-delimited string\nor path to a delimited file. However, the config file just wants an array, e.g.,:\n\n```json\n{\n \"server\": {\n \"use-plugins\": [\"my-plugin\", \"some-other-plugin\"]\n }\n}\n```\n\n## Configuring extensions (drivers and plugins)\n\nFor `driver`-and-`plugin`-specific configuration, these live under the `server.driver` and\n`server.plugin` properties, respectively. Each driver or plugin will have its own named property,\nand the values of any specific configuration it provides are under this. For example:\n\n```json\n{\n \"server\": {\n \"driver\": {\n \"xcuitest\": {\n \"webkit-debug-proxy-port\": 5400\n }\n }\n }\n}\n```\n\n!!! note\n\n The above configuration corresponds to the `--driver-xcuitest-webkit-debug-proxy-port` CLI argument.\n\nAll properties are case-sensitive and will be in\n[kebab-case](https://en.wikipedia.org/wiki/Naming_convention_(programming)#Delimiter-separated_words).\nFor example, `callback-port` is allowed, but `callbackPort` is not.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/context.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Managing Contexts\n---\n\nA common feature of many app platforms is the ability for developers to embed web content inside of\nthe platform-native app frame. This allows developers to leverage web technologies or existing web\ncontent for some or all of the app functionality. However, the additional complexity of mixing\n\"modes\" within a single application can make it difficult for automation tools that are designed to\ntarget the \"native\" elements and behaviours.\n\nAppium provides a set of APIs for working with different app modes, called \"contexts\", that Appium\ndrivers can implement if they support automation commands in these different modes. There are three\nbasic commands that Appium has added to the W3C WebDriver spec for this purpose:\n\n| Command Name | Method/Route | Params | Description | Returns |\n|-----------------------|-----------------------------|-------------------|-----------------------------------------------|-----------------|\n| `Get Contexts` | `GET /session/:id/contexts` | | Get a list of the available contexts | `array` |\n| `Get Current Context` | `GET /session/:id/context` | | Get the name of the active context | `string` |\n| `Set Context` | `POST /session/:id/context` | `name` (`string`) | Switch into the context with the given `name` | `null` |\n\nThis API is flexible enough to handle a variety of semantic interpretations on the part of the\ndriver. For example, the XCUITest driver includes two kinds of contexts: the native app context and\nany active webviews, as one context per webview. A call to `Get Contexts` will return the list of\nnames, which you as a test author can sift through and use to switch into the appropriate context.\nAs another example, the [Appium Altunity\nPlugin](https://github.com/headspinio/appium-altunity-plugin) introduces the concept of a `UNITY`\ncontext, which encapsulates all the plugin's specific behaviour to ensure that when outside of the\n`UNITY` context, the active driver's usual command implementations are used.\n\nIt is important to note that a call to `Get Contexts` will always contain at least one context,\nconventionally but not necessarily named `NATIVE_APP`. This is the default active context.\n\nDepending on the type of context you're in, the operation of the driver might change. The XCUITest\ndriver, when targeting a webview context, will not run its typical routines for finding and\ninteracting with elements. Instead, it will run a different set of routines appropriate to web\nelements. This might have a variety of consequences, like supporting a different set of locator\nstrategies.\n\nThe command names in the table above are generic references to the commands and not code examples.\nFor examples of how to access the Context API in the language-specific client libraries, please\nvisit the documentation for a given library.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/event-timing.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Retrieving Event Timings\n---\n\nAppium comes with the ability to retrieve timing information about startup\ninformation and command length. This is an advanced feature that is controlled\nby the use of the `appium:eventTimings` capability (set it to `true` to log event\ntimings).\n\nWith this capability turned on, the `POST /session/:id/appium/events` response (i.e., \nthe response to `driver.logs.events` or similar, depending on client) will be \ndecorated with an `events` property. This is the structure of that `events`\nproperty:\n\n```\n{\n \"\": [, ...],\n \"commands\": [\n {\n \"cmd\": \"\",\n \"startTime\": ,\n \"endTime\": \n },\n ...\n ]\n}\n```\n\nIn other words, the `events` property has 2 kinds of properties of its own:\n\n* Properties which are the names of event types\n* The `commands` property\n\nProperties which are names of event types correspond to an array of timestamps\nwhen that event happened. It's an array because events might happen multiple\ntimes in the course of a session. Examples of event types include:\n\n* `newSessionRequested`\n* `newSessionStarted`\n\n(Individual drivers will define their own event types, so we do not have an\nexhaustive list to share here. It's best to actually get one of these responses\nfrom a real session to inspect the possible event types.)\n\nThe `commands` property is an array of objects. Each object has the name of the\nAppium-internal command (for example `click`), as well as the time the command\nstarted processing and the time it finished processing.\n\nWith this data, you can calculate the time between events, or a strict timeline\nof events, or statistical information about average length of a certain type of\ncommand, and so on.\n\nYou can only receive data about events that have happened when you make the\ncall to `/session/:id/appium/events`, so the best time to get data about an entire session is\nright before quitting it.\n\nThe Appium team maintains an event timings parser tool that can be used to\ngenerate various kinds of reports from event timings output:\n[appium/appium-event-parser](https://github.com/appium/appium-event-parser).\n\n!!! note\n\n In the past, events were available as a part of `GET /session/:id` response\n\n## Add a custom event\n\nYou can add custom events that will show up in the event timings data. You can send a custom event\nname to the Appium server using the [Log Custom Event API](../reference/api/appium.md#logcustomevent),\nand the server will store the timestamp. The [Get Log Events](../reference/api/appium.md#getlogevents)\ncommand can be used to retrieve named events' timestamps later on.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/execute-methods.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Execute Methods\n---\n\nBecause the scope of commands implemented in Appium drivers is broader than the scope of commands\ndefined by the W3C WebDriver spec, Appium needs a way for these \"extended\" commands to be accessible\nby client libraries. There are two main strategies for this:\n\n1. Appium drivers define new W3C-compatible API routes, and Appium clients are updated to include\n support for those new routes.\n2. Appium drivers define so-called \"Execute Methods\" which provide new functionality by\n overloading the existing `Execute Script` command which is already available in any WebDriver-\n based client library (including all Selenium and Appium clients).\n\nThere are pros and cons for each strategy, but it is ultimately up to the extension author to\ndecide how they wish implement new commands. \n\nThis guide is designed to specifically help you understand the \"Execute Method\" strategy. This\npattern is commonly used in official Appium drivers and other third-party extensions.\nHere's an example of how the `Execute Script` command is designed to work in the world of WebDriver\nand browser automation:\n\n=== \"JS (WebDriverIO)\"\n\n ```js\n await driver.executeScript('return arguments[0] + arguments[1]', [3, 4])\n ```\n\n=== \"Java\"\n\n ```java\n JavascriptExecutor jsDriver = (JavascriptExecutor) driver;\n jsDriver.executeScript(\"return arguments[0] + arguments[1]\", 3, 4);\n ```\n\n=== \"Python\"\n\n ```py\n driver.execute_script('return arguments[0] + arguments[1]', 3, 4)\n ```\n\n=== \"Ruby\"\n\n ```rb\n driver.execute_script 'return arguments[0] + arguments[1]', 3, 4\n ```\n\n=== \"C#\"\n\n ```dotnet\n ((IJavaScriptExecutor)driver).ExecuteScript(\"return arguments[0] + arguments[1]\", 3, 4);\n ```\n\nWhat's happening here is that we are defining a snippet of Javascript (technically,\na function body) to be executed within the web browser. The client can send arguments which are\nserialized, sent over HTTP, and finally provided to the function as parameters. In this example,\nwe are essentially defining an addition function. The return value of the `Execute Script` command\nis whatever the return value of the Javascript snippet is! In the case of this example, that value\nwould be the number `7` (`3` + `4`).\n\nEach client library has its own way of calling the command and providing any arguments to the script\nfunction, but the function itself\u2014the snippet\u2014is always a string and is the same across all languages.\n\nIn the world of Appium, we are usually not automating a web browser, which means this command is\nnot particularly useful. But it *is* useful as a way to encode the name of an arbitrary command and\nto provide parameters. For example, the [XCUITest\nDriver](https://github.com/appium/appium-xcuitest-driver) has implemented a command that lets a client\nterminate a running application if you know the ID (the `bundleId`) of the app. The way that the\ndriver makes this command available is via the Execute Method `mobile: terminateApp`. Instead of\nproviding a JavaScript function to the \"Execute Script\" command, the user provides a _known string_\nas defined by the driver. The only other thing a client needs to know is the set of\nparameters for the method, which are documented by the driver. In this case, we have a parameter\nnamed `bundleId`, whose value should be a string encoding the ID of the app to terminate. Here is\nhow this Execute Method would be called:\n\n=== \"JS (WebDriverIO)\"\n\n ```js\n await driver.executeScript('mobile: terminateApp', [{bundleId: 'com.my.app'}])\n ```\n\n=== \"Java\"\n\n ```java\n JavascriptExecutor jsDriver = (JavascriptExecutor) driver;\n jsDriver.executeScript(\"mobile: terminateApp\", ImmutableMap.of(\"bundleId\", \"com.my.app\"));\n ```\n\n=== \"Python\"\n\n ```py\n driver.execute_script('mobile: terminateApp', {'bundleId': 'com.my.app'})\n ```\n\n=== \"Ruby\"\n\n ```rb\n driver.execute_script 'mobile: terminateApp', { bundleId: 'com.my.app' }\n ```\n\n=== \"C#\"\n\n ```dotnet\n ((IJavaScriptExecutor)driver).ExecuteScript(\"mobile: terminateApp\",\n new Dictionary { { \"bundleId\", \"com.my.app\" } });\n\n ```\n\nThere are two important differences in using Appium Execute Methods from vanilla Selenium\nJavascript execution:\n\n1. The script string is just a command name; it will be provided by the driver documentation\n1. The standard way to provide parameters is as a *single* object with keys representing parameter\n names and values representing parameter values. So in this case, we had to specify both the\n parameter name (`bundleId`) as the key of the parameters object, and the parameter value\n (`com.my.app`) as the value for that key. A driver can define parameters as _required_ or _optional_.\n\nOf course, always refer to the documentation for the particular Execute Method in case the author\nhas made any alterations to the standard access method.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/grid.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium and Selenium Grid\n---\n\n## Using Selenium Grid 4+\n\nThe\n[relay](https://www.selenium.dev/documentation/grid/configuration/toml_options/#relaying-commands-to-a-service-endpoint-that-supports-webdriver)\nfeature in Grid 4 allows you to proxy Appium requests to an Appium server instance. Here is\nan example walkthrough of how you would connect two different Appium instances to a Selenium Grid.\n\n### Define the Appium configs\n\nEach Appium instance should have a config file that can be easily updated. It should contain any\ninformation which needs to be unique to that particular server (e.g., ports its drivers should use\nthat others should not). We are going to have 2 Appium servers, so we will need 2 config files:\n\n```yaml\n# appium1.yml\nserver:\n port: 4723\n use-drivers:\n - xcuitest\n default-capabilities:\n appium:wdaLocalPort: 8100\n appium:mjpegServerPort: 9100\n appium:mjpegScreenshotUrl: \"http://localhost:9100\"\n appium:platformVersion: \"26.0\"\n appium:deviceName: \"iPhone 17\"\n```\n\nIn the above YAML config file, we specify the Appium server port, the driver used, and parameters\nfor the driver that will be sent in as default capabilities. Our goal is to ensure that any other\ndrivers running on this host will not compete with system ports or other resources. The second\nconfig file could look like the following, where we simply adjust a few ports to prevent clashes:\n\n```yaml\n# appium2.yml\nserver:\n port: 4733\n use-drivers:\n - xcuitest\n default-capabilities:\n appium:wdaLocalPort: 8110\n appium:mjpegServerPort: 9110\n appium:mjpegScreenshotUrl: \"http://localhost:9110\"\n appium:platformVersion: \"26.0\"\n appium:deviceName: \"iPhone 16\"\n```\n\n### Define the Grid node configs\n\nWe will be launching one Grid \"node\" per Appium server, to manage relaying commands and determining\ncapacity and online status, etc... So we should have one config file per Grid node as well. Each\nnode config should include the address of the Appium server it will target, as well as a list of\ncapability \"configs\" it should accept to relay a session request to Appium. Here is what the config\ncould look like for the two nodes:\n\n```toml\n# node1.toml\n[server]\nport = 5555\n\n[node]\ndetect-drivers = false\n\n[events]\npublish = \"tcp://HUB_IP_ADDRESS:4442\"\nsubscribe = \"tcp://HUB_IP_ADDRESS:4443\"\n\n[relay]\nurl = \"http://localhost:4723\"\nstatus-endpoint = \"/status\"\nconfigs = [\n \"1\", \"{\\\"platformName\\\": \\\"iOS\\\", \\\"appium:automationName\\\": \\\"XCUITest\\\"}\"\n]\n```\n\n```toml\n# node2.toml\n[server]\nport = 5565\n\n[node]\ndetect-drivers = false\n\n[events]\npublish = \"tcp://HUB_IP_ADDRESS:4442\"\nsubscribe = \"tcp://HUB_IP_ADDRESS:4443\"\n\n[relay]\nurl = \"http://localhost:4733\"\nstatus-endpoint = \"/status\"\nconfigs = [\n \"1\", \"{\\\"platformName\\\": \\\"iOS\\\", \\\"appium:automationName\\\": \\\"XCUITest\\\"}\"\n]\n```\n\nNote that each node config also specifies a different port itself for the node to run on.\n\n### Putting it together\n\nThe Grid nodes aren't enough--you'll also want a Grid \"hub\" that acts as a load balancer and\nmanager for all the nodes. So in the end we'll have 5 processes running at once: 2 Appium servers,\n2 Grid nodes, and 1 Grid hub. It's best to run each of these in a separate terminal window to avoid\nconfusion of logs. Here is how you'd start each process:\n\n0. `appium --config appium1.yml`\n0. `appium --config appium2.yml`\n0. `java -jar /path/to/selenium.jar node --config node1.toml`\n0. `java -jar /path/to/selenium.jar node --config node2.toml`\n0. `java -jar /path/to/selenium.jar hub`\n\nOnce you wait a few moments for the nodes to detect their Appium servers, and to register with the\nhub, you'll be able to send all your Appium traffic via the single hub endpoint (defaulting to\n`http://localhost:4444`).\n\nAnd of course, you're able to link up Appium servers and nodes running on different machines in\nyour network to form a larger grid.\n\n## Using Selenium Grid 3\n\nIt is possible to register your Appium server with a local [Selenium Grid 3](https://www.selenium.dev/documentation/legacy/selenium_3/grid_3/)\n([setup docs](https://www.selenium.dev/documentation/legacy/grid_3/setting_up_your_own_grid/)) instance by using the\n`--nodeconfig` server argument.\n\n```bash\nappium server --nodeconfig /path/to/nodeconfig.json --base-path=/wd/hub\n```\n\nIn the referenced config file you have to define the `browserName`, `version` and `platform`\ncapabilities and based on these parameters the grid will re-direct your test to the right device.\nYou will also need to configure your host details and the Selenium Grid details. For a full list of\nall parameters and descriptions see\n[here](https://www.selenium.dev/documentation/legacy/selenium_3/grid_setup/).\n\nOnce you start the Appium server it will register with the grid, and you will see your device on\nthe grid console page:\n\n`http://**\\**:**\\**/grid/console`\n\n### Example Grid Node Configuration JSON\n\n```json\n{\n \"capabilities\":\n [\n {\n \"browserName\": \"\",\n \"version\":\"\",\n \"maxInstances\": 1,\n \"platform\":\"\"\n }\n ],\n \"configuration\":\n {\n \"cleanUpCycle\":2000,\n \"timeout\":30000,\n \"proxy\": \"org.openqa.grid.selenium.proxy.DefaultRemoteProxy\",\n \"url\":\"http://:/wd/hub\",\n \"host\": \"\",\n \"port\": ,\n \"maxSession\": 1,\n \"register\": true,\n \"registerCycle\": 5000,\n \"hubPort\": ,\n \"hubHost\": \"\",\n \"hubProtocol\": \"\"\n }\n}\n```\n\nIf `url`, `host`, and `port` are not given, the config will be auto updated to point to\n`localhost:`.\n\nIf your Appium server is running on a different machine to your Selenium Grid server, make sure you\nuse an external name/IP address in your `host` and `url` configuration; `localhost` and `127.0.0.1`\nwill prevent Selenium Grid from connecting correctly.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/headers.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Header Handling\n---\n\n# Header Handling\n\n## Request ID Tracking\n\nAppium supports setting the request ID for each request through the `x-request-id` header. This is useful for tracing requests through your system, especially in environments where multiple services are involved or when debugging across different requests.\n\n### Using `x-request-id`\n\nWhen making requests to Appium, you can include an `x-request-id` header with a unique identifier. This ID will be:\n\n- Used to track the request through Appium's logging system\n- Preserved across the entire request lifecycle\n- Generated automatically (as a UUID) if not provided\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/log-filters.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Filtering the Appium Log\n---\n\nSometimes it might be necessary to hide sensitive information, like passwords, device identifiers,\nhashes, etc..., from the server log. Appium makes it possible to ensure such information is\nredacted in logs via the `--log-filters` command line argument. This argument allows you to provide\nthe path to a special config file, containing one or more log obfuscation rules.\n\n## Config Format\n\nThe filtering config must be one of:\n\n- a path to a valid JSON file containing an array of filtering rules\n- a `log-filters` entry in an [Appium Config](./config.md) file, with the rules array inline\n\nEach rule is an object with a set of predefined properties. The following rule properties are\nsupported:\n\n- `pattern`: A valid Javascript RegExp pattern to replace. Must be a valid non-empty pattern.\n- `text`: A simple non-empty exact text match to replace. Either this property or the above one must\n be provided. `pattern` has priority over `text` if both are provided.\n- `flags`: Regular expression flags for the given pattern. Supported flags are the same as for the\n standard JavaScript [RegExp constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Advanced_searching_with_flags_2).\n Note that the `g` (global matching) flag is always enabled.\n- `replacer`: The replacer value to use. By default it is `**SECURE**`. Empty values are allowed.\n\n### Config Examples\n\nReplace all occurrences of `my.magic.app` string with the default replacer:\n\n```json\n[\n {\n \"text\": \"my.magic.app\"\n }\n]\n```\n\nReplace all occurrences of `my.magic.` string with a custom replacer (case insensitive):\n\n```json\n[\n {\n \"pattern\": \"my\\\\.magic\\\\.\\\\w\",\n \"flags\": \"i\",\n \"replacer\": \"***\"\n }\n]\n```\n\nReplace all occurrences of `my.magic.` and/or `your.magic` strings with a custom\nreplacer (case insensitive):\n\n```json\n[\n {\n \"pattern\": \"my\\\\.magic\\\\.\\\\w+\",\n \"flags\": \"i\",\n \"replacer\": \"***\"\n },\n {\n \"pattern\": \"your\\\\.magic\",\n \"flags\": \"i\",\n \"replacer\": \"***\"\n }\n]\n```\n\nTruncate all log lines to max 15 chars (advanced):\n\n```json\n[\n\t{\n \"pattern\": \"(.{1,15}).*\",\n \"flags\": \"s\",\n \"replacer\": \"$1\"\n }\n]\n```\n\n### Config Errors Handling\n\nIf any of the config rules contains invalid items (such as empty/invalid pattern, empty rule, etc.)\nthen Appium will print the detailed report about collected errors and will fail to start until\nthese errors are addressed.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/managing-exts.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Managing Drivers and Plugins\n---\n\nTo do anything useful with Appium, you need to have at least one [Driver](../intro/drivers.md)\ninstalled, otherwise Appium won't know how to automate anything. There is an entire\n[Ecosystem](../ecosystem/index.md) of drivers and plugins out there!\n\nThis guide helps explain how to manage these drivers and plugins. There are\ntwo basic strategies: using Appium's extension CLI interface, or managing extensions yourself in an\n`npm`-based project.\n\n!!! note\n\n Other package managers are not currently supported.\n\n## Using Appium's Extension CLI\n\nWith Appium's [Extension CLI](../reference/cli/extensions.md), you let Appium manage drivers and plugins for\nyou. You will use CLI commands to tell Appium which extensions you would like to install, update,\nor remove. Here's an example of how you might install a driver using the CLI:\n\n```bash\nappium driver install xcuitest\n```\n\nThis command will install the latest version of the\n[XCUITest Driver](https://github.com/appium/appium-xcuitest-driver). The Extension CLI comes with a variety\nof commands and parameters; see the documentation for that command for all the specifics.\n\nThe all-important question when Appium is managing your extensions for you is: where are they installed?\nAppium manages extensions in a directory specified by the `APPIUM_HOME` environment variable. You\ncan set that variable to anything you like, and Appium will manage its extensions there. You can\ntherefore also use the `APPIUM_HOME` environment variable to manage different sets of extensions,\nfor example if you want to have the same driver installed at conflicting versions:\n\n```bash\nAPPIUM_HOME=/path/to/home1 appium driver install xcuitest@4.11.1\nAPPIUM_HOME=/path/to/home2 appium driver install xcuitest@4.11.2\n```\n\nRunning these commands will result in two separate `APPIUM_HOME` directories being created and\npopulated with the corresponding version of the XCUITest driver. You can then use the same\nenvironment variables to direct Appium which version to use on launch:\n\n```bash\nAPPIUM_HOME=/path/to/home1 appium # use xcuitest driver 4.11.1\nAPPIUM_HOME=/path/to/home2 appium # use xcuitest driver 4.11.2\n```\n\nYou don't need to set `APPIUM_HOME` if you don't want to! By default, Appium will set `APPIUM_HOME`\nto the directory `.appium` in your user home directory.\n\nThese installed packages will be managed by `extensions.yaml` in `$APPIUM_HOME/node_modules/.cache/appium/extensions.yaml`.\n\n## Do-It-Yourself with `npm`\n\nBecause Appium and Appium drivers are Node.js programs, if you are integrating your Appium scripts\ninto your own Node.js project, there is an alternative way to manage drivers and plugins: via `npm`,\nlike any other dependency. Basically, whenever you run Appium, if you have not explicitly set\n`APPIUM_HOME`, it will:\n\n1. Try to determine whether the _current directory_ is inside an `npm` package.\n1. If so, it will check whether `appium` is a dependency (dev, prod, or peer) in the project's\n `package.json`\n1. If so, _unless you have specified `APPIUM_HOME` in your environment_, Appium will ignore load\n drivers and plugins defined in that `package.json` file instead.\n\nThis means you are freely able to add Appium drivers and plugins as regular package dependencies or\ndev dependencies. For example, if your project has a `package.json` which includes the following:\n\n```json\n{\n \"devDependencies\": {\n \"appium\": \"^2.0.0\",\n \"appium-xcuitest-driver\": \"^4.11.1\"\n }\n}\n```\n\nThen, if you run `npx appium` inside your project, Appium will detect that it is a dependency of\nthe project, and will load the XCUITest driver which is also listed as a dev dependency for the\nproject.\n\nThis strategy is *only* recommended if you are already using `npm` for your project.\nOtherwise, it is recommended that you use Appium's Extension CLI and, if necessary, adjust\n`APPIUM_HOME` to change the location of stored extensions.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/migrating-1-to-2.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Migrating to Appium 2\n---\n\nThis document is a guide for those who are using Appium 1 and wish to migrate to Appium 2. It\ncontains a list of breaking changes and how to migrate your environments or test suites to ensure\ncompatibility with Appium 2.\n\nAppium 2 is the biggest Appium release in over 5 years. It is _not_ focused on changing the\nautomation behavior for any particular platform, but instead re-envisions Appium into an\n_ecosystem_ of automation tools:\n\n* The core Appium module retains only platform-agnostic functionality\n* Functionality for automating specific platforms is moved to separate _driver_ modules\n* Functionality for altering/extending Appium is moved to separate _plugin_ modules\n\nAt the same time, the Appium project is taking the opportunity to remove many old and deprecated\nbits of functionality.\n\nSince Appium 2 is a major architectural change, ^^we do not recommend directly updating your\nAppium 1 installations to Appium 2^^. Instead, please uninstall Appium 1 first, and only install\nAppium 2 afterwards.\n\n## Breaking Changes\n\n### Drivers Installed Separately\n\nWhen installing Appium 1, all available drivers would be installed alongside the main Appium\nserver. In Appium 2, due to its modular structure, this is no longer the case - by default,\ninstalling it only installs the core Appium server, without any drivers.\n\nWhen it comes to installing Appium 2 drivers, there are several approaches you can take:\n\n* Add the `--drivers` flag when installing Appium, for example:\n```bash\nnpm i -g appium --drivers=xcuitest,uiautomator2\n```\n* Use the [Appium Extension CLI](../reference/cli/extensions.md), for example:\n```bash\nappium driver install uiautomator2\n```\n* Use the [Appium Setup CLI command](../reference/cli/setup.md) (added in Appium `2.6`), for example:\n```bash\nappium setup mobile\n```\n\nCheck the [Managing Drivers and Plugins guide](./managing-exts.md) for more information.\n\n!!! info \"Actions Needed\"\n\n When installing Appium 2, use one of the above approaches for installing your desired drivers\n\n### Driver Installation Path Changed\n\nWhen installing Appium 1, all available drivers would be installed as dependencies of the main\nAppium server, in `/path/to/appium/node_modules`. For example, `appium-webdriveragent` was located\nat `/path/to/appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent`.\n\nIn Appium 2, drivers (and plugins) are installed at the path defined by the `APPIUM_HOME`\nenvironment variable, whose default value is `~/.appium`. So, `appium-webdriveragent` would now be\nlocated at `$APPIUM_HOME/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent`.\n\n!!! info \"Actions Needed\"\n\n If your code uses paths to Appium driver files, update it to use the `APPIUM_HOME` environment\n variable\n\n### Drivers Updated Separately\n\nIn Appium 1, in order to get updates to your drivers, you would simply wait for those updates to be\nrolled into a new release of Appium, and then update your Appium version. With Appium 2, since the\nserver and drivers are separate packages, they can release new versions independently from each\nother - this means that you no longer need to wait for a new Appium server release, but can install\nthe latest driver versions right away.\n\nChecking for driver updates is done by using the [Appium Extension CLI](../reference/cli/extensions.md):\n\n```bash\nappium driver list --updates\n```\n\nIf any updates are available, you can then run the `update` command for any given driver:\n\n```bash\nappium driver update xcuitest\n```\n\nUpdating the Appium server itself is the same as before:\n\n```bash\nnpm update -g appium\n```\n\nHowever, in Appium 2 this process is a lot quicker, since drivers are no longer bundled with the\nserver package.\n\n!!! info \"Actions Needed\"\n\n Make sure to use the [Appium Extension CLI](../reference/cli/extensions.md) to manage your drivers\n\n### Deprecated Packages No Longer Supported\n\nThe Appium 1 ecosystem included several drivers, clients and other packages that had since been\ndeprecated and replaced with newer packages. Appium 2 no longer includes support for these packages,\nand it is recommended to migrate to the following replacements:\n\n|Appium 1 Package|Replacement in Appium 2|\n|--|--|\n|iOS Driver|[XCUITest Driver](https://appium.github.io/appium-xcuitest-driver/latest/)|\n|UiAutomator Driver|[UiAutomator2](https://github.com/appium/appium-uiautomator2-driver/)|\n|`wd` Client|[WebdriverIO Client](https://webdriver.io/)|\n|Appium Desktop|[Appium Inspector](https://github.com/appium/appium-inspector)|\n\n!!! info \"Actions Needed\"\n\n If you are using any of the aforementioned package(s), migrate to their recommended replacement(s)\n\n### Default Server Base Path Changed\n\nIn Appium 1, the default Appium server URL was `http://localhost:4723/wd/hub`, where the `/wd/hub`\npart (the base path) was a legacy convention from Selenium 1. Appium 2 changes the default base\npath to `/`, therefore the default server URL is now `http://localhost:4723/`.\n\n!!! info \"Actions Needed\"\n\n In your test scripts, change the base path of the target server URL from `/wd/hub` to `/`.\n Alternatively, you can retain the Appium 1 base path by launching Appium with the\n `--base-path=/wd/hub` [command-line argument](../reference/cli/server.md).\n\n### Server Port 0 No Longer Supported\n\nIn Appium 1, it was possible to specify `--port 0` during server startup, which had the effect of\nstarting Appium on a random free port. Appium 2 no longer allows this, and requires port values to\nbe `1` or higher. If you wish to start Appium on a random port, you must now take care of this on\nyour own prior to launching the server.\n\n!!! info \"Actions Needed\"\n\n If you are launching Appium with `--port 0`, change the port number value to `1` or higher\n\n### Driver-Specific CLI Options Changed\n\nWith Appium 1, command-line options specific to particular drivers were all hosted on the main\nAppium server. So, for example, `--chromedriver-executable` was a CLI parameter you could use to\nset the Chromedriver location for the UiAutomator2 driver.\n\nIn Appium 2, all driver-specific CLI options have been moved to the drivers themselves. However,\ndepending on the driver, these options may now need to be passed in another way:\n\n* Some options can still be passed as different CLI flags, for example:\n```bash\nappium --webdriveragent-port=5000 # Appium 1\nappium --driver-xcuitest-webdriveragent-port=5000 # Appium 2\n```\n* Some options can now be passed as environment variables, for example:\n```bash\nappium --chromedriver-version=100 # Appium 1\nCHROMEDRIVER_VERSION=100 appium # Appium 2\n```\n* Some options can now be passed as [capabilities](./caps.md), for example:\n```\nappium --chromedriver-executable=/path/to/chromedriver # Appium 1\n{\"appium:chromedriverExecutable\": \"/path/to/chromedriver\"} # Appium 2\n```\n\n!!! info \"Actions Needed\"\n\n If you are using driver-specific CLI options, refer to that driver's documentation for how to\n apply them in Appium 2\n\n### Filepaths No Longer Supported for Some CLI Options\n\nIn Appium 1, some server command-line options could be invoked by passing a filepath as their\nvalue, and Appium would then parse the contents of that file as the actual value for that option.\nThere were four options that supported this:\n\n* `--nodeconfig`\n* `--default-capabilities`\n* `--allow-insecure`\n* `--deny-insecure`\n\nAppium 2 no longer attempts to parse the contents of filepaths passed to these options, and offers\ntwo ways to specify the value for these options:\n\n* As strings, directly on the command line\n * `--nodeconfig` / `--default-capabilities`: JSON string\n * `--allow-insecure` / `--deny-insecure`: comma-separated list\n* In the [Appium Configuration file](./config.md)\n\n!!! info \"Actions Needed\"\n\n If you are using any of the aforementioned CLI options with a filepath value, update your code\n to pass the file contents either directly or through the Appium config file\n\n### Old Protocols Dropped\n\nAppium's API is based on the [W3C WebDriver Protocol](https://www.w3.org/TR/webdriver/), and it has\nsupported this protocol for years. Before this protocol was designed as a web standard, the \n[JSON Wire Protocol](https://www.selenium.dev/documentation/legacy/json_wire_protocol/) (JSONWP)\nand [Mobile JSON Wire Protocol](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md)\n(MJSONWP) were used instead.\n\nIn Appium 1, all of these protocols were supported, so that older Selenium/Appium clients could\nstill communicate with newer Appium servers. Appium 2 removes support for JSONWP/MJSONWP and is now\nonly compatible with the W3C WebDriver Protocol.\n\n!!! info \"Actions Needed\"\n\n Make sure you are using Selenium/Appium clients compatible with the W3C WebDriver Protocol\n\n### Capabilities Require Vendor Prefix\n\nIn Appium 1, in order to create a session, you had to specify certain desired capabilities, which\nwould indicate session parameters, e.g. the driver you want to use. Appium 2 retains this behavior\nand continues to accept desired capabilities (now renamed simply to 'capabilities'), but as part of\nthe W3C WebDriver Protocol specification, all non-standard capabilities are now required to use a\nvendor prefix. \n\nThe list of standard capabilities is described in the [WebDriver Protocol specification](https://www.w3.org/TR/webdriver/#capabilities),\nand includes a few commonly used capabilities like `browserName` and `platformName`. All other\ncapabilities must now start with the vendor name and a colon (the vendor prefix), for example,\n`moz:` or `goog:`. Since most of Appium's capabilities go beyond the standard W3C capabilities,\nall of them must include the `appium:` prefix (unless specified otherwise):\n\n```\ndeviceName # Appium 1\nappium:deviceName # Appium 2\n```\n\nThis requirement may or may not be a breaking change for your test suites. Up-to-date versions of\nofficial Appium clients and the Appium Inspector will automatically add the `appium:` prefix to all\nnon-standard capabilities, and the same may apply to cloud-based Appium providers.\n\nAdditionally, if you are starting a session with multiple Appium-specific capabilities (which will\nlikely be the case), it may seem repetitive to add the `appium:` prefix to each individual\ncapability. To avoid this, you can optionally group up all these capabilities under a single object\ncapability, `appium:options`, for example:\n\n=== \"Default Approach\"\n\n ```json\n {\n \"platformName\": \"iOS\",\n \"browserName\": \"Safari\",\n \"appium:platformVersion\": \"14.4\",\n \"appium:deviceName\": \"iPhone 11\",\n \"appium:automationName\": \"XCUITest\"\n }\n ```\n\n=== \"With `appium:options`\"\n\n ```json\n {\n \"platformName\": \"iOS\",\n \"browserName\": \"Safari\",\n \"appium:options\": {\n \"platformVersion\": \"14.4\",\n \"deviceName\": \"iPhone 11\",\n \"automationName\": \"XCUITest\"\n }\n }\n ```\n\n!!! warning\n\n Capabilities included in the `appium:options` object will overwrite capabilities of the same\n name that are used outside of this object. Note that cloud provider support for the\n `appium:options` syntax may vary.\n\nFor more information on capabilities, have a look at the [Capabilities Guide](./caps.md).\n\n!!! info \"Actions Needed\"\n\n Add the `appium:` prefix to all Appium-specific capabilities used in your tests, or wrap them\n inside an `appium:options` object\n\n### Advanced Features Moved to Plugins\n\nOne of the design goals for Appium 2 is to extract non-core features into special extensions called\n[plugins](../ecosystem/plugins.md). Two such features of Appium 1 have been moved to plugins, and\nare no longer bundled with Appium 2:\n\n|Feature|Plugin Name|\n|--|--|\n|Image-related features (comparison, search by image, etc...)|[`images`](https://github.com/appium/appium/tree/master/packages/images-plugin)|\n|The Execute Driver Script feature|[`execute-driver`](https://github.com/appium/appium/tree/master/packages/execute-driver-plugin)|\n\n!!! info \"Actions Needed\"\n\n If you were using the image-related features and/or the execute driver script feature in Appium\n 1, first install their plugin(s):\n ```\n appium plugin install images \n appium plugin install execute-driver\n ```\n Afterwards, make sure to activate the plugin(s) upon launching the Appium server:\n ```\n appium --use-plugins=images,execute-driver\n ```\n\n### Endpoint Changes\n\nA few server endpoints used in Appium 1 were accepting old or unused parameters. Appium 2 removes\nsupport for these parameters. The following is a list of these changed endpoints, along with the\nparameters they no longer accept, as well as the parameters they continue to accept in Appium 2.\n\n* `POST /session/:sessionId/appium/device/gsm_signal`\n * :octicons-x-24: `signalStrengh`\n * :octicons-check-24: `signalStrength`\n* `POST /session/:sessionId/appium/element/:elementId/value`\n * :octicons-x-24: `value`\n * :octicons-check-24: `text`\n* `POST /session/:sessionId/appium/element/:elementId/replace_value`\n * :octicons-x-24: `value`\n * :octicons-check-24: `text`\n\n!!! info \"Actions Needed\"\n\n Check your Appium client documentation for the methods using these endpoints, and adjust your\n code to only use the accepted parameters\n\n### Internal Packages Renamed\n\nIn Appium 1, the internal dependency packages were each located in their own repository. Appium 2\nmoves to a monorepo structure and therefore renames many of these packages, for example:\n\n```\nappium-base-driver # Appium 1\n@appium/base-driver # Appium 2\n```\n\n!!! info \"Actions Needed\"\n\n If you do not directly import Appium packages into your code - none! However, if you do, make\n sure to update the names of your Appium package imports!\n\n## Major New Features\n\nApart from the breaking changes mentioned above, here are some of the major new features you may\nwish to take advantage of with Appium 2:\n\n### Third-Party Drivers and Plugins\n\nYou are no longer limited to official drivers or plugins, or ones that the Appium team even knows\nabout! Developers can now create their own custom drivers or plugins, which can be installed via\nAppium's [Extension CLI](../reference/cli/extensions.md) from `npm`, `git`, GitHub, or even the local\nfilesystem. Interested in building a driver or plugin? Check out the\n[Building Drivers](../developing/build-drivers.md) and\n[Building Plugins](../developing/build-plugins.md) guides.\n\n### Configuration Files\n\nAppium now supports _configuration files_ in addition to command-line arguments. Nearly all options\nor flags that had to be specified on the CLI in Appium 1, can now also be provided in a\nconfiguration file. The file can be in JSON, JS, or YAML format. For more information, refer to\nthe [Config File Guide](./config.md).\n\n## Special Notes for Cloud Providers\n\nMost of this guide has applied to Appium end users or developers, but some of the architectural\nchanges in Appium 2 will constitute breaking changes for different Appium service providers. At the\nend of the day, the maintainer of the Appium server is responsible for installing and exposing the\nvarious Appium drivers and plugins that end users may wish to use.\n\nWe encourage cloud providers to thoroughly read and understand our [recommendation for cloud\nprovider capabilities](./caps.md#special-notes-for-cloud-providers) in order to support user needs in\nan industry-compatible way!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/migrating-2-to-3.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Migrating to Appium 3\n---\n\n\nThis document is a guide for those who are using Appium 2 and would like to upgrade to Appium 3.\nIt contains a list of breaking changes, as well as suggestions for handling them.\n\nWhile Appium 2 was a major overhaul of the entire Appium architecture, Appium 3 is a smaller\nupgrade with fewer breaking changes, which should result in a much simpler migration process.\n\n## Installation\n\nThe installation method for Appium 3 remains the same as for Appium 2. If you want to upgrade, you\ncan simply install Appium 3 on top of your existing installation:\n\n```bash\n# optional: `appium setup reset`\nnpm install -g appium\n```\n\n##\u00a0Breaking Changes\n\n### Node 20+ Required\n\nWith Appium 2, the minimum required Node version was `14.17.0`. Support for Node 14 had already\nended before the release of Appium 2, which meant that even users on outdated Node versions were\nable to use it.\n\nAppium 3 drops support for outdated Node versions, and bumps the minimum required version to Node\n`20.19.0` (with the semver range `^20.19.0 || ^22.12.0 || >=24.0.0`), as well as the minimum `npm`\nversion to `10`.\n\n!!! info \"Actions Needed\"\n\n Upgrade Node.js to `v20.19.0` or newer, and `npm` to `v10` or newer\n\n### Deprecated Endpoints Removed\n\nAppium 3 removes many previously deprecated server endpoints. Some of these endpoints have now\nbecome specific to one or more drivers, while most others have direct or close-to-direct\nreplacements in other endpoints. All removed endpoints, along with replacements (where applicable)\nare listed [in the **Removed Endpoints** section](#removed).\n\nSome W3C endpoints used in Appium also existed in the old JSONWP standard, but required different\nparameters. With Appium 2, both standards for these endpoints were supported. Appium 3 changes\nthese endpoints by removing support for the JSONWP parameters, and only accepting the W3C\nparameters. These endpoints are listed [in the **Modified Endpoints** section](#modified).\n\n!!! info \"Actions Needed\"\n\n Check your Appium client documentation for the affected methods, and adjust your code to use\n their replacements\n\n### Feature Flag Prefix Required\n\nWith Appium 2, it was possible to opt into certain [insecure features](./security.md) on server\nstartup, which could be enabled using the `--allow-insecure` or `--relaxed-security` flags. Appium\n`2.13` added the ability to optionally provide a scope prefix to specific features, ensuring that\nthey would only be enabled for the specified driver (or all of them).\n\nAppium 3 makes the scope prefix mandatory, and will throw an error if features are specified\nwithout a scope. Note that the behavior of the `--relaxed-security` flag remains unchanged.\n\n!!! info \"Actions Needed\"\n\n If you use the `--allow-insecure` server flag, add a scope prefix before each feature name.\n For example, if you use the UiAutomator2 `adb_shell` feature, on Appium 2 you would enable it\n like this:\n ```\n appium --allow-insecure=adb_shell\n ```\n On Appium 3, to ensure this feature is only activated for UiAutomator2, you can run it like so:\n ```\n appium --allow-insecure=uiautomator2:adb_shell\n ```\n Alternatively, if you wish to keep the Appium 2 behavior and enable the feature for _all_\n drivers that support it, you can use the wildcard (`*`) prefix:\n ```\n appium --allow-insecure=*:adb_shell\n ```\n Server-scope features like `session_discovery` also require the wildcard prefix.\n\n\n### Session Discovery Requires Feature Flag\n\nIn Appium 2, it was possible to retrieve all active server sessions via the `GET /sessions`\nendpoint. This information could then be used, for example, in Appium Inspector, in order to attach\nto an existing session, instead of creating a new one.\n\nAppium 3 makes two changes to the session discovery process:\n\n* The `GET /sessions` endpoint is replaced with `GET /appium/sessions` (see [the Removed Endpoints section](#removed))\n* The use of the new endpoint requires the `session_discovery` [feature flag](./security.md)\n\nThe return value of `GET /appium/sessions` is largely identical to `GET /sessions`, but additionally\nincludes the `created` field for each session entry, indicating the session creation time as a Unix\ntimestamp. The rest of the result format remains unchanged.\n\nTo reduce migration efforts, the `GET /appium/sessions` endpoint (locked behind the aforementioned\nfeature flag) is also available in Appium `2.19`, allowing you to adjust your code before upgrading\nto Appium 3. As for Appium Inspector, support for this new endpoint is available starting from\nversion `2025.3.1`.\n\n!!! info \"Actions Needed\"\n\n * If your code uses session retrieval, change the endpoint from `GET /sessions` to\n `GET /appium/sessions`\n * If you use Appium Inspector's Attach to Session feature, upgrade to version `2025.3.1` or later\n * In both cases, ensure your Appium server is launched with the `session_discovery`\n [feature flag](./security.md)\n\n### Unzip Logic Removed\n\nAppium 3 removes the custom unzip logic used when working with files like application packages.\nSuch files are often only relevant to particular platforms, therefore the functionality for\nhandling these operations has been moved to relevant drivers.\n\n!!! info \"Actions Needed\"\n\n Ensure you are using the most recent versions of your drivers\n\n### Express 5\n\nAppium 3 upgrades the internally-used `express` dependency from `v4` to `v5`. This should not\naffect users who use Appium directly, but developers integrating parts of Appium into their own\nprojects may want to check [the Express 5 Migration Guide](https://expressjs.com/en/guide/migrating-5.html).\n\n!!! info \"Actions Needed\"\n\n None! (hopefully)\n\n## Endpoint Changes\n### Removed\n\nThe following is a list of all the Appium server endpoints removed in Appium 3. For ease of\nmigration, additional information is provided for each endpoint: drivers that still support the\nendpoint; suggested replacement endpoints, or, rarely, the lack of any available replacements.\n\nIcons are used to indicate endpoint support in either certain drivers, or in the core Appium server\n(applicable to all drivers):\n\n
\n\n- :simple-appium:{ .lg } - Appium server\n- :material-apple:{ .lg } - [XCUITest driver](https://appium.github.io/appium-xcuitest-driver/latest/)\n- :material-android:{ .lg } - [UiAutomator2 driver](https://github.com/appium/appium-uiautomator2-driver/)\n- :material-coffee:{ .lg } - [Espresso driver](https://github.com/appium/appium-espresso-driver)\n- :material-apple-finder:{ .lg } - [Mac2 driver](https://github.com/appium/appium-mac2-driver)\n- :material-microsoft-windows:{ .lg } - [Windows driver](https://github.com/appium/appium-windows-driver)\n\n
\n\n* `GET /sessions`\n * :octicons-arrow-right-24: `GET /appium/sessions` :simple-appium:\n* `POST /session/:sessionId/accept_alert`\n * :octicons-arrow-right-24: `POST /session/:sessionId/alert/accept` :simple-appium:\n * :octicons-arrow-right-24: `mobile: alert` [execute method](./execute-methods.md) :material-apple:\n * :octicons-arrow-right-24: `mobile: acceptAlert` execute method :material-android:\n* `GET /session/:sessionId/alert_text`\n * :octicons-arrow-right-24: `GET /session/:sessionId/alert/text` :simple-appium:\n* `POST /session/:sessionId/alert_text`\n * :octicons-arrow-right-24: `POST /session/:sessionId/alert/text` :simple-appium:\n* `POST /session/:sessionId/appium/app/background`\n * :octicons-arrow-right-24: `mobile: backgroundApp` execute method :material-apple: :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/app/close`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: `mobile: terminateApp` execute method :material-apple: :material-android: :material-coffee:\n * :octicons-arrow-right-24: `macos: terminateApp` execute method :material-apple-finder:\n * :octicons-arrow-right-24: `windows: closeApp` execute method :material-microsoft-windows:\n* `POST /session/:sessionId/appium/app/end_test_coverage`\n * :octicons-arrow-right-24: `mobile: shell` execute method :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/app/launch`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: `mobile: launchApp` execute method :material-apple:\n * :octicons-arrow-right-24: `mobile: activateApp` or `mobile: startActivity` execute methods :material-android: :material-coffee:\n * :octicons-arrow-right-24: `macos: launchApp` or `macos: activateApp` execute methods :material-apple-finder:\n * :octicons-arrow-right-24: `windows: launchApp` execute method :material-microsoft-windows:\n* `POST /session/:sessionId/appium/app/reset`\n * :octicons-arrow-right-24: `mobile: clearApp` execute method :material-apple: [^sim] :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/app/strings`\n * :octicons-arrow-right-24: `mobile: getAppStrings` execute method :material-apple: :material-android: :material-coffee:\n* `GET /session/:sessionId/appium/device/app_state`\n * :octicons-arrow-right-24: `POST /session/:sessionId/appium/device/app_state` :simple-appium:\n * :octicons-arrow-right-24: `mobile: queryAppState` execute method :material-apple: :material-android: :material-coffee:\n * :octicons-arrow-right-24: `macos: queryAppState` execute method :material-apple-finder:\n* `GET /session/:sessionId/appium/device/current_activity`\n * :octicons-arrow-right-24: `mobile: getCurrentActivity` execute method :material-android: :material-coffee:\n* `GET /session/:sessionId/appium/device/current_package`\n * :octicons-arrow-right-24: `mobile: getCurrentPackage` execute method :material-android: :material-coffee:\n* `GET /session/:sessionId/appium/device/display_density`\n * :octicons-arrow-right-24: `mobile: getDisplayDensity` execute method :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/device/finger_print`\n * :octicons-arrow-right-24: `mobile: fingerPrint` execute method :material-android: [^sim] :material-coffee: [^sim]\n* `POST /session/:sessionId/appium/device/get_clipboard`\n * :octicons-check-24: Moved to drivers: :material-android: :material-coffee:\n * :octicons-arrow-right-24: `mobile: getClipboard` execute method :material-apple: :material-android: :material-coffee:\n * :octicons-arrow-right-24: `mobile: getPasteboard` execute method :material-apple: [^sim]\n * :octicons-arrow-right-24: `windows: getClipboard` execute method :material-microsoft-windows:\n* `POST /session/:sessionId/appium/device/gsm_call`\n * :octicons-arrow-right-24: `mobile: gsmCall` execute method :material-android: [^sim] :material-coffee: [^sim]\n* `POST /session/:sessionId/appium/device/gsm_signal`\n * :octicons-arrow-right-24: `mobile: gsmSignal` execute method :material-android: [^sim] :material-coffee: [^sim]\n* `POST /session/:sessionId/appium/device/gsm_voice`\n * :octicons-arrow-right-24: `mobile: gsmVoice` execute method :material-android: [^sim] :material-coffee: [^sim]\n* `POST /session/:sessionId/appium/device/is_locked`\n * :octicons-arrow-right-24: `mobile: isLocked` execute method :material-apple: :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/device/keyevent`\n * :octicons-arrow-right-24: `mobile: keys` execute method :material-apple: (iPadOS only)\n * :octicons-arrow-right-24: `mobile: pressKey` execute method :material-android: :material-coffee:\n * :octicons-arrow-right-24: `macos: keys` execute method :material-apple-finder:\n * :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n* `POST /session/:sessionId/appium/device/lock`\n * :octicons-arrow-right-24: `mobile: lock` execute method :material-apple: :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/device/long_press_keycode`\n * :octicons-arrow-right-24: `mobile: pressKey` execute method :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/device/network_speed`\n * :octicons-arrow-right-24: `mobile: networkSpeed` execute method :material-android: [^sim] :material-coffee: [^sim]\n* `POST /session/:sessionId/appium/device/open_notifications`\n * :octicons-arrow-right-24: `mobile: statusBar` execute method :material-android: :material-coffee:\n * :octicons-arrow-right-24: `mobile: openNotifications` execute method :material-android:\n* `POST /session/:sessionId/appium/device/power_ac`\n * :octicons-arrow-right-24: `mobile: powerAC` execute method :material-android: [^sim] :material-coffee: [^sim]\n* `POST /session/:sessionId/appium/device/power_capacity`\n * :octicons-arrow-right-24: `mobile: powerCapacity` execute method :material-android: [^sim] :material-coffee: [^sim]\n* `POST /session/:sessionId/appium/device/press_keycode`\n * :octicons-arrow-right-24: `mobile: keys` execute method :material-apple: (iPadOS only)\n * :octicons-arrow-right-24: `mobile: pressKey` execute method :material-android: :material-coffee:\n * :octicons-arrow-right-24: `macos: keys` execute method :material-apple-finder:\n * :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n* `POST /session/:sessionId/appium/device/send_sms`\n * :octicons-arrow-right-24: `mobile: sendSms` execute method :material-android: [^sim] :material-coffee: [^sim]\n* `POST /session/:sessionId/appium/device/set_clipboard`\n * :octicons-arrow-right-24: `mobile: setClipboard` execute method :material-apple: :material-android: :material-coffee:\n * :octicons-arrow-right-24: `mobile: setPasteboard` execute method :material-apple: [^sim]\n * :octicons-arrow-right-24: `windows: setClipboard` execute method :material-microsoft-windows:\n* `POST /session/:sessionId/appium/device/shake`\n * :octicons-arrow-right-24: `mobile: shake` execute method :material-apple: [^sim]\n* `POST /session/:sessionId/appium/device/start_activity`\n * :octicons-arrow-right-24: `mobile: startActivity` execute method :material-android: :material-coffee:\n* `GET /session/:sessionId/appium/device/system_bars`\n * :octicons-arrow-right-24: `mobile: deviceScreenInfo` execute method :material-apple:\n * :octicons-arrow-right-24: `mobile: getSystemBars` execute method :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/device/toggle_airplane_mode`\n * :octicons-arrow-right-24: `mobile: setConnectivity` execute method :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/device/toggle_data`\n * :octicons-arrow-right-24: `mobile: setConnectivity` execute method :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/device/toggle_location_services`\n * :octicons-arrow-right-24: `mobile: toggleGps` execute method :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/device/toggle_wifi`\n * :octicons-arrow-right-24: `mobile: setConnectivity` execute method :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/device/unlock`\n * :octicons-arrow-right-24: `mobile: unlock` execute method :material-apple: :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/element/:elementId/value`\n * :octicons-arrow-right-24: `POST /session/:sessionId/element/:elementId/value` :simple-appium:\n* `POST /session/:sessionId/appium/element/:elementId/replace_value`\n * :octicons-arrow-right-24: `POST /session/:sessionId/element/:elementId/value` :simple-appium:\n* `POST /session/:sessionId/appium/getPerformanceData`\n * :octicons-arrow-right-24: `mobile: getPerformanceData` execute method :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/performanceData/types`\n * :octicons-arrow-right-24: `mobile: getPerformanceDataTypes` execute method :material-android: :material-coffee:\n* `POST /session/:sessionId/appium/receive_async_response`\n * :octicons-arrow-right-24: `POST /session/:sessionId/execute/async` :simple-appium:\n* `POST /session/:sessionId/appium/simulator/toggle_touch_id_enrollment`\n * :octicons-arrow-right-24: `mobile: enrollBiometric` execute method :material-apple: [^sim]\n* `POST /session/:sessionId/appium/simulator/touch_id`\n * :octicons-arrow-right-24: `mobile: sendBiometricMatch` execute method :material-apple: [^sim]\n* `POST /session/:sessionId/appium/start_recording_screen`\n * :octicons-check-24: Moved to drivers: :material-apple: :material-android: :material-coffee: :material-apple-finder: :material-microsoft-windows:\n * :octicons-arrow-right-24: `mobile: startXCTestScreenRecording` execute method :material-apple:\n * :octicons-arrow-right-24: `mobile: startMediaProjectionRecording` execute method :material-android: :material-coffee:\n * :octicons-arrow-right-24: `macos: startRecordingScreen` or `macos: startNativeScreenRecording` execute methods :material-apple-finder:\n * :octicons-arrow-right-24: `windows: startRecordingScreen` execute method :material-microsoft-windows:\n* `POST /session/:sessionId/appium/stop_recording_screen`\n * :octicons-check-24: Moved to drivers: :material-apple: :material-android: :material-coffee: :material-apple-finder: :material-microsoft-windows:\n * :octicons-arrow-right-24: `mobile: stopXCTestScreenRecording` execute method :material-apple:\n * :octicons-arrow-right-24: `mobile: stopMediaProjectionRecording` execute method :material-android: :material-coffee:\n * :octicons-arrow-right-24: `macos: stopRecordingScreen` or `macos: stopNativeScreenRecording` execute methods :material-apple-finder:\n * :octicons-arrow-right-24: `windows: stopRecordingScreen` execute method :material-microsoft-windows:\n* `GET /session/:sessionId/application_cache/status`\n * :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n* `POST /session/:sessionId/buttondown`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: [W3C Actions API](https://www.selenium.dev/documentation/webdriver/actions_api/) (`pointerDown`) :simple-appium:\n * :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n* `POST /session/:sessionId/buttonup`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: W3C Actions API (`pointerUp`) :simple-appium:\n * :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n* `POST /session/:sessionId/click`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: W3C Actions API (`pointerDown` & `pointerUp`) :simple-appium:\n* `POST /session/:sessionId/dismiss_alert`\n * :octicons-arrow-right-24: `POST /session/:sessionId/alert/dismiss` :simple-appium:\n* `POST /session/:sessionId/doubleclick`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: W3C Actions API (`pointerDown` & `pointerUp`) :simple-appium:\n* `POST /session/:sessionId/element/active`\n * :octicons-arrow-right-24: `GET /session/:sessionId/element/active` :simple-appium:\n* `GET /session/:sessionId/element/:elementId/equals/:otherId`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n* `GET /session/:sessionId/element/:elementId/location`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: `GET /session/:sessionId/element/:elementId/rect` :simple-appium:\n* `GET /session/:sessionId/element/:elementId/location_in_view`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n* `GET /session/:sessionId/element/:elementId/pageIndex`\n * :octicons-no-entry-24: MJSONWP protocol command with no direct replacement\n* `GET /session/:sessionId/element/:elementId/size`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: `GET /session/:sessionId/element/:elementId/rect` :simple-appium:\n* `POST /session/:sessionId/element/:elementId/submit`\n * :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n* `POST /session/:sessionId/execute`\n * :octicons-arrow-right-24: `POST /session/:sessionId/execute/sync` :simple-appium:\n* `POST /session/:sessionId/execute_async`\n * :octicons-arrow-right-24: `POST /session/:sessionId/execute/async` :simple-appium:\n* `POST /session/:sessionId/keys`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: W3C Actions API (`keyDown` & `keyUp`) :simple-appium:\n * Selenium-based clients can also use [Send Keys](https://www.selenium.dev/documentation/webdriver/actions_api/keyboard/#send-keys)\n* `GET /session/:sessionId/local_storage`\n * :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n* `POST /session/:sessionId/local_storage`\n * :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n* `DELETE /session/:sessionId/local_storage`\n * :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n* `GET /session/:sessionId/local_storage/key/:key`\n * :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n* `DELETE /session/:sessionId/local_storage/key/:key`\n * :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n* `GET /session/:sessionId/local_storage/size`\n * :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n* `POST /session/:sessionId/log`\n * :octicons-arrow-right-24: `POST /session/:sessionId/se/log` :simple-appium:\n* `GET /session/:sessionId/log/types`\n * :octicons-arrow-right-24: `GET /session/:sessionId/se/log/types` :simple-appium:\n* `POST /session/:sessionId/moveto`\n * :octicons-arrow-right-24: W3C Actions API (`pointerMove`) :simple-appium:\n * Selenium-based clients can also use [Move by Offset](https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#move-by-offset)\n* `GET /session/:sessionId/screenshot/:elementId`\n * :octicons-arrow-right-24: `GET /session/:sessionId/element/:elementId/screenshot` :simple-appium:\n* `GET /session/:sessionId/session_storage`\n * :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n* `POST /session/:sessionId/session_storage`\n * :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n* `DELETE /session/:sessionId/session_storage`\n * :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n* `GET /session/:sessionId/session_storage/key/:key`\n * :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n* `DELETE /session/:sessionId/session_storage/key/:key`\n * :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n* `GET /session/:sessionId/session_storage/size`\n * :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n* `POST /session/:sessionId/timeouts/async_script`\n * :octicons-arrow-right-24: `POST /session/:sessionId/timeouts` :simple-appium:\n* `POST /session/:sessionId/timeouts/implicit_wait`\n * :octicons-arrow-right-24: `POST /session/:sessionId/timeouts` :simple-appium:\n* `POST /session/:sessionId/touch/click`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: W3C Actions API (`pointerDown` & `pointerUp`) :simple-appium:\n * Selenium-based clients can also use [Click and Release](https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#click-and-release)\n * :octicons-arrow-right-24: `mobile: tap` or `mobile: tapWithNumberOfTaps` execute methods :material-apple:\n * :octicons-arrow-right-24: `mobile: clickGesture` execute method :material-android:\n * :octicons-arrow-right-24: `mobile: clickAction` execute method :material-coffee:\n * :octicons-arrow-right-24: `macos: click`, `macos: rightClick`, `macos: press` or `macos: tap` execute methods :material-apple-finder:\n * :octicons-arrow-right-24: `windows: click` execute method :material-microsoft-windows:\n* `POST /session/:sessionId/touch/doubleclick`\n * :octicons-arrow-right-24: W3C Actions API (`pointerDown` & `pointerUp`) :simple-appium:\n * Selenium-based clients can also use [Double Click](https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#double-click)\n * :octicons-arrow-right-24: `mobile: doubleTap` or `mobile: tapWithNumberOfTaps` execute methods :material-apple:\n * :octicons-arrow-right-24: `mobile: doubleClickGesture` execute method :material-android:\n * :octicons-arrow-right-24: `mobile: clickAction` execute method :material-coffee:\n * :octicons-arrow-right-24: `macos: doubleClick` or `macos: doubleTap` execute methods :material-apple-finder:\n * :octicons-arrow-right-24: `windows: click` execute method :material-microsoft-windows:\n* `POST /session/:sessionId/touch/down`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: W3C Actions API (`pointerDown`) :simple-appium:\n * :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n* `POST /session/:sessionId/touch/flick`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: W3C Actions API (`pointerDown`, `pointerMove` & `pointerUp`) :simple-appium:\n * :octicons-arrow-right-24: `mobile: flingGesture` execute method :material-android:\n* `POST /session/:sessionId/touch/longclick`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: W3C Actions API (`pointerDown`, `pause` & `pointerUp`) :simple-appium:\n * :octicons-arrow-right-24: `mobile: touchAndHold` execute method :material-apple:\n * :octicons-arrow-right-24: `mobile: longClickGesture` execute method :material-android:\n * :octicons-arrow-right-24: `mobile: clickAction` execute method :material-coffee:\n * :octicons-arrow-right-24: `macos: press` execute method :material-apple-finder:\n * :octicons-arrow-right-24: `windows: click` execute method :material-microsoft-windows:\n* `POST /session/:sessionId/touch/multi/perform`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: `POST /session/:sessionId/actions` :simple-appium:\n* `POST /session/:sessionId/touch/move`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: W3C Actions API (`pointerMove`) :simple-appium:\n * Selenium-based clients can also use [Move by Offset](https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#move-by-offset)\n* `POST /session/:sessionId/touch/perform`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: `POST /session/:sessionId/actions` :simple-appium:\n* `POST /session/:sessionId/touch/scroll`\n * :octicons-arrow-right-24: W3C Actions API (`pointerDown`, `pointerMove` & `pointerUp`) :simple-appium:\n * :octicons-arrow-right-24: `mobile: scroll` or `mobile: swipe` execute methods :material-apple:\n * :octicons-arrow-right-24: `mobile: scrollGesture` or `mobile: swipeGesture` execute methods :material-android:\n * :octicons-arrow-right-24: `mobile: swipe` execute method :material-coffee:\n * :octicons-arrow-right-24: `macos: scroll` or `macos: swipe` execute methods :material-apple-finder:\n * :octicons-arrow-right-24: `windows: scroll` execute method :material-microsoft-windows:\n* `POST /session/:sessionId/touch/up`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: W3C Actions API (`pointerUp`) :simple-appium:\n * :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n* `GET /session/:sessionId/window_handle`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: `GET /session/:sessionId/window` :simple-appium:\n* `GET /session/:sessionId/window_handles`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: `GET /session/:sessionId/window/handles` :simple-appium:\n* `GET /session/:sessionId/window/handle`\n * :octicons-arrow-right-24: `GET /session/:sessionId/window` :simple-appium:\n* `POST /session/:sessionId/window/:windowhandle/maximize`\n * :octicons-arrow-right-24: `POST /session/:sessionId/window/maximize` :simple-appium:\n * :fontawesome-solid-triangle-exclamation: Only supported for the current window\n* `GET /session/:sessionId/window/:windowhandle/position`\n * :octicons-arrow-right-24: `GET /session/:sessionId/window/rect` :simple-appium:\n * :fontawesome-solid-triangle-exclamation: Only supported for the current window\n* `POST /session/:sessionId/window/:windowhandle/position`\n * :octicons-arrow-right-24: `POST /session/:sessionId/window/rect` :simple-appium:\n * :fontawesome-solid-triangle-exclamation: Only supported for the current window\n* `GET /session/:sessionId/window/:windowhandle/size`\n * :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n * :octicons-arrow-right-24: `GET /session/:sessionId/window/rect` :simple-appium:\n * :fontawesome-solid-triangle-exclamation: Only supported for the current window\n\n### Modified\n\nThe following are all endpoints modified in Appium 3, by removing handling for old or unused\nparameters (note that no new parameters have been added). Each endpoint lists the parameters it no\nlonger accepts, as well as the parameters it continues to accept in Appium 3.\n\n* `POST /session`\n * :octicons-x-24: `desiredCapabilities`, `requiredCapabilities`\n * :octicons-check-24: `capabilities`\n* `POST /session/:sessionId/alert/text`\n * :octicons-x-24: `value`\n * :octicons-check-24: `text`\n* `GET /session/:sessionId/appium/device/system_time`\n * :octicons-x-24: `format`\n * :octicons-check-24: None\n* `POST /session/:sessionId/element/:elementId/value`\n * :octicons-x-24: `value`\n * :octicons-check-24: `text`\n* `POST /session/:sessionId/timeouts`\n * :octicons-x-24: `type`, `ms`\n * :octicons-check-24: `script`, `pageLoad`, `implicit`\n* `POST /session/:sessionId/window`\n * :octicons-x-24: `name`\n * :octicons-check-24: `handle`\n\n[^sim]: Supported in emulators/simulators only\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/security.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Server Security\n---\n\nThe Appium team makes every effort to ensure the security of the Appium server. This is especially\nimportant when Appium is run in a multitenant environment, or when multiple users are running\nsessions on the same Appium server. In general, you can only safely enable all of Appium's features if\nall the following are true:\n\n- You're running your own Appium server locally or within a protected internal network\n- You're not sharing it with any untrusted parties\n- You don't expose Appium's port(s) to the wider internet\n\nBut because many Appium users might not be able to guarantee such a safe environment, the Appium\nteam puts many features behind a security protection mechanism, which forces system admins (the\npeople who are in charge of starting the Appium server) to _explicitly opt-in_ to these features.\n(Third-party driver and plugin authors can also [hide behaviour behind security\nflags](../developing/build-drivers.md).)\n\nFor security reasons, Appium client sessions can _not_ request feature enablement via capabilities.\nThis is the responsibility of the server admin who configures and launches the Appium server.\n\n## Security Server Args\n\nThe [Server CLI](../reference/cli/server.md) doc outlines three relevant arguments which may be passed to\nAppium, when starting it from the command line:\n\n|
Parameter
|Description|\n|---------------------------------------|-----------|\n|`--relaxed-security`|Turns on _all_ insecure features, except those blocked by `--deny-insecure`|\n|`--allow-insecure`|Turns on _only_ specified features, except those blocked by `--deny-insecure`. Has no effect when used in combination with `--relaxed-security`|\n|`--deny-insecure`|Explicitly turns _off_ specified features, overriding `--relaxed-security` and `--allow-insecure`|\n\nAll of the above arguments can also be specified in the [Appium Configuration file](./config.md).\n\nFeatures passed to `--allow-insecure`/`--deny-insecure` must be specified as a comma-separated list,\nand each feature in the list must additionally include a prefix, indicating the driver to which the\nfeature should apply. The prefix can be either the driver's `automationName`, or the wildcard (`*`)\nsymbol, if the feature should be applied to all drivers. The prefix and feature name are separated\nusing the colon character (`:`).\n\nFor example, `first:foo` refers to the `foo` feature for the `first` driver, whereas `*:bar` refers\nto the `bar` feature for all drivers.\n\n## Insecure Features\n\nEach Appium driver is responsible for its own security, and can create its own feature names. Thus,\nyou should read through the documentation for a particular driver to know which feature names it\nmight use. Here is an incomplete list of examples from some of Appium's official drivers:\n\n|
Feature Name
|Description|Supported Extension(s)|\n|------------|-----------|-------|\n|`get_server_logs`|Allows retrieving of Appium server logs via the Webdriver log interface|IOS, XCUITest, Android, UiAutomator2, Espresso|\n|`adb_shell`|Allows execution of arbitrary shell commands via ADB, using the `mobile: shell` command|Android, UiAutomator2, Espresso|\n|`record_audio`|Allow recording of host machine audio inputs|XCUITest|\n|`execute_driver_script`| Allows sending a request that has multiple Appium commands.|Execute Driver Plugin|\n\nSome insecure features operate on the server level and do not require a driver session. Enabling\nthese features require using the wildcard prefix:\n\n|
Feature Name
|Description|\n|------------|-----------|\n|`session_discovery`|Allows retrieving the list of active server sessions via `GET /appium/sessions`|\n\n## Examples\n\nTurn on the `foo` feature only for the `first` driver:\n\n```bash\nappium --allow-insecure=first:foo\n```\n\nTurn on the `foo` feature for all drivers:\n\n```bash\nappium --allow-insecure='*:foo'\n```\n\nTurn on the `foo` feature for all drivers _except_ `first`:\n\n```bash\nappium --allow-insecure='*:foo' --deny-insecure=first:foo\n```\n\nTurn on all features _except_ `foo` for all drivers:\n\n```bash\nappium --relaxed-security --deny-insecure='*:foo'\n```\n\nTurn on multiple insecure features for specific drivers:\n\n```bash\nappium --allow-insecure=uiautomator2:adb_shell,xcuitest:get_server_logs\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/settings.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Session Settings\n---\n\nAppium has a set of extension APIs that allow you to adjust parameters for a given session during\nthe session itself. Called \"Settings\", these parameters are similar to [Capabilities](./caps.md),\nbut while Capabilities _cannot be adjusted_ once a session has started, Settings _can be adjusted any\nnumber of times_ during the course of a session.\n\nThere are 3 important points to the concept of Settings:\n\n- Settings are mutable; they can be changed during a session using the Settings API\n- Settings are only relevant during the session in which they are set. They are typically reset for\n each new session, though depending on the driver, some settings may persist between sessions\n- Settings only adjust the way the Appium server behaves during test automation. They do not affect\n the device or app under test\n\nAn example of a setting would be the `ignoreUnimportantViews` setting recognized by the UiAutomator2\ndriver. The driver can be instructed to ignore elements in the view hierarchy which it deems\nirrelevant. Changing this setting to `true` can cause tests to run faster. But if later in the same\nsession you _want_ to access elements which would be ignored under this setting, you can always\nchange it back to `false`.\n\nSettings are implemented via the following API endpoints:\n\n| Command |
Method/Route
| Params | Description | Returns |\n|-------------------|---------------------------------------------|------------------------------------|------------------------------------|------------------------------------|\n| `Update Settings` | `POST /session/:id/appium/settings` | `settings` (`Record`) | Update the provided setting values | `null` |\n| `Get Settings` | `GET /session/:id/appium/settings` | | Return the current settings | `settings` (`Record`) |\n\nThe `settings` object must be a set of keys and values, where the key is the setting name, and the\nvalue is any documented valid value for that setting.\n\n!!! info\n\n Settings are driver-specific, so refer to your driver's documentation for a list of supported settings\n\n## Initializing Settings via Capabilities\n\nIf you want to start an Appium session with a setting in a non-default state, you can do so by\nincluding a capability of the form `appium:settings[]` with the appropriate value. So to turn\non the `ignoreUnimportantViews` setting mentioned above from the very beginning of a session, you\nwould construct a set of capabilities that includes the following in its JSON representation:\n\n```json\n{\n \"appium:settings[ignoreUnimportantViews]\": true\n}\n```\n\nAlso, since Appium 2.1, there is a possibility to provide multiple settings in a single\n`appium:settings` capability value:\n\n```json\n{\n \"appium:settings\": {\n \"ignoreUnimportantViews\": true,\n \"allowInvisibleElements\": true\n }\n}\n```\n\nOf course, initializing a setting via capabilities doesn't prevent you from changing it later on\nvia the Settings API. To learn more about how to use the Settings API in the context of your\nspecific client library, visit the documentation for that client.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/guides/tls.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: SSL/TLS/SPDY Support\n---\n\nAppium 2.2 introduces the option to start the Appium server with SSL/TLS support. \n\n## Command Line Arguments\nIn order to enable secure connections to the server, you need to provide the following command\nline arguments:\n\n```bash\nappium server --ssl-cert-path=/path/to/cert.pem --ssl-key-path=/path/to/key.pem\n```\n\nBoth arguments must be provided and should contain paths to a valid\n[X509 PEM](https://www.ssl.com/guide/pem-der-crt-and-cer-x-509-encodings-and-conversions/)\ncertificate and its corresponding private key.\n\nAfter the server is started use the `https` protocol and a client supporting SSL/TLS or\n[SPDY](https://en.wikipedia.org/wiki/SPDY) to communicate to it.\n\n### Supported Features\n\nOnce a secure server socket is established it supports the following protocols:\n`['h2', 'spdy/3.1', 'spdy/3', 'spdy/2', 'http/1.1', 'http/1.0']`. See\n[the SPDY node module documentation](https://www.npmjs.com/package/spdy) to get more details about\nits features. All insecure client connections will be rejected by the server.\n\n### Self-Signed Certificates\n\nUse the following command in order to generate a self-signed certificate/key pair:\n\n```bash\nopenssl req -nodes -new -x509 -keyout key.pem -out cert.pem -subj \"/C=US/ST=State/L=City/O=company/OU=Com/CN=www.testserver.local\"\n```\n\nFeel free to change the value of `-subj` in the command above with your matching details. The server\nshould work just fine with a self-signed certificate, although you need to take care about a proper\nclient setup, e.g. make sure it does not reject unauthorized certificates.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/intro/appium.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: How Does Appium Work?\n---\n\nAs mentioned on the main page, Appium is an open-source project and ecosystem of related software,\ndesigned to facilitate UI automation of many app platforms. With the release of Appium 2, Appium\nhas the following primary goals:[^1]\n\n- Make platform-specific automation capabilities available under a cross-platform, standard API\n- Allow easy access to this API from any programming language\n- Provide tools to enable convenient community development of Appium extensions\n\n[^1]:\n To meet these primary goals, we also work with a set of secondary goals or methodology\n principles, which we also encourage for Appium extension developers:\n\n - As far as possible, rely on (and contribute to) open source technology\n - As far as possible, rely on vendor-provided tools for a given platform\n - As far as possible, rely on automation tools that allow automation of unmodified apps (prefer\n not to require the user to build in additional SDKs or software that introduce discrepancies\n between the test version of the app and the production version)\n - As far as possible, rely on existing standards instead of creating new ones\n\nSo, take any app platform you know about, like iOS or Android. Appium wants for there to be a way\nfor developers and testers to write UI automation code for that platform, according to a single,\nunified API. Based on Appium's goals, we have a lot of questions to answer to make it all work:\n\n- Which API should that \"single, unified\" API be?\n- How do we map that API to automation behaviour for a specific platform?\n- How do we make that API accessible via multiple popular programming languages?\n\nThere's another, larger, question lurking in the background here too, given that there are more app\nplatforms out there than just iOS and Android:\n\n- How do we enable automation for *all* the platforms?\n\nExploring Appium's answers to these questions may not be the quickest way to learn what Appium is,\nbut it is certainly a good one! So let's dive in.\n\n## Appium's choice of API\n\nAppium is very fortunate to have been preceded by a technology which has been a long-standing\npioneer in the field of UI automation, namely [Selenium](https://selenium.dev). The goal of the\nSelenium project has been to support UI automation of web browsers, and in this way we can think of\nit as occupying a subset of Appium's goals. Along the way, Selenium (and, after they merged,\nanother project called WebDriver) developed a relatively stable API for browser automation.\n\nOver the years, Selenium worked with various web browser vendors and the [W3C](https://w3.org)\nstandards group to turn its API into an official web browser standard, called the [WebDriver\nspecification](https://w3c.github.io/webdriver/). All the main browsers now\nimplement automation capabilities inline with the WebDriver spec, without the Selenium team having\nto maintain any software that performs actual automation; standards for the win!\n\nAppium's initial goals were to develop an automation standard for mobile apps (iOS and Android). We\ncould have made up something new, but in the spirit of joining forces and keeping standards, well,\nstandard, we decided to adopt the WebDriver spec as Appium's API.[^2] While user interaction on\nwebsites and in mobile native apps are not entirely identical (with even greater differences once\nwe start to consider, for example, TV platforms controlled by simple remotes), the fact is that\nmost software UIs are pretty much the same. This means that the WebDriver spec provides automation\nAPI primitives (finding elements, interacting with elements, loading pages or screens, etc...) that\nmore or less map to any platform.\n\n[^2]: Technically, when Appium was first written, we were dealing with something older than the\n WebDriver spec, called the JSON Wire Protocol. Since then, Appium continued to evolve along with\n the W3C spec and is fully W3C-compliant.\n\nOf course, Appium wants to support the cases where user interaction *does* differ from web to\nmobile or web to TV, and so Appium also makes use of the built-in *extensibility* of the WebDriver\nspec. The result is that, no matter what platform you want to automate, when you use Appium, you\nwill do so using the standard WebDriver spec, with two caveats:\n\n- We might not have any way to support a particular WebDriver API command on a given platform, and\n so some commands might be unsupported (for example, getting or setting cookies is not possible in\n the world of native mobile app automation).\n- We might support automation behaviours that go *beyond* what's available in the WebDriver API\n command list, though any such commands will be valid and spec-compliant extensions to the\n WebDriver API.\n\nHow do you actually *use* the WebDriver API, particularly in the context of Appium? We'll cover\nthat in the [section below](#universal-programming-language-access) on how Appium provides\nuniversal programming language access. All you need to know for now is that the way Appium\nintroduces a universal UI automation interface is by implementing the WebDriver protocol.\n\n## Platform automation behaviour\n\nThe next question is, how does Appium map this protocol to automation behaviour on a wide range of\nplatforms? The trick is that, strictly speaking, Appium doesn't! It leaves this responsibility up\nto a kind of software module called an Appium *driver*. There's a whole [Driver\nIntroduction](./drivers.md) which you can read next, so we won't go into huge detail on how they\nwork for now.\n\nWhat's important to understand at the moment is that a driver is kind of like a pluggable module\nfor Appium that gives Appium the power to automate a particular platform (or set of platforms,\ndepending on the goal of the driver). At the end of the day, a driver's responsibility is to simply\nimplement an Appium-internal interface representing the WebDriver protocol. How it implements this\ninterface is totally up to the driver, based on its strategy for making automation happen on\na specific platform. Typically, and with a lot more complexity and difficulty in the details,\na driver does this by relying on platform-specific automation technologies. For example, Apple\nmaintains an iOS automation technology called\n[XCUITest](https://developer.apple.com/documentation/xctest/user_interface_tests). The Appium\ndriver that supports iOS app automation is called the [XCUITest\nDriver](https://github.com/appium/appium-xcuitest-driver) because ultimately what it does is\nconvert the WebDriver protocol to XCUITest library calls.\n\nOne of the reasons that drivers are independent, pluggable modules is that they work completely\ndifferently from one another. The tools and requirements for building and using drivers for\ndifferent platforms are completely different. And so Appium lets you use just the drivers that you\nneed for your automation tasks. Choosing drivers and installing them so that you can use them with\nyour Appium instance is so important that Appium has its very own [CLI for managing\ndrivers](../reference/cli/extensions.md).\n\nSo, to answer our original question, the way that Appium provides access to automation capabilities\nfor a given platform is that the Appium team (or anyone else[^3]) writes a *driver* for that\nplatform, implementing as much or little of the WebDriver protocol as desired. The driver can then\nbe installed by anyone using Appium.\n\n[^3]: You can build and share your own drivers! Check out [Building\n Drivers](../developing/build-drivers.md) to learn more about how to develop drivers in Node.js\n that can be used with Appium.\n\n## Universal programming language access\n\nBut what does it mean, or look like, to *use* Appium, anyway? Since Appium is ultimately a Node.js\nprogram, it *could* have looked like importing Appium and its drivers as libraries into your own\nNode.js programs. But that wouldn't meet Appium's goal of providing automation capabilities to\npeople using any popular programming language.\n\nLuckily, the fact that Appium rode in on Selenium's coattails meant that we had a solution to this\nproblem from day one. You see, the WebDriver specification is actually an HTTP-based protocol,\nmeaning it is designed to be used over a network rather than within the memory of a single program.\n\nOne of the main benefits of this \"client-server\" architecture is that it allows the automation\nimplementer (the thing doing the automation, in this case the 'server') to be completely distinct\nfrom the automation runner (the thing defining what automation should be done, in what steps,\netc..., in this case the 'client'). Basically, all the \"hard stuff\" (actually figuring out how to\nmake automation happen on a given platform) can be handled in one place by the server, and \"thin\"\nclient libraries can be written in any programming language which simply encode HTTP requests to\nthe server in language-appropriate way. It's possible, in other words, to bring basic Appium\n/ WebDriver capabilities to a new programming language relatively easily, assuming high-level HTTP\nlibraries exist, simply by coding up a basic HTTP client in that language.\n\nThere are a couple important takeaways here for you, the Appium user:\n\n- Appium is an *HTTP server*. It must run as a process on some computer for as long as you want to\n be able to use it for automation. It must be accessible on the network to whichever computer you\n want to use to run the automation from (whether that is the same machine or one across the\n world).\n- Unless you want to write raw HTTP calls or use cURL, using Appium for automation involves the use\n of an [Appium Client](clients.md) in the language of your choice. The goal of each of these\n clients is to encapsulate the WebDriver protocol so that rather than worrying about the protocol\n itself, you can work with objects and methods that feel idiomatic for your language.\n- The Appium server and the Appium client do *not* need to be running on the same computer. You\n simply need to be able to send HTTP requests from the client to the server over some network.\n This greatly facilitates the use of cloud providers for Appium, since they can host the Appium\n server and any related drivers and devices, and all you need to do is point your client script to\n their secure endpoints.\n\nAnd of course, none of this is about \"testing\" per se, purely about the use of Appium and its\nclient libraries for automation purposes. If you want to do automation for the purpose of\n\"testing\", you'll likely want to enlist the help of test runners, test frameworks, and the like,\nnone of which need be related to Appium; one of the benefits of Appium's \"universal accessibility\"\nis that it plays well with whatever set of tools you find most beneficial for your situation.\n\n## Appium's huge scope\n\nAppium's vision (automation of everything under a single API) is huge! Certainly, much bigger than\nthe team of core maintainers for the open source project. So how does Appium hope to achieve this\ngoal? Basically, by empowering the community to develop functionality on top of Appium as\na *platform*. This is what we call the Appium \"ecosystem\".\n\nThe Appium team does officially maintain a few drivers itself (for example, the XCUITest driver\nthat we spoke about earlier). But it cannot hope to have the platform-specific expertise or the\ncapacity to maintain drivers for many different platforms. But what we have done, particularly\nbeginning with Appium 2, is to provide tools to empower the community to join in our vision:\n\n- Anyone can create a driver simply by creating a Node.js module that conforms to the appropriate\n conventions and implements any (sub|super)set of the WebDriver protocol. Creating a driver often\n involves a minimal amount of code because the WebDriver protocol details are abstracted away, and\n many helper libraries are available---the same libraries that power the Appium team's own\n drivers.\n- Sharing drivers with others is easy using the Appium driver CLI. There is no central authority.\n Anyone can share drivers publicly or privately, for free or for sale. Drivers can be open or\n closed source (though obviously we appreciate open source!).\n\nAppium's vision of being a platform for development extends beyond the support of automation for\nall app platforms. As a popular automation tool, there are many opportunities for integrating\nAppium with all kinds of other tools and services. In addition, there are many feature ideas for\nAppium, either as a core server or in its incarnation across various drivers, which the core team\nwill never have time to build. And so, with Appium 2, Appium has released a plugin system that\nenables anyone to build and share modules that change how Appium works!\n\nIn the same way that drivers are easily shareable and consumable via the Appium driver CLI, plugins\ncan be published and consumed via a parallel [Plugin CLI](../reference/cli/extensions.md). Plugins\ncan do all sorts of things, for example adding the ability for Appium to find and interact with\nscreen regions based on a template image (as in the [`images`\nplugin](https://github.com/appium/appium/tree/master/packages/images-plugin)). There are very few\nlimitations on what you can do with plugins, so you might also be interested in learning how to\n[Build Plugins](../developing/build-plugins.md) in Node.js that can be used with Appium.\n\nSo that's Appium: an extensible, universal interface for the UI automation of potentially\neverything! Read on into some of the specific intro docs for more details, or check out the various\nguides to dive into some more general concepts and features of Appium.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/intro/clients.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Intro to Appium Clients\n---\n\nFor all the reasons discussed in the [main Overview](./appium.md), Appium is based on the [W3C\nWebDriver specification](https://w3c.github.io/webdriver/). This means that\nAppium implements a client-server architecture. The server (consisting of Appium itself along with\nany drivers or plugins you are using for automation) is connected to the devices under test, and\nis actually responsible for making automation happen on those devices. The client (driven by *you*,\nthe Appium test author) is responsible for sending commands to the server over the network, and\nreceiving responses from the server as a result. These responses can be used to tell whether\nautomation commands are successful, or might contain information that you queried about the state\nof the application. This document is a conceptual introduction to the client side of this equation.\n\n!!! info\n\n For more about the server side of the equation (i.e., how does Appium actually control\n devices?), check out our [Intro to Appium Drivers](./drivers.md). To skip to a list of links to\n Appium client libraries, check out the [list of clients](../ecosystem/clients.md).\n\nWhat sorts of automation commands are available? That is up to the particular driver and plugins\nthat you are using in any given session. A standard set of commands would include, for example, the\nfollowing:\n\n- Find Element\n- Click Element\n- Get Page Source\n- Take Screenshot\n\nIf you look at these commands in the WebDriver specification, you'll notice that they are not\ndefined in terms of any particular programming language. They are not Java commands, or JavaScript\ncommands, or Python commands. Instead, they form part of an HTTP API which can be accessed from\nwithin *any* programming language (or none! you could just use cURL if you want).\n\nSo, for example, the `Find Element` command corresponds to an HTTP `POST` request sent to the HTTP\nendpoint `/session/:sessionid/element` (where in this case, `:sessionid` is a placeholder for the\nunique session ID generated by the server in a previous call to `Create Session`).\n\nThis information is primarily useful for people developing technology that works with the WebDriver\nspec. It's not particularly useful for people trying to write Appium or Selenium tests. When you\nwrite an Appium test, you want to use a programming language you're familiar with. Luckily, there\nexist a set of [Appium client libraries](../ecosystem/clients.md)[^1] that take care of the\nresponsibility of speaking HTTP to the Appium server. Instead, they expose a set of \"native\"\ncommands for a particular programming language, so that, to the test author, it just feels like\nyou're writing Python, or JavaScript, or Java.\n\nAs an example, here's the same simple set of Appium commands in five different programming\nlanguages, using the recommended Appium client binding for each language (note that this is not\nworking sample code including all appropriate imports; see each client library's instructions for\nsetup and command reference):\n\n=== \"JavaScript (Webdriver.io)\"\n\n ```js\n const element = await driver.$('//*[@text=\"Foo\"]');\n await element.click();\n console.log(await element.getText())\n console.log(await driver.getPageSource())\n ```\n\n=== \"Java\"\n\n ```java\n WebElement element = driver.findElement(By.Xpath(\"//*[@text='Foo']\"))\n element.click()\n System.out.println(element.getText())\n System.out.println(driver.getPageSource())\n ```\n\n=== \"Python\"\n\n ```py\n element = driver.find_element(by=By.XPATH, value='//*[@text=\"Foo\"]')\n element.click()\n print(element.text)\n print(driver.page_source)\n ```\n\n=== \"Ruby\"\n\n ```rb\n element = driver.find_element :xpath, '//*[@text=\"Foo\"]'\n element.click\n puts element.text\n puts driver.page_source\n ```\n \n=== \"C#\"\n\n ```dotnet\n AppiumElement element = driver.FindElement(MobileBy.AccessibilityId(\"Views\")); \n element.click();\n System.Console.WriteLine(element.Text);\n System.Console.WriteLine(driver.PageSource);\n ```\n \nEach of these scripts, despite being in different languages, does the same thing under the hood:\n\n1. Call `Find Element` with a `using` parameter of `xpath` and a `value` parameter expressing the\n XPath query used to find an element. (If you're confused about these terms, you might find an\n introduction to Appium or Selenium useful)\n2. Call `Click Element` with the ID of the element found in the previous call.\n3. Call `Get Element Text` with the ID of the same element, and print it to the console.\n4. Call `Get Page Source` to retrieve the page/app source and print it to the console.\n\nThe only other thing to keep in mind before choosing or using a client is that each client is\nindependently maintained. Just because a feature is available in one client, it doesn't mean it's\navailable in another client (though all clients support at least the standard W3C protocol plus any\ncommon appium extensions). Just because one client has a nice set of helper functions, doesn't mean\nanother will. Some clients are kept very frequently up to date, and others are not! So when\nthinking about choosing a library, the first consideration is the language you want to use, and the\nsecond consideration is how full-featured and well-maintained the library is!\n\nTo learn how to use an Appium client, visit that client's homepage to learn more. In many cases,\nthe Appium client for a given language is built *on top of* the *Selenium* client for that\nlanguage, and so certain Appium clients may only document the features which the Appium client\nadded on top of the Selenium client. All that to say, for a full reference, you may need to visit\nboth the Appium client documentation as well as the Selenium client documentation.\n\nThat's all you need to know about Appium clients! Head over to the\n[Clients](../ecosystem/clients.md) page to check out the current list of clients.\n\n[^1]: These libraries are alternately called \"clients\", \"client libraries\", or \"client bindings\".\n They all mean the same thing!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/intro/drivers.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Intro to Appium Drivers\n---\n\nAs the [main Overview](./appium.md) makes clear, \"drivers\" are basically Appium's answer to the\nquestion, \"how do we support automation of multiple, unrelated platforms?\" In this doc we'll get\ninto a little more detail about how drivers work. The specific details of how drivers work probably\ndon't matter too much for you, unless you're planning on writing your own driver or contributing to\nan existing driver (things we hope you do!).\n\nThe main benefit in understanding a bit more of how drivers work is that being aware of the typical\ncomplexity or the typical driver architecture will inform your debugging process when you\ninevitably run into an issue in one of your tests.\n\n## Interface Implementations\n\nAt the most basic level, drivers are simply Node.js classes that extend a special class included in\nAppium, called `BaseDriver`. You could have something very close to a \"working\" driver, with these\nvery simple lines of code:\n\n```js\nimport BaseDriver from '@appium/base-driver'\n\nclass MyNewDriver extends BaseDriver {\n}\n```\n\nThis empty driver doesn't *do* anything, but you could wrap it up in a Node.js module, add a few\nAppium-related fields to the module's manifest (`package.json`), and then install it using `appium\ndriver install`.\n\nSo, from a technical perspective, an Appium driver is just a bit of code that inherits from some\nother Appium code. That's it! Now, inheriting from `BaseDriver` actually gives us a lot, because\n`BaseDriver` is essentially an encapsulation of the entire WebDriver protocol. So all a driver\nneeds to do something useful is to *implement* Node.js methods with names corresponding to\ntheir WebDriver protocol equivalents.\n\nSo let's say I wanted to do something with this empty driver; first I have to decide which\nWebDriver command I want to implement. For our example, let's take the [Navigate\nTo](https://w3c.github.io/webdriver/#navigate-to) WebDriver command. Leave aside for the moment\nwhat I want to have the driver *do* when this command is executed. To tell Appium the driver can\nhandle the command, all we have to do is define a method like this in our driver class:[^1]\n\n```js\nasync setUrl(url) {\n // do whatever we want here\n}\n```\n\n[^1]: You might notice that `setUrl` doesn't look anything like `Navigate To`, so how did we know\n to use it rather than some other random string? Well, Appium's WebDriver-protocol-to-method-name\n mapping is defined in a special file within the `@appium/base-driver` package called\n [routes.js](https://github.com/appium/appium/blob/master/packages/base-driver/lib/protocol/routes.js).\n So if you're writing a driver, this is where you would go to figure out what method names to use\n and what parameters to expect. Or you could look at the source for any of the main Appium\n drivers!\n\nThat's it! How we actually implement the command is totally up to us, and depends on the\nplatform(s) we want to support. Here are some different example implementations of this command for\ndifferent platforms:\n\n- Browsers: execute some JavaScript to set `window.location.href`\n- iOS apps: launch an app using a deep link\n- Android apps: launch an app using a deep link\n- React apps: load a specific route\n- Unity: go to a named scene\n\nSo you can see there can be a lot of differences between how drivers implement the same WebDriver\ncommand across platforms.[^2] What is the *same*, though, is how they express that they can handle\na protocol command.\n\n[^2]: Of course, we want to keep the semantics as similar as possible, but in the world of iOS, for\n example, launching an app via a deep link (a URL with a special app-specific scheme) is about as\n close as we are going to get to navigating to a web URL.\n\nWe're going into this great amount of detail (which you don't need to remember, by the way),\nbecause it's important to stress the point that an Appium driver is not inherently anything in\nparticular, other than a bit of JS code that can handle WebDriver protocol commands. Where you go\nfrom there is up to you, the driver author!\n\n## Automation mapping\n\nBut *typically* what driver authors want to do is to provide automation behaviours for a given\nplatform(s) that are semantically very similar to the the WebDriver spec implementations for\nbrowsers. When you want to find an element, you should get a reference to a UI element. When you\nwant to click or tap that element, the resulting behaviour should be the same as if a person were\nto click or tap on the element. And so on.\n\nSo the real challenge for driver authors is not how to work with the WebDriver protocol (because\n`BaseDriver` encapsulates all that for you), but how to make the actual automation happen on the\ntarget platform. Every driver relies on its own set of underlying technologies here. As mentioned\nin the [Overview](index.md), the iOS driver uses an Apple technology called\n[XCUITest](https://developer.apple.com/documentation/xctest/xcuielement). These underlying\nautomation technologies usually have proprietary or idiosyncratic APIs of their own. Writing\na driver becomes the task of mapping the WebDriver protocol to this underlying API (or sometimes\na set of different underlying APIs--for example, the UiAutomator2 driver relies not only on the\n[UiAutomator2](https://developer.android.com/training/testing/other-components/ui-automator)\ntechnology from Google, but also functions only available through\n[ADB](https://developer.android.com/tools/adb), as well as functions only available\nvia the Android SDK inside a helper app). Tying it all together into a single, usable, WebDriver\ninterface is the incredibly useful (but incredibly challenging) art of driver development!\n\n## Multi-level architecture\n\nIn practice, this often results in a pretty complex architecture. Let's take iOS for example again.\nThe XCUITest framework (the one used by the Appium driver) expects code that calls it to be written\nin Objective-C or Swift. Furthermore, XCUITest code can only be run in a special mode triggered by\nXcode (and directly or indirectly, the Xcode command line tools). In other words, there's no\nstraightforward way to go from a Node.js function implementation (like `setUrl()` above) to\nXCUITest API calls.\n\nWhat the XCUITest driver authors have done is instead to split the driver into two parts: one part\nwritten in Node.js (the part which is incorporated into Appium and which initially handles the\nWebDriver commands), and the other part written in Objective-C (the part which actually gets run on\nan iOS device and makes XCUITest API calls). This makes interfacing with XCUITest possible, but\nintroduces the new problem of coordination between the two parts.\n\nThe driver authors could have chosen any of a number of very different strategies to model the\ncommunication between the Node.js side and the Objective-C side, but at the end of the day decided\nto use ... the WebDriver protocol! That's right, the Objective-C side of the XCUITest driver is\nitself a WebDriver implementation, called\n[WebDriverAgent](https://github.com/appium/webdriveragent).[^3]\n\n[^3]: You could in theory, therefore, point your WebDriver client straight to WebDriverAgent and\n bypass Appium entirely. This is usually not convenient, however, for a few reasons:\n\n - The Appium XCUITest driver builds and manages WebDriverAgent for you, which can be a pain and\n involves the use of Xcode.\n - The XCUITest driver does lots more than what can be done by WebDriverAgent, for example working\n with simulators or devices, installing apps, and the like.\n\nThe moral of the story is that driver architectures can become quite complicated and multilayered,\ndue to the nature of the problem we're trying to solve. It also means it can be difficult sometimes\nto tell where in this chain of technologies something has gone wrong, if you run into a problem\nwith a particular test. With the XCUITest world again, we have something like the following set of\ntechnologies all in play at the same time:\n\n- Your test code (in its programming language) - owned by you\n- The Appium client library - owned by Appium\n- The Selenium client library - owned by Selenium\n- The network (local or Internet)\n- The Appium server - owned by Appium\n- The Appium XCUITest driver - owned by Appium\n- WebDriverAgent - owned by Appium\n- Xcode - owned by Apple\n- XCUITest - owned by Apple\n- iOS itself - owned by Apple\n- macOS (where Xcode and iOS simulators run) - owned by Apple\n\nIt's a pretty deep stack!\n\n## Proxy mode\n\nThere's one other important architectural aspect of drivers to understand. It can be exemplified\nagain by the XCUITest driver. Recall that we just discussed how the two \"halves\" of the XCUITest\ndriver both speak the WebDriver protocol---the Node.js half clicks right into Appium's WebDriver\nserver, and the Objective-c half (WebDriverAgent) is its own WebDriver implementation.\n\nThis opens up the possibility of Appium taking a shortcut in certain cases. Let's imagine that the\nXCUITest driver needs to implement the `Click Element` command. The internal code of this\nimplementation would look something like taking the appropriate parameters and constructing an HTTP\nrequest to the WebDriverAgent server. In this case, we're basically just reconstructing the\nclient's original call to the Appium server![^4] So there's really no need to even write a function\nimplementing the `Click Element` command. Instead, the XCUITest driver can just let Appium know\nthat this command should be proxied directly to some other WebDriver server.\n\n[^4]: It's not *exactly* the same call, because the Appium server and the WebDriverAgent server\n will generate different session IDs, but these differences will be handled transparently.\n\nIf you're not familiar with the concept of \"proxying,\" in this case it just means that the XCUITest\ndriver will not be involved at all in handling the command. Instead it will merely be repackaged\nand forwarded to WebDriverAgent at the protocol level, and WebDriverAgent's response will likewise\nbe passed back directly to the client, without any XCUITest driver code seeing it or modifying it.\n\nThis architectural pattern provides a nice bonus for driver authors who choose to deal with the\nWebDriver protocol everywhere, rather than constructing bespoke protocols. It also means that\nAppium can create wrapper drivers for any other existing WebDriver implementation very easily. If\nyou look at the [Appium Safari driver](https://github.com/appium/appium-safari-driver) code, for\nexample, you'll see that it implements basically no standard commands, because all of these are\nproxied directly to an underlying SafariDriver process.\n\nIt's important to understand that this proxying business is sometimes happening under the hood,\nbecause if you're ever diving into some open source driver code trying to figure out where\na command is implemented, you might be surprised to find no implementation at all in the Node.js\ndriver code itself! In that case, you'll need to figure out where commands are being proxied to so\nyou can look there for the appropriate implementation.\n\nOK, that's enough for this very detailed introduction to drivers!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/intro/history.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Project History\n---\n\nAppium has been around in one form or another since 2012. It's been under the\ndirection of various individuals and organizations, and it's even been\nimplemented in 3 different programming languages! Welcome to more than you ever\nwanted to know about how Appium got to be what is it today...\n\n## Early Inspiration\n\n[Dan Cuellar](https://twitter.com/thedancuellar) was the Test Manager at Zoosk\nin 2011, when he encountered a problem. The length of the test passes on the\niOS product was getting out of hand. Less testing was an option, but would come\nwith additional risk, especially with it taking several days to get patches\nthrough the iOS App Store Review process. He thought back to his days working\non websites and realized automation was the answer.\n\nDan surveyed the existing landscape of tools, only to find that all of them\nhand major drawbacks. The tool supplied by Apple, UIAutomation, required tests\nto be written in JavaScript, and did not allow for real-time debugging or\ninterpretation. It also had to be executed inside the Xcode profiling tool,\nInstruments. Other 3rd-party tools used private APIs and required SDKs and HTTP\nServers to be embedded into the application. This seemed highly undesirable.\n\nUnsatisfied with the existing options, Dan asked his manager for some\nadditional time to see if he could find a better way. He spent 2 weeks poking\nand prodding around to see if there was a way to use approved Apple\ntechnologies to automate an iOS application. The first implementation he tried\nused AppleScript to send messages to Mac UI elements using the OS\nX accessibility APIs. This worked to some degree, but would never work on real\ndevices, not to mention other drawbacks.\n\nSo he thought, what if I could get the UIAutomation framework to run in real\ntime like an interpreter? He looked into it and he determined that all he would\nneed to do is find a way to receive, execute, and reply to commands from within\na UIAutomation javascript program. Using the utility Apple provided for\nexecuting shell commands he was able to `cat` sequentially ordered text files\nto receive commands, `eval()` the output to execute them, and write them back\nto disk with `python`. He then prepared code in C# that implemented the\nSelenium-style syntax to write the sequentially ordered javascript commands.\niOSAuto is born.\n\n## Selenium Conference 2012\n\nDan was selected to speak at Selenium Conference 2012 in London about an\nentirely different topic. As part of his presentation, he showed off iOS\nAutomation using Selenium syntax to demonstrate writing platform-agnostic tests\nthat use separate platform-specific page objects with a common interface. To\nhis surprise, the cool test architecture would take a backseat to the spectacle\nof iOS tests running like WebDriver tests. Several people suggested that he\ngive a lightning talk later in the conference to explain exactly how it worked.\n\nOn the second day of the conference, Dan stepped up on stage to give the\nlightning talk. Jason Huggins, co-creator of Selenium, moderated the lightning\ntalks. Dan experienced technical difficulties getting his presentation to\nload, and Jason nearly had to move on to the next lightning talk. At the last\nmoment, the screen turned on and Dan jumped into his presentation. He explained\nthe details of his implementation and how it worked, begged for contributors,\nand in five minutes it was over. The crowd applauded politely, and he left the\nstage.\n\n## The Phone Rings\n\nFour months after the Selenium Conference, Jason called Dan. Jason had been\nworking on iOS testing support for a client at Sauce Labs. Jason remembered\nDan's lightning talk and thought the project might be useful to Jason's work,\nbut Dan's source code was not public. Jason asked Dan to meet up. Later that\nweek, Dan met Jason in a bar in San Francisco and showed him the source code\nfor iOS Auto.\n\nA long-time open source advocate, Jason encouraged Dan to release his code\nunder an open source license. In August, Dan [released the source\ncode](https://github.com/penguinho/appium-old/commit/3ab56d3a5601897b2790b5256351f9b5af3f9e90)\non GitHub in C#. Jason encouraged Dan to change the language to make the\nproject more appealing to potential contributors. Dan [uploaded a new version\nin\nPython](https://github.com/penguinho/appium-old/commit/9b891207be0957bf209a77242750da17d3eb8eda).\nIn September, Jason added a web server and [began to implement the WebDriver\nwire\nprotocol](https://github.com/hugs/appium-old/commit/ae8fe4578640d9af9137d0546190fa29317d1499)\nover HTTP, making iOS Auto scriptable from any Selenium WebDriver client\nlibrary in any language.\n\n## The Mobile Testing Summit\n\nJason decided that the project should be presented at the [Mobile Testing\nSummit](https://twitter.com/mobtestsummit) in November, but suggested that the\nproject get a new name first. Many ideas were thrown out and they settled on\nAppleCart. A day later, while he was perusing some of Apple's guidance on\ncopyright and trademarks, Jason noticed that under the section of examples for\nnames Apple would defend its trademarks against, the first example was\n\"AppleCart\". He called Dan and informed him of the situation, and they\nbrainstormed for a bit before Jason hit the jackpot. Appium... Selenium for\nApps.\n\n## Sauce Labs and Node.js\n\nIn January 2013, not long after the Mobile Testing Summit, Sauce Labs decided\nto fully back Appium and provide more developer power. A task force was created\nto evaluate the current state and how best to move forward with the project.\nThe team, which included Jonathan Lipps (the current project lead), decided\nthat Appium needed a rebirth, and ultimately settled on Node.js as the\nframework to use. Node is well-known as a fast and efficient web server\nbackend, and at the end of the day, Appium is just a highly-specialized web\nserver. It was also decided that JavaScript as a language was accessible enough\nthat Appium would be able to grow into a larger community of open-source\ndevelopers with JavaScript than the other options on the table.\n\nIn just a few days, the team leveraged the existing work on Appium and had\na new version of Appium with as much functionality as the previous Python\nversion. The foundation had been laid for Appium's basic architecture, and we\nhave been successfully building on it since. A few weeks into this sprint,\nJonathan Lipps was formally designated project lead and he began to strategize\nhow to get more people from the community involved with Appium's development.\n\n## Appium Around the World\n\nUltimately, Jonathan decided that getting Appium in front of as many developers\nat conferences and meetups was the best way to attract users and contributions.\nAppium in its new incarnation was debuted at the [Google Test Automation\nConference 2013](https://www.youtube.com/watch?v=1J0aXDbjiUE). Later in 2013,\nAppium was presented at conferences and meetups all around the US, as well as\nin England, Poland, Portugal, and Australia. Notably, Jonathan had Appium\n[perform as instruments in a band](https://www.youtube.com/watch?v=zsbNVkayYRQ)\nand Dan Cuellar put together a fun [Appium video\nmontage](https://www.youtube.com/watch?v=xkzrEn0v0II) for Selenium Conference.\n\nBut during all these presentations and conferences, the project continued to\ndevelop. Early in 2013 we released Android and Selendroid support, making\nAppium the first truly cross-platform automation framework. The project also\ncontinued to attract users and contributors, and by the end of 2013, we'd\nalready had well over 1,000 commits.\n\n## The Road to Appium 1.0\n\nAppium began to grow and mature significantly. In May 2014,\nwe released Appium 1.0, which stood as a milestone in Appium's development.\nAppium was given\n[various](https://www.prnewswire.com/news-releases/black-duck-announces-black-duck-open-source-rookies-of-the-year-winners-242383341.html)\n[awards](https://www.infoworld.com/article/2241247/164642-bossie-awards-2014-the-best-open-source-application-development-tools.html)\nand became the most popular open-source cross-platform mobile automation\nframework. Stability improved, bugs were prioritized and fixed, and features\nadded. Sauce Labs increased the number of developers it donated to working\non Appium, but the entire community stayed involved in guiding the project and\ncontributing to it, and project governance continued to happen in the open, on\npublic mailing lists and GitHub's issue tracker.\n\n## The Appium Umbrella Broadens\n\nEventually, it became clear that the Appium codebase was not optimized for\na large team of distributed, sometime contributors. We took the opportunity as\na committer team to rewrite Appium from the ground up, using a more modern\nversion of the JavaScript language, and redoing Appium's architecture so that\nit was easy for users or third-party developers to build their own Appium\n\"drivers\". We wanted for it to be easier for new contributors to get ramped up\non the Appium codebase, and to see support for new platforms added to Appium by\ngroups other than the core team. That vision has begun to be fulfilled, with\ngroups like Microsoft and Youi.tv adding drivers to Appium for Windows desktop\napp automation and Youi.tv app automation, respectively.\n\n## Appium To The People\n\nIn late 2016, Sauce Labs donated Appium as a project to the [JS\nFoundation](https://js.foundation), in order to cement for the world Sauce's\ncommitment that Appium remains open source. The JS Foundation is a non-profit\nopen source stewardship organization which takes responsibility for holding the\ncopyright for open source projects, as well as ensuring they have a long and\nsuccessful tenure in the community. As a result of our move to a non-profit\nfoundation, we hope that the door will open even more widely for new\ncontributors, either as individuals or representing one of the many companies\nwhich now have an interest in seeing Appium move forward.\n\nEventually, the JS Foundation merged into the [OpenJS Foundation](https://openjsf.org),\nand Appium became an Impact Project in the foundation.\n\n## Appium 2.0\n\nAppium 2 was released in 2023 and introduced an entirely revamped architecture, shifting focus to Appium\nas an ecosystem rather than an all-in-one project. This unlocked the ability for anyone to develop\nand share their own Appium extensions (drivers and plugins), opening up a world of possibilities\nfor automation-related development for platforms far beyond iOS and Android! As a result,\nmany third-party extensions were created, such as new drivers for Flutter and Windows, plugins for\nmocking APIs and managing device farms, new Appium clients based on Rust and Swift, and much more.\n\nAround this time was also when we started a sponsorship program for Appium, which attracted various\nmajor and minor sponsors alike. This allowed us to give back to the Appium community, by compensating\ncontributors for their voluntary work on the project.\n\n## Appium 3.0\n\n2025 saw the release of Appium 3. This update was a lot smaller than Appium 2 and included only a\nfew behavioral changes, instead focusing on removing deprecated code and updating compatibility for\nmore modern ecosystems. Still, this reduced scope was also to be expected: since Appium 2, the\nmain feature development efforts had shifted to individual drivers and plugins, many of which had\ngone through multiple major updates during the Appium 2 era.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/intro/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Appium in a Nutshell\n---\n\nAs mentioned on the main page, Appium aims to support UI automation of many _different platforms_\n(mobile, web, desktop, etc.). Not only that, but it also aims to support automation code written in\n_different languages_ (JS, Java, Python, etc.). Combining all of this functionality in a single\nprogram is a very daunting, if not impossible task!\n\nIn order to achieve this, Appium is effectively split into four parts:\n\n
\n\n- :material-image-filter-center-focus-strong: __Appium Core__ - defines the core APIs\n- :material-car: __Drivers__ - implement connectivity to specific platforms\n- :octicons-code-16: __Clients__ - implement Appium's API in specific languages\n- :fontawesome-solid-plug: __Plugins__ - change or extend Appium's core functionality\n\n
\n\nTherefore, in order to start automating something with Appium, you need to:\n\n- Install Appium itself\n- Install a driver for your target platform\n- Install a client library for your target programming language\n- (Optional) install one or more plugins\n\nThese are the basics! If you are ready to jump in, proceed with the [Quickstart](../quickstart/index.md)!\n\nIf you wish to learn more details about how it all works, see these pages for background material:\n\n- [Appium Core](./appium.md)\n- [Appium Drivers](./drivers.md)\n- [Appium Clients](./clients.md)\n\nFinally, to learn about the origins of Appium, check out the [Appium Project History](./history.md).\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/quickstart/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Getting Started\n---\n\nLet's get up and running with Appium! To successfully use this quickstart, it's recommended that\nyou first have read the [Introduction](../intro/index.md), so that you understand the concepts involved in\nrunning Appium and writing Appium scripts.\n\nThe basic plan for this quickstart is as follows:\n\n1. Install Appium\n1. Install an Appium driver and its dependencies\n - This guide provides instructions for the [UiAutomator2 driver](https://github.com/appium/appium-uiautomator2-driver)\n1. Install an Appium client library in your language of choice\n - This guide contains options for JavaScript, Python, Java, Ruby, and .NET\n1. Write and run a simple Appium automation script using a sample application\n\n### Requirements\n\nBefore getting started, make sure your system satisfies the\n[requirements](../quickstart/requirements.md) for running the Appium server. Additional requirements\nwill be discussed in conjunction with installing the UiAutomator2 driver. The guide also assumes\nyou have basic command line proficiency on your platform, for example being able to run commands, set\nand persist environment variables, etc...\n\nNow you're ready to get started! So head on over to [Installing Appium](./install.md).\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/quickstart/install.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Install Appium\n---\n\n!!! info\n\n Before installing, make sure to check the [System Requirements](./requirements.md).\n\nAppium can be installed globally using `npm`:\n\n```bash\nnpm install -g appium\n```\n\n!!! note\n\n Other package managers are not currently supported.\n\n## Starting Appium\n\nAppium can be started [using the command line](../reference/cli/index.md):\n\n```\nappium\n```\n\nThis launches the Appium server process, which loads all the installed Appium drivers, and\nbegins waiting for new session requests from client connections (such as test automation scripts).\nSince the server process is independent from its clients, it must be explicitly launched before\nattempting to start a new session.\n\nWhen the server is launched, the console log will list all the valid URLs that clients can use to\nconnect to this server:\n\n```\n[Appium] You can provide the following URLs in your client code to connect to this server:\n[Appium] \thttp://127.0.0.1:4723/ (only accessible from the same host)\n(... any other URLs ...)\n```\n\nOnce a client requests a new session, the Appium server process will start logging all details about\nthis session until its termination. Keep this in mind - if you ever encounter issues with Appium\ntests, you can always check the server log for more details.\n\nSo what's next? Even though Appium is installed and running, it does not come bundled with any\ndrivers, which means it cannot automate anything yet. We will therefore set up automation for\nAndroid - continue to [Installing the UiAutomator2 Driver](./uiauto2-driver.md).\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/quickstart/next-steps.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Next Steps\n---\n\nNow that you've successfully set up your system for Android automation and run a simple test,\nyou'll want to continue exploring this documentation. In particular, these are good guides and\nreference materials especially for beginners:\n\n- The [Ecosystem](../ecosystem/index.md) page: browse the available drivers, clients, plugins, and tools\n- [Managing Appium Drivers and Plugins](../guides/managing-exts.md)\n- [Capabilities](../guides/caps.md)\n- [Settings](../guides/settings.md)\n\nYou'll also find that the [Appium Inspector](https://github.com/appium/appium-inspector) is an\nindispensable tool for writing Appium tests, as it enables visual inspection of apps and\nhelps you to discover element locators for use in your test scripts.\n\nYou might also take advantage of one of the many online Appium courses available to you.\n\nGood luck and have fun!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/quickstart/requirements.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: System Requirements\n---\n\nThe basic requirements for the Appium server are:\n\n* A macOS, Linux, or Windows operating system\n* [Node.js](https://nodejs.org) version in the [SemVer](https://semver.org) range `^20.19.0 || ^22.12.0 || >=24.0.0`\n * LTS is recommended\n* [`npm`](https://npmjs.com) version `>=10` (`npm` is usually bundled with Node.js, but can be upgraded\nindependently)\n\nBy itself, Appium is relatively lightweight and doesn't have significant disk space or RAM\nrequirements. It can even be run in resource-constrained environments like Raspberry Pi, so long as\nNode.js is available.\n\n### Driver Requirements\n\nDrivers for automating specific platforms will likely have other requirements. Refer to the\ndocumentation of the [Appium driver(s)](../ecosystem/drivers.md) for that platform for additional\ndependencies. It is almost universally the case that Appium drivers for a given platform will\nrequire the developer toolchain and SDKs for that platform to be installed.\n\nIn order to assist with driver requirements, each (official) driver comes with the Appium Doctor tool,\nwhich allows to verify if all requirements have been set up. Learn more about how to use this tool in\nthe [Command-Line Usage documentation](../reference/cli/extensions.md#doctor).\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/quickstart/test-dotnet.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Write a Test (.NET)\n---\n\nThe [Appium .NET Client](https://github.com/appium/dotnet-client/) is\nan official Appium client in C#. This driver is an extension of the Selenium C# client. It has all the functionalities of the regular driver, but add Appium-specific methods on top of this. The driver is available on the public NuGet Gallery as [Appium.WebDriver](https://www.nuget.org/packages/Appium.WebDriver/).\n\nNow, we get inside the directory and create a new [NUnit](https://nunit.org/) project. We will also add the references to the Appium.Net driver, and other dependencies.\n\n```bash\ncd dotnet-client\ndotnet new nunit --name appiumtest\n\ncd appiumtest\n\n# This will install the latest 5.x version\ndotnet add package Appium.WebDriver --prerelease\ndotnet add package Newtonsoft.Json --version 13.0.3\n```\n\nOnce this is done, your project should have a placeholder file `UnitTest1.cs`. We will replace the code to include the OpenQA namespaces, an initialization of the driver, and the actual test.\n\n```C# title=\"UnitTest1.cs\"\nusing OpenQA.Selenium;\nusing OpenQA.Selenium.Appium;\nusing OpenQA.Selenium.Appium.Android;\nusing OpenQA.Selenium.Appium.Enums;\n\nnamespace appiumtest;\n\npublic class Tests\n{\n private AndroidDriver _driver;\n\n [OneTimeSetUp]\n public void SetUp()\n {\n var serverUri = new Uri(Environment.GetEnvironmentVariable(\"APPIUM_HOST\") ?? \"http://127.0.0.1:4723/\");\n var driverOptions = new AppiumOptions() {\n AutomationName = AutomationName.AndroidUIAutomator2,\n PlatformName = \"Android\",\n DeviceName = \"Android Emulator\",\n };\n\n driverOptions.AddAdditionalAppiumOption(\"appPackage\", \"com.android.settings\");\n driverOptions.AddAdditionalAppiumOption(\"appActivity\", \".Settings\");\n // NoReset assumes the app com.google.android is preinstalled on the emulator\n driverOptions.AddAdditionalAppiumOption(\"noReset\", true);\n\n _driver = new AndroidDriver(serverUri, driverOptions, TimeSpan.FromSeconds(180));\n _driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);\n }\n\n [OneTimeTearDown]\n public void TearDown()\n {\n _driver.Dispose();\n }\n\n [Test]\n public void TestFindApps()\n {\n _driver.StartActivity(\"com.android.settings\", \".Settings\");\n _driver.FindElement(By.XPath(\"//*[@text='Apps']\")).Click();\n }\n}\n```\n\n!!! note\n\n It's not within the scope of this guide to give a complete run-down on the dotnet client\n library or everything that's happening here, so we'll leave the code itself unexplained in\n detail for now. You may want to read up particularly on Appium\n [Capabilities](../guides/caps.md) in addition to familiarizing yourself with the\n [dotnet client driver documentation](https://github.com/appium/dotnet-client/) for a fuller explanation\n of the various API commands you see and what their purpose is.\n\nBasically, this code is doing the following:\n\n1. Defining a set of \"Capabilities\" (parameters) to send to the Appium server so Appium knows what\nkind of thing you want to automate. Some of these parameters can be overridden using environment variables.\n1. Starting an Appium session on the built-in Android settings app.\n1. Finding the \"Apps\" list item and clicking it.\n1. Ending the Appium session.\n\nThat's it! Let's give it a try. Before you run the test, make sure that you have an Appium server\nrunning in another terminal session, otherwise you'll get an error about not being able to connect\nto one. Then, you can execute the script:\n\n```bash\ndotnet test\n\n# Example output:\n# Starting test execution, please wait...\n# A total of 1 test files matched the specified pattern.\n\n# Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 323 ms - appiumtest.dll (net7.0)\n```\n\nIf all goes well, you'll see the Settings app open up and navigate to the \"Apps\" view in the emulator before the app closes again.\n\nCongratulations, you've started your Appium journey! Read on for some [next steps](./next-steps.md) to explore.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/quickstart/test-java.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Write a Test (Java)\n---\n\nThe Appium team maintains an official [client](https://github.com/appium/java-client) for the Java programming language.\nIt is built on top of [Selenium](https://github.com/SeleniumHQ/selenium).\nYou can also use this client in your Kotlin projects.\n\nFollow the [Add Appium java client to your test framework](https://github.com/appium/java-client#add-appium-java-client-to-your-test-framework)\ntutorial in order to connect the library to your test framework sources.\n\nThe Appium Java client has dedicated classes to support most of the official Appium drivers. For other drivers\nyou could simply use the [AppiumDriver](https://github.com/appium/java-client/blob/master/src/main/java/io/appium/java_client/AppiumDriver.java) class\nor build your custom derivatives from it. Check the [Drivers Support](https://github.com/appium/java-client#drivers-support)\narticle to learn more about the current driver class implementations.\n\nFollow the [Usage Examples](https://github.com/appium/java-client#usage-examples) article in order understand\nhow to invoke Java client features from your test framework.\n\nOnce you've managed to successfully run a test, you can read on for some [next steps](./next-steps.md) to explore.\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/quickstart/test-js.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Write a Test (JS)\n---\n\nTo write an Appium test in JavaScript (Node.js), we need to choose an Appium-compatible client\nlibrary. The best-maintained library and the one the Appium team recommends using is\n[WebdriverIO](https://webdriver.io), so let's use that. Since we already have Appium installed we\nknow our Node and NPM requirements are already satisfied. So just create a new project directory\nsomewhere on your computer and then initialize a new Node.js project in it:\n\n```bash\nnpm init\n```\n\nIt doesn't really matter what you put in the prompts, just so long as you end up with a valid\n`package.json`.\n\n\nNow, install the `webdriverio` package via NPM:\n\n```bash\nnpm i --save-dev webdriverio\n```\n\nOnce this is done, your `package.json` file should include a section like the following:\n\n```json title=\"package.json\"\n--8<-- \"./sample-code/quickstarts/js/package.json\"\n```\n\nNow it's time to type up the test itself. Create a new file called `test.js` with the following\ncontents:\n\n```js title=\"test.js\"\n--8<-- \"./sample-code/quickstarts/js/test.js\"\n```\n\n!!! note\n\n It's not within the scope of this guide to give a complete run-down on the WebdriverIO client\n library or everything that's happening here, so we'll leave the code itself unexplained in\n detail for now. You may want to read up particularly on Appium\n [Capabilities](../guides/caps.md) in addition to familiarizing yourself with the excellent\n [WebdriverIO documentation](https://webdriver.io/docs/gettingstarted) for a fuller explanation\n of the various API commands you see and what their purpose is.\n\n!!! note\n\n The sample code is available from [GitHub Appium repository](https://github.com/appium/appium/tree/master/packages/appium/sample-code/quickstarts/js).\n\n\nBasically, this code is doing the following:\n\n1. Defining a set of \"Capabilities\" (parameters) to send to the Appium server so Appium knows what\nkind of thing you want to automate.\n1. Starting an Appium session on the built-in Android settings app.\n1. Finding the \"Apps\" list item and clicking it.\n1. Pausing for a moment purely for visual effect.\n1. Ending the Appium session.\n\nThat's it! Let's give it a try. Before you run the test, make sure that you have an Appium server\nrunning in another terminal session, otherwise you'll get an error about not being able to connect\nto one. Then, you can execute the script:\n\n```bash\nnode test.js\n```\n\nIf all goes well, you'll see the Settings app open up and navigate to the \"Apps\" view before the\napp closes again.\n\nCongratulations, you've started your Appium journey! Read on for some [next steps](./next-steps.md) to explore.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/quickstart/test-py.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Write a Test (Python)\n---\n\nThe [Appium Python Client](https://github.com/appium/python-client) is\nan official Appium client in Python, which is available via pypi under the [Appium-Python-Client](https://pypi.org/project/Appium-Python-Client/) package name.\nIt inherits from the [Selenium Python Binding](https://pypi.org/project/selenium/),\nso installing the Appium Python Client includes the selenium binding.\n\n```bash\npip install Appium-Python-Client\n```\n\nThis example uses Python's built-in `unittest` module, though you can use any Python test framework you want.\nThe Appium Python client adds the `appium:` vendor prefix automatically.\nYou usually do not need to worry about the prefix.\n\n```python title=\"test.py\"\n--8<-- \"./sample-code/quickstarts/py/test.py\"\n```\n\n!!! note\n\n It's not within the scope of this guide to give a complete run-down on the Python client\n library or everything that's happening here, so we'll leave the code itself unexplained in detail for now.\n\n - You may want to read up particularly on Appium [Capabilities](../guides/caps.md).\n - [functional test code](https://github.com/appium/python-client/tree/master/test/functional) in Python Client GitHub repository should help to find more working example.\n - [Documentation](https://appium.github.io/python-client-sphinx/) also helps to find methods\n defined in the Appium Python Client.\n\n!!! note\n\n The sample code is available from [GitHub Appium repository](https://github.com/appium/appium/tree/master/packages/appium/sample-code/quickstarts/py).\n\n\nBasically, this code is doing the following:\n\n1. Defining a set of \"Capabilities\" (parameters) to send to the Appium server so Appium knows what\nkind of thing you want to automate.\n1. Starting an Appium session on the built-in Android settings app.\n1. Finding the \"Apps\" list item and clicking it.\n1. Pausing for a moment purely for visual effect.\n1. Ending the Appium session.\n\nThat's it! Let's give it a try. Before you run the test, make sure that you have an Appium server\nrunning in another terminal session, otherwise you'll get an error about not being able to connect\nto one. Then, you can execute the script:\n\n```bash\npython test.py\n```\n\nIf all goes well, you'll see the Settings app open up and navigate to the \"Apps\" view before the\napp closes again.\n\nCongratulations, you've started your Appium journey! Read on for some [next steps](./next-steps.md) to explore.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/quickstart/test-rb.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Write a Test (Ruby)\n---\n\n\nThe [AppiumLib](https://github.com/appium/ruby_lib) and the [AppiumLibCore](https://github.com/appium/ruby_lib_core) (**recommended**) are official Appium client libraries in Ruby, which are available via gem under the [appium_lib](https://rubygems.org/gems/appium_lib) and the [appium_lib_core](https://rubygems.org/gems/appium_lib_core) package names. The appium_lib_core inherits from the Selenium Ruby Binding, and the appium_lib inherits from the appium_lib_core, so installing these libraries include the selenium binding. We recommend `appium_lib_core` if you need a less complex client-side solution. The `appium_lib` has some useful methods the core does not have, but for the cost of greater complexity and historical methods which may not work in the latest environment.\n\nAs the first step, let's initialize a Gemfile to manage the dependency:\n\n```bash\nbundle init\n```\n\nThen, you could add Appium Ruby Client dependency as below:\n\n```bash\nbundle add appium_lib_core\n# or\n# bundle add appium_lib\n```\n\nTest code example below uses `test-unit` module, thus please run:\n\n```bash\nbundle add test-unit\n```\n\nOnce these steps has done, your `Gemfile` file should include:\n\n```ruby title=\"Gemfile\"\n--8<-- \"./sample-code/quickstarts/rb/Gemfile\"\n```\n\nThe `appium_lib_core` is the main part as an Appium client.\n`appium_lib` has various helper methods, but the driver instance was ordinary designed to be used as a global variable. It could causes an issue to handle the instance.\n`appium_lib_core` does not have such a global variable.\n\nThis example is by the `appium_lib_core` with `test-unit` gem module.\nTes code in `appium_lib` should be similar.\n\n```ruby title=\"test.rb\"\n--8<-- \"./sample-code/quickstarts/rb/test.rb\"\n```\n\n!!! note\n\n It's not within the scope of this guide to give a complete run-down on the Ruby client\n library or everything that's happening here, so we'll leave the code itself unexplained in detail for now.\n\n - You may want to read up particularly on Appium [Capabilities](../guides/caps.md).\n - [functional test code](https://github.com/appium/ruby_lib_core/tree/master/test/functional) in the appium_lib_core GitHub repository should help to find more working example.\n - Documentation [appium_lib_core](https://www.rubydoc.info/github/appium/ruby_lib_core) and [appium_lib](https://www.rubydoc.info/github/appium/ruby_lib) also helps to find available methods.\n\n!!! note\n\n The sample code is available from [GitHub Appium repository](https://github.com/appium/appium/tree/master/packages/appium/sample-code/quickstarts/rb).\n\n\nBasically, this code is doing the following:\n\n1. Defining a set of \"Capabilities\" (parameters) to send to the Appium server so Appium knows what\nkind of thing you want to automate.\n1. Starting an Appium session on the built-in Android settings app.\n1. Finding the \"Apps\" list item and clicking it.\n1. Pausing for a moment purely for visual effect.\n1. Ending the Appium session.\n\nThat's it! Let's give it a try. Before you run the test, make sure that you have an Appium server\nrunning in another terminal session, otherwise you'll get an error about not being able to connect\nto one. Then, you can execute the script:\n\n```bash\n# Please run \"bundle install\" first if your environment has not run the installation command yet.\nbundle exec ruby test.rb\n```\n\nIf all goes well, you'll see the Settings app open up and navigate to the \"Apps\" view before the\napp closes again.\n\nCongratulations, you've started your Appium journey! Read on for some [next steps](./next-steps.md) to explore.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/quickstart/uiauto2-driver.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Install the UiAutomator2 Driver\n---\n\nYou can't do much with Appium unless you have a [driver](../intro/drivers.md), which is an\ninterface that allows Appium to automate a particular platform.\n\n!!! info\n\n For this quickstart guide, we're going to be automating an app on the Android platform, because\n the system requirements for Android automation via Appium are the same as for Appium itself\n (whereas the iOS driver, for example, requires you to be using macOS).\n\nThe driver we're going to use is called the [UiAutomator2\nDriver](https://github.com/appium/appium-uiautomator2-driver). It's worth visiting that driver's\ndocumentation and bookmarking it, because it will be an invaluable reference down the line.\n\n## Set up Android automation requirements\n\nAccording to the driver, in addition to a working Appium server, we also need to set up the following:\n\n### Android SDK\n\n- The easiest way to set up the Android SDK requirements is by downloading [Android Studio](https://developer.android.com/studio).\nWe need to use its SDK manager (_Settings -> Languages & Frameworks -> Android SDK_)\nto download the following items:\n - Android SDK Platform (select whichever Android platform we want to automate, for example, API level 30)\n - Android SDK Platform-Tools\n- If you wish, you can also download these items without Android Studio:\n - Android SDK Platform can be downloaded using `sdkmanager` included in [Android command-line tools](https://developer.android.com/studio#command-line-tools-only)\n - [Android SDK Platform-Tools](https://developer.android.com/tools/releases/platform-tools)\n- Set up the `ANDROID_HOME` environment variable to point to the directory where the Android SDK is\ninstalled. You can usually find the path to this directory in the Android Studio SDK manager. It\nwill contain the `platform-tools` and other directories.\n\n### Java JDK\n\n- Install the Java JDK (for the most recent Android API levels, JDK 9 is required, otherwise JDK\n8 is required). You can download this from [Oracle](https://jdk.java.net/) or [Adoptium](https://adoptium.net/en-GB/temurin/releases/).\nMake sure you get the JDK and not the JRE.\n- Set up the `JAVA_HOME` environment variable to point to the JDK home directory. It will contain\nthe `bin`, `include`, and other directories.\n\n### Prepare the Device\n\n- If using an emulator, use Android Studio to create and launch an Android Virtual Device (AVD).\nYou may need to download the system images for the API level of the emulator you want to\ncreate. Using the AVD creation wizard in Android Studio is generally the easiest way to do all of\nthis.\n- If using a real device, you should [set it up for development and enable USB Debugging](https://developer.android.com/studio/debug/dev-options).\n- With the emulator or device connected, you can run `adb devices` (via the binary located at\n`$ANDROID_HOME/platform-tools/adb`) to verify that your device shows up as connected.\n\nOnce your device shows up as connected in `adb`, and you've verified that the environment variables\nare set up correctly, you should be good to go! If you ran into problems with any of these steps,\nrefer to the driver documentation, or the various Android or Java documentation sites as necessary.\n\nAlso, congratulations: whether or not you intended to, you now have the Android developer toolchain\nset up on your system, so you can get busy making Android apps if you want!\n\n## Install the driver itself\n\n### Standard Install\n\nLike all Appium drivers, the UiAutomator2 driver is installed via the [Appium Extension CLI](../reference/cli/extensions.md).\nSince UiAutomator2 is maintained by the core Appium team, it has an 'official' driver name\n(`uiautomator2`), which makes the installation simpler.\n\nBefore installing, make sure your Appium server is _not_ running (if it is, quit it with _Ctrl-C_).\nThen run the following command:\n\n```bash\nappium driver install uiautomator2\n```\n\nIt should produce output that looks something like:\n\n```\nAttempting to find and install driver 'uiautomator2'\n\u2714 Installing 'uiautomator2' using NPM install spec 'appium-uiautomator2-driver'\nDriver uiautomator2@2.0.5 successfully installed\n- automationName: UiAutomator2\n- platformNames: [\"Android\"]\n```\n\nNote how the installation process specifies what platforms is the driver valid for (in this case,\n`Android`), and what automation name (the `appium:automationName` [capability](../guides/caps.md))\nmust be used to select this driver for use during an Appium session (in this case, `UiAutomator2`).\n\n!!! note\n\n In this quickstart we have used the [Extension CLI](../reference/cli/extensions.md) to install the\n UiAutomator2 driver, but if you are incorporating Appium into a Node.js project, you might\n prefer to use `npm` to manage Appium and its connected drivers. To learn more about this\n technique, visit the guide on [managing Appium extensions](../guides/managing-exts.md).\n\n### Batch Install\n\nYou may want to use Appium with more than one driver. One way to accomplish this is to run\n`appium driver install ` for each individual driver, but you can also install multiple\ndrivers in one go:\n\n```\nappium setup\n```\n\nRunning this will install Appium's mobile-specific drivers: UiAutomator2, [XCUITest](https://appium.github.io/appium-xcuitest-driver/)\n(only if running macOS), and [Espresso](https://github.com/appium/appium-espresso-driver).\n\nYou can also use this command to batch install drivers for desktop applications or desktop browsers.\nFor more details on this, refer to the [Setup command documentation](../reference/cli/setup.md).\n\n### Validating the Install\n\nThe UiAutomator2 driver, like all official Appium drivers, comes with the Appium Doctor tool, which\nallows validating whether all prerequisites have been set up correctly:\n\n```\nappium driver doctor uiautomator2\n```\n\nThis guide has focused on essential requirements, so Appium Doctor may suggest one or more optional\nfixes. But if you see `0 required fixes needed`, that means everything is set up!\n\nNow, start the Appium server again (run `appium`), and you should see that the newly-installed\ndriver is listed as available:\n\n```\n[Appium] Available drivers:\n[Appium] - uiautomator2@2.0.5 (automationName 'UiAutomator2')\n```\n\nWith the Android setup complete and the UiAutomator2 driver installed, you're ready to write your\nfirst test! Now select your preferred language and give it a shot:\n\n
\n\n- :material-language-javascript: [__JavaScript__](./test-js.md)\n- :material-language-java: [__Java__](./test-java.md)\n- :material-language-python: [__Python__](./test-py.md)\n- :material-language-ruby: [__Ruby__](./test-rb.md)\n- :material-dot-net: [__.NET C#__](./test-dotnet.md)\n\n
\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/reference/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Reference\n---\n\nThis section of the Appium documentation provides a reference to the two main interfaces within the\nAppium server: the command-line executable, and the supported API endpoints.\n\n
\n\n- :octicons-command-palette-16: [__Command Line Interface__](./cli/index.md)\n\n ---\n\n Learn how to use the Appium command-line executable\n\n- :material-cloud-braces: [__API Endpoints__](./api/index.md)\n\n ---\n\n View endpoints supported by the Appium server\n\n
\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/reference/api/appium.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Protocol\n---\n\n\nThe following is a list of endpoints supported in Appium, that are defined in the Appium extension\nof the W3C WebDriver protocol.\n\n### getAppiumSessions\n\n```\nGET /appium/sessions\n```\n\nRetrieves information about all active server sessions.\n\n!!! info\n\n The `session_discovery` [insecure feature](../../guides/security.md) must be enabled to use this endpoint.\n\n#### Response\n\n`TimestampedMultiSessionData[]` - an array of session data objects. Each object has the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`capabilities`|Session capabilities|object|\n|`created`|Session creation time (in milliseconds) as a Unix timestamp|number|\n|`id`|Session ID|string|\n\n### getAppiumSessionCapabilities\n\n```\nGET /session/:sessionId/appium/capabilities\n```\n\nRetrieves the [session capabilities](../../guides/caps.md).\n\n#### Response\n\n`SessionCapabilities` - an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`capabilities`|Session capabilities|object|\n\n### getSettings\n\n```\nGET /session/:sessionId/appium/settings\n```\n\nRetrieves the [current session settings](../../guides/settings.md).\n\n#### Response\n\n`Settings` - an object containing setting names and their values\n\n### updateSettings\n\n```\nPOST /session/:sessionId/appium/settings\n```\n\nUpdates the specified session settings. Any other previously set settings will remain unchanged.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`settings`|Object containing the names and values of the settings to be updated|object|\n\n#### Response\n\n`null`\n\n### listCommands\n\n```\nGET /session/:sessionId/appium/commands\n```\n\nRetrieves the URL endpoints and WebDriver BiDi commands supported in the current session.\n\n#### Response\n\n`ListCommandsResponse` - an object containing all supported endpoints and BiDi commands, grouped by\ntheir origin (base Appium, driver-specific, or plugin-specific). Refer to [the type definition file](https://github.com/appium/appium/blob/master/packages/types/lib/command.ts)\nfor a detailed structure of this object.\n\n### listExtensions\n\n```\nGET /session/:sessionId/appium/extensions\n```\n\nRetrieves the [execute methods](../../guides/execute-methods.md) supported in the current session.\n\n#### Response\n\n`ListExtensionsResponse` - an object containing all supported execute methods, grouped by their\norigin (driver-specific or plugin-specific). Refer to [the type definition file](https://github.com/appium/appium/blob/master/packages/types/lib/command.ts)\nfor a detailed structure of this object.\n\n### getLogEvents\n\n```\nPOST /session/:sessionId/appium/events\n```\n\nRetrieves events that have occurred in the current session. By default, only driver command\nexecutions are recorded in the log, but drivers or plugins may define additional event types.\nClients can log events by using the [`logCustomEvent`](#logcustomevent) endpoint.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`type?`|One or more types to filter the returned events|string or array|\n\n#### Response\n\n`EventHistory` - an object whose keys correspond to the types of logged events. Event types can be\ngrouped into three categories, as shown by the following example response:\n\n```json\n{\n \"commands\": [\n { \"cmd\": \"getStatus\", \"startTime\": 1756887645447, \"endTime\": 1756887645454 }\n ],\n \"driverevent\": [1756887645454],\n \"namespace:event\": [1756887645454]\n}\n```\n\n* The `commands` key is always included in the endpoint response. Its value is an array of objects,\n where each object includes 3 parameters:\n * `cmd`: name of the executed command\n * `startTime`: the command execution start time (in milliseconds), as a Unix timestamp\n * `endTime`: the command execution end time (in milliseconds), as a Unix timestamp\n* Other non-namespaced keys are specific to driver/plugin implementations. Their value is an array\n of event times (in milliseconds), as Unix timestamps.\n* Namespaced keys can be added using the `logCustomEvent` endpoint, but may also be provided by\n drivers/plugins. Their value is an array of event times (in milliseconds), as Unix timestamps.\n\n### logCustomEvent\n\n```\nPOST /session/:sessionId/appium/log_event\n```\n\nLogs a custom event, which can be retrieved using the [`getLogEvents`](#getlogevents) endpoint.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`vendor`|Name of the namespace (vendor) used to prefix the event|string|\n|`event`|Name of the event|string|\n\n#### Response\n\n`null`\n\n### getDeviceTime\n\n```\nPOST /session/:sessionId/appium/device/system_time\n```\n\nRetrieves the current system time of the device under test.\n\n#### Parameters\n\n|Name|Description|Type|Default|\n|--|--|--|--|\n|`format?`|Format to use for the returned timestamp|string|`YYYY-MM-DDTHH:mm:ssZ`|\n\n#### Response\n\n`string` - the device time\n\n### activateApp\n\n```\nPOST /session/:sessionId/appium/device/activate_app\n```\n\nActivates an app on the device under test.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`appId` or `bundleId`|App identifier such as Android app package or iOS bundle ID|string|\n|`options?`|Driver-specific launch options|unknown|\n\n#### Response\n\n`void`\n\n### terminateApp\n\n```\nPOST /session/:sessionId/appium/device/terminate_app\n```\n\nTerminates an app on the device under test.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`appId` or `bundleId`|App identifier such as Android app package or iOS bundle ID|string|\n|`options?`|Driver-specific termination options|unknown|\n\n#### Response\n\n`void`\n\n### queryAppState\n\n```\nPOST /session/:sessionId/appium/device/app_state\n```\n\nRetrieves the state of an app on the device under test.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`appId` or `bundleId`|App identifier such as Android app package or iOS bundle ID|string|\n\n#### Response\n\n`number` - an integer value indicating the app state:\n\n|Number|App State|\n|--|--|\n|`0`|Not installed|\n|`1`|Not running|\n|`2`|Running in background suspended|\n|`3`|Running in background|\n|`4`|Running in foreground|\n\n### installApp\n\n```\nPOST /session/:sessionId/appium/device/install_app\n```\n\nInstalls an app on the device under test.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`appPath`|Absolute local filepath or URL to an app file|string|\n|`options?`|Driver-specific install options|unknown|\n\n#### Response\n\n`void`\n\n### removeApp\n\n```\nPOST /session/:sessionId/appium/device/remove_app\n```\n\nUninstalls an app from the device under test.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`appId` or `bundleId`|App identifier such as Android app package or iOS bundle ID|string|\n|`options?`|Driver-specific uninstall options|unknown|\n\n#### Response\n\n`boolean` - `true` if uninstall was successful, otherwise `false`\n\n### isAppInstalled\n\n```\nPOST /session/:sessionId/appium/device/app_installed\n```\n\nDetermines if an app is installed on the device under test.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`appId` or `bundleId`|App identifier such as Android app package or iOS bundle ID|string|\n\n#### Response\n\n`boolean` - `true` if app is installed, otherwise `false`\n\n### hideKeyboard\n\n```\nPOST /session/:sessionId/appium/device/hide_keyboard\n```\n\nAttempts to hide the virtual keyboard on the device under test.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`key?`|Text of a key to use to hide the keyboard|string|\n|`keyCode?`|Key code to trigger to hide the keyboard|string|\n|`keyName?`|Name of a key to use to hide the keyboard|string|\n|`strategy?`|Driver-specific name of a hiding strategy to follow|string|\n\n#### Response\n\n`boolean` - `true` if the operation was successful, otherwise `false`. Note that some platforms\nmay never return a `false` value.\n\n### isKeyboardShown\n\n```\nGET /session/:sessionId/appium/device/is_keyboard_shown\n```\n\nDetermines if the virtual keyboard is shown on the device under test.\n\n#### Response\n\n`boolean` - `true` if the keyboard is shown, otherwise `false`\n\n### pushFile\n\n```\nPOST /session/:sessionId/appium/device/push_file\n```\n\nPushes data to a file on the device under test.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`data`|Base64-encoded data to be written to the file|string|\n|`path`|Remote path on the device to create the file at|string|\n\n#### Response\n\n`void`\n\n### pullFile\n\n```\nPOST /session/:sessionId/appium/device/pull_file\n```\n\nRetrieves data from a file on the device under test.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`path`|Remote path of the file on the device|string|\n\n#### Response\n\n`string` - the Base64-encoded contents of the file\n\n### pullFolder\n\n```\nPOST /session/:sessionId/appium/device/pull_folder\n```\n\nRetrieves data from a directory on the device under test.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`path`|Remote path of the directory on the device|string|\n\n#### Response\n\n`string` - the Base64-encoded zip file of the directory contents\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/reference/api/bidi.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: WebDriver BiDi Protocol\n---\n\n\nThe following is a list of [W3C WebDriver BiDi protocol](https://w3c.github.io/webdriver-bidi/)\ncommands supported in Appium.\n\nUnlike other protocols that specify URL endpoints, the WebDriver BiDi protocol specifies commands\nsent as a websocket event, that both drivers and clients can emit or listen to.\n\n### bidiStatus\n\n```\nsession.status\n```\n\n> WebDriver BiDi documentation: [session.status](https://w3c.github.io/webdriver-bidi/#command-session-status)\n\nRetrieves the current status of the Appium server.\n\n#### Response\n\n[`GetStatusResult`](./webdriver.md#response_2)\n\n### bidiSubscribe\n\n```\nsession.subscribe\n```\n\n> WebDriver BiDi documentation: [session.subscribe](https://w3c.github.io/webdriver-bidi/#command-session-subscribe)\n\nSubscribes to one or more BiDi events.\n\n#### Parameters\n\n|Name|Description|Type|Default|\n|--|--|--|--|\n|`contexts?`|Contexts in which to subscribe to the specified events. By default, the global context scope is applied.|string[]|`['']`|\n|`events`|Names of events to subscribe to|string[]||\n\n#### Response\n\n`null`\n\n### bidiUnsubscribe\n\n```\nsession.unsubscribe\n```\n\n> WebDriver BiDi documentation: [session.unsubscribe](https://w3c.github.io/webdriver-bidi/#command-session-unsubscribe)\n\nUnsubscribes from one or more BiDi events.\n\n#### Parameters\n\n|Name|Description|Type|Default|\n|--|--|--|--|\n|`contexts?`|Contexts in which to unsubscribe from the specified events. By default, the global scope is applied.|string[]|`['']`|\n|`events`|Names of events to unsubscribe from|string[]||\n\n#### Response\n\n`null`\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/reference/api/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: API Endpoints\n---\n\nHere you can find various API endpoints exposed by the main Appium module through its base driver,\nas well as the endpoints added or modified by official plugins.\n\nSince all Appium drivers inherit the Appium base driver, they support all of its endpoints as well,\nbut may additionally define endpoints of their own. Refer to the documentation of your\n[Appium driver](../../ecosystem/drivers.md) to learn about its specific endpoints.\n\nThe recommended way of calling these API endpoints is through your [Appium client](../../ecosystem/clients.md).\nRefer to the documentation of your client for the exact commands used to invoke specific endpoints.\n\nAll endpoints are grouped by their protocol, with an additional group for plugin endpoints:\n\n
\n\n- [__WebDriver Protocol__](./webdriver.md)\n- [__WebDriver BiDi Protocol__](./bidi.md)\n- [__JSON Wire Protocol__](./jsonwp.md)\n- [__Mobile JSON Wire Protocol__](./mjsonwp.md)\n- [__Appium Protocol__](./appium.md)\n- [__Other Protocols__](./others.md)\n- [__Endpoints Used by Official Plugins__](./plugins.md)\n\n
\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/reference/api/jsonwp.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: JSON Wire Protocol\n---\n\n\nThe following is a list of legacy [JSON Wire Protocol (JSONWP)](https://www.selenium.dev/documentation/legacy/json_wire_protocol/)\nendpoints supported in Appium.\n\n### getSession\n\n```\nGET /session/:sessionId\n```\n\n> JSONWP documentation: [/session/:sessionId](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionid)\n\nRetrieves the capabilities of the current session.\n\nAppium implements a modified version of this endpoint. If the `appium:eventTimings` capability is\nset to `true`, the returned result will additionally include the `events` key, whose value contains\nthe event history and timings.\n\n!!! warning \"Deprecated\"\n\n For retrieving capabilities, please use [`getAppiumSessionCapabilities`](./appium.md#getappiumsessioncapabilities).
\n For retrieving event history, please use [`getLogEvents`](./appium.md#getlogevents).\n\n#### Response\n\n`Capabilities` - an object containing the session capabilities, and the event history (if applicable)\n\n### availableIMEEngines\n\n```\nGET /session/:sessionId/ime/available_engines\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/available_engines](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimeavailable_engines)\n\nRetrieves all IME (input method editor) engines available on the device under test.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the [UiAutomator2 and Espresso drivers](../../ecosystem/drivers.md)\n\n#### Response\n\n`string[]` - a list of available IME engines\n\n### getActiveIMEEngine\n\n```\nGET /session/:sessionId/ime/active_engine\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/active_engine](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimeactive_engine)\n\nRetrieves the name of the active IME engine.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers\n\n#### Response\n\n`string` - the name of the active IME engine\n\n### isIMEActivated\n\n```\nGET /session/:sessionId/ime/activated\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/activated](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimeactivated)\n\nDetermines if IME input is available and active.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers\n\n#### Response\n\n`boolean` - `true` if IME is active, otherwise `false`\n\n### deactivateIMEEngine\n\n```\nPOST /session/:sessionId/ime/deactivate\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/deactivate](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimedeactivate)\n\nDeactivates the currently active IME engine.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers\n\n#### Response\n\n`null`\n\n### activateIMEEngine\n\n```\nPOST /session/:sessionId/ime/activate\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/activate](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimeactivate)\n\nActivates an IME engine.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`engine`|Name of the IME engine to activate|string|\n\n#### Response\n\n`null`\n\n### getOrientation\n\n```\nGET /session/:sessionId/orientation\n```\n\n> JSONWP documentation: [/session/:sessionId/orientation](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidorientation)\n\nRetrieves the current orientation of the device under test.\n\n#### Response\n\n`string` - either `PORTRAIT` or `LANDSCAPE`\n\n### setOrientation\n\n```\nPOST /session/:sessionId/orientation\n```\n\n> JSONWP documentation: [/session/:sessionId/orientation](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidorientation)\n\nSets the orientation of the device under test.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`orientation`|New device orientation. Supported values are `PORTRAIT` or `LANDSCAPE`.|string|\n\n#### Response\n\n`null`\n\n### getGeoLocation\n\n```\nGET /session/:sessionId/location\n```\n\n> JSONWP documentation: [/session/:sessionId/location](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidlocation)\n\nRetrieves the current location of the device under test.\n\n!!! warning \"Deprecated\"\n\n Please use driver-specific extension methods such as `mobile: getGeoLocation` or\n `mobile: getSimulatedLocation`\n\n#### Response\n\n`Location` - an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`altitude`|Altitude of the device location|number|\n|`latitude`|Latitude of the device location|number|\n|`longitude`|Longitude of the device location|number|\n\n### setGeoLocation\n\n```\nPOST /session/:sessionId/location\n```\n\n> JSONWP documentation: [/session/:sessionId/location](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidlocation)\n\nSets the current location of the device under test.\n\n!!! warning \"Deprecated\"\n\n Please use driver-specific extension methods such as `mobile: setGeoLocation` or\n `mobile: setSimulatedLocation`\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`location`|New device latitude, longitude and altitude|[`Location`](#response_6)|\n\n#### Response\n\n`null`\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/reference/api/mjsonwp.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Mobile JSON Wire Protocol\n---\n\n\nThe following is a list of legacy [Mobile JSON Wire Protocol (MJSONWP)](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md)\nendpoints supported in Appium.\n\n### getRotation\n\n```\nGET /session/:sessionId/rotation\n```\n\n> MJSONWP documentation: [Device Rotation](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-rotation)\n\nRetrieves the current spatial orientation of the device under test.\n\n#### Response\n\n`Rotation` - an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`x`|Degrees by which the device is rotated on its X axis|number|\n|`y`|Degrees by which the device is rotated on its Y axis|number|\n|`z`|Degrees by which the device is rotated on its Z axis|number|\n\n### setRotation\n\n```\nPOST /session/:sessionId/rotation\n```\n\n> MJSONWP documentation: [Device Rotation](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-rotation)\n\nSets the spatial orientation of the device under test.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`x`|Degrees by which the device is rotated on its X axis|number|\n|`y`|Degrees by which the device is rotated on its Y axis|number|\n|`z`|Degrees by which the device is rotated on its Z axis|number|\n\n#### Response\n\n`null`\n\n### getCurrentContext\n\n```\nGET /session/:sessionId/context\n```\n\n> MJSONWP documentation: [Webviews and Other Contexts](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts)\n\nRetrieves the active application context.\n\n#### Response\n\n`string` - the name of the active context\n\n### setContext\n\n```\nPOST /session/:sessionId/context\n```\n\n> MJSONWP documentation: [Webviews and Other Contexts](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts)\n\nSets an application context as the active context.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`name`|Name of the context to set as the active one|string|\n\n#### Response\n\n`null`\n\n### getContexts\n\n```\nGET /session/:sessionId/contexts\n```\n\n> MJSONWP documentation: [Webviews and Other Contexts](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts)\n\nRetrieves all available application contexts.\n\n#### Response\n\n`string[]` - the names of available contexts\n\n### getNetworkConnection\n\n```\nGET /session/:sessionId/network_connection\n```\n\n> MJSONWP documentation: [Device Modes](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes)\n\nRetrieves the current state of network types (data, Wi-Fi, airplane mode).\n\n!!! warning \"Deprecated\"\n\n Please use driver-specific extension methods such as `mobile: getConnectivity`\n\n#### Response\n\n`NetworkConnectionState` - a number indicating the current network state:\n\n|Value|Data|Wi-Fi|Airplane Mode|\n|--|--|--|--|\n|`0`|OFF|OFF|OFF|\n|`1`|OFF|OFF|ON|\n|`2`|OFF|ON|OFF|\n|`4`|ON|OFF|OFF|\n|`6`|ON|ON|OFF|\n\n### setNetworkConnection\n\n```\nPOST /session/:sessionId/network_connection\n```\n\n> MJSONWP documentation: [Device Modes](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes)\n\nSets the state of network types (data, Wi-Fi, airplane mode).\n\n!!! warning \"Deprecated\"\n\n Please use driver-specific extension methods such as `mobile: setConnectivity`\n\n#### Parameters\n\n|
Name
|Description|
Type
|\n|--|--|--|\n|`parameters`|Object containing the `type` key, whose value is the desired network state|`{\"type\": `[`NetworkConnectionState`](#response_5)`}`|\n\n#### Response\n\n[`NetworkConnectionState`](#response_5) - the new network state\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/reference/api/others.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Other Protocols\n---\n\n\nThe following is a list of endpoints supported in Appium that are defined in other protocols.\n\n## Chromedriver Protocol\n\nThe Chromedriver protocol is an extension of the W3C WebDriver protocol, supported in Appium\nclients using Chromedriver. It specifies both its own extension commands, as well as\nvendor-agnostic commands.\n\n!!! warning\n\n Endpoints specified by this protocol are not officially documented.\n\n### executeCdp\n\n```\nPOST /session/:sessionId/:vendor/cdp/execute\n```\n\nExecutes a Chrome DevTools Protocol (CDP) method, using the implementation of the vendor identified\nby `:vendor`. Refer to [the CDP documentation](https://chromedevtools.github.io/devtools-protocol/)\nfor a list of available methods and their parameters.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`cmd`|Name of the CDP method to execute|string|\n|`params`|Parameters passed to the CDP method|object|\n\n#### Response\n\n`any` - the result of executing the CDP method\n\n## Compute Pressure Protocol\n\nThe [Compute Pressure protocol](https://www.w3.org/TR/compute-pressure/) is an extension of the W3C\nWebDriver protocol.\n\n### createVirtualPressureSource\n\n```\nPOST /session/:sessionId/pressuresource\n```\n\n> Compute Pressure documentation: [Create Virtual Pressure Source](https://www.w3.org/TR/compute-pressure/#create-virtual-pressure-source)\n\nCreates a new virtual pressure source.\n\n#### Parameters\n\n|
Name
|Description|Type|Default|\n|--|--|--|--|\n|`type`|Type of pressure source to create|string||\n|`supported?`|Whether the pressure source should be configured as supported|boolean|`true`|\n\n#### Response\n\n`null`\n\n### updateVirtualPressureSource\n\n```\nPOST /session/:sessionId/pressuresource/:pressureSourceType\n```\n\n> Compute Pressure documentation: [Update Virtual Pressure Source](https://www.w3.org/TR/compute-pressure/#update-virtual-pressure-source)\n\nUpdates the state of a virtual pressure source with the type identified by `:pressureSourceType`.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`sample`|Pressure state. Supported values are `nominal`, `fair`, `serious`, or `critical`.|string|\n\n#### Response\n\n`null`\n\n### deleteVirtualPressureSource\n\n```\nDELETE /session/:sessionId/pressuresource/:pressureSourceType\n```\n\n> Compute Pressure documentation: [Delete Virtual Pressure Source](https://www.w3.org/TR/compute-pressure/#delete-virtual-pressure-source)\n\nDeletes the virtual pressure source with the type identified by `:pressureSourceType`.\n\n#### Response\n\n`null`\n\n## Custom Handlers Protocol\n\nThe [Custom Handlers protocol](https://html.spec.whatwg.org/multipage/system-state.html#user-agent-automation)\nis an extension of the W3C WebDriver protocol, defined by the HTML Standard specification.\n\n### setRPHRegistrationMode\n\n```\nPOST /session/:sessionId/custom-handlers/set-mode\n```\n\n> Custom Handlers documentation: [Set RPH Registration Mode](https://html.spec.whatwg.org/multipage/system-state.html#user-agent-automation)\n\nSets the protocol handler automation mode, for processing registrations of custom protocol handlers.\nBy default, this mode is set to `none`.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`mode`|Automation mode to set. Supported values are `autoAccept`, `autoReject`, or `none`.|string|\n\n#### Response\n\n`null`\n\n## Device Posture Protocol\n\nThe [Device Posture protocol](https://www.w3.org/TR/device-posture/) is an extension of the W3C\nWebDriver protocol.\n\n### setDevicePosture\n\n```\nPOST /session/:sessionId/deviceposture\n```\n\n> Device Posture documentation: [Set Device Posture](https://www.w3.org/TR/device-posture/#set-device-posture)\n\nSets the device posture, overriding the posture set by the device hardware.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`posture`|Posture to which the device should be set. Supported values are `continuous` or `folded`.|string|\n\n#### Response\n\n`null`\n\n### clearDevicePosture\n\n```\nDELETE /session/:sessionId/deviceposture\n```\n\n> Device Posture documentation: [Clear Device Posture](https://www.w3.org/TR/device-posture/#clear-device-posture)\n\nClears the previously set device posture, returning posture control back to the device hardware.\n\n#### Response\n\n`null`\n\n## Federated Credential Management Protocol\n\nThe [Federated Credential Management protocol](https://www.w3.org/TR/fedcm-1) (FedCM) is an\nextension of the W3C WebDriver protocol. Clients can enable this protocol by using the\n[`fedcm:accounts`](https://www.w3.org/TR/fedcm-1/#webdriver-capability) capability.\n\n### fedCMCancelDialog\n\n```\nPOST /session/:sessionId/fedcm/canceldialog\n```\n\n> FedCM documentation: [Cancel Dialog](https://www.w3.org/TR/fedcm-1/#webdriver-canceldialog)\n\nCancels the currently open FedCM dialog.\n\n#### Response\n\n`null`\n\n### fedCMSelectAccount\n\n```\nPOST /session/:sessionId/fedcm/selectaccount\n```\n\n> FedCM documentation: [Select Account](https://www.w3.org/TR/fedcm-1/#webdriver-selectaccount)\n\nSelects an account to use for the currently open FedCM dialog.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`accountIndex`|Index of the account in the list of available accounts|number|\n\n#### Response\n\n`null`\n\n### fedCMClickDialogButton\n\n```\nPOST /session/:sessionId/fedcm/clickdialogbutton\n```\n\n> FedCM documentation: [Click Dialog Button](https://www.w3.org/TR/fedcm-1/#webdriver-clickdialogbutton)\n\nClicks a button in the currently open FedCM dialog.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`dialogButton`|Identifier of the button to click. Must be set to `ConfirmIdpLoginContinue`.|string|\n\n#### Response\n\n`null`\n\n### fedCMGetAccounts\n\n```\nGET /session/:sessionId/fedcm/accountlist\n```\n\n> FedCM documentation: [Account List](https://www.w3.org/TR/fedcm-1/#webdriver-accountlist)\n\nRetrieves all accounts that the user can select in the currently open FedCM dialog.\n\n#### Response\n\n`FedCMAccount[]` - an array of objects, where each object includes the following properties:\n\n|
Name
|Description|Type|\n|--|--|--|\n|`accountId`|Account ID|string|\n|`email`|Account email|string|\n|`name`|Account name|string|\n|`givenName?`|Account given name|string|\n|`pictureUrl?`|Account picture URL|string|\n|`idpConfigUrl`|URL of the identity provider configuration file|string|\n|`loginState`|Login state. Set to `SignUp` if the account is not connected, otherwise `SignIn`.|string|\n|`termsOfServiceUrl?`|Terms of Service URL of the website, if `loginState` is set to `SignUp`|string|\n|`privacyPolicyUrl?`|Privacy Policy URL of the website, if `loginState` is set to `SignUp`|string|\n\n### fedCMGetTitle\n\n```\nGET /session/:sessionId/fedcm/gettitle\n```\n\n> FedCM documentation: [Get Title](https://www.w3.org/TR/fedcm-1/#webdriver-gettitle)\n\nRetrieves the title and subtitle (if one exists) of the currently open FedCM dialog.\n\n#### Response\n\n`FedCMDialogTitle` - an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`title`|Dialog title|string|\n|`subtitle?`|Dialog subtitle|string|\n\n### fedCMGetDialogType\n\n```\nGET /session/:sessionId/fedcm/getdialogtype\n```\n\n> FedCM documentation: [Get Dialog Type](https://www.w3.org/TR/fedcm-1/#webdriver-getdialogtype)\n\nRetrieves the type of the currently open FedCM dialog.\n\n#### Response\n\n`string` - can be set to `AutoReauthn`, `AccountChooser`, or `ConfirmIdpLogin`\n\n### fedCMSetDelayEnabled\n\n```\nPOST /session/:sessionId/fedcm/setdelayenabled\n```\n\n> FedCM documentation: [Set Delay Enabled](https://www.w3.org/TR/fedcm-1/#webdriver-setdelayenabled)\n\nSets the state of the promise rejection delay, which is used to prevent information leakage about\nthe logged in state of the user.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`enabled`|Whether to enable the promise rejection delay|boolean|\n\n#### Response\n\n`null`\n\n### fedCMResetCooldown\n\n```\nPOST /session/:sessionId/fedcm/resetcooldown\n```\n\n> FedCM documentation: [Reset Cooldown](https://www.w3.org/TR/fedcm-1/#webdriver-resetcooldown)\n\nResets the cooldown delay used after dismissing a FedCM dialog.\n\n#### Response\n\n`null`\n\n## Generic Sensor Protocol\n\nThe [Generic Sensor protocol](https://www.w3.org/TR/generic-sensor/) is an extension of the W3C\nWebDriver protocol.\n\n### createVirtualSensor\n\n```\nPOST /session/:sessionId/sensor\n```\n\n> Generic Sensor documentation: [Create Virtual Sensor](https://www.w3.org/TR/generic-sensor/#create-virtual-sensor-command)\n\nCreates a new virtual sensor.\n\n#### Parameters\n\n|
Name
|Description|Type|Default|\n|--|--|--|--|\n|`type`|Type of sensor to create|string||\n|`connected?`|Whether the sensor should be configured as connected|boolean|`true`|\n|`maxSamplingFrequency?`|Maximum sensor sampling frequency|number||\n|`minSamplingFrequency?`|Minimum sensor sampling frequency|number||\n\n#### Response\n\n`null`\n\n### getVirtualSensorInfo\n\n```\nGET /session/:sessionId/sensor/:sensorType\n```\n\n> Generic Sensor documentation: [Get Virtual Sensor Information](https://www.w3.org/TR/generic-sensor/#get-virtual-sensor-information-command)\n\nRetrieves information about the virtual sensor with the type identified by `:sensorType`.\n\n#### Response\n\n`GetVirtualSensorInfoResponse` - an object containing the `requestedSamplingFrequency` key, whose\nvalue is the requested sampling frequency of the sensor type\n\n### updateVirtualSensorReading\n\n```\nPOST /session/:sessionId/sensor/:sensorType\n```\n\n> Generic Sensor documentation: [Update Virtual Sensor Reading](https://www.w3.org/TR/generic-sensor/#update-virtual-sensor-reading-command)\n\nUpdates the virtual sensor with the type identified by `:sensorType` with a new reading.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`reading`|Object containing reading properties specific to the sensor type|object|\n\n#### Response\n\n`null`\n\n### deleteVirtualSensor\n\n```\nDELETE /session/:sessionId/sensor/:sensorType\n```\n\n> Generic Sensor documentation: [Delete Virtual Sensor](https://www.w3.org/TR/generic-sensor/#delete-virtual-sensor-command)\n\nDeletes the virtual sensor with the type identified by `:sensorType`.\n\n#### Response\n\n`null`\n\n## Permissions Protocol\n\nThe [Permissions protocol](https://www.w3.org/TR/permissions/) is an extension of the W3C WebDriver\nprotocol.\n\n### setPermissions\n\n```\nPOST /session/:sessionId/permissions\n```\n\n> Permissions documentation: [Set Permission](https://www.w3.org/TR/permissions/#webdriver-command-set-permission)\n\nSimulates user modification of the permission state of a PermissionDescriptor (a permissible feature\nwith optional additional properties).\n\n#### Parameters\n\n|
Name
|Description|Type|\n|--|--|--|\n|`descriptor`|Object specifying the feature name in its `name` key, along with any other keys for additional properties|object|\n|`state`|New permission state for this descriptor. Supported values are: `granted`, `denied`, or `prompt`.|string|\n\n#### Response\n\n`null`\n\n## Reporting Protocol\n\nThe [Reporting protocol](https://www.w3.org/TR/reporting-1/) is an extension of the W3C WebDriver\nprotocol.\n\n### generateTestReport\n\n```\nPOST /session/:sessionId/reporting/generate_test_report\n```\n\n> Reporting documentation: [Generate Test Report](https://www.w3.org/TR/reporting-1/#generate-test-report-command)\n\nSimulates the generation of a test report, which can be retrieved by registered reporting observers.\n\n#### Parameters\n\n|Name|Description|Type|Default|\n|--|--|--|--|\n|`message`|Message displayed in the report|string||\n|`group?`|Destination group to deliver the report to|string|`default`|\n\n#### Response\n\n`null`\n\n## Secure Payment Confirmation Protocol\n\nThe [Secure Payment Confirmation protocol](https://www.w3.org/TR/secure-payment-confirmation) (SPC)\nis an extension of the W3C WebDriver protocol.\n\n### setSPCTransactionMode\n\n```\nPOST /session/:sessionId/secure-payment-confirmation/set-mode\n```\n\n> SPC documentation: [Set SPC Transaction Mode](https://www.w3.org/TR/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode)\n\nSets the transaction automation mode, for automated handling of transaction confirmation prompts.\nBy default, this mode is set to `none`.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`mode`|Automation mode to set. Supported values are `autoAccept`, `autoChooseToAuthAnotherWay`, `autoReject`, or `autoOptOut`.|string|\n\n#### Response\n\n`null`\n\n## Selenium Protocol\n\nThe Selenium protocol is an extension of the W3C WebDriver protocol, supported in Appium clients\nbased on Selenium.\n\n!!! warning\n\n Endpoints specified by this protocol are not officially documented.\n\n### getLog\n\n```\nPOST /session/:sessionId/se/log\n```\n\nRetrieves the logs for a given log type. Supported log types depend on the driver, and can be\nretrieved using the [`getLogTypes`](#getlogtypes) endpoint.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`type`|Type of log to retrieve|string|\n\n#### Response\n\n`GetLogEntry[]` - an array of log entries.\n\nTypically a log entry is an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`level`|Level at which the message was logged|string|\n|`message`|Contents of the actual log message|string|\n|`timestamp`|Message timestamp (in milliseconds) in Unix format|number|\n\n### getLogTypes\n\n```\nGET /session/:sessionId/se/log/types\n```\n\nRetrieves the available log types that can be used to call the [`getLog`](#getlog) endpoint.\n\n#### Response\n\n`string[]` - an array of log types\n\n## Web Authentication Protocol\n\nThe [Web Authentication protocol](https://w3c.github.io/webauthn/) (WebAuthn) is an extension of\nthe W3C WebDriver protocol. Clients can enable this protocol by using the\n[`webauthn:virtualAuthenticators`](https://w3c.github.io/webauthn/#sctn-automation-webdriver-capability)\ncapability.\n\n### addVirtualAuthenticator\n\n```\nPOST /session/:sessionId/webauthn/authenticator\n```\n\n> WebAuthn documentation: [Add Virtual Authenticator](https://w3c.github.io/webauthn/#add-virtual-authenticator)\n\nCreates a software [virtual authenticator](https://w3c.github.io/webauthn/#virtual-authenticators).\n\n#### Parameters\n\n|
Name
|Description|Type|Default|\n|--|--|--|--|\n|`isUserConsenting?`|Whether to always grant user consent|boolean|true|\n|`isUserVerified?`|Whether to always succeed in user verification. Ignored if `hasUserVerification` is set to `false`.|boolean|false|\n|`hasResidentKey?`|Whether client-side discoverable credentials are supported|boolean|false|\n|`hasUserVerification?`|Whether user verification is supported|boolean|false|\n|`protocol`|Protocol of this authenticator. Supported values are: `ctap1/u2f`, `ctap2`, or `ctap2_1`.|string||\n|`transport`|Type of transport used to communicate with clients. Supported values are: `ble`, `hybrid`, `internal`, `nfc`, `smart-card`, or `usb`.|string||\n\n#### Response\n\n`string` - the ID of the created authenticator\n\n### removeVirtualAuthenticator\n\n```\nDELETE /session/:sessionId/webauthn/authenticator/:authenticatorId\n```\n\n> WebAuthn documentation: [Remove Virtual Authenticator](https://w3c.github.io/webauthn/#remove-virtual-authenticator)\n\nRemoves the virtual authenticator identified by `:authenticatorId`.\n\n#### Response\n\n`null`\n\n### addAuthCredential\n\n```\nPOST /session/:sessionId/webauthn/authenticator/:authenticatorId/credential\n```\n\n> WebAuthn documentation: [Add Credential](https://w3c.github.io/webauthn/#add-credential)\n\nInjects a [Public Key Credential Source](https://w3c.github.io/webauthn/#public-key-credential-source)\ninto the virtual authenticator identified by `:authenticatorId`.\n\n#### Parameters\n\n|
Name
|Description|Type|\n|--|--|--|\n|`credentialId`|Credential ID, in Base64url encoding|string|\n|`isResidentCredential`|Whether to create a client-side discoverable credential. If set to `false`, a server-side credential is created instead.|boolean|\n|`privateKey`|Asymmetric key package containing a single private key, in Base64url encoding|string|\n|`rpId`|Relying Party ID the credential is scoped to|string|\n|`signCount?`|Initial value for the signature counter. Set to `0` if omitted.|number|\n|`userHandle?`|User handle associated with the credential, in Base64url encoding. Set to `null` if omitted.|string|\n\n#### Response\n\n`null`\n\n### getAuthCredential\n\n```\nGET /session/:sessionId/webauthn/authenticator/:authenticatorId/credentials\n```\n\n> WebAuthn documentation: [Get Credentials](https://w3c.github.io/webauthn/#get-credentials)\n\nRetrieves all Public Key Credential Sources stored in the virtual authenticator identified by\n`:authenticatorId`.\n\n#### Response\n\n`Credential[]` - an array of credential objects. Each object has the following properties:\n\n|
Name
|Description|Type|Default|\n|--|--|--|--|\n|`credentialId`|Credential ID, in Base64url encoding|string||\n|`isResidentCredential`|Whether the credential is client-side discoverable (`true`) or server-side (`false`)|boolean||\n|`largeBlob`|Large, per-credential blog, in Base64url encoding|string|`null`|\n|`privateKey`|Asymmetric key package containing a single private key, in Base64url encoding|string||\n|`rpId`|Relying Party ID the credential is scoped to|string||\n|`signCount`|Initial value for the signature counter|number|`0`|\n|`userHandle`|User handle associated with the credential, in Base64url encoding|string|`null`|\n\n### removeAuthCredential\n\n```\nDELETE /session/:sessionId/webauthn/authenticator/:authenticatorId/credentials/:credentialId\n```\n\n> WebAuthn documentation: [Remove Credential](https://w3c.github.io/webauthn/#remove-credential)\n\nRemoves the Public Key Credential Source identified by `:credentialId` from the virtual authenticator\nidentified by `:authenticatorId`.\n\n#### Response\n\n`null`\n\n### removeAllAuthCredentials\n\n```\nDELETE /session/:sessionId/webauthn/authenticator/:authenticatorId/credentials\n```\n\n> WebAuthn documentation: [Remove All Credentials](https://w3c.github.io/webauthn/#remove-all-credentials)\n\nRemoves all Public Key Credential Sources from the virtual authenticator identified by\n`:authenticatorId`.\n\n#### Response\n\n`null`\n\n### setUserAuthVerified\n\n```\nPOST /session/:sessionId/webauthn/authenticator/:authenticatorId/uv\n```\n\n> WebAuthn documentation: [Set User Verified](https://w3c.github.io/webauthn/#set-user-verified)\n\nSets the `isUserVerified` property of the virtual authenticator identified by `:authenticatorId`.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`isUserVerified`|Whether to always succeed in user verification|boolean|\n\n#### Response\n\n`null`\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/reference/api/plugins.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Plugin Endpoints\n---\n\n\nThe following is a list of endpoints added or modified by official Appium plugins.\n\n## Execute Driver Plugin\n\n### executeDriverScript\n\n```\nPOST /session/:sessionId/appium/execute_driver\n```\n\nExecutes a driver script in a child process.\n\n#### Parameters\n\n|Name|Description|Type|Default|\n|--|--|--|--|\n|`script`|Script to be executed|string||\n|`type?`|Name of the library executing the script|string|`webdriverio`|\n|`timeout?`|Timeout (in milliseconds) for the script process|number|`3600000`|\n\n#### Response\n\n`RunScriptResult` - an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`result`|Result returned by the script|any|\n|`logs`|Logs generated during script execution|object|\n\n## Images Plugin\n\n### compareImages\n\n```\nPOST /session/:sessionId/appium/compare_images\n```\n\nCompares two images using the specified mode of comparison:\n\n* `matchFeatures`: whether `firstImage` is a rotated, scaled, or otherwise modified version of `secondImage`\n* `matchTemplate`: whether `firstImage` contains one or more occurrences of `secondImage`\n* `getSimilarity`: calculate similarity score between two images of equal size\n\n#### Parameters\n\n|
Name
|Description|Type|Default|\n|--|--|--|--|\n|`mode`|Mode of comparison. Supported values are: `matchFeatures`, `getSimilarity`, or `matchTemplate`.|string||\n|`firstImage`|Base64-encoded image file|string or Buffer||\n|`secondImage`|Base64-encoded image file|string or Buffer||\n|`options?`|Options specific to the `mode` value (see below)|object|`{}`|\n\n**`options` for `mode=matchFeatures`**\n\n|
Name
|Description|Type|
Default
|\n|--|--|--|--|\n|`detectorName?`|Name of the OpenCV feature detector to use. Supported values are: `AKAZE`, `AgastFeatureDetector`, `BRISK`, `FastFeatureDetector`, `GFTTDetector`, `KAZE`, `MSER`, or `ORB`.|string|`ORB`|\n|`goodMatchesFactor?`|Maximum number of 'good' matches; or a function accepting current distance, min distance and max distance, and returning a boolean indicating whether the match should be included or not.|number or function||\n|`matchFunc?`|Name of the OpenCV descriptor matcher to use. Supported values are: `FlannBased`, `BruteForce`, `BruteForce-L1`, `BruteForce-Hamming`, `BruteForce-HammingLUT`, or `BruteForce-SL2`.|string|`BruteForce`|\n|`visualize?`|Whether to include an image of the matcher visualization in the response|boolean|`false`|\n\n**`options` for `mode=matchTemplate`**\n\n|
Name
|Description|Type|
Default
|\n|--|--|--|--|\n|`matchNeighbourThreshold?`|Maximum pixel distance between two matches to consider them the same match|number|`10`|\n|`method?`|Name of the OpenCV template matching method to use. Supported values are: `TM_CCOEFF`, `TM_CCOEFF_NORMED`, `TM_CCORR`, `TM_CCORR_NORMED`, `TM_SQDIFF`, or `TM_SQDIFF_NORMED`.|string|`TM_CCOEFF_NORMED`|\n|`multiple?`|Whether to look for multiple occurrences of the image|boolean|`false`|\n|`threshold?`|Threshold to use for accepting/rejecting a match|number|`0.5`|\n|`visualize?`|Whether to include an image of the matcher visualization in the response|boolean|`false`|\n\n**`options` for `mode=getSimilarity`**\n\n|
Name
|Description|Type|
Default
|\n|--|--|--|--|\n|`method?`|Name of the OpenCV template matching method to use. Supported values are: `TM_CCOEFF`, `TM_CCOEFF_NORMED`, `TM_CCORR`, `TM_CCORR_NORMED`, `TM_SQDIFF`, or `TM_SQDIFF_NORMED`.|string|`TM_CCOEFF_NORMED`|\n|`visualize?`|Whether to include an image of the matcher visualization in the response|boolean|`false`|\n\n#### Response\n\n`ComparisonResult` - an object whose properties depend on the `mode` input parameter:\n\n**`ComparisonResult` for `mode=matchFeatures`**\n\n|
Name
|Description|Type|\n|--|--|--|\n|`count`|Number of matched edges on both images, after applying `goodMatchesFactor` (if specified).|number|\n|`points1`|Array of matching points on `firstImage`|`{x, y}[]`|\n|`points2`|Array of matching points on `secondImage`|`{x, y}[]`|\n|`rect1`|Bounding rectangle for `points1`|`{x, y, width, height}`|\n|`rect2`|Bounding rectangle for `points2`|`{x, y, width, height}`|\n|`totalCount`|Total number of matched edges on both images, before applying `goodMatchesFactor` (if specified)|number|\n|`visualization?`|Image of the matcher visualization. Only included if the `visualize` input option was enabled.|Buffer|\n\n**`ComparisonResult` for `mode=matchTemplate`**\n\n|
Name
|Description|Type|\n|--|--|--|\n|`rect`|Region of `firstImage` where a match was found for `secondImage`|`{x, y, width, height}`|\n|`multiple?`|Array of all comparison results. Only included if the `multiple` input option was enabled.|`{rect, score, visualization?}`|\n|`score`|Similarity score between both images in the range `[0.0, 1.0]`|number|\n|`visualization?`|Image of the matcher visualization. Only included if the `visualize` input option was enabled.|Buffer|\n\n**`ComparisonResult` for `mode=getSimilarity`**\n\n|
Name
|Description|Type|\n|--|--|--|\n|`score`|Similarity score between both images in the range `[0.0, 1.0]`|number|\n|`visualization?`|Image of the matcher visualization. Only included if the `visualize` input option was enabled.|Buffer|\n\n### findElement\n\n```\nPOST /session/:sessionId/element\n```\n\nModifies the [`findElement`](./webdriver.md#findelement) endpoint:\n\n* Adds `-image` to the supported values for the `using` parameter (the location strategy)\n\n### findElements\n\n```\nPOST /session/:sessionId/elements\n```\n\nModifies the [`findElements`](./webdriver.md#findelements) endpoint:\n\n* Adds `-image` to the supported values for the `using` parameter (the location strategy)\n\n### performActions\n\n```\nPOST /session/:sessionId/actions\n```\n\nModifies the [`performActions`](./webdriver.md#performactions) endpoint:\n\n* If any action in `actions` includes `origin`, whose value is an image element:\n * Removes the `origin` property\n * Increments the `x` and `y` properties by the center coordinates of the image element\n\n## Relaxed Caps Plugin\n\n### createSession\n\n```\nPOST /session\n```\n\nModifies the [`createSession`](./webdriver.md#createsession) endpoint:\n\n* Adds the `appium:` prefix to all keys in `capabilities`, unless they match a standard W3C\n capability, or already have any prefix\n\n## Storage Plugin\n\n!!! tip\n\n All endpoints for this plugin can be invoked without creating a session, allowing you to prepare\n your test environment in advance.\n\n### addStorageItem\n\n```\nPOST /storage/add\n```\n\nAdds a new file to the storage.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`name`|Name used for saving the file (must not include path separator characters)|string|\n|`sha1`|SHA1 hash of the file to be uploaded|string|\n\n#### Response\n\n`AddRequestResult` - an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`ttlMs`|Timeout (in milliseconds) for both web sockets to remain active, or for a file payload to be successfully uploaded|number|\n|`ws.events`|Path for the events web socket used to notify about upload success or failure|string|\n|`ws.stream`|Path for the streaming web socket used to upload the file content|string|\n\nExample:\n```json\n{\n \"ws\": {\n \"stream\": \"/storage/add/ccc963411b2621335657963322890305ebe96186/stream\",\n \"events\": \"/storage/add/ccc963411b2621335657963322890305ebe96186/events\"\n },\n \"ttlMs\": 300000\n}\n```\n\n### deleteStorageItem\n\n```\nPOST /storage/delete\n```\n\nDeletes a file in the storage.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`name`|Name of the file to be deleted|string|\n\n#### Response\n\n`boolean` - `true` upon successful file deletion, or `false` if the file does not exist in\nthe storage \n\n### listStorageItems\n\n```\nGET /storage/list\n```\n\nList all files present in the storage.\n\n#### Response\n\n`List` - a list of items, where each item has the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`name`|Name of the file in the storage|string|\n|`path`|Full path to the file on the remote file system|string|\n|`size`|File size in bytes|number|\n\n### resetStorage\n\n```\nPOST /storage/reset\n```\n\nDeletes all uploaded files and stops any incomplete uploads.\nIf the [`APPIUM_STORAGE_KEEP_ALL` flag](../cli/env-vars.md) is set, all uploaded files will be\npreserved, and only the incomplete uploads will be stopped.\n\n#### Response\n\n`void`\n\n## Universal XML Plugin\n\n### findElement\n\n```\nPOST /session/:sessionId/element\n```\n\nModifies the [`findElement`](./webdriver.md#findelement) endpoint:\n\n* Adds support for universal node/attribute names for the `value` parameter (the selector)\n\n### findElements\n\n```\nPOST /session/:sessionId/elements\n```\n\nModifies the [`findElements`](./webdriver.md#findelements) endpoint:\n\n* Adds support for universal node/attribute names for the `value` parameter (the selector)\n\n### getPageSource\n\n```\nGET /session/:sessionId/source\n```\n\nModifies the [`getPageSource`](./webdriver.md#getpagesource) endpoint:\n\n* After retrieving the result, translates node/attribute names to their universal names\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/reference/api/webdriver.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: WebDriver Protocol\n---\n\n\nThe following is a list of [W3C WebDriver protocol](https://w3c.github.io/webdriver/) endpoints\nsupported in Appium.\n\n!!! info\n\n Most WebDriver endpoints are not implemented within Appium itself, and are instead proxied\n directly to the driver, which is responsible for the actual endpoint implementation.\n\n### createSession\n\n```\nPOST /session\n```\n\n> WebDriver documentation: [New Session](https://w3c.github.io/webdriver/#new-session)\n\nCreates a new WebDriver session.\n\nAppium implements a modified version of this endpoint for historical reasons. While the W3C\nendpoint only accepts 1 parameter, Appium's implementation allows up to 3 parameters, as this was\nrequired by the legacy JSON Wire Protocol (JSONWP). Since Appium 2, the JSONWP format is no longer\nsupported, and any of the 3 parameters can be used to specify the W3C capabilities.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`w3cCapabilities1?`|Capabilities of the new session|`W3CDriverCaps`|\n|`w3cCapabilities2?`|Another location for the new session capabilities (legacy)|`W3CDriverCaps`|\n|`w3cCapabilities?`|Another location for the new session capabilities (legacy)|`W3CDriverCaps`|\n\n#### Response\n\n`CreateResult` - an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`sessionId`|ID of the new session|string|\n|`capabilities`|Capabilities processed by the driver|object|\n\n### deleteSession\n\n```\nDELETE /session/:sessionId\n```\n\n> WebDriver documentation: [Delete Session](https://w3c.github.io/webdriver/#delete-session)\n\nCloses the current session.\n\n#### Response\n\n`null`\n\n### getStatus\n\n```\nGET /status\n```\n\n> WebDriver documentation: [Status](https://w3c.github.io/webdriver/#status)\n\nRetrieves the current status of the Appium server.\n\n#### Response\n\n`GetStatusResult` - an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`build`|Implementation-specific information. For Appium, this is an object containing the `version` key, whose value matches the Appium server version.|`{version}`|\n|`message`|Explanation of the `ready` value|string|\n|`ready`|Whether the server is able to create new sessions|boolean|\n\n### getTimeouts\n\n```\nGET /session/:sessionId/timeouts\n```\n\n> WebDriver documentation: [Get Timeouts](https://w3c.github.io/webdriver/#get-timeouts)\n\nRetrieves the timeout values of the current session.\n\n#### Response\n\n`GetTimeoutsResult` - an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`command`|Command timeout|number|\n|`implicit`|Implicit wait timeout|number|\n\n### timeouts\n\n```\nPOST /session/:sessionId/timeouts\n```\n\n> WebDriver documentation: [Set Timeouts](https://w3c.github.io/webdriver/#set-timeouts)\n\nSets the timeout values of the current session.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`implicit?`|Implicit wait timeout (in milliseconds)|number|\n|`pageLoad?`|Page load timeout (in milliseconds)|number|\n|`script?`|Script timeout (in milliseconds)|number|\n\n#### Response\n\n`null`\n\n### setUrl\n\n```\nPOST /session/:sessionId/url\n```\n\n> WebDriver documentation: [Navigate To](https://w3c.github.io/webdriver/#navigate-to)\n\nNavigates the current top-level browsing context to the specified URL.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`url`|URL to navigate to|string|\n\n#### Response\n\n`null`\n\n### getUrl\n\n```\nGET /session/:sessionId/url\n```\n\n> WebDriver documentation: [Get Current URL](https://w3c.github.io/webdriver/#get-current-url)\n\nRetrieves the URL of the current top-level browsing context.\n\n#### Response\n\n`string` - the current URL\n\n### back\n\n```\nPOST /session/:sessionId/back\n```\n\n> WebDriver documentation: [Back](https://w3c.github.io/webdriver/#back)\n\nNavigates backwards in the browser history, if possible.\n\n#### Response\n\n`null`\n\n### forward\n\n```\nPOST /session/:sessionId/forward\n```\n\n> WebDriver documentation: [Forward](https://w3c.github.io/webdriver/#forward)\n\nNavigates forwards in the browser history, if possible.\n\n#### Response\n\n`null`\n\n### refresh\n\n```\nPOST /session/:sessionId/refresh\n```\n\n> WebDriver documentation: [Refresh](https://w3c.github.io/webdriver/#refresh)\n\nReloads the window of the current top-level browsing context.\n\n#### Response\n\n`null`\n\n### title\n\n```\nGET /session/:sessionId/title\n```\n\n> WebDriver documentation: [Get Title](https://w3c.github.io/webdriver/#get-title)\n\nRetrieves the window title of the top-level browsing context.\n\n#### Response\n\n`string` - the page title\n\n### getWindowHandle\n\n```\nGET /session/:sessionId/window\n```\n\n> WebDriver documentation: [Get Window Handle](https://w3c.github.io/webdriver/#get-window-handle)\n\nRetrieves the window handle of the top-level browsing context.\n\n#### Response\n\n`string` - the window handle identifier\n\n### closeWindow\n\n```\nDELETE /session/:sessionId/window\n```\n\n> WebDriver documentation: [Close Window](https://w3c.github.io/webdriver/#close-window)\n\nCloses the current top-level browsing context.\n\n#### Response\n\n`string[]` - an array of zero or more remaining window handle identifiers\n\n### setWindow\n\n```\nPOST /session/:sessionId/window\n```\n\n> WebDriver documentation: [Switch To Window](https://w3c.github.io/webdriver/#switch-to-window)\n\nSelects the top-level browsing context.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`handle`|Identifier for the window to switch to|string|\n\n#### Response\n\n`null`\n\n### getWindowHandles\n\n```\nGET /session/:sessionId/window/handles\n```\n\n> WebDriver documentation: [Get Window Handles](https://w3c.github.io/webdriver/#get-window-handles)\n\nRetrieves a list of window handles for every top-level browsing context.\n\n#### Response\n\n`string[]` - an array of zero or more window handle identifiers\n\n### createNewWindow\n\n```\nPOST /session/:sessionId/window/new\n```\n\n> WebDriver documentation: [New Window](https://w3c.github.io/webdriver/#new-window)\n\nCreates a new window or tab.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`type`|Type of window to create (`window` or `tab`)|string|\n\n#### Response\n\n`NewWindow` - an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`handle`|ID of the created window handle|string|\n|`type`|Type of the created window (`window` or `tab`)|string|\n\n\n### setFrame\n\n```\nPOST /session/:sessionId/frame\n```\n\n> WebDriver documentation: [Switch To Frame](https://w3c.github.io/webdriver/#switch-to-frame)\n\nSelects the top-level or child browsing context as the current browsing context.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`id`|Identifier for the frame|null, number, or [`Element`](#response_23)|\n\n#### Response\n\n`null`\n\n### switchToParentFrame\n\n```\nPOST /session/:sessionId/frame/parent\n```\n\n> WebDriver documentation: [Switch To Parent Frame](https://w3c.github.io/webdriver/#switch-to-parent-frame)\n\nSets the current browsing context to the parent of the current browsing context.\n\n#### Response\n\n`null`\n\n### getWindowRect\n\n```\nGET /session/:sessionId/window/rect\n```\n\n> WebDriver documentation: [Get Window Rect](https://w3c.github.io/webdriver/#get-window-rect)\n\nRetrieves the size and position of the current window.\n\n#### Response\n\n`Rect` - an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`height`|Window height|number|\n|`width`|Window width|number|\n|`x`|X-axis position of the top-left corner of the window|number|\n|`y`|Y-axis position of the top-left corner of the window|number|\n\n### setWindowRect\n\n```\nPOST /session/:sessionId/window/rect\n```\n\n> WebDriver documentation: [Set Window Rect](https://w3c.github.io/webdriver/#set-window-rect)\n\nSets the size and/or position of the current window.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`height?`|Window height|number|\n|`width?`|Window width|number|\n|`x?`|X-axis position of the top-left corner of the window|number|\n|`y?`|Y-axis position of the top-left corner of the window|number|\n\n#### Response\n\n[`Rect`](#response_18) - the new window size\n\n### maximizeWindow\n\n```\nPOST /session/:sessionId/window/maximize\n```\n\n> WebDriver documentation: [Maximize Window](https://w3c.github.io/webdriver/#maximize-window)\n\nMaximizes the current window.\n\n#### Response\n\n[`Rect`](#response_18) - the new window size\n\n### minimizeWindow\n\n```\nPOST /session/:sessionId/window/minimize\n```\n\n> WebDriver documentation: [Minimize Window](https://w3c.github.io/webdriver/#minimize-window)\n\nMinimizes the current window.\n\n#### Response\n\n[`Rect`](#response_18) - the new window size\n\n### fullScreenWindow\n\n```\nPOST /session/:sessionId/window/fullscreen\n```\n\n> WebDriver documentation: [Fullscreen Window](https://w3c.github.io/webdriver/#fullscreen-window)\n\nMakes the current window fullscreen.\n\n#### Response\n\n[`Rect`](#response_18) - the new window size\n\n### active\n\n```\nGET /session/:sessionId/element/active\n```\n\n> WebDriver documentation: [Get Active Element](https://w3c.github.io/webdriver/#get-active-element)\n\nRetrieves the currently focused element.\n\n#### Response\n\n`Element` - an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`element-6066-11e4-a52e-4f735466cecf`|Element ID|string|\n|`ELEMENT`|Element ID (same value as `element-6066-11e4-a52e-4f735466cecf`). This key was used in the legacy Mobile JSON Wire Protocol (MJSONWP).|string|\n\n### elementShadowRoot\n\n```\nGET /session/:sessionId/element/:elementId/shadow\n```\n\n> WebDriver documentation: [Get Shadow Root](https://w3c.github.io/webdriver/#get-shadow-root)\n\nRetrieves the shadow root of the element identified by `:elementId`.\n\n#### Response\n\n`ShadowElement` - an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`shadow-6066-11e4-a52e-4f735466cecf`|Shadow root ID|string|\n\n### findElement\n\n```\nPOST /session/:sessionId/element\n```\n\n> WebDriver documentation: [Find Element](https://w3c.github.io/webdriver/#find-element)\n\nFinds the first element in the current browsing context that matches the provided selector and\nlocation strategy, starting from the root node.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`using`|Location strategy to use when searching|string|\n|`value`|Selector used to find the element|string|\n\n#### Response\n\n[`Element`](#response_23)\n\n### findElements\n\n```\nPOST /session/:sessionId/elements\n```\n\n> WebDriver documentation: [Find Elements](https://w3c.github.io/webdriver/#find-elements)\n\nFinds all elements in the current browsing context that match the provided selector and location\nstrategy, starting from the root node.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`using`|Location strategy to use when searching|string|\n|`value`|Selector used to find the element|string|\n\n#### Response\n\n`Element[]` - an array containing zero or more [`Element` objects](#response_23)\n\n### findElementFromElement\n\n```\nPOST /session/:sessionId/element/:elementId/element\n```\n\n> WebDriver documentation: [Find Element From Element](https://w3c.github.io/webdriver/#find-element-from-element)\n\nFinds the first element in the current browsing context that matches the provided selector and\nlocation strategy, starting from the element node identified by `:elementId`.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`using`|Location strategy to use when searching|string|\n|`value`|Selector used to find the element|string|\n\n#### Response\n\n[`Element`](#response_23)\n\n### findElementsFromElement\n\n```\nPOST /session/:sessionId/element/:elementId/elements\n```\n\n> WebDriver documentation: [Find Elements From Element](https://w3c.github.io/webdriver/#find-elements-from-element)\n\nFinds all elements in the current browsing context that match the provided selector and location\nstrategy, starting from the element node identified by `:elementId`.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`using`|Location strategy to use when searching|string|\n|`value`|Selector used to find the element|string|\n\n#### Response\n\n[`Element[]`](#response_26)\n\n### findElementFromShadowRoot\n\n```\nPOST /session/:sessionId/shadow/:shadowId/element\n```\n\n> WebDriver documentation: [Find Element From Shadow Root](https://w3c.github.io/webdriver/#find-element-from-shadow-root)\n\nFinds the first element in the current browsing context that matches the provided selector and\nlocation strategy, starting from the shadow root node identified by `:shadowId`.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`using`|Location strategy to use when searching|string|\n|`value`|Selector used to find the element|string|\n\n#### Response\n\n[`Element`](#response_23)\n\n### findElementsFromShadowRoot\n\n```\nPOST /session/:sessionId/shadow/:shadowId/elements\n```\n\n> WebDriver documentation: [Find Elements From Shadow Root](https://w3c.github.io/webdriver/#find-elements-from-shadow-root)\n\nFinds all elements in the current browsing context that match the provided selector and location\nstrategy, starting from the shadow root node identified by `:shadowId`.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`using`|Location strategy to use when searching|string|\n|`value`|Selector used to find the element|string|\n\n#### Response\n\n[`Element[]`](#response_26)\n\n### elementSelected\n\n```\nGET /session/:sessionId/element/:elementId/selected\n```\n\n> WebDriver documentation: [Is Element Selected](https://w3c.github.io/webdriver/#is-element-selected)\n\nDetermines if the element identified by `:elementId` is currently selected. This property is only\nrelevant to certain element types, such as checkboxes, radio buttons, or options.\n\n#### Response\n\n`boolean` - `true` if the element is selected, otherwise `false`\n\n### elementDisplayed\n\n```\nGET /session/:sessionId/element/:elementId/displayed\n```\n\n> WebDriver documentation: [Element Displayedness](https://w3c.github.io/webdriver/#element-displayedness)\n\nDetermines if the element identified by `:elementId` is currently displayed.\n\n#### Response\n\n`boolean` - `true` if the element is displayed, otherwise `false`\n\n### getAttribute\n\n```\nGET /session/:sessionId/element/:elementId/attribute/:name\n```\n\n> WebDriver documentation: [Get Element Attribute](https://w3c.github.io/webdriver/#get-element-attribute)\n\nRetrieves the value of the `:name` attribute for the element identified by `:elementId`.\n\n#### Response\n\n`string` - the attribute value, or `null` if the attribute does not exist\n\n### getProperty\n\n```\nGET /session/:sessionId/element/:elementId/property/:name\n```\n\n> WebDriver documentation: [Get Element Property](https://w3c.github.io/webdriver/#get-element-property)\n\nRetrieves the value of the `:name` property for the element identified by `:elementId`.\n\n#### Response\n\n`string` - the property value, or `null` if the property does not exist\n\n### getCssProperty\n\n```\nGET /session/:sessionId/element/:elementId/css/:propertyName\n```\n\n> WebDriver documentation: [Get Element CSS Value](https://w3c.github.io/webdriver/#get-element-css-value)\n\nRetrieves the value of the `:propertyName` computed CSS property for the element identified by\n`:elementId`.\n\n#### Response\n\n`string` - the CSS property value, or `null` if the property does not exist\n\n### getText\n\n```\nGET /session/:sessionId/element/:elementId/text\n```\n\n> WebDriver documentation: [Get Element Text](https://w3c.github.io/webdriver/#get-element-text)\n\nRetrieves the text of the element identified by `:elementId`, as well as the text of its child\nelements (if any).\n\n#### Response\n\n`string` - the element text (including its child elements)\n\n### getName\n\n```\nGET /session/:sessionId/element/:elementId/name\n```\n\n> WebDriver documentation: [Get Element Tag Name](https://w3c.github.io/webdriver/#get-element-tag-name)\n\nRetrieves the tag name of the element identified by `:elementId`.\n\n#### Response\n\n`string` - the element tag name\n\n### getElementRect\n\n```\nGET /session/:sessionId/element/:elementId/rect\n```\n\n> WebDriver documentation: [Get Element Rect](https://w3c.github.io/webdriver/#get-element-rect)\n\nRetrieves the dimensions and coordinates of the element identified by `:elementId`.\n\n#### Response\n\n[`Rect`](#response_18)\n\n### elementEnabled\n\n```\nGET /session/:sessionId/element/:elementId/enabled\n```\n\n> WebDriver documentation: [Is Element Enabled](https://w3c.github.io/webdriver/#is-element-enabled)\n\nDetermines if the element identified by `:elementId` is currently enabled. This property is only\nrelevant to certain element types, such as buttons, input fields, checkboxes, etc.\n\n#### Response\n\n`boolean` - `true` if the element is enabled, otherwise `false`\n\n### getComputedRole\n\n```\nGET /session/:sessionId/element/:elementId/computedrole\n```\n\n> WebDriver documentation: [Get Computed Role](https://w3c.github.io/webdriver/#get-computed-role)\n\nRetrieves the computed [WAI-ARIA](https://w3c.github.io/aria/#introroles) role of the element\nidentified by `:elementId`.\n\n#### Response\n\n`string` - the element computed role\n\n### getComputedLabel\n\n```\nGET /session/:sessionId/element/:elementId/computedlabel\n```\n\n> WebDriver documentation: [Get Computed Label](https://w3c.github.io/webdriver/#get-computed-label)\n\nRetrieves the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name) of the\nelement identified by `:elementId`.\n\n#### Response\n\n`string` - the element accessible name\n\n### click\n\n```\nPOST /session/:sessionId/element/:elementId/click\n```\n\n> WebDriver documentation: [Element Click](https://w3c.github.io/webdriver/#element-click)\n\nClicks on the identified by `:elementId`.\n\n#### Response\n\n`null`\n\n### clear\n\n```\nPOST /session/:sessionId/element/:elementId/clear\n```\n\n> WebDriver documentation: [Element Clear](https://w3c.github.io/webdriver/#element-clear)\n\nClears the identified by `:elementId`. This functionality is only relevant to certain element types,\nsuch as input fields.\n\n#### Response\n\n`null`\n\n### setValue\n\n```\nPOST /session/:sessionId/element/:elementId/value\n```\n\n> WebDriver documentation: [Element Send Keys](https://w3c.github.io/webdriver/#element-send-keys)\n\nSends keys to the element the identified by `:elementId`. This functionality is only relevant to\nkeyboard-interactable element types, such as input fields.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`text`|Text to send|string|\n\n#### Response\n\n`null`\n\n### getPageSource\n\n```\nGET /session/:sessionId/source\n```\n\n> WebDriver documentation: [Get Page Source](https://w3c.github.io/webdriver/#get-page-source)\n\nRetrieves the page/application source of the current browsing context in HTML/XML format.\n\n#### Response\n\n`string` - the DOM of the current browsing context\n\n### execute\n\n```\nPOST /session/:sessionId/execute/sync\n```\n\n> WebDriver documentation: [Execute Script](https://w3c.github.io/webdriver/#execute-script)\n\nExecutes synchronous JavaScript code in the current browsing context.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`script`|Script function to execute|string|\n|`args`|Arguments passed to the script|array|\n\n#### Response\n\n`any` - the result of the script execution\n\n### executeAsync\n\n```\nPOST /session/:sessionId/execute/async\n```\n\n> WebDriver documentation: [Execute Async Script](https://w3c.github.io/webdriver/#execute-async-script)\n\nExecutes asynchronous JavaScript code in the current browsing context.\n\nThe `script` function is provided an additional argument (applied after `args`), which is a\nfunction that can be invoked (within `script`) to trigger script completion. The first argument\npassed to this completion function is returned as the endpoint response.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`script`|Script function to execute|string|\n|`args`|Arguments for the script|array|\n\n#### Response\n\n`any` - the result returned by the completion function of the script\n\n### getCookies\n\n```\nGET /session/:sessionId/cookie\n```\n\n> WebDriver documentation: [Get Cookies](https://w3c.github.io/webdriver/#get-cookies)\n\nRetrieves all cookies of the current browsing context.\n\n#### Response\n\n`Cookie[]` - an array containing zero or more [`Cookie` objects](#response_49)\n\n### getCookie\n\n```\nGET /session/:sessionId/cookie/:name\n```\n\n> WebDriver documentation: [Get Named Cookie](https://w3c.github.io/webdriver/#get-named-cookie)\n\nRetrieves a cookie with the name identified by `:name` from the current browsing context.\n\n#### Response\n\n`Cookie` - an object with the following properties:\n\n|Name|Description|Type|\n|--|--|--|\n|`domain?`|Cookie domain|string|\n|`expiry?`|Cookie expiration time (in seconds) as a Unix timestamp|number|\n|`httpOnly?`|Whether the cookie is an HTTP only cookie|boolean|\n|`name`|Cookie name|string|\n|`path?`|Cookie path|string|\n|`sameSite?`|SameSite policy type of the cookie (either `Lax` or `Strict`)|string|\n|`secure?`|Whether the cookie is a secure cookie|boolean|\n|`value`|Cookie value|string|\n\n### setCookie\n\n```\nPOST /session/:sessionId/cookie\n```\n\n> WebDriver documentation: [Add Cookie](https://w3c.github.io/webdriver/#add-cookie)\n\nAdds a cookie to the cookie store of the current browsing context.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`cookie`|Cookie object to add|[`Cookie`](#response_49)|\n\n#### Response\n\n`null`\n\n### deleteCookie\n\n```\nDELETE /session/:sessionId/cookie/:name\n```\n\n> WebDriver documentation: [Delete Cookie](https://w3c.github.io/webdriver/#delete-cookie)\n\nDeletes a cookie with the name identified by `:name` from the current browsing context.\n\n#### Response\n\n`null`\n\n### deleteCookies\n\n```\nDELETE /session/:sessionId/cookie\n```\n\n> WebDriver documentation: [Delete All Cookies](https://w3c.github.io/webdriver/#delete-all-cookies)\n\nDeletes all cookies from the current browsing context.\n\n#### Response\n\n`null`\n\n### performActions\n\n```\nPOST /session/:sessionId/actions\n```\n\n> WebDriver documentation: [Perform Actions](https://w3c.github.io/webdriver/#perform-actions)\n\nPerforms a sequence of [actions](https://w3c.github.io/webdriver/#actions).\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`actions`|Array of action objects|`ActionSequence[]`|\n\n#### Response\n\n`null`\n\n### releaseActions\n\n```\nDELETE /session/:sessionId/actions\n```\n\n> WebDriver documentation: [Release Actions](https://w3c.github.io/webdriver/#release-actions)\n\nReleases all currently depressed keys and pointer buttons.\n\n#### Response\n\n`null`\n\n### postDismissAlert\n\n```\nPOST /session/:sessionId/alert/dismiss\n```\n\n> WebDriver documentation: [Dismiss Alert](https://w3c.github.io/webdriver/#dismiss-alert)\n\nDismisses the currently displayed user prompt.\n\n#### Response\n\n`null`\n\n### postAcceptAlert\n\n```\nPOST /session/:sessionId/alert/accept\n```\n\n> WebDriver documentation: [Accept Alert](https://w3c.github.io/webdriver/#accept-alert)\n\nAccepts the currently displayed user prompt.\n\n#### Response\n\n`null`\n\n### getAlertText\n\n```\nGET /session/:sessionId/alert/text\n```\n\n> WebDriver documentation: [Get Alert Text](https://w3c.github.io/webdriver/#get-alert-text)\n\nRetrieves the text of the currently displayed user prompt.\n\n#### Response\n\n`string` - prompt text\n\n### setAlertText\n\n```\nPOST /session/:sessionId/alert/text\n```\n\n> WebDriver documentation: [Send Alert Text](https://w3c.github.io/webdriver/#send-alert-text)\n\nSets the text of the currently displayed user prompt.\n\n#### Parameters\n\n|Name|Description|Type|\n|--|--|--|\n|`text`|Text to set|string|\n\n#### Response\n\n`null`\n\n### getScreenshot\n\n```\nGET /session/:sessionId/screenshot\n```\n\n> WebDriver documentation: [Take Screenshot](https://w3c.github.io/webdriver/#take-screenshot)\n\nTakes a screenshot of the current browsing context.\n\n#### Response\n\n`string` - a base64-encoded PNG image\n\n### getElementScreenshot\n\n```\nGET /session/:sessionId/element/:elementId/screenshot\n```\n\n> WebDriver documentation: [Take Element Screenshot](https://w3c.github.io/webdriver/#take-element-screenshot)\n\nTakes a screenshot of the visible region encompassed by the bounding rectangle of the element\nidentified by `:elementId`.\n\n#### Response\n\n`string` - a base64-encoded PNG image\n\n### printPage\n\n```\nPOST /session/:sessionId/print\n```\n\n> WebDriver documentation: [Print Page](https://w3c.github.io/webdriver/#print-page)\n\nPrints the page by rendering it as a paginated PDF document.\n\n#### Parameters\n\n|
Name
|Description|
Type
|Default|\n|--|--|--|--|\n|`orientation?`|Page orientation. Supported values are `portrait` or `landscape`.|string|`portrait`|\n|`scale?`|Page scale. Supported values are in the range `[0.1, 2]`.|number|`1`|\n|`background?`|Whether to include background images|boolean|`false`|\n|`page?`|Object specifying the page width and height|[`PrintPageSize`](#printpagesize)|`{}`|\n|`margin?`|Object specifying the page margins|[`PrintPageMargins`](#printpagemargins)|`{}`|\n|`shrinkToFit?`|Whether to resize page contents to match `PrintPageSize.width`|boolean|`true`|\n|`pageRanges?`|Array of pages to be printed, for example, `[1, 4, '8-9']`|array|`[]`|\n\n##### `PrintPageSize`\n\n|Name|Description|Type|Default|\n|--|--|--|--|\n|`width?`|Page width. Must be greater than or equal to `(2.54 / 72)`.|number|`21.59`|\n|`height?`|Page height. Must be greater than or equal to `(2.54 / 72)`.|number|`27.94`|\n\n##### `PrintPageMargins`\n\n|Name|Description|Type|Default|\n|--|--|--|--|\n|`top?`|Page top margin. Must be greater than or equal to `0`.|number|`1`|\n|`bottom?`|Page bottom margin. Must be greater than or equal to `0`.|number|`1`|\n|`left?`|Page left margin. Must be greater than or equal to `0`.|number|`1`|\n|`right?`|Page right margin. Must be greater than or equal to `0`.|number|`1`|\n\n#### Response\n\n`string` - a base64-encoded PDF document\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/reference/cli/env-vars.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Environment Variables\n---\n\nThe primary ways of configuring the Appium server are via [Command-Line Arguments](./server.md) or\nthe [Config File](../../guides/config.md). However, some more advanced features are toggled or\nconfigured via environment variables. To set environment variables, refer to the documentation for\nyour operating system and terminal.\n\nThese are the environment variables that the Appium server understands:\n\n|
Variable
|Description|\n|--------|-----------|\n|`APPIUM_APPS_CACHE_IGNORE_URL_QUERY`|Set this to a truthy value to remove any query part of a URL when using it as a cache key. See the corresponding [feature request](https://discuss.appium.io/t/regarding-app-caching-when-using-aws-s3-presigned-urls/42713) for more details.|\n|`APPIUM_APPS_CACHE_MAX_AGE`|Set the maximum age (in minutes) for [cached applications](../../guides/caching.md). Do not set it to a lower number than the duration of a single session startup. Default: `60 * 24` (24 hours)|\n|`APPIUM_APPS_CACHE_MAX_ITEMS`|Set the maximum amount of [cached applications](../../guides/caching.md). Do not set it to a lower number than the amount of apps in all parallel sessions per process. Default: `1024`|\n|`APPIUM_HOME`|Set the path to the Appium home directory, which is used for [Managing Extensions](../../guides/managing-exts.md). Default: `.appium` in the home directory of the current user|\n|`APPIUM_OMIT_PEER_DEPS`|Set this to `1` to add `--omit=peer` to all the NPM commands run internally by Appium. Mostly an internal feature.|\n|`APPIUM_RELOAD_EXTENSIONS`|Set this to a truthy value to cause Appium to re-require extensions when new sessions are created. This feature is mostly useful for [building extensions](../../developing/build-drivers.md).|\n|`APPIUM_TMP_DIR`|Set the path to the directory used for temporary files. Same as the `--tmp` command line argument.|\n\nAppium drivers and plugins may define additional environment variables. The following variables are\nused by official plugins:\n\n|
Variable
|Plugin|Description|\n|--------|-----------|-----------|\n|`APPIUM_STORAGE_KEEP_ALL`|`storage`|Set this to `1`, `true` or `yes` to preserve files in the storage after the server process is terminated. By default, stopping the server process also deletes all files in the storage.|\n|`APPIUM_STORAGE_ROOT`|`storage`|Set the path to the directory used for storage. If set to an existing folder, all files in it will be retained after terminating the server, unless specified otherwise using `APPIUM_STORAGE_KEEP_ALL`.|\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/reference/cli/extensions.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: appium driver/plugin\n---\n\n\nProvides management options for a specific extension (driver or plugin). Both the `appium driver` and\n`appium plugin` subcommands support the same options.\n\nThe following sub-subcommands are supported: `doctor`, `install`, `list`, `run`, `update`,\nand `uninstall`.\n\n## `doctor`\n\nRuns doctor checks for an installed extension, which validate whether the extension has its prerequisites\nconfigured correctly. Note that not all extensions include doctor checks.\n\n!!! note\n\n If you maintain an Appium extension and would like to add Appium Doctor support for it, check\n out the documentation on [Building Doctor Checks](../../developing/build-doctor-checks.md).\n\n#### Usage\n\n```\nappium {driver|plugin} doctor \n```\n\n|Argument|Description|\n|--|--|\n|`extension-name`|The short name of the installed extension|\n\n#### Options\n\n|Argument|Description|Type|\n|--|--|--|\n|`--json`|Return the result in JSON format|boolean|\n\n#### Example\n\n- Run doctor checks for the UiAutomator2 driver:\n\n ```\n appium driver doctor uiautomator2\n ```\n\n## `install`\n\nInstalls an extension.\n\n#### Usage\n\n```\nappium {driver|plugin} install \n```\n\n|
Argument
|Description|\n|--|--|\n|`install-spec`|The short name of an official extension, with optional `npm` version or tag modifier. If using the `--source` option, the expected format of this argument will change ([see below](#source-vs-install-spec)).|\n\n#### Options\n\n|Argument|Description|Type|\n|--|--|--|\n|`--json`|Return the result in JSON format|boolean|\n|`--package`|The Node.js package name of the extension. Required if `--source` is set to `git` or `github`.|string|\n|`--source`|The location where Appium should look for the given extension. Supported values are `git`, `github`, `local`, or `npm`. Changes the expected format of `install-spec` ([see below](#source-vs-install-spec)).|string|\n\n#### Source vs Install Spec\n\n|`source`|Format of ``|\n|--|--|\n|None|The short name of an official extension, with optional modifiers as supported by `npm install` (e.g. version or tag)|\n|`git`|The Git URL of the extension|\n|`github`|The GitHub repository URL of the extension|\n|`local`|The local path to the extension containing its `package.json` file|\n|`npm`|The name of the `npm` package, with optional modifiers as supported by `npm install` (e.g. version or tag)|\n\n#### Examples\n\n- Install the latest XCUITest driver:\n\n ```\n appium driver install xcuitest\n ```\n\n- Install the XCUITest driver at version 9.0.0:\n\n ```\n appium driver install xcuitest@9.0.0\n ```\n\n- Install the `beta` version of `@appium/fake-driver` from `npm`:\n\n ```\n appium driver install @appium/fake-driver@beta --source=npm\n ```\n\n- Install a locally-developed plugin:\n\n ```\n appium plugin install /path/to/my/plugin --source=local\n ```\n\n- Install the XCUITest driver from GitHub:\n\n ```\n appium driver install https://github.com/appium/appium-xcuitest-driver --source=github --package=appium-xcuitest-driver\n ```\n\n- Install the XCUITest driver using a Git URL:\n\n ```\n appium driver install git://github.com/appium/appium-xcuitest-driver.git --source=git --package=appium-xcuitest-driver\n ```\n\n- Install a branch of XCUITest driver repository using a Git URL:\n\n ```\n appium driver install git://github.com/appium/appium-xcuitest-driver.git#specific-branch --source=git --package=appium-xcuitest-driver\n ```\n\n## `list`\n\nLists all installed extensions, plus all official extensions that are not installed.\n\n#### Usage\n\n```\nappium {driver|plugin} list\n```\n\n#### Options\n\n|
Argument
|Description|Type|\n|--|--|--|\n|`--installed`|Only list all installed extensions|boolean|\n|`--json`|Return the result in JSON format|boolean|\n|`--updates`|List all extensions along with information on whether newer versions are available. Only supported for extensions installed via `npm`.|boolean|\n|`--verbose`|Show additional details for each extension|boolean|\n\n#### Example\n\n- List all installed drivers and check if they have newer versions available:\n\n ```\n appium driver list --installed --updates\n ```\n\n## `run`\n\nRuns an extension script, which can assist with setup or perform other tasks. Note that not all\nextensions include scripts.\n\n#### Usage\n\n```\nappium {driver|plugin} run [script-args]\n```\n\n|Argument|Description|\n|--|--|\n|`extension-name`|The short name of the installed extension|\n|`script-name`|The name of the script to be run|\n|`script-args`|Any additional arguments passed to the script|\n\n#### Options\n\n|Argument|Description|Type|\n|--|--|--|\n|`--json`|Return the result in JSON format|boolean|\n\n#### Example\n\n- Run the `reset` script included in the UiAutomator2 driver:\n\n ```\n appium driver run uiautomator2 reset\n ```\n\n## `update`\n\nUpdates one or more extensions. Only supported for extensions installed via `npm`. By default,\nAppium will only update minor and patch versions, in order to prevent any breaking changes.\n\n#### Usage\n\n```\nappium {driver|plugin} update \n```\n\n|Argument|Description|\n|--|--|\n|`extension-name`|The short name of the installed extension, or `installed` to update all installed extensions|\n\n#### Options\n\n|Argument|Description|Type|\n|--|--|--|\n|`--json`|Return the result in JSON format|boolean|\n|`--unsafe`|Allow updates of major versions, which may cause breaking changes|boolean|\n\n#### Examples\n\n- Update the UiAutomator2 driver to its latest major version:\n\n ```\n appium driver update uiautomator2 --unsafe\n ```\n\n- Update all installed plugins:\n\n ```\n appium plugin update installed\n ```\n\n## `uninstall`\n\nRemoves an installed extension.\n\n#### Usage\n\n```\nappium {driver|plugin} uninstall \n```\n\n|Argument|Description|\n|--|--|\n|`extension-name`|The short name of the installed extension|\n\n#### Options\n\n|Argument|Description|Type|\n|--|--|--|\n|`--json`|Return the result in JSON format|boolean|\n\n#### Example\n\n- Remove the `images` plugin:\n\n ```\n appium plugin uninstall images\n ```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/reference/cli/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Command Line Interface\n---\n\nAppium provides a command-line executable (`appium`), which can be used to configure and launch\nthe Appium server, as well as manage Appium extensions (drivers and plugins).\n\nThe executable has four main subcommands: `server`, `driver`, `plugin`, and `setup`. All subcommands\n(and sub-subcommands) can be run with the `--help`/`-h` option for usage instructions.\n\n
\n\n- [__`appium server`__](./server.md) (or simply `appium`)\n\n Start an Appium server\n\n- [__`appium driver`__](./extensions.md)\n\n Manage individual drivers\n\n- [__`appium plugin`__](./extensions.md)\n\n Manage individual plugins\n\n- [__`appium setup`__](./setup.md)\n\n Manage multiple drivers/plugins\n\n
\n\nAppium also recognizes several [environment variables](./env-vars.md), which may be used for\nadvanced configuration.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/reference/cli/server.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: appium server\n---\n\nLaunches an Appium server.\n\n```\nappium server\n```\n\nYou can also omit the `server` subcommand:\n\n```\nappium\n```\n\n### Options\n\n!!! note\n\n All of these options can also be set via a [Configuration File](../../guides/config.md). Options\n set on the command line will override any options found in a configuration file.\n\n|
Argument
|Description|Type|
Default
|\n|--|--|--|--|\n|`--address`, `-a`|IPv4/IPv6 address to listen on|string|`0.0.0.0`|\n|`--allow-cors`|Allow web browser connections from any host|boolean|`false`|\n|`--allow-insecure`|List of [insecure features](../../guides/security.md) that should be allowed in this server's sessions. Individual features can be overridden by `--deny-insecure`. Has no effect in combination with `--relaxed-security`.|array|`[]`|\n|`--base-path`, `-pa`|Base path to use as the prefix for all webdriver routes running on the server|string|`\"\"`|\n|`--callback-address`, `-ca`|Callback IP address|string|`0.0.0.0`|\n|`--callback-port`, `-cp`|Callback port|integer|`4723`|\n|`--config`|Path to an [Appium configuration JSON file](../../guides/config.md)|string||\n|`--debug-log-spacing`|Add exaggerated spacing in logs to help with visual inspection|boolean|`false`|\n|`--default-capabilities`, `-dc`|Capabilities that will be used for each session, unless overridden by received capabilities|object||\n|`--deny-insecure`|List of [insecure features](../../guides/security.md) that should be disabled in this server's sessions. Since all insecure features are disabled by default, this argument has no effect without either `--allow-insecure` or `--relaxed-security`, and is applied after both.|array|`[]`|\n|`--driver`|Driver-specific configuration. Keys should correspond to driver package names|object||\n|`--drivers-import-chunk-size`|Maximum number of drivers that can be imported in parallel on server startup|number|`3`|\n|`--keep-alive-timeout`, `-ka`|Timeout (in seconds) to use as both the keep-alive timeout and the connection timeout for all client requests. Disabled if set to `0`.|integer|`600`|\n|`--request-timeout`|Timeout (in seconds) for waiting to receive the entire HTTP request from the client. Disabled if set to `0`. Requests exceeding this timeout will be rejected with the code `HTTP 408`.|integer|`3600`|\n|`--local-timezone`|Use local timezone for log timestamps|boolean|`false`|\n|`--log`, `-g`|Path to a file where the server logs should be output. This does not affect output on the console.|string||\n|`--log-filters`|List of log filtering rules. See the [log filtering guide](../../guides/log-filters.md) for details.|array||\n|`--log-level`|The log level for the server logs. Supported values are `debug`, `info`, `warn`, or `error`. Combining two supported values using a colon (e.g. `warn:debug`) allows to set separate log levels for the console and file outputs, respectively.|string|`debug`|\n|`--log-format`|The log format of the server logs. Supported values are `text`, `json`, or `pretty_json`. Setting the value to `json` disables colors.|string|`text`|\n|`--log-no-colors`|Disable colors in the server log|boolean|`false`|\n|`--log-timestamp`|Show timestamps in the server log|boolean|`false`|\n|`--long-stacktrace`|Add long stack traces to log entries. Recommended for debugging only.|boolean|`false`|\n|`--no-perms-check`|Skip various permission checks on the server startup|boolean|`false`|\n|`--nodeconfig`|JSON configuration for registering Appium as a node with Selenium Grid 3|object||\n|`--plugin`|Plugin-specific configuration. Keys should correspond to plugin package names|object||\n|`--plugins-import-chunk-size`|Maximum number of plugins that can be imported in parallel on server startup|number|`7`|\n|`--port`, `-p`|Port to listen on|integer|`4723`|\n|`--relaxed-security`|Allow all [insecure features](../../guides/security.md). Only use this if all clients are in a trusted network and could not potentially break out of the session sandbox. Specific features can be overridden by using `--deny-insecure`.|boolean|`false`|\n|`--session-override`|Enable session override (clobbering)|boolean|`false`|\n|`--shutdown-timeout`|Timeout (in milliseconds) for waiting on all active connections to close, when shutting down the server|number|`5000`|\n|`--ssl-cert-path`|Absolute path to the `.cert` file if TLS is used. Must be provided together with `--ssl-key-path`. See the [SSL/TLS/SPDY Support guide](../../guides/tls.md) for details.|string||\n|`--ssl-key-path`|Absolute path to the `.key` file if TLS is used. Must be provided together with `--ssl-cert-path`. See the [SSL/TLS/SPDY Support guide](../../guides/tls.md) for details.|string||\n|`--strict-caps`|Prevent creation of new client sessions that use unsupported capabilities|boolean|`false`|\n|`--tmp`|Absolute path to the directory used for temporary files|string|[`os.tmpdir()`](https://nodejs.org/api/os.html#ostmpdir)|\n|`--use-drivers`|List of drivers to activate. By default, all installed drivers are activated.|array|`[]`|\n|`--use-plugins`|List of plugins to activate. By default, no plugins are activated. Set to `[\"all\"]` to activate all installed plugins.|array|`[]`|\n|`--webhook`, `-G`|URL for an HTTP listener where the server logs should be output. This does not affect output on the console.|string||\n\n### Info Options\n\nThe following options are used for reference or debug purposes. They are only supported for the base `appium` command (not `appium server`), and will not launch the server.\n\n|
Argument
|Description|\n|--|--|\n|`--show-build-info`|Print detailed information on the Appium server version|\n|`--show-config`|Print the current Appium server configuration details|\n|`--show-debug-info`|Print information on the current environment: details about the operating system, Node.js, and Appium itself|\n|`--version`, `-v`|Print the Appium server version|\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/reference/cli/setup.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: appium setup\n---\n\n\nInstalls a specific preset of extensions (drivers and plugins), or uninstalls all extensions.\nWhen installing a preset, any already installed extensions are kept intact.\n\nThe following sub-subcommands are supported: `browser`, `desktop`, `mobile`, and `reset`.\n\nRefer to the [Ecosystem documentation](../../ecosystem/index.md) to learn more about the extensions\nmentioned below.\n\n## `browser`\n\nInstalls the following extensions for browser webview testing:\n\n* Drivers: `safari`[^1], `gecko`, `chromium`\n* Plugins: `images`, `inspector`\n\n#### Usage\n\n```\nappium setup browser\n```\n\n## `desktop`\n\nInstalls the following extensions for desktop application testing:\n\n* Drivers: `mac2`[^1], `windows`[^2]\n* Plugins: `images`, `inspector`\n\n#### Usage\n\n```\nappium setup desktop\n```\n\n## `mobile`\n\nInstalls the following extensions for mobile testing:\n\n* Drivers: `uiautomator2`, `xcuitest`[^1], `espresso`\n* Plugins: `images`, `inspector`\n\n#### Usage\n\n```\nappium setup mobile\n```\n\nYou can also omit the `mobile` sub-subcommand:\n\n```\nappium setup\n```\n\n## `reset`\n\nUninstalls all installed extensions, along with their manifest files, from the Appium home\ndirectory. This can be useful if you experience configuration issues on server startup, for\nexample, due to a failed upgrade attempt from an older Appium version.\n\n#### Usage\n\n```\nappium setup reset\n```\n\n[^1]: Only installed if the host machine is running macOS.\n[^2]: Only installed if the host machine is running Windows.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/resources/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - navigation\n - toc\n\ntitle: Additional Resources\n---\n\nHere you can find links to additional Appium resources around the web:\n\n## Websites\n\n- [Appium Pro](https://appiumpro.com) - a blog and newsletter written by one of Appium's\nmaintainers, Jonathan Lipps, with lots of useful guides\n\n## Online Courses\n\n- [Appium and Selenium Fundamentals](https://ui.headspin.io/university/learn/appium-selenium-fundamentals-2020) - a comprehensive video course on learning Python, Selenium, and Appium by Jonathan Lipps\n- [Mobile Test Automation with Appium](https://testautomationu.applitools.com/appium-java-tutorial/) - a video course by Moataz Nabil\n- [Advanced Appium](https://www.linkedin.com/learning/advanced-appium) - a video course by Jonathan Lipps\n\n## Conference Archives\n\n- [AppiumConf 2018](https://www.youtube.com/playlist?list=PLhr2WKNPXcZOmOf1k2aqkbMZwnZb2pSZL)\n- [AppiumConf 2019](https://www.youtube.com/playlist?list=PL9Z-JgiTsOYSfJh9YKI9Stj3FMwHERw6w)\n- [AppiumConf 2021](https://www.youtube.com/playlist?list=PL9Z-JgiTsOYRCcJhDfmKAah9XmAp2b903)\n- [AppiumConf 2024](https://www.youtube.com/playlist?list=PL9Z-JgiTsOYQaU5i5LJtAWlh5WVZPi3If)\n- [SeleniumConf & AppiumConf 2025](https://www.youtube.com/playlist?list=PLRdSclUtJDYV2R92TLbmwxws6clruuTjH)\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/en/sponsors/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - navigation\n - toc\n\ntitle: Sponsors & Backers\n---\n\n\n\nAppium is an Apache-2 licensed open source project whose development is made possible entirely by\ndonations of time and money by individuals and companies who benefit from our software and our\nmission. If you'd like to join this amazing group and help ensure Appium's continued development\nand maintenance, you can contribute via [Appium's OpenCollective\nHub](https://opencollective.com/appium).\n\n## Development Partners\n\nWe are very grateful for the support of our Development Partners, who donate Appium development and\nmaintenance as part of their employees' core job duties!\n\n\n \"TestMu\n \"TestMu\n\n\n## Strategic Partners\n\nWe are very grateful for the financial and marketing support of our exclusive Strategic Partners,\nwho contribute a significant ongoing investment of funds to help the project attract and reward\ncontributors!\n\n\n \"BrowserStack\"\n \"BrowserStack\"\n\n\n\n \"TestMu\n \"TestMu\n\n\n## Gold Sponsors\n\n
\n \"Jetify\"\n
\n\n[Become a Gold Sponsor](https://opencollective.com/appium/contribute/gold-sponsor-72877/checkout?interval=month&amount=500&contributeAs=me)\n\n## Silver Sponsors\n\n
\n \"MagicPod\"\n
\n\n[Become a Silver Sponsor](https://opencollective.com/appium/contribute/silver-sponsor-72876/checkout?interval=month&amount=250&contributeAs=me)\n\n## Bronze Sponsors\n\n
\n \"Route4Me\"\n \"WebdriverIO\"\n
\n\n[Become a Bronze Sponsor](https://opencollective.com/appium/contribute/sponsors-70690/checkout?interval=month&amount=100&contributeAs=me)\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - navigation\n - toc\n\ntitle: \u3088\u3046\u3053\u305d\n---\n\n\n\n
\n \n
\n\nAppium\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u3088\u3046\u3053\u305d\uff01 Appium\u306f\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308a\u3001\u305d\u306e\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u306f\u591a\u69d8\u306a\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3001\u4f8b\u3048\u3070\u30e2\u30d0\u30a4\u30eb\uff08iOS\u30fbAndroid\u30fbTizen\uff09\u3084\u30d6\u30e9\u30a6\u30b6\uff08Chrome\u30fbFirefox\u30fbSafari\uff09\u3001\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\uff08macOS\u30fbWindows\uff09\u3001TV\uff08Roku\u30fbtvOS\u30fbAndroid TV\u30fbSamsung\uff09\u306b\u5bfe\u3059\u308bUI\u81ea\u52d5\u5316\u3092\u652f\u63f4\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n\n
\n Appium\u306f\u30d1\u30fc\u30c8\u30ca\u30fc\u306e\u30b5\u30dd\u30fc\u30c8\u306b\u975e\u5e38\u306b\u611f\u8b1d\u3057\u3066\u3044\u307e\u3059\uff01 \uff08\u79c1\u305f\u3061\u306e\u30b9\u30dd\u30f3\u30b5\u30fc\u30b7\u30c3\u30d7\u3068\u8ca2\u732e\u8005\u3078\u306e\u5831\u916c\u306e\u67a0\u7d44\u307f\u306f\u3053\u3061\u3089\u304b\u3089\uff09 \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n\n## \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u691c\u7d22\u3059\u308b\n\n
\n\n- [**Introduction**](./intro/index.md) \u3092\u8aad\u3093\u3067\u3001\u4e3b\u8981\u306a\u30b3\u30f3\u30bb\u30d7\u30c8\u3092\u7406\u89e3\u3057\u3066\u304f\u3060\u3055\u3044\n- [**Quickstart**](./quickstart/index.md) \u3092\u901a\u3057\u3066\u3001\u57fa\u672c\u7684\u306aAndroid\u30c6\u30b9\u30c8\u3092\u7528\u610f\u3001\u5b9f\u884c\u3057\u307e\u3059\u3002\n- \u4f7f\u7528\u3059\u308b\u30c9\u30e9\u30a4\u30d0\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4e00\u89a7\u306b\u3064\u3044\u3066\u306f\u3001 [**Ecosystem**](./ecosystem/index.md) \u30da\u30fc\u30b8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n- Consult the [**Reference**](./reference/index.md) page for information on the Appium CLI and supported endpoints\n- Read the different [**Guides**](./guides/migrating-2-to-3.md) for a variety of instructions, tips and tricks\n- Check out various third-party [**Resources**](./resources/index.md) to explore Appium around the web\n- \u72ec\u81ea\u306e Appium \u62e1\u5f35\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001 [**Developer**](./developing/index.md) \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n- For contributions to Appium itself, refer to the [**Contributing**](./contributing/index.md) page\n- Have a look at the [**Appium Blog**](./blog/index.md) to learn what's new in the project\n\n
\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/blog/posts/announcing-appiumconf2024.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - srini\n - sai\ndate: 2024-07-13\n---\n\n# Appium Conf 2024: Call for Proposals Now Open!\n\nWe're thrilled to announce that Appium Conf is back and going online for 2024! This is the official Appium conference where you can learn all about what's new in Appium 2.0 and explore the latest in automating tests for devices, mobile apps, and desktop applications.\n\n\n\n
\n \n \"Appium\n\n
\n\n## Mark Your Calendars: September 13, 2024\n\nJoin us on September 13, 2024, for a full day of inspiring and practical talks from the Appium team and the world's top mobile testing and automation experts. With Appium 2.0 now well-established, this is your opportunity to dive deep and learn how to maximize its potential.\n\n## Why Attend Appium Conf 2024?\n\n1. **Gain Insights**: Hear interesting insights and inspiring case studies from global experts and the core Appium team.\n2. **Improve Your Strategy**: Gain valuable knowledge to enhance your own automation strategy.\n3. **Network**: Make connections with Appium users from around the globe.\n4. **Learn from Specialists**: Benefit from Appium specialists' expertise on a variety of topics.\n\n## Call for Proposals: Share Your Knowledge!\n\nWe're looking for a diverse range of speakers from around the globe who are eager to share innovative ideas and use-cases of mobile test automation. If you have experience with Appium and insights that could benefit the community of test practitioners, we want to hear from you!\n\nDon't miss this chance to contribute to the Appium community and showcase your expertise on a global stage.\n\n## How to Submit Your Proposal\n\nVisit our website at [https://appiumconf.com/](https://appiumconf.com/) and [Submit a Proposal](https://confengine.com/conferences/appium-conf-2024/proposals?utm_medium=referal&utm_source=appium.io&utm_campaign=launch). We're excited to see your innovative ideas and experiences with Appium!\n\n## Stay Tuned\n\nKeep an eye on our website and social media channels for updates on the conference schedule, keynote speakers, and more exciting details about Appium Conf 2024.\n\nJoin us in shaping the future of mobile and device test automation. Submit your proposal today and be part of this exciting event!\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/blog/posts/announcing-browserstack-as-strategic-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-06-10\n---\n\n# Announcing BrowserStack as Appium's Strategic Partner\n\nWe have another exciting announcement for you! As part of our recently-announced sponsorship and\ncontributor compensation\nprogram,\nwe are obviously in need of significant funding to support giving back to our contributor\ncommunity. We are therefore extremely happy to announce one of our brand new exclusive Strategic Partners: BrowserStack!\n\n\n\n\n\nBrowserStack has long been recognized in the industry as having extensive support for Appium,\nallowing you to run functional and visual regression tests for your native and hybrid apps at scale\nacross a variety of devices and platforms.\n\nAs a token of this collaboration, BrowserStack is extending a special premium access of\nBrowserStack App Automate product to Appium users. Discover more about this special offer at\n[browserstack.com](https://www.browserstack.com/browserstack-appium?utm_campaigncode=701OW00000AoUTQYA3&utm_medium=partnered&utm_source=appium&utm_term=partannouncement)\n\nWith the decision to come on board as Strategic Partner, BrowserStack is making a huge investment\nin Appium and the Appium community. BrowserStack is very interested in supporting the development\nof the Appium contributor base, and is proud to be a key part of our contributor compensation\nscheme. Without Strategic Partners like BrowserStack, we would not be able to maintain such\na program! We welcome them with gratitude!\n\n**About BrowserStack**\n\nBrowserStack is the world\u2019s leading software testing platform powering over two million tests every\nday across 19 global data centers. BrowserStack helps Tesco, Shell, NVIDIA, Discovery, Wells Fargo,\nand over 50,000 customers deliver quality software at speed by moving testing to their Cloud.\nBrowserStack\u2019s platform provides instant access to 20,000+ real mobile devices on a highly reliable\ncloud infrastructure that effortlessly scales as testing needs grow. With BrowserStack, Dev and QA\nteams can move fast while delivering an amazing experience for every customer.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/blog/posts/announcing-headspin-as-development-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-06-06\n---\n\n# Announcing HeadSpin as Appium's Development Partner\n\nRecently, we announced a new [sponsorship and contributor compensation program](https://appium.io/docs/en/latest/blog/2024/05/14/announcing-appiums-sponsorship-program/) for the Appium\nproject. As part of this program, we felt it was important to have a place to recognize those\ncompanies who make an extremely valuable kind of contribution to the project: dedicated maintainer\ntime. Appium only survives because of the tireless efforts of the core maintainers, and some of us\nare only able to do this work because it is donated on behalf of our day jobs. We're therefore very\nexcited to announce our first Development Partner: HeadSpin!\n\n\n\n
\n \n
\n\nHeadSpin is a real device performance and UX analysis cloud, with full support for Appium. When you\nrun your Appium tests on HeadSpin, you get access to comprehensive performance reports about your\napp, including potential network, system resource, or user experience issues. HeadSpin supports\na variety of complex testing modes, including hooking up your own devices to the cloud, injecting\nand receiving video and audio to/from devices, working with media (streaming) platforms, and more.\n\nHeadSpin has been one of the Appium project's biggest supporters for a long time, and currently\nemploys two of Appium's core maintainers, donating a significant portion of their time towards the\ndevelopment, maintenance, support, and leadership of open source Appium repos. HeadSpin has also\nworked hard towards Appium's vision of a robust Appium ecosystem, contributing several\nHeadSpin-maintained Appium drivers and plugins to the community:\n\n- A [Roku TV driver](https://github.com/headspinio/appium-roku-driver)\n- A [Tizen TV driver](https://github.com/headspinio/appium-tizen-tv-driver/)\n- A [LG webOS TV driver](https://github.com/headspinio/appium-lg-webos-driver/)\n- A [Unity game automation plugin](https://github.com/headspinio/appium-altunity-plugin)\n\nThese are all free and open source Appium components that HeadSpin has donated to the community\nwith the goal of fostering collaboration in these areas of media app automation.\n\nLooking to the future, HeadSpin plans to continue supporting Appium in significant ways, both as\na Development Partner and a significant contributor to the Appium ecosystem. The Appium project is\ndeeply indebted to HeadSpin for all of its support, and is proud to take this moment to recognize\nHeadSpin as our first official Development Partner!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/blog/posts/announcing-lambdatest-as-development-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - sai\n - srini\ndate: 2025-11-25\n---\n\n# Announcing LambdaTest as Appium's Newest Development Partner\n\nAs part of our ongoing effort to recognize organizations that meaningfully support the Appium project through dedicated maintainer time, we are excited to welcome our newest Development Partner: LambdaTest!\nLambdaTest has long been an active participant in the automated testing ecosystem. Today, they are officially formalizing their commitment by investing people\u2014dedicated engineers who will directly support Appium's development, maintenance, and ecosystem growth.\nThis kind of hands-on contribution is crucial for ensuring Appium continues to evolve. We deeply value partners who empower their engineering teams to contribute code directly to open source rather than just sponsorship.\n\n\n\n\n\nLambdaTest engineers are already contributing actively across several key Appium repositories. Their current focus includes:\n**appium-mcp** \u2013 Supporting Appium's implementation of the Model Context Protocol (MCP) to drive forward modern AI-assisted capabilities.\n**appium-remote-xpc** \u2013 Contributing to the native macOS/XPC-based remote execution layer, essential for iOS automation.\n**appium-tun-tap** \u2013 Assisting in the development and maintenance of network virtualization and tunneling components for advanced testing scenarios.\n\nThese contributions strengthen critical infrastructure within the Appium ecosystem and demonstrate LambdaTest's commitment to deep technical involvement in the project's evolution.\nAbout LambdaTest\n\nLambdaTest\u2019s platform already serves a massive community of Appium users. As a GenAI-powered Quality Engineering Platform, they provide a full-stack testing cloud with 10,000+ real mobile devices and 3,000+ browsers.\nBeyond standard infrastructure, they are pushing the boundaries of test execution with AI-native test management and next-generation agents like KaneAI. By supporting Appium alongside Selenium, Playwright, and other major frameworks, LambdaTest helps teams orchestrate intelligent automation at cloud scale.\n\nLambdaTest will continue contributing people, code, and development expertise to strengthen Appium's core functionality. Their commitment represents a significant investment into the future of the framework, and we're thrilled to have them collaborating with us at this deeper level.\nThe Appium project is proud to recognize LambdaTest as our newest official Development Partner. We can't wait to see what we'll build together!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/blog/posts/announcing-lambdatest-as-strategic-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2025-07-01\n---\n\n# Announcing LambdaTest as Appium Strategic Partner\n\nAfter recently celebrating the 1-year anniversary of our Sponsorship Program and Compensation\nScheme,\nthe Appium project is very excited to announce that LambdaTest\nis coming on board as one of our Strategic Partners!\n\n\n\n\n\nHaving long been active in the Appium community and the automated testing industry, LambdaTest is\nnow significantly stepping up their investment into these areas. With the decision to come on board\nas a Strategic Partner, LambdaTest will support the Appium project through financial contribution\nas well as contribution of code and project maintenance. Obviously, without the generous support of\npartners like LambdaTest, we would not be able to continue our contributor compensation scheme,\nwhich has seen the release of a substantial amount of funds to Appium maintainers and contributors\nover the last year. Thanks again to LambdaTest, and stay tuned for more collaboration updates\nthroughout the year!\n\n**About LambdaTest**\n\nLambdaTest is a GenAI-powered Quality Engineering Platform that empowers teams to test\nintelligently, smarter, and ship faster. Built for scale, it offers a full-stack testing cloud with\n10K+ real mobile devices and 3,000+ browsers. With AI-native test management, MCP servers, and\nagent-based automation, LambdaTest supports Selenium, Appium, Playwright, and all major frameworks.\nAI Agents like HyperExecute and KaneAI bring the power of AI and cloud into your software testing\nworkflow, enabling seamless automation testing with 120+ integrations. LambdaTest Agents accelerate\nyour testing throughout the entire SDLC, from test planning and authoring to automation,\ninfrastructure, execution, RCA, and reporting.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/blog/posts/announcing-sauce-labs-as-strategic-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-06-10\n---\n\n# Announcing Sauce Labs as Appium's Strategic Partner\n\nThe good news surrounding our new sponsorship and contributor compensation\nprogram\njust keeps coming! Effective immediately we are fortunate and excited to be able to welcome a new Strategic Partner to\nthe Appium project: Sauce Labs!\n\n\n\n
\n \n
\n\nSauce Labs has a long history of support for the Appium project. In fact, Appium was initially\nincubated at Sauce Labs under the direction of [@jlipps](https://github.com/jlipps), in the early\ndays of mobile automation. Sauce Labs always envisioned Appium as being a project for and by the\ncommunity, and cemented this perspective in 2016 with the donation of Appium to the JS Foundation\n(now the [OpenJS Foundation](https://openjsf.org/)). To this day, developers associated with Sauce\nLabs continue to help maintain various parts of the Appium project.\n\nNow, Sauce Labs is making a further commitment to support Appium financially as a way to enable\nour new contributor compensation program. We're very excited about this program as a vehicle for\ngetting more people involved in Appium's development and maintenance. With the help of Strategic\nPartners like Sauce Labs, our project will be better able to meet the needs of our constantly\ngrowing userbase, and attract new developers (like you?) to build the Appium ecosystem together.\nNeedless to say, we are extremely grateful for Sauce Labs's support!\n\n**About Sauce Labs**\n\nSauce Labs is the leader in continuous quality. Our Platform for Test helps organizations transform software testing from a chore to a competitive advantage. With decades of expertise and deep roots in the Selenium and Appium open source communities, high performing software teams use our platform to execute any testing workload across thousands of different devices, browsers, and operating systems\u2014anywhere, any time, and at any scale. For more information, please visit [saucelabs.com](https://saucelabs.com).\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/blog/posts/announcing-sponsorship-program.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-05-14\n---\n\n# Announcing Appium's Sponsorship Program\n\nOver the last several months, the Appium team has been working on a sponsorship program that is\ndesigned to help give back to Appium's contributors as well as to recognize important partner\nindividuals or companies in the industry. This program is now officially launching! Let's dive into\nsome of the details.\n\n\n\nFirst of all, the details and fine print will always be available at Appium's Governance\ndocument, which outlines how the\nproject is run, who makes project decisions, etc... This document will be kept up to date with the\nlatest details of the program, so that's the place to bookmark for reference!\n\nAs of now, Appium has opened up sponsorship opportunities via our OpenCollective\npage. OpenCollective is a service which allows people to donate\nto open source groups. We've defined a number of giving tiers for donations, within a very wide\nrange, and welcome any financial amount with gratitude! Based on the donation tier, sponsorship\ncomes with a variety of benefits, including recognition at different places in the Appium repo,\ndocs, and website. In addition to financial sponsorship, the project has decided to recognize\nsignificant donations of project leadership and maintenance efforts from companies who have\ninvested heavily into Appium with their employees' time (we call these \"Development Partners\").\n\nWhat will the project do with the funds raised through this sponsorship program? We aim to give it\nall back to the Appium community! With the details again available at our [Governance document](https://github.com/appium/appium/blob/master/GOVERNANCE.md),\nwe have implemented a scheme very much inspired by our friends at [WebdriverIO](https://webdriver.io/blog/2024/02/15/new-contributor-stipend-program) (thanks WDIO\nfriends!) There are three groups of contributors to Appium that this scheme supports: (1) project\nmaintainers (those who devote consistent time to leading the project), (2) project contributors\n(anyone in the wider community that contributes code or documentation), and (3) upstream projects\n(other open source projects Appium relies heavily on to work well). Each month, the funds raised\nvia sponsorship will be distributed in different amounts to each of these groups. So if you\nmake a valuable contribution to Appium moving forward, you'll be eligible to get some cash as\na thank-you! (You'll need to have your own OpenCollective account in good standing to receive\nfunds).\n\nWe're very excited about this new program, and hope that it helps existing and new contributors to\nfeel even better about donating their time to making Appium better. And of course, none of this\nwould be possible without the amazing Partners and Sponsors we hope to attract! On that note, stay\ntuned over the next few weeks as we unveil some of our initial program launch Partners! And if you\nor your company would like to participate by supporting Appium financially, you are most welcome.\nJust head over to our OpenCollective page and choose the tier that reflects your desired\ncontribution level.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/blog/posts/appium3.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - sai\n - srini\n - jlipps\ndate: 2025-08-07\n---\n\n# \ud83d\ude80 Appium 3\n\nAppium 3 is here \u2014 and while it's not as massive a leap as Appium 2, it introduces a few essential\nbreaking changes that developers and QA engineers should be aware of.\n\n\n\nThe main idea behind Appium 3 is to clear out old cruft so that Appium can be leaner moving\nforward, and rely on newer versions of software with better performance and security\ncharacteristics. We're also getting rid of legacy behaviors and protocols that we deprecated as\npart of Appium 2.\n\nFor you as a user, there's not much to worry about. The breaking changes are minimal:\n\n- Node.js / NPM minimum version bump (to 20.19 / 10)\n- Removal of certain deprecated endpoints\n- Security feature flag prefix requirements (e.g. `adb_shell` to `uiautomator2:adb_shell`)\n\nIn terms of new features, we've been adding them incrementally rather than saving them up for\nAppium 3. But with this release we are excited to share these new capabilities:\n\n- `appium plugin install inspector` (Use Appium to host the Inspector rather than downloading it as a separate app)\n- Clients can set the `X-Appium-Is-Sensitive` HTTP header on requests to direct the server to mask the data in the request in the logs, so that when you send a password into an input box, the password's actual value is not logged in plaintext. ([Learn more](../../developing/sensitive.md))\n\nOf course, we have a full [Appium 3 migration guide](../../guides/migrating-2-to-3.md) to make sure\nyou know all the details and can deeply understand the consequences of upgrading to Appium 3 in\nyour environment.\n\n---\n\n**Ready to make the leap?** Appium 3 is a great step forward in creating more secure, maintainable,\nand W3C-compliant test automation pipelines. Happy testing!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/blog/posts/hello-world.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-03-07\n---\n\n# Hello World!\n\nThis is the first post in the Appium blog. There's not much to see here yet. We're creating this\nspace so we can make announcements or post other news, or information about events, that don't\nreally fit inside the documentation itself.\n\n\n\nStay tuned for more!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/contributing/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - navigation\n\ntitle: Contributing to Appium\n---\n\nThe Appium project would not exist without the many contributions of code, documentation,\nmaintenance, and support from companies and volunteers. As such, we welcome contributions!\n\nThere are a lot of different ways to help the project - see below for everything you can do and the\nprocesses to follow for each contribution method. Note that no matter how you contribute, your\nparticipation is governed by our [Code of Conduct](https://github.com/appium/appium/blob/master/CONDUCT.md).\n\n## Join the Discussion Forum\n\nYou don't need to know the internals of Appium to be able to contribute! If you have experience with\nusing Appium and feel like sharing your knowledge with others, consider helping out users on the\nAppium forums at [discuss.appium.io](https://discuss.appium.io/). Hop on over and see if there are\nany questions that you can answer.\n\n## Report Bugs or Feature Requests\n\nIf you've encountered a bug, or have a cool feature in mind that you think Appium should support,\nmake sure to let us know at our [GitHub issue tracker](https://github.com/appium/appium/issues).\nPlease use the appropriate issue form template when creating your issue.\n\n## Triage Issues\n\nIn addition to creating issues, you can also help us investigate already reported issues. All you\nneed is enough familiarity with Appium to try and reproduce bugs.\n\nYou can get started by checking our [GitHub issue tracker](https://github.com/appium/appium/issues)\nfor issues with labels such as `Needs Triage` or `Needs Info`, and leaving relevant comments:\n\n- If the issue is a duplicate, drop a link to the original issue\n- If the user has not provided enough information (such as Appium logs), ask them for more details\n- If you can reproduce the problem on your own environment, provide all the information that you think\n would help us track down the cause of the issue\n\nFor further information on triaging Appium issues (for any Appium project repository), please contact\nany member of the [Technical Committee](https://github.com/appium/appium/blob/master/GOVERNANCE.md#the-technical-committee).\n\n## Contribute Code\n\nWe are always open to pull requests for improving the Appium code or documentation!\n\n!!! info\n\n Developer information may not be kept up to date as frequently as user-facing information, or\n it may be most relevant in its current form on the online repository, not in this published\n version. Make sure to check the repo or discuss with maintainers. We would be glad to help\n new contributors get started!\n\nStart by cloning the repository (we recommend [forking](https://github.com/appium/appium/fork)\nit first):\n\n```sh\ngit clone https://github.com/appium/appium.git\ncd appium\n```\n\n!!! info\n\n If you are VS Code user, you can easily check out the project using [Runme](https://runme.dev/api/runme?repository=https%3A%2F%2Fgithub.com%2Fappium%2Fappium.git&fileToOpen=packages%2Fappium%2Fdocs%2Fen%2Fcontributing%2Findex.md).\n\nInstall dependencies:\n\n```sh\nnpm install\n```\n\nFrom here on there are several things you can do.\n\nBuild the project:\n\n```sh\nnpm run build\n```\n\nBuild the project and watch for changes:\n\n```sh\nnpm run dev\n```\n\nStart the locally built Appium server:\n\n```sh\nnpm start\n```\n\nRun various tests:\n\n```sh\nnpm run lint\nnpm run test:unit\nnpm run test:types\nnpm run test:smoke\nnpm run test:e2e\nnpm run test:quick # unit and types\nnpm run test:slow # everything\n```\n\nYou can also run tests for specific workspaces, e.g.:\n\n```sh\nexport APPIUM_WORKSPACE=@appium/base-driver\nnpm run test:unit -w $APPIUM_WORKSPACE\n```\n\n### Documentation\n\nThe documentation for this project is [available in the project repository itself](https://github.com/appium/appium/tree/master/packages/appium/docs).\nIt is contained in Markdown files, which are built by our documentation system in the\n`@appium/docutils` module. This module is based on [MkDocs](https://www.mkdocs.org/) and therefore\nrequires [Python](https://www.python.org/) to be installed on your system.\n\nInstall Python dependencies:\n\n```sh\nnpm run install-docs-deps\n```\n\nAfter making your changes, you can run the documentation server in dev mode:\n\n```sh\nnpm run dev:docs\n```\n\nYou can then view the documentation at `http://127.0.0.1:8000/docs/en`.\n\n## Translating Appium Documentation\n\nThe process of Appium documents localization into languages other than English is automated and is done via\nthe [Crowdin Translations Management System](https://crowdin.com). Do not edit any translated documents\ndirectly in the GitHub Appium repository as they are going to be replaced with ones exported from Crowdin\nduring an upcoming sync.\n\n### Where To Start\n\nIf you would like to contribute to the translation of Appium documents into your language then simply join\nthe translators group for the [Appium Documentation](https://crowdin.com/project/appium-documentation)\nCrowdin project, and start translating documents there. If you see that your language is missing from\nthe list of available Crowdin languages then simply let us know by creating an\n[issue](https://github.com/appium/appium/issues).\n\n### Source Language Updates\n\nChanges in documents are synchronized to Crowdin automatically via the `Update Crowdin English Docs` GitHub action.\nThis action is triggered automatically as soon as there are any changes under `packages/appium/docs/en/**.md`\nor `packages/appium/docs/mkdocs-en.yml`.\n\n### Fetching Translated Documents\n\nIn order to fetch translated files from Crowdin to the GitHub repository it is necessary to trigger\nthe `Sync Crowdin Docs Translations` action. This action should also automatically create a PR with\ncorresponding translated resources included.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/developing/build-docs.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Building Documentation\n---\n\nOnce you've [built a driver](./build-drivers.md) or [built a plugin](./build-plugins.md) for Appium,\nyou will hopefully want to document how that extension works for your users. The most basic way of\ndoing this is to write up a quick `README.md` and keep it in the root of your project's repository.\nHowever, this can involve a lot of effort.\n\nThe Appium project has built tools to help with this, and we've packaged up these tools so our\necosystem developers building drivers and plugins can _also_ use them. The best way to get going\nwith these tools is probably to look at an existing Appium driver repo to see how it's done, for\nexample the [XCUITest driver repo](https://github.com/appium/appium-xcuitest-driver). But this guide\nwill outline the basic approach.\n\n### Conceptual architecture\n\nAppium settled on [MkDocs](https://www.mkdocs.org/) as a Markdown-based documentation site\ngenerator. It uses a Python toolchain (and not Node.js), but it turned out to be the best option\nfor our purposes. You can adjust this, but by default Appium's utilities also assume that you'll be\nusing the [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) theme/extension for\nMkDocs.\n\nIn order to make different versions of your docs available (one for each minor release of your\nextension, typically), we also bundle [Mike](https://github.com/jimporter/mike).\n\nFrom here, building a basic docs site is as easy as collecting your Markdown files together and\ndefining how you want them to be organized.\n\n### Prerequisites\n\nTo take advantage of Appium's documentation utilities, you'll need to install:\n\n- [Python v3+](https://www.python.org/downloads/)\n- [pip](https://pip.pypa.io/en/stable/installation/) (this may be installed automatically with Python)\n- The `@appium/docutils` package:\n\n ```bash\n npm install --save-dev @appium/docutils\n ```\n\n### Initializing an Extension for Building Docs\n\nTo prepare your extension for generating documentation, run the following command:\n\n```bash\nnpx appium-docs init\n```\n\nThis will:\n\n1. Create a `tsconfig.json` if one does not already exist. This is necessary even if your extension\n is not written in TypeScript.\n2. Create a `mkdocs.yml` with the necessary configuration for MkDocs.\n\n### Documenting Your Extension\n\nAt this point, you can begin documenting your extension. By default, MkDocs will look for Markdown\nfiles in the `docs` directory. You can therefore create your Markdown documentation files, place\nthem in `docs`, and add links to these files in `mkdocs.yml`.\n\nRefer to the [MkDocs documentation](https://www.mkdocs.org/user-guide/writing-your-docs/) for\ninformation on how to organize and structure your documentation.\n\n### Building the Docs\n\nAt this point, you can use the `appium-docs` CLI tool. Run this tool with no arguments to get the\nfull help output and see all the available subcommands and parameters. Here are a few usage\nexamples:\n\n```bash\n# Generate reference and build the mkdocs site into the site dir\nnpx appium-docs build\n\n# Same as build, but host the docs on a local dev server\n# and watch for changes and rebuild when files change\nnpx appium-docs build --serve\n\n# Build the docs and deploy them with mike versioning to the docs-site branch\n# using the included commit message.\n# This is particularly useful for pushing content to a GitHub pages branch!\nnpx appium-docs build \\\n --deploy \\\n -b docs-site \\\n -m 'docs: auto-build docs for appium-xcuitest-driver@%s'\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/developing/build-doctor-checks.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Building Doctor Checks\n---\n\nThe idea of Appium Doctor is to assist users with driver or plugin preconditions setup. Sometimes such\npreconditions might be quite complicated and require non-trivial technical knowledge. Doctor checks,\nwhich are vanilla Node.js class instances written by extension authors, simplify\nthe setup process by automating diagnostics and possible fixes for the found issues. These checks\nmight also be interactive to ensure better usage experience.\n\nThis tutorial is supposed to be used by plugin or driver authors that would like to help their users\nto deal with complicated setup or configuration steps.\n\n## Adding Doctor Checks\n\n### Typing Requirements\n\nThe term `Doctor Check` literally describes a single javascript class instance that implements the\n[IDoctorCheck interface](https://github.com/appium/appium/blob/master/packages/types/lib/doctor.ts).\nThe interface defines the following methods and properties:\n\n- `diagnose(): Promise`: Contains the code to diagnose a possible issue\n- `fix(): Promise`: Either fixes the actual problem if `hasAutofix()` returns true or\n returns a string description for possible manual fixes. If this method throws an exception named\n `FixSkippedError` and `hasAutofix()` returns true then the result of the method invocation\n is going to be ignored.\n- `hasAutofix(): boolean`: Whether calling `fix()` would resolve the found issue\n- `isOptional(): boolean`: Whether the found issue can be ignored and is not a showstopper\n- `log: AppiumLogger`: May be used for logging. This property may be assigned\n by the instance itself or by the Appium server if it is left unassigned.\n\nThe `DoctorCheckResult` object returned by the `diagnose()` method must contain the following properties:\n\n- `ok: boolean`: Whether the diagnosis found no issues\n- `optional: boolean`: Whether the diagnosed issue is safe to ignore\n- `message: string`: The text message describing the diagnostic result\n\n### Manifest Requirements\n\nA single extension may export multiple Doctor checks to Appium. In order for these checks to be properly\npicked up by the server CLI after the corresponding extension is installed they might be listed in the\npackage .json manifest under the `appium.doctor.checks` section similar to the definition below:\n\n```json\n // ...\n \"appium\": {\n \"driverName\": \"fake\",\n \"automationName\": \"Fake\",\n \"platformNames\": [\n \"Fake\"\n ],\n \"mainClass\": \"FakeDriver\",\n \"schema\": \"./build/lib/fake-driver-schema.js\",\n \"scripts\": {\n \"fake-error\": \"./build/lib/scripts/fake-error.js\",\n \"fake-success\": \"./build/lib/scripts/fake-success.js\",\n \"fake-stdin\": \"./build/lib/scripts/fake-stdin.js\"\n },\n \"doctor\": {\n \"checks\": [\n \"./doctor/fake1.js\",\n \"./doctor/fake2.js\"\n // ...\n ]\n }\n },\n // ...\n```\n\nAlso, it makes sense to include the [@appium/types](https://www.npmjs.com/package/@appium/types) import\nto the package dev dependencies.\n\n### Implementation Example\n\nThe below example is a \"raw\" Node.JS implementation that does not use any transpilation:\n\n```js\nconst {fs, doctor} = require('@appium/support');\n\n/** @satisfies {import('@appium/types').IDoctorCheck} */\nclass EnvVarAndPathCheck {\n /**\n * @param {string} varName\n */\n constructor(varName) {\n this.varName = varName;\n }\n\n async diagnose() {\n const varValue = process.env[this.varName];\n if (typeof varValue === 'undefined') {\n return doctor.nok(`${this.varName} environment variable is NOT set!`);\n }\n\n if (await fs.exists(varValue)) {\n return doctor.ok(`${this.varName} is set to: ${varValue}`);\n }\n\n return doctor.nok(`${this.varName} is set to '${varValue}' but this is NOT a valid path!`);\n }\n\n async fix() {\n return (\n `Make sure the environment variable ${this.varName} is properly configured for the Appium server process`\n );\n }\n\n hasAutofix() {\n return false;\n }\n\n isOptional() {\n return false;\n }\n}\n\nconst androidHomeCheck = new EnvVarAndPathCheck('ANDROID_HOME');\n\nmodule.exports = {androidHomeCheck};\n\n/**\n * @typedef {import('@appium/types').DoctorCheckResult} CheckResult\n */\n```\n\nThis file could be saved as `doctor/android-home-check.js` and then added to the package.json manifest\nas\n\n```json\n // ...\n \"appium\": {\n // ...\n \"doctor\": {\n \"checks\": [\n \"./doctor/android-home-check.js\",\n ]\n }\n // ...\n },\n // ...\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/developing/build-drivers.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Building Drivers\n---\n\nAppium wants to make it easy for anyone to develop their own automation drivers as part of the\nAppium ecosystem. This guide will explain what's involved and how you can accomplish various driver\ndevelopment tasks using the tools Appium provides. This guide assumes you (1) are a competent user of\nAppium, (2) are a competent Node.js developer, and (3) that you have read and understood the\n[Driver Intro](../intro/drivers.md).\n\nIf that describes you, great! This guide will get you started.\n\n## Before you create your driver\n\nBefore you get to work implementing your driver, it's important to have a few things sorted out.\nFor example, you need to know what your driver will do. Which platform is it trying to expose\nWebDriver automation for?\n\nAppium doesn't magically give you the power to automate any platform. All it does is give you a set\nof convenient tools for implementing the WebDriver Protocol. So if you want to create, for example,\na driver for a new app platform, you'll need to know how to automate apps on that platform _without Appium_.\n\nThis usually means that you need to be very familiar with app development for a given platform. And\nit usually means that you will rely on tools or SDKs provided by the platform vendor.\n\nBasically, if you can't answer the question **\"how would I launch, remotely trigger behaviours, and\nread state from an app on this platform?\" then you're not quite ready to write an Appium driver**.\nMake sure you do the research to feel comfortable that there _is_ a path forward. Once there is,\ncoding it up and making it available as an Appium driver should be the easy part!\n\n## Other drivers to reference\n\nOne of the greatest things about building an Appium driver is that there are already a number of\nopen source Appium drivers which you can look at for reference. There is\na [fake-driver](https://github.com/appium/appium/tree/master/packages/fake-driver) sample driver which\ndoes basically nothing other than showcase some of the things described in this guide.\n\nAnd of course, all of Appium's official drivers are open source and available in repositories at\nthe project's GitHub organization. So if you ever find yourself asking, \"how does a driver do X?\",\nread the code for these drivers! Also don't be afraid to ask questions of the Appium developers if\nyou get stuck; we're always happy to help make sure the driver development experience is a good\none!\n\n## Basic requirements for Appium drivers\n\nThese are the things your driver _must_ do (or be), if you want it to be a valid Appium driver.\n\n### Node.js package with Appium extension metadata\n\nAll Appium drivers are fundamentally Node.js packages, and therefore must have a valid\n`package.json`. Your driver is not _limited_ to Node.js, but it must provide an adapter written in Node.js so it can be loaded by Appium.\n\nYour `package.json` must include `appium` as a `peerDependency`. The requirements for the\ndependency versions should be as loose as possible (unless you happen to know your driver will only\nwork with certain versions of Appium). For Appium 2, for example, this would look something like\n`^2.0.0`, declaring that your driver works with any version of Appium that starts with 2.x.\n\nYour `package.json` must contain an `appium` field, like this (we call this the 'Appium extension\nmetadata'):\n\n```json\n{\n ...,\n \"appium\": {\n \"driverName\": \"fake\",\n \"automationName\": \"Fake\",\n \"platformNames\": [\n \"Fake\"\n ],\n \"mainClass\": \"FakeDriver\"\n },\n ...\n}\n```\n\nThe required subfields are:\n\n- `driverName`: this should be a short name for your driver.\n- `automationName`: this should be the string users will use for their `appium:automationName`\n capability to tell Appium to use _your_ driver.\n- `platformNames`: this is an array of one or more platform names considered valid for your driver.\n When a user sends in the `platformName` capability to start a session, it must be included in\n this list for your driver to handle the session. Known platform name strings include: `iOS`,\n `tvOS`, `macOS`, `Windows`, `Android`.\n- `mainClass`: this is a named export (in CommonJS style) from your `main` field. It must be a\n class which extends Appium's `BaseDriver` (see below).\n\n### Extend Appium's `BaseDriver` class\n\nUltimately, your driver is much easier to write because most of the hard work of implementing the\nWebDriver protocol and handling certain common logic is taken care of already by Appium. This is\nall encoded up as a class which Appium exports for you to use, called `BaseDriver`. It is exported\nfrom `appium/driver`, so you can use one of these styles to import it and create your _own_ class\nthat extends it:\n\n```js\nimport {BaseDriver} from 'appium/driver';\n// or: const {BaseDriver} = require('appium/driver');\n\nexport class MyDriver extends BaseDriver {\n}\n```\n\n### Make your driver available\n\nThat's basically it! With a Node.js package exporting a driver class and with correct Appium\nextension metadata, you've got yourself an Appium driver! Now it doesn't _do_ anything, but you can\nload it up in Appium, start and stop sessions with it, etc...\n\nTo make it available to users, you could publish it via NPM. When you do so, your driver will be\ninstallable via the Appium CLI:\n\n```\nappium driver install --source=npm \n```\n\nIt's a good idea to test your driver first, of course. One way to see how it works within Appium is\nto install it locally first:\n\n```\nappium driver install --source=local /path/to/your/driver\n```\n\n### Developing your driver\n\nHow you develop your driver is up to you. It is convenient, however, to run it from within Appium\nwithout having to do lots of publishing and installing. The most straightforward way to do this is\nto include the most recent version of Appium as a `devDependency`, and then also your own driver,\nlike this:\n\n```json\n{\n \"devDependencies\": {\n ...,\n \"appium\": \"^2.0.0\",\n \"your-driver\": \"file:.\",\n ...\n }\n}\n```\n\nNow, you can run Appium locally (`npm exec appium` or `npx appium`), and because your driver is\nlisted as a dependency alongside it, it will be automatically \"installed\" and available. You can\ndesign your e2e tests this way, or if you're writing them in Node.js, you can simply import\nAppium's start server methods to handle starting and stopping the Appium server in Node. (TODO:\nreference an implementation of this in one of the open source drivers when ready).\n\nAnother way to do local development with an existing Appium server install is to simply install\nyour driver locally:\n\n```\nappium driver install --source=local /path/to/your/driver/dev/dir\n```\n\n### Refreshing your driver during development\n\nWhen the Appium server starts, it loads your driver into memory. Changes to your driver code will\nnot take effect until the next time the Appium server starts. Simply starting a new session is not\nsufficient to cause your driver's code to be reloaded.\n\nHowever, you can set the `APPIUM_RELOAD_EXTENSIONS` environment variable to `1` to request that\nAppium clear its module cache and reload extensions whenever a new session is requested. This may\nobviate the need to restart the server when you make code changes to your driver.\n\n## Standard driver implementation ideas\n\nThese are things you will probably find yourself wanting to do when creating a driver.\n\n### Set up state in a constructor\n\nIf you define your own constructor, you'll need to call `super` to make sure all the standard state\nis set up correctly:\n\n```js\nconstructor(...args) {\n super(...args);\n // now do your own thing\n}\n```\n\nThe `args` parameter here is the object containing all the CLI args used to start the Appium\nserver.\n\n### Define and validate accepted capabilities\n\nYou can define your own capabilities and basic validation for them. Users will always be able to\nsend in capabilities that you don't define, but if they send in capabilities you have explicitly\ndefined, then Appium will validate that they are of the correct type (and will check for the\npresence of required capabilities).\n\nIf you want to turn capability validation off entirely, set `this.shouldValidateCaps` to `false` in\nyour constructor.\n\nTo give Appium your validation constraints, set `this.desiredCapConstraints` to a validation object\nin your constructor. Validation objects can be somewhat complex. Here's an example from the\nUiAutomator2 driver:\n\n```js\n{\n app: {\n presence: true,\n isString: true\n },\n automationName: {\n isString: true\n },\n browserName: {\n isString: true\n },\n launchTimeout: {\n isNumber: true\n },\n}\n```\n\n### Start a session and read capabilities\n\nAppium's `BaseDriver` already implements the `createSession` command, so you don't have to. However\nit's very common to need to perform your own startup actions (launching an app, running some\nplatform code, or doing different things based on capabilities you have defined for your driver).\nSo you'll probably end up overriding `createSession`. You can do so by defining the method in your\ndriver:\n\n```js\nasync createSession(jwpCaps, reqCaps, w3cCaps, otherDriverData) {\n const [sessionId, caps] = super.createSession(w3cCaps);\n // do your own stuff here\n return [sessionId, caps];\n}\n```\n\nFor legacy reasons, your function will receive old-style JSON Wire Protocol desired and required\ncaps as the first two arguments. Given that the old protocol isn't supported anymore and clients\nhave all been updated, you can instead only rely on the `w3cCaps` parameter. (For a discussion\nabout what `otherDriverData` is about, see the section below on concurrent drivers).\n\nYou'll want to make sure to call `super.createSession` in order to get the session ID as well as\nthe processed capabilities (note that capabilities are also set on `this.caps`; modifying `caps`\nlocally here would have no effect other than changing what the user sees in the create session\nresponse).\n\nSo that's it! You can fill out the middle section with whatever startup logic your driver requires.\n\n### End a session\n\nIf your driver requires any cleanup or shutdown logic, it's best to do it as part of overriding the\nimplementation of `deleteSession`:\n\n```js\nasync deleteSession() {\n // do your own cleanup here\n // don't forget to call super!\n await super.deleteSession();\n}\n```\n\nIt's very important not to throw any errors here if possible so that all parts of session cleanup\ncan succeed!\n\n### Access capabilities and CLI args\n\nYou'll often want to read parameters the user has set for the session, whether as CLI args or as\ncapabilities. The easiest way to do this is to access `this.opts`, which is a merge of all options,\nfrom the CLI or from capabilities. So for example to access the `appium:app` capability, you could\nsimply get the value of `this.opts.app`.\n\nIf you care about knowing whether something was sent in as a CLI arg _or_ a capability, you can\naccess the `this.cliArgs` and `this.caps` objects explicitly.\n\nIn all cases, the `appium:` capability prefix will have been stripped away by the time you are\naccessing values here, for convenience.\n\n### Implement WebDriver classic commands\n\nYou handle WebDriver commands by implementing functions in your driver class. Each member of the\nWebDriver Protocol, plus the various Appium extensions, has a corresponding function that you\nimplement if you want to support that command in your driver. The best way to see which commands\nAppium supports and which method you need to implement for each command is to look at Appium's\n[routes.js](https://github.com/appium/appium/blob/master/packages/base-driver/lib/protocol/routes.js).\nEach route object in this file tells you the command name as well as the parameters you'd expect to\nreceive for that command.\n\nLet's take this block for example:\n\n```js\n'/session/:sessionId/url': {\n GET: {command: 'getUrl'},\n POST: {command: 'setUrl', payloadParams: {required: ['url']}},\n}\n```\n\nHere we see that the route `/session/:sessionId/url` is mapped to two commands, one for a `GET`\nrequest and one for a `POST` request. If we want to allow our driver to change the \"url\" (or\nwhatever that might mean for our driver), we can therefore implement the `setUrl` command, knowing\nit will take the `url` parameter:\n\n```js\nasync setUrl(url) {\n // your implementation here\n}\n```\n\nA few notes:\n\n- all command methods should be `async` functions or otherwise return a `Promise`\n- you don't need to worry about protocol encoding/decoding. You will get JS objects as params, and\n can return JSON-serializable objects in response. Appium will take care of wrapping it up in the\n WebDriver protocol response format, turning it into JSON, etc...\n- all session-based commands receive the `sessionId` parameter as the last parameter\n- all element-based commands receive the `elementId` parameter as the second-to-last parameter\n- if your driver doesn't implement a command, users can still try to access the command, and will\n get a `501 Not Yet Implemented` response error.\n\n### Implement WebDriver BiDi commands\n\n[WebDriver BiDi](https://w3c.github.io/webdriver-bidi) is a newer version of the WebDriver spec\nwhich is implemented over Websockets instead of HTTP. As an Appium driver author you can take\nadvantage of Appium's BiDi support without having to know anything about the BiDi protocol or\nWebsockets. Implementing handlers for BiDi commands works just the same as implementing handlers\nfor WebDriver classic commands (described in the previous section). You simply define a method on\nyour driver of the appropriate name, and it will be called when the BiDi command is requested by\nthe client. To see which specific names you should use for BiDi commands, have a look at\n[bidi-commands.js](https://github.com/appium/appium/blob/master/packages/base-driver/lib/protocol/bidi-commands.js)\n\nYou are not limited to BiDi commands that are defined in the official BiDi specification. If you\nwish to define new commands, you may do so; you just need to tell Appium about them! See\n[below](#extend-the-existing-protocol-with-new-commands) for more information.\n\n### Implement element finding\n\nElement finding is a special command implementation case. You don't actually want to override\n`findElement` or `findElements`, even though those are what are listed in `routes.js`. Appium does\na lot of work for you if instead you implement this function:\n\n```js\nasync findElOrEls(strategy, selector, mult, context) {\n // find your element here\n}\n```\n\nHere's what gets passed in:\n\n- `strategy` - a string, the locator strategy being used\n- `selector` - a string, the selector\n- `mult` - boolean, whether the user has requested one element or all elements matching the\n selector\n- `context` - (optional) if defined, will be a W3C Element (i.e., a JS object with the W3C element\n identifier as the key and the element ID as the value)\n\nAnd you need to return one of the following:\n\n- a single W3C element (an object as described above)\n- an array of W3C elements\n\nNote that you can import that W3C web element identifier from `appium/support`:\n\n```js\nimport {util} from 'appium/support';\nconst { W3C_WEB_ELEMENT_IDENTIFIER } = util;\n```\n\nWhat you do with elements is up to you! Usually you end up keeping a cache map of IDs to actual\nelement \"objects\" or whatever the equivalent is for your platform.\n\n### Define valid locator strategies\n\nYour driver might only support a subset of the standard WebDriver locator strategies, or it might\nadd its own custom locator strategies. To tell Appium which strategies are considered valid for\nyour driver, create an array of strategies and assign it to `this.locatorStrategies`:\n\n```js\nthis.locatorStrategies = ['xpath', 'custom-strategy'];\n```\n\nAppium will throw an error if the user attempts to use any strategies other than the allowed ones,\nwhich enables you to keep your element finding code clean and deal with only the strategies you\nknow about.\n\nBy default, the list of valid strategies is empty, so if your driver isn't simply proxying to\nanother WebDriver endpoint, you'll need to define some. The protocol-standard locator strategies\nare defined [here](https://www.w3.org/TR/webdriver/#locator-strategies).\n\n### Throw WebDriver-specific errors\n\nThe WebDriver spec defines a set of error\ncodes to accompany command responses if an\nerror occurred. Appium has created error classes for each of these codes, so you can throw the\nappropriate error from inside a command, and it will do the right thing in terms of the protocol\nresponse to the user. To get access to these error classes, import them from `appium/driver`:\n\n```\nimport {errors} from 'appium/driver';\n\nthrow new errors.NoSuchElementError();\n```\n\n### Log messages to the Appium log\n\nYou can always use `console.log`, of course, but Appium provides a nice logger for you as\n`this.log` (it has `.info`, `.debug`, `.log`, `.warn`, `.error` methods on it for differing log\nlevels). If you want to create an Appium logger outside of a driver context (say in a script or\nhelper file), you can always construct your own too:\n\n```js\nimport {logging} from 'appium/support';\nconst log = logging.getLogger('MyDriver');\n```\n\n## Further possibilities for Appium drivers\n\nThese are things your driver _can_ do to take advantage of extra driver features or do its job more\nconveniently.\n\n### Add a schema for custom command line arguments\n\nYou can add custom CLI args if you want your driver to receive data from the command line when the\nAppium server is started (for example, ports that a server administrator should set that should not\nbe passed in as capabilities.\n\nTo define CLI arguments (or configuration properties) for the Appium server, your extension must provide a _schema_. In\nthe `appium` property of your extension's `package.json`, add a `schema` property. This will either\na) be a schema itself, or b) be a path to a schema file.\n\nThe rules for these schemas:\n\n- Schemas must conform to [JSON Schema Draft-07](https://ajv.js.org/json-schema.html#draft-07).\n- If the `schema` property is a path to a schema file, the file must be in JSON or JS (CommonJS) format.\n- Custom `$id` values are unsupported. To use `$ref`, provide a value relative to the schema root, e.g., `/properties/foo`.\n- Known values of the `format` keyword are likely supported, but various other keywords may be unsupported. If you find a keyword that is unsupported which you need to use, please [ask for support](https://github.com/appium/appium/issues/new) or send a PR!\n- The schema must be of type `object` (`{\"type\": \"object\"}`), containing the arguments in a `properties` keyword. Nested properties are unsupported.\n\nExample:\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"test-web-server-port\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"maximum\": 65535,\n \"description\": \"The port to use for the test web server\"\n },\n \"test-web-server-host\": {\n \"type\": \"string\",\n \"description\": \"The host to use for the test web server\",\n \"default\": \"sillyhost\"\n }\n }\n}\n```\n\nThe above schema defines two properties which can be set via CLI argument or configuration file. If\nthis extension is a _driver_ and its name is \"horace\", the CLI args would be\n`--driver-horace-test-web-server-port` and `--driver-horace-test-web-server-host`, respectively.\nAlternatively, a user could provide a configuration file containing:\n\n```json\n{\n \"server\": {\n \"driver\": {\n \"horace\": {\n \"test-web-server-port\": 1234,\n \"test-web-server-host\": \"localhorse\"\n }\n }\n }\n}\n```\n\n### Add driver scripts\n\nSometimes you might want users of your driver to be able to run scripts outside the context of\na session (for example, to run a script that pre-builds aspects of your driver). To support this,\nyou can add a map of script names and JS files to the `scripts` field within your Appium extension\nmetadata. So let's say you've created a script in your project that lives in a `scripts` directory\nin your project, named `driver-prebuild.js`. Then you could add a `scripts` field like this:\n\n```json\n{\n \"scripts\": {\n \"prebuild\": \"./scripts/driver-prebuild.js\"\n }\n}\n```\n\nNow, assuming your driver is named `mydriver`, users of your driver can run `appium driver run\nmydriver prebuild`, and your script will execute.\n\n### Proxy commands to another WebDriver implementation\n\nA very common design architecture for Appium drivers is to have some kind of platform-specific\nWebDriver implementation that the Appium driver interfaces with. For example, the Appium\nUiAutomator2 driver interfaces with a special (Java-based) server running on the Android device. In\nwebview mode, it also interfaces with Chromedriver.\n\nIf you find yourself in this situation, it is extremely easy to tell Appium that your driver is\njust going to be proxying WebDriver commands straight to another endpoint.\n\nFirst, let Appium know that your driver _can_ proxy by implementing the `canProxy` method:\n\n```js\ncanProxy() {\n return true;\n}\n```\n\nNext, tell Appium which WebDriver routes it should _not_ attempt to proxy (there often end up being\ncertain routes that you don't want to forward on):\n\n```js\ngetProxyAvoidList() {\n return [\n ['POST', new RegExp('^/session/[^/]+/appium')]\n ];\n}\n```\n\nThe proxy avoidance list should be an array of arrays, where each inner array has an HTTP method as\nits first member, and a regular expression as its second. If the regular expression matches the\nroute, then the route will not be proxied and instead will be handled by your driver. In this\nexample, we are avoiding proxying all `POST` routes that have the `appium` prefix.\n\nNext, we have to set up the proxying itself. The way to do this is to use a special class from\nAppium called `JWProxy`. (The name means \"JSON Wire Proxy\" and is related to a legacy\nimplementation of the protocol). You'll want to create a `JWProxy` object using the details required to\nconnect to the remote server:\n\n```js\n// import {JWProxy} from 'appium/driver';\n\nconst proxy = new JWProxy({\n server: 'remote.server',\n port: 1234,\n base: '/',\n});\n\nthis.proxyReqRes = proxy.proxyReqRes.bind(proxy);\nthis.proxyCommand = proxy.command.bind(proxy);\n```\n\nHere we are creating a proxy object and assigning some of its methods to `this` under the names\n`proxyReqRes` and `proxyCommand`. This is required for Appium to use the proxy, so don't forget\nthis step! The `JWProxy` has a variety of other options which you can check out in the source code,\nas well. (TODO: publish options as API docs and link here).\n\nFinally, we need a way to tell Appium when the proxy is active. For your driver it might always\nbe active, or it might only be active when in a certain context. You can define the logic as an\nimplementation of `proxyActive`:\n\n```js\nproxyActive() {\n return true; // or use custom logic\n}\n```\n\nWith those pieces in play, you won't have to reimplement anything that's already implemented by the\nremote endpoint you're proxying to. Appium will take care of all the proxying for you.\n\n### Proxy BiDi commands to another BiDi implementation\n\nAll of the above about proxying WebDriver commands is conceptually also valid for proxying BiDi\ncommands specifically. In order to enable BiDi proxying, you need to implement `get bidiProxyUrl`\non your driver. This should return a Websocket URL which is the address of the upstream socket you\nwant BiDi commands to be proxied to.\n\nThe intended pattern here is for you to start a session on the upstream implementation, check\nwhether it has an active BiDi socket in the returned capabilities (e.g., the `webSocketUrl`\ncapability), and then to set an internal field to that value, so that it can be returned by `get\nbidiProxyUrl`. Once all this is in place, Appium will proxy BiDi commands from the client straight\nto the upstream connection.\n\n### Extend the existing protocol with new commands\n\nYou may find that the existing commands don't cut it for your driver. If you want to expose\nbehaviours that don't map to any of the existing commands, you can create new commands in one of\nthree ways:\n\n1. Extending the classic WebDriver protocol and creating client-side plugins to access the extensions via the classic HTTP interface\n2. Extending the WebDriver BiDi protocol with new modules and methods, accessed from a client via the BiDi interface\n3. Overloading the Execute Script command by defining Execute\n Methods\n\nIf you want to follow the first path, you can direct Appium to recognize new methods and add them\nto its set of allowed HTTP routes and command names. You do this by assigning the `newMethodMap`\nstatic variable in your driver class to an object of the same form as Appium's `routes.js` object.\nFor example, here is the `newMethodMap` for the `FakeDriver` example driver:\n\n```js\nstatic newMethodMap = {\n '/session/:sessionId/fakedriver': {\n GET: {command: 'getFakeThing'},\n POST: {command: 'setFakeThing', payloadParams: {required: ['thing']}},\n },\n '/session/:sessionId/fakedriverargs': {\n GET: {command: 'getFakeDriverArgs'},\n },\n};\n```\n\nIn this example we're adding a few new routes and a total of 3 new commands. For more examples of\nhow to define commands in this way, it's best to have a look through `routes.js`. Now all you need\nto do is implement the command handlers in the same way you'd implement any other Appium command.\n\nThe downside of this way of adding new commands is that people using the standard Appium clients\nwon't have nice client-side functions designed to target these endpoints. So you would need to\ncreate and release client-side plugins for each language you want to support (directions or\nexamples can be found at the relevant client docs).\n\nThe second way of adding new commands is adding them as BiDi commands (accessed via the BiDi\nwebsocket interface, rather than the classic HTTP interface). BiDi commands come in two parts:\na \"module\", which is basically a container or namespace, and a \"command\", which is the name of your\nnew command.\n\nAs with the first method, you teach Appium to recognize your new BiDi commands by adding a static\nfield to your driver class, called `newBidiCommands`. It has a format similar to `newMethodMap`.\nBasically it encapsulates information about the BiDi module, BiDi command name, reference to your\ndriver instance method that will handle the command, and required and optional parameters. Here's\nan example of a `newBidiCommands` as implemented on an imaginary driver:\n\n```js\nstatic newBidiCommands = {\n 'appium:video': {\n startFramerateCapture: {\n command: 'startFrameCap',\n params: {\n required: ['videoSource'],\n optional: ['showOnScreen'],\n }\n },\n stopFramerateCapture: {\n command: 'stopFrameCap',\n },\n }\n};\n```\n\nIn this imaginary example, we have defined two new BiDi commands:\n`appium:video.startFramerateCapture` and `appium:video.stopFramerateCapture`. Note first of all\nthat, because we are defining a custom BiDi command, we should include a 'vendor prefix' (in this\ncase, `appium:`, though you should pick something that represents your project). The first command\ntakes a required and an optional parameter, and the second does not. When combined with generic\nBiDi support in your driver (see [the section on BiDi](#implement-webdriver-bidi-commands) above),\nand given an implementation of the appropriate methods on your driver (e.g. `startFrameCap` and\n`stopFrameCap` in this example), clients would be able to send these BiDi commands using whatever\nmechanism normally exists for doing so in the client library.\n\nAn alternative to these other ways of doing things is to overload a command which all WebDriver clients\nhave access to already: Execute Script. Appium provides some a convenient tool for making this\neasy. Let's say you are building a driver for stereo system called `soundz`, and you wanted to\ncreate a command for playing a song by name. You could expose this to your users in such a way that\nthey call something like:\n\n```js\n// webdriverio example. Calling webdriverio's `executeScript` command is what trigger's Appium's\n// Execute Script command handler\ndriver.executeScript('soundz: playSong', [{song: 'Stairway to Heaven', artist: 'Led Zeppelin'}]);\n```\n\nThen in your driver code you can define the static property `executeMethodMap` as a mapping of\nscript names to methods on your driver. It has the same basic form as `newMethodMap`, described\nabove. Once `executeMethodMap` is defined, you'll also need to implement the Execute Script command\nhandler, which according to Appium's routes mapping is called `execute`. The implementation can\ncall a single helper function, `this.executeMethod`, which takes care of looking at the script and\narguments the user sent in and routing it to the correct custom handler you've defined. Here's an\nexample:\n\n```js\nstatic executeMethodMap = {\n 'soundz: playSong', {\n command: 'soundzPlaySong',\n params: {required: ['song', 'artist'], optional: []},\n }\n}\n\nasync soundzPlaySong(song, artist) {\n // play the song based on song and artist details\n}\n\nasync execute(script, args) {\n return await this.executeMethod(script, args);\n}\n```\n\nA couple notes about this system:\n\n1. The arguments array sent via the call to Execute Script must contain only zero or one element(s). The\n first item in the list is considered to be the parameters object for your method. These parameters\n will be parsed, validated, and then applied to your overload method in the order specified in\n `executeMethodMap` (the order specified in the `required` parameters list, followed by the\n `optional` parameters list). I.e., this framework assumes only a single actual argument sent in via\n Execute Script (and this argument should be an object with keys/values representing the\n parameters your execute method expects).\n2. Appium does not automatically implement `execute` (the Execute Script handler) for you. You may\n wish, for example, to only call the `executeMethod` helper function when you're not in proxy\n mode!\n3. The `executeMethod` helper will reject with an error if a script name doesn't match one of the\n script names defined as a command in `executeMethodMap`, or if there are missing parameters.\n\nOne of the nice things about the Execute Method strategy is that methods implemented in this way\nwill be available via the classic or BiDi interfaces (since they will result in the same Appium\nhandlers being called).\n\n### Build Appium Doctor checks\n\nYour users can run `appium driver doctor ` to run installation and health checks. Visit\nthe [Building Doctor Checks](./build-doctor-checks.md) guide for more information on this\ncapability.\n\n### Implement handling of Appium settings\n\nAppium users can send parameters to your driver via CLI args as well as via capabilities. But these\ncannot change during the course of a test, and sometimes users want to adjust parameters mid-test.\nAppium has a [Settings](../guides/settings.md) API for this purpose.\n\nTo support settings in your own driver, first of all define `this.settings` to be an instance of\nthe appropriate class, in your constructor:\n\n```js\n// import {DeviceSettings} from 'appium/driver';\n\nthis.settings = new DeviceSettings();\n```\n\nNow, you can read user settings any time simply by calling `this.settings.getSettings()`. This will\nreturn a JS object where the settings names are keys and have their corresponding values.\n\nIf you want to assign some default settings, or run some code on your end whenever settings are\nupdated, you can do both of these things as well.\n\n```js\nconstructor() {\n const defaults = {setting1: 'value1'};\n this.settings = new DeviceSettings(defaults, this.onSettingsUpdate.bind(this));\n}\n\nasync onSettingsUpdate(key, value) {\n // do anything you want here with key and value\n}\n```\n\n### Emit BiDi events\n\nWith the WebDriver BiDi protocol, clients can subscribe to arbitrary events which can be sent\nasynchronously to the client over the BiDi socket connection. As an Appium driver author you don't\nneed to worry about event subscription. If you want to emit an event with a certain method name and\npayload, it's as easy as using the built-in event emitter with the `bidiEvent` event.\n\nAs an\nexample, let's say our driver wants to periodically emit CPU load information. We could define an\nevent called `system.cpu`, and a payload that looks like `{load: 0.97}` to signify 97% CPU usage.\nWhenever we want, our driver can simply call the following code (assuming we have the current load\nin `this.currentCpuLoad`):\n\n```js\nthis.eventEmitter.emit('bidiEvent', {\n method: 'appium:system.cpu',\n params: {load: this.currentCpuLoad},\n})\n```\n\nNow, if the client has subscribed to the `system.cpu` event, it will be notified with the load\nwhenever the driver emits it.\n\n### Make itself aware of resources other concurrent drivers are using\n\nLet's say your driver uses up some system resources, like ports. There are a few ways to make sure\nthat multiple simultaneous sessions don't use the same resources:\n\n1. Have your users specify resource IDs via capabilities (`appium:driverPort` etc)\n2. Just always use free resources (find a new random port for each session)\n3. Have each driver express what resources it is using, then examine currently-used resources from\n other drivers when a new session begins.\n\nTo support this third strategy, you can implement `get driverData` in your driver to return what\nsorts of resources your driver is currently using, for example:\n\n```js\nget driverData() {\n return {specialPort: 1234, specialFile: /path/to/file}\n}\n```\n\nNow, when a new session is started on your driver, the `driverData` response from any other\nsimultaneously running drivers (of the same type) will also be included, as the last parameter of\nthe `createSession` method:\n\n```js\nasync createSession(jwpCaps, reqCaps, w3cCaps, driverData)\n```\n\nYou can dig into this `driverData` array to see what resources other drivers are using to help\ndetermine which ones you want to use for this particular session.\n\n!!! warning\n\n```\nBe careful here, since `driverData` is only passed between sessions of a single running Appium\nserver. There's nothing to stop a user from running multiple Appium servers and requesting your\ndriver simultaneously on each of them. In this case, you won't be able to ensure independence\nof resources via `driverData`, so you might consider using file-based locking mechanisms or\nsomething similar.\n```\n\n!!! warning\n\n```\nIt's also important to note you will only receive `driverData` for other instances of *your*\ndriver. So unrelated drivers also running may still be using some system resources. In general\nAppium doesn't provide any features for ensuring unrelated drivers don't interfere with one\nanother, so it's up to the drivers to allow users to specify resource locations or addresses to\navoid clashes.\n```\n\n### Log events to the Appium event timeline\n\nAppium has an [Event Timing API](../guides/event-timing.md) which allows users to get timestamps\nfor certain server-side events (like commands, startup milestones, etc...) and display them on\na timeline. The feature basically exists to allow introspection of timing for internal events to\nhelp with debugging or running analysis on Appium driver internals. You can add your own events to\nthe event log:\n\n```js\nthis.logEvent(name);\n```\n\nSimply provide a name for the event and it will be added at the current time, and made accessible\nas part of the event log for users.\n\n### Hide behaviour behind security flags\n\nAppium has a feature-flag based [security model](../guides/security.md) that allows driver authors\nto hide certain features behind security flags. What this means is that if you have a feature you\ndeem insecure and want to require server admins to opt in to it, you can require that they enable\nthe feature by adding it to the `--allow-insecure` list or turning off server security entirely.\n\nTo support the check within your own driver, you can call `this.isFeatureEnabled(featureName)` to\ndetermine whether a feature of the given name has been enabled. Or, if you want to simply\nshort-circuit and throw an error if the feature isn't enabled, you can call\n`this.assertFeatureEnabled(featureName)`.\n\n### Use a temp dir for files\n\nIf you want to use a temporary directory for files your driver creates that are not important to\nkeep around between computer or server restarts, you can simply read from `this.opts.tmpDir`. This\nreads the temporary directory location from `@appium/support`, potentially overridden by a CLI\nflag. I.e., it's safer than writing to your own temporary directory because the location here plays\nnicely with possible user configuration. `this.opts.tmpDir` is a string, the path to the dir.\n\n### Deal with unexpected shutdowns or crashes\n\nYour driver might run into a situation where it can't continue operating normally. For example, it\nmight detect that some external service has crashed and nothing will work anymore. In this case, it\ncan call `this.startUnexpectedShutdown(err)` with an error object including any details, and Appium\nwill attempt to gracefully handle any remaining requests before shutting down the session.\n\nIf you want to perform some of your own cleanup logic when you encounter this condition, you can\neither do so immediately before calling `this.startUnexpectedShutdown`, or you can attach a handler\nto the unexpected shutdown event and run your cleanup logic \"out of band\" so to speak:\n\n```js\nthis.onUnexpectedShutdown(handler)\n```\n\n`handler` should be a function which receives an error object (representing the reason for the\nunexpected shutdown).\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/developing/build-plugins.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Building Plugins\n---\n\nThis is a high-level guide for developing Appium plugins, which is not something most Appium users\nneed to know or care about. If you are not familiar with Appium plugins yet from a user\nperspective, check out the [list of plugins](../ecosystem/plugins.md) to play around with some and get\nan idea of the sorts of things that plugins can do. Plugins are a powerful system for augmenting\nAppium's functionality or changing the way Appium works. They can be distributed to other Appium\nusers and can extend Appium's ecosystem in all kinds of interesting ways! (There is also\na significant amount of overlap here with developing Appium drivers, so you may also want to check\nout the [building drivers](./build-drivers.md) guide for further inspiration.)\n\n## Before you create your plugin\n\nBefore creating your plugin, it's good to have a general idea of what you want your plugin to\naccomplish and whether it will be possible to implement it given the restrictions of the Appium\nplatform. Reading through this guide will help you understand what's possible. In general, Appium's\nplugin system is extremely powerful and no attempts have been made to artificially limit what's\npossible with them (which is a main reason that all plugins are opt-in by the system administrator\nresponsible for starting the Appium server---plugins are powerful and should only be used when\nexplicitly trusted!).\n\n## Other plugins to reference\n\nThere are a wide variety of open source Appium plugins available for perusal. It's definitely\nrecommended to explore the code for some other plugins before embarking on writing your own. The\nAppium team maintains a set of official plugins in the Appium GitHub\nrepo. Links to other open source plugins can be found in the\n[Plugin list](../ecosystem/plugins.md)\n\n## Basic requirements for plugins\n\nThese are the things your plugin _must_ do (or be), if you want it to be a valid Appium plugin.\n\n### Node.js package with Appium extension metadata\n\nAll Appium plugins are fundamentally Node.js packages, and therefore must have a valid\n`package.json`. Your driver is not _limited_ to Node.js, but it must provide an adapter written in\nNode.js so it can be loaded by Appium.\n\nYour `package.json` must include `appium` as a `peerDependency`. The requirements for the\ndependency versions should be as loose as possible (unless you happen to know your plugin will only\nwork with certain versions of Appium). For Appium 2, for example, this would look something like\n`^2.0.0`, declaring that your plugin works with any version of Appium that starts with 2.x.\n\nYour `package.json` must contain an `appium` field, like this (we call this the 'Appium extension\nmetadata'):\n\n````\n```json\n{\n ...,\n \"appium\": {\n \"pluginName\": \"fake\",\n \"mainClass\": \"FakePlugin\"\n },\n ...\n}\n```\n````\n\nThe required subfields are:\n\n- `pluginName`: this should be a short name for your plugin.\n- `mainClass`: this is a named export (in CommonJS style) from your `main` field. It must be a\n class which extends Appium's `BasePlugin` (see below).\n\n### Extend Appium's `BasePlugin` class\n\nUltimately, your plugin is much easier to write because most of the hard work of defining patterns\nfor overriding commands is done for you. This is\nall encoded up as a class which Appium exports for you to use, called `BasePlugin`. It is exported\nfrom `appium/plugin`, so you can use one of these styles to import it and create your _own_ class\nthat extends it:\n\n```js\nimport {BasePlugin} from 'appium/plugin';\n// or: const {BasePlugin} = require('appium/plugin');\n\nexport class MyPlugin extends BasePlugin {\n // class methods here\n}\n```\n\n!!! note\n\n```\nIn all the code samples below, whenever we reference an example method, it is assumed\nthat it is defined _within_ the class, though this is not explicitly written, for the sake of\nclarity and space.\n```\n\n### Make your plugin available\n\nThat's basically it! With a Node.js package exporting a plugin class and with correct Appium\nextension metadata, you've got yourself an Appium plugin! Now it doesn't _do_ anything, but you can\nload it up in Appium, activate it, etc...\n\nTo make it available to users, you could publish it via NPM. When you do so, your plugin will be\ninstallable via the Appium CLI:\n\n```\nappium plugin install --source=npm \n```\n\nIt's a good idea to test your plugin first, of course. One way to see how it works within Appium is\nto install it locally first:\n\n```\nappium plugin install --source=local /path/to/your/plugin\n```\n\nAnd of course, plugins must be \"activated\" during Appium server start, so make sure you direct your\nusers to do so:\n\n```\nappium --use-plugins=plugin-name\n```\n\n### Developing your plugin\n\nHow you develop your plugin is up to you. It is convenient, however, to run it from within Appium\nwithout having to do lots of publishing and installing. The most straightforward way to do this is\nto include the most recent version of Appium as a `devDependency` (although its being already\nincluded as a `peerDependency` is sufficient in newer versions of NPM), and then also your own plugin,\nlike this:\n\n```json\n{\n \"devDependencies\": {\n ...,\n \"appium\": \"^2.0.0\",\n \"your-plugin\": \"file:.\",\n ...\n }\n}\n```\n\nNow, you can run Appium locally (`npm exec appium` or `npx appium`), and because your plugin is\nlisted as a dependency alongside it, it will be automatically \"installed\" and available. You can\ndesign your e2e tests this way, or if you're writing them in Node.js, you can simply import\nAppium's start server methods to handle starting and stopping the Appium server in Node.\n\nOf course, you can always install it locally as described above as well.\n\nAnytime you make changes to your plugin code, you'll need to restart the Appium server to make sure\nit picks up the latest code. As with drivers, you can set the `APPIUM_RELOAD_EXTENSIONS`\nenvironment variable if you wish Appium to try to re-require your plugin module when a new session\nstarts.\n\n## Standard plugin implementation ideas\n\nThese are things you will probably find yourself wanting to do when creating a plugin.\n\n### Set up state in a constructor\n\nIf you define your own constructor, you'll need to call `super` to make sure all the standard state\nis set up correctly:\n\n```js\nconstructor(...args) {\n super(...args);\n // now do your own thing\n}\n```\n\nThe `args` parameter here is the object containing all the CLI args used to start the Appium\nserver.\n\n### Intercept and handle specific Appium commands\n\nThis is the most normal behavior for Appium plugins -- to modify or replace the execution of one or\nmore commands that would normally be handled by the active driver. To override the default command\nhandling, you need to implement `async` methods in your class with the same name as the Appium\ncommands to be handled (just exactly how drivers themselves are\nimplemented). Curious what command names there\nare? They are defined in the Appium base driver's\n[routes.js](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js) file,\nand of course you can add more as defined in the next section.\n\nEach command method is sent the following arguments:\n\n1. `next`: This is a reference to an `async` function which encapsulates the chain of behaviors which would take place if this plugin were not handling the command. You can choose to call the next behavior in the chain at any point in your logic (by making sure to include `await next()` somewhere), or not. If you don't, it means the default behavior (or any plugins registered after this one) won't be run.\n2. `driver`: This is the object representing the driver handling the current session. You have access to it for any work you need to do, for example calling other driver methods, checking capabilities or settings, etc...\n3. `...args`: A spread array with any arguments that have been applied to the command by the user.\n\nFor example, if we wanted to override the `setUrl` command to simply add some extra logging on top,\nwe would implement as follows:\n\n```js\nasync setUrl(next, driver, url) {\n this.log(`Let's get the page source for some reason before navigating to '${url}'!`);\n await driver.getPageSource();\n const result = await next();\n this.log(`We can also log after the original behaviour`);\n return result;\n}\n```\n\n### Intercept and handle _all_ Appium commands\n\nYou might find yourself in a position where you want to handle _all_ commands, in order to inspect\npayloads to determine whether or not to act in some way. If so, you can implement `async handle`,\nand any command that is not handled by one of your named methods will be handled by this method\ninstead. It takes the following parameters (with all the same semantics as above):\n\n1. `next`\n2. `driver`\n3. `cmdName` - string representing the command being run\n4. `...args`\n\nFor example, let's say we want to log timing for all Appium commands as part of a plugin. We could\ndo this by implementing `handle` in our plugin class as follows:\n\n```js\nasync handle(next, driver, cmdName, ...args) {\n const start = Date.now();\n try {\n const result = await next();\n } finally {\n const elapsedMs = Date.now() - start;\n this.log(`Command '${cmdName}' took ${elapsedMs}`);\n }\n return result;\n}\n```\n\n### Working with driver proxies\n\nThere is a bit of a gotcha with handling Appium commands. Appium drivers have the ability to turn\non a special 'proxy' mode, wherein the Appium server process takes a look at incoming URLs, and\ndecides whether to forward them on to some upstream WebDriver server. It could happen that\na command which a plugin wants to handle is designated as a command which is being proxied to an\nupstream server. In this case, we might run into a problem, because the plugin never gets a chance to\nhandle that command! The way Appium handles this is as follows:\n\n1. When a command comes in, before deciding whether to proxy the command, the main protocol handler\n checks to see whether a plugin would handle the command.\n2. If a plugin would _not_ handle the command--all proceeds as normal, and the request is either\n proxied or not, based on the driver's proxy mode.\n3. If a plugin _would_ handle the command, then the proxy behavior is skipped for the time being,\n and wrapped up as the `next` function sent to the plugin. So if you have a command handler in\n your plugin, and you want to be sure that the default driver proxying _does_ take place, then\n simply `await next()` instead of (or in addition to) whatever your plugin handler is doing.\n\n### Throw WebDriver-specific errors\n\nThe WebDriver spec defines a set of error\ncodes to accompany command responses if an\nerror occurred. Appium has created error classes for each of these codes, so you can throw the\nappropriate error from inside a command, and it will do the right thing in terms of the protocol\nresponse to the user. To get access to these error classes, import them from `appium/driver`:\n\n```js\nimport {errors} from 'appium/driver';\n\nthrow new errors.NoSuchElementError();\n```\n\n### Log messages to the Appium log\n\nYou can always use `console.log`, of course, but Appium provides a nice logger for you as\n`this.logger` (it has `.info`, `.debug`, `.log`, `.warn`, `.error` methods on it for differing log\nlevels). If you want to create an Appium logger outside of a plugin context (say in a script or\nhelper file), you can always construct your own too:\n\n```js\nimport {logging} from 'appium/support';\nconst log = logging.getLogger('MyPlugin');\n```\n\n## Further possibilities for Appium plugins\n\nThese are things your plugin _can_ do to take advantage of extra plugin features or do its job more\nconveniently.\n\n### Add a schema for custom command line arguments\n\nYou can add custom CLI args if you want your plugin to receive data from the command line when the\nAppium server is started (for example, ports that a server administrator should set that should not\nbe passed in as capabilities).\n\nThis works largely the same for plugins as it does for drivers, so for more details have a look at\nthe equivalent section in the building drivers\ndoc.\n\nThe only difference is that to construct the CLI argument name, you prefix it with\n`--plugin-`. So for example, if you have a plugin named `pluggo` and a CLI arg defined with\nthe name `electro-port`, you can set it when starting Appium via `--plugin-pluggo-electro-port`.\n\nSetting args via a configuration file is also supported, as it is for drivers, but under the\n`plugin` field instead. For example:\n\n```json\n{\n \"server\": {\n \"plugin\": {\n \"pluggo\": {\n \"electro-port\": 1234\n }\n }\n }\n}\n```\n\n### Add plugin scripts\n\nSometimes you might want users of your plugin to be able to run scripts outside the context of\na session (for example, to run a script that pre-builds aspects of your plugin). To support this,\nyou can add a map of script names and JS files to the `scripts` field within your Appium extension\nmetadata. So let's say you've created a script in your project that lives in a `scripts` directory\nin your project, named `plugin-prebuild.js`. Then you could add a `scripts` field like this:\n\n```json\n{\n \"scripts\": {\n \"prebuild\": \"./scripts/plugin-prebuild.js\"\n }\n}\n```\n\nNow, assuming your plugin is named `myplugin`, users of your plugin can run `appium plugin run\nmyplugin prebuild`, and your script will execute.\n\n### Add new Appium commands\n\nIf you want to offer functionality that doesn't map to any of the existing commands supported by\ndrivers, you can create new commands in one of two ways, just as is possible for drivers:\n\n1. Extending the WebDriver protocol and creating client-side plugins to access the extensions\n2. Extending the WebDriver BiDi protocol with new modules and methods, accessed from a client via the BiDi interface\n3. Overloading the Execute Script command by defining Execute\n Methods\n\n#### Extending the HTTP Protocol\n\nIf you want to follow the first path, you can direct Appium to recognize new methods and add them\nto its set of allowed HTTP routes and command names. You do this by assigning the `newMethodMap`\nstatic variable in your driver class to an object of the same form as Appium's `routes.js` object.\nFor example, here is part of the `newMethodMap` for the `FakePlugin` example driver:\n\n```js\nstatic newMethodMap = {\n '/session/:sessionId/fake_data': {\n GET: {command: 'getFakeSessionData', neverProxy: true},\n POST: {\n command: 'setFakeSessionData',\n payloadParams: {required: ['data']},\n neverProxy: true,\n },\n },\n '/session/:sessionId/fakepluginargs': {\n GET: {command: 'getFakePluginArgs', neverProxy: true},\n },\n};\n```\n\n!!! note\n\n```\nIf you're using TypeScript, static member objects like these should be defined `as const`.\n```\n\nIn this example we're adding a few new routes and a total of 3 new commands. For more examples of\nhow to define commands in this way, it's best to have a look through `routes.js`. Now all you need\nto do is implement the command handlers in the same way you'd implement any other Appium command.\n\nNote also the special `neverProxy` key for commands; this is generally a good idea to set to `true`\nfor plugins, since your plugin might be active for a driver that is put into proxy mode but hasn't\nbothered to decline proxying for these (new and therefore unknown) commands. Setting `neverProxy`\nto `true` here will cause Appium to never proxy these routes and therefore ensure your plugin\nhandles them, even if a driver is in proxy mode.\n\nThe downside of adding new commands via `newMethodMap` is that people using the standard Appium\nclients won't have nice client-side functions designed to target these endpoints. So you would need\nto create and release client-side plugins for each language you want to support (directions or\nexamples can be found at the relevant client docs).\n\n#### Extending the BiDi Protocol\n\nYou can also make new commands accessible via the WebDriver BiDi (WebSocket-based) protocol. BiDi\ncommands come in two parts: a \"module\", which is basically a container or namespace, and\na \"command\", which is the name of your new command.\n\nAs with the first method, you teach Appium to recognize your new BiDi commands by adding a static\nfield to your driver class, called `newBidiCommands`. It has a format similar to `newMethodMap`.\nBasically it encapsulates information about the BiDi module, BiDi command name, reference to your\ndriver instance method that will handle the command, and required and optional parameters. Here's\nan example of a `newBidiCommands` as implemented on an imaginary driver:\n\n```js\nstatic newBidiCommands = {\n 'appium:video': {\n startFramerateCapture: {\n command: 'startFrameCap',\n params: {\n required: ['videoSource'],\n optional: ['showOnScreen'],\n }\n },\n stopFramerateCapture: {\n command: 'stopFrameCap',\n },\n }\n};\n```\n\nIn this imaginary example, we have defined two new BiDi commands: `appium:video.startFramerateCapture` and\n`appium:video.stopFramerateCapture`. The first command takes a required and an optional parameter, and the\nsecond does not. When you have implemented the `startFrameCap` and `stopFrameCap` methods on your\nplugin class, they will be called whenever the BiDi commands are triggered by a client. The\nsignatures for these methods would look as follows:\n\n```js\nasync startFrameCap(next: () => Promise, driver: DriverClass, videoSource: string, showOnScreen: boolean): Promise;\nasync stopFrameCap(next: () => Promise, driver: DriverClass): Promise;\n```\n\nAs with adding or overriding existing HTTP protocol commands, these methods are injected with\na `next` parameter and a `driver` parameter. The `driver` object represents the driver currently\nowning the session, and calling `await next()` will execute/return the behavior that would execute\nwere the plugin not active (i.e., the driver's own handling of that method, or the chain of\ncommands executed with the same name by other active plugins).\n\nNote that, currently, if a driver has BiDi proxying turned on, plugins will not be able to override\nBiDi methods handled by the proxy. Also note that since these are custom BiDi commands, our module\nname should include a vendor prefix (we chose `appium:`, but you can/should choose something that\nmakes sense for your extension).\n\n#### Overloading Execute Script\n\nAn alternative to these ways of doing things is to overload a command which all WebDriver clients\nhave access to already: Execute Script. Make sure to read the section on adding new\ncommands in\nthe Building Drivers guide to understand the way this works in general. The way it works with\nplugins is only slightly different. Let's look at an example taken from Appium's `fake-plugin`:\n\n```js\nstatic executeMethodMap = {\n 'fake: plugMeIn': {\n command: 'plugMeIn',\n params: {required: ['socket']},\n },\n};\n\nasync plugMeIn(next, driver, socket) {\n return `Plugged in to ${socket}`;\n}\n\nasync execute(next, driver, script, args) {\n return await this.executeMethod(next, driver, script, args);\n}\n```\n\nWe have three important components shown here which make this system work, all of which are defined\ninside the plugin class:\n\n1. The `executeMethodMap`, defined in just the same way as for drivers\n2. The implementation of the command method as defined in `executeMethodMap` (in this case,\n `plugMeIn`)\n3. The overriding/handling of the `execute` command. Just like any plugin command handlers, the\n first two arguments are `next` and `driver`, followed by the script name and args. `BasePlugin`\n implements a helper method which we can simply call with all of these arguments.\n\nOverriding Execute Methods from drivers works as you'd expect: if your plugin defines an Execute\nMethod with the same name as that of a driver, your command (in this case `plugMeIn`) will be\ncalled first. You can choose to run the driver's original behaviour via `next` if you want.\n\n### Emit BiDi Events\n\nYour plugin can emit custom BiDi events in exactly the same way as Appium\ndrivers.\n\n### Build Appium Doctor checks\n\nYour users can run `appium plugin doctor ` to run installation and health checks. Visit\nthe [Building Doctor Checks](./build-doctor-checks.md) guide for more information on this\ncapability.\n\n### Update the Appium server object\n\nYou probably don't normally need to update the Appium server object (which is an\n[Express](https://expressjs.com/) server having already been\n[configured](https://github.com/appium/appium/blob/master/packages/base-driver/lib/express/server.js)\nin a variety of ways). But, for example, you could add new Express middleware to the server to\nsupport your plugin's requirements. To update the server you must implement the `static async\nupdateServer` method in your class. This method takes three parameters:\n\n- `expressApp`: the Express app object\n- `httpServer`: the Node HTTP server object\n- `cliArgs`: a map of the CLI args used to start the Appium server\n\nYou can do whatever you want with them inside the `updateServer` method. You might want to\nreference how these objects are created and worked with in the BaseDriver code, so that you know\nyou're not undoing or overriding anything standard and important. But if you insist, you can, with\nresults you'll need to test! Warning: this should be considered an advanced feature and requires\nknowledge of Express, as well as the care not to do anything that could affect the operation of\nother parts of the Appium server!\n\n### Handle unexpected session shutdown\n\nWhen developing a plugin you may want to add some cleanup logic for when a session ends. You would\nnaturally do this by adding a handler for `deleteSession`. This works in most cases, except when\nthe session does not finish cleanly. Appium sometimes determines that a session has finished\nunexpectedly, and in these situations, Appium will look for a method called `onUnexpectedShutdown`\nin your plugin class, which will be called (passing the current session driver as the first\nparameter, and the error object representing the cause of the shutdown as the second), giving you\nan opportunity to take any steps that might be necessary to clean up from the session. For example,\nkeeping in mind that the function is not `await`ed you could implement something like this:\n\n```js\nasync onUnexpectedShutdown(driver, cause) {\n try {\n // do some cleanup\n } catch (e) {\n // log any errors; don't allow anything to be thrown as they will be unhandled rejections\n }\n}\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/developing/config-system.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium's Config System\n---\n\nAppium includes support for [configuration files](../guides/config.md). A configuration file is\nintended to have (nearly) 1:1 parity with command-line arguments. An end user can supply Appium with\na configuration file, CLI args, or both (the args have precedence over the config file).\n\nThis document will be a technical overview of how the configuration system works. It is intended\nfor Appium contributors, but will also explain the system's fundamental features.\n\n## Reading a Config File\n\nA config file is a JSON, JavaScript, or YAML file which can be validated against a schema. By\ndefault, this file will be named `.appiumrc.{json,js,yaml,yml}` and should be in the root of the\nproject which depends upon `appium`. Other filenames and locations are supported via the `--config ` flag. For obvious reasons, the `config` argument is disallowed within config files.\n\nIn lieu of a separate file, configuration can be embedded in a project's `package.json` using the\n`appiumConfig` property, e.g.,:\n\n```json\n{\n \"appiumConfig\": {\n \"server\": {\n \"port\": 12345\n }\n }\n}\n```\n\nWhen an Appium server is started via the `appium` executable, the `init` function in `lib/main.js`\nwill call into `lib/config-file.js` to load and/or search for a configuration file and in\n`package.json`.\n\n!!! note\n\n```\nIt is not an error if configuration isn't found!\n```\n\nThe [`lilconfig`](https://npm.im/lilconfig) package provides the search & load functionality; refer\nto its documentation for more information about the search paths. Additionally, Appium provides\nsupport for config files written in YAML via the package [`yaml`](https://npm.im/yaml).\n\nIf a config file is found and successfully [validated](#validation), the result will be merged with\na set of defaults and any additional CLI arguments. CLI arguments have precedence over config\nfiles, and config files have precedence over defaults.\n\n## Validation\n\nThe same system is used for _both_ validation of config files _and_ command-line arguments.\n\nThe package [`ajv`](https://npm.im/ajv) provides validation. Of course, to make `ajv` validate\nanything, it must be provided a _schema_.\n\nThe _base_ schema is a JSON Schema\nDraft-7-compliant object exported by\n`lib/schema/appium-config-schema.js`. This schema defines configuration _native to Appium_, and\nonly concerns its behavior as a _server_; it does not define configuration for any other\nfunctionality (e.g., the `plugin` or `driver` subcommands).\n\n!!! warning\n\n```\nNote that this file is the _base_ schema; this will become painfully relevant.\n```\n\nThis file is is _not_ a JSON file, because a) JSON is painful to work with for humans, b) is\nespecially reviled by @jlipps, and c) `ajv` accepts objects, not JSON files.\n\nIt is more straightforward to explain how config files are validated, so we'll start there.\n\n### Validating Config Files\n\nWhen a config file is found (`lib/config-file.js`), it will call the `validate` function exported\nfrom `lib/schema/schema.js` with the contents of the config file. In turn, this asks `ajv` to\nvalidate the data against the schema that Appium has provided it.\n\nIf the config file is invalid, errors will be generated to be displayed to the user. Finally, the\n`init` function will detect these errors, display them, and the process will exit.\n\nI hope that made sense, because this is the easy part.\n\n### Validating CLI Arguments\n\nAs mentioned earlier, the same system is used for validating both config files and CLI arguments.\n\nTotally not judging, but Appium uses [`argparse`](https://npm.im/argparse) for its CLI argument\nparsing. This package, and others like it, provides an API to define the arguments a command-line\nNode.js script accepts, and will ultimately return an object representation of the user-supplied\narguments.\n\nJust as the schema defines what's allowed in a config file, it also defines what's allowed on the\ncommand-line.\n\n#### Defining CLI Arguments via Schema\n\nCLI arguments must be _defined_ before their values can be validated.\n\nA JSON schema isn't a natural fit for defining CLI args--it needs some grease to make it work--but\nit's close enough that we can do so with an adapter and some custom metadata.\n\nIn `lib/cli/parser.js`, there's a wrapper around `argparse`'s `ArgumentParser`; it's called (wait\nfor it)... `ArgParser`. The wrapper exists because we're doing some custom things with `argparse`,\nbut is has nothing to do with the schema directly.\n\nAn `ArgParser` instance is created and its `parseArgs()` method is called with the raw CLI\narguments. The definition of the accepted arguments comes from `lib/cli/args.js` in part--here, all\nof the arguments _not_ intended for use with the `server` subcommand are hard-coded (e.g., the\n`driver` subcommand and _its_ subcommands). `args.js` also contains a function `getServerArgs()`,\nwhich in turn calls into `toParserArgs` in `lib/schema/cli-args.js`. `lib/schema/cli-args.js` can\nbe considered the \"adapter\" layer between `argparse` and the schema.\n\n`toParserArgs` uses the `flattenSchema` function exported by `lib/schema/schema.js`, which\n\"squashes\" the schema into a key/value representation. Then, `toParserArgs` iterates over each\nkey/value pair and \"converts\" it into a suitable `ArgumentOption` object for final handoff to\n`ArgParser`.\n\nThis adapter (`cli-args.js`) is where most of the mess is hidden; let's explore this rat's nest\na bit further.\n\n##### CLI & Schema Incongruities\n\nThe conversion algorithm (see function `subSchemaToArgDef` in `lib/schema/cli-args.js`) is mostly\njust hacks and special cases neatly packed into a function. Things that don't cleanly map from\n`argparse` to a JSON schema include, but are not limited to:\n\n- A schema cannot natively express \"store the value of `--foo=` in a property called `bar`\" in a schema (this corresponds to the `ArgumentOption['dest']` prop).\n- A schema cannot natively express aliases; e.g., `--verbose` can also be `-v`\n- A schema `enum` is not restricted to multiple types, but `argparse`'s equivalent `ArgumentOption['choices']` prop _is_\n- A schema does not know about `argparse`'s concept of \"actions\" (note that Appium is not currently using custom actions--though it did, and it could again).\n- `argparse` has no native type for `email`, `hostname`, `ipv4`, `uri` etc., and the schema does\n- Schema validation only _validates_, it does not perform translation, transformation, or coercion (mostly). `argparse` allows this.\n- Schemas allow the `null` type, for whatever reason. Ever pass `null` on the CLI?\n- `argparse` does not understand anything other than primitives; no objects, arrays, etc., and certainly not arrays of a particular type.\n\nAll of the above cases and others are handled by the adapter.\n\n!!! warning\n\n```\nSome decisions made in the adapter were arrived at via coin toss. If you are curious about why\nsomething is the way it is, it's likely that it had to do _something_.\n```\n\nLet's look more closely at handling types.\n\n#### Argument Types via `ajv`\n\nWhile `argparse` allows consumers, via its API, to define the _type_ of various arguments (e.g.,\na string, number, boolean flag, etc.), Appium mostly avoids these built-in types. _Why is that?_\nWell:\n\n1. We already know the type of an argument, because we've defined it in a schema.\n2. `ajv` provides validation against a schema.\n3. A schema allows for greater expression of types, allowed values, etc., than `argparse` can provide natively.\n4. The expressiveness of a schema allows for better error messaging.\n\nTo that end, the adapter eschews `argparse`'s built-in types (see allowed string values of\n`ArgumentOption['type']`) and instead abuses the ability to provide a _function_ as a `type`. The\nexception is _boolean_ flags, which do not have a `type`, but rather `action: 'store_true'`. The\nworld may never know why.\n\n##### Types as Functions\n\nWhen a `type` is a function, the function performs both validation _and_ coercion (if necessary).\nSo what are these functions?\n\n> Note: `type` is _omitted_ (and thus _not_ a function) from the `ArgumentOption` if the property\n> type is `boolean`, and is instead provided an `action` property of `store_true`. Yes, this is\n> weird. No, I don't know why.\n\nWell... it depends upon the schema. But generally speaking, we create a _pipeline_ of functions,\neach corresponding to a keyword in the schema. Let's take the example of the `port` argument. In\nlieu of asking the OS which ports the `appium`-running user can bind to, this argument is expected\nto be an integer between 1 and 65535. This turns out to be two functions which we combine into\na pipeline:\n\n1. Convert the value to an integer, if possible. Because _every value in `process.argv` is a string_, we must coerce if we want a number.\n2. Use `ajv` to validate the integer against the schema for `port`. A schema lets us define a range via the `minimum` and `maximum` keywords. Read more about how this works in\n\nMuch like the config file validation, if errors are detected, Appium nicely tells the end-user and\nthe process exits w/ some help text.\n\nFor other arguments which are naturally of non-primitive types, things are not so straightforward.\n\n##### Transformers\n\nRemember how `argparse` doesn't understand arrays? What if the most ergonomic way to express\na value is, in fact, an array?\n\nWell, Appium can't accept an array on the CLI, even though it can accept one in the config file.\nBut Appium _can_ accept a comma-delimited string (a CSV \"line\"). Or a string filepath referring to\na file which _contains_ a delimited list. Either way: by the time the value gets out of the\nargument parser, it should be an array.\n\nAnd as mentioned above, the native facilities of a JSON schema cannot express this. However, it's\npossible to define a _custom keyword_ which Appium can then detect and handle accordingly. So\nthat's what Appium does.\n\nIn this case, a custom keyword `appiumCliTransformer` is registered with `ajv`. The value of\n`appiumCliTransformer` (at the time of this writing) can be `csv` or `json`. In the base schema\nfile, `appium-config-schema.js`, Appium uses `appiumCliTransformer: 'csv'` if this behavior is\ndesired.\n\n!!! note\n\n```\nAny property defined in the schema having type `array` will _automatically_ uses the `csv`\ntransformer. Likewise, a property having type `object` will use the `json` transformer. It's\nconceivable that `array` may want to use the `json` transformer, but otherwise, the presence of\nthe `appiumCliTransformer` keyword on an `array`-or-`object`-typed property is not strictly\nnecessary.\n```\n\nThe adapter (remember the adapter?) creates a pipeline function including a special \"CSV\ntransformer\" (transformers are defined in `lib/schema/cli-transformers.js`), and uses this function\nas the `type` property of the `ArgumentOption` passed into `argparse`. In this case, the `type:\n'array'` in the schema is ignored.\n\n!!! note\n\n```\nThe config file doesn't _need_ to perform any complex transformation of values, because it\nnaturally allows Appium to define exactly what it expects. So Appium does no post-processing of\nconfig file values.\n```\n\nProperties that do not need this special treatment use `ajv` directly for validation. How this\nworks requires some explanation, so that's next.\n\n#### Validation of Individual Arguments via `ajv`\n\nWhen we think of a JSON schema, we tend to think, \"I have this JSON file and I want to validate it\nagainst the schema\". That's valid, and in fact Appium does just that with config files! However,\nAppium does not do this when validating arguments.\n\n!!! note\n\n```\nDuring implementation, I was tempted to mash all of the arguments together into\na config-file-like data structure and then validate it all at once. I think that would have\nbeen _possible_, but since an object full of CLI arguments is a flat key/value structure and\nthe schema is not, this seemed like trouble.\n```\n\nInstead, Appium validates a value against a specific property _within_ the schema. To do this, it\nmaintains a mapping between a CLI argument definition and its corresponding property. The mapping\nitself is a `Map` with a unique identifier for the argument as the key, and an `ArgSpec`\n(`lib/schema/arg-spec.js`) object as the value.\n\nAn `ArgSpec` object stores the following metadata:\n\n| Property Name | Description |\n| --------------- | -------------------------------------------------------------------------------------------------------- |\n| `name` | Canonical name of the argument, corresponding to the property name in the schema. |\n| `extType?` | `driver` or `plugin`, if appropriate |\n| `extName?` | Extension name, if appropriate |\n| `ref` | Computed `$id` of the property in the schema |\n| `arg` | Argument as accepted on CLI, without leading dashes |\n| `dest` | Property name in parsed arguments object (as returned by `argparse`'s `parse_args()`) |\n| `defaultValue?` | Value of the `default` keyword in schema, if appropriate |\n\nWhen a schema is [finalized](#schema-loading), the `Map` is populated with `ArgSpec` objects\nfor all known arguments.\n\nSo when the adapter is creating the pipeline of functions for the argument's `type`, it already has\nan `ArgSpec` for the argument. It creates a function which calls `validate(value, ref)` (in\n`lib/schema/schema.js`) where `value` is whatever the user provided, and `ref` is the `ref`\nproperty of the `ArgSpec`. The concept is that `ajv` can validate using _any_ `ref` it knows about;\neach property in a schema can be referenced by this `ref` whether it's defined or not. To help\nvisualize, if a schema is:\n\n```json\n{\n \"$id\": \"my-schema.json\",\n \"type\": \"object\",\n \"properties\": {\n \"foo\": {\n \"type\": \"number\"\n }\n }\n}\n```\n\nThe `ref` of `foo` would be `my-schema.json#/properties/foo`. Assuming our `Ajv` instance knows\nabout this `my-schema.json`, then we can call its `getSchema(ref)` method (which has a `schema`\nproperty, but is a misnomer nonetheless) to get a validation function; `validate(value, ref)` in\n`schema.js` calls this validation function.\n\n!!! note\n\n```\nThe schema spec says a schema author can supply an explicit `$id` keyword to override this;\nit's unsupported by Appium at this time. If needed, extension authors must carefully use `$ref`\nwithout custom `$id`s. It's highly unlikely an extension would have a schema so complicated as\nto need this, however; Appium itself doesn't even use `$ref` to define its own properties!\n```\n\nNext, let's take a look at how Appium loads schemas. This actually happens _before_ any argument\nvalidation.\n\n## Schema Loading\n\nLet's ignore extensions for a moment, and start with the base schema.\n\nWhen something first imports the `lib/schema/schema.js` module, an instance of an `AppiumSchema` is\ncreated. This is a singleton, and its methods are exported from the module (all of which are bound\nto the instance).\n\nThe constructor does very little; it instantiates an `Ajv` instance and configures it with Appium's\n[custom keywords](#custom-keyword-reference) and adds support for the `format` keyword via the\n[ajv-formats](https://npm.im/ajv-formats) module.\n\nOtherwise, the `AppiumSchema` instance does not interact with the `Ajv` instance until its\n`finalize()` method (exported as `finalizeSchema()`) is called. When this method is called, we're\nsaying \"we are not going to add any more schemas; go ahead and create `ArgSpec` objects and\nregister schemas with `ajv`\".\n\nWhen does finalization happen? Well:\n\n1. When the `appium` executable begins, it _checks for and configures extensions_ (hand-wave) in `APPIUM_HOME`.\n2. Only then does it start to think about arguments--it instantiates an `ArgParser`, which (as you'll recall) runs the adapter to convert the schema to arguments.\n3. _Finalization happens here_--when creating the parser. Appium need the schema(s) to be registered with `ajv` in order to create validation functions for arguments.\n4. Thereafter, Appium parses the arguments with the `ArgParser`.\n5. Finally, decides what to do with the returned object.\n\nWithout extensions, `finalize()` still knows about the Appium base schema\n(`appium-config-schema.js`), and just registers that. However, step 1. above is doing a _lot of\nwork_, so let's look at how extensions come into play.\n\n## Extension Support\n\nOne of the design goals of this system is the following:\n\n_An extension should be able to register custom CLI arguments with the Appium, and a user should be\nable to use them like any other argument_.\n\nPreviously, Appium accepted arguments in this manner (via `--driverArgs`), but validation was\nhand-rolled and required extension implementors to use a custom API. It also required the user to\nawkwardly pass a JSON string as the configuration on the command-line. Further, no contextual help\n(via `--help`) existed for these arguments.\n\nNow, by providing a schema for its options, a driver or plugin can register CLI arguments and\nconfig file schemas with Appium.\n\nTo register a schema, an extension must provide the `appium.schema` property in its `package.json`.\nThe value may be a schema or a path to a schema. If the latter, the schema should be JSON or\na CommonJS module (ESM not supported at this time, nor is YAML).\n\nFor any property in this schema, the property will appear as a CLI argument of the form\n`----`. For example, if the `fake` driver provides\na property `foo`, the argument will be `--driver-fake-foo`, and will show in `appium server --help`\nlike any other CLI argument.\n\nThe corresponding property in a config file would be\n`server...`, e.g.:\n\n```json\n{\n \"server\": {\n \"driver\": {\n \"fake\": {\n \"foo\": \"bar\"\n }\n }\n }\n}\n```\n\nThe naming convention described above avoids problems of one extension type having a name conflict\nwith a different extension type.\n\n!!! note\n\n```\nWhile an extension can provide aliases via `appiumCliAliases`, \"short\" flags are disallowed,\nsince all arguments from extensions are prefixed with `----`.\nThe extension name and argument name will be kebab-cased for the CLI, according to [Lodash's\nrules](https://lodash.com/docs/4.17.15#kebabCase) around kebab-casing.\n```\n\nThe schema object will look much like Appium's base schema, but it will only have top-level\nproperties (nested properties are currently unsupported). Example:\n\n```json\n{\n \"title\": \"my rad schema for the cowabunga driver\",\n \"type\": \"object\",\n \"properties\": {\n \"fizz\": {\n \"type\": \"string\",\n \"default\": \"buzz\",\n \"$comment\": \"corresponds to CLI --driver-cowabunga-fizz\"\n }\n }\n}\n```\n\nAs written in a user's config file, this would be the `server.driver.cowabunga.fizz` property.\n\nWhen extensions are loaded, the `schema` property is verified and the schema is registered with the\n`AppiumSchema` (it is _not_ registered with `Ajv` until `finalize()` is called).\n\nDuring finalization, each registered schema is added to the `Ajv` instance. The schema is assigned\nan `$id` based on the extension type and name (which overrides whatever the extension provides, if\nanything). Schemas are also forced to disallowed unknown arguments via the `additionalProperties:\nfalse` keyword.\n\nBehind the scenes, the base schema has `driver` and `plugin` properties which are objects. When\nfinalized, a property is added to each--corresponding to an extension name--and the value of this\nproperty is a reference to the `$id` of a property in the extension schema. For example, the\n`server.driver` property will look like this:\n\n```json\n{\n \"driver\": {\n \"cowabunga\": {\n \"$ref\": \"driver-cowabunga.json\"\n }\n }\n}\n```\n\nThis is why we call it the \"base\" schema--it is _mutated_ when extensions provide schemas. The\nextension schemas are kept separately, but the _references_ are added to the schema before it's\nultimately added to `ajv`. This works because an `Ajv` instance understands references _from_ any\nschema it knows about _to_ any schema it knows about.\n\n!!! note\n\n```\nThis makes it impossible to provide a complete static schema for Appium _and_ the installed\nextensions (as of Nov 5 2021). A static `.json` schema _is_ generated from the base (via a Gulp\ntask), but it does not contain any extension schemas. The static schema also has uses beyond\nAppium; e.g., IDEs can provide contextual error-checking of config files this way. Let's solve\nthis?\n```\n\nJust like how we look up the reference ID of a particular argument in the base schema, validation\nof arguments from extensions happens the exact same way. If the `cowabunga` driver has the schema\nID `driver-cowabunga.json`, then the `fizz` property can be referenced from any schema registered\nwith `ajv` via `driver-cowabunga.json#/properties/fizz`. \"Base\" schema arguments begin with\n`appium.json#properties/` instead.\n\n## Development Environment Support\n\nDuring the flow of development, a couple extra tasks have been automated to maintain the base\nschema:\n\n- As a post-transpilation step, a `lib/appium-config.schema.json` gets generated from\n- `lib/schema/appium-config-schema.js` (in addition to its CJS counterpart generated by Babel).\n- This file is under version control. It ends up being _copied_ to\n- `build/lib/appium-config.schema.json` in this step. A pre-commit hook (see\n- `scripts/generate-schema-declarations.js` in the root monorepo) generates\n- a `types/appium-config-schema.d.ts` from the above JSON file. The types in `types/types.d.ts`\n- depend upon this file. This file is under version control.\n\n## Custom Keyword Reference\n\nKeywords are defined in `lib/schema/keywords.js`.\n\n- `appiumCliAliases`: allows a schema to express aliases (e.g., a CLI argument can be `--verbose` or `-v`). This is an array of strings. Strings shorter than three (3) characters will begin with a single dash (`-`) instead of a double-dash (`--`). Note that any argument provided by an extension will begin with a double-dash, because these are required to have the `----` prefix.\n- `appiumCliDest`: allows a schema to specify a custom property name in the post-`argprase` arguments objects. If not set, this becomes a camelCased string.\n- `appiumCliDescription`: allows a schema to override the description of the argument when displayed on the command-line. This is useful paired with `appiumCliTransformer` (or `array`/`object`-typed properties), since there's a substantial difference between what a CLI-using user can provide vs. what a config-file-using user can provide.\n- `appiumCliTransformer`: currently a choice between `csv` and `json`. These are custom functions which post-process a value. They are not used when loading & validating config files, but the idea should be that they result in the same object you'd get if you used whatever the config file wanted (e.g., an array of strings). `csv` is for comma-delimited strings and CSV files; `json` is for raw JSON strings and `.json` files.\n- `appiumCliIgnore`: If `true`, do not support this property on the CLI.\n- `appiumDeprecated`: If `true`, the property is considered \"deprecated\", and will be displayed as such to the user (e.g., in the `--help` output). Note the JSON Schema draft-2019-09 introduces a new keyword `deprecated` which we should use instead if upgrading to this metaschema. When doing so, `appiumDeprecated` should itself be marked as `deprecated`.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/developing/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Developing Appium Extensions\n---\n\nAppium is built with a modular structure, which means that Appium extensions (drivers and plugins)\nare decoupled from the main Appium module, and you only need to install the extensions that you\nwant to use. This modular structure also unlocks the ability to develop entirely new extensions!\n\nThis section of the Appium documentation is intended to help aspiring developers with creating their\nown Appium extension:\n\n- For creating a driver, see the [Build Drivers](./build-drivers.md) page\n- For creating a plugin, take a look at the [Build Plugins](build-plugins.md) page\n- Drivers and plugins both need documentation, so check out the [Build Documentation](./build-docs.md) page\n- For creating a doctor check, see the [Building Doctor Checks](./build-doctor-checks.md) page\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/developing/sensitive.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Masking Sensitive Log Data\n---\n\nSince Appium server version 2.18.0 there is a possibility to mask sensitive\nvalues in logs. The below tutorial explains how to use this feature in third-party\nextensions.\n\n## Why It Might Be Useful\n\nIt is the right call to hide sensitive information, like passwords, tokens, etc.\nfrom server logs, so it does not accidentally leak if these logs end up in wrong hands.\nAppium server already provides a way to manipulate logs records via\n[filtering](../guides/log-filters.md), although it has its own limitations.\nThe current approach is more sophisticated though, and requires some fine-tuning\non the driver/plugin side.\n\n## How To\n\nThe assumption is that your extension uses the standard built-in\n[@appium/logger](https://www.npmjs.com/package/@appium/logger).\nIn order to get some value in logs replaced by a generic mask it is necessary:\n\n- Change the logging expression to wrap sensitive values and format them, for example:\n\n ```js\n this.log.info(`Value: ${value}`);\n ```\n\n becomes\n\n ```js\n import {logger} from '@appium/support';\n \n this.log.info('Value: %s', logger.markSensitive(value));\n ```\n\n The formatting happens via the standard Node.js's\n [util.format](https://nodejs.org/api/util.html#utilformatformat-args) API.\n\n- While sending the appropriate server request, where this log line is used and should be masked,\n add the custom header `X-Appium-Is-Sensitive` with its value set to `1` or `true` (case-insensitive).\n Without such header the above log value is not going to be masked.\n This way it is possible to conditionally mask log records depending on which\n request is being handled by the extension if the log expression is used in the\n common section.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/ecosystem/clients.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Clients\n---\n\nYou need a client to write and run Appium scripts. You'll want to become very\nfamiliar with your client documentation (as well as the documentation of any Selenium client that\nthe Appium client depends on) since that will be your primary interface to Appium.\n\nTo learn more about clients, check out the [Client Intro](../intro/clients.md).\n\n!!! note\n\n```\nIf you maintain an Appium client that you would like to be listed here, feel free to create a PR!\n```\n\n## Official Clients\n\nThese clients are currently maintained by the Appium team:\n\n### [Java Client](https://github.com/appium/java-client)\n\nLanguage: :fontawesome-brands-java: Java\n\n\\=== \"Setup With Maven\"\n\n````\n```xml\n\n io.appium\n java-client\n ${version.you.require}\n test\n\n```\n````\n\n\\=== \"Setup With Gradle\"\n\n````\n```groovy\ndependencies {\n testImplementation 'io.appium:java-client:${version.you.require}'\n}\n```\n````\n\n### [Python Client](https://github.com/appium/python-client)\n\nLanguage: :fontawesome-brands-python: Python\n\n```sh title=\"Install From PyPi\"\npip install Appium-Python-Client\n```\n\n### [Ruby Core Client](https://github.com/appium/ruby_lib_core)\n\nLanguage: :material-language-ruby: Ruby\n\n```sh title=\"Install From RubyGems\"\ngem install appium_lib_core\n```\n\n### [Ruby Client](https://github.com/appium/ruby_lib)\n\nLanguage: :material-language-ruby: Ruby\n\nThis client is a wrapper for the Ruby Core Client with several helper methods, though this may\nadd additional complexity, therefore the Ruby Core Client is recommended instead.\n\n```sh title=\"Install From RubyGems\"\ngem install appium_lib\n```\n\n### [.NET Client](https://github.com/appium/dotnet-client)\n\nLanguage: :simple-dotnet: C#\n\n```sh title=\"Install Using .NET CLI\"\ndotnet add package Appium.WebDriver\n```\n\n## Other Clients\n\nThese clients are not maintained by the Appium team and can be used with other languages.\n\nIn general, any W3C WebDriver spec-compatible client will also integrate well with Appium, though\nsome Appium-specific commands may not be implemented in other clients.\n\n### [WebdriverIO](https://webdriver.io/docs/appium)\n\nLanguage: :material-language-javascript: :material-language-typescript: JavaScript/TypeScript\n\n```sh title=\"Setup Using npm\"\nnpm init wdio@latest .\n```\n\n### [Nightwatch.js](https://nightwatchjs.org/guide/mobile-app-testing/introduction.html)\n\nLanguage: :material-language-javascript: :material-language-typescript: JavaScript/TypeScript\n\n\\=== \"Setup For Android\"\n\n````\n```sh\nnpx @nightwatch/mobile-helper android --appium\n```\n````\n\n\\=== \"Setup For iOS\"\n\n````\n```sh\nnpx @nightwatch/mobile-helper ios --appium\n```\n````\n\n### [RobotFramework AppiumLibrary](https://github.com/serhatbolsu/robotframework-appiumlibrary)\n\nLanguage: :simple-robotframework: Robot Framework\n\n```sh title=\"Install From PyPi\"\npip install robotframework-appiumlibrary\n```\n\n### [multicatch's appium-client](https://github.com/multicatch/appium-client)\n\nLanguage: :simple-rust: Rust\n\n```sh title=\"Install Using Cargo\"\ncargo add appium-client\n```\n\n### [SwiftAppium](https://github.com/milcgroup/swiftappium)\n\nLanguage: :material-language-swift: Swift\n\n```sh title=\"Install and Setup\"\ngit clone https://github.com/milcgroup/SwiftAppium.git\ncd SwiftAppium\nswift build\nswift run swiftappium\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/ecosystem/drivers.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Drivers\n---\n\nYou can't use Appium without a driver! Here you can find a list of all known Appium drivers,\nalong with their installation commands and links to their documentation.\n\nTo learn more about drivers, check out the [Driver Intro](../intro/drivers.md).\n\n!!! note\n\n```\nIf you maintain an Appium driver that you would like to be listed here, feel free to create a PR!\n```\n\n## Official Drivers\n\nThese drivers are currently maintained by the Appium team:\n\n### [Chromium](https://github.com/appium/appium-chromium-driver)\n\n- Target: Desktop and mobile Chromium browsers (Chrome, Microsoft Edge, etc.)\n- Mode: Web\n\n```sh title=\"Install This Driver\"\nappium driver install chromium\n```\n\n### [Espresso](https://github.com/appium/appium-espresso-driver)\n\n- Target: Android applications\n- Mode: Native\n\n```sh title=\"Install This Driver\"\nappium driver install espresso\n```\n\n### [Gecko](https://github.com/appium/appium-geckodriver)\n\n- Target: Desktop and mobile Gecko browsers (Firefox)\n- Mode: Web\n\n```sh title=\"Install This Driver\"\nappium driver install gecko\n```\n\n### [Mac2](https://github.com/appium/appium-mac2-driver)\n\n- Target: macOS applications\n- Mode: Native\n\n```sh title=\"Install This Driver\"\nappium driver install mac2\n```\n\n### [Safari](https://github.com/appium/appium-safari-driver)\n\n- Target: Desktop and mobile Safari browsers\n- Mode: Web\n\n```sh title=\"Install This Driver\"\nappium driver install safari\n```\n\n### [UiAutomator2](https://github.com/appium/appium-uiautomator2-driver)\n\n- Target: Android, Android TV, Android Wear applications\n- Modes: Native, Hybrid, Web\n\n```sh title=\"Install This Driver\"\nappium driver install uiautomator2\n```\n\n### [Windows](https://github.com/appium/appium-windows-driver)\n\n!!! warning\n\n```\nOnly the Node.js-based driver part is maintained by the Appium team. The server part\n(WinAppDriver executable) is provided by Microsoft, but has not been maintained since 2022.\n```\n\n- Target: Windows applications\n- Mode: Native\n\n```sh title=\"Install This Driver\"\nappium driver install windows\n```\n\n### [XCUITest](https://appium.github.io/appium-xcuitest-driver/)\n\n- Target: iOS, iPadOS, tvOS applications\n- Modes: Native, Hybrid, Web\n\n```sh title=\"Install This Driver\"\nappium driver install xcuitest\n```\n\n## Other Drivers\n\nThese drivers are not maintained by the Appium team and can be used to target other platforms:\n\n### [Flutter](https://github.com/appium/appium-flutter-driver)\n\n- Target: iOS and Android applications built with Flutter\n- Mode: Native\n- Supported by: Appium Team / Community\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-flutter-driver\n```\n\n### [Flutter Integration](https://github.com/AppiumTestDistribution/appium-flutter-integration-driver)\n\n- Target: iOS and Android applications built with Flutter\n- Mode: Native\n- Supported by: Community / `@AppiumTestDistribution`\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-flutter-integration-driver\n```\n\n### [LG WebOS](https://github.com/headspinio/appium-lg-webos-driver)\n\n- Target: LG TV web applications\n- Mode: Web\n- Supported by: HeadSpin\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-lg-webos-driver\n```\n\n### [Linux](https://github.com/fantonglang/appium-linux-driver)\n\n!!! warning\n\n```\nThis driver has not been maintained since 2022 and requires a custom Appium installation\n```\n\n- Target: Linux applications\n- Mode: Native\n- Supported by: `@fantonglang`\n\n```sh title=\"Install This Driver\"\ngit clone https://github.com/fantonglang/appium\ncd appium\nyarn install\nnode ./\n```\n\n### [NovaWindows](https://github.com/AutomateThePlanet/appium-novawindows-driver)\n\n!!! info\n\n```\nThis driver is recommended as a drop-in replacement for the partially unmaintained\n[Windows driver](#windows)\n```\n\n- Target: Windows applications\n- Mode: Native\n- Supported by: Community / Automate The Planet\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-novawindows-driver\n```\n\n### [Roku](https://github.com/headspinio/appium-roku-driver)\n\n- Target: Roku channels (applications)\n- Mode: Native\n- Supported by: HeadSpin\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm @headspinio/appium-roku-driver\n```\n\n### [Tizen](https://github.com/Samsung/appium-tizen-driver)\n\n!!! warning\n\n```\nThis driver has not been maintained since 2020 and is only compatible with Appium 1\n```\n\n- Target: Tizen applications\n- Mode: Native\n- Supported by: Community / Samsung\n\n```sh title=\"Install This Driver\"\nnpm install appium-tizen-driver\n```\n\n### [TizenTV](https://github.com/headspinio/appium-tizen-tv-driver)\n\n- Target: Tizen TV web applications\n- Mode: Web\n- Supported by: HeadSpin\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-tizen-tv-driver\n```\n\n### [You.i Engine](https://github.com/YOU-i-Labs/appium-youiengine-driver)\n\n!!! warning\n\n```\nThis driver has not been maintained since 2022 and is only compatible with Appium 1\n```\n\n- Target: iOS, Android, macOS, Linux, tvOS applications built with You.i Engine\n- Mode: Native\n- Supported by: Community / You.i\n\n```sh title=\"Install This Driver\"\nnpm install appium-youiengine-driver\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/ecosystem/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: The Appium Ecosystem\n---\n\nAppium has a wide ecosystem of related software and tools. This section of the Appium documentation\naims to compile a listing of various officially-supported and community-supported Appium projects:\n\n
\n\n- :material-car: **Drivers**\n\n ---\n\n Link Appium to your test device\n\n [:octicons-arrow-right-24: View all drivers](./drivers.md)\n\n- :octicons-code-16: **Clients**\n\n ---\n\n Link Appium to your automation code\n\n [:octicons-arrow-right-24: View all clients](./clients.md)\n\n- :fontawesome-solid-plug: **Plugins**\n\n ---\n\n Modify and extend Appium functionality\n\n [:octicons-arrow-right-24: View all plugins](./plugins.md)\n\n- :material-wrench: **Tools**\n\n ---\n\n Interact with Appium in other ways\n\n [:octicons-arrow-right-24: View all tools](./tools.md)\n\n
\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/ecosystem/plugins.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Plugins\n---\n\nPlugins offer various ways to extend or modify Appium's behaviour. They are _completely optional_\nand are not needed for standard automation functionality, but you may find them to be useful\nfor more specialised automation workflows.\n\n!!! note\n\n```\nIf you maintain an Appium plugin that you would like to be listed here, feel free to create a PR!\n```\n\n## Official Plugins\n\nThese plugins are are currently maintained by the Appium team:\n\n### [Execute Driver](https://github.com/appium/appium/tree/master/packages/execute-driver-plugin)\n\nRun entire batches of commands in a single call to the Appium server\n\n```sh title=\"Install This Plugin\"\nappium plugin install execute-driver\n```\n\n### [Images](https://github.com/appium/appium/tree/master/packages/images-plugin)\n\nAdd support for image matching and comparison features\n\n```sh title=\"Install This Plugin\"\nappium plugin install images\n```\n\n### [Inspector](https://github.com/appium/appium-inspector/tree/main/plugins)\n\nIntegrate the [Appium Inspector](https://appium.github.io/appium-inspector/) directly into your\nAppium server installation\n\n```sh title=\"Install This Plugin\"\nappium plugin install inspector\n```\n\n### [Relaxed Caps](https://github.com/appium/appium/tree/master/packages/relaxed-caps-plugin)\n\nRelax Appium's requirement for vendor prefixes on capabilities\n\n```sh title=\"Install This Plugin\"\nappium plugin install relaxed-caps\n```\n\n### [Storage](https://github.com/appium/appium/tree/master/packages/storage-plugin)\n\nAdd server-side storage with client-side management\n\n```sh title=\"Install This Plugin\"\nappium plugin install storage\n```\n\n### [Universal XML](https://github.com/appium/appium/tree/master/packages/universal-xml-plugin)\n\nTranslate the default iOS and Android XML formats into a common format\n\n```sh title=\"Install This Plugin\"\nappium plugin install universal-xml\n```\n\n## Other Plugins\n\nThese plugins are not maintained by the Appium team and can provide additional functionality:\n\n### [AltUnity](https://github.com/headspinio/appium-altunity-plugin)\n\nTarget Unity games and apps for automation via the AltUnityTester framework\n\nSupported by: HeadSpin\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-altunity-plugin\n```\n\n### [Device Farm](https://github.com/AppiumTestDistribution/appium-device-farm)\n\nManage and create driver sessions on connected Android devices and iOS simulators\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-device-farm\n```\n\n### [Gestures](https://github.com/AppiumTestDistribution/appium-gestures-plugin)\n\nPerform basic gestures using W3C Actions\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-gestures-plugin\n```\n\n### [Interceptor](https://github.com/AppiumTestDistribution/appium-interceptor-plugin)\n\nIntercept and mock API requests and responses\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-interceptor\n```\n\n### [OCR](https://github.com/jlipps/appium-ocr-plugin)\n\nFind elements via OCR text\n\nSupported by: `@jlipps`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-ocr-plugin\n```\n\n### [Reporter](https://github.com/AppiumTestDistribution/appium-reporter-plugin)\n\nGenerate standalone consolidated HTML reports with screenshots\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-reporter-plugin\n```\n\n### [Wait](https://github.com/AppiumTestDistribution/appium-wait-plugin)\n\nManage global element wait timeouts\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-wait-plugin\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/ecosystem/tools.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium-Related Tools\n---\n\nThe Appium ecosystem also includes several tools that have been created to assist with things not\ndirectly related to running tests, such as Appium installation, test development, and more.\n\n!!! note\n\n```\nIf you maintain an Appium tool that you would like to be listed here, feel free to create a PR!\n```\n\n## Official Tools\n\nThese tools are currently maintained by the Appium team:\n\n### [Appium Inspector](https://appium.github.io/appium-inspector/)\n\nAppium has a graphical client which can be used to inspect application screenshots, view the\napplication hierarchy, search for elements, run Appium commands, record app interactions, and more.\nIt can be very useful for Appium test development.\n\n\\=== \"Install as an Appium Plugin\"\n\n````\n```bash\nappium plugin install inspector\n```\n````\n\n\\=== \"Install Standalone\"\n\n```\nDownload the app from the Appium Inspector repo's [GitHub Releases section](https://github.com/appium/appium-inspector/releases).\n```\n\n### [Appium MCP](https://github.com/appium/appium-mcp)\n\nAppium MCP is a Model Context Protocol (MCP) server that provides mobile test development and\nautomation capabilities using Appium.\n\n```json title=\"Install This Tool\"\n// Add the following to your MCP client configuration\n{\n \"appium-mcp\": {\n \"disabled\": false,\n \"timeout\": 100,\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\"appium-mcp@latest\"],\n \"env\": {\n \"ANDROID_HOME\": \"/path/to/android/sdk\"\n }\n }\n}\n```\n\n## Extension Tools\n\nAppium driver or plugin developers can choose to include these tools in their driver/plugin:\n\n### Appium Doctor\n\nThe Appium Doctor tool can be used to validate whether all prerequisites and other environment\ndetails needed for the driver/plugin have been set up correctly. The tool can be accessed via the\n[`doctor` command in the Appium CLI](../reference/cli/extensions.md#doctor):\n\n```sh\nappium {driver|plugin} doctor \n```\n\nIt shows no results if the driver/plugin does not have such validation checks.\n\n!!! note\n\n```\nIf you maintain an Appium extension and would like to add Appium Doctor support for it, check\nout the documentation on [Building Doctor Checks](../developing/build-doctor-checks.md).\n```\n\n## Other Tools\n\nThese tools are not maintained by the Appium team:\n\n### [Appium Installer](https://github.com/AppiumTestDistribution/appium-installer)\n\nAppium Installer is a command-line tool for simplifying setups of new Appium test environments.\nIt includes commands for installing Appium, its drivers and plugins, as well as validating\nprerequisites for iOS or Android emulators or real devices.\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Tool\"\nnpm install -g appium-installer\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/branch-testing.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Local Validation Of Extension PRs\n---\n\nSometimes it might be necessary to validate if a remote driver or a plugin PR works for the particular local\nenvironment before it is merged or published. This tutorial describes how to achieve that.\n\n## Requirements\n\n- Recent LTS version of NodeJS. Check [Node.js main page](https://nodejs.org) for the download link.\n- Recent version of the Appium server. Use the following commands to ensure you have\n the latest version installed: `npm uninstall appium` and `npm install -g appium`.\n- [Git](https://git-scm.com/) should be available locally.\n\n## Installation\n\n- [Check out](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally) the PR locally.\n There is also an option (although it is less flexible, because you won't be able to easily fetch\n any changes to this PR later) to simply [download](https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives) and unzip the sources\n locally. If you choose the later option then no `git` tool would be necessary.\n- Navigate to the local driver or plugin folder and run `npm i` from that folder.\n- Make sure you don't have the given driver or plugin already installed. Use the `appium driver uninstall `\n or `appium plugin uninstall ` CLI in order to delete any leftovers. The value of\n ``/`` depends on the actual driver or plugin name the PR has been prepared for.\n If you are not sure which name you need to use then check the content of the `package.json` manifest,\n which must be always located under the root folder of the fetched sources. You should be looking for\n the `\"appium\" -> \"driverName\"` entry value there.\n- Change the current folder to the one, which is NOT the driver/plugin folder root or its subfolder.\n Also, make sure your current working folder does not contain any extra `package.json` file. If\n it does then simply navigate to any other folder that does not.\n- Run the following command in order to link the driver/plugin sources to the Appium server:\n `appium driver install --source=local ` or\n `appium plugin install --source=local `.\n- Stop the Appium server if it is running and start it again (`appium server --use-drivers=`)\n to check the list of loaded drivers. If the linking succeeded then you must see the driver name and the path to its\n parent folder in the server logs. In case of a plugin it is required to explicitly request\n this plugin to be loaded upon server startup: `appium server --use-plugins=`.\n\n## Update\n\nAfter you have tested the PR and there are issues it might be necessary to update the local branch with\nthe recent changes from Git. Follow the next steps for that:\n\n- Navigate to the parent folder of your local driver/plugin and run `git pull`.\n- Stop Appium server if it is running.\n- Run `npm i` in the parent folder of your local driver/plugin to rebuild it and update any dependencies if necessary.\n- Start Appium server again similarly to how this is done in the corresponding [Installation](#installation) step above.\n\n## Switching Back To a Stable Release\n\nAfter the PR is merged there is no need to use the local plugin/driver deployment anymore, and it makes sense\nto switch back to the package managed by NPM. Follow the next steps for that:\n\n- Unlink the installed driver/plugin from the server by running `appium driver uninstall ` or\n `appium plugin uninstall `.\n- Delete the local source folder (`rm -rf `).\n- Install the driver or the plugin from NPM. Check the component README in order to find a proper command for that.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/caching.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Caching of Application Bundles\n---\n\nAppium's base driver provides a feature which enables caching of application builds provided, for example,\nas `app` capability value or to endpoints similar to the `installApp` one. This article explains common caching\nprinciples, so you could create more performant and efficient test suite execution strategies.\n\n## Why Caching Is Necessary\n\nMobile application bundles could reach hundreds of megabytes is size. This could become a serious\nperformance issue if a test suite is executed, and it is necessary to fetch/extract the same application\nbundle for each test.\n\n## What Is Cached\n\nCaching could be applied to application bundles generated by\n[`configureApp`](https://github.com/appium/appium/blob/master/packages/base-driver/lib/basedriver/helpers.js#L107) helper call.\nInherited drivers can customize their caching logic by providing own `onPostProcess`\n(or both `inDownload` and `onPostProcess`) property definition, but the general\nrule of thumb is that we need to cache locally all application bundles need to be downloaded and/or extracted\nfirst before they could be actually installed on the device under test. On iOS, for example, these are `.ipa` or\n`.zip` compressed application bundles, or .`aab` on Android.\n\n## Caching of Remote Application Bundles\n\nIn order to validate whether an app bundle downloaded from the given URL could be (re)used from the cache the following\nsteps are applied:\n\n1. The script checks if the given URL is already present in the cache.\n If yes then it tries to fetch previously remembered\n [Last-Modified](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified)\n or [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header values for it.\n2. If `ETag` value is present then it is put into\n [If-None-Match request header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match).\n Else if `Last-Modified` header value is present then it is put into\n [If-Modified-Since request header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since).\n Otherwise, no caching is applied.\n3. If the response status is equal to `304` then the previously cached binary is used,\n otherwise the cached entry is reset and refreshed.\n\n## Caching of Local Application Bundles\n\nIt only makes sense to cache application bundles if they need some preprocessing before being installed on the device under test.\nFor example, on iOS `.ipa` bundles must be unzipped, because the system installer only works with `.app` folders.\n\n1. The script verifies if the given bundle path is already present in the cache. If the bundle was not in the cache yet\n then it gets preprocessed and added there.\n2. The script validates the hashsum of the bundle and compares it to the previously stored one. If hash sums don't match\n then the cached item gets deleted and the preprocessing of the bundle repeats.\n\n## How The Cache File System Is Configured\n\nThe cache where the base driver keeps all application bundles is located in the system temp folder. It is configured\non per-process basis, so each test session initialized in scope of the same Appium server process takes advantages\nof it. It is a [LRU Cache](https://www.npmjs.com/package/lru-cache) with the following limitations:\n\n- Max items: 1024. You may customize it by providing a new value to\n the [APPIUM_APPS_CACHE_MAX_ITEMS](../reference/cli/env-vars.md) environment variable.\n Do not set it to a lower number than the amount of apps in all parallel sessions per process.\n- Max time to live (TTL) for each entry: 24 hours.\n You may customize it by providing a new value to the\n [APPIUM_APPS_CACHE_MAX_AGE](../reference/cli/env-vars.md) environment variable.\n Do not set it to a lower number than the duration of a single session startup.\n- TTL is refreshed for each entry upon access\n- By default the full application URL is used as cache key. You may change this behavior\n by enabling the [APPIUM_APPS_CACHE_IGNORE_URL_QUERY](../reference/cli/env-vars.md) environment variable.\n If the above option is enabled then the 'search' part of the app URL will be cut off from cache keys.\n See the corresponding [feature request](https://discuss.appium.io/t/regarding-app-caching-when-using-aws-s3-presigned-urls/42713)\n for more details.\n\n!!! warning\n\n```\nNote: The cache root folder is set up for automatic deletion on Appium process termination. This would only\nwork if Appium server is killed with `SIGINT` or `SIGTERM`. If `SIGKILL` is used then no cache cleanup\nwould be performed.\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/caps.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Session Capabilities\n---\n\n\u300cCapabilities\u300d\u306f\u3001Appium\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u958b\u59cb\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u4ed8\u3051\u3089\u308c\u305f\u540d\u524d\u3067\u3059\u3002 \u30bb\u30c3\u30c8\u5185\u306e\u60c5\u5831\u306f\u3001\u30bb\u30c3\u30b7\u30e7\u30f3\u306b\u3069\u306e\u3088\u3046\u306a\u300cCapabilities\u300d\u3092\u6301\u305f\u305b\u305f\u3044\u304b\u3092\u8868\u3057\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u7279\u5b9a\u306e\u30e2\u30d0\u30a4\u30eb\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3084\u7279\u5b9a\u306e\u30c7\u30d0\u30a4\u30b9\u30d0\u30fc\u30b8\u30e7\u30f3\u306a\u3069\u3067\u3059\u3002 Capabilities \u306f\u30ad\u30fc\u3068\u5024\u306e\u30da\u30a2\u3068\u3057\u3066\u8868\u3055\u308c\u3001\u5024\u306b\u306f\u4ed6\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u542b\u3080\u4efb\u610f\u306e\u6709\u52b9\u306a JSON \u578b\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002\n\nW3C WebDriver \u4ed5\u69d8\u306e [Capabilities \u306b\u95a2\u3059\u308b\u30bb\u30af\u30b7\u30e7\u30f3](https://w3c.github.io/webdriver/#capabilities) \u3067\u306f\u3001\u4ee5\u4e0b\u306e\u6a5f\u80fd\u3092\u542b\u3080 10 \u500b\u306e\u6a19\u6e96\u6a5f\u80fd\u306e\u30bb\u30c3\u30c8\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\uff1a\n\n| Capability \u540d | \u578b | \u8aac\u660e |\n| ---------------- | -------- | --------------------- |\n| `browserName` | `string` | \u8d77\u52d5\u3057\u3066\u81ea\u52d5\u5316\u3059\u308b\u30d6\u30e9\u30a6\u30b6\u306e\u540d\u524d |\n| `browserVersion` | `string` | \u30d6\u30e9\u30a6\u30b6\u306e\u30d0\u30fc\u30b8\u30e7\u30f3 |\n| `platformName` | `string` | \u30d6\u30e9\u30a6\u30b6\u3092\u30db\u30b9\u30c8\u3059\u308b\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u7a2e\u985e |\n\n## \u4e00\u822c\u7684\u306aAppium\u306eCapabilities\n\nAppium \u306f\u3053\u308c\u3089\u306e\u30d6\u30e9\u30a6\u30b6\u306b\u7126\u70b9\u3092\u5f53\u3066\u305f capabilities \u3092\u7406\u89e3\u3057\u307e\u3059\u304c\u3001\u3044\u304f\u3064\u304b\u306e capabilities \u3082\u8ffd\u52a0\u5c0e\u5165\u3057\u3066\u3044\u307e\u3059\u3002 WebDriver \u4ed5\u69d8\u306b\u3088\u308c\u3070\u3001\u975e\u6a19\u6e96\u306e\u300c\u62e1\u5f35 capabilities\u300d\u306b\u306f\u3001capabilities \u3092\u5c0e\u5165\u3057\u305f\u30d9\u30f3\u30c0\u30fc\u3092\u793a\u3059\u540d\u524d\u7a7a\u9593\u3068\u306a\u308b\u63a5\u982d\u8f9e\uff08\u672b\u5c3e\u306b\u300c:\u300d\uff09\u3092\u542b\u3081\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 Appium \u306e\u63a5\u982d\u8f9e\u306f\u300cappium:\u300d\u3067\u3042\u308b\u305f\u3081\u3001Appium \u56fa\u6709\u306e capabilities \u306b\u306f\u5fc5\u305a\u3053\u306e\u63a5\u982d\u8f9e\u3092\u542b\u3081\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u4f7f\u7528\u3057\u3066\u3044\u308b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u3088\u3063\u3066\u306f\u63a5\u982d\u8f9e\u304c\u81ea\u52d5\u7684\u306b\u8ffd\u52a0\u3055\u308c\u308b\u5834\u5408\u3082\u3042\u308c\u3070\u3001\u7279\u5b9a\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u8ffd\u52a0\u3055\u308c\u308b\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u660e\u78ba\u306b\u3059\u308b\u305f\u3081\u306b\u660e\u793a\u7684\u306b\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002\n\n\u4ee5\u4e0b\u306f\u69d8\u3005\u306a\u30c9\u30e9\u30a4\u30d0\u30fc\u3067\u8a8d\u8b58\u3055\u308c\u308b Appium \u306e capabilities \u306e\u4e00\u89a7\u3067\u3059\uff1a\n\n!!! info\n\n```\n\u500b\u3005\u306e\u30c9\u30e9\u30a4\u30d0\u3084\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u72ec\u81ea\u306e capabilities \u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u5834\u5408\u304c\u3042\u308b\u305f\u3081\u3001\u5177\u4f53\u7684\u306a capability \u540d\u306e\u30ea\u30b9\u30c8\u306b\u3064\u3044\u3066\u306f\u3001\u305d\u308c\u305e\u308c\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305f\u3001\u4e00\u90e8\u306e\u30c9\u30e9\u30a4\u30d0\u306f\u3053\u308c\u3089\u306e capabilities \u3092\u3059\u3079\u3066\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\n```\n\n|
Capability \u540d
| \u578b | \u5fc5\u9808\u304b | \u8aac\u660e |\n| ------------------------------------------ | --------- | --- | ------------------------------------------------------------------------------------------------------------------------- |\n| `platformName` | `string` | \u306f\u3044 | \u30a2\u30d7\u30ea\u307e\u305f\u306f\u30d6\u30e9\u30a6\u30b6\u3092\u30db\u30b9\u30c8\u3059\u308b\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u7a2e\u985e |\n| `appium:automationName` | `string` | \u306f\u3044 | \u4f7f\u7528\u3059\u308bAppium\u30c9\u30e9\u30a4\u30d0\u306e\u540d\u524d |\n| `browserName` | `string` | \u3044\u3044\u3048 | \u30c9\u30e9\u30a4\u30d0\u30fc\u304c\u7279\u5225\u306a\u30b1\u30fc\u30b9\u3068\u3057\u3066Web\u30d6\u30e9\u30a6\u30b6\u30fc\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u8d77\u52d5\u3057\u3066\u81ea\u52d5\u5316\u3059\u308b\u30d6\u30e9\u30a6\u30b6\u30fc\u306e\u540d\u524d |\n| `appium:app` | `string` | \u3044\u3044\u3048 | \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u53ef\u80fd\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3078\u306e\u30d1\u30b9 |\n| `appium:deviceName` | `string` | \u3044\u3044\u3048 | \u81ea\u52d5\u5316\u3059\u308b\u7279\u5b9a\u306e\u30c7\u30d0\u30a4\u30b9\u306e\u540d\u524d\u3001\u4f8b\uff1a`iPhone 14`\uff08\u73fe\u5728\u306e\u3068\u3053\u308d\u3001iOS \u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u30fc\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u306b\u306e\u307f\u5f79\u7acb\u3061\u307e\u3059\u3002\u4ed6\u306e\u72b6\u6cc1\u3067\u306f\u901a\u5e38\u3001`appium:udid` \u6a5f\u80fd\u3092\u4f7f\u7528\u3057\u3066\u7279\u5b9a\u306e\u30c7\u30d0\u30a4\u30b9 Id \u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\uff09\u3002 |\n| `appium:platformVersion` | `string` | \u3044\u3044\u3048 | \u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\uff08\u4f8b\uff1aiOS \u306e\u5834\u5408\u306f `16.0`\uff09 |\n| `appium:newCommandTimeout` | `number` | \u3044\u3044\u3048 | \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u3053\u308c\u4ee5\u4e0a\u30b3\u30de\u30f3\u30c9\u3092\u9001\u4fe1\u3057\u3066\u3053\u306a\u3044\u3068\u5224\u65ad\u3057\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u7d42\u4e86\u3059\u308b\u524d\u306b\u3001Appium \u30b5\u30fc\u30d0\u30fc\u304c\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u306e\u30b3\u30de\u30f3\u30c9\u9001\u4fe1\u3092\u5f85\u6a5f\u3059\u308b\u79d2\u6570\u3002 \u30c7\u30d5\u30a9\u30eb\u30c8\u306f `60` \u79d2\u3002 \u30bc\u30ed\u306b\u8a2d\u5b9a\u3059\u308b\u3068\u30bf\u30a4\u30de\u30fc\u304c\u7121\u52b9\u306b\u306a\u308a\u307e\u3059\u3002 |\n| `appium:noReset` | `boolean` | \u3044\u3044\u3048 | true \u306e\u5834\u5408\u3001\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u958b\u59cb\u3068\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\u4e2d\u306b\u901a\u5e38\u306e\u30ea\u30bb\u30c3\u30c8\u51e6\u7406\u3092\u56de\u907f\u3059\u308b\u3088\u3046\u306b Appium \u30c9\u30e9\u30a4\u30d0\u30fc\u306b\u6307\u793a\u3057\u307e\u3059 (\u30c7\u30d5\u30a9\u30eb\u30c8\u306f `false`) |\n| `appium:fullReset` | `boolean` | \u3044\u3044\u3048 | true \u306e\u5834\u5408\u3001Appium \u30c9\u30e9\u30a4\u30d0\u30fc\u306b\u901a\u5e38\u306e\u30ea\u30bb\u30c3\u30c8\u51e6\u7406\u306b\u8ffd\u52a0\u306e\u624b\u9806\u3092\u8ffd\u52a0\u3057\u3066\u3001\u74b0\u5883\u306e\u518d\u73fe\u6027\u3092\u6700\u5927\u9650\u306b\u9ad8\u3081\u308b\u3088\u3046\u306b\u6307\u793a\u3057\u307e\u3059 (\u30c7\u30d5\u30a9\u30eb\u30c8\u306f `false`) |\n| `appium:eventTimings` | `boolean` | \u3044\u3044\u3048 | true \u306e\u5834\u5408\u3001Appium \u30c9\u30e9\u30a4\u30d0\u30fc\u306b [Event Timings](./event-timing.md) \u3092\u53ce\u96c6\u3059\u308b\u3088\u3046\u306b\u6307\u793a\u3057\u307e\u3059 (\u30c7\u30d5\u30a9\u30eb\u30c8\u306f `false`) |\n| `appium:printPageSourceOnFindFailure` | `boolean` | \u3044\u3044\u3048 | true \u306e\u5834\u5408\u3001\u8981\u7d20\u306e\u691c\u7d22\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u5931\u6557\u3059\u308b\u305f\u3073\u306b\u30da\u30fc\u30b8\u30bd\u30fc\u30b9\u3092\u53ce\u96c6\u3057\u3001Appium \u30ed\u30b0\u306b\u51fa\u529b\u3057\u307e\u3059 (\u30c7\u30d5\u30a9\u30eb\u30c8\u306f `false`) |\n\n\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u4e2d\u306b\u306f\u3001capabilities\u306e\u3088\u308a\u8907\u96d1\u306a\u5236\u7d04\u3092\u30b0\u30eb\u30fc\u30d7\u3068\u3057\u3066\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u3082\u306e\u3082\u3042\u308a\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001`appium:app` \u304a\u3088\u3073 `browserName` capabilities \u306f\u4e0a\u8a18\u3067\u306f\u5fc5\u9808\u3067\u306f\u306a\u3044\u3068\u8a18\u8f09\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u7279\u5b9a\u306e\u30a2\u30d7\u30ea\u3067\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u958b\u59cb\u3059\u308b\u5834\u5408\u3001XCUITest \u30c9\u30e9\u30a4\u30d0\u30fc\u306f\u3001`appium:app`\u3001`browserName`\u3001\u307e\u305f\u306f `appium:bundleId` \u306e\u5c11\u306a\u304f\u3068\u30821 \u3064\u304c capabilities \u306b\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u5fc5\u8981\u3067\u3059 (\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u3069\u306e\u30a2\u30d7\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u307e\u305f\u306f\u8d77\u52d5\u3059\u308c\u3070\u3088\u3044\u304b\u5224\u65ad\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u30db\u30fc\u30e0\u753b\u9762\u304b\u3089\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u958b\u304b\u308c\u307e\u3059)\u3002 \u5404\u30c9\u30e9\u30a4\u30d0\u30fc\u306f\u3001\u3053\u308c\u3089\u306e capabilities \u3084\u305d\u306e\u4ed6\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u56fa\u6709\u306e\u8981\u4ef6\u3092\u3069\u306e\u3088\u3046\u306b\u89e3\u91c8\u3059\u308b\u304b\u3092\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002\n\n!!! note\n\n```\nCapabilities\u306f\u3001\u30bb\u30c3\u30b7\u30e7\u30f3\u958b\u59cb\u6642\u306b\u4f7f\u7528\u3055\u308c\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002Capabilities\u304c\u9001\u4fe1\u3055\u308c\u3001\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u958b\u59cb\u3055\u308c\u305f\u5f8c\u5909\u66f4\u3067\u304d\u307e\u305b\u3093\u3002\u30c9\u30e9\u30a4\u30d0\u30fc\u304c\u30bb\u30c3\u30b7\u30e7\u30f3\u4e2d\u306b\u52d5\u4f5c\u306e\u4e00\u90e8\u3092\u66f4\u65b0\u3059\u308b\u5834\u5408\u3001capabilities\u306e\u4ee3\u308f\u308a\u306b\u3001\u307e\u305f\u306fcapabilities\u306b\u52a0\u3048\u3066\u3001[Settings](./settings.md)\u3082\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002\n```\n\n\u5404 Appium \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u306f\u3001capabilities \u3092\u69cb\u7bc9\u3057\u3001\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u958b\u59cb\u3059\u308b\u72ec\u81ea\u306e\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002 \u5404\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3053\u308c\u3092\u884c\u3046\u4f8b\u306b\u3064\u3044\u3066\u306f\u3001[\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0](../ecosystem/index.md) \u30da\u30fc\u30b8\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u9069\u5207\u306a\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\n## BiDi \u30d7\u30ed\u30c8\u30b3\u30eb\u306e\u30b5\u30dd\u30fc\u30c8\n\nAppium\u306f\u3001base-driver 9.5.0\u4ee5\u964d\u3067[WebDriver BiDi](https://w3c.github.io/webdriver-bidi/)\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002\n\u5b9f\u969b\u306e\u52d5\u4f5c\u306f\u500b\u3005\u306e\u30c9\u30e9\u30a4\u30d0\u30fc\u306b\u3088\u3063\u3066\u7570\u306a\u308a\u307e\u3059\u304c\u3001Appium \u3068 base-driver \u306f\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002\n\u30c9\u30e9\u30a4\u30d0\u30fc\u304c BiDi \u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3001\u307e\u305f\u3001\u3069\u306e\u3088\u3046\u306a\u30b3\u30de\u30f3\u30c9/\u30a4\u30d9\u30f3\u30c8\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u304b\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\n| Capability \u540d | \u578b | \u8aac\u660e |\n| -------------- | --------- | ------------------------- |\n| `webSocketUrl` | `boolean` | \u30bb\u30c3\u30b7\u30e7\u30f3\u3067 BiDi \u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002 |\n\n## `appium:options` \u3092\u4f7f\u7528\u3057\u3066\u6a5f\u80fd\u3092\u30b0\u30eb\u30fc\u30d7\u5316\u3059\u308b\n\n\u30c6\u30b9\u30c8\u3067 `appium:` \u6a5f\u80fd\u3092\u591a\u7528\u3059\u308b\u3068\u3001\u7e70\u308a\u8fd4\u3057\u304c\u591a\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u4ee3\u308f\u308a\u306b\u3001\u3059\u3079\u3066\u306e\u6a5f\u80fd\u3092\u5358\u4e00\u306e `appium:options` \u6a5f\u80fd\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5024\u3068\u3057\u3066\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5185\u306e\u6a5f\u80fd\u306b\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u4f8b\uff1a\n\n```json\n{\n \"platformName\": \"iOS\",\n \"appium:options\": {\n \"automationName\": \"XCUITest\",\n \"platformVersion\": \"16.0\",\n \"app\": \"/path/to/your.app\",\n \"deviceName\": \"iPhone 12\",\n \"noReset\": true\n }\n}\n```\n\n\u6a5f\u80fd\u5024\u81ea\u4f53\u304c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308b\u5834\u5408\u306e\u69cb\u7bc9\u65b9\u6cd5\u306f\u8a00\u8a9e\u306b\u3088\u3063\u3066\u7570\u306a\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u3092\u5b9f\u73fe\u3059\u308b\u65b9\u6cd5\u306e\u8a73\u7d30\u306a\u4f8b\u306b\u3064\u3044\u3066\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\n!!! warning\n\n```\nIf you include the same capabilities both inside and outside of `appium:options`, the values\ninside of `appium:options` take precedence.\n```\n\n## Always-Match and First-Match Capabilities\n\nThe W3C spec allows clients to give the Appium server some flexibility in the kind of session it\ncreates in response to a new session request. This is through the concept of \"always-match\" and\n\"first-match\" capabilities:\n\n- Always-match capabilities consist of a single set of capabilities, every member of which must\n be satisfied by the server in order for the new session request to proceed.\n- First-match capabilities consist of an array of capability sets. Each set is merged with the\n always-match capabilities, and the first set that the server knows how to handle will be the set\n that is used to start the session.\n\n!!! note\n\n```\nCheck out the [spec itself](https://w3c.github.io/webdriver/#processing-capabilities) or\na [summarized version](https://github.com/jlipps/simple-wd-spec#processing-capabilities) for\na more in-depth description of how capabilities are processed.\n```\n\nIn practice, use of first-match capabilities is not necessary or recommended for use with Appium.\nInstead, we recommend that you define the explicit set of capabilities you want the Appium\nserver to handle. These will be encoded as the always-match capabilities, and the array of\nfirst-match capabilities will be empty.\n\nThat being said, Appium _does_ understand always-match and first-match capabilities as\ndefined in the W3C spec, so if you use these features, Appium will work as expected. The process of\ndefining always-match and first-match capabilities is unique to each client library, so refer to\nthe documentation for your client library to see examples of how it works.\n\n## Special Notes for Cloud Providers\n\n!!! warning\n\n```\nThis section is not intended for end-users of Appium; it is intended for developers building\nAppium-compatible cloud services.\n```\n\nWhen managing an Appium cloud, your users may wish to target various independent versions of Appium\ndrivers and plugins. It is of course up to each service provider how they wish to implement the\ndiscovery, installation, and availability of any official or third party drivers or plugins. But\nthe Appium team does provide several suggestions, for consistency across the industry. _These are\nrecommendations only,_ and not a standard, but adopting it will help users to navigate the increased\ncomplexity that working with Appium in a cloud environment may bring.\n\n### Suggested capabilities\n\nIn addition to the standard `platformName`, `appium:deviceName`, `appium:automationName`, and\n`appium:platformVersion`, we recommend adopting the capability `$cloud:appiumOptions`, where the\nlabel `$cloud` is not meant to be interpreted literally but instead should be replaced by your\nvendor prefix (so for HeadSpin it would be `headspin`, Sauce Labs it would be `sauce`, and\nBrowserStack it would be `browserstack`, to name just a few examples). The `$cloud:appiumOptions`\ncapability would itself be a JSON object, with the following internal keys:\n\n|
Capability
| Usage | Example |\n| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |\n| `version` | The version of the Appium server that is used to host and manage drivers. If omitted, the behavior is left up to the provider, but the recommendation would be to provide the latest official version. | `2.0.0` |\n| `automationVersion` | The version of the driver (as specified by `appium:automationName`) that should be used. | `1.55.2` |\n| `automation` | The name of a custom driver to use (see below for more info). This would override `appium:automationName` and `$cloud:automationVersion`. | `{\"name\": \"@org/custom-driver\", \"source\": \"github\", \"package\": \"custom-driver\"}` |\n| `plugins` | The list of plugins (and potentially versions of plugins) that should be activated (see below for more info). | `[\"images\", \"universal-xml\"]` |\n\n### Basic example\n\nAppium extensions (drivers and plugins) have a set of properties that specify where they can be\ninstalled from. Cloud providers are obviously under no obligation to provide support for\narbitrarily specified extensions, seeing as these may represent untrusted code running in a managed\nenvironment. In the case where arbitrary extensions are not supported, the `appium:automationName`,\n`$cloud:automationVersion`, and `$cloud:appiumPlugins` capabilities should be sufficient. See the\nfollowing JSON object representing capabilities for a session:\n\n```json\n{\n \"platformName\": \"iOS\",\n \"appium:platformVersion\": \"14.4\",\n \"appium:deviceName\": \"iPhone 11\",\n \"appium:app\": \"Some-App.app.zip\",\n \"appium:automationName\": \"XCUITest\",\n \"$cloud:appiumOptions\": {\n \"version\": \"2.0.0\",\n \"automationVersion\": \"3.52.0\",\n \"plugins\": [\"images\"]\n }\n}\n```\n\nThis set of capabilities requests an Appium 2+ server supporting the XCUITest driver at version\n`3.52.0`, and the `images` plugin active. This set is easy for a cloud provider to verify. The\ncloud provider can obviously do anything it wants in response to these capabilities, including\ndownloading Appium and driver and plugin packages on the fly, or erroring out if the versions\nrequested are not in a supported set, or if the plugin is not supported, etc...\n\n### Basic example with `appium:options`\n\nThe previous example still looks a bit disorganized, so of course we also recommend that cloud\nproviders support the `appium:options` capability as detailed above, which could turn the previous\nset of capabilities into the following:\n\n```json\n{\n \"platformName\": \"iOS\",\n \"appium:options\": {\n \"platformVersion\": \"14.4\",\n \"deviceName\": \"iPhone 11\",\n \"app\": \"Some-App.app.zip\",\n \"automationName\": \"XCUITest\"\n },\n \"$cloud:appiumOptions\": {\n \"version\": \"2.0.0\",\n \"automationVersion\": \"3.52.0\",\n \"plugins\": [\"images\"]\n }\n}\n```\n\n### Extension objects\n\nSome service providers may wish to dynamically allow access to all of the features of the Appium\n2 CLI, including downloading arbitrary drivers and plugins. To represent these extensions, we can\ndefine special JSON \"extension objects\", with the following keys:\n\n- `name`: the name of the extension. This would be an `npm` package name (if downloading from `npm`),\n or a `git` or GitHub spec (if downloading from a `git` server or GitHub).\n- `version`: the version of the extension, e.g., the `npm` package version or `git` SHA.\n- (optional) `source`: a denotation of where the extension can be downloaded from. It is recommended\n to support the following values: `appium`, `npm`, `git`, `github`. Here, `appium` means \"Appium's\n own official list\", and should be the default value if this key is not included.\n- (optional) `package`: when downloading extensions from `git` or GitHub, the `npm` package name of\n the extension must also be provided. This is optional for non-`git` sources.\n\nSince each session is handled by a single driver, the `$cloud:appiumOptions`/`$automation`\ncapability could be used with an extension object value to denote this driver, for example:\n\n```json\n{\n \"$cloud:appiumOptions\": {\n \"automation\": {\n \"name\": \"git+https://some-git-host.com/custom-driver-project.git\",\n \"version\": \"some-git-sha\",\n \"source\": \"git\",\n \"package\": \"driver-npm-package-name\"\n }\n }\n}\n```\n\nAnd since sessions can handle multiple plugins, each value in the list of `$cloud:appiumPlugins`\ncould also be an extension object rather than a string, so that specific versions could be\nrequested:\n\n```json\n{\n \"$cloud:appiumOptions\": {\n \"plugins\": [{\n \"name\": \"images\",\n \"version\": \"1.1.0\"\n }, {\n \"name\": \"my-github-org/my-custom-plugin\",\n \"version\": \"a83f2e\",\n \"source\": \"github\",\n \"package\": \"custom-plugin\"\n }]\n }\n}\n```\n\nThese serve as illustrative examples for the recommendations here. Of course, it is up to the\nservice providers to implement the handling of these capabilities at their front end / load\nbalancer, to perform any error checking, or to actually run any of the `appium driver` or `appium\nplugin` CLI commands that support the end user's request. This section is merely a suggestion as to\nhow service providers might design their user-facing capabilities API in a way which in principle\nsupports all of the capabilities that Appium itself would provide to the end user if they were\nrunning Appium on their own.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/config.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: The Appium Config File\n---\n\nInstead of passing arguments on the command line to Appium, you may add them to a special config\nfile. Appium will read values from this config file when it runs. (Please note that CLI arguments\nhave _precedence_ over configuration files; if a value is set in a config file _and_ via CLI\nargument, the CLI argument is preferred.)\n\n## Supported Config File Formats\n\nYou can store your config data in the following kinds of files:\n\n- JSON\n- YAML\n- JS (a JavaScript file exporting a JS object)\n- CJS (the same as above; the extension is for common JS)\n\n!!! warning\n\n```\nNote: Configuration files in ESM format are not currently supported.\n```\n\n## Supported Config File Locations\n\nConfiguration files can be named anything, but the following filenames will be automatically\ndiscovered and loaded by Appium:\n\n- `.appiumrc.json` (recommended)\n- `.appiumrc.yaml`\n- `.appiumrc.yml`\n- `.appiumrc.js`\n- `.appiumrc.cjs`\n- `appium.config.js`\n- `appium.config.cjs`\n- `.appiumrc` (which is considered to be JSON)\n\nFurther, _if your project uses Node.js,_ you can use store the configuration inside an `appium`\nproperty in your `package.json` and it will be automatically discovered.\n\n### Config File Search\n\nAppium will search _up_ the directory tree from the current working directory for one of these\nfiles. If it reaches the current user's home directory or filesystem root, it will stop looking.\n\nTo specify a _custom_ location for your config file, use `appium --config /path/to/config/file`.\n\n#### Configuration File Format\n\nFirst, you might want to look at some examples:\n\n- [Appium Configuration - JSON](https://github.com/appium/appium/blob/master/packages/appium/sample-code/appium.config.sample.json)\n- [Appium Configuration - YAML](https://github.com/appium/appium/blob/master/packages/appium/sample-code/appium.config.sample.yaml)\n- [Appium Configuration - JS](https://github.com/appium/appium/blob/master/packages/appium/sample-code/appium.config.sample.js)\n\nA description of the format is available, as well:\n\n- [Appium Configuration File JSON Schema](https://github.com/appium/appium/blob/master/packages/schema/lib/appium-config.schema.json)\n- [TypeScript declarations for Appium Configuration](https://github.com/appium/appium/blob/master/packages/types/lib/config.ts)\n\nTo describe in words, the config file will have a root `server` property, and all arguments are\nchild properties. For certain properties which must be supplied on the command-line as\ncomma-delimited lists, JSON strings, and/or external filepaths, these instead will be of their\n\"native\" type. For example, `--use-plugins ` needs `` to be comma-delimited string\nor path to a delimited file. However, the config file just wants an array, e.g.,:\n\n```json\n{\n \"server\": {\n \"use-plugins\": [\"my-plugin\", \"some-other-plugin\"]\n }\n}\n```\n\n## Configuring extensions (drivers and plugins)\n\nFor `driver`-and-`plugin`-specific configuration, these live under the `server.driver` and\n`server.plugin` properties, respectively. Each driver or plugin will have its own named property,\nand the values of any specific configuration it provides are under this. For example:\n\n```json\n{\n \"server\": {\n \"driver\": {\n \"xcuitest\": {\n \"webkit-debug-proxy-port\": 5400\n }\n }\n }\n}\n```\n\n!!! note\n\n```\nThe above configuration corresponds to the `--driver-xcuitest-webkit-debug-proxy-port` CLI argument.\n```\n\nAll properties are case-sensitive and will be in\n[kebab-case](https://en.wikipedia.org/wiki/Naming_convention_\\(programming\\)#Delimiter-separated_words).\nFor example, `callback-port` is allowed, but `callbackPort` is not.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/context.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Managing Contexts\n---\n\nA common feature of many app platforms is the ability for developers to embed web content inside of\nthe platform-native app frame. This allows developers to leverage web technologies or existing web\ncontent for some or all of the app functionality. However, the additional complexity of mixing\n\"modes\" within a single application can make it difficult for automation tools that are designed to\ntarget the \"native\" elements and behaviours.\n\nAppium provides a set of APIs for working with different app modes, called \"contexts\", that Appium\ndrivers can implement if they support automation commands in these different modes. There are three\nbasic commands that Appium has added to the W3C WebDriver spec for this purpose:\n\n| Command Name | Method/Route | Params | Description | Returns |\n| --------------------- | --------------------------- | ------------------------------------ | --------------------------------------------- | --------------- |\n| `Get Contexts` | `GET /session/:id/contexts` | | Get a list of the available contexts | `array` |\n| `Get Current Context` | `GET /session/:id/context` | | Get the name of the active context | `string` |\n| `Set Context` | `POST /session/:id/context` | `name` (`string`) | Switch into the context with the given `name` | `null` |\n\nThis API is flexible enough to handle a variety of semantic interpretations on the part of the\ndriver. For example, the XCUITest driver includes two kinds of contexts: the native app context and\nany active webviews, as one context per webview. A call to `Get Contexts` will return the list of\nnames, which you as a test author can sift through and use to switch into the appropriate context.\nAs another example, the Appium Altunity\nPlugin introduces the concept of a `UNITY`\ncontext, which encapsulates all the plugin's specific behaviour to ensure that when outside of the\n`UNITY` context, the active driver's usual command implementations are used.\n\nIt is important to note that a call to `Get Contexts` will always contain at least one context,\nconventionally but not necessarily named `NATIVE_APP`. This is the default active context.\n\nDepending on the type of context you're in, the operation of the driver might change. The XCUITest\ndriver, when targeting a webview context, will not run its typical routines for finding and\ninteracting with elements. Instead, it will run a different set of routines appropriate to web\nelements. This might have a variety of consequences, like supporting a different set of locator\nstrategies.\n\nThe command names in the table above are generic references to the commands and not code examples.\nFor examples of how to access the Context API in the language-specific client libraries, please\nvisit the documentation for a given library.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/event-timing.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Retrieving Event Timings\n---\n\nAppium comes with the ability to retrieve timing information about startup\ninformation and command length. This is an advanced feature that is controlled\nby the use of the `appium:eventTimings` capability (set it to `true` to log event\ntimings).\n\nWith this capability turned on, the `POST /session/:id/appium/events` response (i.e.,\nthe response to `driver.logs.events` or similar, depending on client) will be\ndecorated with an `events` property. This is the structure of that `events`\nproperty:\n\n```\n{\n \"\": [, ...],\n \"commands\": [\n {\n \"cmd\": \"\",\n \"startTime\": ,\n \"endTime\": \n },\n ...\n ]\n}\n```\n\nIn other words, the `events` property has 2 kinds of properties of its own:\n\n- Properties which are the names of event types\n- The `commands` property\n\nProperties which are names of event types correspond to an array of timestamps\nwhen that event happened. It's an array because events might happen multiple\ntimes in the course of a session. Examples of event types include:\n\n- `newSessionRequested`\n- `newSessionStarted`\n\n(Individual drivers will define their own event types, so we do not have an\nexhaustive list to share here. It's best to actually get one of these responses\nfrom a real session to inspect the possible event types.)\n\nThe `commands` property is an array of objects. Each object has the name of the\nAppium-internal command (for example `click`), as well as the time the command\nstarted processing and the time it finished processing.\n\nWith this data, you can calculate the time between events, or a strict timeline\nof events, or statistical information about average length of a certain type of\ncommand, and so on.\n\nYou can only receive data about events that have happened when you make the\ncall to `/session/:id/appium/events`, so the best time to get data about an entire session is\nright before quitting it.\n\nThe Appium team maintains an event timings parser tool that can be used to\ngenerate various kinds of reports from event timings output:\n[appium/appium-event-parser](https://github.com/appium/appium-event-parser).\n\n!!! note\n\n```\nIn the past, events were available as a part of `GET /session/:id` response\n```\n\n## Add a custom event\n\nYou can add custom events that will show up in the event timings data. You can send a custom event\nname to the Appium server using the [Log Custom Event API](../reference/api/appium.md#logcustomevent),\nand the server will store the timestamp. The [Get Log Events](../reference/api/appium.md#getlogevents)\ncommand can be used to retrieve named events' timestamps later on.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/execute-methods.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Execute Methods\n---\n\nBecause the scope of commands implemented in Appium drivers is broader than the scope of commands\ndefined by the W3C WebDriver spec, Appium needs a way for these \"extended\" commands to be accessible\nby client libraries. There are two main strategies for this:\n\n1. Appium drivers define new W3C-compatible API routes, and Appium clients are updated to include\n support for those new routes.\n2. Appium drivers define so-called \"Execute Methods\" which provide new functionality by\n overloading the existing `Execute Script` command which is already available in any WebDriver-\n based client library (including all Selenium and Appium clients).\n\nThere are pros and cons for each strategy, but it is ultimately up to the extension author to\ndecide how they wish implement new commands.\n\nThis guide is designed to specifically help you understand the \"Execute Method\" strategy. This\npattern is commonly used in official Appium drivers and other third-party extensions.\nHere's an example of how the `Execute Script` command is designed to work in the world of WebDriver\nand browser automation:\n\n\\=== \"JS (WebDriverIO)\"\n\n````\n```js\nawait driver.executeScript('return arguments[0] + arguments[1]', [3, 4])\n```\n````\n\n\\=== \"Java\"\n\n````\n```java\nJavascriptExecutor jsDriver = (JavascriptExecutor) driver;\njsDriver.executeScript(\"return arguments[0] + arguments[1]\", 3, 4);\n```\n````\n\n\\=== \"Python\"\n\n````\n```py\ndriver.execute_script('return arguments[0] + arguments[1]', 3, 4)\n```\n````\n\n\\=== \"Ruby\"\n\n````\n```rb\ndriver.execute_script 'return arguments[0] + arguments[1]', 3, 4\n```\n````\n\n\\=== \"C#\"\n\n````\n```dotnet\n((IJavaScriptExecutor)driver).ExecuteScript(\"return arguments[0] + arguments[1]\", 3, 4);\n```\n````\n\nWhat's happening here is that we are defining a snippet of Javascript (technically,\na function body) to be executed within the web browser. The client can send arguments which are\nserialized, sent over HTTP, and finally provided to the function as parameters. In this example,\nwe are essentially defining an addition function. The return value of the `Execute Script` command\nis whatever the return value of the Javascript snippet is! In the case of this example, that value\nwould be the number `7` (`3` + `4`).\n\nEach client library has its own way of calling the command and providing any arguments to the script\nfunction, but the function itself\u2014the snippet\u2014is always a string and is the same across all languages.\n\nIn the world of Appium, we are usually not automating a web browser, which means this command is\nnot particularly useful. But it _is_ useful as a way to encode the name of an arbitrary command and\nto provide parameters. For example, the XCUITest\nDriver has implemented a command that lets a client\nterminate a running application if you know the ID (the `bundleId`) of the app. The way that the\ndriver makes this command available is via the Execute Method `mobile: terminateApp`. Instead of\nproviding a JavaScript function to the \"Execute Script\" command, the user provides a _known string_\nas defined by the driver. The only other thing a client needs to know is the set of\nparameters for the method, which are documented by the driver. In this case, we have a parameter\nnamed `bundleId`, whose value should be a string encoding the ID of the app to terminate. Here is\nhow this Execute Method would be called:\n\n\\=== \"JS (WebDriverIO)\"\n\n````\n```js\nawait driver.executeScript('mobile: terminateApp', [{bundleId: 'com.my.app'}])\n```\n````\n\n\\=== \"Java\"\n\n````\n```java\nJavascriptExecutor jsDriver = (JavascriptExecutor) driver;\njsDriver.executeScript(\"mobile: terminateApp\", ImmutableMap.of(\"bundleId\", \"com.my.app\"));\n```\n````\n\n\\=== \"Python\"\n\n````\n```py\ndriver.execute_script('mobile: terminateApp', {'bundleId': 'com.my.app'})\n```\n````\n\n\\=== \"Ruby\"\n\n````\n```rb\ndriver.execute_script 'mobile: terminateApp', { bundleId: 'com.my.app' }\n```\n````\n\n\\=== \"C#\"\n\n````\n```dotnet\n((IJavaScriptExecutor)driver).ExecuteScript(\"mobile: terminateApp\",\n new Dictionary { { \"bundleId\", \"com.my.app\" } });\n\n```\n````\n\nThere are two important differences in using Appium Execute Methods from vanilla Selenium\nJavascript execution:\n\n1. The script string is just a command name; it will be provided by the driver documentation\n2. The standard way to provide parameters is as a _single_ object with keys representing parameter\n names and values representing parameter values. So in this case, we had to specify both the\n parameter name (`bundleId`) as the key of the parameters object, and the parameter value\n (`com.my.app`) as the value for that key. A driver can define parameters as _required_ or _optional_.\n\nOf course, always refer to the documentation for the particular Execute Method in case the author\nhas made any alterations to the standard access method.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/grid.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium and Selenium Grid\n---\n\n## Using Selenium Grid 4+\n\nThe\n[relay](https://www.selenium.dev/documentation/grid/configuration/toml_options/#relaying-commands-to-a-service-endpoint-that-supports-webdriver)\nfeature in Grid 4 allows you to proxy Appium requests to an Appium server instance. Here is\nan example walkthrough of how you would connect two different Appium instances to a Selenium Grid.\n\n### Define the Appium configs\n\nEach Appium instance should have a config file that can be easily updated. It should contain any\ninformation which needs to be unique to that particular server (e.g., ports its drivers should use\nthat others should not). We are going to have 2 Appium servers, so we will need 2 config files:\n\n```yaml\n# appium1.yml\nserver:\n port: 4723\n use-drivers:\n - xcuitest\n default-capabilities:\n appium:wdaLocalPort: 8100\n appium:mjpegServerPort: 9100\n appium:mjpegScreenshotUrl: \"http://localhost:9100\"\n appium:platformVersion: \"26.0\"\n appium:deviceName: \"iPhone 17\"\n```\n\nIn the above YAML config file, we specify the Appium server port, the driver used, and parameters\nfor the driver that will be sent in as default capabilities. Our goal is to ensure that any other\ndrivers running on this host will not compete with system ports or other resources. The second\nconfig file could look like the following, where we simply adjust a few ports to prevent clashes:\n\n```yaml\n# appium2.yml\nserver:\n port: 4733\n use-drivers:\n - xcuitest\n default-capabilities:\n appium:wdaLocalPort: 8110\n appium:mjpegServerPort: 9110\n appium:mjpegScreenshotUrl: \"http://localhost:9110\"\n appium:platformVersion: \"26.0\"\n appium:deviceName: \"iPhone 16\"\n```\n\n### Define the Grid node configs\n\nWe will be launching one Grid \"node\" per Appium server, to manage relaying commands and determining\ncapacity and online status, etc... So we should have one config file per Grid node as well. Each\nnode config should include the address of the Appium server it will target, as well as a list of\ncapability \"configs\" it should accept to relay a session request to Appium. Here is what the config\ncould look like for the two nodes:\n\n```toml\n# node1.toml\n[server]\nport = 5555\n\n[node]\ndetect-drivers = false\n\n[events]\npublish = \"tcp://HUB_IP_ADDRESS:4442\"\nsubscribe = \"tcp://HUB_IP_ADDRESS:4443\"\n\n[relay]\nurl = \"http://localhost:4723\"\nstatus-endpoint = \"/status\"\nconfigs = [\n \"1\", \"{\\\"platformName\\\": \\\"iOS\\\", \\\"appium:automationName\\\": \\\"XCUITest\\\"}\"\n]\n```\n\n```toml\n# node2.toml\n[server]\nport = 5565\n\n[node]\ndetect-drivers = false\n\n[events]\npublish = \"tcp://HUB_IP_ADDRESS:4442\"\nsubscribe = \"tcp://HUB_IP_ADDRESS:4443\"\n\n[relay]\nurl = \"http://localhost:4733\"\nstatus-endpoint = \"/status\"\nconfigs = [\n \"1\", \"{\\\"platformName\\\": \\\"iOS\\\", \\\"appium:automationName\\\": \\\"XCUITest\\\"}\"\n]\n```\n\nNote that each node config also specifies a different port itself for the node to run on.\n\n### Putting it together\n\nThe Grid nodes aren't enough--you'll also want a Grid \"hub\" that acts as a load balancer and\nmanager for all the nodes. So in the end we'll have 5 processes running at once: 2 Appium servers,\n2 Grid nodes, and 1 Grid hub. It's best to run each of these in a separate terminal window to avoid\nconfusion of logs. Here is how you'd start each process:\n\n0. `appium --config appium1.yml`\n1. `appium --config appium2.yml`\n2. `java -jar /path/to/selenium.jar node --config node1.toml`\n3. `java -jar /path/to/selenium.jar node --config node2.toml`\n4. `java -jar /path/to/selenium.jar hub`\n\nOnce you wait a few moments for the nodes to detect their Appium servers, and to register with the\nhub, you'll be able to send all your Appium traffic via the single hub endpoint (defaulting to\n`http://localhost:4444`).\n\nAnd of course, you're able to link up Appium servers and nodes running on different machines in\nyour network to form a larger grid.\n\n## Using Selenium Grid 3\n\nIt is possible to register your Appium server with a local [Selenium Grid 3](https://www.selenium.dev/documentation/legacy/selenium_3/grid_3/)\n([setup docs](https://www.selenium.dev/documentation/legacy/grid_3/setting_up_your_own_grid/)) instance by using the\n`--nodeconfig` server argument.\n\n```bash\nappium server --nodeconfig /path/to/nodeconfig.json --base-path=/wd/hub\n```\n\nIn the referenced config file you have to define the `browserName`, `version` and `platform`\ncapabilities and based on these parameters the grid will re-direct your test to the right device.\nYou will also need to configure your host details and the Selenium Grid details. For a full list of\nall parameters and descriptions see\n[here](https://www.selenium.dev/documentation/legacy/selenium_3/grid_setup/).\n\nOnce you start the Appium server it will register with the grid, and you will see your device on\nthe grid console page:\n\n`http://**\\**:**\\**/grid/console`\n\n### Example Grid Node Configuration JSON\n\n```json\n{\n \"capabilities\":\n [\n {\n \"browserName\": \"\",\n \"version\":\"\",\n \"maxInstances\": 1,\n \"platform\":\"\"\n }\n ],\n \"configuration\":\n {\n \"cleanUpCycle\":2000,\n \"timeout\":30000,\n \"proxy\": \"org.openqa.grid.selenium.proxy.DefaultRemoteProxy\",\n \"url\":\"http://:/wd/hub\",\n \"host\": \"\",\n \"port\": ,\n \"maxSession\": 1,\n \"register\": true,\n \"registerCycle\": 5000,\n \"hubPort\": ,\n \"hubHost\": \"\",\n \"hubProtocol\": \"\"\n }\n}\n```\n\nIf `url`, `host`, and `port` are not given, the config will be auto updated to point to\n`localhost:`.\n\nIf your Appium server is running on a different machine to your Selenium Grid server, make sure you\nuse an external name/IP address in your `host` and `url` configuration; `localhost` and `127.0.0.1`\nwill prevent Selenium Grid from connecting correctly.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/headers.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Header Handling\n---\n\n# Header Handling\n\n## Request ID Tracking\n\nAppium supports setting the request ID for each request through the `x-request-id` header. This is useful for tracing requests through your system, especially in environments where multiple services are involved or when debugging across different requests.\n\n### Using `x-request-id`\n\nWhen making requests to Appium, you can include an `x-request-id` header with a unique identifier. This ID will be:\n\n- Used to track the request through Appium's logging system\n- Preserved across the entire request lifecycle\n- Generated automatically (as a UUID) if not provided\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/log-filters.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Filtering the Appium Log\n---\n\nSometimes it might be necessary to hide sensitive information, like passwords, device identifiers,\nhashes, etc..., from the server log. Appium makes it possible to ensure such information is\nredacted in logs via the `--log-filters` command line argument. This argument allows you to provide\nthe path to a special config file, containing one or more log obfuscation rules.\n\n## Config Format\n\nThe filtering config must be one of:\n\n- a path to a valid JSON file containing an array of filtering rules\n- a `log-filters` entry in an [Appium Config](./config.md) file, with the rules array inline\n\nEach rule is an object with a set of predefined properties. The following rule properties are\nsupported:\n\n- `pattern`: A valid Javascript RegExp pattern to replace. Must be a valid non-empty pattern.\n- `text`: A simple non-empty exact text match to replace. Either this property or the above one must\n be provided. `pattern` has priority over `text` if both are provided.\n- `flags`: Regular expression flags for the given pattern. Supported flags are the same as for the\n standard JavaScript [RegExp constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Advanced_searching_with_flags_2).\n Note that the `g` (global matching) flag is always enabled.\n- `replacer`: The replacer value to use. By default it is `**SECURE**`. Empty values are allowed.\n\n### Config Examples\n\nReplace all occurrences of `my.magic.app` string with the default replacer:\n\n```json\n[\n {\n \"text\": \"my.magic.app\"\n }\n]\n```\n\nReplace all occurrences of `my.magic.` string with a custom replacer (case insensitive):\n\n```json\n[\n {\n \"pattern\": \"my\\\\.magic\\\\.\\\\w\",\n \"flags\": \"i\",\n \"replacer\": \"***\"\n }\n]\n```\n\nReplace all occurrences of `my.magic.` and/or `your.magic` strings with a custom\nreplacer (case insensitive):\n\n```json\n[\n {\n \"pattern\": \"my\\\\.magic\\\\.\\\\w+\",\n \"flags\": \"i\",\n \"replacer\": \"***\"\n },\n {\n \"pattern\": \"your\\\\.magic\",\n \"flags\": \"i\",\n \"replacer\": \"***\"\n }\n]\n```\n\nTruncate all log lines to max 15 chars (advanced):\n\n```json\n[\n\t{\n \"pattern\": \"(.{1,15}).*\",\n \"flags\": \"s\",\n \"replacer\": \"$1\"\n }\n]\n```\n\n### Config Errors Handling\n\nIf any of the config rules contains invalid items (such as empty/invalid pattern, empty rule, etc.)\nthen Appium will print the detailed report about collected errors and will fail to start until\nthese errors are addressed.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/managing-exts.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Managing Drivers and Plugins\n---\n\nTo do anything useful with Appium, you need to have at least one [Driver](../intro/drivers.md)\ninstalled, otherwise Appium won't know how to automate anything. There is an entire\n[Ecosystem](../ecosystem/index.md) of drivers and plugins out there!\n\nThis guide helps explain how to manage these drivers and plugins. There are\ntwo basic strategies: using Appium's extension CLI interface, or managing extensions yourself in an\n`npm`-based project.\n\n!!! note\n\n```\nOther package managers are not currently supported.\n```\n\n## Using Appium's Extension CLI\n\nWith Appium's [Extension CLI](../reference/cli/extensions.md), you let Appium manage drivers and plugins for\nyou. You will use CLI commands to tell Appium which extensions you would like to install, update,\nor remove. Here's an example of how you might install a driver using the CLI:\n\n```bash\nappium driver install xcuitest\n```\n\nThis command will install the latest version of the\n[XCUITest Driver](https://github.com/appium/appium-xcuitest-driver). The Extension CLI comes with a variety\nof commands and parameters; see the documentation for that command for all the specifics.\n\nThe all-important question when Appium is managing your extensions for you is: where are they installed?\nAppium manages extensions in a directory specified by the `APPIUM_HOME` environment variable. You\ncan set that variable to anything you like, and Appium will manage its extensions there. You can\ntherefore also use the `APPIUM_HOME` environment variable to manage different sets of extensions,\nfor example if you want to have the same driver installed at conflicting versions:\n\n```bash\nAPPIUM_HOME=/path/to/home1 appium driver install xcuitest@4.11.1\nAPPIUM_HOME=/path/to/home2 appium driver install xcuitest@4.11.2\n```\n\nRunning these commands will result in two separate `APPIUM_HOME` directories being created and\npopulated with the corresponding version of the XCUITest driver. You can then use the same\nenvironment variables to direct Appium which version to use on launch:\n\n```bash\nAPPIUM_HOME=/path/to/home1 appium # use xcuitest driver 4.11.1\nAPPIUM_HOME=/path/to/home2 appium # use xcuitest driver 4.11.2\n```\n\nYou don't need to set `APPIUM_HOME` if you don't want to! By default, Appium will set `APPIUM_HOME`\nto the directory `.appium` in your user home directory.\n\nThese installed packages will be managed by `extensions.yaml` in `$APPIUM_HOME/node_modules/.cache/appium/extensions.yaml`.\n\n## Do-It-Yourself with `npm`\n\nBecause Appium and Appium drivers are Node.js programs, if you are integrating your Appium scripts\ninto your own Node.js project, there is an alternative way to manage drivers and plugins: via `npm`,\nlike any other dependency. Basically, whenever you run Appium, if you have not explicitly set\n`APPIUM_HOME`, it will:\n\n1. Try to determine whether the _current directory_ is inside an `npm` package.\n2. If so, it will check whether `appium` is a dependency (dev, prod, or peer) in the project's\n `package.json`\n3. If so, _unless you have specified `APPIUM_HOME` in your environment_, Appium will ignore load\n drivers and plugins defined in that `package.json` file instead.\n\nThis means you are freely able to add Appium drivers and plugins as regular package dependencies or\ndev dependencies. For example, if your project has a `package.json` which includes the following:\n\n```json\n{\n \"devDependencies\": {\n \"appium\": \"^2.0.0\",\n \"appium-xcuitest-driver\": \"^4.11.1\"\n }\n}\n```\n\nThen, if you run `npx appium` inside your project, Appium will detect that it is a dependency of\nthe project, and will load the XCUITest driver which is also listed as a dev dependency for the\nproject.\n\nThis strategy is _only_ recommended if you are already using `npm` for your project.\nOtherwise, it is recommended that you use Appium's Extension CLI and, if necessary, adjust\n`APPIUM_HOME` to change the location of stored extensions.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/migrating-1-to-2.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium 2 \u3078\u79fb\u884c\u3059\u308b\n---\n\n\u3053\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u65e2\u306bAppium 1 \u3092\u5229\u7528\u3057\u3066\u3044\u308b\u4eba\u304cAppium 2 \u306b\u79fb\u884c\u3059\u308b\u305f\u3081\u306e\u624b\u5f15\u304d\u3067\u3059\u3002 \u7834\u58ca\u7684\u5909\u66f4\u306e\u4e00\u89a7\u3084\u3001\u5b9f\u884c\u74b0\u5883\u30fb\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3092Appium 2 \u4e92\u63db\u306b\u3059\u308b\u305f\u3081\u306e\u65b9\u6cd5\u304c\u542b\u307e\u308c\u307e\u3059\u3002\n\nAppium 2 is the biggest Appium release in over 5 years. It is _not_ focused on changing the\nautomation behavior for any particular platform, but instead re-envisions Appium into an\n_ecosystem_ of automation tools:\n\n- The core Appium module retains only platform-agnostic functionality\n- Functionality for automating specific platforms is moved to separate _driver_ modules\n- Functionality for altering/extending Appium is moved to separate _plugin_ modules\n\n\u540c\u6642\u306b\u3001Appium\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u591a\u304f\u306e\u53e4\u304f\u306a\u3063\u305f\u308a\u975e\u63a8\u5968\u3068\u306a\u3063\u3066\u3044\u308b\u6a5f\u80fd\u3084\u4f9d\u5b58\u3092\u53d6\u308a\u9664\u3053\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u3002\n\nSince Appium 2 is a major architectural change, ^^we do not recommend directly updating your\nAppium 1 installations to Appium 2^^. Instead, please uninstall Appium 1 first, and only install\nAppium 2 afterwards.\n\n## \u7834\u58ca\u7684\u5909\u66f4\n\n### Drivers Installed Separately\n\nWhen installing Appium 1, all available drivers would be installed alongside the main Appium\nserver. In Appium 2, due to its modular structure, this is no longer the case - by default,\ninstalling it only installs the core Appium server, without any drivers.\n\nWhen it comes to installing Appium 2 drivers, there are several approaches you can take:\n\n- Add the `--drivers` flag when installing Appium, for example:\n\n```bash\nnpm i -g appium --drivers=xcuitest,uiautomator2\n```\n\n- Use the [Appium Extension CLI](../reference/cli/extensions.md), for example:\n\n```bash\nappium driver install uiautomator2\n```\n\n- Use the [Appium Setup CLI command](../reference/cli/setup.md) (added in Appium `2.6`), for example:\n\n```bash\nappium setup mobile\n```\n\nCheck the [Managing Drivers and Plugins guide](./managing-exts.md) for more information.\n\n!!! info \"Actions Needed\"\n\n```\nWhen installing Appium 2, use one of the above approaches for installing your desired drivers\n```\n\n### Driver Installation Path Changed\n\nWhen installing Appium 1, all available drivers would be installed as dependencies of the main\nAppium server, in `/path/to/appium/node_modules`. \u4f8b\u3048\u3070\u3001\u624b\u52d5\u3067WebDriverAgent\u3092\u30d3\u30eb\u30c9\u3059\u308b\u305f\u3081\u306e`appium-webdriveragent`\u306f\u3001`/path/to/appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent`\u3067\u3057\u305f\u3002\n\nIn Appium 2, drivers (and plugins) are installed at the path defined by the `APPIUM_HOME`\nenvironment variable, whose default value is `~/.appium`. So, `appium-webdriveragent` would now be\nlocated at `$APPIUM_HOME/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent`.\n\n!!! info \"Actions Needed\"\n\n```\nIf your code uses paths to Appium driver files, update it to use the `APPIUM_HOME` environment\nvariable\n```\n\n### Drivers Updated Separately\n\nIn Appium 1, in order to get updates to your drivers, you would simply wait for those updates to be\nrolled into a new release of Appium, and then update your Appium version. With Appium 2, since the\nserver and drivers are separate packages, they can release new versions independently from each\nother - this means that you no longer need to wait for a new Appium server release, but can install\nthe latest driver versions right away.\n\nChecking for driver updates is done by using the [Appium Extension CLI](../reference/cli/extensions.md):\n\n```bash\nappium driver list --updates\n```\n\n\u66f4\u65b0\u304c\u5165\u624b\u53ef\u80fd\u3067\u3042\u308c\u3070\u3001\u4efb\u610f\u306e\u30c9\u30e9\u30a4\u30d0\u30fc\u306b\u5bfe\u3057\u3066 `update` \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\n\n```bash\nappium driver list --updates\n```\n\nUpdating the Appium server itself is the same as before:\n\n```bash\nnpm update -g appium\n```\n\nHowever, in Appium 2 this process is a lot quicker, since drivers are no longer bundled with the\nserver package.\n\n!!! info \"Actions Needed\"\n\n```\nMake sure to use the [Appium Extension CLI](../reference/cli/extensions.md) to manage your drivers\n```\n\n### Deprecated Packages No Longer Supported\n\nThe Appium 1 ecosystem included several drivers, clients and other packages that had since been\ndeprecated and replaced with newer packages. Appium 2 no longer includes support for these packages,\nand it is recommended to migrate to the following replacements:\n\n| Appium 1 Package | Replacement in Appium 2 |\n| ------------------ | -------------------------------------------------------------------------- |\n| iOS Driver | [XCUITest Driver](https://appium.github.io/appium-xcuitest-driver/latest/) |\n| UiAutomator Driver | [UiAutomator2](https://github.com/appium/appium-uiautomator2-driver/) |\n| `wd` Client | [WebdriverIO Client](https://webdriver.io/) |\n| Appium Desktop | [Appium Inspector](https://github.com/appium/appium-inspector) |\n\n!!! info \"Actions Needed\"\n\n```\nIf you are using any of the aforementioned package(s), migrate to their recommended replacement(s)\n```\n\n### Default Server Base Path Changed\n\nIn Appium 1, the default Appium server URL was `http://localhost:4723/wd/hub`, where the `/wd/hub`\npart (the base path) was a legacy convention from Selenium 1. Appium 2 changes the default base\npath to `/`, therefore the default server URL is now `http://localhost:4723/`.\n\n!!! info \"Actions Needed\"\n\n```\nIn your test scripts, change the base path of the target server URL from `/wd/hub` to `/`.\nAlternatively, you can retain the Appium 1 base path by launching Appium with the\n`--base-path=/wd/hub` [command-line argument](../reference/cli/server.md).\n```\n\n### Server Port 0 No Longer Supported\n\nIn Appium 1, it was possible to specify `--port 0` during server startup, which had the effect of\nstarting Appium on a random free port. Appium 2 no longer allows this, and requires port values to\nbe `1` or higher. If you wish to start Appium on a random port, you must now take care of this on\nyour own prior to launching the server.\n\n!!! info \"Actions Needed\"\n\n```\nIf you are launching Appium with `--port 0`, change the port number value to `1` or higher\n```\n\n### Driver-Specific CLI Options Changed\n\nAppium 1 \u3067\u306f\u3001\u7279\u5b9a\u306e\u30c9\u30e9\u30a4\u30d0\u306b\u7279\u5316\u3057\u305f\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3001\u3059\u3079\u3066Appium\u30b5\u30fc\u30d0\u30fc\u306b\u4e2d\u7d99\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002 So, for example, `--chromedriver-executable` was a CLI parameter you could use to\nset the Chromedriver location for the UiAutomator2 driver.\n\nIn Appium 2, all driver-specific CLI options have been moved to the drivers themselves. However,\ndepending on the driver, these options may now need to be passed in another way:\n\n- Some options can still be passed as different CLI flags, for example:\n\n```bash\nappium --webdriveragent-port=5000 # Appium 1\nappium --driver-xcuitest-webdriveragent-port=5000 # Appium 2\n```\n\n- Some options can now be passed as environment variables, for example:\n\n```bash\nappium --chromedriver-version=100 # Appium 1\nCHROMEDRIVER_VERSION=100 appium # Appium 2\n```\n\n- Some options can now be passed as [capabilities](./caps.md), for example:\n\n```\nappium --chromedriver-executable=/path/to/chromedriver # Appium 1\n{\"appium:chromedriverExecutable\": \"/path/to/chromedriver\"} # Appium 2\n```\n\n!!! info \"Actions Needed\"\n\n```\nIf you are using driver-specific CLI options, refer to that driver's documentation for how to\napply them in Appium 2\n```\n\n### Filepaths No Longer Supported for Some CLI Options\n\nIn Appium 1, some server command-line options could be invoked by passing a filepath as their\nvalue, and Appium would then parse the contents of that file as the actual value for that option.\nThere were four options that supported this:\n\n- `--nodeconfig`\n- `--default-capabilities`\n- `--allow-insecure`\n- `--deny-insecure`\n\nAppium 2 no longer attempts to parse the contents of filepaths passed to these options, and offers\ntwo ways to specify the value for these options:\n\n- As strings, directly on the command line\n - `--nodeconfig` / `--default-capabilities`: JSON string\n - `--allow-insecure` / `--deny-insecure`: comma-separated list\n- In the [Appium Configuration file](./config.md)\n\n!!! info \"Actions Needed\"\n\n```\nIf you are using any of the aforementioned CLI options with a filepath value, update your code\nto pass the file contents either directly or through the Appium config file\n```\n\n### Old Protocols Dropped\n\nAppium\u306eAPI\u306f[W3C WebDriver Protocol](https://www.w3.org/TR/webdriver/)\u306b\u57fa\u3065\u3044\u3066\u304a\u308a\u3001\u4f55\u5e74\u3082\u3053\u306e\u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002 Before this protocol was designed as a web standard, the\n[JSON Wire Protocol](https://www.selenium.dev/documentation/legacy/json_wire_protocol/) (JSONWP)\nand [Mobile JSON Wire Protocol](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md)\n(MJSONWP) were used instead.\n\nIn Appium 1, all of these protocols were supported, so that older Selenium/Appium clients could\nstill communicate with newer Appium servers. Appium 2 removes support for JSONWP/MJSONWP and is now\nonly compatible with the W3C WebDriver Protocol.\n\n!!! info \"Actions Needed\"\n\n```\nMake sure you are using Selenium/Appium clients compatible with the W3C WebDriver Protocol\n```\n\n### Capabilities Require Vendor Prefix\n\nIn Appium 1, in order to create a session, you had to specify certain desired capabilities, which\nwould indicate session parameters, e.g. the driver you want to use. Appium 2 retains this behavior\nand continues to accept desired capabilities (now renamed simply to 'capabilities'), but as part of\nthe W3C WebDriver Protocol specification, all non-standard capabilities are now required to use a\nvendor prefix.\n\nThe list of standard capabilities is described in the [WebDriver Protocol specification](https://www.w3.org/TR/webdriver/#capabilities),\nand includes a few commonly used capabilities like `browserName` and `platformName`. All other\ncapabilities must now start with the vendor name and a colon (the vendor prefix), for example,\n`moz:` or `goog:`. Since most of Appium's capabilities go beyond the standard W3C capabilities,\nall of them must include the `appium:` prefix (unless specified otherwise):\n\n```\ndeviceName # Appium 1\nappium:deviceName # Appium 2\n```\n\nThis requirement may or may not be a breaking change for your test suites. Up-to-date versions of\nofficial Appium clients and the Appium Inspector will automatically add the `appium:` prefix to all\nnon-standard capabilities, and the same may apply to cloud-based Appium providers.\n\nAdditionally, if you are starting a session with multiple Appium-specific capabilities (which will\nlikely be the case), it may seem repetitive to add the `appium:` prefix to each individual\ncapability. To avoid this, you can optionally group up all these capabilities under a single object\ncapability, `appium:options`, for example:\n\n\\=== \"Default Approach\"\n\n````\n```json\n{\n \"platformName\": \"iOS\",\n \"browserName\": \"Safari\",\n \"appium:platformVersion\": \"14.4\",\n \"appium:deviceName\": \"iPhone 11\",\n \"appium:automationName\": \"XCUITest\"\n}\n```\n````\n\n\\=== \"With `appium:options`\"\n\n````\n```json\n{\n \"platformName\": \"iOS\",\n \"browserName\": \"Safari\",\n \"appium:options\": {\n \"platformVersion\": \"14.4\",\n \"deviceName\": \"iPhone 11\",\n \"automationName\": \"XCUITest\"\n }\n}\n```\n````\n\n!!! warning\n\n```\nCapabilities included in the `appium:options` object will overwrite capabilities of the same\nname that are used outside of this object. Note that cloud provider support for the\n`appium:options` syntax may vary.\n```\n\n\u30b1\u30a4\u30d1\u30d3\u30ea\u30c6\u30a3\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001[Capabilities Guide](./caps.md)\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002\n\n!!! info \"Actions Needed\"\n\n```\nAdd the `appium:` prefix to all Appium-specific capabilities used in your tests, or wrap them\ninside an `appium:options` object\n```\n\n### Advanced Features Moved to Plugins\n\nOne of the design goals for Appium 2 is to extract non-core features into special extensions called\n[plugins](../ecosystem/plugins.md). Two such features of Appium 1 have been moved to plugins, and\nare no longer bundled with Appium 2:\n\n| Feature | Plugin Name |\n| ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |\n| Image-related features (comparison, search by image, etc...) | [`images`](https://github.com/appium/appium/tree/master/packages/images-plugin) |\n| The Execute Driver Script feature | [`execute-driver`](https://github.com/appium/appium/tree/master/packages/execute-driver-plugin) |\n\n!!! info \"Actions Needed\"\n\n````\nIf you were using the image-related features and/or the execute driver script feature in Appium\n1, first install their plugin(s):\n```\nappium plugin install images \nappium plugin install execute-driver\n```\nAfterwards, make sure to activate the plugin(s) upon launching the Appium server:\n```\nappium --use-plugins=images,execute-driver\n```\n````\n\n### Endpoint Changes\n\nA few server endpoints used in Appium 1 were accepting old or unused parameters. Appium 2 removes\nsupport for these parameters. The following is a list of these changed endpoints, along with the\nparameters they no longer accept, as well as the parameters they continue to accept in Appium 2.\n\n- `POST /session/:sessionId/appium/device/gsm_signal`\n - :octicons-x-24: `signalStrengh`\n - :octicons-check-24: `signalStrength`\n- `POST /session/:sessionId/appium/element/:elementId/value`\n - :octicons-x-24: `value`\n - :octicons-check-24: `text`\n- `POST /session/:sessionId/appium/element/:elementId/replace_value`\n - :octicons-x-24: `value`\n - :octicons-check-24: `text`\n\n!!! info \"Actions Needed\"\n\n```\nCheck your Appium client documentation for the methods using these endpoints, and adjust your\ncode to only use the accepted parameters\n```\n\n### Internal Packages Renamed\n\nIn Appium 1, the internal dependency packages were each located in their own repository. Appium 2\nmoves to a monorepo structure and therefore renames many of these packages, for example:\n\n```\nappium-base-driver # Appium 1\n@appium/base-driver # Appium 2\n```\n\n!!! info \"Actions Needed\"\n\n```\nIf you do not directly import Appium packages into your code - none! However, if you do, make\nsure to update the names of your Appium package imports!\n```\n\n## \u4e3b\u306a\u65b0\u6a5f\u80fd\n\nApart from the breaking changes mentioned above, here are some of the major new features you may\nwish to take advantage of with Appium 2:\n\n### Third-Party Drivers and Plugins\n\nYou are no longer limited to official drivers or plugins, or ones that the Appium team even knows\nabout! Developers can now create their own custom drivers or plugins, which can be installed via\nAppium's [Extension CLI](../reference/cli/extensions.md) from `npm`, `git`, GitHub, or even the local\nfilesystem. Interested in building a driver or plugin? Check out the\n[Building Drivers](../developing/build-drivers.md) and\n[Building Plugins](../developing/build-plugins.md) guides.\n\n### Configuration Files\n\nAppium\u306f\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u5f15\u6570\u306b\u52a0\u3048\u3001_\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb_ \u3082\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 Nearly all options\nor flags that had to be specified on the CLI in Appium 1, can now also be provided in a\nconfiguration file. The file can be in JSON, JS, or YAML format. For more information, refer to\nthe [Config File Guide](./config.md).\n\n## \u30af\u30e9\u30a6\u30c9\u30fb\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306b\u95a2\u3059\u308b\u7279\u8a18\u4e8b\u9805\n\nMost of this guide has applied to Appium end users or developers, but some of the architectural\nchanges in Appium 2 will constitute breaking changes for different Appium service providers. At the\nend of the day, the maintainer of the Appium server is responsible for installing and exposing the\nvarious Appium drivers and plugins that end users may wish to use.\n\n\u30af\u30e9\u30a6\u30c9\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306b\u306f\u3001\u696d\u754c\u3068\u4e92\u63db\u6027\u306e\u3042\u308b\u65b9\u6cd5\u3067\u30e6\u30fc\u30b6\u30fc\u306e\u30cb\u30fc\u30ba\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u305f\u3081\u306b\u3001\u79c1\u305f\u3061\u306e[\u30af\u30e9\u30a6\u30c9\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306e\u80fd\u529b\u306b\u95a2\u3059\u308b\u63a8\u5968\u4e8b\u9805](./caps.md#special-notes-for-cloud-providers) \u3092\u5341\u5206\u306b\u8aad\u307f\u3001\u7406\u89e3\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\uff01\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/migrating-2-to-3.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium 3 \u3078\u79fb\u884c\u3059\u308b\n---\n\n\n\n\u3053\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u65e2\u306bAppium 2 \u3092\u5229\u7528\u3057\u3066\u3044\u308b\u4eba\u304cAppium 3 \u306b\u79fb\u884c\u3059\u308b\u305f\u3081\u306e\u624b\u5f15\u304d\u3067\u3059\u3002\n\u7834\u58ca\u7684\u5909\u66f4\u3068\u3001\u305d\u308c\u3089\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u30d2\u30f3\u30c8\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002\n\nAppium 2 \u306fAppium\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u5168\u4f53\u306e\u5927\u304d\u306a\u898b\u76f4\u3057\u3092\u3057\u307e\u3057\u305f\u3002 Appium 3 \u306f\u9650\u3089\u308c\u305f\u7834\u58ca\u7684\u5909\u66f4\u306e\u307f\u306e\u6bd4\u8f03\u7684\u5c0f\u3055\u306a\u66f4\u65b0\u3067\u3042\u308a\u3001\u79fb\u884c\u30d7\u30ed\u30bb\u30b9\u304c\u306f\u308b\u304b\u306b\u7c21\u6613\u306b\u306a\u308a\u307e\u3059\u3002\n\n## Installation\n\nThe installation method for Appium 3 remains the same as for Appium 2. If you want to upgrade, you\ncan simply install Appium 3 on top of your existing installation:\n\n```bash\n# optional: `appium setup reset`\nnpm install -g appium\n```\n\n\\##\u00a0\u7834\u58ca\u7684\u5909\u66f4\n\n### Node 20+ Required\n\nWith Appium 2, the minimum required Node version was `14.17.0`. Support for Node 14 had already\nended before the release of Appium 2, which meant that even users on outdated Node versions were\nable to use it.\n\nAppium 3 drops support for outdated Node versions, and bumps the minimum required version to Node\n`20.19.0` (with the semver range `^20.19.0 || ^22.12.0 || >=24.0.0`), as well as the minimum `npm`\nversion to `10`.\n\n!!! info \"Actions Needed\"\n\n Upgrade Node.js to `v20.19.0` or newer, and `npm` to `v10` or newer\n\n### Deprecated Endpoints Removed\n\nAppium 3 removes many previously deprecated server endpoints. Some of these endpoints have now\nbecome specific to one or more drivers, while most others have direct or close-to-direct\nreplacements in other endpoints. All removed endpoints, along with replacements (where applicable)\nare listed [in the **Removed Endpoints** section](#removed).\n\nSome W3C endpoints used in Appium also existed in the old JSONWP standard, but required different\nparameters. With Appium 2, both standards for these endpoints were supported. Appium 3 changes\nthese endpoints by removing support for the JSONWP parameters, and only accepting the W3C\nparameters. These endpoints are listed [in the **Modified Endpoints** section](#modified).\n\n!!! info \"Actions Needed\"\n\n Check your Appium client documentation for the affected methods, and adjust your code to use\n their replacements\n\n### Feature Flag Prefix Required\n\nWith Appium 2, it was possible to opt into certain [insecure features](./security.md) on server\nstartup, which could be enabled using the `--allow-insecure` or `--relaxed-security` flags. Appium\n`2.13` added the ability to optionally provide a scope prefix to specific features, ensuring that\nthey would only be enabled for the specified driver (or all of them).\n\nAppium 3 makes the scope prefix mandatory, and will throw an error if features are specified\nwithout a scope. Note that the behavior of the `--relaxed-security` flag remains unchanged.\n\n!!! info \"Actions Needed\"\n\n If you use the `--allow-insecure` server flag, add a scope prefix before each feature name.\n For example, if you use the UiAutomator2 `adb_shell` feature, on Appium 2 you would enable it\n like this:\n ` appium --allow-insecure=adb_shell `\n On Appium 3, to ensure this feature is only activated for UiAutomator2, you can run it like so:\n ` appium --allow-insecure=uiautomator2:adb_shell `\n Alternatively, if you wish to keep the Appium 2 behavior and enable the feature for _all_\n drivers that support it, you can use the wildcard (`*`) prefix:\n ` appium --allow-insecure=*:adb_shell `\n Server-scope features like `session_discovery` also require the wildcard prefix.\n\n### Session Discovery Requires Feature Flag\n\nIn Appium 2, it was possible to retrieve all active server sessions via the `GET /sessions`\nendpoint. This information could then be used, for example, in Appium Inspector, in order to attach\nto an existing session, instead of creating a new one.\n\nAppium 3 makes two changes to the session discovery process:\n\n- The `GET /sessions` endpoint is replaced with `GET /appium/sessions` (see [the Removed Endpoints section](#removed))\n- The use of the new endpoint requires the `session_discovery` [feature flag](./security.md)\n\nThe return value of `GET /appium/sessions` is largely identical to `GET /sessions`, but additionally\nincludes the `created` field for each session entry, indicating the session creation time as a Unix\ntimestamp. The rest of the result format remains unchanged.\n\nTo reduce migration efforts, the `GET /appium/sessions` endpoint (locked behind the aforementioned\nfeature flag) is also available in Appium `2.19`, allowing you to adjust your code before upgrading\nto Appium 3. As for Appium Inspector, support for this new endpoint is available starting from\nversion `2025.3.1`.\n\n!!! info \"Actions Needed\"\n\n \\* If your code uses session retrieval, change the endpoint from `GET /sessions` to\n `GET /appium/sessions`\n \\* If you use Appium Inspector's Attach to Session feature, upgrade to version `2025.3.1` or later\n \\* In both cases, ensure your Appium server is launched with the `session_discovery`\n [feature flag](./security.md)\n\n### Unzip Logic Removed\n\nAppium 3 removes the custom unzip logic used when working with files like application packages.\nSuch files are often only relevant to particular platforms, therefore the functionality for\nhandling these operations has been moved to relevant drivers.\n\n!!! info \"Actions Needed\"\n\n Ensure you are using the most recent versions of your drivers\n\n### Express 5\n\nAppium 3 upgrades the internally-used `express` dependency from `v4` to `v5`. This should not\naffect users who use Appium directly, but developers integrating parts of Appium into their own\nprojects may want to check [the Express 5 Migration Guide](https://expressjs.com/en/guide/migrating-5.html).\n\n!!! info \"Actions Needed\"\n\n None! (hopefully)\n\n## Endpoint Changes\n\n### Removed\n\nThe following is a list of all the Appium server endpoints removed in Appium 3. For ease of\nmigration, additional information is provided for each endpoint: drivers that still support the\nendpoint; suggested replacement endpoints, or, rarely, the lack of any available replacements.\n\nIcons are used to indicate endpoint support in either certain drivers, or in the core Appium server\n(applicable to all drivers):\n\n
\n\n- :simple-appium:{ .lg } - Appium server\n- :material-apple:{ .lg } - [XCUITest driver](https://appium.github.io/appium-xcuitest-driver/latest/)\n- :material-android:{ .lg } - [UiAutomator2 driver](https://github.com/appium/appium-uiautomator2-driver/)\n- :material-coffee:{ .lg } - [Espresso driver](https://github.com/appium/appium-espresso-driver)\n- :material-apple-finder:{ .lg } - [Mac2 driver](https://github.com/appium/appium-mac2-driver)\n- :material-microsoft-windows:{ .lg } - [Windows driver](https://github.com/appium/appium-windows-driver)\n\n
\n\n- `GET /sessions`\n - :octicons-arrow-right-24: `GET /appium/sessions` :simple-appium:\n- `POST /session/:sessionId/accept_alert`\n - :octicons-arrow-right-24: `POST /session/:sessionId/alert/accept` :simple-appium:\n - :octicons-arrow-right-24: `mobile: alert` [execute method](./execute-methods.md) :material-apple:\n - :octicons-arrow-right-24: `mobile: acceptAlert` execute method :material-android:\n- `GET /session/:sessionId/alert_text`\n - :octicons-arrow-right-24: `GET /session/:sessionId/alert/text` :simple-appium:\n- `POST /session/:sessionId/alert_text`\n - :octicons-arrow-right-24: `POST /session/:sessionId/alert/text` :simple-appium:\n- `POST /session/:sessionId/appium/app/background`\n - :octicons-arrow-right-24: `mobile: backgroundApp` execute method :material-apple: :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/app/close`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `mobile: terminateApp` execute method :material-apple: :material-android: :material-coffee:\n - :octicons-arrow-right-24: `macos: terminateApp` execute method :material-apple-finder:\n - :octicons-arrow-right-24: `windows: closeApp` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/appium/app/end_test_coverage`\n - :octicons-arrow-right-24: `mobile: shell` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/app/launch`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `mobile: launchApp` execute method :material-apple:\n - :octicons-arrow-right-24: `mobile: activateApp` or `mobile: startActivity` execute methods :material-android: :material-coffee:\n - :octicons-arrow-right-24: `macos: launchApp` or `macos: activateApp` execute methods :material-apple-finder:\n - :octicons-arrow-right-24: `windows: launchApp` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/appium/app/reset`\n - :octicons-arrow-right-24: `mobile: clearApp` execute method :material-apple: [^sim] :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/app/strings`\n - :octicons-arrow-right-24: `mobile: getAppStrings` execute method :material-apple: :material-android: :material-coffee:\n- `GET /session/:sessionId/appium/device/app_state`\n - :octicons-arrow-right-24: `POST /session/:sessionId/appium/device/app_state` :simple-appium:\n - :octicons-arrow-right-24: `mobile: queryAppState` execute method :material-apple: :material-android: :material-coffee:\n - :octicons-arrow-right-24: `macos: queryAppState` execute method :material-apple-finder:\n- `GET /session/:sessionId/appium/device/current_activity`\n - :octicons-arrow-right-24: `mobile: getCurrentActivity` execute method :material-android: :material-coffee:\n- `GET /session/:sessionId/appium/device/current_package`\n - :octicons-arrow-right-24: `mobile: getCurrentPackage` execute method :material-android: :material-coffee:\n- `GET /session/:sessionId/appium/device/display_density`\n - :octicons-arrow-right-24: `mobile: getDisplayDensity` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/finger_print`\n - :octicons-arrow-right-24: `mobile: fingerPrint` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/get_clipboard`\n - :octicons-check-24: Moved to drivers: :material-android: :material-coffee:\n - :octicons-arrow-right-24: `mobile: getClipboard` execute method :material-apple: :material-android: :material-coffee:\n - :octicons-arrow-right-24: `mobile: getPasteboard` execute method :material-apple: [^sim]\n - :octicons-arrow-right-24: `windows: getClipboard` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/appium/device/gsm_call`\n - :octicons-arrow-right-24: `mobile: gsmCall` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/gsm_signal`\n - :octicons-arrow-right-24: `mobile: gsmSignal` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/gsm_voice`\n - :octicons-arrow-right-24: `mobile: gsmVoice` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/is_locked`\n - :octicons-arrow-right-24: `mobile: isLocked` execute method :material-apple: :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/keyevent`\n - :octicons-arrow-right-24: `mobile: keys` execute method :material-apple: (iPadOS only)\n - :octicons-arrow-right-24: `mobile: pressKey` execute method :material-android: :material-coffee:\n - :octicons-arrow-right-24: `macos: keys` execute method :material-apple-finder:\n - :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/appium/device/lock`\n - :octicons-arrow-right-24: `mobile: lock` execute method :material-apple: :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/long_press_keycode`\n - :octicons-arrow-right-24: `mobile: pressKey` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/network_speed`\n - :octicons-arrow-right-24: `mobile: networkSpeed` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/open_notifications`\n - :octicons-arrow-right-24: `mobile: statusBar` execute method :material-android: :material-coffee:\n - :octicons-arrow-right-24: `mobile: openNotifications` execute method :material-android:\n- `POST /session/:sessionId/appium/device/power_ac`\n - :octicons-arrow-right-24: `mobile: powerAC` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/power_capacity`\n - :octicons-arrow-right-24: `mobile: powerCapacity` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/press_keycode`\n - :octicons-arrow-right-24: `mobile: keys` execute method :material-apple: (iPadOS only)\n - :octicons-arrow-right-24: `mobile: pressKey` execute method :material-android: :material-coffee:\n - :octicons-arrow-right-24: `macos: keys` execute method :material-apple-finder:\n - :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/appium/device/send_sms`\n - :octicons-arrow-right-24: `mobile: sendSms` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/set_clipboard`\n - :octicons-arrow-right-24: `mobile: setClipboard` execute method :material-apple: :material-android: :material-coffee:\n - :octicons-arrow-right-24: `mobile: setPasteboard` execute method :material-apple: [^sim]\n - :octicons-arrow-right-24: `windows: setClipboard` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/appium/device/shake`\n - :octicons-arrow-right-24: `mobile: shake` execute method :material-apple: [^sim]\n- `POST /session/:sessionId/appium/device/start_activity`\n - :octicons-arrow-right-24: `mobile: startActivity` execute method :material-android: :material-coffee:\n- `GET /session/:sessionId/appium/device/system_bars`\n - :octicons-arrow-right-24: `mobile: deviceScreenInfo` execute method :material-apple:\n - :octicons-arrow-right-24: `mobile: getSystemBars` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/toggle_airplane_mode`\n - :octicons-arrow-right-24: `mobile: setConnectivity` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/toggle_data`\n - :octicons-arrow-right-24: `mobile: setConnectivity` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/toggle_location_services`\n - :octicons-arrow-right-24: `mobile: toggleGps` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/toggle_wifi`\n - :octicons-arrow-right-24: `mobile: setConnectivity` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/unlock`\n - :octicons-arrow-right-24: `mobile: unlock` execute method :material-apple: :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/element/:elementId/value`\n - :octicons-arrow-right-24: `POST /session/:sessionId/element/:elementId/value` :simple-appium:\n- `POST /session/:sessionId/appium/element/:elementId/replace_value`\n - :octicons-arrow-right-24: `POST /session/:sessionId/element/:elementId/value` :simple-appium:\n- `POST /session/:sessionId/appium/getPerformanceData`\n - :octicons-arrow-right-24: `mobile: getPerformanceData` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/performanceData/types`\n - :octicons-arrow-right-24: `mobile: getPerformanceDataTypes` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/receive_async_response`\n - :octicons-arrow-right-24: `POST /session/:sessionId/execute/async` :simple-appium:\n- `POST /session/:sessionId/appium/simulator/toggle_touch_id_enrollment`\n - :octicons-arrow-right-24: `mobile: enrollBiometric` execute method :material-apple: [^sim]\n- `POST /session/:sessionId/appium/simulator/touch_id`\n - :octicons-arrow-right-24: `mobile: sendBiometricMatch` execute method :material-apple: [^sim]\n- `POST /session/:sessionId/appium/start_recording_screen`\n - :octicons-check-24: Moved to drivers: :material-apple: :material-android: :material-coffee: :material-apple-finder: :material-microsoft-windows:\n - :octicons-arrow-right-24: `mobile: startXCTestScreenRecording` execute method :material-apple:\n - :octicons-arrow-right-24: `mobile: startMediaProjectionRecording` execute method :material-android: :material-coffee:\n - :octicons-arrow-right-24: `macos: startRecordingScreen` or `macos: startNativeScreenRecording` execute methods :material-apple-finder:\n - :octicons-arrow-right-24: `windows: startRecordingScreen` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/appium/stop_recording_screen`\n - :octicons-check-24: Moved to drivers: :material-apple: :material-android: :material-coffee: :material-apple-finder: :material-microsoft-windows:\n - :octicons-arrow-right-24: `mobile: stopXCTestScreenRecording` execute method :material-apple:\n - :octicons-arrow-right-24: `mobile: stopMediaProjectionRecording` execute method :material-android: :material-coffee:\n - :octicons-arrow-right-24: `macos: stopRecordingScreen` or `macos: stopNativeScreenRecording` execute methods :material-apple-finder:\n - :octicons-arrow-right-24: `windows: stopRecordingScreen` execute method :material-microsoft-windows:\n- `GET /session/:sessionId/application_cache/status`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `POST /session/:sessionId/buttondown`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: [W3C Actions API](https://www.selenium.dev/documentation/webdriver/actions_api/) (`pointerDown`) :simple-appium:\n - :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/buttonup`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerUp`) :simple-appium:\n - :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/click`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown` & `pointerUp`) :simple-appium:\n- `POST /session/:sessionId/dismiss_alert`\n - :octicons-arrow-right-24: `POST /session/:sessionId/alert/dismiss` :simple-appium:\n- `POST /session/:sessionId/doubleclick`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown` & `pointerUp`) :simple-appium:\n- `POST /session/:sessionId/element/active`\n - :octicons-arrow-right-24: `GET /session/:sessionId/element/active` :simple-appium:\n- `GET /session/:sessionId/element/:elementId/equals/:otherId`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n- `GET /session/:sessionId/element/:elementId/location`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `GET /session/:sessionId/element/:elementId/rect` :simple-appium:\n- `GET /session/:sessionId/element/:elementId/location_in_view`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n- `GET /session/:sessionId/element/:elementId/pageIndex`\n - :octicons-no-entry-24: MJSONWP protocol command with no direct replacement\n- `GET /session/:sessionId/element/:elementId/size`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `GET /session/:sessionId/element/:elementId/rect` :simple-appium:\n- `POST /session/:sessionId/element/:elementId/submit`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `POST /session/:sessionId/execute`\n - :octicons-arrow-right-24: `POST /session/:sessionId/execute/sync` :simple-appium:\n- `POST /session/:sessionId/execute_async`\n - :octicons-arrow-right-24: `POST /session/:sessionId/execute/async` :simple-appium:\n- `POST /session/:sessionId/keys`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`keyDown` & `keyUp`) :simple-appium:\n - Selenium-based clients can also use [Send Keys](https://www.selenium.dev/documentation/webdriver/actions_api/keyboard/#send-keys)\n- `GET /session/:sessionId/local_storage`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `POST /session/:sessionId/local_storage`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `DELETE /session/:sessionId/local_storage`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `GET /session/:sessionId/local_storage/key/:key`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `DELETE /session/:sessionId/local_storage/key/:key`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `GET /session/:sessionId/local_storage/size`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `POST /session/:sessionId/log`\n - :octicons-arrow-right-24: `POST /session/:sessionId/se/log` :simple-appium:\n- `GET /session/:sessionId/log/types`\n - :octicons-arrow-right-24: `GET /session/:sessionId/se/log/types` :simple-appium:\n- `POST /session/:sessionId/moveto`\n - :octicons-arrow-right-24: W3C Actions API (`pointerMove`) :simple-appium:\n - Selenium-based clients can also use [Move by Offset](https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#move-by-offset)\n- `GET /session/:sessionId/screenshot/:elementId`\n - :octicons-arrow-right-24: `GET /session/:sessionId/element/:elementId/screenshot` :simple-appium:\n- `GET /session/:sessionId/session_storage`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `POST /session/:sessionId/session_storage`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `DELETE /session/:sessionId/session_storage`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `GET /session/:sessionId/session_storage/key/:key`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `DELETE /session/:sessionId/session_storage/key/:key`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `GET /session/:sessionId/session_storage/size`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `POST /session/:sessionId/timeouts/async_script`\n - :octicons-arrow-right-24: `POST /session/:sessionId/timeouts` :simple-appium:\n- `POST /session/:sessionId/timeouts/implicit_wait`\n - :octicons-arrow-right-24: `POST /session/:sessionId/timeouts` :simple-appium:\n- `POST /session/:sessionId/touch/click`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown` & `pointerUp`) :simple-appium:\n - Selenium-based clients can also use [Click and Release](https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#click-and-release)\n - :octicons-arrow-right-24: `mobile: tap` or `mobile: tapWithNumberOfTaps` execute methods :material-apple:\n - :octicons-arrow-right-24: `mobile: clickGesture` execute method :material-android:\n - :octicons-arrow-right-24: `mobile: clickAction` execute method :material-coffee:\n - :octicons-arrow-right-24: `macos: click`, `macos: rightClick`, `macos: press` or `macos: tap` execute methods :material-apple-finder:\n - :octicons-arrow-right-24: `windows: click` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/touch/doubleclick`\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown` & `pointerUp`) :simple-appium:\n - Selenium-based clients can also use [Double Click](https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#double-click)\n - :octicons-arrow-right-24: `mobile: doubleTap` or `mobile: tapWithNumberOfTaps` execute methods :material-apple:\n - :octicons-arrow-right-24: `mobile: doubleClickGesture` execute method :material-android:\n - :octicons-arrow-right-24: `mobile: clickAction` execute method :material-coffee:\n - :octicons-arrow-right-24: `macos: doubleClick` or `macos: doubleTap` execute methods :material-apple-finder:\n - :octicons-arrow-right-24: `windows: click` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/touch/down`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown`) :simple-appium:\n - :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/touch/flick`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown`, `pointerMove` & `pointerUp`) :simple-appium:\n - :octicons-arrow-right-24: `mobile: flingGesture` execute method :material-android:\n- `POST /session/:sessionId/touch/longclick`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown`, `pause` & `pointerUp`) :simple-appium:\n - :octicons-arrow-right-24: `mobile: touchAndHold` execute method :material-apple:\n - :octicons-arrow-right-24: `mobile: longClickGesture` execute method :material-android:\n - :octicons-arrow-right-24: `mobile: clickAction` execute method :material-coffee:\n - :octicons-arrow-right-24: `macos: press` execute method :material-apple-finder:\n - :octicons-arrow-right-24: `windows: click` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/touch/multi/perform`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `POST /session/:sessionId/actions` :simple-appium:\n- `POST /session/:sessionId/touch/move`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerMove`) :simple-appium:\n - Selenium-based clients can also use [Move by Offset](https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#move-by-offset)\n- `POST /session/:sessionId/touch/perform`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `POST /session/:sessionId/actions` :simple-appium:\n- `POST /session/:sessionId/touch/scroll`\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown`, `pointerMove` & `pointerUp`) :simple-appium:\n - :octicons-arrow-right-24: `mobile: scroll` or `mobile: swipe` execute methods :material-apple:\n - :octicons-arrow-right-24: `mobile: scrollGesture` or `mobile: swipeGesture` execute methods :material-android:\n - :octicons-arrow-right-24: `mobile: swipe` execute method :material-coffee:\n - :octicons-arrow-right-24: `macos: scroll` or `macos: swipe` execute methods :material-apple-finder:\n - :octicons-arrow-right-24: `windows: scroll` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/touch/up`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerUp`) :simple-appium:\n - :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n- `GET /session/:sessionId/window_handle`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `GET /session/:sessionId/window` :simple-appium:\n- `GET /session/:sessionId/window_handles`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `GET /session/:sessionId/window/handles` :simple-appium:\n- `GET /session/:sessionId/window/handle`\n - :octicons-arrow-right-24: `GET /session/:sessionId/window` :simple-appium:\n- `POST /session/:sessionId/window/:windowhandle/maximize`\n - :octicons-arrow-right-24: `POST /session/:sessionId/window/maximize` :simple-appium:\n - :fontawesome-solid-triangle-exclamation: Only supported for the current window\n- `GET /session/:sessionId/window/:windowhandle/position`\n - :octicons-arrow-right-24: `GET /session/:sessionId/window/rect` :simple-appium:\n - :fontawesome-solid-triangle-exclamation: Only supported for the current window\n- `POST /session/:sessionId/window/:windowhandle/position`\n - :octicons-arrow-right-24: `POST /session/:sessionId/window/rect` :simple-appium:\n - :fontawesome-solid-triangle-exclamation: Only supported for the current window\n- `GET /session/:sessionId/window/:windowhandle/size`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `GET /session/:sessionId/window/rect` :simple-appium:\n - :fontawesome-solid-triangle-exclamation: Only supported for the current window\n\n### Modified\n\nThe following are all endpoints modified in Appium 3, by removing handling for old or unused\nparameters (note that no new parameters have been added). Each endpoint lists the parameters it no\nlonger accepts, as well as the parameters it continues to accept in Appium 3.\n\n- `POST /session`\n - :octicons-x-24: `desiredCapabilities`, `requiredCapabilities`\n - :octicons-check-24: `capabilities`\n- `POST /session/:sessionId/alert/text`\n - :octicons-x-24: `value`\n - :octicons-check-24: `text`\n- `GET /session/:sessionId/appium/device/system_time`\n - :octicons-x-24: `format`\n - :octicons-check-24: None\n- `POST /session/:sessionId/element/:elementId/value`\n - :octicons-x-24: `value`\n - :octicons-check-24: `text`\n- `POST /session/:sessionId/timeouts`\n - :octicons-x-24: `type`, `ms`\n - :octicons-check-24: `script`, `pageLoad`, `implicit`\n- `POST /session/:sessionId/window`\n - :octicons-x-24: `name`\n - :octicons-check-24: `handle`\n\n[^sim]: Supported in emulators/simulators only\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/security.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Server Security\n---\n\nThe Appium team makes every effort to ensure the security of the Appium server. This is especially\nimportant when Appium is run in a multitenant environment, or when multiple users are running\nsessions on the same Appium server. In general, you can only safely enable all of Appium's features if\nall the following are true:\n\n- You're running your own Appium server locally or within a protected internal network\n- You're not sharing it with any untrusted parties\n- You don't expose Appium's port(s) to the wider internet\n\nBut because many Appium users might not be able to guarantee such a safe environment, the Appium\nteam puts many features behind a security protection mechanism, which forces system admins (the\npeople who are in charge of starting the Appium server) to _explicitly opt-in_ to these features.\n(Third-party driver and plugin authors can also hide behaviour behind security\nflags.)\n\nFor security reasons, Appium client sessions can _not_ request feature enablement via capabilities.\nThis is the responsibility of the server admin who configures and launches the Appium server.\n\n## Security Server Args\n\nThe [Server CLI](../reference/cli/server.md) doc outlines three relevant arguments which may be passed to\nAppium, when starting it from the command line:\n\n|
Parameter
| Description |\n| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `--relaxed-security` | Turns on _all_ insecure features, except those blocked by `--deny-insecure` |\n| `--allow-insecure` | Turns on _only_ specified features, except those blocked by `--deny-insecure`. Has no effect when used in combination with `--relaxed-security` |\n| `--deny-insecure` | Explicitly turns _off_ specified features, overriding `--relaxed-security` and `--allow-insecure` |\n\nAll of the above arguments can also be specified in the [Appium Configuration file](./config.md).\n\nFeatures passed to `--allow-insecure`/`--deny-insecure` must be specified as a comma-separated list,\nand each feature in the list must additionally include a prefix, indicating the driver to which the\nfeature should apply. The prefix can be either the driver's `automationName`, or the wildcard (`*`)\nsymbol, if the feature should be applied to all drivers. The prefix and feature name are separated\nusing the colon character (`:`).\n\nFor example, `first:foo` refers to the `foo` feature for the `first` driver, whereas `*:bar` refers\nto the `bar` feature for all drivers.\n\n## Insecure Features\n\nEach Appium driver is responsible for its own security, and can create its own feature names. Thus,\nyou should read through the documentation for a particular driver to know which feature names it\nmight use. Here is an incomplete list of examples from some of Appium's official drivers:\n\n|
Feature Name
| Description | Supported Extension(s) |\n| ------------------------------------------ | --------------------------------------------------------------------------------------- | ---------------------------------------------- |\n| `get_server_logs` | Allows retrieving of Appium server logs via the Webdriver log interface | IOS, XCUITest, Android, UiAutomator2, Espresso |\n| `adb_shell` | Allows execution of arbitrary shell commands via ADB, using the `mobile: shell` command | Android, UiAutomator2, Espresso |\n| `record_audio` | Allow recording of host machine audio inputs | XCUITest |\n| `execute_driver_script` | Allows sending a request that has multiple Appium commands. | Execute Driver Plugin |\n\nSome insecure features operate on the server level and do not require a driver session. Enabling\nthese features require using the wildcard prefix:\n\n|
Feature Name
| Description |\n| ------------------------------------------ | ------------------------------------------------------------------------------- |\n| `session_discovery` | Allows retrieving the list of active server sessions via `GET /appium/sessions` |\n\n## Examples\n\nTurn on the `foo` feature only for the `first` driver:\n\n```bash\nappium --allow-insecure=first:foo\n```\n\nTurn on the `foo` feature for all drivers:\n\n```bash\nappium --allow-insecure='*:foo'\n```\n\nTurn on the `foo` feature for all drivers _except_ `first`:\n\n```bash\nappium --allow-insecure='*:foo' --deny-insecure=first:foo\n```\n\nTurn on all features _except_ `foo` for all drivers:\n\n```bash\nappium --relaxed-security --deny-insecure='*:foo'\n```\n\nTurn on multiple insecure features for specific drivers:\n\n```bash\nappium --allow-insecure=uiautomator2:adb_shell,xcuitest:get_server_logs\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/settings.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Session Settings\n---\n\nAppium has a set of extension APIs that allow you to adjust parameters for a given session during\nthe session itself. Called \"Settings\", these parameters are similar to [Capabilities](./caps.md),\nbut while Capabilities _cannot be adjusted_ once a session has started, Settings _can be adjusted any\nnumber of times_ during the course of a session.\n\nThere are 3 important points to the concept of Settings:\n\n- Settings are mutable; they can be changed during a session using the Settings API\n- Settings are only relevant during the session in which they are set. They are typically reset for\n each new session, though depending on the driver, some settings may persist between sessions\n- Settings only adjust the way the Appium server behaves during test automation. They do not affect\n the device or app under test\n\nAn example of a setting would be the `ignoreUnimportantViews` setting recognized by the UiAutomator2\ndriver. The driver can be instructed to ignore elements in the view hierarchy which it deems\nirrelevant. Changing this setting to `true` can cause tests to run faster. But if later in the same\nsession you _want_ to access elements which would be ignored under this setting, you can always\nchange it back to `false`.\n\nSettings are implemented via the following API endpoints:\n\n| Command |
Method/Route
| Params | Description | Returns |\n| ----------------- | ------------------------------------------ | ----------------------------------------------------- | ---------------------------------- | ----------------------------------------------------- |\n| `Update Settings` | `POST /session/:id/appium/settings` | `settings` (`Record`) | Update the provided setting values | `null` |\n| `Get Settings` | `GET /session/:id/appium/settings` | | Return the current settings | `settings` (`Record`) |\n\nThe `settings` object must be a set of keys and values, where the key is the setting name, and the\nvalue is any documented valid value for that setting.\n\n!!! info\n\n```\nSettings are driver-specific, so refer to your driver's documentation for a list of supported settings\n```\n\n## Initializing Settings via Capabilities\n\nIf you want to start an Appium session with a setting in a non-default state, you can do so by\nincluding a capability of the form `appium:settings[]` with the appropriate value. So to turn\non the `ignoreUnimportantViews` setting mentioned above from the very beginning of a session, you\nwould construct a set of capabilities that includes the following in its JSON representation:\n\n```json\n{\n \"appium:settings[ignoreUnimportantViews]\": true\n}\n```\n\nAlso, since Appium 2.1, there is a possibility to provide multiple settings in a single\n`appium:settings` capability value:\n\n```json\n{\n \"appium:settings\": {\n \"ignoreUnimportantViews\": true,\n \"allowInvisibleElements\": true\n }\n}\n```\n\nOf course, initializing a setting via capabilities doesn't prevent you from changing it later on\nvia the Settings API. To learn more about how to use the Settings API in the context of your\nspecific client library, visit the documentation for that client.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/guides/tls.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: SSL/TLS/SPDY Support\n---\n\nAppium 2.2 introduces the option to start the Appium server with SSL/TLS support.\n\n## Command Line Arguments\n\nIn order to enable secure connections to the server, you need to provide the following command\nline arguments:\n\n```bash\nappium server --ssl-cert-path=/path/to/cert.pem --ssl-key-path=/path/to/key.pem\n```\n\nBoth arguments must be provided and should contain paths to a valid\n[X509 PEM](https://www.ssl.com/guide/pem-der-crt-and-cer-x-509-encodings-and-conversions/)\ncertificate and its corresponding private key.\n\nAfter the server is started use the `https` protocol and a client supporting SSL/TLS or\n[SPDY](https://en.wikipedia.org/wiki/SPDY) to communicate to it.\n\n### Supported Features\n\nOnce a secure server socket is established it supports the following protocols:\n`['h2', 'spdy/3.1', 'spdy/3', 'spdy/2', 'http/1.1', 'http/1.0']`. See\n[the SPDY node module documentation](https://www.npmjs.com/package/spdy) to get more details about\nits features. All insecure client connections will be rejected by the server.\n\n### Self-Signed Certificates\n\nUse the following command in order to generate a self-signed certificate/key pair:\n\n```bash\nopenssl req -nodes -new -x509 -keyout key.pem -out cert.pem -subj \"/C=US/ST=State/L=City/O=company/OU=Com/CN=www.testserver.local\"\n```\n\nFeel free to change the value of `-subj` in the command above with your matching details. The server\nshould work just fine with a self-signed certificate, although you need to take care about a proper\nclient setup, e.g. make sure it does not reject unauthorized certificates.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/intro/appium.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: How Does Appium Work?\n---\n\n\u300c\u306f\u3058\u3081\u306b\u300d\u3067\u3082\u8a00\u53ca\u3057\u305f\u3068\u304a\u308a\u3001Appium\u306f\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308a\u3001\u591a\u304f\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306eUI\u81ea\u52d5\u5316\u3092\u52a9\u3051\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u305f\u95a2\u4fc2\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u3067\u3059\u3002 Appium 2.0\u306e\u30ea\u30ea\u30fc\u30b9\u306b\u3088\u308a\u3001Appium\u306f\u4ee5\u4e0b\u306e\u4e3b\u8981\u306a\u76ee\u6a19\u3092\u9054\u6210\u3057\u307e\u3059\uff1a[^1]\n\n- \u6a19\u6e96\u5316\u3055\u308c\u305fAPI\u306b\u3088\u308a\u3001\u30af\u30ed\u30b9\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306a\u304c\u3089\u3082\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u56fa\u6709\u306e\u81ea\u52d5\u5316\u3092\u53ef\u80fd\u3068\u3059\u308b\n- \u69d8\u3005\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u304b\u3089\u3053\u306eAPI\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u308b\n- \u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u9593\u3067\u958b\u767a\u3055\u308c\u305f\u4fbf\u5229\u306aAppium\u62e1\u5f35\uff08Appium extension\uff09\u3092\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\n\n[^1]: \u3053\u308c\u3089\u306e\u4e3b\u8981\u306a\u76ee\u7684\u9054\u6210\u306e\u305f\u3081\u3001\u79c1\u305f\u3061\u306f\u4e8c\u6b21\u7684\u306a\u76ee\u6a19\u3084\u539f\u5247\u306b\u6cbf\u3063\u3066\u3044\u307e\u3059\u3002Appium\u62e1\u5f35\uff08Appium extension\uff09\u306e\u958b\u767a\u8005\u306b\u3082\u540c\u69d8\u306b\u63a8\u5968\u3059\u308b\u3082\u306e\u3067\u3059\u3002\n\n - \u53ef\u80fd\u306a\u9650\u308a\u3001\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3092\u6d3b\u7528\u3057\u3001\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306b\u8ca2\u732e\u3082\u3059\u308b\n - \u53ef\u80fd\u306a\u9650\u308a\u3001\u958b\u767a\u5143\u304b\u3089\u63d0\u4f9b\u3055\u308c\u308b\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u56fa\u6709\u306e\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308b\n - \u53ef\u80fd\u306a\u9650\u308a\u3001\u30c6\u30b9\u30c8\u5bfe\u8c61\u306b\u5909\u66f4\u3092\u5fc5\u8981\u3068\u3057\u306a\u3044\u81ea\u52d5\u5316\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3059\u308b\uff08\u5c02\u7528\u30d3\u30eb\u30c9\u3092\u5fc5\u8981\u3068\u3059\u308b\u3088\u3046\u306a\u8ffd\u52a0\u306eSDK\u3084\u30c6\u30b9\u30c8\u5bfe\u8c61\u7248\u3068\u88fd\u54c1\u7248\u3068\u3067\u5dee\u7570\u304c\u3042\u308b\u3053\u3068\u306f\u597d\u307e\u3057\u304f\u306a\u3044\uff09\n - \u53ef\u80fd\u306a\u9650\u308a\u3001\u65b0\u3057\u3044\u72ec\u81ea\u306e\u3082\u306e\u3092\u4f5c\u308b\u3088\u308a\u65e2\u306b\u3042\u308b\u6a19\u6e96\u306e\u3082\u306e\u3092\u4f7f\u3046\n\n\u3057\u305f\u304c\u3063\u3066\u3001iOS\u3084Android\u3068\u3044\u3063\u305f\u3044\u304b\u306a\u308b\u30a2\u30d7\u30ea\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306b\u5bfe\u3057\u3066\u3082\u3001 Appium\u306f\u958b\u767a\u8005\u3084\u30c6\u30b9\u30bf\u30fc\u306b\u305d\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306b\u304a\u3051\u308bUI\u81ea\u52d5\u5316\u30b3\u30fc\u30c9\u3092\u4e00\u3064\u306e\u7d71\u4e00\u3055\u308c\u305fAPI\u3067\u8a18\u8ff0\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002 Appium\u306e\u76ee\u6a19\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b\u79c1\u305f\u3061\u306f\u591a\u304f\u306e\u7591\u554f\u306b\u7b54\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n\n- \"\u4e00\u3064\u306e\u7d71\u4e00\u3055\u308c\u305f\" API\u3068\u306f\u4f55\u304b\uff1f\n- \u3069\u306e\u3088\u3046\u306b\u79c1\u305f\u3061\u306f\u305d\u306eAPI\u3092\u7279\u5b9a\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306b\u304a\u3051\u308b\u81ea\u52d5\u5316\u3068\u3057\u3066\u306e\u632f\u308b\u821e\u3044\u306b\u5bfe\u5fdc\u3055\u305b\u3066\u3044\u308b\u304b\uff1f\n- \u3069\u306e\u3088\u3046\u306b\u79c1\u305f\u3061\u306f\u8907\u6570\u306e\u3088\u304f\u77e5\u3089\u308c\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u304b\u3089\u5229\u7528\u53ef\u80fd\u306b\u3057\u3066\u3044\u308b\u304b\uff1f\n\niOS\u3068Android\u3060\u3051\u3067\u306a\u304f\u3088\u308a\u591a\u304f\u306e\u30a2\u30d7\u30ea\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u304c\u5b58\u5728\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u8003\u3048\u308b\u3068\u3001\u305d\u306e\u80cc\u666f\u306b\u306f\u5225\u306e\u3001\u3088\u308a\u5927\u304d\u306a\u7591\u554f\u304c\u6f5c\u3093\u3067\u3044\u307e\u3059\u3002\n\n- \u3069\u306e\u3088\u3046\u306b\u3057\u3066_\u5168\u3066\u306e_\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306b\u5bfe\u3057\u3066\u81ea\u52d5\u5316\u3092\u5b9f\u73fe\u3059\u308b\u304b\uff1f\n\n\u3053\u308c\u3089\u306e\u7591\u554f\u3078\u306eAppium\u306e\u7b54\u3048\u3092\u77e5\u308b\u3053\u3068\u306f\u3001Appium\u304c\u4f55\u304b\u3092\u5b66\u3076\u6700\u77ed\u306e\u65b9\u6cd5\u3067\u306f\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u78ba\u304b\u306a\u9053\u306b\u306a\u308a\u307e\u3059\u3002 \u3067\u306f\u3001\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002\n\n## Appium's choice of API\n\nAppium is very fortunate to have been preceded by a technology which has been a long-standing\npioneer in the field of UI automation, namely [Selenium](https://selenium.dev). The goal of the\nSelenium project has been to support UI automation of web browsers, and in this way we can think of\nit as occupying a subset of Appium's goals. Along the way, Selenium (and, after they merged,\nanother project called WebDriver) developed a relatively stable API for browser automation.\n\nOver the years, Selenium worked with various web browser vendors and the [W3C](https://w3.org)\nstandards group to turn its API into an official web browser standard, called the WebDriver\nspecification. All the main browsers now\nimplement automation capabilities inline with the WebDriver spec, without the Selenium team having\nto maintain any software that performs actual automation; standards for the win!\n\nAppium's initial goals were to develop an automation standard for mobile apps (iOS and Android). We\ncould have made up something new, but in the spirit of joining forces and keeping standards, well,\nstandard, we decided to adopt the WebDriver spec as Appium's API.[^2] While user interaction on\nwebsites and in mobile native apps are not entirely identical (with even greater differences once\nwe start to consider, for example, TV platforms controlled by simple remotes), the fact is that\nmost software UIs are pretty much the same. This means that the WebDriver spec provides automation\nAPI primitives (finding elements, interacting with elements, loading pages or screens, etc...) that\nmore or less map to any platform.\n\n[^2]: Technically, when Appium was first written, we were dealing with something older than the\n WebDriver spec, called the JSON Wire Protocol. Since then, Appium continued to evolve along with\n the W3C spec and is fully W3C-compliant.\n\nOf course, Appium wants to support the cases where user interaction _does_ differ from web to\nmobile or web to TV, and so Appium also makes use of the built-in _extensibility_ of the WebDriver\nspec. The result is that, no matter what platform you want to automate, when you use Appium, you\nwill do so using the standard WebDriver spec, with two caveats:\n\n- We might not have any way to support a particular WebDriver API command on a given platform, and\n so some commands might be unsupported (for example, getting or setting cookies is not possible in\n the world of native mobile app automation).\n- We might support automation behaviours that go _beyond_ what's available in the WebDriver API\n command list, though any such commands will be valid and spec-compliant extensions to the\n WebDriver API.\n\nHow do you actually _use_ the WebDriver API, particularly in the context of Appium? We'll cover\nthat in the [section below](#universal-programming-language-access) on how Appium provides\nuniversal programming language access. All you need to know for now is that the way Appium\nintroduces a universal UI automation interface is by implementing the WebDriver protocol.\n\n## Platform automation behaviour\n\nThe next question is, how does Appium map this protocol to automation behaviour on a wide range of\nplatforms? The trick is that, strictly speaking, Appium doesn't! It leaves this responsibility up\nto a kind of software module called an Appium _driver_. There's a whole Driver\nIntroduction which you can read next, so we won't go into huge detail on how they\nwork for now.\n\nWhat's important to understand at the moment is that a driver is kind of like a pluggable module\nfor Appium that gives Appium the power to automate a particular platform (or set of platforms,\ndepending on the goal of the driver). At the end of the day, a driver's responsibility is to simply\nimplement an Appium-internal interface representing the WebDriver protocol. How it implements this\ninterface is totally up to the driver, based on its strategy for making automation happen on\na specific platform. Typically, and with a lot more complexity and difficulty in the details,\na driver does this by relying on platform-specific automation technologies. For example, Apple\nmaintains an iOS automation technology called\n[XCUITest](https://developer.apple.com/documentation/xctest/user_interface_tests). The Appium\ndriver that supports iOS app automation is called the XCUITest\nDriver because ultimately what it does is\nconvert the WebDriver protocol to XCUITest library calls.\n\nOne of the reasons that drivers are independent, pluggable modules is that they work completely\ndifferently from one another. The tools and requirements for building and using drivers for\ndifferent platforms are completely different. And so Appium lets you use just the drivers that you\nneed for your automation tasks. Choosing drivers and installing them so that you can use them with\nyour Appium instance is so important that Appium has its very own CLI for managing\ndrivers.\n\nSo, to answer our original question, the way that Appium provides access to automation capabilities\nfor a given platform is that the Appium team (or anyone else[^3]) writes a _driver_ for that\nplatform, implementing as much or little of the WebDriver protocol as desired. The driver can then\nbe installed by anyone using Appium.\n\n[^3]: You can build and share your own drivers! Check out Building\n Drivers to learn more about how to develop drivers in Node.js\n that can be used with Appium.\n\n## Universal programming language access\n\nBut what does it mean, or look like, to _use_ Appium, anyway? Since Appium is ultimately a Node.js\nprogram, it _could_ have looked like importing Appium and its drivers as libraries into your own\nNode.js programs. But that wouldn't meet Appium's goal of providing automation capabilities to\npeople using any popular programming language.\n\nLuckily, the fact that Appium rode in on Selenium's coattails meant that we had a solution to this\nproblem from day one. You see, the WebDriver specification is actually an HTTP-based protocol,\nmeaning it is designed to be used over a network rather than within the memory of a single program.\n\nOne of the main benefits of this \"client-server\" architecture is that it allows the automation\nimplementer (the thing doing the automation, in this case the 'server') to be completely distinct\nfrom the automation runner (the thing defining what automation should be done, in what steps,\netc..., in this case the 'client'). Basically, all the \"hard stuff\" (actually figuring out how to\nmake automation happen on a given platform) can be handled in one place by the server, and \"thin\"\nclient libraries can be written in any programming language which simply encode HTTP requests to\nthe server in language-appropriate way. It's possible, in other words, to bring basic Appium\n/ WebDriver capabilities to a new programming language relatively easily, assuming high-level HTTP\nlibraries exist, simply by coding up a basic HTTP client in that language.\n\nThere are a couple important takeaways here for you, the Appium user:\n\n- Appium is an _HTTP server_. It must run as a process on some computer for as long as you want to\n be able to use it for automation. It must be accessible on the network to whichever computer you\n want to use to run the automation from (whether that is the same machine or one across the\n world).\n- Unless you want to write raw HTTP calls or use cURL, using Appium for automation involves the use\n of an [Appium Client](clients.md) in the language of your choice. The goal of each of these\n clients is to encapsulate the WebDriver protocol so that rather than worrying about the protocol\n itself, you can work with objects and methods that feel idiomatic for your language.\n- The Appium server and the Appium client do _not_ need to be running on the same computer. You\n simply need to be able to send HTTP requests from the client to the server over some network.\n This greatly facilitates the use of cloud providers for Appium, since they can host the Appium\n server and any related drivers and devices, and all you need to do is point your client script to\n their secure endpoints.\n\nAnd of course, none of this is about \"testing\" per se, purely about the use of Appium and its\nclient libraries for automation purposes. If you want to do automation for the purpose of\n\"testing\", you'll likely want to enlist the help of test runners, test frameworks, and the like,\nnone of which need be related to Appium; one of the benefits of Appium's \"universal accessibility\"\nis that it plays well with whatever set of tools you find most beneficial for your situation.\n\n## Appium's huge scope\n\nAppium's vision (automation of everything under a single API) is huge! Certainly, much bigger than\nthe team of core maintainers for the open source project. So how does Appium hope to achieve this\ngoal? Basically, by empowering the community to develop functionality on top of Appium as\na _platform_. This is what we call the Appium \"ecosystem\".\n\nThe Appium team does officially maintain a few drivers itself (for example, the XCUITest driver\nthat we spoke about earlier). But it cannot hope to have the platform-specific expertise or the\ncapacity to maintain drivers for many different platforms. But what we have done, particularly\nbeginning with Appium 2, is to provide tools to empower the community to join in our vision:\n\n- Anyone can create a driver simply by creating a Node.js module that conforms to the appropriate\n conventions and implements any (sub|super)set of the WebDriver protocol. Creating a driver often\n involves a minimal amount of code because the WebDriver protocol details are abstracted away, and\n many helper libraries are available---the same libraries that power the Appium team's own\n drivers.\n- Sharing drivers with others is easy using the Appium driver CLI. There is no central authority.\n Anyone can share drivers publicly or privately, for free or for sale. Drivers can be open or\n closed source (though obviously we appreciate open source!).\n\nAppium's vision of being a platform for development extends beyond the support of automation for\nall app platforms. As a popular automation tool, there are many opportunities for integrating\nAppium with all kinds of other tools and services. In addition, there are many feature ideas for\nAppium, either as a core server or in its incarnation across various drivers, which the core team\nwill never have time to build. And so, with Appium 2, Appium has released a plugin system that\nenables anyone to build and share modules that change how Appium works!\n\nIn the same way that drivers are easily shareable and consumable via the Appium driver CLI, plugins\ncan be published and consumed via a parallel [Plugin CLI](../reference/cli/extensions.md). Plugins\ncan do all sorts of things, for example adding the ability for Appium to find and interact with\nscreen regions based on a template image (as in the images). There are very few\nlimitations on what you can do with plugins, so you might also be interested in learning how to\n[Build Plugins](../developing/build-plugins.md) in Node.js that can be used with Appium.\n\nSo that's Appium: an extensible, universal interface for the UI automation of potentially\neverything! Read on into some of the specific intro docs for more details, or check out the various\nguides to dive into some more general concepts and features of Appium.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/intro/clients.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Intro to Appium Clients\n---\n\nFor all the reasons discussed in the [main Overview](./appium.md), Appium is based on the W3C\nWebDriver specification. This means that\nAppium implements a client-server architecture. The server (consisting of Appium itself along with\nany drivers or plugins you are using for automation) is connected to the devices under test, and\nis actually responsible for making automation happen on those devices. The client (driven by _you_,\nthe Appium test author) is responsible for sending commands to the server over the network, and\nreceiving responses from the server as a result. These responses can be used to tell whether\nautomation commands are successful, or might contain information that you queried about the state\nof the application. This document is a conceptual introduction to the client side of this equation.\n\n!!! info\n\n```\nFor more about the server side of the equation (i.e., how does Appium actually control\ndevices?), check out our [Intro to Appium Drivers](./drivers.md). To skip to a list of links to\nAppium client libraries, check out the [list of clients](../ecosystem/clients.md).\n```\n\nWhat sorts of automation commands are available? That is up to the particular driver and plugins\nthat you are using in any given session. A standard set of commands would include, for example, the\nfollowing:\n\n- Find Element\n- Click Element\n- Get Page Source\n- Take Screenshot\n\nIf you look at these commands in the WebDriver specification, you'll notice that they are not\ndefined in terms of any particular programming language. They are not Java commands, or JavaScript\ncommands, or Python commands. Instead, they form part of an HTTP API which can be accessed from\nwithin _any_ programming language (or none! you could just use cURL if you want).\n\nSo, for example, the `Find Element` command corresponds to an HTTP `POST` request sent to the HTTP\nendpoint `/session/:sessionid/element` (where in this case, `:sessionid` is a placeholder for the\nunique session ID generated by the server in a previous call to `Create Session`).\n\nThis information is primarily useful for people developing technology that works with the WebDriver\nspec. It's not particularly useful for people trying to write Appium or Selenium tests. When you\nwrite an Appium test, you want to use a programming language you're familiar with. Luckily, there\nexist a set of [Appium client libraries](../ecosystem/clients.md)[^1] that take care of the\nresponsibility of speaking HTTP to the Appium server. Instead, they expose a set of \"native\"\ncommands for a particular programming language, so that, to the test author, it just feels like\nyou're writing Python, or JavaScript, or Java.\n\nAs an example, here's the same simple set of Appium commands in five different programming\nlanguages, using the recommended Appium client binding for each language (note that this is not\nworking sample code including all appropriate imports; see each client library's instructions for\nsetup and command reference):\n\n\\=== \"JavaScript (Webdriver.io)\"\n\n````\n```js\nconst element = await driver.$('//*[@text=\"Foo\"]');\nawait element.click();\nconsole.log(await element.getText())\nconsole.log(await driver.getPageSource())\n```\n````\n\n\\=== \"Java\"\n\n````\n```java\nWebElement element = driver.findElement(By.Xpath(\"//*[@text='Foo']\"))\nelement.click()\nSystem.out.println(element.getText())\nSystem.out.println(driver.getPageSource())\n```\n````\n\n\\=== \"Python\"\n\n````\n```py\nelement = driver.find_element(by=By.XPATH, value='//*[@text=\"Foo\"]')\nelement.click()\nprint(element.text)\nprint(driver.page_source)\n```\n````\n\n\\=== \"Ruby\"\n\n````\n```rb\nelement = driver.find_element :xpath, '//*[@text=\"Foo\"]'\nelement.click\nputs element.text\nputs driver.page_source\n```\n````\n\n\\=== \"C#\"\n\n````\n```dotnet\nAppiumElement element = driver.FindElement(MobileBy.AccessibilityId(\"Views\")); \nelement.click();\nSystem.Console.WriteLine(element.Text);\nSystem.Console.WriteLine(driver.PageSource);\n```\n````\n\nEach of these scripts, despite being in different languages, does the same thing under the hood:\n\n1. Call `Find Element` with a `using` parameter of `xpath` and a `value` parameter expressing the\n XPath query used to find an element. (If you're confused about these terms, you might find an\n introduction to Appium or Selenium useful)\n2. Call `Click Element` with the ID of the element found in the previous call.\n3. Call `Get Element Text` with the ID of the same element, and print it to the console.\n4. Call `Get Page Source` to retrieve the page/app source and print it to the console.\n\nThe only other thing to keep in mind before choosing or using a client is that each client is\nindependently maintained. Just because a feature is available in one client, it doesn't mean it's\navailable in another client (though all clients support at least the standard W3C protocol plus any\ncommon appium extensions). Just because one client has a nice set of helper functions, doesn't mean\nanother will. Some clients are kept very frequently up to date, and others are not! So when\nthinking about choosing a library, the first consideration is the language you want to use, and the\nsecond consideration is how full-featured and well-maintained the library is!\n\nTo learn how to use an Appium client, visit that client's homepage to learn more. In many cases,\nthe Appium client for a given language is built _on top of_ the _Selenium_ client for that\nlanguage, and so certain Appium clients may only document the features which the Appium client\nadded on top of the Selenium client. All that to say, for a full reference, you may need to visit\nboth the Appium client documentation as well as the Selenium client documentation.\n\nThat's all you need to know about Appium clients! Head over to the\n[Clients](../ecosystem/clients.md) page to check out the current list of clients.\n\n[^1]: These libraries are alternately called \"clients\", \"client libraries\", or \"client bindings\".\n They all mean the same thing!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/intro/drivers.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Intro to Appium Drivers\n---\n\nAs the [main Overview](./appium.md) makes clear, \"drivers\" are basically Appium's answer to the\nquestion, \"how do we support automation of multiple, unrelated platforms?\" In this doc we'll get\ninto a little more detail about how drivers work. The specific details of how drivers work probably\ndon't matter too much for you, unless you're planning on writing your own driver or contributing to\nan existing driver (things we hope you do!).\n\nThe main benefit in understanding a bit more of how drivers work is that being aware of the typical\ncomplexity or the typical driver architecture will inform your debugging process when you\ninevitably run into an issue in one of your tests.\n\n## Interface Implementations\n\nAt the most basic level, drivers are simply Node.js classes that extend a special class included in\nAppium, called `BaseDriver`. You could have something very close to a \"working\" driver, with these\nvery simple lines of code:\n\n```js\nimport BaseDriver from '@appium/base-driver'\n\nclass MyNewDriver extends BaseDriver {\n}\n```\n\nThis empty driver doesn't _do_ anything, but you could wrap it up in a Node.js module, add a few\nAppium-related fields to the module's manifest (`package.json`), and then install it using `appium\ndriver install`.\n\nSo, from a technical perspective, an Appium driver is just a bit of code that inherits from some\nother Appium code. That's it! Now, inheriting from `BaseDriver` actually gives us a lot, because\n`BaseDriver` is essentially an encapsulation of the entire WebDriver protocol. So all a driver\nneeds to do something useful is to _implement_ Node.js methods with names corresponding to\ntheir WebDriver protocol equivalents.\n\nSo let's say I wanted to do something with this empty driver; first I have to decide which\nWebDriver command I want to implement. For our example, let's take the Navigate\nTo WebDriver command. Leave aside for the moment\nwhat I want to have the driver _do_ when this command is executed. To tell Appium the driver can\nhandle the command, all we have to do is define a method like this in our driver class:[^1]\n\n```js\nasync setUrl(url) {\n // do whatever we want here\n}\n```\n\n[^1]: You might notice that `setUrl` doesn't look anything like `Navigate To`, so how did we know\n to use it rather than some other random string? Well, Appium's WebDriver-protocol-to-method-name\n mapping is defined in a special file within the `@appium/base-driver` package called\n [routes.js](https://github.com/appium/appium/blob/master/packages/base-driver/lib/protocol/routes.js).\n So if you're writing a driver, this is where you would go to figure out what method names to use\n and what parameters to expect. Or you could look at the source for any of the main Appium\n drivers!\n\nThat's it! How we actually implement the command is totally up to us, and depends on the\nplatform(s) we want to support. Here are some different example implementations of this command for\ndifferent platforms:\n\n- Browsers: execute some JavaScript to set `window.location.href`\n- iOS apps: launch an app using a deep link\n- Android apps: launch an app using a deep link\n- React apps: load a specific route\n- Unity: go to a named scene\n\nSo you can see there can be a lot of differences between how drivers implement the same WebDriver\ncommand across platforms.[^2] What is the _same_, though, is how they express that they can handle\na protocol command.\n\n[^2]: Of course, we want to keep the semantics as similar as possible, but in the world of iOS, for\n example, launching an app via a deep link (a URL with a special app-specific scheme) is about as\n close as we are going to get to navigating to a web URL.\n\nWe're going into this great amount of detail (which you don't need to remember, by the way),\nbecause it's important to stress the point that an Appium driver is not inherently anything in\nparticular, other than a bit of JS code that can handle WebDriver protocol commands. Where you go\nfrom there is up to you, the driver author!\n\n## Automation mapping\n\nBut _typically_ what driver authors want to do is to provide automation behaviours for a given\nplatform(s) that are semantically very similar to the the WebDriver spec implementations for\nbrowsers. When you want to find an element, you should get a reference to a UI element. When you\nwant to click or tap that element, the resulting behaviour should be the same as if a person were\nto click or tap on the element. And so on.\n\nSo the real challenge for driver authors is not how to work with the WebDriver protocol (because\n`BaseDriver` encapsulates all that for you), but how to make the actual automation happen on the\ntarget platform. Every driver relies on its own set of underlying technologies here. As mentioned\nin the [Overview](index.md), the iOS driver uses an Apple technology called\n[XCUITest](https://developer.apple.com/documentation/xctest/xcuielement). These underlying\nautomation technologies usually have proprietary or idiosyncratic APIs of their own. Writing\na driver becomes the task of mapping the WebDriver protocol to this underlying API (or sometimes\na set of different underlying APIs--for example, the UiAutomator2 driver relies not only on the\n[UiAutomator2](https://developer.android.com/training/testing/other-components/ui-automator)\ntechnology from Google, but also functions only available through\n[ADB](https://developer.android.com/tools/adb), as well as functions only available\nvia the Android SDK inside a helper app). Tying it all together into a single, usable, WebDriver\ninterface is the incredibly useful (but incredibly challenging) art of driver development!\n\n## Multi-level architecture\n\nIn practice, this often results in a pretty complex architecture. Let's take iOS for example again.\nThe XCUITest framework (the one used by the Appium driver) expects code that calls it to be written\nin Objective-C or Swift. Furthermore, XCUITest code can only be run in a special mode triggered by\nXcode (and directly or indirectly, the Xcode command line tools). In other words, there's no\nstraightforward way to go from a Node.js function implementation (like `setUrl()` above) to\nXCUITest API calls.\n\nWhat the XCUITest driver authors have done is instead to split the driver into two parts: one part\nwritten in Node.js (the part which is incorporated into Appium and which initially handles the\nWebDriver commands), and the other part written in Objective-C (the part which actually gets run on\nan iOS device and makes XCUITest API calls). This makes interfacing with XCUITest possible, but\nintroduces the new problem of coordination between the two parts.\n\nThe driver authors could have chosen any of a number of very different strategies to model the\ncommunication between the Node.js side and the Objective-C side, but at the end of the day decided\nto use ... the WebDriver protocol! That's right, the Objective-C side of the XCUITest driver is\nitself a WebDriver implementation, called\n[WebDriverAgent](https://github.com/appium/webdriveragent).[^3]\n\n[^3]: You could in theory, therefore, point your WebDriver client straight to WebDriverAgent and\n bypass Appium entirely. This is usually not convenient, however, for a few reasons:\n\n- The Appium XCUITest driver builds and manages WebDriverAgent for you, which can be a pain and\n involves the use of Xcode.\n- The XCUITest driver does lots more than what can be done by WebDriverAgent, for example working\n with simulators or devices, installing apps, and the like.\n\nThe moral of the story is that driver architectures can become quite complicated and multilayered,\ndue to the nature of the problem we're trying to solve. It also means it can be difficult sometimes\nto tell where in this chain of technologies something has gone wrong, if you run into a problem\nwith a particular test. With the XCUITest world again, we have something like the following set of\ntechnologies all in play at the same time:\n\n- Your test code (in its programming language) - owned by you\n- The Appium client library - owned by Appium\n- The Selenium client library - owned by Selenium\n- The network (local or Internet)\n- The Appium server - owned by Appium\n- The Appium XCUITest driver - owned by Appium\n- WebDriverAgent - owned by Appium\n- Xcode - owned by Apple\n- XCUITest - owned by Apple\n- iOS itself - owned by Apple\n- macOS (where Xcode and iOS simulators run) - owned by Apple\n\nIt's a pretty deep stack!\n\n## Proxy mode\n\nThere's one other important architectural aspect of drivers to understand. It can be exemplified\nagain by the XCUITest driver. Recall that we just discussed how the two \"halves\" of the XCUITest\ndriver both speak the WebDriver protocol---the Node.js half clicks right into Appium's WebDriver\nserver, and the Objective-c half (WebDriverAgent) is its own WebDriver implementation.\n\nThis opens up the possibility of Appium taking a shortcut in certain cases. Let's imagine that the\nXCUITest driver needs to implement the `Click Element` command. The internal code of this\nimplementation would look something like taking the appropriate parameters and constructing an HTTP\nrequest to the WebDriverAgent server. In this case, we're basically just reconstructing the\nclient's original call to the Appium server\\![^4] So there's really no need to even write a function\nimplementing the `Click Element` command. Instead, the XCUITest driver can just let Appium know\nthat this command should be proxied directly to some other WebDriver server.\n\n[^4]: It's not _exactly_ the same call, because the Appium server and the WebDriverAgent server\n will generate different session IDs, but these differences will be handled transparently.\n\nIf you're not familiar with the concept of \"proxying,\" in this case it just means that the XCUITest\ndriver will not be involved at all in handling the command. Instead it will merely be repackaged\nand forwarded to WebDriverAgent at the protocol level, and WebDriverAgent's response will likewise\nbe passed back directly to the client, without any XCUITest driver code seeing it or modifying it.\n\nThis architectural pattern provides a nice bonus for driver authors who choose to deal with the\nWebDriver protocol everywhere, rather than constructing bespoke protocols. It also means that\nAppium can create wrapper drivers for any other existing WebDriver implementation very easily. If\nyou look at the [Appium Safari driver](https://github.com/appium/appium-safari-driver) code, for\nexample, you'll see that it implements basically no standard commands, because all of these are\nproxied directly to an underlying SafariDriver process.\n\nIt's important to understand that this proxying business is sometimes happening under the hood,\nbecause if you're ever diving into some open source driver code trying to figure out where\na command is implemented, you might be surprised to find no implementation at all in the Node.js\ndriver code itself! In that case, you'll need to figure out where commands are being proxied to so\nyou can look there for the appropriate implementation.\n\nOK, that's enough for this very detailed introduction to drivers!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/intro/history.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Project History\n---\n\nAppium has been around in one form or another since 2012. It's been under the\ndirection of various individuals and organizations, and it's even been\nimplemented in 3 different programming languages! Welcome to more than you ever\nwanted to know about how Appium got to be what is it today...\n\n## Early Inspiration\n\n[Dan Cuellar](https://twitter.com/thedancuellar) was the Test Manager at Zoosk\nin 2011, when he encountered a problem. The length of the test passes on the\niOS product was getting out of hand. Less testing was an option, but would come\nwith additional risk, especially with it taking several days to get patches\nthrough the iOS App Store Review process. He thought back to his days working\non websites and realized automation was the answer.\n\nDan surveyed the existing landscape of tools, only to find that all of them\nhand major drawbacks. The tool supplied by Apple, UIAutomation, required tests\nto be written in JavaScript, and did not allow for real-time debugging or\ninterpretation. It also had to be executed inside the Xcode profiling tool,\nInstruments. Other 3rd-party tools used private APIs and required SDKs and HTTP\nServers to be embedded into the application. This seemed highly undesirable.\n\nUnsatisfied with the existing options, Dan asked his manager for some\nadditional time to see if he could find a better way. He spent 2 weeks poking\nand prodding around to see if there was a way to use approved Apple\ntechnologies to automate an iOS application. The first implementation he tried\nused AppleScript to send messages to Mac UI elements using the OS\nX accessibility APIs. This worked to some degree, but would never work on real\ndevices, not to mention other drawbacks.\n\nSo he thought, what if I could get the UIAutomation framework to run in real\ntime like an interpreter? He looked into it and he determined that all he would\nneed to do is find a way to receive, execute, and reply to commands from within\na UIAutomation javascript program. Using the utility Apple provided for\nexecuting shell commands he was able to `cat` sequentially ordered text files\nto receive commands, `eval()` the output to execute them, and write them back\nto disk with `python`. He then prepared code in C# that implemented the\nSelenium-style syntax to write the sequentially ordered javascript commands.\niOSAuto is born.\n\n## Selenium Conference 2012\n\nDan was selected to speak at Selenium Conference 2012 in London about an\nentirely different topic. As part of his presentation, he showed off iOS\nAutomation using Selenium syntax to demonstrate writing platform-agnostic tests\nthat use separate platform-specific page objects with a common interface. To\nhis surprise, the cool test architecture would take a backseat to the spectacle\nof iOS tests running like WebDriver tests. Several people suggested that he\ngive a lightning talk later in the conference to explain exactly how it worked.\n\nOn the second day of the conference, Dan stepped up on stage to give the\nlightning talk. Jason Huggins, co-creator of Selenium, moderated the lightning\ntalks. Dan experienced technical difficulties getting his presentation to\nload, and Jason nearly had to move on to the next lightning talk. At the last\nmoment, the screen turned on and Dan jumped into his presentation. He explained\nthe details of his implementation and how it worked, begged for contributors,\nand in five minutes it was over. The crowd applauded politely, and he left the\nstage.\n\n## The Phone Rings\n\nFour months after the Selenium Conference, Jason called Dan. Jason had been\nworking on iOS testing support for a client at Sauce Labs. Jason remembered\nDan's lightning talk and thought the project might be useful to Jason's work,\nbut Dan's source code was not public. Jason asked Dan to meet up. Later that\nweek, Dan met Jason in a bar in San Francisco and showed him the source code\nfor iOS Auto.\n\nA long-time open source advocate, Jason encouraged Dan to release his code\nunder an open source license. In August, Dan released the source\ncode\non GitHub in C#. Jason encouraged Dan to change the language to make the\nproject more appealing to potential contributors. Dan uploaded a new version\nin\nPython.\nIn September, Jason added a web server and began to implement the WebDriver\nwire\nprotocol\nover HTTP, making iOS Auto scriptable from any Selenium WebDriver client\nlibrary in any language.\n\n## The Mobile Testing Summit\n\nJason decided that the project should be presented at the Mobile Testing\nSummit in November, but suggested that the\nproject get a new name first. Many ideas were thrown out and they settled on\nAppleCart. A day later, while he was perusing some of Apple's guidance on\ncopyright and trademarks, Jason noticed that under the section of examples for\nnames Apple would defend its trademarks against, the first example was\n\"AppleCart\". He called Dan and informed him of the situation, and they\nbrainstormed for a bit before Jason hit the jackpot. Appium... Selenium for\nApps.\n\n## Sauce Labs and Node.js\n\nIn January 2013, not long after the Mobile Testing Summit, Sauce Labs decided\nto fully back Appium and provide more developer power. A task force was created\nto evaluate the current state and how best to move forward with the project.\nThe team, which included Jonathan Lipps (the current project lead), decided\nthat Appium needed a rebirth, and ultimately settled on Node.js as the\nframework to use. Node is well-known as a fast and efficient web server\nbackend, and at the end of the day, Appium is just a highly-specialized web\nserver. It was also decided that JavaScript as a language was accessible enough\nthat Appium would be able to grow into a larger community of open-source\ndevelopers with JavaScript than the other options on the table.\n\nIn just a few days, the team leveraged the existing work on Appium and had\na new version of Appium with as much functionality as the previous Python\nversion. The foundation had been laid for Appium's basic architecture, and we\nhave been successfully building on it since. A few weeks into this sprint,\nJonathan Lipps was formally designated project lead and he began to strategize\nhow to get more people from the community involved with Appium's development.\n\n## Appium Around the World\n\nUltimately, Jonathan decided that getting Appium in front of as many developers\nat conferences and meetups was the best way to attract users and contributions.\nAppium in its new incarnation was debuted at the Google Test Automation\nConference 2013. Later in 2013,\nAppium was presented at conferences and meetups all around the US, as well as\nin England, Poland, Portugal, and Australia. Notably, Jonathan had Appium\n[perform as instruments in a band](https://www.youtube.com/watch?v=zsbNVkayYRQ)\nand Dan Cuellar put together a fun Appium video\nmontage for Selenium Conference.\n\nBut during all these presentations and conferences, the project continued to\ndevelop. Early in 2013 we released Android and Selendroid support, making\nAppium the first truly cross-platform automation framework. The project also\ncontinued to attract users and contributors, and by the end of 2013, we'd\nalready had well over 1,000 commits.\n\n## The Road to Appium 1.0\n\nAppium began to grow and mature significantly. In May 2014,\nwe released Appium 1.0, which stood as a milestone in Appium's development.\nAppium was given\n[various](https://www.prnewswire.com/news-releases/black-duck-announces-black-duck-open-source-rookies-of-the-year-winners-242383341.html)\n[awards](https://www.infoworld.com/article/2241247/164642-bossie-awards-2014-the-best-open-source-application-development-tools.html)\nand became the most popular open-source cross-platform mobile automation\nframework. Stability improved, bugs were prioritized and fixed, and features\nadded. Sauce Labs increased the number of developers it donated to working\non Appium, but the entire community stayed involved in guiding the project and\ncontributing to it, and project governance continued to happen in the open, on\npublic mailing lists and GitHub's issue tracker.\n\n## The Appium Umbrella Broadens\n\nEventually, it became clear that the Appium codebase was not optimized for\na large team of distributed, sometime contributors. We took the opportunity as\na committer team to rewrite Appium from the ground up, using a more modern\nversion of the JavaScript language, and redoing Appium's architecture so that\nit was easy for users or third-party developers to build their own Appium\n\"drivers\". We wanted for it to be easier for new contributors to get ramped up\non the Appium codebase, and to see support for new platforms added to Appium by\ngroups other than the core team. That vision has begun to be fulfilled, with\ngroups like Microsoft and Youi.tv adding drivers to Appium for Windows desktop\napp automation and Youi.tv app automation, respectively.\n\n## Appium To The People\n\nIn late 2016, Sauce Labs donated Appium as a project to the JS\nFoundation, in order to cement for the world Sauce's\ncommitment that Appium remains open source. The JS Foundation is a non-profit\nopen source stewardship organization which takes responsibility for holding the\ncopyright for open source projects, as well as ensuring they have a long and\nsuccessful tenure in the community. As a result of our move to a non-profit\nfoundation, we hope that the door will open even more widely for new\ncontributors, either as individuals or representing one of the many companies\nwhich now have an interest in seeing Appium move forward.\n\nEventually, the JS Foundation merged into the [OpenJS Foundation](https://openjsf.org),\nand Appium became an Impact Project in the foundation.\n\n## Appium 2.0\n\nAppium 2 was released in 2023 and introduced an entirely revamped architecture, shifting focus to Appium\nas an ecosystem rather than an all-in-one project. This unlocked the ability for anyone to develop\nand share their own Appium extensions (drivers and plugins), opening up a world of possibilities\nfor automation-related development for platforms far beyond iOS and Android! As a result,\nmany third-party extensions were created, such as new drivers for Flutter and Windows, plugins for\nmocking APIs and managing device farms, new Appium clients based on Rust and Swift, and much more.\n\nAround this time was also when we started a sponsorship program for Appium, which attracted various\nmajor and minor sponsors alike. This allowed us to give back to the Appium community, by compensating\ncontributors for their voluntary work on the project.\n\n## Appium 3.0\n\n2025 saw the release of Appium 3. This update was a lot smaller than Appium 2 and included only a\nfew behavioral changes, instead focusing on removing deprecated code and updating compatibility for\nmore modern ecosystems. Still, this reduced scope was also to be expected: since Appium 2, the\nmain feature development efforts had shifted to individual drivers and plugins, many of which had\ngone through multiple major updates during the Appium 2 era.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/intro/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Appium in a Nutshell\n---\n\nAs mentioned on the main page, Appium aims to support UI automation of many _different platforms_\n(mobile, web, desktop, etc.). Not only that, but it also aims to support automation code written in\n_different languages_ (JS, Java, Python, etc.). Combining all of this functionality in a single\nprogram is a very daunting, if not impossible task!\n\nIn order to achieve this, Appium is effectively split into four parts:\n\n
\n\n- :material-image-filter-center-focus-strong: **Appium Core** - defines the core APIs\n- :material-car: **Drivers** - implement connectivity to specific platforms\n- :octicons-code-16: **Clients** - implement Appium's API in specific languages\n- :fontawesome-solid-plug: **Plugins** - change or extend Appium's core functionality\n\n
\n\nTherefore, in order to start automating something with Appium, you need to:\n\n- Install Appium itself\n- Install a driver for your target platform\n- Install a client library for your target programming language\n- (Optional) install one or more plugins\n\nThese are the basics! If you are ready to jump in, proceed with the [Quickstart](../quickstart/index.md)!\n\nIf you wish to learn more details about how it all works, see these pages for background material:\n\n- [Appium Core](./appium.md)\n- [Appium Drivers](./drivers.md)\n- [Appium Clients](./clients.md)\n\nFinally, to learn about the origins of Appium, check out the [Appium Project History](./history.md).\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/quickstart/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Getting Started\n---\n\n\u3055\u3063\u305d\u304fAppium\u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u3087\u3046\uff01 \u3053\u306e\u30af\u30a4\u30c3\u30af\u30b9\u30bf\u30fc\u30c8\u3092\u3046\u307e\u304f\u4f7f\u3046\u305f\u3081\u306b\u3001[\u306f\u3058\u3081\u306b](../intro/index.md)\u3092\u8aad\u307f\u3001Appium\u306e\u5b9f\u884c\u3084\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u8a18\u8ff0\u306b\u95a2\u308f\u308b\u6982\u5ff5\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002\n\n\u3053\u306e\u30af\u30a4\u30c3\u30af\u30b9\u30bf\u30fc\u30c8\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u9032\u3081\u307e\u3059\uff1a\n\n1. Appium\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\n2. Appium\u30c9\u30e9\u30a4\u30d0\u30fc\u3068\u305d\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\n - \u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u3001[UiAutomator2 driver](https://github.com/appium/appium-uiautomator2-driver) \u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\n3. \u304a\u597d\u307f\u306e\u8a00\u8a9e\u3067Appium\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30fb\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\n - \u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u3001JavaScript\u3001Python\u3001Java\u3001Ruby\u3001.NET\u306e\u4f8b\u3067\u8aac\u660e\u3057\u307e\u3059\n4. \u30b5\u30f3\u30d7\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u305f\u7c21\u5358\u306aAppium\u3067\u306e\u81ea\u52d5\u5316\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4f5c\u6210\u3068\u5b9f\u884c\n\n### \u5fc5\u8981\u6761\u4ef6\n\n\u59cb\u3081\u308b\u524d\u306b\u3001\u304a\u4f7f\u3044\u306e\u30b7\u30b9\u30c6\u30e0\u304c[\u8981\u4ef6](../quickstart/requirements.md) \u3092\u6e80\u305f\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u8ffd\u52a0\u8981\u4ef6\u306b\u3064\u3044\u3066\u306f\u3001UiAutomator2 \u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u5408\u308f\u305b\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u307e\u305f\u3001\u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u57fa\u672c\u7684\u306a\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u3084\u74b0\u5883\u5909\u6570\u306e\u8a2d\u5b9a\u3068\u4fdd\u6301\u306a\u3069\u304c\u3067\u304d\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u307e\u3059\u3002\n\n\u3055\u3042\u3001\u3053\u308c\u3067\u6e96\u5099\u306f\u6574\u3044\u307e\u3057\u305f\uff01 [Appium\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb](./install.md)\u306b\u9032\u3093\u3067\u304f\u3060\u3055\u3044\u3002\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/quickstart/install.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Appium\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\n---\n\n!!! info\n\n```\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u524d\u306b[\u30b7\u30b9\u30c6\u30e0\u8981\u4ef6](./requirements.md)\u3092\u6e80\u305f\u3057\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n```\n\nAppium \u306f `npm` \u3092\u4f7f\u7528\u3057\u3066\u30b0\u30ed\u30fc\u30d0\u30eb\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\uff1a\n\n```bash\nnpm install -g appium\n```\n\n!!! note\n\n```\n\u4ed6\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u306f\u73fe\u5728\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\n```\n\n## Appium\u3092\u5b9f\u884c\u3059\u308b\n\nAppium can be started [using the command line](../reference/cli/index.md):\n\n```\nappium\n```\n\n\u3053\u306e\u30b3\u30de\u30f3\u30c9\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bAppium\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u3059\u3079\u3066\u8aad\u307f\u8fbc\u3080Appium\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30bb\u30b9\u3092\u8d77\u52d5\u3057\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u63a5\u7d9a\uff08\u30c6\u30b9\u30c8\u81ea\u52d5\u5316\u30b9\u30af\u30ea\u30d7\u30c8\u306a\u3069\uff09\u304b\u3089\u65b0\u898f\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u958b\u59cb\u8981\u6c42\u3092\u5f85\u3061\u307e\u3059\u3002\n\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30bb\u30b9\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u72ec\u7acb\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u65b0\u3057\u3044\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u958b\u59cb\u3059\u308b\u524d\u306b\u660e\u793a\u7684\u306b\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n\n\u30b5\u30fc\u30d0\u30fc\u304c\u8d77\u52d5\u3059\u308b\u3068\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u30ed\u30b0\u306b\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u3053\u306e\u30b5\u30fc\u30d0\u30fc\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3067\u304d\u308b\u6709\u52b9\u306aURL\u304c\u3059\u3079\u3066\u30ea\u30b9\u30c8\u3055\u308c\u307e\u3059\uff1a\n\n```\n[Appium] You can provide the following URLs in your client code to connect to this server:\n[Appium] \thttp://127.0.0.1:4723/ (only accessible from the same host)\n(... any other URLs ...)\n```\n\n\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u65b0\u898f\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u8981\u6c42\u3059\u308b\u3068\u3001Appium \u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30bb\u30b9\u306f\u3001\u3053\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u7d42\u4e86\u3059\u308b\u307e\u3067\u3001\u3053\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u306b\u95a2\u3059\u308b\u3059\u3079\u3066\u306e\u8a73\u7d30\u306e\u30ed\u30b0\u8a18\u9332\u3092\u958b\u59cb\u3057\u307e\u3059\u3002 \u899a\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002Appium \u30c6\u30b9\u30c8\u3067\u554f\u984c\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306f\u3001\u3044\u3064\u3067\u3082\u30b5\u30fc\u30d0\u30fc \u30ed\u30b0\u3067\u8a73\u7d30\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\n\n\u6b21\u306f\u4f55\u3067\u3057\u3087\u3046\u304b\uff1f Appium \u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u5b9f\u884c\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u30c9\u30e9\u30a4\u30d0\u30fc\u304c\u30d0\u30f3\u30c9\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u307e\u3060\u4f55\u3082\u81ea\u52d5\u5316\u3067\u304d\u307e\u305b\u3093\u3002 \u305d\u3053\u3067\u3001Android\u5411\u3051\u306b\u81ea\u52d5\u5316\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002[Installing the UiAutomator2 Driver](./uiauto2-driver.md)\u3078\u7d9a\u304f\u3002\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/quickstart/next-steps.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: \u6b21\u306e\u30b9\u30c6\u30c3\u30d7\n---\n\nAndroid\u81ea\u52d5\u5316\u7528\u306e\u30b7\u30b9\u30c6\u30e0\u306e\u8a2d\u5b9a\u3068\u7c21\u5358\u306a\u30c6\u30b9\u30c8\u306e\u5b9f\u884c\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u3053\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u5f15\u304d\u7d9a\u304d\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u7279\u306b\u521d\u5fc3\u8005\u306b\u3068\u3063\u3066\u3001\u3053\u308c\u3089\u306f\u512a\u308c\u305f\u30ac\u30a4\u30c9\u3068\u53c2\u8003\u8cc7\u6599\u3067\u3059\uff1a\n\n- [\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0](../ecosystem/index.md) \u30da\u30fc\u30b8: \u5229\u7528\u53ef\u80fd\u306a\u30c9\u30e9\u30a4\u30d0\u30fc\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u30c4\u30fc\u30eb\u3092\u898b\u308b\n- [Appium \u30c9\u30e9\u30a4\u30d0\u30fc\u3068\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u7ba1\u7406](../guides/managing-exts.md)\n- [Capabilities](../guides/caps.md)\n- [Settings](../guides/settings.md)\n\n\u307e\u305f\u3001[Appium Inspector](https://github.com/appium/appium-inspector) \u306f\u3001\u30a2\u30d7\u30ea\u306e\u8996\u899a\u7684\u306a\u691c\u67fb\u3092\u53ef\u80fd\u306b\u3057\u3001\u30c6\u30b9\u30c8\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u4f7f\u7528\u3059\u308b\u8981\u7d20\u30ed\u30b1\u30fc\u30bf\u30fc\u3092\u898b\u3064\u3051\u308b\u306e\u306b\u5f79\u7acb\u3064\u3001Appium \u30c6\u30b9\u30c8\u306e\u4f5c\u6210\u306b\u4e0d\u53ef\u6b20\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002\n\n\u307e\u305f\u3001\u591a\u304f\u306e\u30aa\u30f3\u30e9\u30a4\u30f3 Appium \u30b3\u30fc\u30b9\u3082\u3054\u6d3b\u7528\u3044\u305f\u3060\u3051\u307e\u3059\u3002\n\n\u9811\u5f35\u3063\u3066\u697d\u3057\u3093\u3067\u304f\u3060\u3055\u3044\uff01\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/quickstart/requirements.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: System Requirements\n---\n\nThe basic requirements for the Appium server are:\n\n- A macOS, Linux, or Windows operating system\n- [Node.js](https://nodejs.org) version in the [SemVer](https://semver.org) range `^20.19.0 || ^22.12.0 || >=24.0.0`\n - LTS is recommended\n- [`npm`](https://npmjs.com) version `>=10` (`npm` is usually bundled with Node.js, but can be upgraded\n independently)\n\nBy itself, Appium is relatively lightweight and doesn't have significant disk space or RAM\nrequirements. It can even be run in resource-constrained environments like Raspberry Pi, so long as\nNode.js is available.\n\n### Driver Requirements\n\nDrivers for automating specific platforms will likely have other requirements. Refer to the\ndocumentation of the [Appium driver(s)](../ecosystem/drivers.md) for that platform for additional\ndependencies. It is almost universally the case that Appium drivers for a given platform will\nrequire the developer toolchain and SDKs for that platform to be installed.\n\nIn order to assist with driver requirements, each (official) driver comes with the Appium Doctor tool,\nwhich allows to verify if all requirements have been set up. Learn more about how to use this tool in\nthe [Command-Line Usage documentation](../reference/cli/extensions.md#doctor).\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/quickstart/test-dotnet.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Write a Test (.NET)\n---\n\nThe [Appium .NET Client](https://github.com/appium/dotnet-client/) is\nan official Appium client in C#. This driver is an extension of the Selenium C# client. It has all the functionalities of the regular driver, but add Appium-specific methods on top of this. The driver is available on the public NuGet Gallery as [Appium.WebDriver](https://www.nuget.org/packages/Appium.WebDriver/).\n\nNow, we get inside the directory and create a new [NUnit](https://nunit.org/) project. We will also add the references to the Appium.Net driver, and other dependencies.\n\n```bash\ncd dotnet-client\ndotnet new nunit --name appiumtest\n\ncd appiumtest\n\n# This will install the latest 5.x version\ndotnet add package Appium.WebDriver --prerelease\ndotnet add package Newtonsoft.Json --version 13.0.3\n```\n\nOnce this is done, your project should have a placeholder file `UnitTest1.cs`. We will replace the code to include the OpenQA namespaces, an initialization of the driver, and the actual test.\n\n```C# title=\"UnitTest1.cs\"\nusing OpenQA.Selenium;\nusing OpenQA.Selenium.Appium;\nusing OpenQA.Selenium.Appium.Android;\nusing OpenQA.Selenium.Appium.Enums;\n\nnamespace appiumtest;\n\npublic class Tests\n{\n private AndroidDriver _driver;\n\n [OneTimeSetUp]\n public void SetUp()\n {\n var serverUri = new Uri(Environment.GetEnvironmentVariable(\"APPIUM_HOST\") ?? \"http://127.0.0.1:4723/\");\n var driverOptions = new AppiumOptions() {\n AutomationName = AutomationName.AndroidUIAutomator2,\n PlatformName = \"Android\",\n DeviceName = \"Android Emulator\",\n };\n\n driverOptions.AddAdditionalAppiumOption(\"appPackage\", \"com.android.settings\");\n driverOptions.AddAdditionalAppiumOption(\"appActivity\", \".Settings\");\n // NoReset assumes the app com.google.android is preinstalled on the emulator\n driverOptions.AddAdditionalAppiumOption(\"noReset\", true);\n\n _driver = new AndroidDriver(serverUri, driverOptions, TimeSpan.FromSeconds(180));\n _driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);\n }\n\n [OneTimeTearDown]\n public void TearDown()\n {\n _driver.Dispose();\n }\n\n [Test]\n public void TestFindApps()\n {\n _driver.StartActivity(\"com.android.settings\", \".Settings\");\n _driver.FindElement(By.XPath(\"//*[@text='Apps']\")).Click();\n }\n}\n```\n\n!!! note\n\n```\nIt's not within the scope of this guide to give a complete run-down on the dotnet client\nlibrary or everything that's happening here, so we'll leave the code itself unexplained in\ndetail for now. You may want to read up particularly on Appium\n[Capabilities](../guides/caps.md) in addition to familiarizing yourself with the\n[dotnet client driver documentation](https://github.com/appium/dotnet-client/) for a fuller explanation\nof the various API commands you see and what their purpose is.\n```\n\nBasically, this code is doing the following:\n\n1. Defining a set of \"Capabilities\" (parameters) to send to the Appium server so Appium knows what\n kind of thing you want to automate. Some of these parameters can be overridden using environment variables.\n2. Starting an Appium session on the built-in Android settings app.\n3. Finding the \"Apps\" list item and clicking it.\n4. Ending the Appium session.\n\nThat's it! Let's give it a try. Before you run the test, make sure that you have an Appium server\nrunning in another terminal session, otherwise you'll get an error about not being able to connect\nto one. Then, you can execute the script:\n\n```bash\ndotnet test\n\n# Example output:\n# Starting test execution, please wait...\n# A total of 1 test files matched the specified pattern.\n\n# Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 323 ms - appiumtest.dll (net7.0)\n```\n\nIf all goes well, you'll see the Settings app open up and navigate to the \"Apps\" view in the emulator before the app closes again.\n\nCongratulations, you've started your Appium journey! Read on for some [next steps](./next-steps.md) to explore.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/quickstart/test-java.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Write a Test (Java)\n---\n\nThe Appium team maintains an official [client](https://github.com/appium/java-client) for the Java programming language.\nIt is built on top of [Selenium](https://github.com/SeleniumHQ/selenium).\nYou can also use this client in your Kotlin projects.\n\nFollow the [Add Appium java client to your test framework](https://github.com/appium/java-client#add-appium-java-client-to-your-test-framework)\ntutorial in order to connect the library to your test framework sources.\n\nThe Appium Java client has dedicated classes to support most of the official Appium drivers. For other drivers\nyou could simply use the [AppiumDriver](https://github.com/appium/java-client/blob/master/src/main/java/io/appium/java_client/AppiumDriver.java) class\nor build your custom derivatives from it. Check the [Drivers Support](https://github.com/appium/java-client#drivers-support)\narticle to learn more about the current driver class implementations.\n\nFollow the [Usage Examples](https://github.com/appium/java-client#usage-examples) article in order understand\nhow to invoke Java client features from your test framework.\n\nOnce you've managed to successfully run a test, you can read on for some [next steps](./next-steps.md) to explore.\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/quickstart/test-js.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Write a Test (JS)\n---\n\nTo write an Appium test in JavaScript (Node.js), we need to choose an Appium-compatible client\nlibrary. The best-maintained library and the one the Appium team recommends using is\n[WebdriverIO](https://webdriver.io), so let's use that. Since we already have Appium installed we\nknow our Node and NPM requirements are already satisfied. So just create a new project directory\nsomewhere on your computer and then initialize a new Node.js project in it:\n\n```bash\nnpm init\n```\n\nIt doesn't really matter what you put in the prompts, just so long as you end up with a valid\n`package.json`.\n\nNow, install the `webdriverio` package via NPM:\n\n```bash\nnpm i --save-dev webdriverio\n```\n\nOnce this is done, your `package.json` file should include a section like the following:\n\n```json title=\"package.json\"\n--8<-- \"./sample-code/quickstarts/js/package.json\"\n```\n\nNow it's time to type up the test itself. Create a new file called `test.js` with the following\ncontents:\n\n```js title=\"test.js\"\n--8<-- \"./sample-code/quickstarts/js/test.js\"\n```\n\n!!! note\n\n```\nIt's not within the scope of this guide to give a complete run-down on the WebdriverIO client\nlibrary or everything that's happening here, so we'll leave the code itself unexplained in\ndetail for now. You may want to read up particularly on Appium\n[Capabilities](../guides/caps.md) in addition to familiarizing yourself with the excellent\n[WebdriverIO documentation](https://webdriver.io/docs/gettingstarted) for a fuller explanation\nof the various API commands you see and what their purpose is.\n```\n\n!!! note\n\n```\nThe sample code is available from [GitHub Appium repository](https://github.com/appium/appium/tree/master/packages/appium/sample-code/quickstarts/js).\n```\n\nBasically, this code is doing the following:\n\n1. Defining a set of \"Capabilities\" (parameters) to send to the Appium server so Appium knows what\n kind of thing you want to automate.\n2. Starting an Appium session on the built-in Android settings app.\n3. Finding the \"Apps\" list item and clicking it.\n4. Pausing for a moment purely for visual effect.\n5. Ending the Appium session.\n\nThat's it! Let's give it a try. Before you run the test, make sure that you have an Appium server\nrunning in another terminal session, otherwise you'll get an error about not being able to connect\nto one. Then, you can execute the script:\n\n```bash\nnode test.js\n```\n\nIf all goes well, you'll see the Settings app open up and navigate to the \"Apps\" view before the\napp closes again.\n\nCongratulations, you've started your Appium journey! Read on for some [next steps](./next-steps.md) to explore.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/quickstart/test-py.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Write a Test (Python)\n---\n\nThe [Appium Python Client](https://github.com/appium/python-client) is\nan official Appium client in Python, which is available via pypi under the [Appium-Python-Client](https://pypi.org/project/Appium-Python-Client/) package name.\nIt inherits from the [Selenium Python Binding](https://pypi.org/project/selenium/),\nso installing the Appium Python Client includes the selenium binding.\n\n```bash\npip install Appium-Python-Client\n```\n\nThis example uses Python's built-in `unittest` module, though you can use any Python test framework you want.\nThe Appium Python client adds the `appium:` vendor prefix automatically.\nYou usually do not need to worry about the prefix.\n\n```python title=\"test.py\"\n--8<-- \"./sample-code/quickstarts/py/test.py\"\n```\n\n!!! note\n\n```\nIt's not within the scope of this guide to give a complete run-down on the Python client\nlibrary or everything that's happening here, so we'll leave the code itself unexplained in detail for now.\n\n- You may want to read up particularly on Appium [Capabilities](../guides/caps.md).\n- [functional test code](https://github.com/appium/python-client/tree/master/test/functional) in Python Client GitHub repository should help to find more working example.\n- [Documentation](https://appium.github.io/python-client-sphinx/) also helps to find methods\ndefined in the Appium Python Client.\n```\n\n!!! note\n\n```\nThe sample code is available from [GitHub Appium repository](https://github.com/appium/appium/tree/master/packages/appium/sample-code/quickstarts/py).\n```\n\nBasically, this code is doing the following:\n\n1. Defining a set of \"Capabilities\" (parameters) to send to the Appium server so Appium knows what\n kind of thing you want to automate.\n2. Starting an Appium session on the built-in Android settings app.\n3. Finding the \"Apps\" list item and clicking it.\n4. Pausing for a moment purely for visual effect.\n5. Ending the Appium session.\n\nThat's it! Let's give it a try. Before you run the test, make sure that you have an Appium server\nrunning in another terminal session, otherwise you'll get an error about not being able to connect\nto one. Then, you can execute the script:\n\n```bash\npython test.py\n```\n\nIf all goes well, you'll see the Settings app open up and navigate to the \"Apps\" view before the\napp closes again.\n\nCongratulations, you've started your Appium journey! Read on for some [next steps](./next-steps.md) to explore.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/quickstart/test-rb.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Write a Test (Ruby)\n---\n\nThe [AppiumLib](https://github.com/appium/ruby_lib) and the [AppiumLibCore](https://github.com/appium/ruby_lib_core) (**recommended**) are official Appium client libraries in Ruby, which are available via gem under the [appium_lib](https://rubygems.org/gems/appium_lib) and the [appium_lib_core](https://rubygems.org/gems/appium_lib_core) package names. The appium_lib_core inherits from the Selenium Ruby Binding, and the appium_lib inherits from the appium_lib_core, so installing these libraries include the selenium binding. We recommend `appium_lib_core` if you need a less complex client-side solution. The `appium_lib` has some useful methods the core does not have, but for the cost of greater complexity and historical methods which may not work in the latest environment.\n\nAs the first step, let's initialize a Gemfile to manage the dependency:\n\n```bash\nbundle init\n```\n\nThen, you could add Appium Ruby Client dependency as below:\n\n```bash\nbundle add appium_lib_core\n# or\n# bundle add appium_lib\n```\n\nTest code example below uses `test-unit` module, thus please run:\n\n```bash\nbundle add test-unit\n```\n\nOnce these steps has done, your `Gemfile` file should include:\n\n```ruby title=\"Gemfile\"\n--8<-- \"./sample-code/quickstarts/rb/Gemfile\"\n```\n\nThe `appium_lib_core` is the main part as an Appium client.\n`appium_lib` has various helper methods, but the driver instance was ordinary designed to be used as a global variable. It could causes an issue to handle the instance.\n`appium_lib_core` does not have such a global variable.\n\nThis example is by the `appium_lib_core` with `test-unit` gem module.\nTes code in `appium_lib` should be similar.\n\n```ruby title=\"test.rb\"\n--8<-- \"./sample-code/quickstarts/rb/test.rb\"\n```\n\n!!! note\n\n```\nIt's not within the scope of this guide to give a complete run-down on the Ruby client\nlibrary or everything that's happening here, so we'll leave the code itself unexplained in detail for now.\n\n- You may want to read up particularly on Appium [Capabilities](../guides/caps.md).\n- [functional test code](https://github.com/appium/ruby_lib_core/tree/master/test/functional) in the appium_lib_core GitHub repository should help to find more working example.\n- Documentation [appium_lib_core](https://www.rubydoc.info/github/appium/ruby_lib_core) and [appium_lib](https://www.rubydoc.info/github/appium/ruby_lib) also helps to find available methods.\n```\n\n!!! note\n\n```\nThe sample code is available from [GitHub Appium repository](https://github.com/appium/appium/tree/master/packages/appium/sample-code/quickstarts/rb).\n```\n\nBasically, this code is doing the following:\n\n1. Defining a set of \"Capabilities\" (parameters) to send to the Appium server so Appium knows what\n kind of thing you want to automate.\n2. Starting an Appium session on the built-in Android settings app.\n3. Finding the \"Apps\" list item and clicking it.\n4. Pausing for a moment purely for visual effect.\n5. Ending the Appium session.\n\nThat's it! Let's give it a try. Before you run the test, make sure that you have an Appium server\nrunning in another terminal session, otherwise you'll get an error about not being able to connect\nto one. Then, you can execute the script:\n\n```bash\n# Please run \"bundle install\" first if your environment has not run the installation command yet.\nbundle exec ruby test.rb\n```\n\nIf all goes well, you'll see the Settings app open up and navigate to the \"Apps\" view before the\napp closes again.\n\nCongratulations, you've started your Appium journey! Read on for some [next steps](./next-steps.md) to explore.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/quickstart/uiauto2-driver.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Install the UiAutomator2 Driver\n---\n\nYou can't do much with Appium unless you have a [driver](../intro/drivers.md), which is an\ninterface that allows Appium to automate a particular platform.\n\n!!! info\n\n```\nFor this quickstart guide, we're going to be automating an app on the Android platform, because\nthe system requirements for Android automation via Appium are the same as for Appium itself\n(whereas the iOS driver, for example, requires you to be using macOS).\n```\n\nThe driver we're going to use is called the UiAutomator2\nDriver. It's worth visiting that driver's\ndocumentation and bookmarking it, because it will be an invaluable reference down the line.\n\n## Set up Android automation requirements\n\nAccording to the driver, in addition to a working Appium server, we also need to set up the following:\n\n### Android SDK\n\n- The easiest way to set up the Android SDK requirements is by downloading [Android Studio](https://developer.android.com/studio).\n We need to use its SDK manager (_Settings -> Languages & Frameworks -> Android SDK_)\n to download the following items:\n - Android SDK Platform (select whichever Android platform we want to automate, for example, API level 30)\n - Android SDK Platform-Tools\n- If you wish, you can also download these items without Android Studio:\n - Android SDK Platform can be downloaded using `sdkmanager` included in [Android command-line tools](https://developer.android.com/studio#command-line-tools-only)\n - [Android SDK Platform-Tools](https://developer.android.com/tools/releases/platform-tools)\n- Set up the `ANDROID_HOME` environment variable to point to the directory where the Android SDK is\n installed. You can usually find the path to this directory in the Android Studio SDK manager. It\n will contain the `platform-tools` and other directories.\n\n### Java JDK\n\n- Install the Java JDK (for the most recent Android API levels, JDK 9 is required, otherwise JDK\n 8 is required). You can download this from [Oracle](https://jdk.java.net/) or [Adoptium](https://adoptium.net/en-GB/temurin/releases/).\n Make sure you get the JDK and not the JRE.\n- Set up the `JAVA_HOME` environment variable to point to the JDK home directory. It will contain\n the `bin`, `include`, and other directories.\n\n### Prepare the Device\n\n- If using an emulator, use Android Studio to create and launch an Android Virtual Device (AVD).\n You may need to download the system images for the API level of the emulator you want to\n create. Using the AVD creation wizard in Android Studio is generally the easiest way to do all of\n this.\n- If using a real device, you should [set it up for development and enable USB Debugging](https://developer.android.com/studio/debug/dev-options).\n- With the emulator or device connected, you can run `adb devices` (via the binary located at\n `$ANDROID_HOME/platform-tools/adb`) to verify that your device shows up as connected.\n\nOnce your device shows up as connected in `adb`, and you've verified that the environment variables\nare set up correctly, you should be good to go! If you ran into problems with any of these steps,\nrefer to the driver documentation, or the various Android or Java documentation sites as necessary.\n\nAlso, congratulations: whether or not you intended to, you now have the Android developer toolchain\nset up on your system, so you can get busy making Android apps if you want!\n\n## Install the driver itself\n\n### Standard Install\n\nLike all Appium drivers, the UiAutomator2 driver is installed via the [Appium Extension CLI](../reference/cli/extensions.md).\nSince UiAutomator2 is maintained by the core Appium team, it has an 'official' driver name\n(`uiautomator2`), which makes the installation simpler.\n\nBefore installing, make sure your Appium server is _not_ running (if it is, quit it with _Ctrl-C_).\nThen run the following command:\n\n```bash\nappium driver install uiautomator2\n```\n\nIt should produce output that looks something like:\n\n```\nAttempting to find and install driver 'uiautomator2'\n\u2714 Installing 'uiautomator2' using NPM install spec 'appium-uiautomator2-driver'\nDriver uiautomator2@2.0.5 successfully installed\n- automationName: UiAutomator2\n- platformNames: [\"Android\"]\n```\n\nNote how the installation process specifies what platforms is the driver valid for (in this case,\n`Android`), and what automation name (the `appium:automationName` [capability](../guides/caps.md))\nmust be used to select this driver for use during an Appium session (in this case, `UiAutomator2`).\n\n!!! note\n\n```\nIn this quickstart we have used the [Extension CLI](../reference/cli/extensions.md) to install the\nUiAutomator2 driver, but if you are incorporating Appium into a Node.js project, you might\nprefer to use `npm` to manage Appium and its connected drivers. To learn more about this\ntechnique, visit the guide on [managing Appium extensions](../guides/managing-exts.md).\n```\n\n### Batch Install\n\nYou may want to use Appium with more than one driver. One way to accomplish this is to run\n`appium driver install ` for each individual driver, but you can also install multiple\ndrivers in one go:\n\n```\nappium setup\n```\n\nRunning this will install Appium's mobile-specific drivers: UiAutomator2, [XCUITest](https://appium.github.io/appium-xcuitest-driver/)\n(only if running macOS), and [Espresso](https://github.com/appium/appium-espresso-driver).\n\nYou can also use this command to batch install drivers for desktop applications or desktop browsers.\nFor more details on this, refer to the [Setup command documentation](../reference/cli/setup.md).\n\n### Validating the Install\n\nThe UiAutomator2 driver, like all official Appium drivers, comes with the Appium Doctor tool, which\nallows validating whether all prerequisites have been set up correctly:\n\n```\nappium driver doctor uiautomator2\n```\n\nThis guide has focused on essential requirements, so Appium Doctor may suggest one or more optional\nfixes. But if you see `0 required fixes needed`, that means everything is set up!\n\nNow, start the Appium server again (run `appium`), and you should see that the newly-installed\ndriver is listed as available:\n\n```\n[Appium] Available drivers:\n[Appium] - uiautomator2@2.0.5 (automationName 'UiAutomator2')\n```\n\nWith the Android setup complete and the UiAutomator2 driver installed, you're ready to write your\nfirst test! Now select your preferred language and give it a shot:\n\n
\n\n- :material-language-javascript: [**JavaScript**](./test-js.md)\n- :material-language-java: [**Java**](./test-java.md)\n- :material-language-python: [**Python**](./test-py.md)\n- :material-language-ruby: [**Ruby**](./test-rb.md)\n- :material-dot-net: [**.NET C#**](./test-dotnet.md)\n\n
\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/reference/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Reference\n---\n\nThis section of the Appium documentation provides a reference to the two main interfaces within the\nAppium server: the command-line executable, and the supported API endpoints.\n\n
\n\n- :octicons-command-palette-16: [**Command Line Interface**](./cli/index.md)\n\n ---\n\n Learn how to use the Appium command-line executable\n\n- :material-cloud-braces: [**API Endpoints**](./api/index.md)\n\n ---\n\n View endpoints supported by the Appium server\n\n
\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/reference/api/appium.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Protocol\n---\n\n\n\nThe following is a list of endpoints supported in Appium, that are defined in the Appium extension\nof the W3C WebDriver protocol.\n\n### getAppiumSessions\n\n```\nGET /appium/sessions\n```\n\nRetrieves information about all active server sessions.\n\n!!! info\n\n The `session_discovery` [insecure feature](../../guides/security.md) must be enabled to use this endpoint.\n\n#### Response\n\n`TimestampedMultiSessionData[]` - an array of session data objects. Each object has the following properties:\n\n| Name | Description | Type |\n| -------------- | ------------------------------------------------------------------------------ | ------ |\n| `capabilities` | Session capabilities | object |\n| `created` | Session creation time (in milliseconds) as a Unix timestamp | number |\n| `id` | Session ID | string |\n\n### getAppiumSessionCapabilities\n\n```\nGET /session/:sessionId/appium/capabilities\n```\n\nRetrieves the [session capabilities](../../guides/caps.md).\n\n#### Response\n\n`SessionCapabilities` - an object with the following properties:\n\n| Name | Description | Type |\n| -------------- | -------------------- | ------ |\n| `capabilities` | Session capabilities | object |\n\n### getSettings\n\n```\nGET /session/:sessionId/appium/settings\n```\n\nRetrieves the [current session settings](../../guides/settings.md).\n\n#### Response\n\n`Settings` - an object containing setting names and their values\n\n### updateSettings\n\n```\nPOST /session/:sessionId/appium/settings\n```\n\nUpdates the specified session settings. Any other previously set settings will remain unchanged.\n\n#### Parameters\n\n| Name | Description | Type |\n| ---------- | -------------------------------------------------------------------- | ------ |\n| `settings` | Object containing the names and values of the settings to be updated | object |\n\n#### Response\n\n`null`\n\n### listCommands\n\n```\nGET /session/:sessionId/appium/commands\n```\n\nRetrieves the URL endpoints and WebDriver BiDi commands supported in the current session.\n\n#### Response\n\n`ListCommandsResponse` - an object containing all supported endpoints and BiDi commands, grouped by\ntheir origin (base Appium, driver-specific, or plugin-specific). Refer to [the type definition file](https://github.com/appium/appium/blob/master/packages/types/lib/command.ts)\nfor a detailed structure of this object.\n\n### listExtensions\n\n```\nGET /session/:sessionId/appium/extensions\n```\n\nRetrieves the [execute methods](../../guides/execute-methods.md) supported in the current session.\n\n#### Response\n\n`ListExtensionsResponse` - an object containing all supported execute methods, grouped by their\norigin (driver-specific or plugin-specific). Refer to [the type definition file](https://github.com/appium/appium/blob/master/packages/types/lib/command.ts)\nfor a detailed structure of this object.\n\n### getLogEvents\n\n```\nPOST /session/:sessionId/appium/events\n```\n\nRetrieves events that have occurred in the current session. By default, only driver command\nexecutions are recorded in the log, but drivers or plugins may define additional event types.\nClients can log events by using the [`logCustomEvent`](#logcustomevent) endpoint.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------- | ----------------------------------------------- | ----------------------- |\n| `type?` | One or more types to filter the returned events | string or array |\n\n#### Response\n\n`EventHistory` - an object whose keys correspond to the types of logged events. Event types can be\ngrouped into three categories, as shown by the following example response:\n\n```json\n{\n \"commands\": [\n { \"cmd\": \"getStatus\", \"startTime\": 1756887645447, \"endTime\": 1756887645454 }\n ],\n \"driverevent\": [1756887645454],\n \"namespace:event\": [1756887645454]\n}\n```\n\n- The `commands` key is always included in the endpoint response. Its value is an array of objects,\n where each object includes 3 parameters:\n - `cmd`: name of the executed command\n - `startTime`: the command execution start time (in milliseconds), as a Unix timestamp\n - `endTime`: the command execution end time (in milliseconds), as a Unix timestamp\n- Other non-namespaced keys are specific to driver/plugin implementations. Their value is an array\n of event times (in milliseconds), as Unix timestamps.\n- Namespaced keys can be added using the `logCustomEvent` endpoint, but may also be provided by\n drivers/plugins. Their value is an array of event times (in milliseconds), as Unix timestamps.\n\n### logCustomEvent\n\n```\nPOST /session/:sessionId/appium/log_event\n```\n\nLogs a custom event, which can be retrieved using the [`getLogEvents`](#getlogevents) endpoint.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | -------------------------------------------------------------------------- | ------ |\n| `vendor` | Name of the namespace (vendor) used to prefix the event | string |\n| `event` | Name of the event | string |\n\n#### Response\n\n`null`\n\n### getDeviceTime\n\n```\nPOST /session/:sessionId/appium/device/system_time\n```\n\nRetrieves the current system time of the device under test.\n\n#### Parameters\n\n| Name | Description | Type | Default |\n| --------- | ---------------------------------------- | ------ | ---------------------- |\n| `format?` | Format to use for the returned timestamp | string | `YYYY-MM-DDTHH:mm:ssZ` |\n\n#### Response\n\n`string` - the device time\n\n### activateApp\n\n```\nPOST /session/:sessionId/appium/device/activate_app\n```\n\nActivates an app on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------------------- | ----------------------------------------------------------- | ------- |\n| `appId` or `bundleId` | App identifier such as Android app package or iOS bundle ID | string |\n| `options?` | Driver-specific launch options | unknown |\n\n#### Response\n\n`void`\n\n### terminateApp\n\n```\nPOST /session/:sessionId/appium/device/terminate_app\n```\n\nTerminates an app on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------------------- | ----------------------------------------------------------- | ------- |\n| `appId` or `bundleId` | App identifier such as Android app package or iOS bundle ID | string |\n| `options?` | Driver-specific termination options | unknown |\n\n#### Response\n\n`void`\n\n### queryAppState\n\n```\nPOST /session/:sessionId/appium/device/app_state\n```\n\nRetrieves the state of an app on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------------------- | ----------------------------------------------------------- | ------ |\n| `appId` or `bundleId` | App identifier such as Android app package or iOS bundle ID | string |\n\n#### Response\n\n`number` - an integer value indicating the app state:\n\n| Number | App State |\n| ------ | ------------------------------- |\n| `0` | Not installed |\n| `1` | Not running |\n| `2` | Running in background suspended |\n| `3` | Running in background |\n| `4` | Running in foreground |\n\n### installApp\n\n```\nPOST /session/:sessionId/appium/device/install_app\n```\n\nInstalls an app on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| ---------- | --------------------------------------------- | ------- |\n| `appPath` | Absolute local filepath or URL to an app file | string |\n| `options?` | Driver-specific install options | unknown |\n\n#### Response\n\n`void`\n\n### removeApp\n\n```\nPOST /session/:sessionId/appium/device/remove_app\n```\n\nUninstalls an app from the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------------------- | ----------------------------------------------------------- | ------- |\n| `appId` or `bundleId` | App identifier such as Android app package or iOS bundle ID | string |\n| `options?` | Driver-specific uninstall options | unknown |\n\n#### Response\n\n`boolean` - `true` if uninstall was successful, otherwise `false`\n\n### isAppInstalled\n\n```\nPOST /session/:sessionId/appium/device/app_installed\n```\n\nDetermines if an app is installed on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------------------- | ----------------------------------------------------------- | ------ |\n| `appId` or `bundleId` | App identifier such as Android app package or iOS bundle ID | string |\n\n#### Response\n\n`boolean` - `true` if app is installed, otherwise `false`\n\n### hideKeyboard\n\n```\nPOST /session/:sessionId/appium/device/hide_keyboard\n```\n\nAttempts to hide the virtual keyboard on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| ----------- | --------------------------------------------------- | ------ |\n| `key?` | Text of a key to use to hide the keyboard | string |\n| `keyCode?` | Key code to trigger to hide the keyboard | string |\n| `keyName?` | Name of a key to use to hide the keyboard | string |\n| `strategy?` | Driver-specific name of a hiding strategy to follow | string |\n\n#### Response\n\n`boolean` - `true` if the operation was successful, otherwise `false`. Note that some platforms\nmay never return a `false` value.\n\n### isKeyboardShown\n\n```\nGET /session/:sessionId/appium/device/is_keyboard_shown\n```\n\nDetermines if the virtual keyboard is shown on the device under test.\n\n#### Response\n\n`boolean` - `true` if the keyboard is shown, otherwise `false`\n\n### pushFile\n\n```\nPOST /session/:sessionId/appium/device/push_file\n```\n\nPushes data to a file on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ----------------------------------------------- | ------ |\n| `data` | Base64-encoded data to be written to the file | string |\n| `path` | Remote path on the device to create the file at | string |\n\n#### Response\n\n`void`\n\n### pullFile\n\n```\nPOST /session/:sessionId/appium/device/pull_file\n```\n\nRetrieves data from a file on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ------------------------------------- | ------ |\n| `path` | Remote path of the file on the device | string |\n\n#### Response\n\n`string` - the Base64-encoded contents of the file\n\n### pullFolder\n\n```\nPOST /session/:sessionId/appium/device/pull_folder\n```\n\nRetrieves data from a directory on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ------------------------------------------ | ------ |\n| `path` | Remote path of the directory on the device | string |\n\n#### Response\n\n`string` - the Base64-encoded zip file of the directory contents\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/reference/api/bidi.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: WebDriver BiDi Protocol\n---\n\n\n\nThe following is a list of [W3C WebDriver BiDi protocol](https://w3c.github.io/webdriver-bidi/)\ncommands supported in Appium.\n\nUnlike other protocols that specify URL endpoints, the WebDriver BiDi protocol specifies commands\nsent as a websocket event, that both drivers and clients can emit or listen to.\n\n### bidiStatus\n\n```\nsession.status\n```\n\n> WebDriver BiDi documentation: [session.status](https://w3c.github.io/webdriver-bidi/#command-session-status)\n\nRetrieves the current status of the Appium server.\n\n#### Response\n\n[`GetStatusResult`](./webdriver.md#response_2)\n\n### bidiSubscribe\n\n```\nsession.subscribe\n```\n\n> WebDriver BiDi documentation: [session.subscribe](https://w3c.github.io/webdriver-bidi/#command-session-subscribe)\n\nSubscribes to one or more BiDi events.\n\n#### Parameters\n\n| Name | Description | Type | Default |\n| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ------- |\n| `contexts?` | Contexts in which to subscribe to the specified events. By default, the global context scope is applied. | string[] | `['']` |\n| `events` | Names of events to subscribe to | string[] | |\n\n#### Response\n\n`null`\n\n### bidiUnsubscribe\n\n```\nsession.unsubscribe\n```\n\n> WebDriver BiDi documentation: [session.unsubscribe](https://w3c.github.io/webdriver-bidi/#command-session-unsubscribe)\n\nUnsubscribes from one or more BiDi events.\n\n#### Parameters\n\n| Name | Description | Type | Default |\n| ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------ | ------- |\n| `contexts?` | Contexts in which to unsubscribe from the specified events. By default, the global scope is applied. | string[] | `['']` |\n| `events` | Names of events to unsubscribe from | string[] | |\n\n#### Response\n\n`null`\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/reference/api/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: API Endpoints\n---\n\nHere you can find various API endpoints exposed by the main Appium module through its base driver,\nas well as the endpoints added or modified by official plugins.\n\nSince all Appium drivers inherit the Appium base driver, they support all of its endpoints as well,\nbut may additionally define endpoints of their own. Refer to the documentation of your\n[Appium driver](../../ecosystem/drivers.md) to learn about its specific endpoints.\n\nThe recommended way of calling these API endpoints is through your [Appium client](../../ecosystem/clients.md).\nRefer to the documentation of your client for the exact commands used to invoke specific endpoints.\n\nAll endpoints are grouped by their protocol, with an additional group for plugin endpoints:\n\n
\n\n- [**WebDriver Protocol**](./webdriver.md)\n- [**WebDriver BiDi Protocol**](./bidi.md)\n- [**JSON Wire Protocol**](./jsonwp.md)\n- [**Mobile JSON Wire Protocol**](./mjsonwp.md)\n- [**Appium Protocol**](./appium.md)\n- [**Other Protocols**](./others.md)\n- [**Endpoints Used by Official Plugins**](./plugins.md)\n\n
\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/reference/api/jsonwp.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: JSON Wire Protocol\n---\n\n\n\nThe following is a list of legacy [JSON Wire Protocol (JSONWP)](https://www.selenium.dev/documentation/legacy/json_wire_protocol/)\nendpoints supported in Appium.\n\n### getSession\n\n```\nGET /session/:sessionId\n```\n\n> JSONWP documentation: [/session/:sessionId](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionid)\n\nRetrieves the capabilities of the current session.\n\nAppium implements a modified version of this endpoint. If the `appium:eventTimings` capability is\nset to `true`, the returned result will additionally include the `events` key, whose value contains\nthe event history and timings.\n\n!!! warning \"Deprecated\"\n\n For retrieving capabilities, please use [`getAppiumSessionCapabilities`](./appium.md#getappiumsessioncapabilities).
\n For retrieving event history, please use [`getLogEvents`](./appium.md#getlogevents).\n\n#### Response\n\n`Capabilities` - an object containing the session capabilities, and the event history (if applicable)\n\n### availableIMEEngines\n\n```\nGET /session/:sessionId/ime/available_engines\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/available_engines](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimeavailable_engines)\n\nRetrieves all IME (input method editor) engines available on the device under test.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the [UiAutomator2 and Espresso drivers](../../ecosystem/drivers.md)\n\n#### Response\n\n`string[]` - a list of available IME engines\n\n### getActiveIMEEngine\n\n```\nGET /session/:sessionId/ime/active_engine\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/active_engine](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimeactive_engine)\n\nRetrieves the name of the active IME engine.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers\n\n#### Response\n\n`string` - the name of the active IME engine\n\n### isIMEActivated\n\n```\nGET /session/:sessionId/ime/activated\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/activated](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimeactivated)\n\nDetermines if IME input is available and active.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers\n\n#### Response\n\n`boolean` - `true` if IME is active, otherwise `false`\n\n### deactivateIMEEngine\n\n```\nPOST /session/:sessionId/ime/deactivate\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/deactivate](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimedeactivate)\n\nDeactivates the currently active IME engine.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers\n\n#### Response\n\n`null`\n\n### activateIMEEngine\n\n```\nPOST /session/:sessionId/ime/activate\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/activate](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimeactivate)\n\nActivates an IME engine.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | ---------------------------------- | ------ |\n| `engine` | Name of the IME engine to activate | string |\n\n#### Response\n\n`null`\n\n### getOrientation\n\n```\nGET /session/:sessionId/orientation\n```\n\n> JSONWP documentation: [/session/:sessionId/orientation](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidorientation)\n\nRetrieves the current orientation of the device under test.\n\n#### Response\n\n`string` - either `PORTRAIT` or `LANDSCAPE`\n\n### setOrientation\n\n```\nPOST /session/:sessionId/orientation\n```\n\n> JSONWP documentation: [/session/:sessionId/orientation](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidorientation)\n\nSets the orientation of the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------------- | ------------------------------------------------------------------------------------------------------- | ------ |\n| `orientation` | New device orientation. Supported values are `PORTRAIT` or `LANDSCAPE`. | string |\n\n#### Response\n\n`null`\n\n### getGeoLocation\n\n```\nGET /session/:sessionId/location\n```\n\n> JSONWP documentation: [/session/:sessionId/location](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidlocation)\n\nRetrieves the current location of the device under test.\n\n!!! warning \"Deprecated\"\n\n Please use driver-specific extension methods such as `mobile: getGeoLocation` or\n `mobile: getSimulatedLocation`\n\n#### Response\n\n`Location` - an object with the following properties:\n\n| Name | Description | Type |\n| ----------- | -------------------------------- | ------ |\n| `altitude` | Altitude of the device location | number |\n| `latitude` | Latitude of the device location | number |\n| `longitude` | Longitude of the device location | number |\n\n### setGeoLocation\n\n```\nPOST /session/:sessionId/location\n```\n\n> JSONWP documentation: [/session/:sessionId/location](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidlocation)\n\nSets the current location of the device under test.\n\n!!! warning \"Deprecated\"\n\n Please use driver-specific extension methods such as `mobile: setGeoLocation` or\n `mobile: setSimulatedLocation`\n\n#### Parameters\n\n| Name | Description | Type |\n| ---------- | ------------------------------------------- | ------------------------- |\n| `location` | New device latitude, longitude and altitude | [`Location`](#response_6) |\n\n#### Response\n\n`null`\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/reference/api/mjsonwp.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Mobile JSON Wire Protocol\n---\n\n\n\nThe following is a list of legacy [Mobile JSON Wire Protocol (MJSONWP)](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md)\nendpoints supported in Appium.\n\n### getRotation\n\n```\nGET /session/:sessionId/rotation\n```\n\n> MJSONWP documentation: [Device Rotation](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-rotation)\n\nRetrieves the current spatial orientation of the device under test.\n\n#### Response\n\n`Rotation` - an object with the following properties:\n\n| Name | Description | Type |\n| ---- | ---------------------------------------------------- | ------ |\n| `x` | Degrees by which the device is rotated on its X axis | number |\n| `y` | Degrees by which the device is rotated on its Y axis | number |\n| `z` | Degrees by which the device is rotated on its Z axis | number |\n\n### setRotation\n\n```\nPOST /session/:sessionId/rotation\n```\n\n> MJSONWP documentation: [Device Rotation](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-rotation)\n\nSets the spatial orientation of the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| ---- | ---------------------------------------------------- | ------ |\n| `x` | Degrees by which the device is rotated on its X axis | number |\n| `y` | Degrees by which the device is rotated on its Y axis | number |\n| `z` | Degrees by which the device is rotated on its Z axis | number |\n\n#### Response\n\n`null`\n\n### getCurrentContext\n\n```\nGET /session/:sessionId/context\n```\n\n> MJSONWP documentation: [Webviews and Other Contexts](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts)\n\nRetrieves the active application context.\n\n#### Response\n\n`string` - the name of the active context\n\n### setContext\n\n```\nPOST /session/:sessionId/context\n```\n\n> MJSONWP documentation: [Webviews and Other Contexts](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts)\n\nSets an application context as the active context.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | -------------------------------------------- | ------ |\n| `name` | Name of the context to set as the active one | string |\n\n#### Response\n\n`null`\n\n### getContexts\n\n```\nGET /session/:sessionId/contexts\n```\n\n> MJSONWP documentation: [Webviews and Other Contexts](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts)\n\nRetrieves all available application contexts.\n\n#### Response\n\n`string[]` - the names of available contexts\n\n### getNetworkConnection\n\n```\nGET /session/:sessionId/network_connection\n```\n\n> MJSONWP documentation: [Device Modes](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes)\n\nRetrieves the current state of network types (data, Wi-Fi, airplane mode).\n\n!!! warning \"Deprecated\"\n\n Please use driver-specific extension methods such as `mobile: getConnectivity`\n\n#### Response\n\n`NetworkConnectionState` - a number indicating the current network state:\n\n| Value | Data | Wi-Fi | Airplane Mode |\n| ----- | ---- | ----- | ------------- |\n| `0` | OFF | OFF | OFF |\n| `1` | OFF | OFF | ON |\n| `2` | OFF | ON | OFF |\n| `4` | ON | OFF | OFF |\n| `6` | ON | ON | OFF |\n\n### setNetworkConnection\n\n```\nPOST /session/:sessionId/network_connection\n```\n\n> MJSONWP documentation: [Device Modes](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes)\n\nSets the state of network types (data, Wi-Fi, airplane mode).\n\n!!! warning \"Deprecated\"\n\n Please use driver-specific extension methods such as `mobile: setConnectivity`\n\n#### Parameters\n\n|
Name
| Description |
Type
|\n| --------------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------- |\n| `parameters` | Object containing the `type` key, whose value is the desired network state | `{\"type\": `[`NetworkConnectionState`](#response_5)`}` |\n\n#### Response\n\n[`NetworkConnectionState`](#response_5) - the new network state\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/reference/api/others.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Other Protocols\n---\n\n\n\nThe following is a list of endpoints supported in Appium that are defined in other protocols.\n\n## Chromedriver Protocol\n\nThe Chromedriver protocol is an extension of the W3C WebDriver protocol, supported in Appium\nclients using Chromedriver. It specifies both its own extension commands, as well as\nvendor-agnostic commands.\n\n!!! warning\n\n Endpoints specified by this protocol are not officially documented.\n\n### executeCdp\n\n```\nPOST /session/:sessionId/:vendor/cdp/execute\n```\n\nExecutes a Chrome DevTools Protocol (CDP) method, using the implementation of the vendor identified\nby `:vendor`. Refer to [the CDP documentation](https://chromedevtools.github.io/devtools-protocol/)\nfor a list of available methods and their parameters.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | ----------------------------------- | ------ |\n| `cmd` | Name of the CDP method to execute | string |\n| `params` | Parameters passed to the CDP method | object |\n\n#### Response\n\n`any` - the result of executing the CDP method\n\n## Compute Pressure Protocol\n\nThe [Compute Pressure protocol](https://www.w3.org/TR/compute-pressure/) is an extension of the W3C\nWebDriver protocol.\n\n### createVirtualPressureSource\n\n```\nPOST /session/:sessionId/pressuresource\n```\n\n> Compute Pressure documentation: [Create Virtual Pressure Source](https://www.w3.org/TR/compute-pressure/#create-virtual-pressure-source)\n\nCreates a new virtual pressure source.\n\n#### Parameters\n\n|
Name
| Description | Type | Default |\n| --------------------------------- | ------------------------------------------------------------- | ------- | ------- |\n| `type` | Type of pressure source to create | string | |\n| `supported?` | Whether the pressure source should be configured as supported | boolean | `true` |\n\n#### Response\n\n`null`\n\n### updateVirtualPressureSource\n\n```\nPOST /session/:sessionId/pressuresource/:pressureSourceType\n```\n\n> Compute Pressure documentation: [Update Virtual Pressure Source](https://www.w3.org/TR/compute-pressure/#update-virtual-pressure-source)\n\nUpdates the state of a virtual pressure source with the type identified by `:pressureSourceType`.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | ----------------------------------------------------------------------------------------------------------------- | ------ |\n| `sample` | Pressure state. Supported values are `nominal`, `fair`, `serious`, or `critical`. | string |\n\n#### Response\n\n`null`\n\n### deleteVirtualPressureSource\n\n```\nDELETE /session/:sessionId/pressuresource/:pressureSourceType\n```\n\n> Compute Pressure documentation: [Delete Virtual Pressure Source](https://www.w3.org/TR/compute-pressure/#delete-virtual-pressure-source)\n\nDeletes the virtual pressure source with the type identified by `:pressureSourceType`.\n\n#### Response\n\n`null`\n\n## Custom Handlers Protocol\n\nThe [Custom Handlers protocol](https://html.spec.whatwg.org/multipage/system-state.html#user-agent-automation)\nis an extension of the W3C WebDriver protocol, defined by the HTML Standard specification.\n\n### setRPHRegistrationMode\n\n```\nPOST /session/:sessionId/custom-handlers/set-mode\n```\n\n> Custom Handlers documentation: [Set RPH Registration Mode](https://html.spec.whatwg.org/multipage/system-state.html#user-agent-automation)\n\nSets the protocol handler automation mode, for processing registrations of custom protocol handlers.\nBy default, this mode is set to `none`.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ------------------------------------------------------------------------------------------------------------------- | ------ |\n| `mode` | Automation mode to set. Supported values are `autoAccept`, `autoReject`, or `none`. | string |\n\n#### Response\n\n`null`\n\n## Device Posture Protocol\n\nThe [Device Posture protocol](https://www.w3.org/TR/device-posture/) is an extension of the W3C\nWebDriver protocol.\n\n### setDevicePosture\n\n```\nPOST /session/:sessionId/deviceposture\n```\n\n> Device Posture documentation: [Set Device Posture](https://www.w3.org/TR/device-posture/#set-device-posture)\n\nSets the device posture, overriding the posture set by the device hardware.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------- | ------------------------------------------------------------------------------------------------------------------------- | ------ |\n| `posture` | Posture to which the device should be set. Supported values are `continuous` or `folded`. | string |\n\n#### Response\n\n`null`\n\n### clearDevicePosture\n\n```\nDELETE /session/:sessionId/deviceposture\n```\n\n> Device Posture documentation: [Clear Device Posture](https://www.w3.org/TR/device-posture/#clear-device-posture)\n\nClears the previously set device posture, returning posture control back to the device hardware.\n\n#### Response\n\n`null`\n\n## Federated Credential Management Protocol\n\nThe [Federated Credential Management protocol](https://www.w3.org/TR/fedcm-1) (FedCM) is an\nextension of the W3C WebDriver protocol. Clients can enable this protocol by using the\n[`fedcm:accounts`](https://www.w3.org/TR/fedcm-1/#webdriver-capability) capability.\n\n### fedCMCancelDialog\n\n```\nPOST /session/:sessionId/fedcm/canceldialog\n```\n\n> FedCM documentation: [Cancel Dialog](https://www.w3.org/TR/fedcm-1/#webdriver-canceldialog)\n\nCancels the currently open FedCM dialog.\n\n#### Response\n\n`null`\n\n### fedCMSelectAccount\n\n```\nPOST /session/:sessionId/fedcm/selectaccount\n```\n\n> FedCM documentation: [Select Account](https://www.w3.org/TR/fedcm-1/#webdriver-selectaccount)\n\nSelects an account to use for the currently open FedCM dialog.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------------- | ------------------------------------------------------ | ------ |\n| `accountIndex` | Index of the account in the list of available accounts | number |\n\n#### Response\n\n`null`\n\n### fedCMClickDialogButton\n\n```\nPOST /session/:sessionId/fedcm/clickdialogbutton\n```\n\n> FedCM documentation: [Click Dialog Button](https://www.w3.org/TR/fedcm-1/#webdriver-clickdialogbutton)\n\nClicks a button in the currently open FedCM dialog.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------------- | ------------------------------------------------------------------------------------------------------------ | ------ |\n| `dialogButton` | Identifier of the button to click. Must be set to `ConfirmIdpLoginContinue`. | string |\n\n#### Response\n\n`null`\n\n### fedCMGetAccounts\n\n```\nGET /session/:sessionId/fedcm/accountlist\n```\n\n> FedCM documentation: [Account List](https://www.w3.org/TR/fedcm-1/#webdriver-accountlist)\n\nRetrieves all accounts that the user can select in the currently open FedCM dialog.\n\n#### Response\n\n`FedCMAccount[]` - an array of objects, where each object includes the following properties:\n\n|
Name
| Description | Type |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------ |\n| `accountId` | Account ID | string |\n| `email` | Account email | string |\n| `name` | Account name | string |\n| `givenName?` | Account given name | string |\n| `pictureUrl?` | Account picture URL | string |\n| `idpConfigUrl` | URL of the identity provider configuration file | string |\n| `loginState` | Login state. Set to `SignUp` if the account is not connected, otherwise `SignIn`. | string |\n| `termsOfServiceUrl?` | Terms of Service URL of the website, if `loginState` is set to `SignUp` | string |\n| `privacyPolicyUrl?` | Privacy Policy URL of the website, if `loginState` is set to `SignUp` | string |\n\n### fedCMGetTitle\n\n```\nGET /session/:sessionId/fedcm/gettitle\n```\n\n> FedCM documentation: [Get Title](https://www.w3.org/TR/fedcm-1/#webdriver-gettitle)\n\nRetrieves the title and subtitle (if one exists) of the currently open FedCM dialog.\n\n#### Response\n\n`FedCMDialogTitle` - an object with the following properties:\n\n| Name | Description | Type |\n| ----------- | --------------- | ------ |\n| `title` | Dialog title | string |\n| `subtitle?` | Dialog subtitle | string |\n\n### fedCMGetDialogType\n\n```\nGET /session/:sessionId/fedcm/getdialogtype\n```\n\n> FedCM documentation: [Get Dialog Type](https://www.w3.org/TR/fedcm-1/#webdriver-getdialogtype)\n\nRetrieves the type of the currently open FedCM dialog.\n\n#### Response\n\n`string` - can be set to `AutoReauthn`, `AccountChooser`, or `ConfirmIdpLogin`\n\n### fedCMSetDelayEnabled\n\n```\nPOST /session/:sessionId/fedcm/setdelayenabled\n```\n\n> FedCM documentation: [Set Delay Enabled](https://www.w3.org/TR/fedcm-1/#webdriver-setdelayenabled)\n\nSets the state of the promise rejection delay, which is used to prevent information leakage about\nthe logged in state of the user.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------- | --------------------------------------------- | ------- |\n| `enabled` | Whether to enable the promise rejection delay | boolean |\n\n#### Response\n\n`null`\n\n### fedCMResetCooldown\n\n```\nPOST /session/:sessionId/fedcm/resetcooldown\n```\n\n> FedCM documentation: [Reset Cooldown](https://www.w3.org/TR/fedcm-1/#webdriver-resetcooldown)\n\nResets the cooldown delay used after dismissing a FedCM dialog.\n\n#### Response\n\n`null`\n\n## Generic Sensor Protocol\n\nThe [Generic Sensor protocol](https://www.w3.org/TR/generic-sensor/) is an extension of the W3C\nWebDriver protocol.\n\n### createVirtualSensor\n\n```\nPOST /session/:sessionId/sensor\n```\n\n> Generic Sensor documentation: [Create Virtual Sensor](https://www.w3.org/TR/generic-sensor/#create-virtual-sensor-command)\n\nCreates a new virtual sensor.\n\n#### Parameters\n\n|
Name
| Description | Type | Default |\n| ---------------------------------- | ---------------------------------------------------- | ------- | ------- |\n| `type` | Type of sensor to create | string | |\n| `connected?` | Whether the sensor should be configured as connected | boolean | `true` |\n| `maxSamplingFrequency?` | Maximum sensor sampling frequency | number | |\n| `minSamplingFrequency?` | Minimum sensor sampling frequency | number | |\n\n#### Response\n\n`null`\n\n### getVirtualSensorInfo\n\n```\nGET /session/:sessionId/sensor/:sensorType\n```\n\n> Generic Sensor documentation: [Get Virtual Sensor Information](https://www.w3.org/TR/generic-sensor/#get-virtual-sensor-information-command)\n\nRetrieves information about the virtual sensor with the type identified by `:sensorType`.\n\n#### Response\n\n`GetVirtualSensorInfoResponse` - an object containing the `requestedSamplingFrequency` key, whose\nvalue is the requested sampling frequency of the sensor type\n\n### updateVirtualSensorReading\n\n```\nPOST /session/:sessionId/sensor/:sensorType\n```\n\n> Generic Sensor documentation: [Update Virtual Sensor Reading](https://www.w3.org/TR/generic-sensor/#update-virtual-sensor-reading-command)\n\nUpdates the virtual sensor with the type identified by `:sensorType` with a new reading.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------- | ---------------------------------------------------------------- | ------ |\n| `reading` | Object containing reading properties specific to the sensor type | object |\n\n#### Response\n\n`null`\n\n### deleteVirtualSensor\n\n```\nDELETE /session/:sessionId/sensor/:sensorType\n```\n\n> Generic Sensor documentation: [Delete Virtual Sensor](https://www.w3.org/TR/generic-sensor/#delete-virtual-sensor-command)\n\nDeletes the virtual sensor with the type identified by `:sensorType`.\n\n#### Response\n\n`null`\n\n## Permissions Protocol\n\nThe [Permissions protocol](https://www.w3.org/TR/permissions/) is an extension of the W3C WebDriver\nprotocol.\n\n### setPermissions\n\n```\nPOST /session/:sessionId/permissions\n```\n\n> Permissions documentation: [Set Permission](https://www.w3.org/TR/permissions/#webdriver-command-set-permission)\n\nSimulates user modification of the permission state of a PermissionDescriptor (a permissible feature\nwith optional additional properties).\n\n#### Parameters\n\n|
Name
| Description | Type |\n| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |\n| `descriptor` | Object specifying the feature name in its `name` key, along with any other keys for additional properties | object |\n| `state` | New permission state for this descriptor. Supported values are: `granted`, `denied`, or `prompt`. | string |\n\n#### Response\n\n`null`\n\n## Reporting Protocol\n\nThe [Reporting protocol](https://www.w3.org/TR/reporting-1/) is an extension of the W3C WebDriver\nprotocol.\n\n### generateTestReport\n\n```\nPOST /session/:sessionId/reporting/generate_test_report\n```\n\n> Reporting documentation: [Generate Test Report](https://www.w3.org/TR/reporting-1/#generate-test-report-command)\n\nSimulates the generation of a test report, which can be retrieved by registered reporting observers.\n\n#### Parameters\n\n| Name | Description | Type | Default |\n| --------- | ------------------------------------------ | ------ | --------- |\n| `message` | Message displayed in the report | string | |\n| `group?` | Destination group to deliver the report to | string | `default` |\n\n#### Response\n\n`null`\n\n## Secure Payment Confirmation Protocol\n\nThe [Secure Payment Confirmation protocol](https://www.w3.org/TR/secure-payment-confirmation) (SPC)\nis an extension of the W3C WebDriver protocol.\n\n### setSPCTransactionMode\n\n```\nPOST /session/:sessionId/secure-payment-confirmation/set-mode\n```\n\n> SPC documentation: [Set SPC Transaction Mode](https://www.w3.org/TR/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode)\n\nSets the transaction automation mode, for automated handling of transaction confirmation prompts.\nBy default, this mode is set to `none`.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |\n| `mode` | Automation mode to set. Supported values are `autoAccept`, `autoChooseToAuthAnotherWay`, `autoReject`, or `autoOptOut`. | string |\n\n#### Response\n\n`null`\n\n## Selenium Protocol\n\nThe Selenium protocol is an extension of the W3C WebDriver protocol, supported in Appium clients\nbased on Selenium.\n\n!!! warning\n\n Endpoints specified by this protocol are not officially documented.\n\n### getLog\n\n```\nPOST /session/:sessionId/se/log\n```\n\nRetrieves the logs for a given log type. Supported log types depend on the driver, and can be\nretrieved using the [`getLogTypes`](#getlogtypes) endpoint.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ----------------------- | ------ |\n| `type` | Type of log to retrieve | string |\n\n#### Response\n\n`GetLogEntry[]` - an array of log entries.\n\nTypically a log entry is an object with the following properties:\n\n| Name | Description | Type |\n| ----------- | --------------------------------------------------------------------- | ------ |\n| `level` | Level at which the message was logged | string |\n| `message` | Contents of the actual log message | string |\n| `timestamp` | Message timestamp (in milliseconds) in Unix format | number |\n\n### getLogTypes\n\n```\nGET /session/:sessionId/se/log/types\n```\n\nRetrieves the available log types that can be used to call the [`getLog`](#getlog) endpoint.\n\n#### Response\n\n`string[]` - an array of log types\n\n## Web Authentication Protocol\n\nThe [Web Authentication protocol](https://w3c.github.io/webauthn/) (WebAuthn) is an extension of\nthe W3C WebDriver protocol. Clients can enable this protocol by using the\n[`webauthn:virtualAuthenticators`](https://w3c.github.io/webauthn/#sctn-automation-webdriver-capability)\ncapability.\n\n### addVirtualAuthenticator\n\n```\nPOST /session/:sessionId/webauthn/authenticator\n```\n\n> WebAuthn documentation: [Add Virtual Authenticator](https://w3c.github.io/webauthn/#add-virtual-authenticator)\n\nCreates a software [virtual authenticator](https://w3c.github.io/webauthn/#virtual-authenticators).\n\n#### Parameters\n\n|
Name
| Description | Type | Default |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------- |\n| `isUserConsenting?` | Whether to always grant user consent | boolean | true |\n| `isUserVerified?` | Whether to always succeed in user verification. Ignored if `hasUserVerification` is set to `false`. | boolean | false |\n| `hasResidentKey?` | Whether client-side discoverable credentials are supported | boolean | false |\n| `hasUserVerification?` | Whether user verification is supported | boolean | false |\n| `protocol` | Protocol of this authenticator. Supported values are: `ctap1/u2f`, `ctap2`, or `ctap2_1`. | string | |\n| `transport` | Type of transport used to communicate with clients. Supported values are: `ble`, `hybrid`, `internal`, `nfc`, `smart-card`, or `usb`. | string | |\n\n#### Response\n\n`string` - the ID of the created authenticator\n\n### removeVirtualAuthenticator\n\n```\nDELETE /session/:sessionId/webauthn/authenticator/:authenticatorId\n```\n\n> WebAuthn documentation: [Remove Virtual Authenticator](https://w3c.github.io/webauthn/#remove-virtual-authenticator)\n\nRemoves the virtual authenticator identified by `:authenticatorId`.\n\n#### Response\n\n`null`\n\n### addAuthCredential\n\n```\nPOST /session/:sessionId/webauthn/authenticator/:authenticatorId/credential\n```\n\n> WebAuthn documentation: [Add Credential](https://w3c.github.io/webauthn/#add-credential)\n\nInjects a [Public Key Credential Source](https://w3c.github.io/webauthn/#public-key-credential-source)\ninto the virtual authenticator identified by `:authenticatorId`.\n\n#### Parameters\n\n|
Name
| Description | Type |\n| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |\n| `credentialId` | Credential ID, in Base64url encoding | string |\n| `isResidentCredential` | Whether to create a client-side discoverable credential. If set to `false`, a server-side credential is created instead. | boolean |\n| `privateKey` | Asymmetric key package containing a single private key, in Base64url encoding | string |\n| `rpId` | Relying Party ID the credential is scoped to | string |\n| `signCount?` | Initial value for the signature counter. Set to `0` if omitted. | number |\n| `userHandle?` | User handle associated with the credential, in Base64url encoding. Set to `null` if omitted. | string |\n\n#### Response\n\n`null`\n\n### getAuthCredential\n\n```\nGET /session/:sessionId/webauthn/authenticator/:authenticatorId/credentials\n```\n\n> WebAuthn documentation: [Get Credentials](https://w3c.github.io/webauthn/#get-credentials)\n\nRetrieves all Public Key Credential Sources stored in the virtual authenticator identified by\n`:authenticatorId`.\n\n#### Response\n\n`Credential[]` - an array of credential objects. Each object has the following properties:\n\n|
Name
| Description | Type | Default |\n| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------- | ------- |\n| `credentialId` | Credential ID, in Base64url encoding | string | |\n| `isResidentCredential` | Whether the credential is client-side discoverable (`true`) or server-side (`false`) | boolean | |\n| `largeBlob` | Large, per-credential blog, in Base64url encoding | string | `null` |\n| `privateKey` | Asymmetric key package containing a single private key, in Base64url encoding | string | |\n| `rpId` | Relying Party ID the credential is scoped to | string | |\n| `signCount` | Initial value for the signature counter | number | `0` |\n| `userHandle` | User handle associated with the credential, in Base64url encoding | string | `null` |\n\n### removeAuthCredential\n\n```\nDELETE /session/:sessionId/webauthn/authenticator/:authenticatorId/credentials/:credentialId\n```\n\n> WebAuthn documentation: [Remove Credential](https://w3c.github.io/webauthn/#remove-credential)\n\nRemoves the Public Key Credential Source identified by `:credentialId` from the virtual authenticator\nidentified by `:authenticatorId`.\n\n#### Response\n\n`null`\n\n### removeAllAuthCredentials\n\n```\nDELETE /session/:sessionId/webauthn/authenticator/:authenticatorId/credentials\n```\n\n> WebAuthn documentation: [Remove All Credentials](https://w3c.github.io/webauthn/#remove-all-credentials)\n\nRemoves all Public Key Credential Sources from the virtual authenticator identified by\n`:authenticatorId`.\n\n#### Response\n\n`null`\n\n### setUserAuthVerified\n\n```\nPOST /session/:sessionId/webauthn/authenticator/:authenticatorId/uv\n```\n\n> WebAuthn documentation: [Set User Verified](https://w3c.github.io/webauthn/#set-user-verified)\n\nSets the `isUserVerified` property of the virtual authenticator identified by `:authenticatorId`.\n\n#### Parameters\n\n| Name | Description | Type |\n| ---------------- | ---------------------------------------------- | ------- |\n| `isUserVerified` | Whether to always succeed in user verification | boolean |\n\n#### Response\n\n`null`\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/reference/api/plugins.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Plugin Endpoints\n---\n\n\n\nThe following is a list of endpoints added or modified by official Appium plugins.\n\n## Execute Driver Plugin\n\n### executeDriverScript\n\n```\nPOST /session/:sessionId/appium/execute_driver\n```\n\nExecutes a driver script in a child process.\n\n#### Parameters\n\n| Name | Description | Type | Default |\n| ---------- | ------------------------------------------------------------------- | ------ | ------------- |\n| `script` | Script to be executed | string | |\n| `type?` | Name of the library executing the script | string | `webdriverio` |\n| `timeout?` | Timeout (in milliseconds) for the script process | number | `3600000` |\n\n#### Response\n\n`RunScriptResult` - an object with the following properties:\n\n| Name | Description | Type |\n| -------- | -------------------------------------- | ------ |\n| `result` | Result returned by the script | any |\n| `logs` | Logs generated during script execution | object |\n\n## Images Plugin\n\n### compareImages\n\n```\nPOST /session/:sessionId/appium/compare_images\n```\n\nCompares two images using the specified mode of comparison:\n\n- `matchFeatures`: whether `firstImage` is a rotated, scaled, or otherwise modified version of `secondImage`\n- `matchTemplate`: whether `firstImage` contains one or more occurrences of `secondImage`\n- `getSimilarity`: calculate similarity score between two images of equal size\n\n#### Parameters\n\n|
Name
| Description | Type | Default |\n| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ------- |\n| `mode` | Mode of comparison. Supported values are: `matchFeatures`, `getSimilarity`, or `matchTemplate`. | string | |\n| `firstImage` | Base64-encoded image file | string or Buffer | |\n| `secondImage` | Base64-encoded image file | string or Buffer | |\n| `options?` | Options specific to the `mode` value (see below) | object | `{}` |\n\n**`options` for `mode=matchFeatures`**\n\n|
Name
| Description | Type |
Default
|\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ | ------------------------------------ |\n| `detectorName?` | Name of the OpenCV feature detector to use. Supported values are: `AKAZE`, `AgastFeatureDetector`, `BRISK`, `FastFeatureDetector`, `GFTTDetector`, `KAZE`, `MSER`, or `ORB`. | string | `ORB` |\n| `goodMatchesFactor?` | Maximum number of 'good' matches; or a function accepting current distance, min distance and max distance, and returning a boolean indicating whether the match should be included or not. | number or function | |\n| `matchFunc?` | Name of the OpenCV descriptor matcher to use. Supported values are: `FlannBased`, `BruteForce`, `BruteForce-L1`, `BruteForce-Hamming`, `BruteForce-HammingLUT`, or `BruteForce-SL2`. | string | `BruteForce` |\n| `visualize?` | Whether to include an image of the matcher visualization in the response | boolean | `false` |\n\n**`options` for `mode=matchTemplate`**\n\n|
Name
| Description | Type |
Default
|\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------ |\n| `matchNeighbourThreshold?` | Maximum pixel distance between two matches to consider them the same match | number | `10` |\n| `method?` | Name of the OpenCV template matching method to use. Supported values are: `TM_CCOEFF`, `TM_CCOEFF_NORMED`, `TM_CCORR`, `TM_CCORR_NORMED`, `TM_SQDIFF`, or `TM_SQDIFF_NORMED`. | string | `TM_CCOEFF_NORMED` |\n| `multiple?` | Whether to look for multiple occurrences of the image | boolean | `false` |\n| `threshold?` | Threshold to use for accepting/rejecting a match | number | `0.5` |\n| `visualize?` | Whether to include an image of the matcher visualization in the response | boolean | `false` |\n\n**`options` for `mode=getSimilarity`**\n\n|
Name
| Description | Type |
Default
|\n| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------ |\n| `method?` | Name of the OpenCV template matching method to use. Supported values are: `TM_CCOEFF`, `TM_CCOEFF_NORMED`, `TM_CCORR`, `TM_CCORR_NORMED`, `TM_SQDIFF`, or `TM_SQDIFF_NORMED`. | string | `TM_CCOEFF_NORMED` |\n| `visualize?` | Whether to include an image of the matcher visualization in the response | boolean | `false` |\n\n#### Response\n\n`ComparisonResult` - an object whose properties depend on the `mode` input parameter:\n\n**`ComparisonResult` for `mode=matchFeatures`**\n\n|
Name
| Description | Type |\n| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------- |\n| `count` | Number of matched edges on both images, after applying `goodMatchesFactor` (if specified). | number |\n| `points1` | Array of matching points on `firstImage` | `{x, y}[]` |\n| `points2` | Array of matching points on `secondImage` | `{x, y}[]` |\n| `rect1` | Bounding rectangle for `points1` | `{x, y, width, height}` |\n| `rect2` | Bounding rectangle for `points2` | `{x, y, width, height}` |\n| `totalCount` | Total number of matched edges on both images, before applying `goodMatchesFactor` (if specified) | number |\n| `visualization?` | Image of the matcher visualization. Only included if the `visualize` input option was enabled. | Buffer |\n\n**`ComparisonResult` for `mode=matchTemplate`**\n\n|
Name
| Description | Type |\n| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- |\n| `rect` | Region of `firstImage` where a match was found for `secondImage` | `{x, y, width, height}` |\n| `multiple?` | Array of all comparison results. Only included if the `multiple` input option was enabled. | `{rect, score, visualization?}` |\n| `score` | Similarity score between both images in the range `[0.0, 1.0]` | number |\n| `visualization?` | Image of the matcher visualization. Only included if the `visualize` input option was enabled. | Buffer |\n\n**`ComparisonResult` for `mode=getSimilarity`**\n\n|
Name
| Description | Type |\n| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------ |\n| `score` | Similarity score between both images in the range `[0.0, 1.0]` | number |\n| `visualization?` | Image of the matcher visualization. Only included if the `visualize` input option was enabled. | Buffer |\n\n### findElement\n\n```\nPOST /session/:sessionId/element\n```\n\nModifies the [`findElement`](./webdriver.md#findelement) endpoint:\n\n- Adds `-image` to the supported values for the `using` parameter (the location strategy)\n\n### findElements\n\n```\nPOST /session/:sessionId/elements\n```\n\nModifies the [`findElements`](./webdriver.md#findelements) endpoint:\n\n- Adds `-image` to the supported values for the `using` parameter (the location strategy)\n\n### performActions\n\n```\nPOST /session/:sessionId/actions\n```\n\nModifies the [`performActions`](./webdriver.md#performactions) endpoint:\n\n- If any action in `actions` includes `origin`, whose value is an image element:\n - Removes the `origin` property\n - Increments the `x` and `y` properties by the center coordinates of the image element\n\n## Relaxed Caps Plugin\n\n### createSession\n\n```\nPOST /session\n```\n\nModifies the [`createSession`](./webdriver.md#createsession) endpoint:\n\n- Adds the `appium:` prefix to all keys in `capabilities`, unless they match a standard W3C\n capability, or already have any prefix\n\n## Storage Plugin\n\n!!! tip\n\n All endpoints for this plugin can be invoked without creating a session, allowing you to prepare\n your test environment in advance.\n\n### addStorageItem\n\n```\nPOST /storage/add\n```\n\nAdds a new file to the storage.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | --------------------------------------------------------------------------------------------- | ------ |\n| `name` | Name used for saving the file (must not include path separator characters) | string |\n| `sha1` | SHA1 hash of the file to be uploaded | string |\n\n#### Response\n\n`AddRequestResult` - an object with the following properties:\n\n| Name | Description | Type |\n| ----------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------ |\n| `ttlMs` | Timeout (in milliseconds) for both web sockets to remain active, or for a file payload to be successfully uploaded | number |\n| `ws.events` | Path for the events web socket used to notify about upload success or failure | string |\n| `ws.stream` | Path for the streaming web socket used to upload the file content | string |\n\nExample:\n\n```json\n{\n \"ws\": {\n \"stream\": \"/storage/add/ccc963411b2621335657963322890305ebe96186/stream\",\n \"events\": \"/storage/add/ccc963411b2621335657963322890305ebe96186/events\"\n },\n \"ttlMs\": 300000\n}\n```\n\n### deleteStorageItem\n\n```\nPOST /storage/delete\n```\n\nDeletes a file in the storage.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ------------------------------ | ------ |\n| `name` | Name of the file to be deleted | string |\n\n#### Response\n\n`boolean` - `true` upon successful file deletion, or `false` if the file does not exist in\nthe storage\n\n### listStorageItems\n\n```\nGET /storage/list\n```\n\nList all files present in the storage.\n\n#### Response\n\n`List` - a list of items, where each item has the following properties:\n\n| Name | Description | Type |\n| ------ | ----------------------------------------------- | ------ |\n| `name` | Name of the file in the storage | string |\n| `path` | Full path to the file on the remote file system | string |\n| `size` | File size in bytes | number |\n\n### resetStorage\n\n```\nPOST /storage/reset\n```\n\nDeletes all uploaded files and stops any incomplete uploads.\nIf the [`APPIUM_STORAGE_KEEP_ALL` flag](../cli/env-vars.md) is set, all uploaded files will be\npreserved, and only the incomplete uploads will be stopped.\n\n#### Response\n\n`void`\n\n## Universal XML Plugin\n\n### findElement\n\n```\nPOST /session/:sessionId/element\n```\n\nModifies the [`findElement`](./webdriver.md#findelement) endpoint:\n\n- Adds support for universal node/attribute names for the `value` parameter (the selector)\n\n### findElements\n\n```\nPOST /session/:sessionId/elements\n```\n\nModifies the [`findElements`](./webdriver.md#findelements) endpoint:\n\n- Adds support for universal node/attribute names for the `value` parameter (the selector)\n\n### getPageSource\n\n```\nGET /session/:sessionId/source\n```\n\nModifies the [`getPageSource`](./webdriver.md#getpagesource) endpoint:\n\n- After retrieving the result, translates node/attribute names to their universal names\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/reference/api/webdriver.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: WebDriver Protocol\n---\n\n\n\nThe following is a list of [W3C WebDriver protocol](https://w3c.github.io/webdriver/) endpoints\nsupported in Appium.\n\n!!! info\n\n Most WebDriver endpoints are not implemented within Appium itself, and are instead proxied\n directly to the driver, which is responsible for the actual endpoint implementation.\n\n### createSession\n\n```\nPOST /session\n```\n\n> WebDriver documentation: [New Session](https://w3c.github.io/webdriver/#new-session)\n\nCreates a new WebDriver session.\n\nAppium implements a modified version of this endpoint for historical reasons. While the W3C\nendpoint only accepts 1 parameter, Appium's implementation allows up to 3 parameters, as this was\nrequired by the legacy JSON Wire Protocol (JSONWP). Since Appium 2, the JSONWP format is no longer\nsupported, and any of the 3 parameters can be used to specify the W3C capabilities.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------------------- | ----------------------------------------------------------------------------- | --------------- |\n| `w3cCapabilities1?` | Capabilities of the new session | `W3CDriverCaps` |\n| `w3cCapabilities2?` | Another location for the new session capabilities (legacy) | `W3CDriverCaps` |\n| `w3cCapabilities?` | Another location for the new session capabilities (legacy) | `W3CDriverCaps` |\n\n#### Response\n\n`CreateResult` - an object with the following properties:\n\n| Name | Description | Type |\n| -------------- | ------------------------------------ | ------ |\n| `sessionId` | ID of the new session | string |\n| `capabilities` | Capabilities processed by the driver | object |\n\n### deleteSession\n\n```\nDELETE /session/:sessionId\n```\n\n> WebDriver documentation: [Delete Session](https://w3c.github.io/webdriver/#delete-session)\n\nCloses the current session.\n\n#### Response\n\n`null`\n\n### getStatus\n\n```\nGET /status\n```\n\n> WebDriver documentation: [Status](https://w3c.github.io/webdriver/#status)\n\nRetrieves the current status of the Appium server.\n\n#### Response\n\n`GetStatusResult` - an object with the following properties:\n\n| Name | Description | Type |\n| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |\n| `build` | Implementation-specific information. For Appium, this is an object containing the `version` key, whose value matches the Appium server version. | `{version}` |\n| `message` | Explanation of the `ready` value | string |\n| `ready` | Whether the server is able to create new sessions | boolean |\n\n### getTimeouts\n\n```\nGET /session/:sessionId/timeouts\n```\n\n> WebDriver documentation: [Get Timeouts](https://w3c.github.io/webdriver/#get-timeouts)\n\nRetrieves the timeout values of the current session.\n\n#### Response\n\n`GetTimeoutsResult` - an object with the following properties:\n\n| Name | Description | Type |\n| ---------- | --------------------- | ------ |\n| `command` | Command timeout | number |\n| `implicit` | Implicit wait timeout | number |\n\n### timeouts\n\n```\nPOST /session/:sessionId/timeouts\n```\n\n> WebDriver documentation: [Set Timeouts](https://w3c.github.io/webdriver/#set-timeouts)\n\nSets the timeout values of the current session.\n\n#### Parameters\n\n| Name | Description | Type |\n| ----------- | ---------------------------------------------------------- | ------ |\n| `implicit?` | Implicit wait timeout (in milliseconds) | number |\n| `pageLoad?` | Page load timeout (in milliseconds) | number |\n| `script?` | Script timeout (in milliseconds) | number |\n\n#### Response\n\n`null`\n\n### setUrl\n\n```\nPOST /session/:sessionId/url\n```\n\n> WebDriver documentation: [Navigate To](https://w3c.github.io/webdriver/#navigate-to)\n\nNavigates the current top-level browsing context to the specified URL.\n\n#### Parameters\n\n| Name | Description | Type |\n| ----- | ------------------ | ------ |\n| `url` | URL to navigate to | string |\n\n#### Response\n\n`null`\n\n### getUrl\n\n```\nGET /session/:sessionId/url\n```\n\n> WebDriver documentation: [Get Current URL](https://w3c.github.io/webdriver/#get-current-url)\n\nRetrieves the URL of the current top-level browsing context.\n\n#### Response\n\n`string` - the current URL\n\n### back\n\n```\nPOST /session/:sessionId/back\n```\n\n> WebDriver documentation: [Back](https://w3c.github.io/webdriver/#back)\n\nNavigates backwards in the browser history, if possible.\n\n#### Response\n\n`null`\n\n### forward\n\n```\nPOST /session/:sessionId/forward\n```\n\n> WebDriver documentation: [Forward](https://w3c.github.io/webdriver/#forward)\n\nNavigates forwards in the browser history, if possible.\n\n#### Response\n\n`null`\n\n### refresh\n\n```\nPOST /session/:sessionId/refresh\n```\n\n> WebDriver documentation: [Refresh](https://w3c.github.io/webdriver/#refresh)\n\nReloads the window of the current top-level browsing context.\n\n#### Response\n\n`null`\n\n### title\n\n```\nGET /session/:sessionId/title\n```\n\n> WebDriver documentation: [Get Title](https://w3c.github.io/webdriver/#get-title)\n\nRetrieves the window title of the top-level browsing context.\n\n#### Response\n\n`string` - the page title\n\n### getWindowHandle\n\n```\nGET /session/:sessionId/window\n```\n\n> WebDriver documentation: [Get Window Handle](https://w3c.github.io/webdriver/#get-window-handle)\n\nRetrieves the window handle of the top-level browsing context.\n\n#### Response\n\n`string` - the window handle identifier\n\n### closeWindow\n\n```\nDELETE /session/:sessionId/window\n```\n\n> WebDriver documentation: [Close Window](https://w3c.github.io/webdriver/#close-window)\n\nCloses the current top-level browsing context.\n\n#### Response\n\n`string[]` - an array of zero or more remaining window handle identifiers\n\n### setWindow\n\n```\nPOST /session/:sessionId/window\n```\n\n> WebDriver documentation: [Switch To Window](https://w3c.github.io/webdriver/#switch-to-window)\n\nSelects the top-level browsing context.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | -------------------------------------- | ------ |\n| `handle` | Identifier for the window to switch to | string |\n\n#### Response\n\n`null`\n\n### getWindowHandles\n\n```\nGET /session/:sessionId/window/handles\n```\n\n> WebDriver documentation: [Get Window Handles](https://w3c.github.io/webdriver/#get-window-handles)\n\nRetrieves a list of window handles for every top-level browsing context.\n\n#### Response\n\n`string[]` - an array of zero or more window handle identifiers\n\n### createNewWindow\n\n```\nPOST /session/:sessionId/window/new\n```\n\n> WebDriver documentation: [New Window](https://w3c.github.io/webdriver/#new-window)\n\nCreates a new window or tab.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | --------------------------------------------------------------- | ------ |\n| `type` | Type of window to create (`window` or `tab`) | string |\n\n#### Response\n\n`NewWindow` - an object with the following properties:\n\n| Name | Description | Type |\n| -------- | ----------------------------------------------------------------- | ------ |\n| `handle` | ID of the created window handle | string |\n| `type` | Type of the created window (`window` or `tab`) | string |\n\n### setFrame\n\n```\nPOST /session/:sessionId/frame\n```\n\n> WebDriver documentation: [Switch To Frame](https://w3c.github.io/webdriver/#switch-to-frame)\n\nSelects the top-level or child browsing context as the current browsing context.\n\n#### Parameters\n\n| Name | Description | Type |\n| ---- | ------------------------ | ------------------------------------------ |\n| `id` | Identifier for the frame | null, number, or [`Element`](#response_23) |\n\n#### Response\n\n`null`\n\n### switchToParentFrame\n\n```\nPOST /session/:sessionId/frame/parent\n```\n\n> WebDriver documentation: [Switch To Parent Frame](https://w3c.github.io/webdriver/#switch-to-parent-frame)\n\nSets the current browsing context to the parent of the current browsing context.\n\n#### Response\n\n`null`\n\n### getWindowRect\n\n```\nGET /session/:sessionId/window/rect\n```\n\n> WebDriver documentation: [Get Window Rect](https://w3c.github.io/webdriver/#get-window-rect)\n\nRetrieves the size and position of the current window.\n\n#### Response\n\n`Rect` - an object with the following properties:\n\n| Name | Description | Type |\n| -------- | ---------------------------------------------------- | ------ |\n| `height` | Window height | number |\n| `width` | Window width | number |\n| `x` | X-axis position of the top-left corner of the window | number |\n| `y` | Y-axis position of the top-left corner of the window | number |\n\n### setWindowRect\n\n```\nPOST /session/:sessionId/window/rect\n```\n\n> WebDriver documentation: [Set Window Rect](https://w3c.github.io/webdriver/#set-window-rect)\n\nSets the size and/or position of the current window.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------- | ---------------------------------------------------- | ------ |\n| `height?` | Window height | number |\n| `width?` | Window width | number |\n| `x?` | X-axis position of the top-left corner of the window | number |\n| `y?` | Y-axis position of the top-left corner of the window | number |\n\n#### Response\n\n[`Rect`](#response_18) - the new window size\n\n### maximizeWindow\n\n```\nPOST /session/:sessionId/window/maximize\n```\n\n> WebDriver documentation: [Maximize Window](https://w3c.github.io/webdriver/#maximize-window)\n\nMaximizes the current window.\n\n#### Response\n\n[`Rect`](#response_18) - the new window size\n\n### minimizeWindow\n\n```\nPOST /session/:sessionId/window/minimize\n```\n\n> WebDriver documentation: [Minimize Window](https://w3c.github.io/webdriver/#minimize-window)\n\nMinimizes the current window.\n\n#### Response\n\n[`Rect`](#response_18) - the new window size\n\n### fullScreenWindow\n\n```\nPOST /session/:sessionId/window/fullscreen\n```\n\n> WebDriver documentation: [Fullscreen Window](https://w3c.github.io/webdriver/#fullscreen-window)\n\nMakes the current window fullscreen.\n\n#### Response\n\n[`Rect`](#response_18) - the new window size\n\n### active\n\n```\nGET /session/:sessionId/element/active\n```\n\n> WebDriver documentation: [Get Active Element](https://w3c.github.io/webdriver/#get-active-element)\n\nRetrieves the currently focused element.\n\n#### Response\n\n`Element` - an object with the following properties:\n\n| Name | Description | Type |\n| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ |\n| `element-6066-11e4-a52e-4f735466cecf` | Element ID | string |\n| `ELEMENT` | Element ID (same value as `element-6066-11e4-a52e-4f735466cecf`). This key was used in the legacy Mobile JSON Wire Protocol (MJSONWP). | string |\n\n### elementShadowRoot\n\n```\nGET /session/:sessionId/element/:elementId/shadow\n```\n\n> WebDriver documentation: [Get Shadow Root](https://w3c.github.io/webdriver/#get-shadow-root)\n\nRetrieves the shadow root of the element identified by `:elementId`.\n\n#### Response\n\n`ShadowElement` - an object with the following properties:\n\n| Name | Description | Type |\n| ------------------------------------ | -------------- | ------ |\n| `shadow-6066-11e4-a52e-4f735466cecf` | Shadow root ID | string |\n\n### findElement\n\n```\nPOST /session/:sessionId/element\n```\n\n> WebDriver documentation: [Find Element](https://w3c.github.io/webdriver/#find-element)\n\nFinds the first element in the current browsing context that matches the provided selector and\nlocation strategy, starting from the root node.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------- | --------------------------------------- | ------ |\n| `using` | Location strategy to use when searching | string |\n| `value` | Selector used to find the element | string |\n\n#### Response\n\n[`Element`](#response_23)\n\n### findElements\n\n```\nPOST /session/:sessionId/elements\n```\n\n> WebDriver documentation: [Find Elements](https://w3c.github.io/webdriver/#find-elements)\n\nFinds all elements in the current browsing context that match the provided selector and location\nstrategy, starting from the root node.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------- | --------------------------------------- | ------ |\n| `using` | Location strategy to use when searching | string |\n| `value` | Selector used to find the element | string |\n\n#### Response\n\n`Element[]` - an array containing zero or more [`Element` objects](#response_23)\n\n### findElementFromElement\n\n```\nPOST /session/:sessionId/element/:elementId/element\n```\n\n> WebDriver documentation: [Find Element From Element](https://w3c.github.io/webdriver/#find-element-from-element)\n\nFinds the first element in the current browsing context that matches the provided selector and\nlocation strategy, starting from the element node identified by `:elementId`.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------- | --------------------------------------- | ------ |\n| `using` | Location strategy to use when searching | string |\n| `value` | Selector used to find the element | string |\n\n#### Response\n\n[`Element`](#response_23)\n\n### findElementsFromElement\n\n```\nPOST /session/:sessionId/element/:elementId/elements\n```\n\n> WebDriver documentation: [Find Elements From Element](https://w3c.github.io/webdriver/#find-elements-from-element)\n\nFinds all elements in the current browsing context that match the provided selector and location\nstrategy, starting from the element node identified by `:elementId`.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------- | --------------------------------------- | ------ |\n| `using` | Location strategy to use when searching | string |\n| `value` | Selector used to find the element | string |\n\n#### Response\n\n[`Element[]`](#response_26)\n\n### findElementFromShadowRoot\n\n```\nPOST /session/:sessionId/shadow/:shadowId/element\n```\n\n> WebDriver documentation: [Find Element From Shadow Root](https://w3c.github.io/webdriver/#find-element-from-shadow-root)\n\nFinds the first element in the current browsing context that matches the provided selector and\nlocation strategy, starting from the shadow root node identified by `:shadowId`.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------- | --------------------------------------- | ------ |\n| `using` | Location strategy to use when searching | string |\n| `value` | Selector used to find the element | string |\n\n#### Response\n\n[`Element`](#response_23)\n\n### findElementsFromShadowRoot\n\n```\nPOST /session/:sessionId/shadow/:shadowId/elements\n```\n\n> WebDriver documentation: [Find Elements From Shadow Root](https://w3c.github.io/webdriver/#find-elements-from-shadow-root)\n\nFinds all elements in the current browsing context that match the provided selector and location\nstrategy, starting from the shadow root node identified by `:shadowId`.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------- | --------------------------------------- | ------ |\n| `using` | Location strategy to use when searching | string |\n| `value` | Selector used to find the element | string |\n\n#### Response\n\n[`Element[]`](#response_26)\n\n### elementSelected\n\n```\nGET /session/:sessionId/element/:elementId/selected\n```\n\n> WebDriver documentation: [Is Element Selected](https://w3c.github.io/webdriver/#is-element-selected)\n\nDetermines if the element identified by `:elementId` is currently selected. This property is only\nrelevant to certain element types, such as checkboxes, radio buttons, or options.\n\n#### Response\n\n`boolean` - `true` if the element is selected, otherwise `false`\n\n### elementDisplayed\n\n```\nGET /session/:sessionId/element/:elementId/displayed\n```\n\n> WebDriver documentation: [Element Displayedness](https://w3c.github.io/webdriver/#element-displayedness)\n\nDetermines if the element identified by `:elementId` is currently displayed.\n\n#### Response\n\n`boolean` - `true` if the element is displayed, otherwise `false`\n\n### getAttribute\n\n```\nGET /session/:sessionId/element/:elementId/attribute/:name\n```\n\n> WebDriver documentation: [Get Element Attribute](https://w3c.github.io/webdriver/#get-element-attribute)\n\nRetrieves the value of the `:name` attribute for the element identified by `:elementId`.\n\n#### Response\n\n`string` - the attribute value, or `null` if the attribute does not exist\n\n### getProperty\n\n```\nGET /session/:sessionId/element/:elementId/property/:name\n```\n\n> WebDriver documentation: [Get Element Property](https://w3c.github.io/webdriver/#get-element-property)\n\nRetrieves the value of the `:name` property for the element identified by `:elementId`.\n\n#### Response\n\n`string` - the property value, or `null` if the property does not exist\n\n### getCssProperty\n\n```\nGET /session/:sessionId/element/:elementId/css/:propertyName\n```\n\n> WebDriver documentation: [Get Element CSS Value](https://w3c.github.io/webdriver/#get-element-css-value)\n\nRetrieves the value of the `:propertyName` computed CSS property for the element identified by\n`:elementId`.\n\n#### Response\n\n`string` - the CSS property value, or `null` if the property does not exist\n\n### getText\n\n```\nGET /session/:sessionId/element/:elementId/text\n```\n\n> WebDriver documentation: [Get Element Text](https://w3c.github.io/webdriver/#get-element-text)\n\nRetrieves the text of the element identified by `:elementId`, as well as the text of its child\nelements (if any).\n\n#### Response\n\n`string` - the element text (including its child elements)\n\n### getName\n\n```\nGET /session/:sessionId/element/:elementId/name\n```\n\n> WebDriver documentation: [Get Element Tag Name](https://w3c.github.io/webdriver/#get-element-tag-name)\n\nRetrieves the tag name of the element identified by `:elementId`.\n\n#### Response\n\n`string` - the element tag name\n\n### getElementRect\n\n```\nGET /session/:sessionId/element/:elementId/rect\n```\n\n> WebDriver documentation: [Get Element Rect](https://w3c.github.io/webdriver/#get-element-rect)\n\nRetrieves the dimensions and coordinates of the element identified by `:elementId`.\n\n#### Response\n\n[`Rect`](#response_18)\n\n### elementEnabled\n\n```\nGET /session/:sessionId/element/:elementId/enabled\n```\n\n> WebDriver documentation: [Is Element Enabled](https://w3c.github.io/webdriver/#is-element-enabled)\n\nDetermines if the element identified by `:elementId` is currently enabled. This property is only\nrelevant to certain element types, such as buttons, input fields, checkboxes, etc.\n\n#### Response\n\n`boolean` - `true` if the element is enabled, otherwise `false`\n\n### getComputedRole\n\n```\nGET /session/:sessionId/element/:elementId/computedrole\n```\n\n> WebDriver documentation: [Get Computed Role](https://w3c.github.io/webdriver/#get-computed-role)\n\nRetrieves the computed [WAI-ARIA](https://w3c.github.io/aria/#introroles) role of the element\nidentified by `:elementId`.\n\n#### Response\n\n`string` - the element computed role\n\n### getComputedLabel\n\n```\nGET /session/:sessionId/element/:elementId/computedlabel\n```\n\n> WebDriver documentation: [Get Computed Label](https://w3c.github.io/webdriver/#get-computed-label)\n\nRetrieves the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name) of the\nelement identified by `:elementId`.\n\n#### Response\n\n`string` - the element accessible name\n\n### click\n\n```\nPOST /session/:sessionId/element/:elementId/click\n```\n\n> WebDriver documentation: [Element Click](https://w3c.github.io/webdriver/#element-click)\n\nClicks on the identified by `:elementId`.\n\n#### Response\n\n`null`\n\n### clear\n\n```\nPOST /session/:sessionId/element/:elementId/clear\n```\n\n> WebDriver documentation: [Element Clear](https://w3c.github.io/webdriver/#element-clear)\n\nClears the identified by `:elementId`. This functionality is only relevant to certain element types,\nsuch as input fields.\n\n#### Response\n\n`null`\n\n### setValue\n\n```\nPOST /session/:sessionId/element/:elementId/value\n```\n\n> WebDriver documentation: [Element Send Keys](https://w3c.github.io/webdriver/#element-send-keys)\n\nSends keys to the element the identified by `:elementId`. This functionality is only relevant to\nkeyboard-interactable element types, such as input fields.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ------------ | ------ |\n| `text` | Text to send | string |\n\n#### Response\n\n`null`\n\n### getPageSource\n\n```\nGET /session/:sessionId/source\n```\n\n> WebDriver documentation: [Get Page Source](https://w3c.github.io/webdriver/#get-page-source)\n\nRetrieves the page/application source of the current browsing context in HTML/XML format.\n\n#### Response\n\n`string` - the DOM of the current browsing context\n\n### execute\n\n```\nPOST /session/:sessionId/execute/sync\n```\n\n> WebDriver documentation: [Execute Script](https://w3c.github.io/webdriver/#execute-script)\n\nExecutes synchronous JavaScript code in the current browsing context.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | ------------------------------ | ------ |\n| `script` | Script function to execute | string |\n| `args` | Arguments passed to the script | array |\n\n#### Response\n\n`any` - the result of the script execution\n\n### executeAsync\n\n```\nPOST /session/:sessionId/execute/async\n```\n\n> WebDriver documentation: [Execute Async Script](https://w3c.github.io/webdriver/#execute-async-script)\n\nExecutes asynchronous JavaScript code in the current browsing context.\n\nThe `script` function is provided an additional argument (applied after `args`), which is a\nfunction that can be invoked (within `script`) to trigger script completion. The first argument\npassed to this completion function is returned as the endpoint response.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | -------------------------- | ------ |\n| `script` | Script function to execute | string |\n| `args` | Arguments for the script | array |\n\n#### Response\n\n`any` - the result returned by the completion function of the script\n\n### getCookies\n\n```\nGET /session/:sessionId/cookie\n```\n\n> WebDriver documentation: [Get Cookies](https://w3c.github.io/webdriver/#get-cookies)\n\nRetrieves all cookies of the current browsing context.\n\n#### Response\n\n`Cookie[]` - an array containing zero or more [`Cookie` objects](#response_49)\n\n### getCookie\n\n```\nGET /session/:sessionId/cookie/:name\n```\n\n> WebDriver documentation: [Get Named Cookie](https://w3c.github.io/webdriver/#get-named-cookie)\n\nRetrieves a cookie with the name identified by `:name` from the current browsing context.\n\n#### Response\n\n`Cookie` - an object with the following properties:\n\n| Name | Description | Type |\n| ----------- | -------------------------------------------------------------------------------- | ------- |\n| `domain?` | Cookie domain | string |\n| `expiry?` | Cookie expiration time (in seconds) as a Unix timestamp | number |\n| `httpOnly?` | Whether the cookie is an HTTP only cookie | boolean |\n| `name` | Cookie name | string |\n| `path?` | Cookie path | string |\n| `sameSite?` | SameSite policy type of the cookie (either `Lax` or `Strict`) | string |\n| `secure?` | Whether the cookie is a secure cookie | boolean |\n| `value` | Cookie value | string |\n\n### setCookie\n\n```\nPOST /session/:sessionId/cookie\n```\n\n> WebDriver documentation: [Add Cookie](https://w3c.github.io/webdriver/#add-cookie)\n\nAdds a cookie to the cookie store of the current browsing context.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | -------------------- | ------------------------ |\n| `cookie` | Cookie object to add | [`Cookie`](#response_49) |\n\n#### Response\n\n`null`\n\n### deleteCookie\n\n```\nDELETE /session/:sessionId/cookie/:name\n```\n\n> WebDriver documentation: [Delete Cookie](https://w3c.github.io/webdriver/#delete-cookie)\n\nDeletes a cookie with the name identified by `:name` from the current browsing context.\n\n#### Response\n\n`null`\n\n### deleteCookies\n\n```\nDELETE /session/:sessionId/cookie\n```\n\n> WebDriver documentation: [Delete All Cookies](https://w3c.github.io/webdriver/#delete-all-cookies)\n\nDeletes all cookies from the current browsing context.\n\n#### Response\n\n`null`\n\n### performActions\n\n```\nPOST /session/:sessionId/actions\n```\n\n> WebDriver documentation: [Perform Actions](https://w3c.github.io/webdriver/#perform-actions)\n\nPerforms a sequence of [actions](https://w3c.github.io/webdriver/#actions).\n\n#### Parameters\n\n| Name | Description | Type |\n| --------- | ----------------------- | ------------------ |\n| `actions` | Array of action objects | `ActionSequence[]` |\n\n#### Response\n\n`null`\n\n### releaseActions\n\n```\nDELETE /session/:sessionId/actions\n```\n\n> WebDriver documentation: [Release Actions](https://w3c.github.io/webdriver/#release-actions)\n\nReleases all currently depressed keys and pointer buttons.\n\n#### Response\n\n`null`\n\n### postDismissAlert\n\n```\nPOST /session/:sessionId/alert/dismiss\n```\n\n> WebDriver documentation: [Dismiss Alert](https://w3c.github.io/webdriver/#dismiss-alert)\n\nDismisses the currently displayed user prompt.\n\n#### Response\n\n`null`\n\n### postAcceptAlert\n\n```\nPOST /session/:sessionId/alert/accept\n```\n\n> WebDriver documentation: [Accept Alert](https://w3c.github.io/webdriver/#accept-alert)\n\nAccepts the currently displayed user prompt.\n\n#### Response\n\n`null`\n\n### getAlertText\n\n```\nGET /session/:sessionId/alert/text\n```\n\n> WebDriver documentation: [Get Alert Text](https://w3c.github.io/webdriver/#get-alert-text)\n\nRetrieves the text of the currently displayed user prompt.\n\n#### Response\n\n`string` - prompt text\n\n### setAlertText\n\n```\nPOST /session/:sessionId/alert/text\n```\n\n> WebDriver documentation: [Send Alert Text](https://w3c.github.io/webdriver/#send-alert-text)\n\nSets the text of the currently displayed user prompt.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ----------- | ------ |\n| `text` | Text to set | string |\n\n#### Response\n\n`null`\n\n### getScreenshot\n\n```\nGET /session/:sessionId/screenshot\n```\n\n> WebDriver documentation: [Take Screenshot](https://w3c.github.io/webdriver/#take-screenshot)\n\nTakes a screenshot of the current browsing context.\n\n#### Response\n\n`string` - a base64-encoded PNG image\n\n### getElementScreenshot\n\n```\nGET /session/:sessionId/element/:elementId/screenshot\n```\n\n> WebDriver documentation: [Take Element Screenshot](https://w3c.github.io/webdriver/#take-element-screenshot)\n\nTakes a screenshot of the visible region encompassed by the bounding rectangle of the element\nidentified by `:elementId`.\n\n#### Response\n\n`string` - a base64-encoded PNG image\n\n### printPage\n\n```\nPOST /session/:sessionId/print\n```\n\n> WebDriver documentation: [Print Page](https://w3c.github.io/webdriver/#print-page)\n\nPrints the page by rendering it as a paginated PDF document.\n\n#### Parameters\n\n|
Name
| Description |
Type
| Default |\n| --------------------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------- | ---------- |\n| `orientation?` | Page orientation. Supported values are `portrait` or `landscape`. | string | `portrait` |\n| `scale?` | Page scale. Supported values are in the range `[0.1, 2]`. | number | `1` |\n| `background?` | Whether to include background images | boolean | `false` |\n| `page?` | Object specifying the page width and height | [`PrintPageSize`](#printpagesize) | `{}` |\n| `margin?` | Object specifying the page margins | [`PrintPageMargins`](#printpagemargins) | `{}` |\n| `shrinkToFit?` | Whether to resize page contents to match `PrintPageSize.width` | boolean | `true` |\n| `pageRanges?` | Array of pages to be printed, for example, `[1, 4, '8-9']` | array | `[]` |\n\n##### `PrintPageSize`\n\n| Name | Description | Type | Default |\n| --------- | -------------------------------------------------------------------------------------------- | ------ | ------- |\n| `width?` | Page width. Must be greater than or equal to `(2.54 / 72)`. | number | `21.59` |\n| `height?` | Page height. Must be greater than or equal to `(2.54 / 72)`. | number | `27.94` |\n\n##### `PrintPageMargins`\n\n| Name | Description | Type | Default |\n| --------- | ----------------------------------------------------------------------------------------- | ------ | ------- |\n| `top?` | Page top margin. Must be greater than or equal to `0`. | number | `1` |\n| `bottom?` | Page bottom margin. Must be greater than or equal to `0`. | number | `1` |\n| `left?` | Page left margin. Must be greater than or equal to `0`. | number | `1` |\n| `right?` | Page right margin. Must be greater than or equal to `0`. | number | `1` |\n\n#### Response\n\n`string` - a base64-encoded PDF document\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/reference/cli/env-vars.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Environment Variables\n---\n\nThe primary ways of configuring the Appium server are via [Command-Line Arguments](./server.md) or\nthe [Config File](../../guides/config.md). However, some more advanced features are toggled or\nconfigured via environment variables. To set environment variables, refer to the documentation for\nyour operating system and terminal.\n\nThese are the environment variables that the Appium server understands:\n\n|
Variable
| Description |\n| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `APPIUM_APPS_CACHE_IGNORE_URL_QUERY` | Set this to a truthy value to remove any query part of a URL when using it as a cache key. See the corresponding [feature request](https://discuss.appium.io/t/regarding-app-caching-when-using-aws-s3-presigned-urls/42713) for more details. |\n| `APPIUM_APPS_CACHE_MAX_AGE` | Set the maximum age (in minutes) for [cached applications](../../guides/caching.md). Do not set it to a lower number than the duration of a single session startup. Default: `60 * 24` (24 hours) |\n| `APPIUM_APPS_CACHE_MAX_ITEMS` | Set the maximum amount of [cached applications](../../guides/caching.md). Do not set it to a lower number than the amount of apps in all parallel sessions per process. Default: `1024` |\n| `APPIUM_HOME` | Set the path to the Appium home directory, which is used for [Managing Extensions](../../guides/managing-exts.md). Default: `.appium` in the home directory of the current user |\n| `APPIUM_OMIT_PEER_DEPS` | Set this to `1` to add `--omit=peer` to all the NPM commands run internally by Appium. Mostly an internal feature. |\n| `APPIUM_RELOAD_EXTENSIONS` | Set this to a truthy value to cause Appium to re-require extensions when new sessions are created. This feature is mostly useful for [building extensions](../../developing/build-drivers.md). |\n| `APPIUM_TMP_DIR` | Set the path to the directory used for temporary files. Same as the `--tmp` command line argument. |\n\nAppium drivers and plugins may define additional environment variables. The following variables are\nused by official plugins:\n\n|
Variable
| Plugin | Description |\n| -------------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `APPIUM_STORAGE_KEEP_ALL` | `storage` | Set this to `1`, `true` or `yes` to preserve files in the storage after the server process is terminated. By default, stopping the server process also deletes all files in the storage. |\n| `APPIUM_STORAGE_ROOT` | `storage` | Set the path to the directory used for storage. If set to an existing folder, all files in it will be retained after terminating the server, unless specified otherwise using `APPIUM_STORAGE_KEEP_ALL`. |\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/reference/cli/extensions.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: appium driver/plugin\n---\n\n\n\nProvides management options for a specific extension (driver or plugin). Both the `appium driver` and\n`appium plugin` subcommands support the same options.\n\nThe following sub-subcommands are supported: `doctor`, `install`, `list`, `run`, `update`,\nand `uninstall`.\n\n## `doctor`\n\nRuns doctor checks for an installed extension, which validate whether the extension has its prerequisites\nconfigured correctly. Note that not all extensions include doctor checks.\n\n!!! note\n\n If you maintain an Appium extension and would like to add Appium Doctor support for it, check\n out the documentation on [Building Doctor Checks](../../developing/build-doctor-checks.md).\n\n#### Usage\n\n```\nappium {driver|plugin} doctor \n```\n\n| Argument | Description |\n| ---------------- | ----------------------------------------- |\n| `extension-name` | The short name of the installed extension |\n\n#### Options\n\n| Argument | Description | Type |\n| -------- | -------------------------------- | ------- |\n| `--json` | Return the result in JSON format | boolean |\n\n#### Example\n\n- Run doctor checks for the UiAutomator2 driver:\n\n ```\n appium driver doctor uiautomator2\n ```\n\n## `install`\n\nInstalls an extension.\n\n#### Usage\n\n```\nappium {driver|plugin} install \n```\n\n|
Argument
| Description |\n| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `install-spec` | The short name of an official extension, with optional `npm` version or tag modifier. If using the `--source` option, the expected format of this argument will change ([see below](#source-vs-install-spec)). |\n\n#### Options\n\n| Argument | Description | Type |\n| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |\n| `--json` | Return the result in JSON format | boolean |\n| `--package` | The Node.js package name of the extension. Required if `--source` is set to `git` or `github`. | string |\n| `--source` | The location where Appium should look for the given extension. Supported values are `git`, `github`, `local`, or `npm`. Changes the expected format of `install-spec` ([see below](#source-vs-install-spec)). | string |\n\n#### Source vs Install Spec\n\n| `source` | Format of `` |\n| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| None | The short name of an official extension, with optional modifiers as supported by `npm install` (e.g. version or tag) |\n| `git` | The Git URL of the extension |\n| `github` | The GitHub repository URL of the extension |\n| `local` | The local path to the extension containing its `package.json` file |\n| `npm` | The name of the `npm` package, with optional modifiers as supported by `npm install` (e.g. version or tag) |\n\n#### Examples\n\n- Install the latest XCUITest driver:\n\n ```\n appium driver install xcuitest\n ```\n\n- Install the XCUITest driver at version 9.0.0:\n\n ```\n appium driver install xcuitest@9.0.0\n ```\n\n- Install the `beta` version of `@appium/fake-driver` from `npm`:\n\n ```\n appium driver install @appium/fake-driver@beta --source=npm\n ```\n\n- Install a locally-developed plugin:\n\n ```\n appium plugin install /path/to/my/plugin --source=local\n ```\n\n- Install the XCUITest driver from GitHub:\n\n ```\n appium driver install https://github.com/appium/appium-xcuitest-driver --source=github --package=appium-xcuitest-driver\n ```\n\n- Install the XCUITest driver using a Git URL:\n\n ```\n appium driver install git://github.com/appium/appium-xcuitest-driver.git --source=git --package=appium-xcuitest-driver\n ```\n\n- Install a branch of XCUITest driver repository using a Git URL:\n\n ```\n appium driver install git://github.com/appium/appium-xcuitest-driver.git#specific-branch --source=git --package=appium-xcuitest-driver\n ```\n\n## `list`\n\nLists all installed extensions, plus all official extensions that are not installed.\n\n#### Usage\n\n```\nappium {driver|plugin} list\n```\n\n#### Options\n\n|
Argument
| Description | Type |\n| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |\n| `--installed` | Only list all installed extensions | boolean |\n| `--json` | Return the result in JSON format | boolean |\n| `--updates` | List all extensions along with information on whether newer versions are available. Only supported for extensions installed via `npm`. | boolean |\n| `--verbose` | Show additional details for each extension | boolean |\n\n#### Example\n\n- List all installed drivers and check if they have newer versions available:\n\n ```\n appium driver list --installed --updates\n ```\n\n## `run`\n\nRuns an extension script, which can assist with setup or perform other tasks. Note that not all\nextensions include scripts.\n\n#### Usage\n\n```\nappium {driver|plugin} run [script-args]\n```\n\n| Argument | Description |\n| ---------------- | --------------------------------------------- |\n| `extension-name` | The short name of the installed extension |\n| `script-name` | The name of the script to be run |\n| `script-args` | Any additional arguments passed to the script |\n\n#### Options\n\n| Argument | Description | Type |\n| -------- | -------------------------------- | ------- |\n| `--json` | Return the result in JSON format | boolean |\n\n#### Example\n\n- Run the `reset` script included in the UiAutomator2 driver:\n\n ```\n appium driver run uiautomator2 reset\n ```\n\n## `update`\n\nUpdates one or more extensions. Only supported for extensions installed via `npm`. By default,\nAppium will only update minor and patch versions, in order to prevent any breaking changes.\n\n#### Usage\n\n```\nappium {driver|plugin} update \n```\n\n| Argument | Description |\n| ---------------- | -------------------------------------------------------------------------------------------- |\n| `extension-name` | The short name of the installed extension, or `installed` to update all installed extensions |\n\n#### Options\n\n| Argument | Description | Type |\n| ---------- | ----------------------------------------------------------------- | ------- |\n| `--json` | Return the result in JSON format | boolean |\n| `--unsafe` | Allow updates of major versions, which may cause breaking changes | boolean |\n\n#### Examples\n\n- Update the UiAutomator2 driver to its latest major version:\n\n ```\n appium driver update uiautomator2 --unsafe\n ```\n\n- Update all installed plugins:\n\n ```\n appium plugin update installed\n ```\n\n## `uninstall`\n\nRemoves an installed extension.\n\n#### Usage\n\n```\nappium {driver|plugin} uninstall \n```\n\n| Argument | Description |\n| ---------------- | ----------------------------------------- |\n| `extension-name` | The short name of the installed extension |\n\n#### Options\n\n| Argument | Description | Type |\n| -------- | -------------------------------- | ------- |\n| `--json` | Return the result in JSON format | boolean |\n\n#### Example\n\n- Remove the `images` plugin:\n\n ```\n appium plugin uninstall images\n ```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/reference/cli/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Command Line Interface\n---\n\nAppium provides a command-line executable (`appium`), which can be used to configure and launch\nthe Appium server, as well as manage Appium extensions (drivers and plugins).\n\nThe executable has four main subcommands: `server`, `driver`, `plugin`, and `setup`. All subcommands\n(and sub-subcommands) can be run with the `--help`/`-h` option for usage instructions.\n\n
\n\n- [**`appium server`**](./server.md) (or simply `appium`)\n\n Start an Appium server\n\n- [**`appium driver`**](./extensions.md)\n\n Manage individual drivers\n\n- [**`appium plugin`**](./extensions.md)\n\n Manage individual plugins\n\n- [**`appium setup`**](./setup.md)\n\n Manage multiple drivers/plugins\n\n
\n\nAppium also recognizes several [environment variables](./env-vars.md), which may be used for\nadvanced configuration.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/reference/cli/server.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: appium server\n---\n\nLaunches an Appium server.\n\n```\nappium server\n```\n\nYou can also omit the `server` subcommand:\n\n```\nappium\n```\n\n### Options\n\n!!! note\n\n All of these options can also be set via a [Configuration File](../../guides/config.md). Options\n set on the command line will override any options found in a configuration file.\n\n|
Argument
| Description | Type |
Default
|\n| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------------------------------------------------------- |\n| `--address`, `-a` | IPv4/IPv6 address to listen on | string | `0.0.0.0` |\n| `--allow-cors` | Allow web browser connections from any host | boolean | `false` |\n| `--allow-insecure` | List of [insecure features](../../guides/security.md) that should be allowed in this server's sessions. Individual features can be overridden by `--deny-insecure`. Has no effect in combination with `--relaxed-security`. | array | `[]` |\n| `--base-path`, `-pa` | Base path to use as the prefix for all webdriver routes running on the server | string | `\"\"` |\n| `--callback-address`, `-ca` | Callback IP address | string | `0.0.0.0` |\n| `--callback-port`, `-cp` | Callback port | integer | `4723` |\n| `--config` | Path to an [Appium configuration JSON file](../../guides/config.md) | string | |\n| `--debug-log-spacing` | Add exaggerated spacing in logs to help with visual inspection | boolean | `false` |\n| `--default-capabilities`, `-dc` | Capabilities that will be used for each session, unless overridden by received capabilities | object | |\n| `--deny-insecure` | List of [insecure features](../../guides/security.md) that should be disabled in this server's sessions. Since all insecure features are disabled by default, this argument has no effect without either `--allow-insecure` or `--relaxed-security`, and is applied after both. | array | `[]` |\n| `--driver` | Driver-specific configuration. Keys should correspond to driver package names | object | |\n| `--drivers-import-chunk-size` | Maximum number of drivers that can be imported in parallel on server startup | number | `3` |\n| `--keep-alive-timeout`, `-ka` | Timeout (in seconds) to use as both the keep-alive timeout and the connection timeout for all client requests. Disabled if set to `0`. | integer | `600` |\n| `--request-timeout` | Timeout (in seconds) for waiting to receive the entire HTTP request from the client. Disabled if set to `0`. Requests exceeding this timeout will be rejected with the code `HTTP 408`. | integer | `3600` |\n| `--local-timezone` | Use local timezone for log timestamps | boolean | `false` |\n| `--log`, `-g` | Path to a file where the server logs should be output. This does not affect output on the console. | string | |\n| `--log-filters` | List of log filtering rules. See the [log filtering guide](../../guides/log-filters.md) for details. | array | |\n| `--log-level` | The log level for the server logs. Supported values are `debug`, `info`, `warn`, or `error`. Combining two supported values using a colon (e.g. `warn:debug`) allows to set separate log levels for the console and file outputs, respectively. | string | `debug` |\n| `--log-format` | The log format of the server logs. Supported values are `text`, `json`, or `pretty_json`. Setting the value to `json` disables colors. | string | `text` |\n| `--log-no-colors` | Disable colors in the server log | boolean | `false` |\n| `--log-timestamp` | Show timestamps in the server log | boolean | `false` |\n| `--long-stacktrace` | Add long stack traces to log entries. Recommended for debugging only. | boolean | `false` |\n| `--no-perms-check` | Skip various permission checks on the server startup | boolean | `false` |\n| `--nodeconfig` | JSON configuration for registering Appium as a node with Selenium Grid 3 | object | |\n| `--plugin` | Plugin-specific configuration. Keys should correspond to plugin package names | object | |\n| `--plugins-import-chunk-size` | Maximum number of plugins that can be imported in parallel on server startup | number | `7` |\n| `--port`, `-p` | Port to listen on | integer | `4723` |\n| `--relaxed-security` | Allow all [insecure features](../../guides/security.md). Only use this if all clients are in a trusted network and could not potentially break out of the session sandbox. Specific features can be overridden by using `--deny-insecure`. | boolean | `false` |\n| `--session-override` | Enable session override (clobbering) | boolean | `false` |\n| `--shutdown-timeout` | Timeout (in milliseconds) for waiting on all active connections to close, when shutting down the server | number | `5000` |\n| `--ssl-cert-path` | Absolute path to the `.cert` file if TLS is used. Must be provided together with `--ssl-key-path`. See the [SSL/TLS/SPDY Support guide](../../guides/tls.md) for details. | string | |\n| `--ssl-key-path` | Absolute path to the `.key` file if TLS is used. Must be provided together with `--ssl-cert-path`. See the [SSL/TLS/SPDY Support guide](../../guides/tls.md) for details. | string | |\n| `--strict-caps` | Prevent creation of new client sessions that use unsupported capabilities | boolean | `false` |\n| `--tmp` | Absolute path to the directory used for temporary files | string | [`os.tmpdir()`](https://nodejs.org/api/os.html#ostmpdir) |\n| `--use-drivers` | List of drivers to activate. By default, all installed drivers are activated. | array | `[]` |\n| `--use-plugins` | List of plugins to activate. By default, no plugins are activated. Set to `[\"all\"]` to activate all installed plugins. | array | `[]` |\n| `--webhook`, `-G` | URL for an HTTP listener where the server logs should be output. This does not affect output on the console. | string | |\n\n### Info Options\n\nThe following options are used for reference or debug purposes. They are only supported for the base `appium` command (not `appium server`), and will not launch the server.\n\n|
Argument
| Description |\n| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `--show-build-info` | Print detailed information on the Appium server version |\n| `--show-config` | Print the current Appium server configuration details |\n| `--show-debug-info` | Print information on the current environment: details about the operating system, Node.js, and Appium itself |\n| `--version`, `-v` | Print the Appium server version |\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/reference/cli/setup.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: appium setup\n---\n\n\n\nInstalls a specific preset of extensions (drivers and plugins), or uninstalls all extensions.\nWhen installing a preset, any already installed extensions are kept intact.\n\nThe following sub-subcommands are supported: `browser`, `desktop`, `mobile`, and `reset`.\n\nRefer to the [Ecosystem documentation](../../ecosystem/index.md) to learn more about the extensions\nmentioned below.\n\n## `browser`\n\nInstalls the following extensions for browser webview testing:\n\n- Drivers: `safari`[^1], `gecko`, `chromium`\n- Plugins: `images`, `inspector`\n\n#### Usage\n\n```\nappium setup browser\n```\n\n## `desktop`\n\nInstalls the following extensions for desktop application testing:\n\n- Drivers: `mac2`[^1], `windows`[^2]\n- Plugins: `images`, `inspector`\n\n#### Usage\n\n```\nappium setup desktop\n```\n\n## `mobile`\n\nInstalls the following extensions for mobile testing:\n\n- Drivers: `uiautomator2`, `xcuitest`[^1], `espresso`\n- Plugins: `images`, `inspector`\n\n#### Usage\n\n```\nappium setup mobile\n```\n\nYou can also omit the `mobile` sub-subcommand:\n\n```\nappium setup\n```\n\n## `reset`\n\nUninstalls all installed extensions, along with their manifest files, from the Appium home\ndirectory. This can be useful if you experience configuration issues on server startup, for\nexample, due to a failed upgrade attempt from an older Appium version.\n\n#### Usage\n\n```\nappium setup reset\n```\n\n[^1]: Only installed if the host machine is running macOS.\n\n[^2]: Only installed if the host machine is running Windows.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/resources/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - navigation\n - toc\n\ntitle: Additional Resources\n---\n\nHere you can find links to additional Appium resources around the web:\n\n## Websites\n\n- [Appium Pro](https://appiumpro.com) - a blog and newsletter written by one of Appium's\n maintainers, Jonathan Lipps, with lots of useful guides\n\n## Online Courses\n\n- [Appium and Selenium Fundamentals](https://ui.headspin.io/university/learn/appium-selenium-fundamentals-2020) - a comprehensive video course on learning Python, Selenium, and Appium by Jonathan Lipps\n- [Mobile Test Automation with Appium](https://testautomationu.applitools.com/appium-java-tutorial/) - a video course by Moataz Nabil\n- [Advanced Appium](https://www.linkedin.com/learning/advanced-appium) - a video course by Jonathan Lipps\n\n## Conference Archives\n\n- [AppiumConf 2018](https://www.youtube.com/playlist?list=PLhr2WKNPXcZOmOf1k2aqkbMZwnZb2pSZL)\n- [AppiumConf 2019](https://www.youtube.com/playlist?list=PL9Z-JgiTsOYSfJh9YKI9Stj3FMwHERw6w)\n- [AppiumConf 2021](https://www.youtube.com/playlist?list=PL9Z-JgiTsOYRCcJhDfmKAah9XmAp2b903)\n- [AppiumConf 2024](https://www.youtube.com/playlist?list=PL9Z-JgiTsOYQaU5i5LJtAWlh5WVZPi3If)\n- [SeleniumConf & AppiumConf 2025](https://www.youtube.com/playlist?list=PLRdSclUtJDYV2R92TLbmwxws6clruuTjH)\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/ja/sponsors/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - navigation\n - toc\n\ntitle: Sponsors & Backers\n---\n\n\n\nAppium is an Apache-2 licensed open source project whose development is made possible entirely by\ndonations of time and money by individuals and companies who benefit from our software and our\nmission. If you'd like to join this amazing group and help ensure Appium's continued development\nand maintenance, you can contribute via Appium's OpenCollective\nHub.\n\n## Development Partners\n\nWe are very grateful for the support of our Development Partners, who donate Appium development and\nmaintenance as part of their employees' core job duties!\n\n\n \"TestMu\n \"TestMu\n\n\n## Strategic Partners\n\nWe are very grateful for the financial and marketing support of our exclusive Strategic Partners,\nwho contribute a significant ongoing investment of funds to help the project attract and reward\ncontributors!\n\n\n \"BrowserStack\"\n \"BrowserStack\"\n\n\n\n \"TestMu\n \"TestMu\n\n\n## Gold Sponsors\n\n
\"Jetify\"\n
\n\n[Become a Gold Sponsor](https://opencollective.com/appium/contribute/gold-sponsor-72877/checkout?interval=month&amount=500&contributeAs=me)\n\n## Silver Sponsors\n\n
\"MagicPod\"\n
\n\n[Become a Silver Sponsor](https://opencollective.com/appium/contribute/silver-sponsor-72876/checkout?interval=month&amount=250&contributeAs=me)\n\n## Bronze Sponsors\n\n
\"Route4Me\"\n \"WebdriverIO\"\n
\n\n[Become a Bronze Sponsor](https://opencollective.com/appium/contribute/sponsors-70690/checkout?interval=month&amount=100&contributeAs=me)\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/scripts/build-docs.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n/**\n * This builds the docs.\n *\n * For simplicity this file is not transpiled and is run directly via an npm script.\n * @module\n */\n\n// @ts-check\n\n/* eslint-disable promise/prefer-await-to-callbacks */\n/* eslint-disable promise/prefer-await-to-then */\n\nconst {deploy, buildSite} = require('@appium/docutils');\nconst {\n log,\n LANGS,\n DOCS_DIR,\n DOCS_BRANCH,\n DOCS_PREFIX,\n DOCS_REMOTE,\n LATEST_ALIAS,\n} = require('./utils');\nconst path = require('node:path');\nconst semver = require('semver');\nconst {version} = require('../../package.json');\n\nconst branch = process.env.APPIUM_DOCS_BRANCH ?? DOCS_BRANCH;\nconst basePrefix = process.env.APPIUM_DOCS_PREFIX ?? DOCS_PREFIX;\nconst remote = process.env.APPIUM_DOCS_REMOTE ?? DOCS_REMOTE;\nconst preview = Boolean(process.env.APPIUM_DOCS_PREVIEW);\n\nconst push = Boolean(process.env.APPIUM_DOCS_PUBLISH);\n\nasync function main() {\n log.info(`Building Appium docs and committing to ${DOCS_BRANCH}`);\n\n const semVersion = semver.parse(version);\n if (!semVersion) {\n throw new Error(`Could not parse Appium version \"${version}\" as semver`);\n }\n const majMinVer = `${semVersion.major}.${semVersion.minor}`;\n\n for (const lang of LANGS) {\n log.info(`Building docs for language '${lang}' and version ${majMinVer}`);\n const configFile = path.join(DOCS_DIR, `mkdocs-${lang}.yml`);\n if (preview) {\n await buildSite({\n mkdocsYml: configFile,\n siteDir: path.join('site', lang),\n });\n } else {\n await deploy({\n mkdocsYml: configFile,\n branch,\n deployPrefix: path.join(basePrefix, lang),\n remote,\n deployVersion: majMinVer,\n push,\n alias: LATEST_ALIAS,\n message: `docs(appium): auto-build docs for appium@${majMinVer}, language ${lang}`,\n });\n }\n log.info(`Docs built`);\n }\n}\n\nif (require.main === module) {\n main().catch((err) => {\n throw err;\n });\n}\n\nmodule.exports = main;\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/scripts/gen-cli-args-docs.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// for simplicity this file is not transpiled and is run directly via an npm script\n/* eslint-disable no-console */\n/* eslint-disable promise/prefer-await-to-callbacks */\n/* eslint-disable promise/prefer-await-to-then */\n\nconst path = require('node:path');\nconst {fs} = require('@appium/support');\nconst {AppiumConfigJsonSchema} = require('@appium/schema');\n\nconst DOC_PATH = path.resolve(__dirname, '..', 'en', 'cli', 'args.md');\n\nconst START_TAG = ``;\nconst STOP_TAG = ``;\n\nasync function main() {\n console.log(`Gathering current cli doc file contents...`);\n const [preStart, postEnd] = await getDocParts();\n console.log(`Generating new cli arg table...`);\n const argTable = getCliArgTable();\n console.log(`Writing new doc file...`);\n await writeNewDoc(preStart, argTable, postEnd);\n console.log(`...done!`);\n}\n\nasync function getDocParts() {\n if (!(await fs.exists(DOC_PATH))) {\n throw new Error(`Cannot find args.md at ${DOC_PATH}`);\n }\n\n const curContents = await fs.readFile(DOC_PATH, 'utf-8');\n\n // attempt to verify the start/stop tags\n const [preStart, postStart] = curContents.split(START_TAG);\n if (!postStart) {\n throw new Error(`Could not find autogen start tag '${START_TAG}'. Make sure it's in place!`);\n }\n const [, postEnd] = postStart.split(STOP_TAG);\n if (!postEnd) {\n throw new Error(`Could not find autogen stop tag '${STOP_TAG}'. Make sure it's in place!`);\n }\n\n return [preStart, postEnd];\n}\n\nfunction getCliArgTable() {\n const pad = ' '.repeat(30);\n const header = `|Argument${pad}|Description|Type|Default|Aliases|\\n` + `|--|--|--|--|--|`;\n const serverProps = AppiumConfigJsonSchema.properties.server.properties;\n const args = Object.keys(serverProps).map((arg) => {\n let {appiumCliAliases = [], description, type, items, maximum, minimum} = serverProps[arg];\n let def = serverProps[arg].default;\n let enums = serverProps[arg].enum;\n if (type === 'array' || type === 'object' || (type === 'string' && def === '')) {\n def = JSON.stringify(def);\n }\n if (type === 'array' && items.type) {\n type = `array<${items.type}>`;\n }\n if (type === 'integer' && typeof minimum !== 'undefined' && typeof maximum !== 'undefined') {\n description = `${description} (Value must be between \\`${minimum}\\` and \\`${maximum}\\`)`;\n }\n if (enums) {\n const enumsFormatted = enums.map((e) => `\\`${e}\\``).join(', ');\n description = `${description} (Value must be one of: ${enumsFormatted})`;\n }\n return {\n arg: `--${arg}`,\n aliases: appiumCliAliases.map((a) => `-${a}`),\n type,\n def,\n description,\n };\n });\n const body = args\n .map(({arg, aliases, type, def, description}) => {\n const aliasStr = aliases.map((a) => `\\`${a}\\``).join(', ');\n def = typeof def !== 'undefined' ? `\\`${def}\\`` : '';\n return `|\\`${arg}\\`|${description}|${type}|${def}|${aliasStr}|`;\n })\n .join('\\n');\n return `${header}\\n${body}`;\n}\n\nasync function writeNewDoc(preStart, argTable, postEnd) {\n const newContents = `${preStart}${START_TAG}\\n${argTable}\\n${STOP_TAG}${postEnd}`;\n await fs.writeFile(DOC_PATH, newContents);\n}\n\nif (require.main === module) {\n main().catch((err) => {\n throw err;\n });\n}\n\nmodule.exports = main;\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/scripts/utils.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\n// for simplicity this file is not transpiled and is run directly via an npm script\n//\nconst {logger} = require('@appium/support');\nconst path = require('node:path');\n\nconst log = logger.getLogger('Docs');\n\nconst DOCS_REMOTE = 'origin';\nconst DOCS_BRANCH = 'gh-pages';\nconst DOCS_PREFIX = 'docs';\nconst DOCS_DIR = path.resolve(__dirname, '..');\nconst LATEST_ALIAS = 'latest';\nconst ASSETS_DIR = path.join(DOCS_DIR, 'assets');\nconst LANGS = ['en', 'ja', 'zh'];\nconst DEFAULT_LANG = 'en';\n\nmodule.exports = {\n log,\n DOCS_DIR,\n ASSETS_DIR,\n LANGS,\n DEFAULT_LANG,\n DOCS_BRANCH,\n DOCS_PREFIX,\n DOCS_REMOTE,\n LATEST_ALIAS,\n};\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - \u5bfc\u822a\u680f\n - toc\n\ntitle: \u6b22\u8fce\u4f7f\u7528\n---\n\n\n\n
\n \n
\n\n\u6b22\u8fce\u6765\u5230 Appium \u6587\u6863\uff01 Appium\u662f\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\u548c\u76f8\u5173\u8f6f\u4ef6\u751f\u6001\u7cfb\u7edf\uff0c\u65e8\u5728\u4fc3\u8fdb\u591a\u79cd\u5e94\u7528\u5e73\u53f0\u7684\u7528\u6237\u754c\u9762\u81ea\u52a8\u5316\uff0c\u5305\u62ec\u79fb\u52a8\u7aef\uff08iOS\u3001Android\u3001Tizen\uff09\u3001\u6d4f\u89c8\u5668\u7aef\uff08Chrome\u3001Firefox\u3001Safari\uff09\u3001\u684c\u9762\u7aef\uff08macOS\u3001Windows\uff09\u3001\u7535\u89c6\u7aef\uff08Roku\u3001tvOS\u3001Android TV\u3001\u4e09\u661f\uff09\u7b49\uff01\n\n
\n Appium \u975e\u5e38\u611f\u8c22\u4e3b\u8981\u5408\u4f5c\u4f19\u4f34\u7684\u652f\u6301\uff01 (\u4e86\u89e3\u66f4\u591a\u5173\u4e8e\u6211\u4eec\u7684\u8d5e\u52a9\u8ba1\u5212\u548c\u8d21\u732e\u8005\u8865\u507f\u8ba1\u5212\u4fe1\u606f\u8bf7\u70b9\u51fb\u6b64\u5904) \n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n\n## \u63a2\u7d22\u6587\u6863\n\n
\n\n- \u67e5\u770b [**\u7b80\u4ecb**](./intro/index.md) \u4ee5\u786e\u4fdd\u60a8\u7406\u89e3\u5173\u952e\u6982\u5ff5\n- \u901a\u8fc7 [**\u5feb\u901f\u5f00\u59cb**](./quickstart/index.md) \u6765\u8bbe\u7f6e\u5e76\u8fd0\u884c\u4e00\u4e2a\u57fa\u672c\u7684 Android \u6d4b\u8bd5\n- \u8bbf\u95ee [**\u751f\u6001\u7cfb\u7edf**](./ecosystem/index.md) \u9875\u9762\uff0c\u83b7\u53d6\u60a8\u53ef\u80fd\u60f3\u8981\u4f7f\u7528\u7684\u9a71\u52a8\u7a0b\u5e8f\u3001\u5ba2\u6237\u7aef\u548c\u63d2\u4ef6\u5217\u8868\n- \u8bbf\u95ee [**Reference**](./reference/index.md) \u9875\u9762\u83b7\u53d6Appium CLI \u548c\u652f\u6301\u7684\u7aef\u70b9\u4fe1\u606f\n- \u9605\u8bfb\u4e0d\u540c\u7248\u672c\u7684 [**\u6307\u5357**](./guides/migrating-2-to-3.md)\uff0c\u4e86\u89e3\u5404\u7248\u672c\u7684\u8bf4\u660e\u3001\u63d0\u793a\u548c\u6280\u5de7\n- \u67e5\u770b\u5404\u79cd\u7b2c\u4e09\u65b9 [**\u8d44\u6e90**](./resources/index.md) \u4ee5\u63a2\u7d22\u7f51\u7edc\u4e0a\u7684 Appium\n- \u8981\u521b\u5efa\u81ea\u5df1\u7684 Appium \u6269\u5c55\uff0c\u8bf7\u53c2\u9605 [**\u5f00\u53d1\u8005**](./developing/index.md) \u6587\u6863\n- \u6709\u5173\u5bf9 Appium \u7684\u8d21\u732e\uff0c\u8bf7\u67e5\u9605 [**\u8d21\u732e**](./contributing/index.md) \u9875\u9762\n- \u67e5\u770b [**Appium\u535a\u5ba2**](./blog/index.md) \uff0c\u4e86\u89e3\u9879\u76ee\u4e2d\u7684\u65b0\u5185\u5bb9\n\n
\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/blog/posts/announcing-appiumconf2024.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - srini\n - sai\ndate: 2024-07-13\n---\n\n# Appium Conf 2024: Call for Proposals Now Open!\n\nWe're thrilled to announce that Appium Conf is back and going online for 2024! This is the official Appium conference where you can learn all about what's new in Appium 2.0 and explore the latest in automating tests for devices, mobile apps, and desktop applications.\n\n\n\n
\n \n \"Appium\n\n
\n\n## Mark Your Calendars: September 13, 2024\n\nJoin us on September 13, 2024, for a full day of inspiring and practical talks from the Appium team and the world's top mobile testing and automation experts. With Appium 2.0 now well-established, this is your opportunity to dive deep and learn how to maximize its potential.\n\n## Why Attend Appium Conf 2024?\n\n1. **Gain Insights**: Hear interesting insights and inspiring case studies from global experts and the core Appium team.\n2. **Improve Your Strategy**: Gain valuable knowledge to enhance your own automation strategy.\n3. **Network**: Make connections with Appium users from around the globe.\n4. **Learn from Specialists**: Benefit from Appium specialists' expertise on a variety of topics.\n\n## Call for Proposals: Share Your Knowledge!\n\nWe're looking for a diverse range of speakers from around the globe who are eager to share innovative ideas and use-cases of mobile test automation. If you have experience with Appium and insights that could benefit the community of test practitioners, we want to hear from you!\n\nDon't miss this chance to contribute to the Appium community and showcase your expertise on a global stage.\n\n## How to Submit Your Proposal\n\nVisit our website at [https://appiumconf.com/](https://appiumconf.com/) and [Submit a Proposal](https://confengine.com/conferences/appium-conf-2024/proposals?utm_medium=referal&utm_source=appium.io&utm_campaign=launch). We're excited to see your innovative ideas and experiences with Appium!\n\n## Stay Tuned\n\nKeep an eye on our website and social media channels for updates on the conference schedule, keynote speakers, and more exciting details about Appium Conf 2024.\n\nJoin us in shaping the future of mobile and device test automation. Submit your proposal today and be part of this exciting event!\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/blog/posts/announcing-browserstack-as-strategic-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-06-10\n---\n\n# Announcing BrowserStack as Appium's Strategic Partner\n\nWe have another exciting announcement for you! As part of our recently-announced sponsorship and\ncontributor compensation\nprogram,\nwe are obviously in need of significant funding to support giving back to our contributor\ncommunity. We are therefore extremely happy to announce one of our brand new exclusive Strategic Partners: BrowserStack!\n\n\n\n\n\nBrowserStack has long been recognized in the industry as having extensive support for Appium,\nallowing you to run functional and visual regression tests for your native and hybrid apps at scale\nacross a variety of devices and platforms.\n\nAs a token of this collaboration, BrowserStack is extending a special premium access of\nBrowserStack App Automate product to Appium users. Discover more about this special offer at\n[browserstack.com](https://www.browserstack.com/browserstack-appium?utm_campaigncode=701OW00000AoUTQYA3&utm_medium=partnered&utm_source=appium&utm_term=partannouncement)\n\nWith the decision to come on board as Strategic Partner, BrowserStack is making a huge investment\nin Appium and the Appium community. BrowserStack is very interested in supporting the development\nof the Appium contributor base, and is proud to be a key part of our contributor compensation\nscheme. Without Strategic Partners like BrowserStack, we would not be able to maintain such\na program! We welcome them with gratitude!\n\n**About BrowserStack**\n\nBrowserStack is the world\u2019s leading software testing platform powering over two million tests every\nday across 19 global data centers. BrowserStack helps Tesco, Shell, NVIDIA, Discovery, Wells Fargo,\nand over 50,000 customers deliver quality software at speed by moving testing to their Cloud.\nBrowserStack\u2019s platform provides instant access to 20,000+ real mobile devices on a highly reliable\ncloud infrastructure that effortlessly scales as testing needs grow. With BrowserStack, Dev and QA\nteams can move fast while delivering an amazing experience for every customer.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/blog/posts/announcing-headspin-as-development-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-06-06\n---\n\n# Announcing HeadSpin as Appium's Development Partner\n\nRecently, we announced a new [sponsorship and contributor compensation program](https://appium.io/docs/en/latest/blog/2024/05/14/announcing-appiums-sponsorship-program/) for the Appium\nproject. As part of this program, we felt it was important to have a place to recognize those\ncompanies who make an extremely valuable kind of contribution to the project: dedicated maintainer\ntime. Appium only survives because of the tireless efforts of the core maintainers, and some of us\nare only able to do this work because it is donated on behalf of our day jobs. We're therefore very\nexcited to announce our first Development Partner: HeadSpin!\n\n\n\n
\n \n
\n\nHeadSpin is a real device performance and UX analysis cloud, with full support for Appium. When you\nrun your Appium tests on HeadSpin, you get access to comprehensive performance reports about your\napp, including potential network, system resource, or user experience issues. HeadSpin supports\na variety of complex testing modes, including hooking up your own devices to the cloud, injecting\nand receiving video and audio to/from devices, working with media (streaming) platforms, and more.\n\nHeadSpin has been one of the Appium project's biggest supporters for a long time, and currently\nemploys two of Appium's core maintainers, donating a significant portion of their time towards the\ndevelopment, maintenance, support, and leadership of open source Appium repos. HeadSpin has also\nworked hard towards Appium's vision of a robust Appium ecosystem, contributing several\nHeadSpin-maintained Appium drivers and plugins to the community:\n\n- A [Roku TV driver](https://github.com/headspinio/appium-roku-driver)\n- A [Tizen TV driver](https://github.com/headspinio/appium-tizen-tv-driver/)\n- A [LG webOS TV driver](https://github.com/headspinio/appium-lg-webos-driver/)\n- A [Unity game automation plugin](https://github.com/headspinio/appium-altunity-plugin)\n\nThese are all free and open source Appium components that HeadSpin has donated to the community\nwith the goal of fostering collaboration in these areas of media app automation.\n\nLooking to the future, HeadSpin plans to continue supporting Appium in significant ways, both as\na Development Partner and a significant contributor to the Appium ecosystem. The Appium project is\ndeeply indebted to HeadSpin for all of its support, and is proud to take this moment to recognize\nHeadSpin as our first official Development Partner!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/blog/posts/announcing-lambdatest-as-development-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - sai\n - srini\ndate: 2025-11-25\n---\n\n# Announcing LambdaTest as Appium's Newest Development Partner\n\nAs part of our ongoing effort to recognize organizations that meaningfully support the Appium project through dedicated maintainer time, we are excited to welcome our newest Development Partner: LambdaTest!\nLambdaTest has long been an active participant in the automated testing ecosystem. Today, they are officially formalizing their commitment by investing people\u2014dedicated engineers who will directly support Appium's development, maintenance, and ecosystem growth.\nThis kind of hands-on contribution is crucial for ensuring Appium continues to evolve. We deeply value partners who empower their engineering teams to contribute code directly to open source rather than just sponsorship.\n\n\n\n\n\nLambdaTest engineers are already contributing actively across several key Appium repositories. Their current focus includes:\n**appium-mcp** \u2013 Supporting Appium's implementation of the Model Context Protocol (MCP) to drive forward modern AI-assisted capabilities.\n**appium-remote-xpc** \u2013 Contributing to the native macOS/XPC-based remote execution layer, essential for iOS automation.\n**appium-tun-tap** \u2013 Assisting in the development and maintenance of network virtualization and tunneling components for advanced testing scenarios.\n\nThese contributions strengthen critical infrastructure within the Appium ecosystem and demonstrate LambdaTest's commitment to deep technical involvement in the project's evolution.\nAbout LambdaTest\n\nLambdaTest\u2019s platform already serves a massive community of Appium users. As a GenAI-powered Quality Engineering Platform, they provide a full-stack testing cloud with 10,000+ real mobile devices and 3,000+ browsers.\nBeyond standard infrastructure, they are pushing the boundaries of test execution with AI-native test management and next-generation agents like KaneAI. By supporting Appium alongside Selenium, Playwright, and other major frameworks, LambdaTest helps teams orchestrate intelligent automation at cloud scale.\n\nLambdaTest will continue contributing people, code, and development expertise to strengthen Appium's core functionality. Their commitment represents a significant investment into the future of the framework, and we're thrilled to have them collaborating with us at this deeper level.\nThe Appium project is proud to recognize LambdaTest as our newest official Development Partner. We can't wait to see what we'll build together!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/blog/posts/announcing-lambdatest-as-strategic-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2025-07-01\n---\n\n# Announcing LambdaTest as Appium Strategic Partner\n\nAfter recently celebrating the 1-year anniversary of our Sponsorship Program and Compensation\nScheme,\nthe Appium project is very excited to announce that LambdaTest\nis coming on board as one of our Strategic Partners!\n\n\n\n\n\nHaving long been active in the Appium community and the automated testing industry, LambdaTest is\nnow significantly stepping up their investment into these areas. With the decision to come on board\nas a Strategic Partner, LambdaTest will support the Appium project through financial contribution\nas well as contribution of code and project maintenance. Obviously, without the generous support of\npartners like LambdaTest, we would not be able to continue our contributor compensation scheme,\nwhich has seen the release of a substantial amount of funds to Appium maintainers and contributors\nover the last year. Thanks again to LambdaTest, and stay tuned for more collaboration updates\nthroughout the year!\n\n**About LambdaTest**\n\nLambdaTest is a GenAI-powered Quality Engineering Platform that empowers teams to test\nintelligently, smarter, and ship faster. Built for scale, it offers a full-stack testing cloud with\n10K+ real mobile devices and 3,000+ browsers. With AI-native test management, MCP servers, and\nagent-based automation, LambdaTest supports Selenium, Appium, Playwright, and all major frameworks.\nAI Agents like HyperExecute and KaneAI bring the power of AI and cloud into your software testing\nworkflow, enabling seamless automation testing with 120+ integrations. LambdaTest Agents accelerate\nyour testing throughout the entire SDLC, from test planning and authoring to automation,\ninfrastructure, execution, RCA, and reporting.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/blog/posts/announcing-sauce-labs-as-strategic-partner.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-06-10\n---\n\n# Announcing Sauce Labs as Appium's Strategic Partner\n\nThe good news surrounding our new sponsorship and contributor compensation\nprogram\njust keeps coming! Effective immediately we are fortunate and excited to be able to welcome a new Strategic Partner to\nthe Appium project: Sauce Labs!\n\n\n\n
\n \n
\n\nSauce Labs has a long history of support for the Appium project. In fact, Appium was initially\nincubated at Sauce Labs under the direction of [@jlipps](https://github.com/jlipps), in the early\ndays of mobile automation. Sauce Labs always envisioned Appium as being a project for and by the\ncommunity, and cemented this perspective in 2016 with the donation of Appium to the JS Foundation\n(now the [OpenJS Foundation](https://openjsf.org/)). To this day, developers associated with Sauce\nLabs continue to help maintain various parts of the Appium project.\n\nNow, Sauce Labs is making a further commitment to support Appium financially as a way to enable\nour new contributor compensation program. We're very excited about this program as a vehicle for\ngetting more people involved in Appium's development and maintenance. With the help of Strategic\nPartners like Sauce Labs, our project will be better able to meet the needs of our constantly\ngrowing userbase, and attract new developers (like you?) to build the Appium ecosystem together.\nNeedless to say, we are extremely grateful for Sauce Labs's support!\n\n**About Sauce Labs**\n\nSauce Labs is the leader in continuous quality. Our Platform for Test helps organizations transform software testing from a chore to a competitive advantage. With decades of expertise and deep roots in the Selenium and Appium open source communities, high performing software teams use our platform to execute any testing workload across thousands of different devices, browsers, and operating systems\u2014anywhere, any time, and at any scale. For more information, please visit [saucelabs.com](https://saucelabs.com).\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/blog/posts/announcing-sponsorship-program.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-05-14\n---\n\n# Announcing Appium's Sponsorship Program\n\nOver the last several months, the Appium team has been working on a sponsorship program that is\ndesigned to help give back to Appium's contributors as well as to recognize important partner\nindividuals or companies in the industry. This program is now officially launching! Let's dive into\nsome of the details.\n\n\n\nFirst of all, the details and fine print will always be available at Appium's Governance\ndocument, which outlines how the\nproject is run, who makes project decisions, etc... This document will be kept up to date with the\nlatest details of the program, so that's the place to bookmark for reference!\n\nAs of now, Appium has opened up sponsorship opportunities via our OpenCollective\npage. OpenCollective is a service which allows people to donate\nto open source groups. We've defined a number of giving tiers for donations, within a very wide\nrange, and welcome any financial amount with gratitude! Based on the donation tier, sponsorship\ncomes with a variety of benefits, including recognition at different places in the Appium repo,\ndocs, and website. In addition to financial sponsorship, the project has decided to recognize\nsignificant donations of project leadership and maintenance efforts from companies who have\ninvested heavily into Appium with their employees' time (we call these \"Development Partners\").\n\nWhat will the project do with the funds raised through this sponsorship program? We aim to give it\nall back to the Appium community! With the details again available at our [Governance document](https://github.com/appium/appium/blob/master/GOVERNANCE.md),\nwe have implemented a scheme very much inspired by our friends at [WebdriverIO](https://webdriver.io/blog/2024/02/15/new-contributor-stipend-program) (thanks WDIO\nfriends!) There are three groups of contributors to Appium that this scheme supports: (1) project\nmaintainers (those who devote consistent time to leading the project), (2) project contributors\n(anyone in the wider community that contributes code or documentation), and (3) upstream projects\n(other open source projects Appium relies heavily on to work well). Each month, the funds raised\nvia sponsorship will be distributed in different amounts to each of these groups. So if you\nmake a valuable contribution to Appium moving forward, you'll be eligible to get some cash as\na thank-you! (You'll need to have your own OpenCollective account in good standing to receive\nfunds).\n\nWe're very excited about this new program, and hope that it helps existing and new contributors to\nfeel even better about donating their time to making Appium better. And of course, none of this\nwould be possible without the amazing Partners and Sponsors we hope to attract! On that note, stay\ntuned over the next few weeks as we unveil some of our initial program launch Partners! And if you\nor your company would like to participate by supporting Appium financially, you are most welcome.\nJust head over to our OpenCollective page and choose the tier that reflects your desired\ncontribution level.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/blog/posts/appium3.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - sai\n - srini\n - jlipps\ndate: 2025-08-07\n---\n\n# \ud83d\ude80 Appium 3\n\nAppium 3 is here \u2014 and while it's not as massive a leap as Appium 2, it introduces a few essential\nbreaking changes that developers and QA engineers should be aware of.\n\n\n\nThe main idea behind Appium 3 is to clear out old cruft so that Appium can be leaner moving\nforward, and rely on newer versions of software with better performance and security\ncharacteristics. We're also getting rid of legacy behaviors and protocols that we deprecated as\npart of Appium 2.\n\nFor you as a user, there's not much to worry about. The breaking changes are minimal:\n\n- Node.js / NPM minimum version bump (to 20.19 / 10)\n- Removal of certain deprecated endpoints\n- Security feature flag prefix requirements (e.g. `adb_shell` to `uiautomator2:adb_shell`)\n\nIn terms of new features, we've been adding them incrementally rather than saving them up for\nAppium 3. But with this release we are excited to share these new capabilities:\n\n- `appium plugin install inspector` (Use Appium to host the Inspector rather than downloading it as a separate app)\n- Clients can set the `X-Appium-Is-Sensitive` HTTP header on requests to direct the server to mask the data in the request in the logs, so that when you send a password into an input box, the password's actual value is not logged in plaintext. ([Learn more](../../developing/sensitive.md))\n\nOf course, we have a full [Appium 3 migration guide](../../guides/migrating-2-to-3.md) to make sure\nyou know all the details and can deeply understand the consequences of upgrading to Appium 3 in\nyour environment.\n\n---\n\n**Ready to make the leap?** Appium 3 is a great step forward in creating more secure, maintainable,\nand W3C-compliant test automation pipelines. Happy testing!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/blog/posts/hello-world.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nauthors:\n - jlipps\ndate: 2024-03-07\n---\n\n# Hello World!\n\nThis is the first post in the Appium blog. There's not much to see here yet. We're creating this\nspace so we can make announcements or post other news, or information about events, that don't\nreally fit inside the documentation itself.\n\n\n\nStay tuned for more!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/contributing/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - \u5bfc\u822a\u680f\n\ntitle: \u5bf9Appium \u7684\u8d21\u732e\n---\n\nAppium\u9879\u76ee\u79bb\u4e0d\u5f00\u6765\u81ea\u516c\u53f8\u548c\u5fd7\u613f\u8005\u7684\u4ee3\u7801\u3001\u6587\u6863\u3001\u7ef4\u62a4\u548c\u652f\u6301\u7684\u4f17\u591a\u8d21\u732e\u3002 \u56e0\u6b64\uff0c\u6211\u4eec\u6b22\u8fce\u8d21\u732e\uff01\n\n\u6709\u8bb8\u591a\u4e0d\u540c\u7684\u65b9\u5f0f\u53ef\u4ee5\u5e2e\u52a9\u9879\u76ee\u2014\u2014\u8bf7\u53c2\u9605\u4e0b\u65b9\u4e86\u89e3\u60a8\u53ef\u4ee5\u505a\u7684\u4e00\u5207\u4ee5\u53ca\u6bcf\u4e2a\u8d21\u732e\u65b9\u6cd5\u7684\u6d41\u7a0b\u3002 \u8bf7\u6ce8\u610f\uff0c\u65e0\u8bba\u60a8\u5982\u4f55\u8d21\u732e\uff0c\u60a8\u7684\u53c2\u4e0e\u90fd\u53d7\u6211\u4eec\u7684[\u884c\u4e3a\u51c6\u5219](https://github.com/appium/appium/blob/master/CONDUCT.md)\u7ba1\u8f96\u3002\n\n## \u52a0\u5165\u8ba8\u8bba\u8bba\u575b\n\n\u60a8\u4e0d\u9700\u8981\u4e86\u89e3Appium\u7684\u5185\u90e8\u673a\u5236\u5c31\u80fd\u505a\u51fa\u8d21\u732e\uff01 \u5982\u679c\u60a8\u6709\u4f7f\u7528Appium\u7684\u7ecf\u9a8c\uff0c\u5e76\u613f\u610f\u4e0e\u4ed6\u4eba\u5206\u4eab\u60a8\u7684\u77e5\u8bc6\uff0c\u8bf7\u8003\u8651\u5728Appium\u8bba\u575b[discuss.appium.io](https://discuss.appium.io/)\u4e0a\u5e2e\u52a9\u7528\u6237\u3002 \u5feb\u53bb\u770b\u770b\u662f\u5426\u6709\u60a8\u80fd\u56de\u7b54\u7684\u95ee\u9898\u3002\n\n## \u62a5\u544a\u9519\u8bef\u6216\u529f\u80fd\u8bf7\u6c42\n\n\u5982\u679c\u60a8\u9047\u5230\u4e86\u4e00\u4e2abug\uff0c\u6216\u8005\u6709\u4e00\u4e2a\u5f88\u9177\u7684\u529f\u80fd\u60f3\u6cd5\uff0c\u8ba4\u4e3aAppium\u5e94\u8be5\u652f\u6301\uff0c\u8bf7\u52a1\u5fc5\u5728\u6211\u4eec\u7684[GitHub issue tracker](https://github.com/appium/appium/issues)\u4e0a\u544a\u8bc9\u6211\u4eec\u3002\n\u8bf7\u5728\u521b\u5efaissue\u65f6\u4f7f\u7528\u9002\u5f53\u7684issue\u8868\u5355\u6a21\u677f\u3002\n\n## \u5bf9\u95ee\u9898\u5206\u7c7b\n\n\u9664\u4e86\u521b\u5efaissue\uff0c\u60a8\u8fd8\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u8c03\u67e5\u5df2\u62a5\u544a\u7684\u95ee\u9898\u3002 \u60a8\u53ea\u9700\u8981\u5bf9Appium\u6709\u8db3\u591f\u7684\u719f\u6089\u7a0b\u5ea6\u6765\u5c1d\u8bd5\u91cd\u73b0bug\u3002\n\n\u60a8\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u6211\u4eec\u7684[GitHub issue tracker](https://github.com/appium/appium/issues)\u4e2d\u5e26\u6709\u6807\u7b7e\u5982`Needs Triage`\u6216`Needs Info`\u7684\u95ee\u9898\u5f00\u59cb\uff0c\u5e76\u7559\u4e0b\u76f8\u5173\u8bc4\u8bba\uff1a\n\n- \u5982\u679c\u95ee\u9898\u662f\u91cd\u590d\u7684\uff0c\u8bf7\u63d0\u4f9b\u6307\u5411\u539f\u59cbissue\u7684\u94fe\u63a5\n- \u5982\u679c\u7528\u6237\u6ca1\u6709\u63d0\u4f9b\u8db3\u591f\u7684\u4fe1\u606f\uff08\u5982Appium\u65e5\u5fd7\uff09\uff0c\u8bf7\u5411\u4ed6\u4eec\u8be2\u95ee\u66f4\u591a\u7ec6\u8282\n- \u5982\u679c\u60a8\u80fd\u5728\u81ea\u5df1\u7684\u73af\u5883\u4e2d\u91cd\u73b0\u95ee\u9898\uff0c\u8bf7\u63d0\u4f9b\u60a8\u8ba4\u4e3a\u6709\u52a9\u4e8e\u6211\u4eec\u8ffd\u8e2a\u95ee\u9898\u539f\u56e0\u7684\u6240\u6709\u4fe1\u606f\n\n\u6709\u5173\u5bf9Appium\u95ee\u9898\u8fdb\u884c\u5206\u7c7b\u7684\u66f4\u591a\u4fe1\u606f\uff08\u9002\u7528\u4e8e\u4efb\u4f55Appium\u9879\u76ee\u4ed3\u5e93\uff09\uff0c\u8bf7\u8054\u7cfb[\u6280\u672f\u59d4\u5458\u4f1a](https://github.com/appium/appium/blob/master/GOVERNANCE.md#the-technical-committee)\u7684\u4efb\u4f55\u6210\u5458\u3002\n\n## \u8d21\u732e\u4ee3\u7801\n\n\u6211\u4eec\u59cb\u7ec8\u6b22\u8fce\u7528\u4e8e\u6539\u8fdbAppium\u4ee3\u7801\u6216\u6587\u6863\u7684\u62c9\u53d6\u8bf7\u6c42\uff01\n\n!!! info\n\n \u5f00\u53d1\u8005\u4fe1\u606f\u53ef\u80fd\u4e0d\u50cf\u9762\u5411\u7528\u6237\u7684\u4fe1\u606f\u90a3\u6837\u9891\u7e41\u66f4\u65b0\uff0c\u6216\u8005\u5b83\u5728\u5728\u7ebf\u4ed3\u5e93\u4e2d\u7684\u5f53\u524d\u5f62\u5f0f\u53ef\u80fd\u6700\u76f8\u5173\uff0c\u800c\u4e0d\u662f\u5728\u8fd9\u4e2a\u53d1\u5e03\u7684\u7248\u672c\u4e2d\u3002\u8bf7\u52a1\u5fc5\u68c0\u67e5\u4ed3\u5e93\u6216\u4e0e\u7ef4\u62a4\u8005\u8ba8\u8bba\u3002\u6211\u4eec\u5f88\u4e50\u610f\u5e2e\u52a9\u65b0\u8d21\u732e\u8005\u5165\u95e8\uff01\n\n\u9996\u5148\u514b\u9686\u4ed3\u5e93\uff08\u6211\u4eec\u5efa\u8bae\u5148[fork](https://github.com/appium/appium/fork)\n\u5b83\uff09\uff1a\n\n```sh\ngit clone https://github.com/appium/appium.git\ncd appium\n```\n\n!!! info\n\n \u5982\u679c\u60a8\u662f VS Code \u7528\u6237\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 [Runme](https://runme.dev/api/runme?repository=https%3A%2F%2Fgithub.com%2Fappium%2Fappium.git&fileToOpen=packages%2Fappium%2Fdocs%2Fen%2Fcontributing%2Findex.md) \u8f7b\u677e\u5730\u67e5\u770b\u9879\u76ee\u3002\n\n\u5b89\u88c5\u4f9d\u8d56\uff1a\n\n```sh\nnpm install\n```\n\n\u63a5\u4e0b\u6765\u4f60\u53ef\u4ee5\u505a\u51e0\u4ef6\u4e8b\u60c5\u3002\n\n\u6784\u5efa\u9879\u76ee\uff1a\n\n```sh\nnpm run build\n```\n\n\u6784\u5efa\u9879\u76ee\u5e76\u76d1\u89c6\u66f4\u6539\uff1a\n\n```sh\nnpm run dev\n```\n\n\u542f\u52a8\u672c\u5730 Appium \u670d\u52a1\u5668\uff1a\n\n```sh\nnpm start\n```\n\n\u8fd0\u884c\u6d4b\u8bd5\uff1a\n\n```sh\nnpm run lint\nnpm run test:unit\nnpm run test:types\nnpm run test:smoke\nnpm run test:e2e\nnpm run test:quick # unit and types\nnpm run test:slow # everything\n```\n\n\u60a8\u4e5f\u53ef\u4ee5\u8fd0\u884c\u7279\u5b9a\u5de5\u4f5c\u533a\u7684\u6d4b\u8bd5\uff0c\u4f8b\u5982\uff1a\n\n```sh\nexport APPIUM_WORKSPACE=@appium/base-driver\nnpm run test:unit -w $APPIUM_WORKSPACE\n```\n\n### \u6587\u6863\n\n\u6b64\u9879\u76ee\u7684\u6587\u6863\u4f4d\u4e8e\u9879\u76ee[\u4ed3\u5e93\u672c\u8eab](https://github.com/appium/appium/tree/master/packages/appium/docs)\u4e2d\u3002\n\u5b83\u5305\u542b\u5728Markdown\u6587\u4ef6\u4e2d\uff0c\u8fd9\u4e9b\u6587\u4ef6\u7531`@appium/docutils`\u6a21\u5757\u4e2d\u7684\u6587\u6863\u7cfb\u7edf\u6784\u5efa\u3002 \u8be5\u6a21\u5757\u57fa\u4e8e[MkDocs](https://www.mkdocs.org/)\uff0c\u56e0\u6b64\u9700\u8981\u5728\u60a8\u7684\u7cfb\u7edf\u4e0a\u5b89\u88c5[Python](https://www.python.org/)\u3002\n\n\u5b89\u88c5 Python \u4f9d\u8d56\uff1a\n\n```sh\nnpm run install-docs-deps\n```\n\n\u5b89\u88c5 Python \u4f9d\u8d56\uff1a\n\n```sh\nnpm run dev:docs\n```\n\n\u7136\u540e\u4f60\u53ef\u4ee5\u5728 `http://127.0.1:8000/docs/en` \u4e2d\u67e5\u770b\u6587\u6863\u3002\n\n## \u7ffb\u8bd1Appium \u6587\u6863\n\nAppium\u6587\u6863\u672c\u5730\u5316\u4e3a\u82f1\u8bed\u4ee5\u5916\u8bed\u8a00\u7684\u8fc7\u7a0b\u662f\u81ea\u52a8\u5316\u7684\uff0c\u901a\u8fc7[Crowdin\u7ffb\u8bd1\u7ba1\u7406\u7cfb\u7edf](https://crowdin.com)\u5b8c\u6210\u3002 \u8bf7\u52ff\u76f4\u63a5\u5728GitHub Appium\u4ed3\u5e93\u4e2d\u7f16\u8f91\u4efb\u4f55\u7ffb\u8bd1\u6587\u6863\uff0c\u56e0\u4e3a\u5b83\u4eec\u5c06\u5728\u5373\u5c06\u8fdb\u884c\u7684\u540c\u6b65\u4e2d\u88ab\u4eceCrowdin\u5bfc\u51fa\u7684\u6587\u6863\u66ff\u6362\u3002\n\n### \u4ece\u54ea\u91cc\u5f00\u59cb\n\n\u5982\u679c\u60a8\u60f3\u4e3aAppium\u6587\u6863\u7ffb\u8bd1\u6210\u60a8\u7684\u8bed\u8a00\u505a\u51fa\u8d21\u732e\uff0c\u53ea\u9700\u52a0\u5165[Appium Documentation](https://crowdin.com/project/appium-documentation) Crowdin\u9879\u76ee\u7684\u7ffb\u8bd1\u8005\u7ec4\uff0c\u7136\u540e\u5728\u90a3\u91cc\u5f00\u59cb\u7ffb\u8bd1\u6587\u6863\u3002 \u5982\u679c\u60a8\u770b\u5230\u60a8\u7684\u8bed\u8a00\u5728Crowdin\u53ef\u7528\u8bed\u8a00\u5217\u8868\u4e2d\u7f3a\u5931\uff0c\u8bf7\u901a\u8fc7\u521b\u5efa[issue](https://github.com/appium/appium/issues)\u544a\u8bc9\u6211\u4eec\u3002\n\n### \u6e90\u8bed\u8a00\u66f4\u65b0\n\n\u6587\u6863\u4e2d\u7684\u66f4\u6539\u901a\u8fc7 `Update Crowdin English Docs GitHub` action\u81ea\u52a8\u540c\u6b65\u5230Crowdin\u3002\n\u4e00\u65e6 `packages/appium/docs/en/**.md` \u6216 `packages/appium/docs/mkdocs-en.yml` \u4e0b\u6709\u4efb\u4f55\u66f4\u6539\uff0c\u6b64action\u5c31\u4f1a\u81ea\u52a8\u89e6\u53d1\u3002\n\n### \u83b7\u53d6\u7ffb\u8bd1\u6587\u6863\n\n\u4e3a\u4e86\u4eceCrowdin\u83b7\u53d6\u7ffb\u8bd1\u6587\u4ef6\u5230GitHub\u4ed3\u5e93\uff0c\u9700\u8981\u89e6\u53d1 `Sync Crowdin Docs Translations` action\u3002 \u6b64action\u8fd8\u4f1a\u81ea\u52a8\u521b\u5efa\u4e00\u4e2a\u5305\u542b\u76f8\u5e94\u7ffb\u8bd1\u8d44\u6e90\u7684PR\u3002\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/developing/build-docs.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Building Documentation\n---\n\nOnce you've [built a driver](./build-drivers.md) or [built a plugin](./build-plugins.md) for Appium,\nyou will hopefully want to document how that extension works for your users. The most basic way of\ndoing this is to write up a quick `README.md` and keep it in the root of your project's repository.\nHowever, this can involve a lot of effort.\n\nThe Appium project has built tools to help with this, and we've packaged up these tools so our\necosystem developers building drivers and plugins can _also_ use them. The best way to get going\nwith these tools is probably to look at an existing Appium driver repo to see how it's done, for\nexample the [XCUITest driver repo](https://github.com/appium/appium-xcuitest-driver). But this guide\nwill outline the basic approach.\n\n### Conceptual architecture\n\nAppium settled on [MkDocs](https://www.mkdocs.org/) as a Markdown-based documentation site\ngenerator. It uses a Python toolchain (and not Node.js), but it turned out to be the best option\nfor our purposes. You can adjust this, but by default Appium's utilities also assume that you'll be\nusing the [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) theme/extension for\nMkDocs.\n\nIn order to make different versions of your docs available (one for each minor release of your\nextension, typically), we also bundle [Mike](https://github.com/jimporter/mike).\n\nFrom here, building a basic docs site is as easy as collecting your Markdown files together and\ndefining how you want them to be organized.\n\n### Prerequisites\n\nTo take advantage of Appium's documentation utilities, you'll need to install:\n\n- [Python v3+](https://www.python.org/downloads/)\n- [pip](https://pip.pypa.io/en/stable/installation/) (this may be installed automatically with Python)\n- The `@appium/docutils` package:\n\n ```bash\n npm install --save-dev @appium/docutils\n ```\n\n### Initializing an Extension for Building Docs\n\nTo prepare your extension for generating documentation, run the following command:\n\n```bash\nnpx appium-docs init\n```\n\nThis will:\n\n1. Create a `tsconfig.json` if one does not already exist. This is necessary even if your extension\n is not written in TypeScript.\n2. Create a `mkdocs.yml` with the necessary configuration for MkDocs.\n\n### Documenting Your Extension\n\nAt this point, you can begin documenting your extension. By default, MkDocs will look for Markdown\nfiles in the `docs` directory. You can therefore create your Markdown documentation files, place\nthem in `docs`, and add links to these files in `mkdocs.yml`.\n\nRefer to the [MkDocs documentation](https://www.mkdocs.org/user-guide/writing-your-docs/) for\ninformation on how to organize and structure your documentation.\n\n### Building the Docs\n\nAt this point, you can use the `appium-docs` CLI tool. Run this tool with no arguments to get the\nfull help output and see all the available subcommands and parameters. Here are a few usage\nexamples:\n\n```bash\n# Generate reference and build the mkdocs site into the site dir\nnpx appium-docs build\n\n# Same as build, but host the docs on a local dev server\n# and watch for changes and rebuild when files change\nnpx appium-docs build --serve\n\n# Build the docs and deploy them with mike versioning to the docs-site branch\n# using the included commit message.\n# This is particularly useful for pushing content to a GitHub pages branch!\nnpx appium-docs build \\\n --deploy \\\n -b docs-site \\\n -m 'docs: auto-build docs for appium-xcuitest-driver@%s'\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/developing/build-doctor-checks.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Building Doctor Checks\n---\n\nThe idea of Appium Doctor is to assist users with driver or plugin preconditions setup. Sometimes such\npreconditions might be quite complicated and require non-trivial technical knowledge. Doctor checks,\nwhich are vanilla Node.js class instances written by extension authors, simplify\nthe setup process by automating diagnostics and possible fixes for the found issues. These checks\nmight also be interactive to ensure better usage experience.\n\nThis tutorial is supposed to be used by plugin or driver authors that would like to help their users\nto deal with complicated setup or configuration steps.\n\n## Adding Doctor Checks\n\n### Typing Requirements\n\nThe term `Doctor Check` literally describes a single javascript class instance that implements the\n[IDoctorCheck interface](https://github.com/appium/appium/blob/master/packages/types/lib/doctor.ts).\nThe interface defines the following methods and properties:\n\n- `diagnose(): Promise`: Contains the code to diagnose a possible issue\n- `fix(): Promise`: Either fixes the actual problem if `hasAutofix()` returns true or\n returns a string description for possible manual fixes. If this method throws an exception named\n `FixSkippedError` and `hasAutofix()` returns true then the result of the method invocation\n is going to be ignored.\n- `hasAutofix(): boolean`: Whether calling `fix()` would resolve the found issue\n- `isOptional(): boolean`: Whether the found issue can be ignored and is not a showstopper\n- `log: AppiumLogger`: May be used for logging. This property may be assigned\n by the instance itself or by the Appium server if it is left unassigned.\n\nThe `DoctorCheckResult` object returned by the `diagnose()` method must contain the following properties:\n\n- `ok: boolean`: Whether the diagnosis found no issues\n- `optional: boolean`: Whether the diagnosed issue is safe to ignore\n- `message: string`: The text message describing the diagnostic result\n\n### Manifest Requirements\n\nA single extension may export multiple Doctor checks to Appium. In order for these checks to be properly\npicked up by the server CLI after the corresponding extension is installed they might be listed in the\npackage .json manifest under the `appium.doctor.checks` section similar to the definition below:\n\n```json\n // ...\n \"appium\": {\n \"driverName\": \"fake\",\n \"automationName\": \"Fake\",\n \"platformNames\": [\n \"Fake\"\n ],\n \"mainClass\": \"FakeDriver\",\n \"schema\": \"./build/lib/fake-driver-schema.js\",\n \"scripts\": {\n \"fake-error\": \"./build/lib/scripts/fake-error.js\",\n \"fake-success\": \"./build/lib/scripts/fake-success.js\",\n \"fake-stdin\": \"./build/lib/scripts/fake-stdin.js\"\n },\n \"doctor\": {\n \"checks\": [\n \"./doctor/fake1.js\",\n \"./doctor/fake2.js\"\n // ...\n ]\n }\n },\n // ...\n```\n\nAlso, it makes sense to include the [@appium/types](https://www.npmjs.com/package/@appium/types) import\nto the package dev dependencies.\n\n### Implementation Example\n\nThe below example is a \"raw\" Node.JS implementation that does not use any transpilation:\n\n```js\nconst {fs, doctor} = require('@appium/support');\n\n/** @satisfies {import('@appium/types').IDoctorCheck} */\nclass EnvVarAndPathCheck {\n /**\n * @param {string} varName\n */\n constructor(varName) {\n this.varName = varName;\n }\n\n async diagnose() {\n const varValue = process.env[this.varName];\n if (typeof varValue === 'undefined') {\n return doctor.nok(`${this.varName} environment variable is NOT set!`);\n }\n\n if (await fs.exists(varValue)) {\n return doctor.ok(`${this.varName} is set to: ${varValue}`);\n }\n\n return doctor.nok(`${this.varName} is set to '${varValue}' but this is NOT a valid path!`);\n }\n\n async fix() {\n return (\n `Make sure the environment variable ${this.varName} is properly configured for the Appium server process`\n );\n }\n\n hasAutofix() {\n return false;\n }\n\n isOptional() {\n return false;\n }\n}\n\nconst androidHomeCheck = new EnvVarAndPathCheck('ANDROID_HOME');\n\nmodule.exports = {androidHomeCheck};\n\n/**\n * @typedef {import('@appium/types').DoctorCheckResult} CheckResult\n */\n```\n\nThis file could be saved as `doctor/android-home-check.js` and then added to the package.json manifest\nas\n\n```json\n // ...\n \"appium\": {\n // ...\n \"doctor\": {\n \"checks\": [\n \"./doctor/android-home-check.js\",\n ]\n }\n // ...\n },\n // ...\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/developing/build-drivers.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Building Drivers\n---\n\nAppium wants to make it easy for anyone to develop their own automation drivers as part of the\nAppium ecosystem. This guide will explain what's involved and how you can accomplish various driver\ndevelopment tasks using the tools Appium provides. This guide assumes you (1) are a competent user of\nAppium, (2) are a competent Node.js developer, and (3) that you have read and understood the\n[Driver Intro](../intro/drivers.md).\n\nIf that describes you, great! This guide will get you started.\n\n## Before you create your driver\n\nBefore you get to work implementing your driver, it's important to have a few things sorted out.\nFor example, you need to know what your driver will do. Which platform is it trying to expose\nWebDriver automation for?\n\nAppium doesn't magically give you the power to automate any platform. All it does is give you a set\nof convenient tools for implementing the WebDriver Protocol. So if you want to create, for example,\na driver for a new app platform, you'll need to know how to automate apps on that platform _without Appium_.\n\nThis usually means that you need to be very familiar with app development for a given platform. And\nit usually means that you will rely on tools or SDKs provided by the platform vendor.\n\nBasically, if you can't answer the question **\"how would I launch, remotely trigger behaviours, and\nread state from an app on this platform?\" then you're not quite ready to write an Appium driver**.\nMake sure you do the research to feel comfortable that there _is_ a path forward. Once there is,\ncoding it up and making it available as an Appium driver should be the easy part!\n\n## Other drivers to reference\n\nOne of the greatest things about building an Appium driver is that there are already a number of\nopen source Appium drivers which you can look at for reference. There is\na [fake-driver](https://github.com/appium/appium/tree/master/packages/fake-driver) sample driver which\ndoes basically nothing other than showcase some of the things described in this guide.\n\nAnd of course, all of Appium's official drivers are open source and available in repositories at\nthe project's GitHub organization. So if you ever find yourself asking, \"how does a driver do X?\",\nread the code for these drivers! Also don't be afraid to ask questions of the Appium developers if\nyou get stuck; we're always happy to help make sure the driver development experience is a good\none!\n\n## Basic requirements for Appium drivers\n\nThese are the things your driver _must_ do (or be), if you want it to be a valid Appium driver.\n\n### Node.js package with Appium extension metadata\n\nAll Appium drivers are fundamentally Node.js packages, and therefore must have a valid\n`package.json`. Your driver is not _limited_ to Node.js, but it must provide an adapter written in Node.js so it can be loaded by Appium.\n\nYour `package.json` must include `appium` as a `peerDependency`. The requirements for the\ndependency versions should be as loose as possible (unless you happen to know your driver will only\nwork with certain versions of Appium). For Appium 2, for example, this would look something like\n`^2.0.0`, declaring that your driver works with any version of Appium that starts with 2.x.\n\nYour `package.json` must contain an `appium` field, like this (we call this the 'Appium extension\nmetadata'):\n\n```json\n{\n ...,\n \"appium\": {\n \"driverName\": \"fake\",\n \"automationName\": \"Fake\",\n \"platformNames\": [\n \"Fake\"\n ],\n \"mainClass\": \"FakeDriver\"\n },\n ...\n}\n```\n\nThe required subfields are:\n\n- `driverName`: this should be a short name for your driver.\n- `automationName`: this should be the string users will use for their `appium:automationName`\n capability to tell Appium to use _your_ driver.\n- `platformNames`: this is an array of one or more platform names considered valid for your driver.\n When a user sends in the `platformName` capability to start a session, it must be included in\n this list for your driver to handle the session. Known platform name strings include: `iOS`,\n `tvOS`, `macOS`, `Windows`, `Android`.\n- `mainClass`: this is a named export (in CommonJS style) from your `main` field. It must be a\n class which extends Appium's `BaseDriver` (see below).\n\n### Extend Appium's `BaseDriver` class\n\nUltimately, your driver is much easier to write because most of the hard work of implementing the\nWebDriver protocol and handling certain common logic is taken care of already by Appium. This is\nall encoded up as a class which Appium exports for you to use, called `BaseDriver`. It is exported\nfrom `appium/driver`, so you can use one of these styles to import it and create your _own_ class\nthat extends it:\n\n```js\nimport {BaseDriver} from 'appium/driver';\n// or: const {BaseDriver} = require('appium/driver');\n\nexport class MyDriver extends BaseDriver {\n}\n```\n\n### Make your driver available\n\nThat's basically it! With a Node.js package exporting a driver class and with correct Appium\nextension metadata, you've got yourself an Appium driver! Now it doesn't _do_ anything, but you can\nload it up in Appium, start and stop sessions with it, etc...\n\nTo make it available to users, you could publish it via NPM. When you do so, your driver will be\ninstallable via the Appium CLI:\n\n```\nappium driver install --source=npm \n```\n\nIt's a good idea to test your driver first, of course. One way to see how it works within Appium is\nto install it locally first:\n\n```\nappium driver install --source=local /path/to/your/driver\n```\n\n### Developing your driver\n\nHow you develop your driver is up to you. It is convenient, however, to run it from within Appium\nwithout having to do lots of publishing and installing. The most straightforward way to do this is\nto include the most recent version of Appium as a `devDependency`, and then also your own driver,\nlike this:\n\n```json\n{\n \"devDependencies\": {\n ...,\n \"appium\": \"^2.0.0\",\n \"your-driver\": \"file:.\",\n ...\n }\n}\n```\n\nNow, you can run Appium locally (`npm exec appium` or `npx appium`), and because your driver is\nlisted as a dependency alongside it, it will be automatically \"installed\" and available. You can\ndesign your e2e tests this way, or if you're writing them in Node.js, you can simply import\nAppium's start server methods to handle starting and stopping the Appium server in Node. (TODO:\nreference an implementation of this in one of the open source drivers when ready).\n\nAnother way to do local development with an existing Appium server install is to simply install\nyour driver locally:\n\n```\nappium driver install --source=local /path/to/your/driver/dev/dir\n```\n\n### Refreshing your driver during development\n\nWhen the Appium server starts, it loads your driver into memory. Changes to your driver code will\nnot take effect until the next time the Appium server starts. Simply starting a new session is not\nsufficient to cause your driver's code to be reloaded.\n\nHowever, you can set the `APPIUM_RELOAD_EXTENSIONS` environment variable to `1` to request that\nAppium clear its module cache and reload extensions whenever a new session is requested. This may\nobviate the need to restart the server when you make code changes to your driver.\n\n## Standard driver implementation ideas\n\nThese are things you will probably find yourself wanting to do when creating a driver.\n\n### Set up state in a constructor\n\nIf you define your own constructor, you'll need to call `super` to make sure all the standard state\nis set up correctly:\n\n```js\nconstructor(...args) {\n super(...args);\n // now do your own thing\n}\n```\n\nThe `args` parameter here is the object containing all the CLI args used to start the Appium\nserver.\n\n### Define and validate accepted capabilities\n\nYou can define your own capabilities and basic validation for them. Users will always be able to\nsend in capabilities that you don't define, but if they send in capabilities you have explicitly\ndefined, then Appium will validate that they are of the correct type (and will check for the\npresence of required capabilities).\n\nIf you want to turn capability validation off entirely, set `this.shouldValidateCaps` to `false` in\nyour constructor.\n\nTo give Appium your validation constraints, set `this.desiredCapConstraints` to a validation object\nin your constructor. Validation objects can be somewhat complex. Here's an example from the\nUiAutomator2 driver:\n\n```js\n{\n app: {\n presence: true,\n isString: true\n },\n automationName: {\n isString: true\n },\n browserName: {\n isString: true\n },\n launchTimeout: {\n isNumber: true\n },\n}\n```\n\n### Start a session and read capabilities\n\nAppium's `BaseDriver` already implements the `createSession` command, so you don't have to. However\nit's very common to need to perform your own startup actions (launching an app, running some\nplatform code, or doing different things based on capabilities you have defined for your driver).\nSo you'll probably end up overriding `createSession`. You can do so by defining the method in your\ndriver:\n\n```js\nasync createSession(jwpCaps, reqCaps, w3cCaps, otherDriverData) {\n const [sessionId, caps] = super.createSession(w3cCaps);\n // do your own stuff here\n return [sessionId, caps];\n}\n```\n\nFor legacy reasons, your function will receive old-style JSON Wire Protocol desired and required\ncaps as the first two arguments. Given that the old protocol isn't supported anymore and clients\nhave all been updated, you can instead only rely on the `w3cCaps` parameter. (For a discussion\nabout what `otherDriverData` is about, see the section below on concurrent drivers).\n\nYou'll want to make sure to call `super.createSession` in order to get the session ID as well as\nthe processed capabilities (note that capabilities are also set on `this.caps`; modifying `caps`\nlocally here would have no effect other than changing what the user sees in the create session\nresponse).\n\nSo that's it! You can fill out the middle section with whatever startup logic your driver requires.\n\n### End a session\n\nIf your driver requires any cleanup or shutdown logic, it's best to do it as part of overriding the\nimplementation of `deleteSession`:\n\n```js\nasync deleteSession() {\n // do your own cleanup here\n // don't forget to call super!\n await super.deleteSession();\n}\n```\n\nIt's very important not to throw any errors here if possible so that all parts of session cleanup\ncan succeed!\n\n### Access capabilities and CLI args\n\nYou'll often want to read parameters the user has set for the session, whether as CLI args or as\ncapabilities. The easiest way to do this is to access `this.opts`, which is a merge of all options,\nfrom the CLI or from capabilities. So for example to access the `appium:app` capability, you could\nsimply get the value of `this.opts.app`.\n\nIf you care about knowing whether something was sent in as a CLI arg _or_ a capability, you can\naccess the `this.cliArgs` and `this.caps` objects explicitly.\n\nIn all cases, the `appium:` capability prefix will have been stripped away by the time you are\naccessing values here, for convenience.\n\n### Implement WebDriver classic commands\n\nYou handle WebDriver commands by implementing functions in your driver class. Each member of the\nWebDriver Protocol, plus the various Appium extensions, has a corresponding function that you\nimplement if you want to support that command in your driver. The best way to see which commands\nAppium supports and which method you need to implement for each command is to look at Appium's\n[routes.js](https://github.com/appium/appium/blob/master/packages/base-driver/lib/protocol/routes.js).\nEach route object in this file tells you the command name as well as the parameters you'd expect to\nreceive for that command.\n\nLet's take this block for example:\n\n```js\n'/session/:sessionId/url': {\n GET: {command: 'getUrl'},\n POST: {command: 'setUrl', payloadParams: {required: ['url']}},\n}\n```\n\nHere we see that the route `/session/:sessionId/url` is mapped to two commands, one for a `GET`\nrequest and one for a `POST` request. If we want to allow our driver to change the \"url\" (or\nwhatever that might mean for our driver), we can therefore implement the `setUrl` command, knowing\nit will take the `url` parameter:\n\n```js\nasync setUrl(url) {\n // your implementation here\n}\n```\n\nA few notes:\n\n- all command methods should be `async` functions or otherwise return a `Promise`\n- you don't need to worry about protocol encoding/decoding. You will get JS objects as params, and\n can return JSON-serializable objects in response. Appium will take care of wrapping it up in the\n WebDriver protocol response format, turning it into JSON, etc...\n- all session-based commands receive the `sessionId` parameter as the last parameter\n- all element-based commands receive the `elementId` parameter as the second-to-last parameter\n- if your driver doesn't implement a command, users can still try to access the command, and will\n get a `501 Not Yet Implemented` response error.\n\n### Implement WebDriver BiDi commands\n\n[WebDriver BiDi](https://w3c.github.io/webdriver-bidi) is a newer version of the WebDriver spec\nwhich is implemented over Websockets instead of HTTP. As an Appium driver author you can take\nadvantage of Appium's BiDi support without having to know anything about the BiDi protocol or\nWebsockets. Implementing handlers for BiDi commands works just the same as implementing handlers\nfor WebDriver classic commands (described in the previous section). You simply define a method on\nyour driver of the appropriate name, and it will be called when the BiDi command is requested by\nthe client. To see which specific names you should use for BiDi commands, have a look at\n[bidi-commands.js](https://github.com/appium/appium/blob/master/packages/base-driver/lib/protocol/bidi-commands.js)\n\nYou are not limited to BiDi commands that are defined in the official BiDi specification. If you\nwish to define new commands, you may do so; you just need to tell Appium about them! See\n[below](#extend-the-existing-protocol-with-new-commands) for more information.\n\n### Implement element finding\n\nElement finding is a special command implementation case. You don't actually want to override\n`findElement` or `findElements`, even though those are what are listed in `routes.js`. Appium does\na lot of work for you if instead you implement this function:\n\n```js\nasync findElOrEls(strategy, selector, mult, context) {\n // find your element here\n}\n```\n\nHere's what gets passed in:\n\n- `strategy` - a string, the locator strategy being used\n- `selector` - a string, the selector\n- `mult` - boolean, whether the user has requested one element or all elements matching the\n selector\n- `context` - (optional) if defined, will be a W3C Element (i.e., a JS object with the W3C element\n identifier as the key and the element ID as the value)\n\nAnd you need to return one of the following:\n\n- a single W3C element (an object as described above)\n- an array of W3C elements\n\nNote that you can import that W3C web element identifier from `appium/support`:\n\n```js\nimport {util} from 'appium/support';\nconst { W3C_WEB_ELEMENT_IDENTIFIER } = util;\n```\n\nWhat you do with elements is up to you! Usually you end up keeping a cache map of IDs to actual\nelement \"objects\" or whatever the equivalent is for your platform.\n\n### Define valid locator strategies\n\nYour driver might only support a subset of the standard WebDriver locator strategies, or it might\nadd its own custom locator strategies. To tell Appium which strategies are considered valid for\nyour driver, create an array of strategies and assign it to `this.locatorStrategies`:\n\n```js\nthis.locatorStrategies = ['xpath', 'custom-strategy'];\n```\n\nAppium will throw an error if the user attempts to use any strategies other than the allowed ones,\nwhich enables you to keep your element finding code clean and deal with only the strategies you\nknow about.\n\nBy default, the list of valid strategies is empty, so if your driver isn't simply proxying to\nanother WebDriver endpoint, you'll need to define some. The protocol-standard locator strategies\nare defined [here](https://www.w3.org/TR/webdriver/#locator-strategies).\n\n### Throw WebDriver-specific errors\n\nThe WebDriver spec defines a set of error\ncodes to accompany command responses if an\nerror occurred. Appium has created error classes for each of these codes, so you can throw the\nappropriate error from inside a command, and it will do the right thing in terms of the protocol\nresponse to the user. To get access to these error classes, import them from `appium/driver`:\n\n```\nimport {errors} from 'appium/driver';\n\nthrow new errors.NoSuchElementError();\n```\n\n### Log messages to the Appium log\n\nYou can always use `console.log`, of course, but Appium provides a nice logger for you as\n`this.log` (it has `.info`, `.debug`, `.log`, `.warn`, `.error` methods on it for differing log\nlevels). If you want to create an Appium logger outside of a driver context (say in a script or\nhelper file), you can always construct your own too:\n\n```js\nimport {logging} from 'appium/support';\nconst log = logging.getLogger('MyDriver');\n```\n\n## Further possibilities for Appium drivers\n\nThese are things your driver _can_ do to take advantage of extra driver features or do its job more\nconveniently.\n\n### Add a schema for custom command line arguments\n\nYou can add custom CLI args if you want your driver to receive data from the command line when the\nAppium server is started (for example, ports that a server administrator should set that should not\nbe passed in as capabilities.\n\nTo define CLI arguments (or configuration properties) for the Appium server, your extension must provide a _schema_. In\nthe `appium` property of your extension's `package.json`, add a `schema` property. This will either\na) be a schema itself, or b) be a path to a schema file.\n\nThe rules for these schemas:\n\n- Schemas must conform to [JSON Schema Draft-07](https://ajv.js.org/json-schema.html#draft-07).\n- If the `schema` property is a path to a schema file, the file must be in JSON or JS (CommonJS) format.\n- Custom `$id` values are unsupported. To use `$ref`, provide a value relative to the schema root, e.g., `/properties/foo`.\n- Known values of the `format` keyword are likely supported, but various other keywords may be unsupported. If you find a keyword that is unsupported which you need to use, please [ask for support](https://github.com/appium/appium/issues/new) or send a PR!\n- The schema must be of type `object` (`{\"type\": \"object\"}`), containing the arguments in a `properties` keyword. Nested properties are unsupported.\n\nExample:\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"test-web-server-port\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"maximum\": 65535,\n \"description\": \"The port to use for the test web server\"\n },\n \"test-web-server-host\": {\n \"type\": \"string\",\n \"description\": \"The host to use for the test web server\",\n \"default\": \"sillyhost\"\n }\n }\n}\n```\n\nThe above schema defines two properties which can be set via CLI argument or configuration file. If\nthis extension is a _driver_ and its name is \"horace\", the CLI args would be\n`--driver-horace-test-web-server-port` and `--driver-horace-test-web-server-host`, respectively.\nAlternatively, a user could provide a configuration file containing:\n\n```json\n{\n \"server\": {\n \"driver\": {\n \"horace\": {\n \"test-web-server-port\": 1234,\n \"test-web-server-host\": \"localhorse\"\n }\n }\n }\n}\n```\n\n### Add driver scripts\n\nSometimes you might want users of your driver to be able to run scripts outside the context of\na session (for example, to run a script that pre-builds aspects of your driver). To support this,\nyou can add a map of script names and JS files to the `scripts` field within your Appium extension\nmetadata. So let's say you've created a script in your project that lives in a `scripts` directory\nin your project, named `driver-prebuild.js`. Then you could add a `scripts` field like this:\n\n```json\n{\n \"scripts\": {\n \"prebuild\": \"./scripts/driver-prebuild.js\"\n }\n}\n```\n\nNow, assuming your driver is named `mydriver`, users of your driver can run `appium driver run\nmydriver prebuild`, and your script will execute.\n\n### Proxy commands to another WebDriver implementation\n\nA very common design architecture for Appium drivers is to have some kind of platform-specific\nWebDriver implementation that the Appium driver interfaces with. For example, the Appium\nUiAutomator2 driver interfaces with a special (Java-based) server running on the Android device. In\nwebview mode, it also interfaces with Chromedriver.\n\nIf you find yourself in this situation, it is extremely easy to tell Appium that your driver is\njust going to be proxying WebDriver commands straight to another endpoint.\n\nFirst, let Appium know that your driver _can_ proxy by implementing the `canProxy` method:\n\n```js\ncanProxy() {\n return true;\n}\n```\n\nNext, tell Appium which WebDriver routes it should _not_ attempt to proxy (there often end up being\ncertain routes that you don't want to forward on):\n\n```js\ngetProxyAvoidList() {\n return [\n ['POST', new RegExp('^/session/[^/]+/appium')]\n ];\n}\n```\n\nThe proxy avoidance list should be an array of arrays, where each inner array has an HTTP method as\nits first member, and a regular expression as its second. If the regular expression matches the\nroute, then the route will not be proxied and instead will be handled by your driver. In this\nexample, we are avoiding proxying all `POST` routes that have the `appium` prefix.\n\nNext, we have to set up the proxying itself. The way to do this is to use a special class from\nAppium called `JWProxy`. (The name means \"JSON Wire Proxy\" and is related to a legacy\nimplementation of the protocol). You'll want to create a `JWProxy` object using the details required to\nconnect to the remote server:\n\n```js\n// import {JWProxy} from 'appium/driver';\n\nconst proxy = new JWProxy({\n server: 'remote.server',\n port: 1234,\n base: '/',\n});\n\nthis.proxyReqRes = proxy.proxyReqRes.bind(proxy);\nthis.proxyCommand = proxy.command.bind(proxy);\n```\n\nHere we are creating a proxy object and assigning some of its methods to `this` under the names\n`proxyReqRes` and `proxyCommand`. This is required for Appium to use the proxy, so don't forget\nthis step! The `JWProxy` has a variety of other options which you can check out in the source code,\nas well. (TODO: publish options as API docs and link here).\n\nFinally, we need a way to tell Appium when the proxy is active. For your driver it might always\nbe active, or it might only be active when in a certain context. You can define the logic as an\nimplementation of `proxyActive`:\n\n```js\nproxyActive() {\n return true; // or use custom logic\n}\n```\n\nWith those pieces in play, you won't have to reimplement anything that's already implemented by the\nremote endpoint you're proxying to. Appium will take care of all the proxying for you.\n\n### Proxy BiDi commands to another BiDi implementation\n\nAll of the above about proxying WebDriver commands is conceptually also valid for proxying BiDi\ncommands specifically. In order to enable BiDi proxying, you need to implement `get bidiProxyUrl`\non your driver. This should return a Websocket URL which is the address of the upstream socket you\nwant BiDi commands to be proxied to.\n\nThe intended pattern here is for you to start a session on the upstream implementation, check\nwhether it has an active BiDi socket in the returned capabilities (e.g., the `webSocketUrl`\ncapability), and then to set an internal field to that value, so that it can be returned by `get\nbidiProxyUrl`. Once all this is in place, Appium will proxy BiDi commands from the client straight\nto the upstream connection.\n\n### Extend the existing protocol with new commands\n\nYou may find that the existing commands don't cut it for your driver. If you want to expose\nbehaviours that don't map to any of the existing commands, you can create new commands in one of\nthree ways:\n\n1. Extending the classic WebDriver protocol and creating client-side plugins to access the extensions via the classic HTTP interface\n2. Extending the WebDriver BiDi protocol with new modules and methods, accessed from a client via the BiDi interface\n3. Overloading the Execute Script command by defining Execute\n Methods\n\nIf you want to follow the first path, you can direct Appium to recognize new methods and add them\nto its set of allowed HTTP routes and command names. You do this by assigning the `newMethodMap`\nstatic variable in your driver class to an object of the same form as Appium's `routes.js` object.\nFor example, here is the `newMethodMap` for the `FakeDriver` example driver:\n\n```js\nstatic newMethodMap = {\n '/session/:sessionId/fakedriver': {\n GET: {command: 'getFakeThing'},\n POST: {command: 'setFakeThing', payloadParams: {required: ['thing']}},\n },\n '/session/:sessionId/fakedriverargs': {\n GET: {command: 'getFakeDriverArgs'},\n },\n};\n```\n\nIn this example we're adding a few new routes and a total of 3 new commands. For more examples of\nhow to define commands in this way, it's best to have a look through `routes.js`. Now all you need\nto do is implement the command handlers in the same way you'd implement any other Appium command.\n\nThe downside of this way of adding new commands is that people using the standard Appium clients\nwon't have nice client-side functions designed to target these endpoints. So you would need to\ncreate and release client-side plugins for each language you want to support (directions or\nexamples can be found at the relevant client docs).\n\nThe second way of adding new commands is adding them as BiDi commands (accessed via the BiDi\nwebsocket interface, rather than the classic HTTP interface). BiDi commands come in two parts:\na \"module\", which is basically a container or namespace, and a \"command\", which is the name of your\nnew command.\n\nAs with the first method, you teach Appium to recognize your new BiDi commands by adding a static\nfield to your driver class, called `newBidiCommands`. It has a format similar to `newMethodMap`.\nBasically it encapsulates information about the BiDi module, BiDi command name, reference to your\ndriver instance method that will handle the command, and required and optional parameters. Here's\nan example of a `newBidiCommands` as implemented on an imaginary driver:\n\n```js\nstatic newBidiCommands = {\n 'appium:video': {\n startFramerateCapture: {\n command: 'startFrameCap',\n params: {\n required: ['videoSource'],\n optional: ['showOnScreen'],\n }\n },\n stopFramerateCapture: {\n command: 'stopFrameCap',\n },\n }\n};\n```\n\nIn this imaginary example, we have defined two new BiDi commands:\n`appium:video.startFramerateCapture` and `appium:video.stopFramerateCapture`. Note first of all\nthat, because we are defining a custom BiDi command, we should include a 'vendor prefix' (in this\ncase, `appium:`, though you should pick something that represents your project). The first command\ntakes a required and an optional parameter, and the second does not. When combined with generic\nBiDi support in your driver (see [the section on BiDi](#implement-webdriver-bidi-commands) above),\nand given an implementation of the appropriate methods on your driver (e.g. `startFrameCap` and\n`stopFrameCap` in this example), clients would be able to send these BiDi commands using whatever\nmechanism normally exists for doing so in the client library.\n\nAn alternative to these other ways of doing things is to overload a command which all WebDriver clients\nhave access to already: Execute Script. Appium provides some a convenient tool for making this\neasy. Let's say you are building a driver for stereo system called `soundz`, and you wanted to\ncreate a command for playing a song by name. You could expose this to your users in such a way that\nthey call something like:\n\n```js\n// webdriverio example. Calling webdriverio's `executeScript` command is what trigger's Appium's\n// Execute Script command handler\ndriver.executeScript('soundz: playSong', [{song: 'Stairway to Heaven', artist: 'Led Zeppelin'}]);\n```\n\nThen in your driver code you can define the static property `executeMethodMap` as a mapping of\nscript names to methods on your driver. It has the same basic form as `newMethodMap`, described\nabove. Once `executeMethodMap` is defined, you'll also need to implement the Execute Script command\nhandler, which according to Appium's routes mapping is called `execute`. The implementation can\ncall a single helper function, `this.executeMethod`, which takes care of looking at the script and\narguments the user sent in and routing it to the correct custom handler you've defined. Here's an\nexample:\n\n```js\nstatic executeMethodMap = {\n 'soundz: playSong', {\n command: 'soundzPlaySong',\n params: {required: ['song', 'artist'], optional: []},\n }\n}\n\nasync soundzPlaySong(song, artist) {\n // play the song based on song and artist details\n}\n\nasync execute(script, args) {\n return await this.executeMethod(script, args);\n}\n```\n\nA couple notes about this system:\n\n1. The arguments array sent via the call to Execute Script must contain only zero or one element(s). The\n first item in the list is considered to be the parameters object for your method. These parameters\n will be parsed, validated, and then applied to your overload method in the order specified in\n `executeMethodMap` (the order specified in the `required` parameters list, followed by the\n `optional` parameters list). I.e., this framework assumes only a single actual argument sent in via\n Execute Script (and this argument should be an object with keys/values representing the\n parameters your execute method expects).\n2. Appium does not automatically implement `execute` (the Execute Script handler) for you. You may\n wish, for example, to only call the `executeMethod` helper function when you're not in proxy\n mode!\n3. The `executeMethod` helper will reject with an error if a script name doesn't match one of the\n script names defined as a command in `executeMethodMap`, or if there are missing parameters.\n\nOne of the nice things about the Execute Method strategy is that methods implemented in this way\nwill be available via the classic or BiDi interfaces (since they will result in the same Appium\nhandlers being called).\n\n### Build Appium Doctor checks\n\nYour users can run `appium driver doctor ` to run installation and health checks. Visit\nthe [Building Doctor Checks](./build-doctor-checks.md) guide for more information on this\ncapability.\n\n### Implement handling of Appium settings\n\nAppium users can send parameters to your driver via CLI args as well as via capabilities. But these\ncannot change during the course of a test, and sometimes users want to adjust parameters mid-test.\nAppium has a [Settings](../guides/settings.md) API for this purpose.\n\nTo support settings in your own driver, first of all define `this.settings` to be an instance of\nthe appropriate class, in your constructor:\n\n```js\n// import {DeviceSettings} from 'appium/driver';\n\nthis.settings = new DeviceSettings();\n```\n\nNow, you can read user settings any time simply by calling `this.settings.getSettings()`. This will\nreturn a JS object where the settings names are keys and have their corresponding values.\n\nIf you want to assign some default settings, or run some code on your end whenever settings are\nupdated, you can do both of these things as well.\n\n```js\nconstructor() {\n const defaults = {setting1: 'value1'};\n this.settings = new DeviceSettings(defaults, this.onSettingsUpdate.bind(this));\n}\n\nasync onSettingsUpdate(key, value) {\n // do anything you want here with key and value\n}\n```\n\n### Emit BiDi events\n\nWith the WebDriver BiDi protocol, clients can subscribe to arbitrary events which can be sent\nasynchronously to the client over the BiDi socket connection. As an Appium driver author you don't\nneed to worry about event subscription. If you want to emit an event with a certain method name and\npayload, it's as easy as using the built-in event emitter with the `bidiEvent` event.\n\nAs an\nexample, let's say our driver wants to periodically emit CPU load information. We could define an\nevent called `system.cpu`, and a payload that looks like `{load: 0.97}` to signify 97% CPU usage.\nWhenever we want, our driver can simply call the following code (assuming we have the current load\nin `this.currentCpuLoad`):\n\n```js\nthis.eventEmitter.emit('bidiEvent', {\n method: 'appium:system.cpu',\n params: {load: this.currentCpuLoad},\n})\n```\n\nNow, if the client has subscribed to the `system.cpu` event, it will be notified with the load\nwhenever the driver emits it.\n\n### Make itself aware of resources other concurrent drivers are using\n\nLet's say your driver uses up some system resources, like ports. There are a few ways to make sure\nthat multiple simultaneous sessions don't use the same resources:\n\n1. Have your users specify resource IDs via capabilities (`appium:driverPort` etc)\n2. Just always use free resources (find a new random port for each session)\n3. Have each driver express what resources it is using, then examine currently-used resources from\n other drivers when a new session begins.\n\nTo support this third strategy, you can implement `get driverData` in your driver to return what\nsorts of resources your driver is currently using, for example:\n\n```js\nget driverData() {\n return {specialPort: 1234, specialFile: /path/to/file}\n}\n```\n\nNow, when a new session is started on your driver, the `driverData` response from any other\nsimultaneously running drivers (of the same type) will also be included, as the last parameter of\nthe `createSession` method:\n\n```js\nasync createSession(jwpCaps, reqCaps, w3cCaps, driverData)\n```\n\nYou can dig into this `driverData` array to see what resources other drivers are using to help\ndetermine which ones you want to use for this particular session.\n\n!!! warning\n\n```\nBe careful here, since `driverData` is only passed between sessions of a single running Appium\nserver. There's nothing to stop a user from running multiple Appium servers and requesting your\ndriver simultaneously on each of them. In this case, you won't be able to ensure independence\nof resources via `driverData`, so you might consider using file-based locking mechanisms or\nsomething similar.\n```\n\n!!! warning\n\n```\nIt's also important to note you will only receive `driverData` for other instances of *your*\ndriver. So unrelated drivers also running may still be using some system resources. In general\nAppium doesn't provide any features for ensuring unrelated drivers don't interfere with one\nanother, so it's up to the drivers to allow users to specify resource locations or addresses to\navoid clashes.\n```\n\n### Log events to the Appium event timeline\n\nAppium has an [Event Timing API](../guides/event-timing.md) which allows users to get timestamps\nfor certain server-side events (like commands, startup milestones, etc...) and display them on\na timeline. The feature basically exists to allow introspection of timing for internal events to\nhelp with debugging or running analysis on Appium driver internals. You can add your own events to\nthe event log:\n\n```js\nthis.logEvent(name);\n```\n\nSimply provide a name for the event and it will be added at the current time, and made accessible\nas part of the event log for users.\n\n### Hide behaviour behind security flags\n\nAppium has a feature-flag based [security model](../guides/security.md) that allows driver authors\nto hide certain features behind security flags. What this means is that if you have a feature you\ndeem insecure and want to require server admins to opt in to it, you can require that they enable\nthe feature by adding it to the `--allow-insecure` list or turning off server security entirely.\n\nTo support the check within your own driver, you can call `this.isFeatureEnabled(featureName)` to\ndetermine whether a feature of the given name has been enabled. Or, if you want to simply\nshort-circuit and throw an error if the feature isn't enabled, you can call\n`this.assertFeatureEnabled(featureName)`.\n\n### Use a temp dir for files\n\nIf you want to use a temporary directory for files your driver creates that are not important to\nkeep around between computer or server restarts, you can simply read from `this.opts.tmpDir`. This\nreads the temporary directory location from `@appium/support`, potentially overridden by a CLI\nflag. I.e., it's safer than writing to your own temporary directory because the location here plays\nnicely with possible user configuration. `this.opts.tmpDir` is a string, the path to the dir.\n\n### Deal with unexpected shutdowns or crashes\n\nYour driver might run into a situation where it can't continue operating normally. For example, it\nmight detect that some external service has crashed and nothing will work anymore. In this case, it\ncan call `this.startUnexpectedShutdown(err)` with an error object including any details, and Appium\nwill attempt to gracefully handle any remaining requests before shutting down the session.\n\nIf you want to perform some of your own cleanup logic when you encounter this condition, you can\neither do so immediately before calling `this.startUnexpectedShutdown`, or you can attach a handler\nto the unexpected shutdown event and run your cleanup logic \"out of band\" so to speak:\n\n```js\nthis.onUnexpectedShutdown(handler)\n```\n\n`handler` should be a function which receives an error object (representing the reason for the\nunexpected shutdown).\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/developing/build-plugins.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Building Plugins\n---\n\nThis is a high-level guide for developing Appium plugins, which is not something most Appium users\nneed to know or care about. If you are not familiar with Appium plugins yet from a user\nperspective, check out the [list of plugins](../ecosystem/plugins.md) to play around with some and get\nan idea of the sorts of things that plugins can do. Plugins are a powerful system for augmenting\nAppium's functionality or changing the way Appium works. They can be distributed to other Appium\nusers and can extend Appium's ecosystem in all kinds of interesting ways! (There is also\na significant amount of overlap here with developing Appium drivers, so you may also want to check\nout the [building drivers](./build-drivers.md) guide for further inspiration.)\n\n## Before you create your plugin\n\nBefore creating your plugin, it's good to have a general idea of what you want your plugin to\naccomplish and whether it will be possible to implement it given the restrictions of the Appium\nplatform. Reading through this guide will help you understand what's possible. In general, Appium's\nplugin system is extremely powerful and no attempts have been made to artificially limit what's\npossible with them (which is a main reason that all plugins are opt-in by the system administrator\nresponsible for starting the Appium server---plugins are powerful and should only be used when\nexplicitly trusted!).\n\n## Other plugins to reference\n\nThere are a wide variety of open source Appium plugins available for perusal. It's definitely\nrecommended to explore the code for some other plugins before embarking on writing your own. The\nAppium team maintains a set of official plugins in the Appium GitHub\nrepo. Links to other open source plugins can be found in the\n[Plugin list](../ecosystem/plugins.md)\n\n## Basic requirements for plugins\n\nThese are the things your plugin _must_ do (or be), if you want it to be a valid Appium plugin.\n\n### Node.js package with Appium extension metadata\n\nAll Appium plugins are fundamentally Node.js packages, and therefore must have a valid\n`package.json`. Your driver is not _limited_ to Node.js, but it must provide an adapter written in\nNode.js so it can be loaded by Appium.\n\nYour `package.json` must include `appium` as a `peerDependency`. The requirements for the\ndependency versions should be as loose as possible (unless you happen to know your plugin will only\nwork with certain versions of Appium). For Appium 2, for example, this would look something like\n`^2.0.0`, declaring that your plugin works with any version of Appium that starts with 2.x.\n\nYour `package.json` must contain an `appium` field, like this (we call this the 'Appium extension\nmetadata'):\n\n````\n```json\n{\n ...,\n \"appium\": {\n \"pluginName\": \"fake\",\n \"mainClass\": \"FakePlugin\"\n },\n ...\n}\n```\n````\n\nThe required subfields are:\n\n- `pluginName`: this should be a short name for your plugin.\n- `mainClass`: this is a named export (in CommonJS style) from your `main` field. It must be a\n class which extends Appium's `BasePlugin` (see below).\n\n### Extend Appium's `BasePlugin` class\n\nUltimately, your plugin is much easier to write because most of the hard work of defining patterns\nfor overriding commands is done for you. This is\nall encoded up as a class which Appium exports for you to use, called `BasePlugin`. It is exported\nfrom `appium/plugin`, so you can use one of these styles to import it and create your _own_ class\nthat extends it:\n\n```js\nimport {BasePlugin} from 'appium/plugin';\n// or: const {BasePlugin} = require('appium/plugin');\n\nexport class MyPlugin extends BasePlugin {\n // class methods here\n}\n```\n\n!!! note\n\n```\nIn all the code samples below, whenever we reference an example method, it is assumed\nthat it is defined _within_ the class, though this is not explicitly written, for the sake of\nclarity and space.\n```\n\n### Make your plugin available\n\nThat's basically it! With a Node.js package exporting a plugin class and with correct Appium\nextension metadata, you've got yourself an Appium plugin! Now it doesn't _do_ anything, but you can\nload it up in Appium, activate it, etc...\n\nTo make it available to users, you could publish it via NPM. When you do so, your plugin will be\ninstallable via the Appium CLI:\n\n```\nappium plugin install --source=npm \n```\n\nIt's a good idea to test your plugin first, of course. One way to see how it works within Appium is\nto install it locally first:\n\n```\nappium plugin install --source=local /path/to/your/plugin\n```\n\nAnd of course, plugins must be \"activated\" during Appium server start, so make sure you direct your\nusers to do so:\n\n```\nappium --use-plugins=plugin-name\n```\n\n### Developing your plugin\n\nHow you develop your plugin is up to you. It is convenient, however, to run it from within Appium\nwithout having to do lots of publishing and installing. The most straightforward way to do this is\nto include the most recent version of Appium as a `devDependency` (although its being already\nincluded as a `peerDependency` is sufficient in newer versions of NPM), and then also your own plugin,\nlike this:\n\n```json\n{\n \"devDependencies\": {\n ...,\n \"appium\": \"^2.0.0\",\n \"your-plugin\": \"file:.\",\n ...\n }\n}\n```\n\nNow, you can run Appium locally (`npm exec appium` or `npx appium`), and because your plugin is\nlisted as a dependency alongside it, it will be automatically \"installed\" and available. You can\ndesign your e2e tests this way, or if you're writing them in Node.js, you can simply import\nAppium's start server methods to handle starting and stopping the Appium server in Node.\n\nOf course, you can always install it locally as described above as well.\n\nAnytime you make changes to your plugin code, you'll need to restart the Appium server to make sure\nit picks up the latest code. As with drivers, you can set the `APPIUM_RELOAD_EXTENSIONS`\nenvironment variable if you wish Appium to try to re-require your plugin module when a new session\nstarts.\n\n## Standard plugin implementation ideas\n\nThese are things you will probably find yourself wanting to do when creating a plugin.\n\n### Set up state in a constructor\n\nIf you define your own constructor, you'll need to call `super` to make sure all the standard state\nis set up correctly:\n\n```js\nconstructor(...args) {\n super(...args);\n // now do your own thing\n}\n```\n\nThe `args` parameter here is the object containing all the CLI args used to start the Appium\nserver.\n\n### Intercept and handle specific Appium commands\n\nThis is the most normal behavior for Appium plugins -- to modify or replace the execution of one or\nmore commands that would normally be handled by the active driver. To override the default command\nhandling, you need to implement `async` methods in your class with the same name as the Appium\ncommands to be handled (just exactly how drivers themselves are\nimplemented). Curious what command names there\nare? They are defined in the Appium base driver's\n[routes.js](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js) file,\nand of course you can add more as defined in the next section.\n\nEach command method is sent the following arguments:\n\n1. `next`: This is a reference to an `async` function which encapsulates the chain of behaviors which would take place if this plugin were not handling the command. You can choose to call the next behavior in the chain at any point in your logic (by making sure to include `await next()` somewhere), or not. If you don't, it means the default behavior (or any plugins registered after this one) won't be run.\n2. `driver`: This is the object representing the driver handling the current session. You have access to it for any work you need to do, for example calling other driver methods, checking capabilities or settings, etc...\n3. `...args`: A spread array with any arguments that have been applied to the command by the user.\n\nFor example, if we wanted to override the `setUrl` command to simply add some extra logging on top,\nwe would implement as follows:\n\n```js\nasync setUrl(next, driver, url) {\n this.log(`Let's get the page source for some reason before navigating to '${url}'!`);\n await driver.getPageSource();\n const result = await next();\n this.log(`We can also log after the original behaviour`);\n return result;\n}\n```\n\n### Intercept and handle _all_ Appium commands\n\nYou might find yourself in a position where you want to handle _all_ commands, in order to inspect\npayloads to determine whether or not to act in some way. If so, you can implement `async handle`,\nand any command that is not handled by one of your named methods will be handled by this method\ninstead. It takes the following parameters (with all the same semantics as above):\n\n1. `next`\n2. `driver`\n3. `cmdName` - string representing the command being run\n4. `...args`\n\nFor example, let's say we want to log timing for all Appium commands as part of a plugin. We could\ndo this by implementing `handle` in our plugin class as follows:\n\n```js\nasync handle(next, driver, cmdName, ...args) {\n const start = Date.now();\n try {\n const result = await next();\n } finally {\n const elapsedMs = Date.now() - start;\n this.log(`Command '${cmdName}' took ${elapsedMs}`);\n }\n return result;\n}\n```\n\n### Working with driver proxies\n\nThere is a bit of a gotcha with handling Appium commands. Appium drivers have the ability to turn\non a special 'proxy' mode, wherein the Appium server process takes a look at incoming URLs, and\ndecides whether to forward them on to some upstream WebDriver server. It could happen that\na command which a plugin wants to handle is designated as a command which is being proxied to an\nupstream server. In this case, we might run into a problem, because the plugin never gets a chance to\nhandle that command! The way Appium handles this is as follows:\n\n1. When a command comes in, before deciding whether to proxy the command, the main protocol handler\n checks to see whether a plugin would handle the command.\n2. If a plugin would _not_ handle the command--all proceeds as normal, and the request is either\n proxied or not, based on the driver's proxy mode.\n3. If a plugin _would_ handle the command, then the proxy behavior is skipped for the time being,\n and wrapped up as the `next` function sent to the plugin. So if you have a command handler in\n your plugin, and you want to be sure that the default driver proxying _does_ take place, then\n simply `await next()` instead of (or in addition to) whatever your plugin handler is doing.\n\n### Throw WebDriver-specific errors\n\nThe WebDriver spec defines a set of error\ncodes to accompany command responses if an\nerror occurred. Appium has created error classes for each of these codes, so you can throw the\nappropriate error from inside a command, and it will do the right thing in terms of the protocol\nresponse to the user. To get access to these error classes, import them from `appium/driver`:\n\n```js\nimport {errors} from 'appium/driver';\n\nthrow new errors.NoSuchElementError();\n```\n\n### Log messages to the Appium log\n\nYou can always use `console.log`, of course, but Appium provides a nice logger for you as\n`this.logger` (it has `.info`, `.debug`, `.log`, `.warn`, `.error` methods on it for differing log\nlevels). If you want to create an Appium logger outside of a plugin context (say in a script or\nhelper file), you can always construct your own too:\n\n```js\nimport {logging} from 'appium/support';\nconst log = logging.getLogger('MyPlugin');\n```\n\n## Further possibilities for Appium plugins\n\nThese are things your plugin _can_ do to take advantage of extra plugin features or do its job more\nconveniently.\n\n### Add a schema for custom command line arguments\n\nYou can add custom CLI args if you want your plugin to receive data from the command line when the\nAppium server is started (for example, ports that a server administrator should set that should not\nbe passed in as capabilities).\n\nThis works largely the same for plugins as it does for drivers, so for more details have a look at\nthe equivalent section in the building drivers\ndoc.\n\nThe only difference is that to construct the CLI argument name, you prefix it with\n`--plugin-`. So for example, if you have a plugin named `pluggo` and a CLI arg defined with\nthe name `electro-port`, you can set it when starting Appium via `--plugin-pluggo-electro-port`.\n\nSetting args via a configuration file is also supported, as it is for drivers, but under the\n`plugin` field instead. For example:\n\n```json\n{\n \"server\": {\n \"plugin\": {\n \"pluggo\": {\n \"electro-port\": 1234\n }\n }\n }\n}\n```\n\n### Add plugin scripts\n\nSometimes you might want users of your plugin to be able to run scripts outside the context of\na session (for example, to run a script that pre-builds aspects of your plugin). To support this,\nyou can add a map of script names and JS files to the `scripts` field within your Appium extension\nmetadata. So let's say you've created a script in your project that lives in a `scripts` directory\nin your project, named `plugin-prebuild.js`. Then you could add a `scripts` field like this:\n\n```json\n{\n \"scripts\": {\n \"prebuild\": \"./scripts/plugin-prebuild.js\"\n }\n}\n```\n\nNow, assuming your plugin is named `myplugin`, users of your plugin can run `appium plugin run\nmyplugin prebuild`, and your script will execute.\n\n### Add new Appium commands\n\nIf you want to offer functionality that doesn't map to any of the existing commands supported by\ndrivers, you can create new commands in one of two ways, just as is possible for drivers:\n\n1. Extending the WebDriver protocol and creating client-side plugins to access the extensions\n2. Extending the WebDriver BiDi protocol with new modules and methods, accessed from a client via the BiDi interface\n3. Overloading the Execute Script command by defining Execute\n Methods\n\n#### Extending the HTTP Protocol\n\nIf you want to follow the first path, you can direct Appium to recognize new methods and add them\nto its set of allowed HTTP routes and command names. You do this by assigning the `newMethodMap`\nstatic variable in your driver class to an object of the same form as Appium's `routes.js` object.\nFor example, here is part of the `newMethodMap` for the `FakePlugin` example driver:\n\n```js\nstatic newMethodMap = {\n '/session/:sessionId/fake_data': {\n GET: {command: 'getFakeSessionData', neverProxy: true},\n POST: {\n command: 'setFakeSessionData',\n payloadParams: {required: ['data']},\n neverProxy: true,\n },\n },\n '/session/:sessionId/fakepluginargs': {\n GET: {command: 'getFakePluginArgs', neverProxy: true},\n },\n};\n```\n\n!!! note\n\n```\nIf you're using TypeScript, static member objects like these should be defined `as const`.\n```\n\nIn this example we're adding a few new routes and a total of 3 new commands. For more examples of\nhow to define commands in this way, it's best to have a look through `routes.js`. Now all you need\nto do is implement the command handlers in the same way you'd implement any other Appium command.\n\nNote also the special `neverProxy` key for commands; this is generally a good idea to set to `true`\nfor plugins, since your plugin might be active for a driver that is put into proxy mode but hasn't\nbothered to decline proxying for these (new and therefore unknown) commands. Setting `neverProxy`\nto `true` here will cause Appium to never proxy these routes and therefore ensure your plugin\nhandles them, even if a driver is in proxy mode.\n\nThe downside of adding new commands via `newMethodMap` is that people using the standard Appium\nclients won't have nice client-side functions designed to target these endpoints. So you would need\nto create and release client-side plugins for each language you want to support (directions or\nexamples can be found at the relevant client docs).\n\n#### Extending the BiDi Protocol\n\nYou can also make new commands accessible via the WebDriver BiDi (WebSocket-based) protocol. BiDi\ncommands come in two parts: a \"module\", which is basically a container or namespace, and\na \"command\", which is the name of your new command.\n\nAs with the first method, you teach Appium to recognize your new BiDi commands by adding a static\nfield to your driver class, called `newBidiCommands`. It has a format similar to `newMethodMap`.\nBasically it encapsulates information about the BiDi module, BiDi command name, reference to your\ndriver instance method that will handle the command, and required and optional parameters. Here's\nan example of a `newBidiCommands` as implemented on an imaginary driver:\n\n```js\nstatic newBidiCommands = {\n 'appium:video': {\n startFramerateCapture: {\n command: 'startFrameCap',\n params: {\n required: ['videoSource'],\n optional: ['showOnScreen'],\n }\n },\n stopFramerateCapture: {\n command: 'stopFrameCap',\n },\n }\n};\n```\n\nIn this imaginary example, we have defined two new BiDi commands: `appium:video.startFramerateCapture` and\n`appium:video.stopFramerateCapture`. The first command takes a required and an optional parameter, and the\nsecond does not. When you have implemented the `startFrameCap` and `stopFrameCap` methods on your\nplugin class, they will be called whenever the BiDi commands are triggered by a client. The\nsignatures for these methods would look as follows:\n\n```js\nasync startFrameCap(next: () => Promise, driver: DriverClass, videoSource: string, showOnScreen: boolean): Promise;\nasync stopFrameCap(next: () => Promise, driver: DriverClass): Promise;\n```\n\nAs with adding or overriding existing HTTP protocol commands, these methods are injected with\na `next` parameter and a `driver` parameter. The `driver` object represents the driver currently\nowning the session, and calling `await next()` will execute/return the behavior that would execute\nwere the plugin not active (i.e., the driver's own handling of that method, or the chain of\ncommands executed with the same name by other active plugins).\n\nNote that, currently, if a driver has BiDi proxying turned on, plugins will not be able to override\nBiDi methods handled by the proxy. Also note that since these are custom BiDi commands, our module\nname should include a vendor prefix (we chose `appium:`, but you can/should choose something that\nmakes sense for your extension).\n\n#### Overloading Execute Script\n\nAn alternative to these ways of doing things is to overload a command which all WebDriver clients\nhave access to already: Execute Script. Make sure to read the section on adding new\ncommands in\nthe Building Drivers guide to understand the way this works in general. The way it works with\nplugins is only slightly different. Let's look at an example taken from Appium's `fake-plugin`:\n\n```js\nstatic executeMethodMap = {\n 'fake: plugMeIn': {\n command: 'plugMeIn',\n params: {required: ['socket']},\n },\n};\n\nasync plugMeIn(next, driver, socket) {\n return `Plugged in to ${socket}`;\n}\n\nasync execute(next, driver, script, args) {\n return await this.executeMethod(next, driver, script, args);\n}\n```\n\nWe have three important components shown here which make this system work, all of which are defined\ninside the plugin class:\n\n1. The `executeMethodMap`, defined in just the same way as for drivers\n2. The implementation of the command method as defined in `executeMethodMap` (in this case,\n `plugMeIn`)\n3. The overriding/handling of the `execute` command. Just like any plugin command handlers, the\n first two arguments are `next` and `driver`, followed by the script name and args. `BasePlugin`\n implements a helper method which we can simply call with all of these arguments.\n\nOverriding Execute Methods from drivers works as you'd expect: if your plugin defines an Execute\nMethod with the same name as that of a driver, your command (in this case `plugMeIn`) will be\ncalled first. You can choose to run the driver's original behaviour via `next` if you want.\n\n### Emit BiDi Events\n\nYour plugin can emit custom BiDi events in exactly the same way as Appium\ndrivers.\n\n### Build Appium Doctor checks\n\nYour users can run `appium plugin doctor ` to run installation and health checks. Visit\nthe [Building Doctor Checks](./build-doctor-checks.md) guide for more information on this\ncapability.\n\n### Update the Appium server object\n\nYou probably don't normally need to update the Appium server object (which is an\n[Express](https://expressjs.com/) server having already been\n[configured](https://github.com/appium/appium/blob/master/packages/base-driver/lib/express/server.js)\nin a variety of ways). But, for example, you could add new Express middleware to the server to\nsupport your plugin's requirements. To update the server you must implement the `static async\nupdateServer` method in your class. This method takes three parameters:\n\n- `expressApp`: the Express app object\n- `httpServer`: the Node HTTP server object\n- `cliArgs`: a map of the CLI args used to start the Appium server\n\nYou can do whatever you want with them inside the `updateServer` method. You might want to\nreference how these objects are created and worked with in the BaseDriver code, so that you know\nyou're not undoing or overriding anything standard and important. But if you insist, you can, with\nresults you'll need to test! Warning: this should be considered an advanced feature and requires\nknowledge of Express, as well as the care not to do anything that could affect the operation of\nother parts of the Appium server!\n\n### Handle unexpected session shutdown\n\nWhen developing a plugin you may want to add some cleanup logic for when a session ends. You would\nnaturally do this by adding a handler for `deleteSession`. This works in most cases, except when\nthe session does not finish cleanly. Appium sometimes determines that a session has finished\nunexpectedly, and in these situations, Appium will look for a method called `onUnexpectedShutdown`\nin your plugin class, which will be called (passing the current session driver as the first\nparameter, and the error object representing the cause of the shutdown as the second), giving you\nan opportunity to take any steps that might be necessary to clean up from the session. For example,\nkeeping in mind that the function is not `await`ed you could implement something like this:\n\n```js\nasync onUnexpectedShutdown(driver, cause) {\n try {\n // do some cleanup\n } catch (e) {\n // log any errors; don't allow anything to be thrown as they will be unhandled rejections\n }\n}\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/developing/config-system.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium's Config System\n---\n\nAppium includes support for [configuration files](../guides/config.md). A configuration file is\nintended to have (nearly) 1:1 parity with command-line arguments. An end user can supply Appium with\na configuration file, CLI args, or both (the args have precedence over the config file).\n\nThis document will be a technical overview of how the configuration system works. It is intended\nfor Appium contributors, but will also explain the system's fundamental features.\n\n## Reading a Config File\n\nA config file is a JSON, JavaScript, or YAML file which can be validated against a schema. By\ndefault, this file will be named `.appiumrc.{json,js,yaml,yml}` and should be in the root of the\nproject which depends upon `appium`. Other filenames and locations are supported via the `--config ` flag. For obvious reasons, the `config` argument is disallowed within config files.\n\nIn lieu of a separate file, configuration can be embedded in a project's `package.json` using the\n`appiumConfig` property, e.g.,:\n\n```json\n{\n \"appiumConfig\": {\n \"server\": {\n \"port\": 12345\n }\n }\n}\n```\n\nWhen an Appium server is started via the `appium` executable, the `init` function in `lib/main.js`\nwill call into `lib/config-file.js` to load and/or search for a configuration file and in\n`package.json`.\n\n!!! note\n\n```\nIt is not an error if configuration isn't found!\n```\n\nThe [`lilconfig`](https://npm.im/lilconfig) package provides the search & load functionality; refer\nto its documentation for more information about the search paths. Additionally, Appium provides\nsupport for config files written in YAML via the package [`yaml`](https://npm.im/yaml).\n\nIf a config file is found and successfully [validated](#validation), the result will be merged with\na set of defaults and any additional CLI arguments. CLI arguments have precedence over config\nfiles, and config files have precedence over defaults.\n\n## Validation\n\nThe same system is used for _both_ validation of config files _and_ command-line arguments.\n\nThe package [`ajv`](https://npm.im/ajv) provides validation. Of course, to make `ajv` validate\nanything, it must be provided a _schema_.\n\nThe _base_ schema is a JSON Schema\nDraft-7-compliant object exported by\n`lib/schema/appium-config-schema.js`. This schema defines configuration _native to Appium_, and\nonly concerns its behavior as a _server_; it does not define configuration for any other\nfunctionality (e.g., the `plugin` or `driver` subcommands).\n\n!!! warning\n\n```\nNote that this file is the _base_ schema; this will become painfully relevant.\n```\n\nThis file is is _not_ a JSON file, because a) JSON is painful to work with for humans, b) is\nespecially reviled by @jlipps, and c) `ajv` accepts objects, not JSON files.\n\nIt is more straightforward to explain how config files are validated, so we'll start there.\n\n### Validating Config Files\n\nWhen a config file is found (`lib/config-file.js`), it will call the `validate` function exported\nfrom `lib/schema/schema.js` with the contents of the config file. In turn, this asks `ajv` to\nvalidate the data against the schema that Appium has provided it.\n\nIf the config file is invalid, errors will be generated to be displayed to the user. Finally, the\n`init` function will detect these errors, display them, and the process will exit.\n\nI hope that made sense, because this is the easy part.\n\n### Validating CLI Arguments\n\nAs mentioned earlier, the same system is used for validating both config files and CLI arguments.\n\nTotally not judging, but Appium uses [`argparse`](https://npm.im/argparse) for its CLI argument\nparsing. This package, and others like it, provides an API to define the arguments a command-line\nNode.js script accepts, and will ultimately return an object representation of the user-supplied\narguments.\n\nJust as the schema defines what's allowed in a config file, it also defines what's allowed on the\ncommand-line.\n\n#### Defining CLI Arguments via Schema\n\nCLI arguments must be _defined_ before their values can be validated.\n\nA JSON schema isn't a natural fit for defining CLI args--it needs some grease to make it work--but\nit's close enough that we can do so with an adapter and some custom metadata.\n\nIn `lib/cli/parser.js`, there's a wrapper around `argparse`'s `ArgumentParser`; it's called (wait\nfor it)... `ArgParser`. The wrapper exists because we're doing some custom things with `argparse`,\nbut is has nothing to do with the schema directly.\n\nAn `ArgParser` instance is created and its `parseArgs()` method is called with the raw CLI\narguments. The definition of the accepted arguments comes from `lib/cli/args.js` in part--here, all\nof the arguments _not_ intended for use with the `server` subcommand are hard-coded (e.g., the\n`driver` subcommand and _its_ subcommands). `args.js` also contains a function `getServerArgs()`,\nwhich in turn calls into `toParserArgs` in `lib/schema/cli-args.js`. `lib/schema/cli-args.js` can\nbe considered the \"adapter\" layer between `argparse` and the schema.\n\n`toParserArgs` uses the `flattenSchema` function exported by `lib/schema/schema.js`, which\n\"squashes\" the schema into a key/value representation. Then, `toParserArgs` iterates over each\nkey/value pair and \"converts\" it into a suitable `ArgumentOption` object for final handoff to\n`ArgParser`.\n\nThis adapter (`cli-args.js`) is where most of the mess is hidden; let's explore this rat's nest\na bit further.\n\n##### CLI & Schema Incongruities\n\nThe conversion algorithm (see function `subSchemaToArgDef` in `lib/schema/cli-args.js`) is mostly\njust hacks and special cases neatly packed into a function. Things that don't cleanly map from\n`argparse` to a JSON schema include, but are not limited to:\n\n- A schema cannot natively express \"store the value of `--foo=` in a property called `bar`\" in a schema (this corresponds to the `ArgumentOption['dest']` prop).\n- A schema cannot natively express aliases; e.g., `--verbose` can also be `-v`\n- A schema `enum` is not restricted to multiple types, but `argparse`'s equivalent `ArgumentOption['choices']` prop _is_\n- A schema does not know about `argparse`'s concept of \"actions\" (note that Appium is not currently using custom actions--though it did, and it could again).\n- `argparse` has no native type for `email`, `hostname`, `ipv4`, `uri` etc., and the schema does\n- Schema validation only _validates_, it does not perform translation, transformation, or coercion (mostly). `argparse` allows this.\n- Schemas allow the `null` type, for whatever reason. Ever pass `null` on the CLI?\n- `argparse` does not understand anything other than primitives; no objects, arrays, etc., and certainly not arrays of a particular type.\n\nAll of the above cases and others are handled by the adapter.\n\n!!! warning\n\n```\nSome decisions made in the adapter were arrived at via coin toss. If you are curious about why\nsomething is the way it is, it's likely that it had to do _something_.\n```\n\nLet's look more closely at handling types.\n\n#### Argument Types via `ajv`\n\nWhile `argparse` allows consumers, via its API, to define the _type_ of various arguments (e.g.,\na string, number, boolean flag, etc.), Appium mostly avoids these built-in types. _Why is that?_\nWell:\n\n1. We already know the type of an argument, because we've defined it in a schema.\n2. `ajv` provides validation against a schema.\n3. A schema allows for greater expression of types, allowed values, etc., than `argparse` can provide natively.\n4. The expressiveness of a schema allows for better error messaging.\n\nTo that end, the adapter eschews `argparse`'s built-in types (see allowed string values of\n`ArgumentOption['type']`) and instead abuses the ability to provide a _function_ as a `type`. The\nexception is _boolean_ flags, which do not have a `type`, but rather `action: 'store_true'`. The\nworld may never know why.\n\n##### Types as Functions\n\nWhen a `type` is a function, the function performs both validation _and_ coercion (if necessary).\nSo what are these functions?\n\n> Note: `type` is _omitted_ (and thus _not_ a function) from the `ArgumentOption` if the property\n> type is `boolean`, and is instead provided an `action` property of `store_true`. Yes, this is\n> weird. No, I don't know why.\n\nWell... it depends upon the schema. But generally speaking, we create a _pipeline_ of functions,\neach corresponding to a keyword in the schema. Let's take the example of the `port` argument. In\nlieu of asking the OS which ports the `appium`-running user can bind to, this argument is expected\nto be an integer between 1 and 65535. This turns out to be two functions which we combine into\na pipeline:\n\n1. Convert the value to an integer, if possible. Because _every value in `process.argv` is a string_, we must coerce if we want a number.\n2. Use `ajv` to validate the integer against the schema for `port`. A schema lets us define a range via the `minimum` and `maximum` keywords. Read more about how this works in\n\nMuch like the config file validation, if errors are detected, Appium nicely tells the end-user and\nthe process exits w/ some help text.\n\nFor other arguments which are naturally of non-primitive types, things are not so straightforward.\n\n##### Transformers\n\nRemember how `argparse` doesn't understand arrays? What if the most ergonomic way to express\na value is, in fact, an array?\n\nWell, Appium can't accept an array on the CLI, even though it can accept one in the config file.\nBut Appium _can_ accept a comma-delimited string (a CSV \"line\"). Or a string filepath referring to\na file which _contains_ a delimited list. Either way: by the time the value gets out of the\nargument parser, it should be an array.\n\nAnd as mentioned above, the native facilities of a JSON schema cannot express this. However, it's\npossible to define a _custom keyword_ which Appium can then detect and handle accordingly. So\nthat's what Appium does.\n\nIn this case, a custom keyword `appiumCliTransformer` is registered with `ajv`. The value of\n`appiumCliTransformer` (at the time of this writing) can be `csv` or `json`. In the base schema\nfile, `appium-config-schema.js`, Appium uses `appiumCliTransformer: 'csv'` if this behavior is\ndesired.\n\n!!! note\n\n```\nAny property defined in the schema having type `array` will _automatically_ uses the `csv`\ntransformer. Likewise, a property having type `object` will use the `json` transformer. It's\nconceivable that `array` may want to use the `json` transformer, but otherwise, the presence of\nthe `appiumCliTransformer` keyword on an `array`-or-`object`-typed property is not strictly\nnecessary.\n```\n\nThe adapter (remember the adapter?) creates a pipeline function including a special \"CSV\ntransformer\" (transformers are defined in `lib/schema/cli-transformers.js`), and uses this function\nas the `type` property of the `ArgumentOption` passed into `argparse`. In this case, the `type:\n'array'` in the schema is ignored.\n\n!!! note\n\n```\nThe config file doesn't _need_ to perform any complex transformation of values, because it\nnaturally allows Appium to define exactly what it expects. So Appium does no post-processing of\nconfig file values.\n```\n\nProperties that do not need this special treatment use `ajv` directly for validation. How this\nworks requires some explanation, so that's next.\n\n#### Validation of Individual Arguments via `ajv`\n\nWhen we think of a JSON schema, we tend to think, \"I have this JSON file and I want to validate it\nagainst the schema\". That's valid, and in fact Appium does just that with config files! However,\nAppium does not do this when validating arguments.\n\n!!! note\n\n```\nDuring implementation, I was tempted to mash all of the arguments together into\na config-file-like data structure and then validate it all at once. I think that would have\nbeen _possible_, but since an object full of CLI arguments is a flat key/value structure and\nthe schema is not, this seemed like trouble.\n```\n\nInstead, Appium validates a value against a specific property _within_ the schema. To do this, it\nmaintains a mapping between a CLI argument definition and its corresponding property. The mapping\nitself is a `Map` with a unique identifier for the argument as the key, and an `ArgSpec`\n(`lib/schema/arg-spec.js`) object as the value.\n\nAn `ArgSpec` object stores the following metadata:\n\n| Property Name | Description |\n| --------------- | -------------------------------------------------------------------------------------------------------- |\n| `name` | Canonical name of the argument, corresponding to the property name in the schema. |\n| `extType?` | `driver` or `plugin`, if appropriate |\n| `extName?` | Extension name, if appropriate |\n| `ref` | Computed `$id` of the property in the schema |\n| `arg` | Argument as accepted on CLI, without leading dashes |\n| `dest` | Property name in parsed arguments object (as returned by `argparse`'s `parse_args()`) |\n| `defaultValue?` | Value of the `default` keyword in schema, if appropriate |\n\nWhen a schema is [finalized](#schema-loading), the `Map` is populated with `ArgSpec` objects\nfor all known arguments.\n\nSo when the adapter is creating the pipeline of functions for the argument's `type`, it already has\nan `ArgSpec` for the argument. It creates a function which calls `validate(value, ref)` (in\n`lib/schema/schema.js`) where `value` is whatever the user provided, and `ref` is the `ref`\nproperty of the `ArgSpec`. The concept is that `ajv` can validate using _any_ `ref` it knows about;\neach property in a schema can be referenced by this `ref` whether it's defined or not. To help\nvisualize, if a schema is:\n\n```json\n{\n \"$id\": \"my-schema.json\",\n \"type\": \"object\",\n \"properties\": {\n \"foo\": {\n \"type\": \"number\"\n }\n }\n}\n```\n\nThe `ref` of `foo` would be `my-schema.json#/properties/foo`. Assuming our `Ajv` instance knows\nabout this `my-schema.json`, then we can call its `getSchema(ref)` method (which has a `schema`\nproperty, but is a misnomer nonetheless) to get a validation function; `validate(value, ref)` in\n`schema.js` calls this validation function.\n\n!!! note\n\n```\nThe schema spec says a schema author can supply an explicit `$id` keyword to override this;\nit's unsupported by Appium at this time. If needed, extension authors must carefully use `$ref`\nwithout custom `$id`s. It's highly unlikely an extension would have a schema so complicated as\nto need this, however; Appium itself doesn't even use `$ref` to define its own properties!\n```\n\nNext, let's take a look at how Appium loads schemas. This actually happens _before_ any argument\nvalidation.\n\n## Schema Loading\n\nLet's ignore extensions for a moment, and start with the base schema.\n\nWhen something first imports the `lib/schema/schema.js` module, an instance of an `AppiumSchema` is\ncreated. This is a singleton, and its methods are exported from the module (all of which are bound\nto the instance).\n\nThe constructor does very little; it instantiates an `Ajv` instance and configures it with Appium's\n[custom keywords](#custom-keyword-reference) and adds support for the `format` keyword via the\n[ajv-formats](https://npm.im/ajv-formats) module.\n\nOtherwise, the `AppiumSchema` instance does not interact with the `Ajv` instance until its\n`finalize()` method (exported as `finalizeSchema()`) is called. When this method is called, we're\nsaying \"we are not going to add any more schemas; go ahead and create `ArgSpec` objects and\nregister schemas with `ajv`\".\n\nWhen does finalization happen? Well:\n\n1. When the `appium` executable begins, it _checks for and configures extensions_ (hand-wave) in `APPIUM_HOME`.\n2. Only then does it start to think about arguments--it instantiates an `ArgParser`, which (as you'll recall) runs the adapter to convert the schema to arguments.\n3. _Finalization happens here_--when creating the parser. Appium need the schema(s) to be registered with `ajv` in order to create validation functions for arguments.\n4. Thereafter, Appium parses the arguments with the `ArgParser`.\n5. Finally, decides what to do with the returned object.\n\nWithout extensions, `finalize()` still knows about the Appium base schema\n(`appium-config-schema.js`), and just registers that. However, step 1. above is doing a _lot of\nwork_, so let's look at how extensions come into play.\n\n## Extension Support\n\nOne of the design goals of this system is the following:\n\n_An extension should be able to register custom CLI arguments with the Appium, and a user should be\nable to use them like any other argument_.\n\nPreviously, Appium accepted arguments in this manner (via `--driverArgs`), but validation was\nhand-rolled and required extension implementors to use a custom API. It also required the user to\nawkwardly pass a JSON string as the configuration on the command-line. Further, no contextual help\n(via `--help`) existed for these arguments.\n\nNow, by providing a schema for its options, a driver or plugin can register CLI arguments and\nconfig file schemas with Appium.\n\nTo register a schema, an extension must provide the `appium.schema` property in its `package.json`.\nThe value may be a schema or a path to a schema. If the latter, the schema should be JSON or\na CommonJS module (ESM not supported at this time, nor is YAML).\n\nFor any property in this schema, the property will appear as a CLI argument of the form\n`----`. For example, if the `fake` driver provides\na property `foo`, the argument will be `--driver-fake-foo`, and will show in `appium server --help`\nlike any other CLI argument.\n\nThe corresponding property in a config file would be\n`server...`, e.g.:\n\n```json\n{\n \"server\": {\n \"driver\": {\n \"fake\": {\n \"foo\": \"bar\"\n }\n }\n }\n}\n```\n\nThe naming convention described above avoids problems of one extension type having a name conflict\nwith a different extension type.\n\n!!! note\n\n```\nWhile an extension can provide aliases via `appiumCliAliases`, \"short\" flags are disallowed,\nsince all arguments from extensions are prefixed with `----`.\nThe extension name and argument name will be kebab-cased for the CLI, according to [Lodash's\nrules](https://lodash.com/docs/4.17.15#kebabCase) around kebab-casing.\n```\n\nThe schema object will look much like Appium's base schema, but it will only have top-level\nproperties (nested properties are currently unsupported). Example:\n\n```json\n{\n \"title\": \"my rad schema for the cowabunga driver\",\n \"type\": \"object\",\n \"properties\": {\n \"fizz\": {\n \"type\": \"string\",\n \"default\": \"buzz\",\n \"$comment\": \"corresponds to CLI --driver-cowabunga-fizz\"\n }\n }\n}\n```\n\nAs written in a user's config file, this would be the `server.driver.cowabunga.fizz` property.\n\nWhen extensions are loaded, the `schema` property is verified and the schema is registered with the\n`AppiumSchema` (it is _not_ registered with `Ajv` until `finalize()` is called).\n\nDuring finalization, each registered schema is added to the `Ajv` instance. The schema is assigned\nan `$id` based on the extension type and name (which overrides whatever the extension provides, if\nanything). Schemas are also forced to disallowed unknown arguments via the `additionalProperties:\nfalse` keyword.\n\nBehind the scenes, the base schema has `driver` and `plugin` properties which are objects. When\nfinalized, a property is added to each--corresponding to an extension name--and the value of this\nproperty is a reference to the `$id` of a property in the extension schema. For example, the\n`server.driver` property will look like this:\n\n```json\n{\n \"driver\": {\n \"cowabunga\": {\n \"$ref\": \"driver-cowabunga.json\"\n }\n }\n}\n```\n\nThis is why we call it the \"base\" schema--it is _mutated_ when extensions provide schemas. The\nextension schemas are kept separately, but the _references_ are added to the schema before it's\nultimately added to `ajv`. This works because an `Ajv` instance understands references _from_ any\nschema it knows about _to_ any schema it knows about.\n\n!!! note\n\n```\nThis makes it impossible to provide a complete static schema for Appium _and_ the installed\nextensions (as of Nov 5 2021). A static `.json` schema _is_ generated from the base (via a Gulp\ntask), but it does not contain any extension schemas. The static schema also has uses beyond\nAppium; e.g., IDEs can provide contextual error-checking of config files this way. Let's solve\nthis?\n```\n\nJust like how we look up the reference ID of a particular argument in the base schema, validation\nof arguments from extensions happens the exact same way. If the `cowabunga` driver has the schema\nID `driver-cowabunga.json`, then the `fizz` property can be referenced from any schema registered\nwith `ajv` via `driver-cowabunga.json#/properties/fizz`. \"Base\" schema arguments begin with\n`appium.json#properties/` instead.\n\n## Development Environment Support\n\nDuring the flow of development, a couple extra tasks have been automated to maintain the base\nschema:\n\n- As a post-transpilation step, a `lib/appium-config.schema.json` gets generated from\n- `lib/schema/appium-config-schema.js` (in addition to its CJS counterpart generated by Babel).\n- This file is under version control. It ends up being _copied_ to\n- `build/lib/appium-config.schema.json` in this step. A pre-commit hook (see\n- `scripts/generate-schema-declarations.js` in the root monorepo) generates\n- a `types/appium-config-schema.d.ts` from the above JSON file. The types in `types/types.d.ts`\n- depend upon this file. This file is under version control.\n\n## Custom Keyword Reference\n\nKeywords are defined in `lib/schema/keywords.js`.\n\n- `appiumCliAliases`: allows a schema to express aliases (e.g., a CLI argument can be `--verbose` or `-v`). This is an array of strings. Strings shorter than three (3) characters will begin with a single dash (`-`) instead of a double-dash (`--`). Note that any argument provided by an extension will begin with a double-dash, because these are required to have the `----` prefix.\n- `appiumCliDest`: allows a schema to specify a custom property name in the post-`argprase` arguments objects. If not set, this becomes a camelCased string.\n- `appiumCliDescription`: allows a schema to override the description of the argument when displayed on the command-line. This is useful paired with `appiumCliTransformer` (or `array`/`object`-typed properties), since there's a substantial difference between what a CLI-using user can provide vs. what a config-file-using user can provide.\n- `appiumCliTransformer`: currently a choice between `csv` and `json`. These are custom functions which post-process a value. They are not used when loading & validating config files, but the idea should be that they result in the same object you'd get if you used whatever the config file wanted (e.g., an array of strings). `csv` is for comma-delimited strings and CSV files; `json` is for raw JSON strings and `.json` files.\n- `appiumCliIgnore`: If `true`, do not support this property on the CLI.\n- `appiumDeprecated`: If `true`, the property is considered \"deprecated\", and will be displayed as such to the user (e.g., in the `--help` output). Note the JSON Schema draft-2019-09 introduces a new keyword `deprecated` which we should use instead if upgrading to this metaschema. When doing so, `appiumDeprecated` should itself be marked as `deprecated`.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/developing/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Developing Appium Extensions\n---\n\nAppium is built with a modular structure, which means that Appium extensions (drivers and plugins)\nare decoupled from the main Appium module, and you only need to install the extensions that you\nwant to use. This modular structure also unlocks the ability to develop entirely new extensions!\n\nThis section of the Appium documentation is intended to help aspiring developers with creating their\nown Appium extension:\n\n- For creating a driver, see the [Build Drivers](./build-drivers.md) page\n- For creating a plugin, take a look at the [Build Plugins](build-plugins.md) page\n- Drivers and plugins both need documentation, so check out the [Build Documentation](./build-docs.md) page\n- For creating a doctor check, see the [Building Doctor Checks](./build-doctor-checks.md) page\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/developing/sensitive.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Masking Sensitive Log Data\n---\n\nSince Appium server version 2.18.0 there is a possibility to mask sensitive\nvalues in logs. The below tutorial explains how to use this feature in third-party\nextensions.\n\n## Why It Might Be Useful\n\nIt is the right call to hide sensitive information, like passwords, tokens, etc.\nfrom server logs, so it does not accidentally leak if these logs end up in wrong hands.\nAppium server already provides a way to manipulate logs records via\n[filtering](../guides/log-filters.md), although it has its own limitations.\nThe current approach is more sophisticated though, and requires some fine-tuning\non the driver/plugin side.\n\n## How To\n\nThe assumption is that your extension uses the standard built-in\n[@appium/logger](https://www.npmjs.com/package/@appium/logger).\nIn order to get some value in logs replaced by a generic mask it is necessary:\n\n- Change the logging expression to wrap sensitive values and format them, for example:\n\n ```js\n this.log.info(`Value: ${value}`);\n ```\n\n becomes\n\n ```js\n import {logger} from '@appium/support';\n \n this.log.info('Value: %s', logger.markSensitive(value));\n ```\n\n The formatting happens via the standard Node.js's\n [util.format](https://nodejs.org/api/util.html#utilformatformat-args) API.\n\n- While sending the appropriate server request, where this log line is used and should be masked,\n add the custom header `X-Appium-Is-Sensitive` with its value set to `1` or `true` (case-insensitive).\n Without such header the above log value is not going to be masked.\n This way it is possible to conditionally mask log records depending on which\n request is being handled by the extension if the log expression is used in the\n common section.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/ecosystem/clients.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Clients\n---\n\nYou need a client to write and run Appium scripts. You'll want to become very\nfamiliar with your client documentation (as well as the documentation of any Selenium client that\nthe Appium client depends on) since that will be your primary interface to Appium.\n\nTo learn more about clients, check out the [Client Intro](../intro/clients.md).\n\n!!! note\n\n```\nIf you maintain an Appium client that you would like to be listed here, feel free to create a PR!\n```\n\n## Official Clients\n\nThese clients are currently maintained by the Appium team:\n\n### [Java Client](https://github.com/appium/java-client)\n\nLanguage: :fontawesome-brands-java: Java\n\n\\=== \"Setup With Maven\"\n\n````\n```xml\n\n io.appium\n java-client\n ${version.you.require}\n test\n\n```\n````\n\n\\=== \"Setup With Gradle\"\n\n````\n```groovy\ndependencies {\n testImplementation 'io.appium:java-client:${version.you.require}'\n}\n```\n````\n\n### [Python Client](https://github.com/appium/python-client)\n\nLanguage: :fontawesome-brands-python: Python\n\n```sh title=\"Install From PyPi\"\npip install Appium-Python-Client\n```\n\n### [Ruby Core Client](https://github.com/appium/ruby_lib_core)\n\nLanguage: :material-language-ruby: Ruby\n\n```sh title=\"Install From RubyGems\"\ngem install appium_lib_core\n```\n\n### [Ruby Client](https://github.com/appium/ruby_lib)\n\nLanguage: :material-language-ruby: Ruby\n\nThis client is a wrapper for the Ruby Core Client with several helper methods, though this may\nadd additional complexity, therefore the Ruby Core Client is recommended instead.\n\n```sh title=\"Install From RubyGems\"\ngem install appium_lib\n```\n\n### [.NET Client](https://github.com/appium/dotnet-client)\n\nLanguage: :simple-dotnet: C#\n\n```sh title=\"Install Using .NET CLI\"\ndotnet add package Appium.WebDriver\n```\n\n## Other Clients\n\nThese clients are not maintained by the Appium team and can be used with other languages.\n\nIn general, any W3C WebDriver spec-compatible client will also integrate well with Appium, though\nsome Appium-specific commands may not be implemented in other clients.\n\n### [WebdriverIO](https://webdriver.io/docs/appium)\n\nLanguage: :material-language-javascript: :material-language-typescript: JavaScript/TypeScript\n\n```sh title=\"Setup Using npm\"\nnpm init wdio@latest .\n```\n\n### [Nightwatch.js](https://nightwatchjs.org/guide/mobile-app-testing/introduction.html)\n\nLanguage: :material-language-javascript: :material-language-typescript: JavaScript/TypeScript\n\n\\=== \"Setup For Android\"\n\n````\n```sh\nnpx @nightwatch/mobile-helper android --appium\n```\n````\n\n\\=== \"Setup For iOS\"\n\n````\n```sh\nnpx @nightwatch/mobile-helper ios --appium\n```\n````\n\n### [RobotFramework AppiumLibrary](https://github.com/serhatbolsu/robotframework-appiumlibrary)\n\nLanguage: :simple-robotframework: Robot Framework\n\n```sh title=\"Install From PyPi\"\npip install robotframework-appiumlibrary\n```\n\n### [multicatch's appium-client](https://github.com/multicatch/appium-client)\n\nLanguage: :simple-rust: Rust\n\n```sh title=\"Install Using Cargo\"\ncargo add appium-client\n```\n\n### [SwiftAppium](https://github.com/milcgroup/swiftappium)\n\nLanguage: :material-language-swift: Swift\n\n```sh title=\"Install and Setup\"\ngit clone https://github.com/milcgroup/SwiftAppium.git\ncd SwiftAppium\nswift build\nswift run swiftappium\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/ecosystem/drivers.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Drivers\n---\n\nYou can't use Appium without a driver! Here you can find a list of all known Appium drivers,\nalong with their installation commands and links to their documentation.\n\nTo learn more about drivers, check out the [Driver Intro](../intro/drivers.md).\n\n!!! note\n\n```\nIf you maintain an Appium driver that you would like to be listed here, feel free to create a PR!\n```\n\n## Official Drivers\n\nThese drivers are currently maintained by the Appium team:\n\n### [Chromium](https://github.com/appium/appium-chromium-driver)\n\n- Target: Desktop and mobile Chromium browsers (Chrome, Microsoft Edge, etc.)\n- Mode: Web\n\n```sh title=\"Install This Driver\"\nappium driver install chromium\n```\n\n### [Espresso](https://github.com/appium/appium-espresso-driver)\n\n- Target: Android applications\n- Mode: Native\n\n```sh title=\"Install This Driver\"\nappium driver install espresso\n```\n\n### [Gecko](https://github.com/appium/appium-geckodriver)\n\n- Target: Desktop and mobile Gecko browsers (Firefox)\n- Mode: Web\n\n```sh title=\"Install This Driver\"\nappium driver install gecko\n```\n\n### [Mac2](https://github.com/appium/appium-mac2-driver)\n\n- Target: macOS applications\n- Mode: Native\n\n```sh title=\"Install This Driver\"\nappium driver install mac2\n```\n\n### [Safari](https://github.com/appium/appium-safari-driver)\n\n- Target: Desktop and mobile Safari browsers\n- Mode: Web\n\n```sh title=\"Install This Driver\"\nappium driver install safari\n```\n\n### [UiAutomator2](https://github.com/appium/appium-uiautomator2-driver)\n\n- Target: Android, Android TV, Android Wear applications\n- Modes: Native, Hybrid, Web\n\n```sh title=\"Install This Driver\"\nappium driver install uiautomator2\n```\n\n### [Windows](https://github.com/appium/appium-windows-driver)\n\n!!! warning\n\n```\nOnly the Node.js-based driver part is maintained by the Appium team. The server part\n(WinAppDriver executable) is provided by Microsoft, but has not been maintained since 2022.\n```\n\n- Target: Windows applications\n- Mode: Native\n\n```sh title=\"Install This Driver\"\nappium driver install windows\n```\n\n### [XCUITest](https://appium.github.io/appium-xcuitest-driver/)\n\n- Target: iOS, iPadOS, tvOS applications\n- Modes: Native, Hybrid, Web\n\n```sh title=\"Install This Driver\"\nappium driver install xcuitest\n```\n\n## Other Drivers\n\nThese drivers are not maintained by the Appium team and can be used to target other platforms:\n\n### [Flutter](https://github.com/appium/appium-flutter-driver)\n\n- Target: iOS and Android applications built with Flutter\n- Mode: Native\n- Supported by: Appium Team / Community\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-flutter-driver\n```\n\n### [Flutter Integration](https://github.com/AppiumTestDistribution/appium-flutter-integration-driver)\n\n- Target: iOS and Android applications built with Flutter\n- Mode: Native\n- Supported by: Community / `@AppiumTestDistribution`\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-flutter-integration-driver\n```\n\n### [LG WebOS](https://github.com/headspinio/appium-lg-webos-driver)\n\n- Target: LG TV web applications\n- Mode: Web\n- Supported by: HeadSpin\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-lg-webos-driver\n```\n\n### [Linux](https://github.com/fantonglang/appium-linux-driver)\n\n!!! warning\n\n```\nThis driver has not been maintained since 2022 and requires a custom Appium installation\n```\n\n- Target: Linux applications\n- Mode: Native\n- Supported by: `@fantonglang`\n\n```sh title=\"Install This Driver\"\ngit clone https://github.com/fantonglang/appium\ncd appium\nyarn install\nnode ./\n```\n\n### [NovaWindows](https://github.com/AutomateThePlanet/appium-novawindows-driver)\n\n!!! info\n\n```\nThis driver is recommended as a drop-in replacement for the partially unmaintained\n[Windows driver](#windows)\n```\n\n- Target: Windows applications\n- Mode: Native\n- Supported by: Community / Automate The Planet\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-novawindows-driver\n```\n\n### [Roku](https://github.com/headspinio/appium-roku-driver)\n\n- Target: Roku channels (applications)\n- Mode: Native\n- Supported by: HeadSpin\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm @headspinio/appium-roku-driver\n```\n\n### [Tizen](https://github.com/Samsung/appium-tizen-driver)\n\n!!! warning\n\n```\nThis driver has not been maintained since 2020 and is only compatible with Appium 1\n```\n\n- Target: Tizen applications\n- Mode: Native\n- Supported by: Community / Samsung\n\n```sh title=\"Install This Driver\"\nnpm install appium-tizen-driver\n```\n\n### [TizenTV](https://github.com/headspinio/appium-tizen-tv-driver)\n\n- Target: Tizen TV web applications\n- Mode: Web\n- Supported by: HeadSpin\n\n```sh title=\"Install This Driver\"\nappium driver install --source=npm appium-tizen-tv-driver\n```\n\n### [You.i Engine](https://github.com/YOU-i-Labs/appium-youiengine-driver)\n\n!!! warning\n\n```\nThis driver has not been maintained since 2022 and is only compatible with Appium 1\n```\n\n- Target: iOS, Android, macOS, Linux, tvOS applications built with You.i Engine\n- Mode: Native\n- Supported by: Community / You.i\n\n```sh title=\"Install This Driver\"\nnpm install appium-youiengine-driver\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/ecosystem/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: The Appium Ecosystem\n---\n\nAppium has a wide ecosystem of related software and tools. This section of the Appium documentation\naims to compile a listing of various officially-supported and community-supported Appium projects:\n\n
\n\n- :material-car: **Drivers**\n\n ---\n\n Link Appium to your test device\n\n [:octicons-arrow-right-24: View all drivers](./drivers.md)\n\n- :octicons-code-16: **Clients**\n\n ---\n\n Link Appium to your automation code\n\n [:octicons-arrow-right-24: View all clients](./clients.md)\n\n- :fontawesome-solid-plug: **Plugins**\n\n ---\n\n Modify and extend Appium functionality\n\n [:octicons-arrow-right-24: View all plugins](./plugins.md)\n\n- :material-wrench: **Tools**\n\n ---\n\n Interact with Appium in other ways\n\n [:octicons-arrow-right-24: View all tools](./tools.md)\n\n
\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/ecosystem/plugins.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Plugins\n---\n\nPlugins offer various ways to extend or modify Appium's behaviour. They are _completely optional_\nand are not needed for standard automation functionality, but you may find them to be useful\nfor more specialised automation workflows.\n\n!!! note\n\n```\nIf you maintain an Appium plugin that you would like to be listed here, feel free to create a PR!\n```\n\n## Official Plugins\n\nThese plugins are are currently maintained by the Appium team:\n\n### [Execute Driver](https://github.com/appium/appium/tree/master/packages/execute-driver-plugin)\n\nRun entire batches of commands in a single call to the Appium server\n\n```sh title=\"Install This Plugin\"\nappium plugin install execute-driver\n```\n\n### [Images](https://github.com/appium/appium/tree/master/packages/images-plugin)\n\nAdd support for image matching and comparison features\n\n```sh title=\"Install This Plugin\"\nappium plugin install images\n```\n\n### [Inspector](https://github.com/appium/appium-inspector/tree/main/plugins)\n\nIntegrate the [Appium Inspector](https://appium.github.io/appium-inspector/) directly into your\nAppium server installation\n\n```sh title=\"Install This Plugin\"\nappium plugin install inspector\n```\n\n### [Relaxed Caps](https://github.com/appium/appium/tree/master/packages/relaxed-caps-plugin)\n\nRelax Appium's requirement for vendor prefixes on capabilities\n\n```sh title=\"Install This Plugin\"\nappium plugin install relaxed-caps\n```\n\n### [Storage](https://github.com/appium/appium/tree/master/packages/storage-plugin)\n\nAdd server-side storage with client-side management\n\n```sh title=\"Install This Plugin\"\nappium plugin install storage\n```\n\n### [Universal XML](https://github.com/appium/appium/tree/master/packages/universal-xml-plugin)\n\nTranslate the default iOS and Android XML formats into a common format\n\n```sh title=\"Install This Plugin\"\nappium plugin install universal-xml\n```\n\n## Other Plugins\n\nThese plugins are not maintained by the Appium team and can provide additional functionality:\n\n### [AltUnity](https://github.com/headspinio/appium-altunity-plugin)\n\nTarget Unity games and apps for automation via the AltUnityTester framework\n\nSupported by: HeadSpin\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-altunity-plugin\n```\n\n### [Device Farm](https://github.com/AppiumTestDistribution/appium-device-farm)\n\nManage and create driver sessions on connected Android devices and iOS simulators\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-device-farm\n```\n\n### [Gestures](https://github.com/AppiumTestDistribution/appium-gestures-plugin)\n\nPerform basic gestures using W3C Actions\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-gestures-plugin\n```\n\n### [Interceptor](https://github.com/AppiumTestDistribution/appium-interceptor-plugin)\n\nIntercept and mock API requests and responses\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-interceptor\n```\n\n### [OCR](https://github.com/jlipps/appium-ocr-plugin)\n\nFind elements via OCR text\n\nSupported by: `@jlipps`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-ocr-plugin\n```\n\n### [Reporter](https://github.com/AppiumTestDistribution/appium-reporter-plugin)\n\nGenerate standalone consolidated HTML reports with screenshots\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-reporter-plugin\n```\n\n### [Wait](https://github.com/AppiumTestDistribution/appium-wait-plugin)\n\nManage global element wait timeouts\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Plugin\"\nappium plugin install --source=npm appium-wait-plugin\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/ecosystem/tools.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium-Related Tools\n---\n\nThe Appium ecosystem also includes several tools that have been created to assist with things not\ndirectly related to running tests, such as Appium installation, test development, and more.\n\n!!! note\n\n```\nIf you maintain an Appium tool that you would like to be listed here, feel free to create a PR!\n```\n\n## Official Tools\n\nThese tools are currently maintained by the Appium team:\n\n### [Appium Inspector](https://appium.github.io/appium-inspector/)\n\nAppium has a graphical client which can be used to inspect application screenshots, view the\napplication hierarchy, search for elements, run Appium commands, record app interactions, and more.\nIt can be very useful for Appium test development.\n\n\\=== \"Install as an Appium Plugin\"\n\n````\n```bash\nappium plugin install inspector\n```\n````\n\n\\=== \"Install Standalone\"\n\n```\nDownload the app from the Appium Inspector repo's [GitHub Releases section](https://github.com/appium/appium-inspector/releases).\n```\n\n### [Appium MCP](https://github.com/appium/appium-mcp)\n\nAppium MCP is a Model Context Protocol (MCP) server that provides mobile test development and\nautomation capabilities using Appium.\n\n```json title=\"Install This Tool\"\n// Add the following to your MCP client configuration\n{\n \"appium-mcp\": {\n \"disabled\": false,\n \"timeout\": 100,\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\"appium-mcp@latest\"],\n \"env\": {\n \"ANDROID_HOME\": \"/path/to/android/sdk\"\n }\n }\n}\n```\n\n## Extension Tools\n\nAppium driver or plugin developers can choose to include these tools in their driver/plugin:\n\n### Appium Doctor\n\nThe Appium Doctor tool can be used to validate whether all prerequisites and other environment\ndetails needed for the driver/plugin have been set up correctly. The tool can be accessed via the\n[`doctor` command in the Appium CLI](../reference/cli/extensions.md#doctor):\n\n```sh\nappium {driver|plugin} doctor \n```\n\nIt shows no results if the driver/plugin does not have such validation checks.\n\n!!! note\n\n```\nIf you maintain an Appium extension and would like to add Appium Doctor support for it, check\nout the documentation on [Building Doctor Checks](../developing/build-doctor-checks.md).\n```\n\n## Other Tools\n\nThese tools are not maintained by the Appium team:\n\n### [Appium Installer](https://github.com/AppiumTestDistribution/appium-installer)\n\nAppium Installer is a command-line tool for simplifying setups of new Appium test environments.\nIt includes commands for installing Appium, its drivers and plugins, as well as validating\nprerequisites for iOS or Android emulators or real devices.\n\nSupported by: `@AppiumTestDistribution`\n\n```sh title=\"Install This Tool\"\nnpm install -g appium-installer\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/branch-testing.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Local Validation Of Extension PRs\n---\n\nSometimes it might be necessary to validate if a remote driver or a plugin PR works for the particular local\nenvironment before it is merged or published. This tutorial describes how to achieve that.\n\n## Requirements\n\n- Recent LTS version of NodeJS. Check [Node.js main page](https://nodejs.org) for the download link.\n- Recent version of the Appium server. Use the following commands to ensure you have\n the latest version installed: `npm uninstall appium` and `npm install -g appium`.\n- [Git](https://git-scm.com/) should be available locally.\n\n## Installation\n\n- [Check out](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally) the PR locally.\n There is also an option (although it is less flexible, because you won't be able to easily fetch\n any changes to this PR later) to simply [download](https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives) and unzip the sources\n locally. If you choose the later option then no `git` tool would be necessary.\n- Navigate to the local driver or plugin folder and run `npm i` from that folder.\n- Make sure you don't have the given driver or plugin already installed. Use the `appium driver uninstall `\n or `appium plugin uninstall ` CLI in order to delete any leftovers. The value of\n ``/`` depends on the actual driver or plugin name the PR has been prepared for.\n If you are not sure which name you need to use then check the content of the `package.json` manifest,\n which must be always located under the root folder of the fetched sources. You should be looking for\n the `\"appium\" -> \"driverName\"` entry value there.\n- Change the current folder to the one, which is NOT the driver/plugin folder root or its subfolder.\n Also, make sure your current working folder does not contain any extra `package.json` file. If\n it does then simply navigate to any other folder that does not.\n- Run the following command in order to link the driver/plugin sources to the Appium server:\n `appium driver install --source=local ` or\n `appium plugin install --source=local `.\n- Stop the Appium server if it is running and start it again (`appium server --use-drivers=`)\n to check the list of loaded drivers. If the linking succeeded then you must see the driver name and the path to its\n parent folder in the server logs. In case of a plugin it is required to explicitly request\n this plugin to be loaded upon server startup: `appium server --use-plugins=`.\n\n## Update\n\nAfter you have tested the PR and there are issues it might be necessary to update the local branch with\nthe recent changes from Git. Follow the next steps for that:\n\n- Navigate to the parent folder of your local driver/plugin and run `git pull`.\n- Stop Appium server if it is running.\n- Run `npm i` in the parent folder of your local driver/plugin to rebuild it and update any dependencies if necessary.\n- Start Appium server again similarly to how this is done in the corresponding [Installation](#installation) step above.\n\n## Switching Back To a Stable Release\n\nAfter the PR is merged there is no need to use the local plugin/driver deployment anymore, and it makes sense\nto switch back to the package managed by NPM. Follow the next steps for that:\n\n- Unlink the installed driver/plugin from the server by running `appium driver uninstall ` or\n `appium plugin uninstall `.\n- Delete the local source folder (`rm -rf `).\n- Install the driver or the plugin from NPM. Check the component README in order to find a proper command for that.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/caching.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Caching of Application Bundles\n---\n\nAppium's base driver provides a feature which enables caching of application builds provided, for example,\nas `app` capability value or to endpoints similar to the `installApp` one. This article explains common caching\nprinciples, so you could create more performant and efficient test suite execution strategies.\n\n## Why Caching Is Necessary\n\nMobile application bundles could reach hundreds of megabytes is size. This could become a serious\nperformance issue if a test suite is executed, and it is necessary to fetch/extract the same application\nbundle for each test.\n\n## What Is Cached\n\nCaching could be applied to application bundles generated by\n[`configureApp`](https://github.com/appium/appium/blob/master/packages/base-driver/lib/basedriver/helpers.js#L107) helper call.\nInherited drivers can customize their caching logic by providing own `onPostProcess`\n(or both `inDownload` and `onPostProcess`) property definition, but the general\nrule of thumb is that we need to cache locally all application bundles need to be downloaded and/or extracted\nfirst before they could be actually installed on the device under test. On iOS, for example, these are `.ipa` or\n`.zip` compressed application bundles, or .`aab` on Android.\n\n## Caching of Remote Application Bundles\n\nIn order to validate whether an app bundle downloaded from the given URL could be (re)used from the cache the following\nsteps are applied:\n\n1. The script checks if the given URL is already present in the cache.\n If yes then it tries to fetch previously remembered\n [Last-Modified](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified)\n or [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header values for it.\n2. If `ETag` value is present then it is put into\n [If-None-Match request header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match).\n Else if `Last-Modified` header value is present then it is put into\n [If-Modified-Since request header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since).\n Otherwise, no caching is applied.\n3. If the response status is equal to `304` then the previously cached binary is used,\n otherwise the cached entry is reset and refreshed.\n\n## Caching of Local Application Bundles\n\nIt only makes sense to cache application bundles if they need some preprocessing before being installed on the device under test.\nFor example, on iOS `.ipa` bundles must be unzipped, because the system installer only works with `.app` folders.\n\n1. The script verifies if the given bundle path is already present in the cache. If the bundle was not in the cache yet\n then it gets preprocessed and added there.\n2. The script validates the hashsum of the bundle and compares it to the previously stored one. If hash sums don't match\n then the cached item gets deleted and the preprocessing of the bundle repeats.\n\n## How The Cache File System Is Configured\n\nThe cache where the base driver keeps all application bundles is located in the system temp folder. It is configured\non per-process basis, so each test session initialized in scope of the same Appium server process takes advantages\nof it. It is a [LRU Cache](https://www.npmjs.com/package/lru-cache) with the following limitations:\n\n- Max items: 1024. You may customize it by providing a new value to\n the [APPIUM_APPS_CACHE_MAX_ITEMS](../reference/cli/env-vars.md) environment variable.\n Do not set it to a lower number than the amount of apps in all parallel sessions per process.\n- Max time to live (TTL) for each entry: 24 hours.\n You may customize it by providing a new value to the\n [APPIUM_APPS_CACHE_MAX_AGE](../reference/cli/env-vars.md) environment variable.\n Do not set it to a lower number than the duration of a single session startup.\n- TTL is refreshed for each entry upon access\n- By default the full application URL is used as cache key. You may change this behavior\n by enabling the [APPIUM_APPS_CACHE_IGNORE_URL_QUERY](../reference/cli/env-vars.md) environment variable.\n If the above option is enabled then the 'search' part of the app URL will be cut off from cache keys.\n See the corresponding [feature request](https://discuss.appium.io/t/regarding-app-caching-when-using-aws-s3-presigned-urls/42713)\n for more details.\n\n!!! warning\n\n```\nNote: The cache root folder is set up for automatic deletion on Appium process termination. This would only\nwork if Appium server is killed with `SIGINT` or `SIGTERM`. If `SIGKILL` is used then no cache cleanup\nwould be performed.\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/caps.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Session Capabilities\n---\n\n\"Capabilities\" is the name given to the set of parameters used to start an Appium session. The\ninformation in the set describes what sort of \"capabilities\" you want your session to have, for\nexample, a certain mobile operating system or a certain version of a device. Capabilities are\nrepresented as key-value pairs, with values allowed to be any valid JSON type, including\nother objects.\n\nThe W3C WebDriver spec's [section on Capabilities](https://w3c.github.io/webdriver/#capabilities)\nidentifies a small set of 10 standard capabilities, including the following:\n\n| Capability Name | Type | Description |\n| ---------------- | -------- | ---------------------------------------------- |\n| `browserName` | `string` | The name of the browser to launch and automate |\n| `browserVersion` | `string` | The specific version of the browser |\n| `platformName` | `string` | The type of platform hosting the browser |\n\n## Common Appium Capabilities\n\nAppium understands these browser-focused capabilities, but introduces a number of additional\ncapabilities. According to the WebDriver spec, any\nnon-standard \"extension capabilities\" must include a namespace prefix (signifying the vendor\nintroducing the capability), ending in a `:`. Appium's vendor prefix is\n`appium:`, and so any Appium-specific capabilities must include this prefix. Depending on which\nclient you are using, the prefix may be added automatically or in conjunction with certain\ninterfaces, but it is always a good practice to explicitly include it for clarity.\n\nHere is a list of all the globally-recognized Appium capabilities:\n\n!!! info\n\n```\nIndividual drivers and plugins can support other capabilities, so refer to their documentation\nfor lists of specific capability names. Some drivers may also not support all of these capabilities\n```\n\n|
Capability
| Type | Required? | Description |\n| ---------------------------------------- | --------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `platformName` | `string` | yes | The type of platform hosting the app or browser |\n| `appium:automationName` | `string` | yes | The name of the Appium driver to use |\n| `browserName` | `string` | no | The name of the browser to launch and automate, if the driver supports web browsers as a special case |\n| `appium:app` | `string` | no | The path to an installable application |\n| `appium:deviceName` | `string` | no | The name of a particular device to automate, e.g., `iPhone 14` (currently only actually useful for specifying iOS simulators, since in other situations it's typically recommended to use a specific device id via the `appium:udid` capability). |\n| `appium:platformVersion` | `string` | no | The version of a platform, e.g., for iOS, `16.0` |\n| `appium:newCommandTimeout` | `number` | no | The number of seconds the Appium server should wait for clients to send commands before deciding that the client has gone away and the session should shut down. `60` seconds by default. Setting it to zero disables the timer. |\n| `appium:noReset` | `boolean` | no | If true, instruct an Appium driver to avoid its usual reset logic during session start and cleanup (default `false`) |\n| `appium:fullReset` | `boolean` | no | If true, instruct an Appium driver to augment its usual reset logic with additional steps to ensure maximum environmental reproducibility (default `false`) |\n| `appium:eventTimings` | `boolean` | no | If true, instruct an Appium driver to collect [Event Timings](./event-timing.md) (default `false`) |\n| `appium:printPageSourceOnFindFailure` | `boolean` | no | If true, collect the page source and print it to the Appium log whenever a request to find an element fails (default `false`) |\n\nSome drivers place more complex constraints on capabilities as a group. For example, while the\n`appium:app` and `browserName` capabilities are listed above as optional, if you want to launch\na session with a specific app, the XCUITest driver requires that at least one of `appium:app`,\n`browserName`, or `appium:bundleId` are included in the capabilities (otherwise it will not know\nwhat app to install and/or launch and will simply open a session on the home screen). Each driver\nwill document how it interprets these capabilities and any other platform-specific requirements.\n\n!!! note\n\n```\nCapabilities are like parameters used when starting a session. After the capabilities are sent\nand the session is started, they cannot be changed. If a driver supports updating aspects of\nits behaviour in the course of a session, it will provide a [Setting](./settings.md) for this\npurpose instead of, or in addition to, a capability.\n```\n\nEach Appium client has its own way of constructing capabilities and starting a session. For\nexamples of doing this in each client library, head to the [Ecosystem](../ecosystem/index.md) page\nand click through to the appropriate client documentation.\n\n## BiDi Protocol Support\n\nAppium supports [WebDriver BiDi](https://w3c.github.io/webdriver-bidi/) protocol since base\u2013driver 9.5.0.\nThe actual behavior depends on individual drivers while the Appium and the base\uff70driver support the protocol.\nPlease make sure if a driver supports the protocol and what kind of commands/events it supports in the documentation.\n\n| Capability Name | Type | Description |\n| --------------- | --------- | ------------------------------------------------------- |\n| `webSocketUrl` | `boolean` | To enable BiDi protocol in the session. |\n\n## Using `appium:options` to Group Capabilities\n\nIf you use a lot of `appium:` capabilities in your tests, it can get a little repetitive. You can\ncombine all capabilities as an object value of a single `appium:options` capability instead, in\nwhich case you don't need to use prefixes on the capabilities inside the object. For example:\n\n```json\n{\n \"platformName\": \"iOS\",\n \"appium:options\": {\n \"automationName\": \"XCUITest\",\n \"platformVersion\": \"16.0\",\n \"app\": \"/path/to/your.app\",\n \"deviceName\": \"iPhone 12\",\n \"noReset\": true\n }\n}\n```\n\nNote that constructing a capability value which is itself an object differs by language; refer to\nyour client documentation for further examples on how to achieve this.\n\n!!! warning\n\n```\nIf you include the same capabilities both inside and outside of `appium:options`, the values\ninside of `appium:options` take precedence.\n```\n\n## Always-Match and First-Match Capabilities\n\nThe W3C spec allows clients to give the Appium server some flexibility in the kind of session it\ncreates in response to a new session request. This is through the concept of \"always-match\" and\n\"first-match\" capabilities:\n\n- Always-match capabilities consist of a single set of capabilities, every member of which must\n be satisfied by the server in order for the new session request to proceed.\n- First-match capabilities consist of an array of capability sets. Each set is merged with the\n always-match capabilities, and the first set that the server knows how to handle will be the set\n that is used to start the session.\n\n!!! note\n\n```\nCheck out the [spec itself](https://w3c.github.io/webdriver/#processing-capabilities) or\na [summarized version](https://github.com/jlipps/simple-wd-spec#processing-capabilities) for\na more in-depth description of how capabilities are processed.\n```\n\nIn practice, use of first-match capabilities is not necessary or recommended for use with Appium.\nInstead, we recommend that you define the explicit set of capabilities you want the Appium\nserver to handle. These will be encoded as the always-match capabilities, and the array of\nfirst-match capabilities will be empty.\n\nThat being said, Appium _does_ understand always-match and first-match capabilities as\ndefined in the W3C spec, so if you use these features, Appium will work as expected. The process of\ndefining always-match and first-match capabilities is unique to each client library, so refer to\nthe documentation for your client library to see examples of how it works.\n\n## Special Notes for Cloud Providers\n\n!!! warning\n\n```\nThis section is not intended for end-users of Appium; it is intended for developers building\nAppium-compatible cloud services.\n```\n\nWhen managing an Appium cloud, your users may wish to target various independent versions of Appium\ndrivers and plugins. It is of course up to each service provider how they wish to implement the\ndiscovery, installation, and availability of any official or third party drivers or plugins. But\nthe Appium team does provide several suggestions, for consistency across the industry. _These are\nrecommendations only,_ and not a standard, but adopting it will help users to navigate the increased\ncomplexity that working with Appium in a cloud environment may bring.\n\n### Suggested capabilities\n\nIn addition to the standard `platformName`, `appium:deviceName`, `appium:automationName`, and\n`appium:platformVersion`, we recommend adopting the capability `$cloud:appiumOptions`, where the\nlabel `$cloud` is not meant to be interpreted literally but instead should be replaced by your\nvendor prefix (so for HeadSpin it would be `headspin`, Sauce Labs it would be `sauce`, and\nBrowserStack it would be `browserstack`, to name just a few examples). The `$cloud:appiumOptions`\ncapability would itself be a JSON object, with the following internal keys:\n\n|
Capability
| Usage | Example |\n| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |\n| `version` | The version of the Appium server that is used to host and manage drivers. If omitted, the behavior is left up to the provider, but the recommendation would be to provide the latest official version. | `2.0.0` |\n| `automationVersion` | The version of the driver (as specified by `appium:automationName`) that should be used. | `1.55.2` |\n| `automation` | The name of a custom driver to use (see below for more info). This would override `appium:automationName` and `$cloud:automationVersion`. | `{\"name\": \"@org/custom-driver\", \"source\": \"github\", \"package\": \"custom-driver\"}` |\n| `plugins` | The list of plugins (and potentially versions of plugins) that should be activated (see below for more info). | `[\"images\", \"universal-xml\"]` |\n\n### Basic example\n\nAppium extensions (drivers and plugins) have a set of properties that specify where they can be\ninstalled from. Cloud providers are obviously under no obligation to provide support for\narbitrarily specified extensions, seeing as these may represent untrusted code running in a managed\nenvironment. In the case where arbitrary extensions are not supported, the `appium:automationName`,\n`$cloud:automationVersion`, and `$cloud:appiumPlugins` capabilities should be sufficient. See the\nfollowing JSON object representing capabilities for a session:\n\n```json\n{\n \"platformName\": \"iOS\",\n \"appium:platformVersion\": \"14.4\",\n \"appium:deviceName\": \"iPhone 11\",\n \"appium:app\": \"Some-App.app.zip\",\n \"appium:automationName\": \"XCUITest\",\n \"$cloud:appiumOptions\": {\n \"version\": \"2.0.0\",\n \"automationVersion\": \"3.52.0\",\n \"plugins\": [\"images\"]\n }\n}\n```\n\nThis set of capabilities requests an Appium 2+ server supporting the XCUITest driver at version\n`3.52.0`, and the `images` plugin active. This set is easy for a cloud provider to verify. The\ncloud provider can obviously do anything it wants in response to these capabilities, including\ndownloading Appium and driver and plugin packages on the fly, or erroring out if the versions\nrequested are not in a supported set, or if the plugin is not supported, etc...\n\n### Basic example with `appium:options`\n\nThe previous example still looks a bit disorganized, so of course we also recommend that cloud\nproviders support the `appium:options` capability as detailed above, which could turn the previous\nset of capabilities into the following:\n\n```json\n{\n \"platformName\": \"iOS\",\n \"appium:options\": {\n \"platformVersion\": \"14.4\",\n \"deviceName\": \"iPhone 11\",\n \"app\": \"Some-App.app.zip\",\n \"automationName\": \"XCUITest\"\n },\n \"$cloud:appiumOptions\": {\n \"version\": \"2.0.0\",\n \"automationVersion\": \"3.52.0\",\n \"plugins\": [\"images\"]\n }\n}\n```\n\n### Extension objects\n\nSome service providers may wish to dynamically allow access to all of the features of the Appium\n2 CLI, including downloading arbitrary drivers and plugins. To represent these extensions, we can\ndefine special JSON \"extension objects\", with the following keys:\n\n- `name`: the name of the extension. This would be an `npm` package name (if downloading from `npm`),\n or a `git` or GitHub spec (if downloading from a `git` server or GitHub).\n- `version`: the version of the extension, e.g., the `npm` package version or `git` SHA.\n- (optional) `source`: a denotation of where the extension can be downloaded from. It is recommended\n to support the following values: `appium`, `npm`, `git`, `github`. Here, `appium` means \"Appium's\n own official list\", and should be the default value if this key is not included.\n- (optional) `package`: when downloading extensions from `git` or GitHub, the `npm` package name of\n the extension must also be provided. This is optional for non-`git` sources.\n\nSince each session is handled by a single driver, the `$cloud:appiumOptions`/`$automation`\ncapability could be used with an extension object value to denote this driver, for example:\n\n```json\n{\n \"$cloud:appiumOptions\": {\n \"automation\": {\n \"name\": \"git+https://some-git-host.com/custom-driver-project.git\",\n \"version\": \"some-git-sha\",\n \"source\": \"git\",\n \"package\": \"driver-npm-package-name\"\n }\n }\n}\n```\n\nAnd since sessions can handle multiple plugins, each value in the list of `$cloud:appiumPlugins`\ncould also be an extension object rather than a string, so that specific versions could be\nrequested:\n\n```json\n{\n \"$cloud:appiumOptions\": {\n \"plugins\": [{\n \"name\": \"images\",\n \"version\": \"1.1.0\"\n }, {\n \"name\": \"my-github-org/my-custom-plugin\",\n \"version\": \"a83f2e\",\n \"source\": \"github\",\n \"package\": \"custom-plugin\"\n }]\n }\n}\n```\n\nThese serve as illustrative examples for the recommendations here. Of course, it is up to the\nservice providers to implement the handling of these capabilities at their front end / load\nbalancer, to perform any error checking, or to actually run any of the `appium driver` or `appium\nplugin` CLI commands that support the end user's request. This section is merely a suggestion as to\nhow service providers might design their user-facing capabilities API in a way which in principle\nsupports all of the capabilities that Appium itself would provide to the end user if they were\nrunning Appium on their own.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/config.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: The Appium Config File\n---\n\nInstead of passing arguments on the command line to Appium, you may add them to a special config\nfile. Appium will read values from this config file when it runs. (Please note that CLI arguments\nhave _precedence_ over configuration files; if a value is set in a config file _and_ via CLI\nargument, the CLI argument is preferred.)\n\n## Supported Config File Formats\n\nYou can store your config data in the following kinds of files:\n\n- JSON\n- YAML\n- JS (a JavaScript file exporting a JS object)\n- CJS (the same as above; the extension is for common JS)\n\n!!! warning\n\n```\nNote: Configuration files in ESM format are not currently supported.\n```\n\n## Supported Config File Locations\n\nConfiguration files can be named anything, but the following filenames will be automatically\ndiscovered and loaded by Appium:\n\n- `.appiumrc.json` (recommended)\n- `.appiumrc.yaml`\n- `.appiumrc.yml`\n- `.appiumrc.js`\n- `.appiumrc.cjs`\n- `appium.config.js`\n- `appium.config.cjs`\n- `.appiumrc` (which is considered to be JSON)\n\nFurther, _if your project uses Node.js,_ you can use store the configuration inside an `appium`\nproperty in your `package.json` and it will be automatically discovered.\n\n### Config File Search\n\nAppium will search _up_ the directory tree from the current working directory for one of these\nfiles. If it reaches the current user's home directory or filesystem root, it will stop looking.\n\nTo specify a _custom_ location for your config file, use `appium --config /path/to/config/file`.\n\n#### Configuration File Format\n\nFirst, you might want to look at some examples:\n\n- [Appium Configuration - JSON](https://github.com/appium/appium/blob/master/packages/appium/sample-code/appium.config.sample.json)\n- [Appium Configuration - YAML](https://github.com/appium/appium/blob/master/packages/appium/sample-code/appium.config.sample.yaml)\n- [Appium Configuration - JS](https://github.com/appium/appium/blob/master/packages/appium/sample-code/appium.config.sample.js)\n\nA description of the format is available, as well:\n\n- [Appium Configuration File JSON Schema](https://github.com/appium/appium/blob/master/packages/schema/lib/appium-config.schema.json)\n- [TypeScript declarations for Appium Configuration](https://github.com/appium/appium/blob/master/packages/types/lib/config.ts)\n\nTo describe in words, the config file will have a root `server` property, and all arguments are\nchild properties. For certain properties which must be supplied on the command-line as\ncomma-delimited lists, JSON strings, and/or external filepaths, these instead will be of their\n\"native\" type. For example, `--use-plugins ` needs `` to be comma-delimited string\nor path to a delimited file. However, the config file just wants an array, e.g.,:\n\n```json\n{\n \"server\": {\n \"use-plugins\": [\"my-plugin\", \"some-other-plugin\"]\n }\n}\n```\n\n## Configuring extensions (drivers and plugins)\n\nFor `driver`-and-`plugin`-specific configuration, these live under the `server.driver` and\n`server.plugin` properties, respectively. Each driver or plugin will have its own named property,\nand the values of any specific configuration it provides are under this. For example:\n\n```json\n{\n \"server\": {\n \"driver\": {\n \"xcuitest\": {\n \"webkit-debug-proxy-port\": 5400\n }\n }\n }\n}\n```\n\n!!! note\n\n```\nThe above configuration corresponds to the `--driver-xcuitest-webkit-debug-proxy-port` CLI argument.\n```\n\nAll properties are case-sensitive and will be in\n[kebab-case](https://en.wikipedia.org/wiki/Naming_convention_\\(programming\\)#Delimiter-separated_words).\nFor example, `callback-port` is allowed, but `callbackPort` is not.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/context.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Managing Contexts\n---\n\nA common feature of many app platforms is the ability for developers to embed web content inside of\nthe platform-native app frame. This allows developers to leverage web technologies or existing web\ncontent for some or all of the app functionality. However, the additional complexity of mixing\n\"modes\" within a single application can make it difficult for automation tools that are designed to\ntarget the \"native\" elements and behaviours.\n\nAppium provides a set of APIs for working with different app modes, called \"contexts\", that Appium\ndrivers can implement if they support automation commands in these different modes. There are three\nbasic commands that Appium has added to the W3C WebDriver spec for this purpose:\n\n| Command Name | Method/Route | Params | Description | Returns |\n| --------------------- | --------------------------- | ------------------------------------ | --------------------------------------------- | --------------- |\n| `Get Contexts` | `GET /session/:id/contexts` | | Get a list of the available contexts | `array` |\n| `Get Current Context` | `GET /session/:id/context` | | Get the name of the active context | `string` |\n| `Set Context` | `POST /session/:id/context` | `name` (`string`) | Switch into the context with the given `name` | `null` |\n\nThis API is flexible enough to handle a variety of semantic interpretations on the part of the\ndriver. For example, the XCUITest driver includes two kinds of contexts: the native app context and\nany active webviews, as one context per webview. A call to `Get Contexts` will return the list of\nnames, which you as a test author can sift through and use to switch into the appropriate context.\nAs another example, the Appium Altunity\nPlugin introduces the concept of a `UNITY`\ncontext, which encapsulates all the plugin's specific behaviour to ensure that when outside of the\n`UNITY` context, the active driver's usual command implementations are used.\n\nIt is important to note that a call to `Get Contexts` will always contain at least one context,\nconventionally but not necessarily named `NATIVE_APP`. This is the default active context.\n\nDepending on the type of context you're in, the operation of the driver might change. The XCUITest\ndriver, when targeting a webview context, will not run its typical routines for finding and\ninteracting with elements. Instead, it will run a different set of routines appropriate to web\nelements. This might have a variety of consequences, like supporting a different set of locator\nstrategies.\n\nThe command names in the table above are generic references to the commands and not code examples.\nFor examples of how to access the Context API in the language-specific client libraries, please\nvisit the documentation for a given library.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/event-timing.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Retrieving Event Timings\n---\n\nAppium comes with the ability to retrieve timing information about startup\ninformation and command length. This is an advanced feature that is controlled\nby the use of the `appium:eventTimings` capability (set it to `true` to log event\ntimings).\n\nWith this capability turned on, the `POST /session/:id/appium/events` response (i.e.,\nthe response to `driver.logs.events` or similar, depending on client) will be\ndecorated with an `events` property. This is the structure of that `events`\nproperty:\n\n```\n{\n \"\": [, ...],\n \"commands\": [\n {\n \"cmd\": \"\",\n \"startTime\": ,\n \"endTime\": \n },\n ...\n ]\n}\n```\n\nIn other words, the `events` property has 2 kinds of properties of its own:\n\n- Properties which are the names of event types\n- The `commands` property\n\nProperties which are names of event types correspond to an array of timestamps\nwhen that event happened. It's an array because events might happen multiple\ntimes in the course of a session. Examples of event types include:\n\n- `newSessionRequested`\n- `newSessionStarted`\n\n(Individual drivers will define their own event types, so we do not have an\nexhaustive list to share here. It's best to actually get one of these responses\nfrom a real session to inspect the possible event types.)\n\nThe `commands` property is an array of objects. Each object has the name of the\nAppium-internal command (for example `click`), as well as the time the command\nstarted processing and the time it finished processing.\n\nWith this data, you can calculate the time between events, or a strict timeline\nof events, or statistical information about average length of a certain type of\ncommand, and so on.\n\nYou can only receive data about events that have happened when you make the\ncall to `/session/:id/appium/events`, so the best time to get data about an entire session is\nright before quitting it.\n\nThe Appium team maintains an event timings parser tool that can be used to\ngenerate various kinds of reports from event timings output:\n[appium/appium-event-parser](https://github.com/appium/appium-event-parser).\n\n!!! note\n\n```\nIn the past, events were available as a part of `GET /session/:id` response\n```\n\n## Add a custom event\n\nYou can add custom events that will show up in the event timings data. You can send a custom event\nname to the Appium server using the [Log Custom Event API](../reference/api/appium.md#logcustomevent),\nand the server will store the timestamp. The [Get Log Events](../reference/api/appium.md#getlogevents)\ncommand can be used to retrieve named events' timestamps later on.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/execute-methods.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Execute Methods\n---\n\nBecause the scope of commands implemented in Appium drivers is broader than the scope of commands\ndefined by the W3C WebDriver spec, Appium needs a way for these \"extended\" commands to be accessible\nby client libraries. There are two main strategies for this:\n\n1. Appium drivers define new W3C-compatible API routes, and Appium clients are updated to include\n support for those new routes.\n2. Appium drivers define so-called \"Execute Methods\" which provide new functionality by\n overloading the existing `Execute Script` command which is already available in any WebDriver-\n based client library (including all Selenium and Appium clients).\n\nThere are pros and cons for each strategy, but it is ultimately up to the extension author to\ndecide how they wish implement new commands.\n\nThis guide is designed to specifically help you understand the \"Execute Method\" strategy. This\npattern is commonly used in official Appium drivers and other third-party extensions.\nHere's an example of how the `Execute Script` command is designed to work in the world of WebDriver\nand browser automation:\n\n\\=== \"JS (WebDriverIO)\"\n\n````\n```js\nawait driver.executeScript('return arguments[0] + arguments[1]', [3, 4])\n```\n````\n\n\\=== \"Java\"\n\n````\n```java\nJavascriptExecutor jsDriver = (JavascriptExecutor) driver;\njsDriver.executeScript(\"return arguments[0] + arguments[1]\", 3, 4);\n```\n````\n\n\\=== \"Python\"\n\n````\n```py\ndriver.execute_script('return arguments[0] + arguments[1]', 3, 4)\n```\n````\n\n\\=== \"Ruby\"\n\n````\n```rb\ndriver.execute_script 'return arguments[0] + arguments[1]', 3, 4\n```\n````\n\n\\=== \"C#\"\n\n````\n```dotnet\n((IJavaScriptExecutor)driver).ExecuteScript(\"return arguments[0] + arguments[1]\", 3, 4);\n```\n````\n\nWhat's happening here is that we are defining a snippet of Javascript (technically,\na function body) to be executed within the web browser. The client can send arguments which are\nserialized, sent over HTTP, and finally provided to the function as parameters. In this example,\nwe are essentially defining an addition function. The return value of the `Execute Script` command\nis whatever the return value of the Javascript snippet is! In the case of this example, that value\nwould be the number `7` (`3` + `4`).\n\nEach client library has its own way of calling the command and providing any arguments to the script\nfunction, but the function itself\u2014the snippet\u2014is always a string and is the same across all languages.\n\nIn the world of Appium, we are usually not automating a web browser, which means this command is\nnot particularly useful. But it _is_ useful as a way to encode the name of an arbitrary command and\nto provide parameters. For example, the XCUITest\nDriver has implemented a command that lets a client\nterminate a running application if you know the ID (the `bundleId`) of the app. The way that the\ndriver makes this command available is via the Execute Method `mobile: terminateApp`. Instead of\nproviding a JavaScript function to the \"Execute Script\" command, the user provides a _known string_\nas defined by the driver. The only other thing a client needs to know is the set of\nparameters for the method, which are documented by the driver. In this case, we have a parameter\nnamed `bundleId`, whose value should be a string encoding the ID of the app to terminate. Here is\nhow this Execute Method would be called:\n\n\\=== \"JS (WebDriverIO)\"\n\n````\n```js\nawait driver.executeScript('mobile: terminateApp', [{bundleId: 'com.my.app'}])\n```\n````\n\n\\=== \"Java\"\n\n````\n```java\nJavascriptExecutor jsDriver = (JavascriptExecutor) driver;\njsDriver.executeScript(\"mobile: terminateApp\", ImmutableMap.of(\"bundleId\", \"com.my.app\"));\n```\n````\n\n\\=== \"Python\"\n\n````\n```py\ndriver.execute_script('mobile: terminateApp', {'bundleId': 'com.my.app'})\n```\n````\n\n\\=== \"Ruby\"\n\n````\n```rb\ndriver.execute_script 'mobile: terminateApp', { bundleId: 'com.my.app' }\n```\n````\n\n\\=== \"C#\"\n\n````\n```dotnet\n((IJavaScriptExecutor)driver).ExecuteScript(\"mobile: terminateApp\",\n new Dictionary { { \"bundleId\", \"com.my.app\" } });\n\n```\n````\n\nThere are two important differences in using Appium Execute Methods from vanilla Selenium\nJavascript execution:\n\n1. The script string is just a command name; it will be provided by the driver documentation\n2. The standard way to provide parameters is as a _single_ object with keys representing parameter\n names and values representing parameter values. So in this case, we had to specify both the\n parameter name (`bundleId`) as the key of the parameters object, and the parameter value\n (`com.my.app`) as the value for that key. A driver can define parameters as _required_ or _optional_.\n\nOf course, always refer to the documentation for the particular Execute Method in case the author\nhas made any alterations to the standard access method.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/grid.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium and Selenium Grid\n---\n\n## Using Selenium Grid 4+\n\nThe\n[relay](https://www.selenium.dev/documentation/grid/configuration/toml_options/#relaying-commands-to-a-service-endpoint-that-supports-webdriver)\nfeature in Grid 4 allows you to proxy Appium requests to an Appium server instance. Here is\nan example walkthrough of how you would connect two different Appium instances to a Selenium Grid.\n\n### Define the Appium configs\n\nEach Appium instance should have a config file that can be easily updated. It should contain any\ninformation which needs to be unique to that particular server (e.g., ports its drivers should use\nthat others should not). We are going to have 2 Appium servers, so we will need 2 config files:\n\n```yaml\n# appium1.yml\nserver:\n port: 4723\n use-drivers:\n - xcuitest\n default-capabilities:\n appium:wdaLocalPort: 8100\n appium:mjpegServerPort: 9100\n appium:mjpegScreenshotUrl: \"http://localhost:9100\"\n appium:platformVersion: \"26.0\"\n appium:deviceName: \"iPhone 17\"\n```\n\nIn the above YAML config file, we specify the Appium server port, the driver used, and parameters\nfor the driver that will be sent in as default capabilities. Our goal is to ensure that any other\ndrivers running on this host will not compete with system ports or other resources. The second\nconfig file could look like the following, where we simply adjust a few ports to prevent clashes:\n\n```yaml\n# appium2.yml\nserver:\n port: 4733\n use-drivers:\n - xcuitest\n default-capabilities:\n appium:wdaLocalPort: 8110\n appium:mjpegServerPort: 9110\n appium:mjpegScreenshotUrl: \"http://localhost:9110\"\n appium:platformVersion: \"26.0\"\n appium:deviceName: \"iPhone 16\"\n```\n\n### Define the Grid node configs\n\nWe will be launching one Grid \"node\" per Appium server, to manage relaying commands and determining\ncapacity and online status, etc... So we should have one config file per Grid node as well. Each\nnode config should include the address of the Appium server it will target, as well as a list of\ncapability \"configs\" it should accept to relay a session request to Appium. Here is what the config\ncould look like for the two nodes:\n\n```toml\n# node1.toml\n[server]\nport = 5555\n\n[node]\ndetect-drivers = false\n\n[events]\npublish = \"tcp://HUB_IP_ADDRESS:4442\"\nsubscribe = \"tcp://HUB_IP_ADDRESS:4443\"\n\n[relay]\nurl = \"http://localhost:4723\"\nstatus-endpoint = \"/status\"\nconfigs = [\n \"1\", \"{\\\"platformName\\\": \\\"iOS\\\", \\\"appium:automationName\\\": \\\"XCUITest\\\"}\"\n]\n```\n\n```toml\n# node2.toml\n[server]\nport = 5565\n\n[node]\ndetect-drivers = false\n\n[events]\npublish = \"tcp://HUB_IP_ADDRESS:4442\"\nsubscribe = \"tcp://HUB_IP_ADDRESS:4443\"\n\n[relay]\nurl = \"http://localhost:4733\"\nstatus-endpoint = \"/status\"\nconfigs = [\n \"1\", \"{\\\"platformName\\\": \\\"iOS\\\", \\\"appium:automationName\\\": \\\"XCUITest\\\"}\"\n]\n```\n\nNote that each node config also specifies a different port itself for the node to run on.\n\n### Putting it together\n\nThe Grid nodes aren't enough--you'll also want a Grid \"hub\" that acts as a load balancer and\nmanager for all the nodes. So in the end we'll have 5 processes running at once: 2 Appium servers,\n2 Grid nodes, and 1 Grid hub. It's best to run each of these in a separate terminal window to avoid\nconfusion of logs. Here is how you'd start each process:\n\n0. `appium --config appium1.yml`\n1. `appium --config appium2.yml`\n2. `java -jar /path/to/selenium.jar node --config node1.toml`\n3. `java -jar /path/to/selenium.jar node --config node2.toml`\n4. `java -jar /path/to/selenium.jar hub`\n\nOnce you wait a few moments for the nodes to detect their Appium servers, and to register with the\nhub, you'll be able to send all your Appium traffic via the single hub endpoint (defaulting to\n`http://localhost:4444`).\n\nAnd of course, you're able to link up Appium servers and nodes running on different machines in\nyour network to form a larger grid.\n\n## Using Selenium Grid 3\n\nIt is possible to register your Appium server with a local [Selenium Grid 3](https://www.selenium.dev/documentation/legacy/selenium_3/grid_3/)\n([setup docs](https://www.selenium.dev/documentation/legacy/grid_3/setting_up_your_own_grid/)) instance by using the\n`--nodeconfig` server argument.\n\n```bash\nappium server --nodeconfig /path/to/nodeconfig.json --base-path=/wd/hub\n```\n\nIn the referenced config file you have to define the `browserName`, `version` and `platform`\ncapabilities and based on these parameters the grid will re-direct your test to the right device.\nYou will also need to configure your host details and the Selenium Grid details. For a full list of\nall parameters and descriptions see\n[here](https://www.selenium.dev/documentation/legacy/selenium_3/grid_setup/).\n\nOnce you start the Appium server it will register with the grid, and you will see your device on\nthe grid console page:\n\n`http://**\\**:**\\**/grid/console`\n\n### Example Grid Node Configuration JSON\n\n```json\n{\n \"capabilities\":\n [\n {\n \"browserName\": \"\",\n \"version\":\"\",\n \"maxInstances\": 1,\n \"platform\":\"\"\n }\n ],\n \"configuration\":\n {\n \"cleanUpCycle\":2000,\n \"timeout\":30000,\n \"proxy\": \"org.openqa.grid.selenium.proxy.DefaultRemoteProxy\",\n \"url\":\"http://:/wd/hub\",\n \"host\": \"\",\n \"port\": ,\n \"maxSession\": 1,\n \"register\": true,\n \"registerCycle\": 5000,\n \"hubPort\": ,\n \"hubHost\": \"\",\n \"hubProtocol\": \"\"\n }\n}\n```\n\nIf `url`, `host`, and `port` are not given, the config will be auto updated to point to\n`localhost:`.\n\nIf your Appium server is running on a different machine to your Selenium Grid server, make sure you\nuse an external name/IP address in your `host` and `url` configuration; `localhost` and `127.0.0.1`\nwill prevent Selenium Grid from connecting correctly.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/headers.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Header Handling\n---\n\n# Header Handling\n\n## Request ID Tracking\n\nAppium supports setting the request ID for each request through the `x-request-id` header. This is useful for tracing requests through your system, especially in environments where multiple services are involved or when debugging across different requests.\n\n### Using `x-request-id`\n\nWhen making requests to Appium, you can include an `x-request-id` header with a unique identifier. This ID will be:\n\n- Used to track the request through Appium's logging system\n- Preserved across the entire request lifecycle\n- Generated automatically (as a UUID) if not provided\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/log-filters.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Filtering the Appium Log\n---\n\nSometimes it might be necessary to hide sensitive information, like passwords, device identifiers,\nhashes, etc..., from the server log. Appium makes it possible to ensure such information is\nredacted in logs via the `--log-filters` command line argument. This argument allows you to provide\nthe path to a special config file, containing one or more log obfuscation rules.\n\n## Config Format\n\nThe filtering config must be one of:\n\n- a path to a valid JSON file containing an array of filtering rules\n- a `log-filters` entry in an [Appium Config](./config.md) file, with the rules array inline\n\nEach rule is an object with a set of predefined properties. The following rule properties are\nsupported:\n\n- `pattern`: A valid Javascript RegExp pattern to replace. Must be a valid non-empty pattern.\n- `text`: A simple non-empty exact text match to replace. Either this property or the above one must\n be provided. `pattern` has priority over `text` if both are provided.\n- `flags`: Regular expression flags for the given pattern. Supported flags are the same as for the\n standard JavaScript [RegExp constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Advanced_searching_with_flags_2).\n Note that the `g` (global matching) flag is always enabled.\n- `replacer`: The replacer value to use. By default it is `**SECURE**`. Empty values are allowed.\n\n### Config Examples\n\nReplace all occurrences of `my.magic.app` string with the default replacer:\n\n```json\n[\n {\n \"text\": \"my.magic.app\"\n }\n]\n```\n\nReplace all occurrences of `my.magic.` string with a custom replacer (case insensitive):\n\n```json\n[\n {\n \"pattern\": \"my\\\\.magic\\\\.\\\\w\",\n \"flags\": \"i\",\n \"replacer\": \"***\"\n }\n]\n```\n\nReplace all occurrences of `my.magic.` and/or `your.magic` strings with a custom\nreplacer (case insensitive):\n\n```json\n[\n {\n \"pattern\": \"my\\\\.magic\\\\.\\\\w+\",\n \"flags\": \"i\",\n \"replacer\": \"***\"\n },\n {\n \"pattern\": \"your\\\\.magic\",\n \"flags\": \"i\",\n \"replacer\": \"***\"\n }\n]\n```\n\nTruncate all log lines to max 15 chars (advanced):\n\n```json\n[\n\t{\n \"pattern\": \"(.{1,15}).*\",\n \"flags\": \"s\",\n \"replacer\": \"$1\"\n }\n]\n```\n\n### Config Errors Handling\n\nIf any of the config rules contains invalid items (such as empty/invalid pattern, empty rule, etc.)\nthen Appium will print the detailed report about collected errors and will fail to start until\nthese errors are addressed.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/managing-exts.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Managing Drivers and Plugins\n---\n\nTo do anything useful with Appium, you need to have at least one [Driver](../intro/drivers.md)\ninstalled, otherwise Appium won't know how to automate anything. There is an entire\n[Ecosystem](../ecosystem/index.md) of drivers and plugins out there!\n\nThis guide helps explain how to manage these drivers and plugins. There are\ntwo basic strategies: using Appium's extension CLI interface, or managing extensions yourself in an\n`npm`-based project.\n\n!!! note\n\n```\nOther package managers are not currently supported.\n```\n\n## Using Appium's Extension CLI\n\nWith Appium's [Extension CLI](../reference/cli/extensions.md), you let Appium manage drivers and plugins for\nyou. You will use CLI commands to tell Appium which extensions you would like to install, update,\nor remove. Here's an example of how you might install a driver using the CLI:\n\n```bash\nappium driver install xcuitest\n```\n\nThis command will install the latest version of the\n[XCUITest Driver](https://github.com/appium/appium-xcuitest-driver). The Extension CLI comes with a variety\nof commands and parameters; see the documentation for that command for all the specifics.\n\nThe all-important question when Appium is managing your extensions for you is: where are they installed?\nAppium manages extensions in a directory specified by the `APPIUM_HOME` environment variable. You\ncan set that variable to anything you like, and Appium will manage its extensions there. You can\ntherefore also use the `APPIUM_HOME` environment variable to manage different sets of extensions,\nfor example if you want to have the same driver installed at conflicting versions:\n\n```bash\nAPPIUM_HOME=/path/to/home1 appium driver install xcuitest@4.11.1\nAPPIUM_HOME=/path/to/home2 appium driver install xcuitest@4.11.2\n```\n\nRunning these commands will result in two separate `APPIUM_HOME` directories being created and\npopulated with the corresponding version of the XCUITest driver. You can then use the same\nenvironment variables to direct Appium which version to use on launch:\n\n```bash\nAPPIUM_HOME=/path/to/home1 appium # use xcuitest driver 4.11.1\nAPPIUM_HOME=/path/to/home2 appium # use xcuitest driver 4.11.2\n```\n\nYou don't need to set `APPIUM_HOME` if you don't want to! By default, Appium will set `APPIUM_HOME`\nto the directory `.appium` in your user home directory.\n\nThese installed packages will be managed by `extensions.yaml` in `$APPIUM_HOME/node_modules/.cache/appium/extensions.yaml`.\n\n## Do-It-Yourself with `npm`\n\nBecause Appium and Appium drivers are Node.js programs, if you are integrating your Appium scripts\ninto your own Node.js project, there is an alternative way to manage drivers and plugins: via `npm`,\nlike any other dependency. Basically, whenever you run Appium, if you have not explicitly set\n`APPIUM_HOME`, it will:\n\n1. Try to determine whether the _current directory_ is inside an `npm` package.\n2. If so, it will check whether `appium` is a dependency (dev, prod, or peer) in the project's\n `package.json`\n3. If so, _unless you have specified `APPIUM_HOME` in your environment_, Appium will ignore load\n drivers and plugins defined in that `package.json` file instead.\n\nThis means you are freely able to add Appium drivers and plugins as regular package dependencies or\ndev dependencies. For example, if your project has a `package.json` which includes the following:\n\n```json\n{\n \"devDependencies\": {\n \"appium\": \"^2.0.0\",\n \"appium-xcuitest-driver\": \"^4.11.1\"\n }\n}\n```\n\nThen, if you run `npx appium` inside your project, Appium will detect that it is a dependency of\nthe project, and will load the XCUITest driver which is also listed as a dev dependency for the\nproject.\n\nThis strategy is _only_ recommended if you are already using `npm` for your project.\nOtherwise, it is recommended that you use Appium's Extension CLI and, if necessary, adjust\n`APPIUM_HOME` to change the location of stored extensions.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/migrating-1-to-2.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Migrating to Appium 2\n---\n\nThis document is a guide for those who are using Appium 1 and wish to migrate to Appium 2. It\ncontains a list of breaking changes and how to migrate your environments or test suites to ensure\ncompatibility with Appium 2.\n\nAppium 2 is the biggest Appium release in over 5 years. It is _not_ focused on changing the\nautomation behavior for any particular platform, but instead re-envisions Appium into an\n_ecosystem_ of automation tools:\n\n- The core Appium module retains only platform-agnostic functionality\n- Functionality for automating specific platforms is moved to separate _driver_ modules\n- Functionality for altering/extending Appium is moved to separate _plugin_ modules\n\nAt the same time, the Appium project is taking the opportunity to remove many old and deprecated\nbits of functionality.\n\nSince Appium 2 is a major architectural change, ^^we do not recommend directly updating your\nAppium 1 installations to Appium 2^^. Instead, please uninstall Appium 1 first, and only install\nAppium 2 afterwards.\n\n## Breaking Changes\n\n### Drivers Installed Separately\n\nWhen installing Appium 1, all available drivers would be installed alongside the main Appium\nserver. In Appium 2, due to its modular structure, this is no longer the case - by default,\ninstalling it only installs the core Appium server, without any drivers.\n\nWhen it comes to installing Appium 2 drivers, there are several approaches you can take:\n\n- Add the `--drivers` flag when installing Appium, for example:\n\n```bash\nnpm i -g appium --drivers=xcuitest,uiautomator2\n```\n\n- Use the [Appium Extension CLI](../reference/cli/extensions.md), for example:\n\n```bash\nappium driver install uiautomator2\n```\n\n- Use the [Appium Setup CLI command](../reference/cli/setup.md) (added in Appium `2.6`), for example:\n\n```bash\nappium setup mobile\n```\n\nCheck the [Managing Drivers and Plugins guide](./managing-exts.md) for more information.\n\n!!! info \"Actions Needed\"\n\n```\nWhen installing Appium 2, use one of the above approaches for installing your desired drivers\n```\n\n### Driver Installation Path Changed\n\nWhen installing Appium 1, all available drivers would be installed as dependencies of the main\nAppium server, in `/path/to/appium/node_modules`. For example, `appium-webdriveragent` was located\nat `/path/to/appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent`.\n\nIn Appium 2, drivers (and plugins) are installed at the path defined by the `APPIUM_HOME`\nenvironment variable, whose default value is `~/.appium`. So, `appium-webdriveragent` would now be\nlocated at `$APPIUM_HOME/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent`.\n\n!!! info \"Actions Needed\"\n\n```\nIf your code uses paths to Appium driver files, update it to use the `APPIUM_HOME` environment\nvariable\n```\n\n### Drivers Updated Separately\n\nIn Appium 1, in order to get updates to your drivers, you would simply wait for those updates to be\nrolled into a new release of Appium, and then update your Appium version. With Appium 2, since the\nserver and drivers are separate packages, they can release new versions independently from each\nother - this means that you no longer need to wait for a new Appium server release, but can install\nthe latest driver versions right away.\n\nChecking for driver updates is done by using the [Appium Extension CLI](../reference/cli/extensions.md):\n\n```bash\nappium driver list --updates\n```\n\nIf any updates are available, you can then run the `update` command for any given driver:\n\n```bash\nappium driver update xcuitest\n```\n\nUpdating the Appium server itself is the same as before:\n\n```bash\nnpm update -g appium\n```\n\nHowever, in Appium 2 this process is a lot quicker, since drivers are no longer bundled with the\nserver package.\n\n!!! info \"Actions Needed\"\n\n```\nMake sure to use the [Appium Extension CLI](../reference/cli/extensions.md) to manage your drivers\n```\n\n### Deprecated Packages No Longer Supported\n\nThe Appium 1 ecosystem included several drivers, clients and other packages that had since been\ndeprecated and replaced with newer packages. Appium 2 no longer includes support for these packages,\nand it is recommended to migrate to the following replacements:\n\n| Appium 1 Package | Replacement in Appium 2 |\n| ------------------ | -------------------------------------------------------------------------- |\n| iOS Driver | [XCUITest Driver](https://appium.github.io/appium-xcuitest-driver/latest/) |\n| UiAutomator Driver | [UiAutomator2](https://github.com/appium/appium-uiautomator2-driver/) |\n| `wd` Client | [WebdriverIO Client](https://webdriver.io/) |\n| Appium Desktop | [Appium Inspector](https://github.com/appium/appium-inspector) |\n\n!!! info \"Actions Needed\"\n\n```\nIf you are using any of the aforementioned package(s), migrate to their recommended replacement(s)\n```\n\n### Default Server Base Path Changed\n\nIn Appium 1, the default Appium server URL was `http://localhost:4723/wd/hub`, where the `/wd/hub`\npart (the base path) was a legacy convention from Selenium 1. Appium 2 changes the default base\npath to `/`, therefore the default server URL is now `http://localhost:4723/`.\n\n!!! info \"Actions Needed\"\n\n```\nIn your test scripts, change the base path of the target server URL from `/wd/hub` to `/`.\nAlternatively, you can retain the Appium 1 base path by launching Appium with the\n`--base-path=/wd/hub` [command-line argument](../reference/cli/server.md).\n```\n\n### Server Port 0 No Longer Supported\n\nIn Appium 1, it was possible to specify `--port 0` during server startup, which had the effect of\nstarting Appium on a random free port. Appium 2 no longer allows this, and requires port values to\nbe `1` or higher. If you wish to start Appium on a random port, you must now take care of this on\nyour own prior to launching the server.\n\n!!! info \"Actions Needed\"\n\n```\nIf you are launching Appium with `--port 0`, change the port number value to `1` or higher\n```\n\n### Driver-Specific CLI Options Changed\n\nWith Appium 1, command-line options specific to particular drivers were all hosted on the main\nAppium server. So, for example, `--chromedriver-executable` was a CLI parameter you could use to\nset the Chromedriver location for the UiAutomator2 driver.\n\nIn Appium 2, all driver-specific CLI options have been moved to the drivers themselves. However,\ndepending on the driver, these options may now need to be passed in another way:\n\n- Some options can still be passed as different CLI flags, for example:\n\n```bash\nappium --webdriveragent-port=5000 # Appium 1\nappium --driver-xcuitest-webdriveragent-port=5000 # Appium 2\n```\n\n- Some options can now be passed as environment variables, for example:\n\n```bash\nappium --chromedriver-version=100 # Appium 1\nCHROMEDRIVER_VERSION=100 appium # Appium 2\n```\n\n- Some options can now be passed as [capabilities](./caps.md), for example:\n\n```\nappium --chromedriver-executable=/path/to/chromedriver # Appium 1\n{\"appium:chromedriverExecutable\": \"/path/to/chromedriver\"} # Appium 2\n```\n\n!!! info \"Actions Needed\"\n\n```\nIf you are using driver-specific CLI options, refer to that driver's documentation for how to\napply them in Appium 2\n```\n\n### Filepaths No Longer Supported for Some CLI Options\n\nIn Appium 1, some server command-line options could be invoked by passing a filepath as their\nvalue, and Appium would then parse the contents of that file as the actual value for that option.\nThere were four options that supported this:\n\n- `--nodeconfig`\n- `--default-capabilities`\n- `--allow-insecure`\n- `--deny-insecure`\n\nAppium 2 no longer attempts to parse the contents of filepaths passed to these options, and offers\ntwo ways to specify the value for these options:\n\n- As strings, directly on the command line\n - `--nodeconfig` / `--default-capabilities`: JSON string\n - `--allow-insecure` / `--deny-insecure`: comma-separated list\n- In the [Appium Configuration file](./config.md)\n\n!!! info \"Actions Needed\"\n\n```\nIf you are using any of the aforementioned CLI options with a filepath value, update your code\nto pass the file contents either directly or through the Appium config file\n```\n\n### Old Protocols Dropped\n\nAppium's API is based on the [W3C WebDriver Protocol](https://www.w3.org/TR/webdriver/), and it has\nsupported this protocol for years. Before this protocol was designed as a web standard, the\n[JSON Wire Protocol](https://www.selenium.dev/documentation/legacy/json_wire_protocol/) (JSONWP)\nand [Mobile JSON Wire Protocol](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md)\n(MJSONWP) were used instead.\n\nIn Appium 1, all of these protocols were supported, so that older Selenium/Appium clients could\nstill communicate with newer Appium servers. Appium 2 removes support for JSONWP/MJSONWP and is now\nonly compatible with the W3C WebDriver Protocol.\n\n!!! info \"Actions Needed\"\n\n```\nMake sure you are using Selenium/Appium clients compatible with the W3C WebDriver Protocol\n```\n\n### Capabilities Require Vendor Prefix\n\nIn Appium 1, in order to create a session, you had to specify certain desired capabilities, which\nwould indicate session parameters, e.g. the driver you want to use. Appium 2 retains this behavior\nand continues to accept desired capabilities (now renamed simply to 'capabilities'), but as part of\nthe W3C WebDriver Protocol specification, all non-standard capabilities are now required to use a\nvendor prefix.\n\nThe list of standard capabilities is described in the [WebDriver Protocol specification](https://www.w3.org/TR/webdriver/#capabilities),\nand includes a few commonly used capabilities like `browserName` and `platformName`. All other\ncapabilities must now start with the vendor name and a colon (the vendor prefix), for example,\n`moz:` or `goog:`. Since most of Appium's capabilities go beyond the standard W3C capabilities,\nall of them must include the `appium:` prefix (unless specified otherwise):\n\n```\ndeviceName # Appium 1\nappium:deviceName # Appium 2\n```\n\nThis requirement may or may not be a breaking change for your test suites. Up-to-date versions of\nofficial Appium clients and the Appium Inspector will automatically add the `appium:` prefix to all\nnon-standard capabilities, and the same may apply to cloud-based Appium providers.\n\nAdditionally, if you are starting a session with multiple Appium-specific capabilities (which will\nlikely be the case), it may seem repetitive to add the `appium:` prefix to each individual\ncapability. To avoid this, you can optionally group up all these capabilities under a single object\ncapability, `appium:options`, for example:\n\n\\=== \"Default Approach\"\n\n````\n```json\n{\n \"platformName\": \"iOS\",\n \"browserName\": \"Safari\",\n \"appium:platformVersion\": \"14.4\",\n \"appium:deviceName\": \"iPhone 11\",\n \"appium:automationName\": \"XCUITest\"\n}\n```\n````\n\n\\=== \"With `appium:options`\"\n\n````\n```json\n{\n \"platformName\": \"iOS\",\n \"browserName\": \"Safari\",\n \"appium:options\": {\n \"platformVersion\": \"14.4\",\n \"deviceName\": \"iPhone 11\",\n \"automationName\": \"XCUITest\"\n }\n}\n```\n````\n\n!!! warning\n\n```\nCapabilities included in the `appium:options` object will overwrite capabilities of the same\nname that are used outside of this object. Note that cloud provider support for the\n`appium:options` syntax may vary.\n```\n\nFor more information on capabilities, have a look at the [Capabilities Guide](./caps.md).\n\n!!! info \"Actions Needed\"\n\n```\nAdd the `appium:` prefix to all Appium-specific capabilities used in your tests, or wrap them\ninside an `appium:options` object\n```\n\n### Advanced Features Moved to Plugins\n\nOne of the design goals for Appium 2 is to extract non-core features into special extensions called\n[plugins](../ecosystem/plugins.md). Two such features of Appium 1 have been moved to plugins, and\nare no longer bundled with Appium 2:\n\n| Feature | Plugin Name |\n| ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |\n| Image-related features (comparison, search by image, etc...) | [`images`](https://github.com/appium/appium/tree/master/packages/images-plugin) |\n| The Execute Driver Script feature | [`execute-driver`](https://github.com/appium/appium/tree/master/packages/execute-driver-plugin) |\n\n!!! info \"Actions Needed\"\n\n````\nIf you were using the image-related features and/or the execute driver script feature in Appium\n1, first install their plugin(s):\n```\nappium plugin install images \nappium plugin install execute-driver\n```\nAfterwards, make sure to activate the plugin(s) upon launching the Appium server:\n```\nappium --use-plugins=images,execute-driver\n```\n````\n\n### Endpoint Changes\n\nA few server endpoints used in Appium 1 were accepting old or unused parameters. Appium 2 removes\nsupport for these parameters. The following is a list of these changed endpoints, along with the\nparameters they no longer accept, as well as the parameters they continue to accept in Appium 2.\n\n- `POST /session/:sessionId/appium/device/gsm_signal`\n - :octicons-x-24: `signalStrengh`\n - :octicons-check-24: `signalStrength`\n- `POST /session/:sessionId/appium/element/:elementId/value`\n - :octicons-x-24: `value`\n - :octicons-check-24: `text`\n- `POST /session/:sessionId/appium/element/:elementId/replace_value`\n - :octicons-x-24: `value`\n - :octicons-check-24: `text`\n\n!!! info \"Actions Needed\"\n\n```\nCheck your Appium client documentation for the methods using these endpoints, and adjust your\ncode to only use the accepted parameters\n```\n\n### Internal Packages Renamed\n\nIn Appium 1, the internal dependency packages were each located in their own repository. Appium 2\nmoves to a monorepo structure and therefore renames many of these packages, for example:\n\n```\nappium-base-driver # Appium 1\n@appium/base-driver # Appium 2\n```\n\n!!! info \"Actions Needed\"\n\n```\nIf you do not directly import Appium packages into your code - none! However, if you do, make\nsure to update the names of your Appium package imports!\n```\n\n## Major New Features\n\nApart from the breaking changes mentioned above, here are some of the major new features you may\nwish to take advantage of with Appium 2:\n\n### Third-Party Drivers and Plugins\n\nYou are no longer limited to official drivers or plugins, or ones that the Appium team even knows\nabout! Developers can now create their own custom drivers or plugins, which can be installed via\nAppium's [Extension CLI](../reference/cli/extensions.md) from `npm`, `git`, GitHub, or even the local\nfilesystem. Interested in building a driver or plugin? Check out the\n[Building Drivers](../developing/build-drivers.md) and\n[Building Plugins](../developing/build-plugins.md) guides.\n\n### Configuration Files\n\nAppium now supports _configuration files_ in addition to command-line arguments. Nearly all options\nor flags that had to be specified on the CLI in Appium 1, can now also be provided in a\nconfiguration file. The file can be in JSON, JS, or YAML format. For more information, refer to\nthe [Config File Guide](./config.md).\n\n## Special Notes for Cloud Providers\n\nMost of this guide has applied to Appium end users or developers, but some of the architectural\nchanges in Appium 2 will constitute breaking changes for different Appium service providers. At the\nend of the day, the maintainer of the Appium server is responsible for installing and exposing the\nvarious Appium drivers and plugins that end users may wish to use.\n\nWe encourage cloud providers to thoroughly read and understand our recommendation for cloud\nprovider capabilities in order to support user needs in\nan industry-compatible way!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/migrating-2-to-3.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Migrating to Appium 3\n---\n\n\n\nThis document is a guide for those who are using Appium 2 and would like to upgrade to Appium 3.\nIt contains a list of breaking changes, as well as suggestions for handling them.\n\nWhile Appium 2 was a major overhaul of the entire Appium architecture, Appium 3 is a smaller\nupgrade with fewer breaking changes, which should result in a much simpler migration process.\n\n## Installation\n\nThe installation method for Appium 3 remains the same as for Appium 2. If you want to upgrade, you\ncan simply install Appium 3 on top of your existing installation:\n\n```bash\n# optional: `appium setup reset`\nnpm install -g appium\n```\n\n\\##\u00a0Breaking Changes\n\n### Node 20+ Required\n\nWith Appium 2, the minimum required Node version was `14.17.0`. Support for Node 14 had already\nended before the release of Appium 2, which meant that even users on outdated Node versions were\nable to use it.\n\nAppium 3 drops support for outdated Node versions, and bumps the minimum required version to Node\n`20.19.0` (with the semver range `^20.19.0 || ^22.12.0 || >=24.0.0`), as well as the minimum `npm`\nversion to `10`.\n\n!!! info \"Actions Needed\"\n\n Upgrade Node.js to `v20.19.0` or newer, and `npm` to `v10` or newer\n\n### Deprecated Endpoints Removed\n\nAppium 3 removes many previously deprecated server endpoints. Some of these endpoints have now\nbecome specific to one or more drivers, while most others have direct or close-to-direct\nreplacements in other endpoints. All removed endpoints, along with replacements (where applicable)\nare listed [in the **Removed Endpoints** section](#removed).\n\nSome W3C endpoints used in Appium also existed in the old JSONWP standard, but required different\nparameters. With Appium 2, both standards for these endpoints were supported. Appium 3 changes\nthese endpoints by removing support for the JSONWP parameters, and only accepting the W3C\nparameters. These endpoints are listed [in the **Modified Endpoints** section](#modified).\n\n!!! info \"Actions Needed\"\n\n Check your Appium client documentation for the affected methods, and adjust your code to use\n their replacements\n\n### Feature Flag Prefix Required\n\nWith Appium 2, it was possible to opt into certain [insecure features](./security.md) on server\nstartup, which could be enabled using the `--allow-insecure` or `--relaxed-security` flags. Appium\n`2.13` added the ability to optionally provide a scope prefix to specific features, ensuring that\nthey would only be enabled for the specified driver (or all of them).\n\nAppium 3 makes the scope prefix mandatory, and will throw an error if features are specified\nwithout a scope. Note that the behavior of the `--relaxed-security` flag remains unchanged.\n\n!!! info \"Actions Needed\"\n\n If you use the `--allow-insecure` server flag, add a scope prefix before each feature name.\n For example, if you use the UiAutomator2 `adb_shell` feature, on Appium 2 you would enable it\n like this:\n ` appium --allow-insecure=adb_shell `\n On Appium 3, to ensure this feature is only activated for UiAutomator2, you can run it like so:\n ` appium --allow-insecure=uiautomator2:adb_shell `\n Alternatively, if you wish to keep the Appium 2 behavior and enable the feature for _all_\n drivers that support it, you can use the wildcard (`*`) prefix:\n ` appium --allow-insecure=*:adb_shell `\n Server-scope features like `session_discovery` also require the wildcard prefix.\n\n### Session Discovery Requires Feature Flag\n\nIn Appium 2, it was possible to retrieve all active server sessions via the `GET /sessions`\nendpoint. This information could then be used, for example, in Appium Inspector, in order to attach\nto an existing session, instead of creating a new one.\n\nAppium 3 makes two changes to the session discovery process:\n\n- The `GET /sessions` endpoint is replaced with `GET /appium/sessions` (see [the Removed Endpoints section](#removed))\n- The use of the new endpoint requires the `session_discovery` [feature flag](./security.md)\n\nThe return value of `GET /appium/sessions` is largely identical to `GET /sessions`, but additionally\nincludes the `created` field for each session entry, indicating the session creation time as a Unix\ntimestamp. The rest of the result format remains unchanged.\n\nTo reduce migration efforts, the `GET /appium/sessions` endpoint (locked behind the aforementioned\nfeature flag) is also available in Appium `2.19`, allowing you to adjust your code before upgrading\nto Appium 3. As for Appium Inspector, support for this new endpoint is available starting from\nversion `2025.3.1`.\n\n!!! info \"Actions Needed\"\n\n \\* If your code uses session retrieval, change the endpoint from `GET /sessions` to\n `GET /appium/sessions`\n \\* If you use Appium Inspector's Attach to Session feature, upgrade to version `2025.3.1` or later\n \\* In both cases, ensure your Appium server is launched with the `session_discovery`\n [feature flag](./security.md)\n\n### Unzip Logic Removed\n\nAppium 3 removes the custom unzip logic used when working with files like application packages.\nSuch files are often only relevant to particular platforms, therefore the functionality for\nhandling these operations has been moved to relevant drivers.\n\n!!! info \"Actions Needed\"\n\n Ensure you are using the most recent versions of your drivers\n\n### Express 5\n\nAppium 3 upgrades the internally-used `express` dependency from `v4` to `v5`. This should not\naffect users who use Appium directly, but developers integrating parts of Appium into their own\nprojects may want to check [the Express 5 Migration Guide](https://expressjs.com/en/guide/migrating-5.html).\n\n!!! info \"Actions Needed\"\n\n None! (hopefully)\n\n## Endpoint Changes\n\n### Removed\n\nThe following is a list of all the Appium server endpoints removed in Appium 3. For ease of\nmigration, additional information is provided for each endpoint: drivers that still support the\nendpoint; suggested replacement endpoints, or, rarely, the lack of any available replacements.\n\nIcons are used to indicate endpoint support in either certain drivers, or in the core Appium server\n(applicable to all drivers):\n\n
\n\n- :simple-appium:{ .lg } - Appium server\n- :material-apple:{ .lg } - [XCUITest driver](https://appium.github.io/appium-xcuitest-driver/latest/)\n- :material-android:{ .lg } - [UiAutomator2 driver](https://github.com/appium/appium-uiautomator2-driver/)\n- :material-coffee:{ .lg } - [Espresso driver](https://github.com/appium/appium-espresso-driver)\n- :material-apple-finder:{ .lg } - [Mac2 driver](https://github.com/appium/appium-mac2-driver)\n- :material-microsoft-windows:{ .lg } - [Windows driver](https://github.com/appium/appium-windows-driver)\n\n
\n\n- `GET /sessions`\n - :octicons-arrow-right-24: `GET /appium/sessions` :simple-appium:\n- `POST /session/:sessionId/accept_alert`\n - :octicons-arrow-right-24: `POST /session/:sessionId/alert/accept` :simple-appium:\n - :octicons-arrow-right-24: `mobile: alert` [execute method](./execute-methods.md) :material-apple:\n - :octicons-arrow-right-24: `mobile: acceptAlert` execute method :material-android:\n- `GET /session/:sessionId/alert_text`\n - :octicons-arrow-right-24: `GET /session/:sessionId/alert/text` :simple-appium:\n- `POST /session/:sessionId/alert_text`\n - :octicons-arrow-right-24: `POST /session/:sessionId/alert/text` :simple-appium:\n- `POST /session/:sessionId/appium/app/background`\n - :octicons-arrow-right-24: `mobile: backgroundApp` execute method :material-apple: :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/app/close`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `mobile: terminateApp` execute method :material-apple: :material-android: :material-coffee:\n - :octicons-arrow-right-24: `macos: terminateApp` execute method :material-apple-finder:\n - :octicons-arrow-right-24: `windows: closeApp` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/appium/app/end_test_coverage`\n - :octicons-arrow-right-24: `mobile: shell` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/app/launch`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `mobile: launchApp` execute method :material-apple:\n - :octicons-arrow-right-24: `mobile: activateApp` or `mobile: startActivity` execute methods :material-android: :material-coffee:\n - :octicons-arrow-right-24: `macos: launchApp` or `macos: activateApp` execute methods :material-apple-finder:\n - :octicons-arrow-right-24: `windows: launchApp` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/appium/app/reset`\n - :octicons-arrow-right-24: `mobile: clearApp` execute method :material-apple: [^sim] :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/app/strings`\n - :octicons-arrow-right-24: `mobile: getAppStrings` execute method :material-apple: :material-android: :material-coffee:\n- `GET /session/:sessionId/appium/device/app_state`\n - :octicons-arrow-right-24: `POST /session/:sessionId/appium/device/app_state` :simple-appium:\n - :octicons-arrow-right-24: `mobile: queryAppState` execute method :material-apple: :material-android: :material-coffee:\n - :octicons-arrow-right-24: `macos: queryAppState` execute method :material-apple-finder:\n- `GET /session/:sessionId/appium/device/current_activity`\n - :octicons-arrow-right-24: `mobile: getCurrentActivity` execute method :material-android: :material-coffee:\n- `GET /session/:sessionId/appium/device/current_package`\n - :octicons-arrow-right-24: `mobile: getCurrentPackage` execute method :material-android: :material-coffee:\n- `GET /session/:sessionId/appium/device/display_density`\n - :octicons-arrow-right-24: `mobile: getDisplayDensity` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/finger_print`\n - :octicons-arrow-right-24: `mobile: fingerPrint` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/get_clipboard`\n - :octicons-check-24: Moved to drivers: :material-android: :material-coffee:\n - :octicons-arrow-right-24: `mobile: getClipboard` execute method :material-apple: :material-android: :material-coffee:\n - :octicons-arrow-right-24: `mobile: getPasteboard` execute method :material-apple: [^sim]\n - :octicons-arrow-right-24: `windows: getClipboard` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/appium/device/gsm_call`\n - :octicons-arrow-right-24: `mobile: gsmCall` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/gsm_signal`\n - :octicons-arrow-right-24: `mobile: gsmSignal` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/gsm_voice`\n - :octicons-arrow-right-24: `mobile: gsmVoice` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/is_locked`\n - :octicons-arrow-right-24: `mobile: isLocked` execute method :material-apple: :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/keyevent`\n - :octicons-arrow-right-24: `mobile: keys` execute method :material-apple: (iPadOS only)\n - :octicons-arrow-right-24: `mobile: pressKey` execute method :material-android: :material-coffee:\n - :octicons-arrow-right-24: `macos: keys` execute method :material-apple-finder:\n - :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/appium/device/lock`\n - :octicons-arrow-right-24: `mobile: lock` execute method :material-apple: :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/long_press_keycode`\n - :octicons-arrow-right-24: `mobile: pressKey` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/network_speed`\n - :octicons-arrow-right-24: `mobile: networkSpeed` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/open_notifications`\n - :octicons-arrow-right-24: `mobile: statusBar` execute method :material-android: :material-coffee:\n - :octicons-arrow-right-24: `mobile: openNotifications` execute method :material-android:\n- `POST /session/:sessionId/appium/device/power_ac`\n - :octicons-arrow-right-24: `mobile: powerAC` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/power_capacity`\n - :octicons-arrow-right-24: `mobile: powerCapacity` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/press_keycode`\n - :octicons-arrow-right-24: `mobile: keys` execute method :material-apple: (iPadOS only)\n - :octicons-arrow-right-24: `mobile: pressKey` execute method :material-android: :material-coffee:\n - :octicons-arrow-right-24: `macos: keys` execute method :material-apple-finder:\n - :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/appium/device/send_sms`\n - :octicons-arrow-right-24: `mobile: sendSms` execute method :material-android: [^sim] :material-coffee: [^sim]\n- `POST /session/:sessionId/appium/device/set_clipboard`\n - :octicons-arrow-right-24: `mobile: setClipboard` execute method :material-apple: :material-android: :material-coffee:\n - :octicons-arrow-right-24: `mobile: setPasteboard` execute method :material-apple: [^sim]\n - :octicons-arrow-right-24: `windows: setClipboard` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/appium/device/shake`\n - :octicons-arrow-right-24: `mobile: shake` execute method :material-apple: [^sim]\n- `POST /session/:sessionId/appium/device/start_activity`\n - :octicons-arrow-right-24: `mobile: startActivity` execute method :material-android: :material-coffee:\n- `GET /session/:sessionId/appium/device/system_bars`\n - :octicons-arrow-right-24: `mobile: deviceScreenInfo` execute method :material-apple:\n - :octicons-arrow-right-24: `mobile: getSystemBars` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/toggle_airplane_mode`\n - :octicons-arrow-right-24: `mobile: setConnectivity` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/toggle_data`\n - :octicons-arrow-right-24: `mobile: setConnectivity` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/toggle_location_services`\n - :octicons-arrow-right-24: `mobile: toggleGps` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/toggle_wifi`\n - :octicons-arrow-right-24: `mobile: setConnectivity` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/device/unlock`\n - :octicons-arrow-right-24: `mobile: unlock` execute method :material-apple: :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/element/:elementId/value`\n - :octicons-arrow-right-24: `POST /session/:sessionId/element/:elementId/value` :simple-appium:\n- `POST /session/:sessionId/appium/element/:elementId/replace_value`\n - :octicons-arrow-right-24: `POST /session/:sessionId/element/:elementId/value` :simple-appium:\n- `POST /session/:sessionId/appium/getPerformanceData`\n - :octicons-arrow-right-24: `mobile: getPerformanceData` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/performanceData/types`\n - :octicons-arrow-right-24: `mobile: getPerformanceDataTypes` execute method :material-android: :material-coffee:\n- `POST /session/:sessionId/appium/receive_async_response`\n - :octicons-arrow-right-24: `POST /session/:sessionId/execute/async` :simple-appium:\n- `POST /session/:sessionId/appium/simulator/toggle_touch_id_enrollment`\n - :octicons-arrow-right-24: `mobile: enrollBiometric` execute method :material-apple: [^sim]\n- `POST /session/:sessionId/appium/simulator/touch_id`\n - :octicons-arrow-right-24: `mobile: sendBiometricMatch` execute method :material-apple: [^sim]\n- `POST /session/:sessionId/appium/start_recording_screen`\n - :octicons-check-24: Moved to drivers: :material-apple: :material-android: :material-coffee: :material-apple-finder: :material-microsoft-windows:\n - :octicons-arrow-right-24: `mobile: startXCTestScreenRecording` execute method :material-apple:\n - :octicons-arrow-right-24: `mobile: startMediaProjectionRecording` execute method :material-android: :material-coffee:\n - :octicons-arrow-right-24: `macos: startRecordingScreen` or `macos: startNativeScreenRecording` execute methods :material-apple-finder:\n - :octicons-arrow-right-24: `windows: startRecordingScreen` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/appium/stop_recording_screen`\n - :octicons-check-24: Moved to drivers: :material-apple: :material-android: :material-coffee: :material-apple-finder: :material-microsoft-windows:\n - :octicons-arrow-right-24: `mobile: stopXCTestScreenRecording` execute method :material-apple:\n - :octicons-arrow-right-24: `mobile: stopMediaProjectionRecording` execute method :material-android: :material-coffee:\n - :octicons-arrow-right-24: `macos: stopRecordingScreen` or `macos: stopNativeScreenRecording` execute methods :material-apple-finder:\n - :octicons-arrow-right-24: `windows: stopRecordingScreen` execute method :material-microsoft-windows:\n- `GET /session/:sessionId/application_cache/status`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `POST /session/:sessionId/buttondown`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: [W3C Actions API](https://www.selenium.dev/documentation/webdriver/actions_api/) (`pointerDown`) :simple-appium:\n - :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/buttonup`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerUp`) :simple-appium:\n - :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/click`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown` & `pointerUp`) :simple-appium:\n- `POST /session/:sessionId/dismiss_alert`\n - :octicons-arrow-right-24: `POST /session/:sessionId/alert/dismiss` :simple-appium:\n- `POST /session/:sessionId/doubleclick`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown` & `pointerUp`) :simple-appium:\n- `POST /session/:sessionId/element/active`\n - :octicons-arrow-right-24: `GET /session/:sessionId/element/active` :simple-appium:\n- `GET /session/:sessionId/element/:elementId/equals/:otherId`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n- `GET /session/:sessionId/element/:elementId/location`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `GET /session/:sessionId/element/:elementId/rect` :simple-appium:\n- `GET /session/:sessionId/element/:elementId/location_in_view`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n- `GET /session/:sessionId/element/:elementId/pageIndex`\n - :octicons-no-entry-24: MJSONWP protocol command with no direct replacement\n- `GET /session/:sessionId/element/:elementId/size`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `GET /session/:sessionId/element/:elementId/rect` :simple-appium:\n- `POST /session/:sessionId/element/:elementId/submit`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `POST /session/:sessionId/execute`\n - :octicons-arrow-right-24: `POST /session/:sessionId/execute/sync` :simple-appium:\n- `POST /session/:sessionId/execute_async`\n - :octicons-arrow-right-24: `POST /session/:sessionId/execute/async` :simple-appium:\n- `POST /session/:sessionId/keys`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`keyDown` & `keyUp`) :simple-appium:\n - Selenium-based clients can also use [Send Keys](https://www.selenium.dev/documentation/webdriver/actions_api/keyboard/#send-keys)\n- `GET /session/:sessionId/local_storage`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `POST /session/:sessionId/local_storage`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `DELETE /session/:sessionId/local_storage`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `GET /session/:sessionId/local_storage/key/:key`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `DELETE /session/:sessionId/local_storage/key/:key`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `GET /session/:sessionId/local_storage/size`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `POST /session/:sessionId/log`\n - :octicons-arrow-right-24: `POST /session/:sessionId/se/log` :simple-appium:\n- `GET /session/:sessionId/log/types`\n - :octicons-arrow-right-24: `GET /session/:sessionId/se/log/types` :simple-appium:\n- `POST /session/:sessionId/moveto`\n - :octicons-arrow-right-24: W3C Actions API (`pointerMove`) :simple-appium:\n - Selenium-based clients can also use [Move by Offset](https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#move-by-offset)\n- `GET /session/:sessionId/screenshot/:elementId`\n - :octicons-arrow-right-24: `GET /session/:sessionId/element/:elementId/screenshot` :simple-appium:\n- `GET /session/:sessionId/session_storage`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `POST /session/:sessionId/session_storage`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `DELETE /session/:sessionId/session_storage`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `GET /session/:sessionId/session_storage/key/:key`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `DELETE /session/:sessionId/session_storage/key/:key`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `GET /session/:sessionId/session_storage/size`\n - :octicons-no-entry-24: JSONWP protocol command with no direct replacement\n- `POST /session/:sessionId/timeouts/async_script`\n - :octicons-arrow-right-24: `POST /session/:sessionId/timeouts` :simple-appium:\n- `POST /session/:sessionId/timeouts/implicit_wait`\n - :octicons-arrow-right-24: `POST /session/:sessionId/timeouts` :simple-appium:\n- `POST /session/:sessionId/touch/click`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown` & `pointerUp`) :simple-appium:\n - Selenium-based clients can also use [Click and Release](https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#click-and-release)\n - :octicons-arrow-right-24: `mobile: tap` or `mobile: tapWithNumberOfTaps` execute methods :material-apple:\n - :octicons-arrow-right-24: `mobile: clickGesture` execute method :material-android:\n - :octicons-arrow-right-24: `mobile: clickAction` execute method :material-coffee:\n - :octicons-arrow-right-24: `macos: click`, `macos: rightClick`, `macos: press` or `macos: tap` execute methods :material-apple-finder:\n - :octicons-arrow-right-24: `windows: click` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/touch/doubleclick`\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown` & `pointerUp`) :simple-appium:\n - Selenium-based clients can also use [Double Click](https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#double-click)\n - :octicons-arrow-right-24: `mobile: doubleTap` or `mobile: tapWithNumberOfTaps` execute methods :material-apple:\n - :octicons-arrow-right-24: `mobile: doubleClickGesture` execute method :material-android:\n - :octicons-arrow-right-24: `mobile: clickAction` execute method :material-coffee:\n - :octicons-arrow-right-24: `macos: doubleClick` or `macos: doubleTap` execute methods :material-apple-finder:\n - :octicons-arrow-right-24: `windows: click` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/touch/down`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown`) :simple-appium:\n - :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/touch/flick`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown`, `pointerMove` & `pointerUp`) :simple-appium:\n - :octicons-arrow-right-24: `mobile: flingGesture` execute method :material-android:\n- `POST /session/:sessionId/touch/longclick`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown`, `pause` & `pointerUp`) :simple-appium:\n - :octicons-arrow-right-24: `mobile: touchAndHold` execute method :material-apple:\n - :octicons-arrow-right-24: `mobile: longClickGesture` execute method :material-android:\n - :octicons-arrow-right-24: `mobile: clickAction` execute method :material-coffee:\n - :octicons-arrow-right-24: `macos: press` execute method :material-apple-finder:\n - :octicons-arrow-right-24: `windows: click` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/touch/multi/perform`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `POST /session/:sessionId/actions` :simple-appium:\n- `POST /session/:sessionId/touch/move`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerMove`) :simple-appium:\n - Selenium-based clients can also use [Move by Offset](https://www.selenium.dev/documentation/webdriver/actions_api/mouse/#move-by-offset)\n- `POST /session/:sessionId/touch/perform`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `POST /session/:sessionId/actions` :simple-appium:\n- `POST /session/:sessionId/touch/scroll`\n - :octicons-arrow-right-24: W3C Actions API (`pointerDown`, `pointerMove` & `pointerUp`) :simple-appium:\n - :octicons-arrow-right-24: `mobile: scroll` or `mobile: swipe` execute methods :material-apple:\n - :octicons-arrow-right-24: `mobile: scrollGesture` or `mobile: swipeGesture` execute methods :material-android:\n - :octicons-arrow-right-24: `mobile: swipe` execute method :material-coffee:\n - :octicons-arrow-right-24: `macos: scroll` or `macos: swipe` execute methods :material-apple-finder:\n - :octicons-arrow-right-24: `windows: scroll` execute method :material-microsoft-windows:\n- `POST /session/:sessionId/touch/up`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: W3C Actions API (`pointerUp`) :simple-appium:\n - :octicons-arrow-right-24: `windows: keys` execute method :material-microsoft-windows:\n- `GET /session/:sessionId/window_handle`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `GET /session/:sessionId/window` :simple-appium:\n- `GET /session/:sessionId/window_handles`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `GET /session/:sessionId/window/handles` :simple-appium:\n- `GET /session/:sessionId/window/handle`\n - :octicons-arrow-right-24: `GET /session/:sessionId/window` :simple-appium:\n- `POST /session/:sessionId/window/:windowhandle/maximize`\n - :octicons-arrow-right-24: `POST /session/:sessionId/window/maximize` :simple-appium:\n - :fontawesome-solid-triangle-exclamation: Only supported for the current window\n- `GET /session/:sessionId/window/:windowhandle/position`\n - :octicons-arrow-right-24: `GET /session/:sessionId/window/rect` :simple-appium:\n - :fontawesome-solid-triangle-exclamation: Only supported for the current window\n- `POST /session/:sessionId/window/:windowhandle/position`\n - :octicons-arrow-right-24: `POST /session/:sessionId/window/rect` :simple-appium:\n - :fontawesome-solid-triangle-exclamation: Only supported for the current window\n- `GET /session/:sessionId/window/:windowhandle/size`\n - :octicons-check-24: Moved to drivers: :material-microsoft-windows:\n - :octicons-arrow-right-24: `GET /session/:sessionId/window/rect` :simple-appium:\n - :fontawesome-solid-triangle-exclamation: Only supported for the current window\n\n### Modified\n\nThe following are all endpoints modified in Appium 3, by removing handling for old or unused\nparameters (note that no new parameters have been added). Each endpoint lists the parameters it no\nlonger accepts, as well as the parameters it continues to accept in Appium 3.\n\n- `POST /session`\n - :octicons-x-24: `desiredCapabilities`, `requiredCapabilities`\n - :octicons-check-24: `capabilities`\n- `POST /session/:sessionId/alert/text`\n - :octicons-x-24: `value`\n - :octicons-check-24: `text`\n- `GET /session/:sessionId/appium/device/system_time`\n - :octicons-x-24: `format`\n - :octicons-check-24: None\n- `POST /session/:sessionId/element/:elementId/value`\n - :octicons-x-24: `value`\n - :octicons-check-24: `text`\n- `POST /session/:sessionId/timeouts`\n - :octicons-x-24: `type`, `ms`\n - :octicons-check-24: `script`, `pageLoad`, `implicit`\n- `POST /session/:sessionId/window`\n - :octicons-x-24: `name`\n - :octicons-check-24: `handle`\n\n[^sim]: Supported in emulators/simulators only\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/security.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Server Security\n---\n\nThe Appium team makes every effort to ensure the security of the Appium server. This is especially\nimportant when Appium is run in a multitenant environment, or when multiple users are running\nsessions on the same Appium server. In general, you can only safely enable all of Appium's features if\nall the following are true:\n\n- You're running your own Appium server locally or within a protected internal network\n- You're not sharing it with any untrusted parties\n- You don't expose Appium's port(s) to the wider internet\n\nBut because many Appium users might not be able to guarantee such a safe environment, the Appium\nteam puts many features behind a security protection mechanism, which forces system admins (the\npeople who are in charge of starting the Appium server) to _explicitly opt-in_ to these features.\n(Third-party driver and plugin authors can also hide behaviour behind security\nflags.)\n\nFor security reasons, Appium client sessions can _not_ request feature enablement via capabilities.\nThis is the responsibility of the server admin who configures and launches the Appium server.\n\n## Security Server Args\n\nThe [Server CLI](../reference/cli/server.md) doc outlines three relevant arguments which may be passed to\nAppium, when starting it from the command line:\n\n|
Parameter
| Description |\n| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `--relaxed-security` | Turns on _all_ insecure features, except those blocked by `--deny-insecure` |\n| `--allow-insecure` | Turns on _only_ specified features, except those blocked by `--deny-insecure`. Has no effect when used in combination with `--relaxed-security` |\n| `--deny-insecure` | Explicitly turns _off_ specified features, overriding `--relaxed-security` and `--allow-insecure` |\n\nAll of the above arguments can also be specified in the [Appium Configuration file](./config.md).\n\nFeatures passed to `--allow-insecure`/`--deny-insecure` must be specified as a comma-separated list,\nand each feature in the list must additionally include a prefix, indicating the driver to which the\nfeature should apply. The prefix can be either the driver's `automationName`, or the wildcard (`*`)\nsymbol, if the feature should be applied to all drivers. The prefix and feature name are separated\nusing the colon character (`:`).\n\nFor example, `first:foo` refers to the `foo` feature for the `first` driver, whereas `*:bar` refers\nto the `bar` feature for all drivers.\n\n## Insecure Features\n\nEach Appium driver is responsible for its own security, and can create its own feature names. Thus,\nyou should read through the documentation for a particular driver to know which feature names it\nmight use. Here is an incomplete list of examples from some of Appium's official drivers:\n\n|
Feature Name
| Description | Supported Extension(s) |\n| ------------------------------------------ | --------------------------------------------------------------------------------------- | ---------------------------------------------- |\n| `get_server_logs` | Allows retrieving of Appium server logs via the Webdriver log interface | IOS, XCUITest, Android, UiAutomator2, Espresso |\n| `adb_shell` | Allows execution of arbitrary shell commands via ADB, using the `mobile: shell` command | Android, UiAutomator2, Espresso |\n| `record_audio` | Allow recording of host machine audio inputs | XCUITest |\n| `execute_driver_script` | Allows sending a request that has multiple Appium commands. | Execute Driver Plugin |\n\nSome insecure features operate on the server level and do not require a driver session. Enabling\nthese features require using the wildcard prefix:\n\n|
Feature Name
| Description |\n| ------------------------------------------ | ------------------------------------------------------------------------------- |\n| `session_discovery` | Allows retrieving the list of active server sessions via `GET /appium/sessions` |\n\n## Examples\n\nTurn on the `foo` feature only for the `first` driver:\n\n```bash\nappium --allow-insecure=first:foo\n```\n\nTurn on the `foo` feature for all drivers:\n\n```bash\nappium --allow-insecure='*:foo'\n```\n\nTurn on the `foo` feature for all drivers _except_ `first`:\n\n```bash\nappium --allow-insecure='*:foo' --deny-insecure=first:foo\n```\n\nTurn on all features _except_ `foo` for all drivers:\n\n```bash\nappium --relaxed-security --deny-insecure='*:foo'\n```\n\nTurn on multiple insecure features for specific drivers:\n\n```bash\nappium --allow-insecure=uiautomator2:adb_shell,xcuitest:get_server_logs\n```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/settings.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Session Settings\n---\n\nAppium has a set of extension APIs that allow you to adjust parameters for a given session during\nthe session itself. Called \"Settings\", these parameters are similar to [Capabilities](./caps.md),\nbut while Capabilities _cannot be adjusted_ once a session has started, Settings _can be adjusted any\nnumber of times_ during the course of a session.\n\nThere are 3 important points to the concept of Settings:\n\n- Settings are mutable; they can be changed during a session using the Settings API\n- Settings are only relevant during the session in which they are set. They are typically reset for\n each new session, though depending on the driver, some settings may persist between sessions\n- Settings only adjust the way the Appium server behaves during test automation. They do not affect\n the device or app under test\n\nAn example of a setting would be the `ignoreUnimportantViews` setting recognized by the UiAutomator2\ndriver. The driver can be instructed to ignore elements in the view hierarchy which it deems\nirrelevant. Changing this setting to `true` can cause tests to run faster. But if later in the same\nsession you _want_ to access elements which would be ignored under this setting, you can always\nchange it back to `false`.\n\nSettings are implemented via the following API endpoints:\n\n| Command |
Method/Route
| Params | Description | Returns |\n| ----------------- | ------------------------------------------ | ----------------------------------------------------- | ---------------------------------- | ----------------------------------------------------- |\n| `Update Settings` | `POST /session/:id/appium/settings` | `settings` (`Record`) | Update the provided setting values | `null` |\n| `Get Settings` | `GET /session/:id/appium/settings` | | Return the current settings | `settings` (`Record`) |\n\nThe `settings` object must be a set of keys and values, where the key is the setting name, and the\nvalue is any documented valid value for that setting.\n\n!!! info\n\n```\nSettings are driver-specific, so refer to your driver's documentation for a list of supported settings\n```\n\n## Initializing Settings via Capabilities\n\nIf you want to start an Appium session with a setting in a non-default state, you can do so by\nincluding a capability of the form `appium:settings[]` with the appropriate value. So to turn\non the `ignoreUnimportantViews` setting mentioned above from the very beginning of a session, you\nwould construct a set of capabilities that includes the following in its JSON representation:\n\n```json\n{\n \"appium:settings[ignoreUnimportantViews]\": true\n}\n```\n\nAlso, since Appium 2.1, there is a possibility to provide multiple settings in a single\n`appium:settings` capability value:\n\n```json\n{\n \"appium:settings\": {\n \"ignoreUnimportantViews\": true,\n \"allowInvisibleElements\": true\n }\n}\n```\n\nOf course, initializing a setting via capabilities doesn't prevent you from changing it later on\nvia the Settings API. To learn more about how to use the Settings API in the context of your\nspecific client library, visit the documentation for that client.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/guides/tls.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: SSL/TLS/SPDY Support\n---\n\nAppium 2.2 introduces the option to start the Appium server with SSL/TLS support.\n\n## Command Line Arguments\n\nIn order to enable secure connections to the server, you need to provide the following command\nline arguments:\n\n```bash\nappium server --ssl-cert-path=/path/to/cert.pem --ssl-key-path=/path/to/key.pem\n```\n\nBoth arguments must be provided and should contain paths to a valid\n[X509 PEM](https://www.ssl.com/guide/pem-der-crt-and-cer-x-509-encodings-and-conversions/)\ncertificate and its corresponding private key.\n\nAfter the server is started use the `https` protocol and a client supporting SSL/TLS or\n[SPDY](https://en.wikipedia.org/wiki/SPDY) to communicate to it.\n\n### Supported Features\n\nOnce a secure server socket is established it supports the following protocols:\n`['h2', 'spdy/3.1', 'spdy/3', 'spdy/2', 'http/1.1', 'http/1.0']`. See\n[the SPDY node module documentation](https://www.npmjs.com/package/spdy) to get more details about\nits features. All insecure client connections will be rejected by the server.\n\n### Self-Signed Certificates\n\nUse the following command in order to generate a self-signed certificate/key pair:\n\n```bash\nopenssl req -nodes -new -x509 -keyout key.pem -out cert.pem -subj \"/C=US/ST=State/L=City/O=company/OU=Com/CN=www.testserver.local\"\n```\n\nFeel free to change the value of `-subj` in the command above with your matching details. The server\nshould work just fine with a self-signed certificate, although you need to take care about a proper\nclient setup, e.g. make sure it does not reject unauthorized certificates.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/intro/appium.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium \u5982\u4f55\u5de5\u4f5c\uff1f\n---\n\n\u6b63\u5982\u4e3b\u9875\u6240\u8ff0\uff0cAppium \u662f\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\u548c\u76f8\u5173\u8f6f\u4ef6\u751f\u6001\u7cfb\u7edf\uff0c\u65e8\u5728\u4fc3\u8fdb\u591a\u79cd\u5e94\u7528\u5e73\u53f0\u7684 UI \u81ea\u52a8\u5316\u3002 \u968f\u7740 Appium 2 \u7684\u53d1\u5e03\uff0cAppium \u5177\u6709\u4ee5\u4e0b\u4e3b\u8981\u76ee\u6807\uff1a[^1]\n\n- \u5728\u8de8\u5e73\u53f0\u6807\u51c6 API \u4e0b\u63d0\u4f9b\u7279\u5b9a\u4e8e\u5e73\u53f0\u7684\u81ea\u52a8\u5316\u529f\u80fd\n- \u5141\u8bb8\u4ece\u4efb\u4f55\u7f16\u7a0b\u8bed\u8a00\u8f7b\u677e\u8bbf\u95ee\u6b64 API\n- \u63d0\u4f9b\u5de5\u5177\u4ee5\u4fbf\u793e\u533a\u65b9\u4fbf\u5730\u5f00\u53d1 Appium \u6269\u5c55\n\n[^1]: \u4e3a\u5b9e\u73b0\u8fd9\u4e9b\u4e3b\u8981\u76ee\u6807\uff0c\u6211\u4eec\u8fd8\u9075\u5faa\u4e00\u5957\u6b21\u8981\u76ee\u6807\u6216\u65b9\u6cd5\u539f\u5219\uff0c\u6211\u4eec\u4e5f\u9f13\u52b1 Appium \u6269\u5c55\u5f00\u53d1\u8005\u9075\u5faa\u8fd9\u4e9b\u539f\u5219\uff1a\n\n - \u5c3d\u53ef\u80fd\u4f9d\u8d56\uff08\u5e76\u8d21\u732e\u4e8e\uff09\u5f00\u6e90\u6280\u672f\n - \u5c3d\u53ef\u80fd\u4f9d\u8d56\u7ed9\u5b9a\u5e73\u53f0\u7684\u4f9b\u5e94\u5546\u63d0\u4f9b\u7684\u5de5\u5177\n - \u5c3d\u53ef\u80fd\u4f9d\u8d56\u4e0d\u4fee\u6539\u5e94\u7528\u5c31\u80fd\u5b9e\u73b0\u81ea\u52a8\u5316\uff08\u6700\u597d\u4e0d\u8981\u8981\u6c42\u7528\u6237\u6784\u5efa\u989d\u5916\u7684 SDK \u6216\u8f6f\u4ef6\uff0c\u4ece\u800c\u5728\u6d4b\u8bd5\u7248\u672c\u548c\u751f\u4ea7\u7248\u672c\u4e4b\u95f4\u5f15\u5165\u5dee\u5f02\uff09\u7684\u81ea\u52a8\u5316\u5de5\u5177\n - \u5c3d\u53ef\u80fd\u4f9d\u8d56\u73b0\u6709\u6807\u51c6\u800c\u4e0d\u662f\u521b\u5efa\u65b0\u6807\u51c6\n\n\u6240\u4ee5\uff0c\u4ee5\u60a8\u4e86\u89e3\u7684\u4efb\u4f55\u5e94\u7528\u5e73\u53f0\u4e3a\u4f8b\uff0c\u5982 iOS \u6216 Android\u3002 Appium \u5e0c\u671b\u5f00\u53d1\u8005\u6d4b\u8bd5\u4eba\u5458\u80fd\u591f\u4e3a\u8be5\u5e73\u53f0\u7f16\u5199 UI \u81ea\u52a8\u5316\u4ee3\u7801\uff0c\u6839\u636e\u5355\u4e00\u7684\u7edf\u4e00 API\u3002 \u6839\u636e Appium \u7684\u76ee\u6807\uff0c\u6211\u4eec\u6709\u5f88\u591a\u95ee\u9898\u9700\u8981\u56de\u7b54\u4ee5\u4f7f\u5176\u5168\u90e8\u5de5\u4f5c\uff1a\n\n- \u201c\u5355\u4e00\u7edf\u4e00\u201d\u7684 API \u5e94\u8be5\u662f\u4ec0\u4e48\uff1f\n- \u6211\u4eec\u5982\u4f55\u5c06\u6b64 API \u6620\u5c04\u5230\u7279\u5b9a\u5e73\u53f0\u7684\u81ea\u52a8\u5316\u884c\u4e3a\uff1f\n- \u6211\u4eec\u5982\u4f55\u4f7f\u6b64 API \u901a\u8fc7\u591a\u79cd\u6d41\u884c\u7f16\u7a0b\u8bed\u8a00\u8bbf\u95ee\uff1f\n\n\u8fd9\u91cc\u8fd8\u6709\u53e6\u4e00\u4e2a\u66f4\u5927\u7684\u95ee\u9898\uff0c\u9274\u4e8e\u9664\u4e86 iOS \u548c Android \u4e4b\u5916\u8fd8\u6709\u66f4\u591a\u5e94\u7528\u5e73\u53f0\uff1a\n\n- \u6211\u4eec\u5982\u4f55\u4e3a_\u6240\u6709_\u5e73\u53f0\u542f\u7528\u81ea\u52a8\u5316\uff1f\n\n\u63a2\u7d22 Appium \u5bf9\u8fd9\u4e9b\u95ee\u9898\u7684\u7b54\u6848\u53ef\u80fd\u4e0d\u662f\u5b66\u4e60 Appium \u662f\u4ec0\u4e48\u7684\u6700\u5feb\u65b9\u5f0f\uff0c\u4f46\u5b83\u80af\u5b9a\u662f\u4e00\u4e2a\u597d\u65b9\u6cd5\uff01 \u6240\u4ee5\u8ba9\u6211\u4eec\u6df1\u5165\u4e86\u89e3\u3002\n\n## Appium \u7684 API \u9009\u62e9\n\nAppium \u975e\u5e38\u5e78\u8fd0\u5730\u7ee7\u627f\u4e86\u4e00\u4e2a\u5728 UI \u81ea\u52a8\u5316\u9886\u57df\u957f\u671f\u9886\u5148\u7684\u6280\u672f\uff0c\u5373 [Selenium](https://selenium.dev)\u3002 Selenium \u9879\u76ee\u7684\u76ee\u6807\u662f\u652f\u6301 Web \u6d4f\u89c8\u5668\u7684 UI \u81ea\u52a8\u5316\uff0c\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u5c06\u5176\u89c6\u4e3a\u5360\u636e Appium \u76ee\u6807\u5b50\u96c6\u7684\u4e00\u90e8\u5206\u3002 \u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0cSelenium\uff08\u4ee5\u53ca\u540e\u6765\u5408\u5e76\u7684\u53e6\u4e00\u4e2a\u540d\u4e3a WebDriver \u7684\u9879\u76ee\uff09\u5f00\u53d1\u4e86\u4e00\u4e2a\u76f8\u5bf9\u7a33\u5b9a\u7684\u6d4f\u89c8\u5668\u81ea\u52a8\u5316 API\u3002\n\n\u591a\u5e74\u6765\uff0cSelenium \u4e0e\u5404\u79cd Web \u6d4f\u89c8\u5668\u4f9b\u5e94\u5546\u548c [W3C](https://w3.org) \u6807\u51c6\u5c0f\u7ec4\u5408\u4f5c\uff0c\u5c06\u5176 API \u8f6c\u53d8\u4e3a\u5b98\u65b9 Web \u6d4f\u89c8\u5668\u6807\u51c6\uff0c\u79f0\u4e3a [WebDriver \u89c4\u8303](https://w3c.github.io/webdriver/)\u3002\n\u6240\u6709\u4e3b\u8981\u6d4f\u89c8\u5668\u73b0\u5728\u90fd\u5b9e\u73b0\u4e86\u7b26\u5408 WebDriver \u89c4\u8303\u7684\u81ea\u52a8\u5316\u529f\u80fd\uff0c\u800c\u65e0\u9700 Selenium \u56e2\u961f\u7ef4\u62a4\u4efb\u4f55\u6267\u884c\u5b9e\u9645\u81ea\u52a8\u5316\u7684\u8f6f\u4ef6\uff1b\u6807\u51c6\u83b7\u80dc\uff01\n\nAppium \u7684\u6700\u521d\u76ee\u6807\u662f\u4e3a\u79fb\u52a8\u5e94\u7528\uff08iOS \u548c Android\uff09\u5f00\u53d1\u81ea\u52a8\u5316\u6807\u51c6\u3002 \u6211\u4eec\u672c\u53ef\u4ee5\u53d1\u660e\u4e00\u4e9b\u65b0\u7684\u4e1c\u897f\uff0c\u4f46\u4e3a\u4e86\u56e2\u7ed3\u529b\u91cf\u5e76\u4fdd\u6301\u6807\u51c6\u7684\u6807\u51c6\u5316\uff0c\u6211\u4eec\u51b3\u5b9a\u91c7\u7528 WebDriver \u89c4\u8303\u4f5c\u4e3a Appium \u7684 API\u3002[^2] \u867d\u7136\u7f51\u7ad9\u548c\u79fb\u52a8\u539f\u751f\u5e94\u7528\u7684\u7528\u6237\u4ea4\u4e92\u5e76\u4e0d\u5b8c\u5168\u76f8\u540c\uff08\u4e00\u65e6\u6211\u4eec\u5f00\u59cb\u8003\u8651\u4f8b\u5982\u7531\u7b80\u5355\u9065\u63a7\u5668\u63a7\u5236\u7684\u7535\u89c6\u5e73\u53f0\uff0c\u5dee\u5f02\u4f1a\u66f4\u5927\uff09\uff0c\u4f46\u4e8b\u5b9e\u662f\u5927\u591a\u6570\u8f6f\u4ef6 UI \u90fd\u975e\u5e38\u76f8\u4f3c\u3002 \u8fd9\u610f\u5473\u7740 WebDriver \u89c4\u8303\u63d0\u4f9b\u4e86\u81ea\u52a8\u5316 API \u539f\u8bed\uff08\u67e5\u627e\u5143\u7d20\u3001\u4e0e\u5143\u7d20\u4ea4\u4e92\u3001\u52a0\u8f7d\u9875\u9762\u6216\u5c4f\u5e55\u7b49\uff09 \u8fd9\u4e9b\u539f\u8bed\u6216\u591a\u6216\u5c11\u6620\u5c04\u5230\u4efb\u4f55\u5e73\u53f0\u3002\n\n[^2]: \u4ece\u6280\u672f\u4e0a\u8bb2\uff0c\u5f53 Appium \u9996\u6b21\u7f16\u5199\u65f6\uff0c\u6211\u4eec\u5904\u7406\u7684\u662f\u6bd4 WebDriver \u89c4\u8303\u66f4\u53e4\u8001\u7684\u4e1c\u897f\uff0c\u79f0\u4e3a JSON Wire Protocol\u3002 \u4ece\u90a3\u65f6\u8d77\uff0cAppium \u7ee7\u7eed\u4e0e W3C \u89c4\u8303\u4e00\u8d77\u6f14\u5316\uff0c\u5e76\u5b8c\u5168\u7b26\u5408 W3C \u89c4\u8303\u3002\n\n\u5f53\u7136\uff0cAppium \u5e0c\u671b\u652f\u6301\u7528\u6237\u4ea4\u4e92\u4ece Web \u5230\u79fb\u52a8\u6216 Web \u5230\u7535\u89c6\u786e\u5b9e\u4e0d\u540c\u7684\u60c5\u51b5\uff0c\u56e0\u6b64 Appium \u8fd8\u5229\u7528 WebDriver \u89c4\u8303\u7684\u5185\u7f6e_\u53ef\u6269\u5c55\u6027_\u3002 \u7ed3\u679c\u662f\uff0c\u65e0\u8bba\u60a8\u60f3\u8981\u81ea\u52a8\u5316\u54ea\u4e2a\u5e73\u53f0\uff0c\u5f53\u60a8\u4f7f\u7528 Appium \u65f6\uff0c\u60a8\u5c06\u4f7f\u7528\u6807\u51c6 WebDriver \u89c4\u8303\uff0c\u4f46\u6709\u4e24\u4e2a\u6ce8\u610f\u4e8b\u9879\uff1a\n\n- \u6211\u4eec\u53ef\u80fd\u65e0\u6cd5\u5728\u7ed9\u5b9a\u5e73\u53f0\u4e0a\u652f\u6301\u7279\u5b9a\u7684 WebDriver API \u547d\u4ee4\uff0c\u56e0\u6b64\u67d0\u4e9b\u547d\u4ee4\u53ef\u80fd\u4e0d\u53d7\u652f\u6301\uff08\u4f8b\u5982\uff0c\u5728\u539f\u751f\u79fb\u52a8\u5e94\u7528\u81ea\u52a8\u5316\u4e16\u754c\u4e2d\uff0c\u83b7\u53d6\u6216\u8bbe\u7f6e cookie \u662f\u4e0d\u53ef\u80fd\u7684\uff09\u3002\n- \u6211\u4eec\u53ef\u80fd\u652f\u6301\u8d85\u51fa WebDriver API \u547d\u4ee4\u5217\u8868\u7684\u81ea\u52a8\u5316\u884c\u4e3a\uff0c\u5c3d\u7ba1\u4efb\u4f55\u6b64\u7c7b\u547d\u4ee4\u5c06\u662f\u6709\u6548\u7684\u3001\u7b26\u5408\u89c4\u8303\u7684 WebDriver API \u6269\u5c55\u3002\n\n\u60a8\u5b9e\u9645\u4e0a\u5982\u4f55_\u4f7f\u7528_ WebDriver API\uff0c\u7279\u522b\u662f Appium \u7684\u80cc\u666f\u4e0b\uff1f \u6211\u4eec\u5c06\u5728\u4e0b\u9762\u7684[\u90e8\u5206](#universal-programming-language-access)\u4e2d\u4ecb\u7ecd Appium \u5982\u4f55\u63d0\u4f9b\u901a\u7528\u7f16\u7a0b\u8bed\u8a00\u8bbf\u95ee\u3002 \u60a8\u73b0\u5728\u53ea\u9700\u8981\u77e5\u9053 Appium \u901a\u8fc7\u5b9e\u73b0 WebDriver \u534f\u8bae\u6765\u5f15\u5165\u901a\u7528 UI \u81ea\u52a8\u5316\u63a5\u53e3\u3002\n\n## \u5e73\u53f0\u81ea\u52a8\u5316\u884c\u4e3a\n\n\u4e0b\u4e00\u4e2a\u95ee\u9898\u662f\uff0cAppium \u5982\u4f55\u5c06\u6b64\u534f\u8bae\u6620\u5c04\u5230\u5e7f\u6cdb\u5e73\u53f0\u7684\u81ea\u52a8\u5316\u884c\u4e3a\uff1f \u4e25\u683c\u6765\u8bf4\uff0cAppium \u6ca1\u6709\uff01 \u5b83\u5c06\u6b64\u8d23\u4efb\u7559\u7ed9\u4e00\u79cd\u79f0\u4e3a Appium _\u9a71\u52a8\u7a0b\u5e8f_ \u7684\u8f6f\u4ef6\u6a21\u5757\u3002 \u60a8\u53ef\u4ee5\u9605\u8bfb\u6574\u4e2a[\u9a71\u52a8\u7a0b\u5e8f](./drivers.md)\u7684\u4ecb\u7ecd\uff0c\u6240\u4ee5\u6211\u4eec\u73b0\u5728\u4e0d\u4f1a\u6df1\u5165\u7ec6\u8282\u3002\n\n\u76ee\u524d\u91cd\u8981\u7684\u662f\u8981\u7406\u89e3\u9a71\u52a8\u7a0b\u5e8f\u6709\u70b9\u50cf Appium \u7684\u53ef\u63d2\u62d4\u6a21\u5757\uff0c\u5b83\u8d4b\u4e88 Appium \u81ea\u52a8\u5316\u7279\u5b9a\u5e73\u53f0\uff08\u6216\u5e73\u53f0\u96c6\uff0c\u53d6\u51b3\u4e8e\u9a71\u52a8\u7a0b\u5e8f\u7684\u76ee\u6807\uff09\u7684\u80fd\u529b\u3002 \u6700\u7ec8\uff0c\u9a71\u52a8\u7a0b\u5e8f\u7684\u8d23\u4efb\u53ea\u662f\u5b9e\u73b0\u4ee3\u8868 WebDriver \u534f\u8bae\u7684 Appium \u5185\u90e8\u63a5\u53e3\u3002 \u5b83\u5982\u4f55\u5b9e\u73b0\u6b64\u63a5\u53e3\u5b8c\u5168\u53d6\u51b3\u4e8e\u9a71\u52a8\u7a0b\u5e8f\uff0c\u57fa\u4e8e\u5176\u5728\u7279\u5b9a\u5e73\u53f0\u4e0a\u5b9e\u73b0\u81ea\u52a8\u5316\u7684\u7b56\u7565\u3002 \u901a\u5e38\uff0c\u5728\u7ec6\u8282\u4e0a\u5177\u6709\u66f4\u591a\u590d\u6742\u6027\u548c\u96be\u5ea6\uff0c\u9a71\u52a8\u7a0b\u5e8f\u901a\u8fc7\u4f9d\u8d56\u7279\u5b9a\u4e8e\u5e73\u53f0\u7684\u81ea\u52a8\u5316\u6280\u672f\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002 \u4f8b\u5982\uff0cApple \u7ef4\u62a4\u4e00\u79cd\u79f0\u4e3a [XCUITest](https://developer.apple.com/documentation/xctest/user_interface_tests) \u7684 iOS \u81ea\u52a8\u5316\u6280\u672f\u3002 \u652f\u6301 iOS \u5e94\u7528\u81ea\u52a8\u5316\u7684 Appium \u9a71\u52a8\u7a0b\u5e8f\u79f0\u4e3a [XCUITest \u9a71\u52a8\u7a0b\u5e8f](https://github.com/appium/appium-xcuitest-driver)\uff0c\u56e0\u4e3a\u5b83\u6700\u7ec8\u6240\u505a\u7684\u662f\u5c06 WebDriver \u534f\u8bae\u8f6c\u6362\u4e3a XCUITest \u5e93\u8c03\u7528\u3002\n\n\u9a71\u52a8\u7a0b\u5e8f\u662f\u72ec\u7acb\u3001\u53ef\u63d2\u62d4\u6a21\u5757\u7684\u539f\u56e0\u4e4b\u4e00\u662f\u5b83\u4eec\u5f7c\u6b64\u5b8c\u5168\u4e0d\u540c\u3002 \u6784\u5efa\u548c\u4f7f\u7528\u4e0d\u540c\u5e73\u53f0\u7684\u9a71\u52a8\u7a0b\u5e8f\u7684\u5de5\u5177\u548c\u8981\u6c42\u5b8c\u5168\u4e0d\u540c\u3002 \u56e0\u6b64\uff0cAppium \u8ba9\u60a8\u53ea\u4f7f\u7528\u60a8\u81ea\u52a8\u5316\u4efb\u52a1\u6240\u9700\u7684\u9a71\u52a8\u7a0b\u5e8f\u3002 \u9009\u62e9\u9a71\u52a8\u7a0b\u5e8f\u5e76\u5b89\u88c5\u5b83\u4eec\u4ee5\u4fbf\u4e0e\u60a8\u7684 Appium \u5b9e\u4f8b\u4e00\u8d77\u4f7f\u7528\u975e\u5e38\u91cd\u8981\uff0c\u4ee5\u81f3\u4e8e Appium \u6709\u81ea\u5df1\u7684 [CLI \u6765\u7ba1\u7406\u9a71\u52a8\u7a0b\u5e8f](../reference/cli/extensions.md)\u3002\n\n\u56e0\u6b64\uff0c\u4e3a\u4e86\u56de\u7b54\u6211\u4eec\u6700\u521d\u7684\u95ee\u9898\uff0cAppium \u4e3a\u7ed9\u5b9a\u5e73\u53f0\u63d0\u4f9b\u81ea\u52a8\u5316\u529f\u80fd\u8bbf\u95ee\u7684\u65b9\u5f0f\u662f Appium \u56e2\u961f\uff08\u6216\u4efb\u4f55\u4eba[^3]\uff09\u4e3a\u8be5\u5e73\u53f0\u7f16\u5199\u4e00\u4e2a_\u9a71\u52a8\u7a0b\u5e8f_\uff0c\u5b9e\u73b0 WebDriver \u534f\u8bae\u7684\u5c3d\u53ef\u80fd\u591a\u6216\u5c11\u7684\u90e8\u5206\u3002 \u7136\u540e\uff0c\u4efb\u4f55\u4f7f\u7528 Appium \u7684\u4eba\u90fd\u53ef\u4ee5\u5b89\u88c5\u9a71\u52a8\u7a0b\u5e8f\u3002\n\n[^3]: \u60a8\u53ef\u4ee5\u6784\u5efa\u548c\u5206\u4eab\u81ea\u5df1\u7684\u9a71\u52a8\u7a0b\u5e8f\uff01 \u67e5\u770b[\u6784\u5efa\u9a71\u52a8\u7a0b\u5e8f](../developing/build-drivers.md)\u4ee5\u4e86\u89e3\u66f4\u591a\u5173\u4e8e\u5982\u4f55\u5728 Node.js \u4e2d\u5f00\u53d1\u53ef\u4e0e Appium \u4e00\u8d77\u4f7f\u7528\u7684\u9a71\u52a8\u7a0b\u5e8f\u7684\u4fe1\u606f\u3002\n\n## \u901a\u7528\u7f16\u7a0b\u8bed\u8a00\u8bbf\u95ee\n\n\u4f46\u4f7f\u7528 Appium \u610f\u5473\u7740\u4ec0\u4e48\uff0c\u6216\u8005\u770b\u8d77\u6765\u50cf\u4ec0\u4e48\uff1f \u7531\u4e8e Appium \u6700\u7ec8\u662f\u4e00\u4e2a Node.js \u7a0b\u5e8f\uff0c\u5b83_\u53ef\u4ee5_\u770b\u8d77\u6765\u50cf\u5c06 Appium \u53ca\u5176\u9a71\u52a8\u7a0b\u5e8f\u4f5c\u4e3a\u5e93\u5bfc\u5165\u5230\u60a8\u81ea\u5df1\u7684 Node.js \u7a0b\u5e8f\u4e2d\u3002 \u4f46\u8fd9\u4e0d\u4f1a\u6ee1\u8db3 Appium \u7684\u76ee\u6807\uff0c\u5373\u4e3a\u4f7f\u7528\u4efb\u4f55\u6d41\u884c\u7f16\u7a0b\u8bed\u8a00\u7684\u4eba\u63d0\u4f9b\u81ea\u52a8\u5316\u529f\u80fd\u3002\n\n\u5e78\u8fd0\u7684\u662f\uff0cAppium \u7ee7\u627f Selenium \u7684\u9057\u4ea7\u610f\u5473\u7740\u6211\u4eec\u4ece\u4e00\u5f00\u59cb\u5c31\u6709\u4e86\u8fd9\u4e2a\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848\u3002 \u60a8\u770b\uff0cWebDriver \u89c4\u8303\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u57fa\u4e8e HTTP \u7684\u534f\u8bae\uff0c\u8fd9\u610f\u5473\u7740\u5b83\u88ab\u8bbe\u8ba1\u4e3a\u901a\u8fc7\u7f51\u7edc\u800c\u4e0d\u662f\u5355\u4e2a\u7a0b\u5e8f\u7684\u5185\u5b58\u4f7f\u7528\u3002\n\n\u8fd9\u79cd\u201c\u5ba2\u6237\u7aef-\u670d\u52a1\u5668\u201d\u67b6\u6784\u7684\u4e3b\u8981\u597d\u5904\u4e4b\u4e00\u662f\uff0c\u5b83\u5141\u8bb8\u81ea\u52a8\u5316\u5b9e\u73b0\u8005\uff08\u6267\u884c\u81ea\u52a8\u5316\u7684\u4e8b\u7269\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u662f\u201c\u670d\u52a1\u5668\u201d\uff09\u4e0e\u81ea\u52a8\u5316\u8fd0\u884c\u8005\uff08\u5b9a\u4e49\u5e94\u8be5\u505a\u4ec0\u4e48\u81ea\u52a8\u5316\u3001\u4ee5\u4ec0\u4e48\u6b65\u9aa4\u7b49\u7684\u4e8b\u7269\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u662f\u201c\u5ba2\u6237\u7aef\u201d\uff09\u5b8c\u5168\u4e0d\u540c\u3002 \u57fa\u672c\u4e0a\uff0c\u6240\u6709\u201c\u56f0\u96be\u7684\u4e1c\u897f\u201d\uff08\u5f04\u6e05\u695a\u5982\u4f55\u5728\u7ed9\u5b9a\u5e73\u53f0\u4e0a\u5b9e\u73b0\u81ea\u52a8\u5316\uff09\u53ef\u4ee5\u5728\u670d\u52a1\u5668\u7684\u4e00\u4e2a\u5730\u65b9\u5904\u7406\uff0c\u201c\u7626\u201d\u5ba2\u6237\u7aef\u5e93\u53ef\u4ee5\u5728\u4efb\u4f55\u7f16\u7a0b\u8bed\u8a00\u4e2d\u7f16\u5199\uff0c\u8fd9\u4e9b\u5e93\u53ea\u9700\u4ee5\u9002\u5408\u8bed\u8a00\u7684\u65b9\u5f0f\u7f16\u7801\u5bf9\u670d\u52a1\u5668\u7684 HTTP \u8bf7\u6c42\u3002 \u6362\u53e5\u8bdd\u8bf4\uff0c\u5047\u8bbe\u5b58\u5728\u9ad8\u7ea7 HTTP \u5e93\uff0c\u53ea\u9700\u5728\u8be5\u8bed\u8a00\u4e2d\u7f16\u5199\u57fa\u672c\u7684 HTTP \u5ba2\u6237\u7aef\uff0c\u5c31\u53ef\u4ee5\u76f8\u5bf9\u5bb9\u6613\u5730\u5c06\u57fa\u672c\u7684 Appium / WebDriver \u529f\u80fd\u5f15\u5165\u65b0\u7684\u7f16\u7a0b\u8bed\u8a00\u3002\n\n\u8fd9\u91cc\u6709\u51e0\u4e2a\u91cd\u8981\u7684\u70b9\u4f9b Appium \u7528\u6237\u4e86\u89e3\uff1a\n\n- Appium \u662f\u4e00\u4e2a_HTTP \u670d\u52a1\u5668_\u3002 \u53ea\u8981\u60a8\u60f3\u4f7f\u7528\u5b83\u8fdb\u884c\u81ea\u52a8\u5316\uff0c\u5b83\u5fc5\u987b\u5728\u67d0\u53f0\u8ba1\u7b97\u673a\u4e0a\u4f5c\u4e3a\u8fdb\u7a0b\u8fd0\u884c\u3002 \u5b83\u5fc5\u987b\u5728\u7f51\u7edc\u4e0a\u53ef\u8bbf\u95ee\uff0c\u4ee5\u65b9\u4fbf\u60a8\u60f3\u8981\u8fd0\u884c\u81ea\u52a8\u5316\u7684\u4efb\u4f55\u8ba1\u7b97\u673a\u8bbf\u95ee\uff08\u65e0\u8bba\u662f\u540c\u4e00\u53f0\u673a\u5668\u8fd8\u662f\u4e16\u754c\u53e6\u4e00\u7aef\u7684\u673a\u5668\uff09\u3002\n- \u9664\u975e\u60a8\u60f3\u7f16\u5199\u539f\u59cb HTTP \u8c03\u7528\u6216\u4f7f\u7528 cURL\uff0c\u5426\u5219\u8bf7\u4f7f\u7528\u60a8\u9009\u62e9\u7684\u8bed\u8a00\u7684 [Appium \u5ba2\u6237\u7aef](clients.md)\u8fdb\u884c\u81ea\u52a8\u5316\u3002 \u6bcf\u4e2a\u5ba2\u6237\u7aef\u7684\u76ee\u6807\u662f\u5c06 WebDriver \u534f\u8bae\u5c01\u88c5\uff0c\u4ee5\u4fbf\u60a8\u4e0d\u5fc5\u62c5\u5fc3\u534f\u8bae\u672c\u8eab\uff0c\u800c\u662f\u53ef\u4ee5\u4f7f\u7528\u611f\u89c9\u9002\u5408\u60a8\u8bed\u8a00\u7684\u5bf9\u8c61\u548c\u65b9\u6cd5\u3002\n- Appium \u670d\u52a1\u5668\u548c Appium \u5ba2\u6237\u7aef_\u4e0d\u9700\u8981_\u5728\u540c\u4e00\u53f0\u8ba1\u7b97\u673a\u4e0a\u8fd0\u884c\u3002 \u60a8\u53ea\u9700\u80fd\u591f\u901a\u8fc7\u67d0\u4e2a\u7f51\u7edc\u4ece\u5ba2\u6237\u7aef\u5411\u670d\u52a1\u5668\u53d1\u9001 HTTP \u8bf7\u6c42\u3002\n \u8fd9\u5927\u5927\u4fc3\u8fdb\u4e86\u4e91\u63d0\u4f9b\u5546\u5bf9 Appium \u7684\u4f7f\u7528\uff0c\u56e0\u4e3a\u4ed6\u4eec\u53ef\u4ee5\u6258\u7ba1 Appium \u670d\u52a1\u5668\u4ee5\u53ca\u4efb\u4f55\u76f8\u5173\u9a71\u52a8\u7a0b\u5e8f\u548c\u8bbe\u5907\uff0c\u60a8\u53ea\u9700\u5c06\u5ba2\u6237\u7aef\u811a\u672c\u6307\u5411\u4ed6\u4eec\u7684\u5b89\u5168\u7aef\u70b9\u3002\n\n\u5f53\u7136\uff0c\u8fd9\u4e00\u5207\u90fd\u4e0d\u662f\u5173\u4e8e\u201c\u6d4b\u8bd5\u201d\u672c\u8eab\uff0c\u53ea\u662f\u51fa\u4e8e\u81ea\u52a8\u5316\u76ee\u7684\u4f7f\u7528 Appium \u53ca\u5176\u5ba2\u6237\u7aef\u5e93\u3002 \u5982\u679c\u60a8\u60f3\u51fa\u4e8e\u201c\u6d4b\u8bd5\u201d\u76ee\u7684\u8fdb\u884c\u81ea\u52a8\u5316\uff0c\u60a8\u53ef\u80fd\u5e0c\u671b\u5229\u7528\u6d4b\u8bd5\u8fd0\u884c\u5668\u3001\u6d4b\u8bd5\u6846\u67b6\u7b49\u7684\u5e2e\u52a9\uff0c\u8fd9\u4e9b\u90fd\u4e0d\u9700\u8981\u4e0e Appium \u76f8\u5173\uff1bAppium\u201c\u901a\u7528\u53ef\u8bbf\u95ee\u6027\u201d\u7684\u597d\u5904\u4e4b\u4e00\u662f\u5b83\u4e0e\u60a8\u53d1\u73b0\u6700\u9002\u5408\u60a8\u60c5\u51b5\u7684\u4efb\u4f55\u5de5\u5177\u96c6\u914d\u5408\u826f\u597d\u3002\n\n## Appium \u7684\u5de8\u5927\u8303\u56f4\n\nAppium \u7684\u613f\u666f\uff08\u5728\u5355\u4e00 API \u4e0b\u81ea\u52a8\u5316\u4e00\u5207\uff09\u662f\u5de8\u5927\u7684\uff01 \u5f53\u7136\uff0c\u6bd4\u5f00\u6e90\u9879\u76ee\u7684\u6838\u5fc3\u7ef4\u62a4\u8005\u56e2\u961f\u5927\u5f97\u591a\u3002 \u90a3\u4e48 Appium \u5982\u4f55\u5e0c\u671b\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\uff1f \u57fa\u672c\u4e0a\uff0c\u901a\u8fc7\u6388\u6743\u793e\u533a\u5728 Appium \u4e4b\u4e0a\u4f5c\u4e3a_\u5e73\u53f0_\u5f00\u53d1\u529f\u80fd\u3002 \u8fd9\u5c31\u662f\u6211\u4eec\u6240\u8c13\u7684 Appium\u201c\u751f\u6001\u7cfb\u7edf\u201d\u3002\n\nAppium \u56e2\u961f\u786e\u5b9e\u81ea\u5df1\u7ef4\u62a4\u4e86\u4e00\u4e9b\u9a71\u52a8\u7a0b\u5e8f\uff08\u4f8b\u5982\uff0c\u6211\u4eec\u4e4b\u524d\u8ba8\u8bba\u7684 XCUITest \u9a71\u52a8\u7a0b\u5e8f\uff09\u3002 \u4f46\u5b83\u65e0\u6cd5\u62e5\u6709\u7279\u5b9a\u4e8e\u5e73\u53f0\u7684\u4e13\u4e1a\u77e5\u8bc6\u6216\u7ef4\u62a4\u8bb8\u591a\u4e0d\u540c\u5e73\u53f0\u7684\u9a71\u52a8\u7a0b\u5e8f\u7684\u80fd\u529b\u3002 \u4f46\u6211\u4eec\u6240\u505a\u7684\uff0c\u7279\u522b\u662f\u4ece Appium 2 \u5f00\u59cb\uff0c\u662f\u63d0\u4f9b\u5de5\u5177\u6765\u6388\u6743\u793e\u533a\u52a0\u5165\u6211\u4eec\u7684\u613f\u666f\uff1a\n\n- \u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u901a\u8fc7\u521b\u5efa\u4e00\u4e2a\u7b26\u5408\u9002\u5f53\u7ea6\u5b9a\u5e76\u5b9e\u73b0 WebDriver \u534f\u8bae\u7684\u4efb\u4f55\uff08\u5b50|\u8d85\uff09\u96c6\u7684 Node.js \u6a21\u5757\u6765\u521b\u5efa\u9a71\u52a8\u7a0b\u5e8f\u3002 \u521b\u5efa\u9a71\u52a8\u7a0b\u5e8f\u901a\u5e38\u6d89\u53ca\u6700\u5c11\u7684\u4ee3\u7801\uff0c\u56e0\u4e3a WebDriver \u534f\u8bae\u7ec6\u8282\u88ab\u62bd\u8c61\u5316\uff0c\u8bb8\u591a\u5e2e\u52a9\u5e93\u53ef\u7528---\u8fd9\u4e9b\u5e93\u4e3a Appium \u56e2\u961f\u81ea\u5df1\u7684\u9a71\u52a8\u7a0b\u5e8f\u63d0\u4f9b\u52a8\u529b\u3002\n- \u4f7f\u7528 Appium \u9a71\u52a8\u7a0b\u5e8f CLI \u4e0e\u4ed6\u4eba\u5206\u4eab\u9a71\u52a8\u7a0b\u5e8f\u5f88\u5bb9\u6613\u3002 \u6ca1\u6709\u4e2d\u592e\u6743\u5a01\u3002\n \u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u516c\u5f00\u6216\u79c1\u4e0b\u5206\u4eab\u9a71\u52a8\u7a0b\u5e8f\uff0c\u514d\u8d39\u6216\u6536\u8d39\u3002 \u9a71\u52a8\u7a0b\u5e8f\u53ef\u4ee5\u662f\u5f00\u6e90\u6216\u95ed\u6e90\u7684\uff08\u5c3d\u7ba1\u6211\u4eec\u6b23\u8d4f\u5f00\u6e90\uff01\uff09\u3002\n\nAppium \u4f5c\u4e3a\u5f00\u53d1\u5e73\u53f0\u7684\u613f\u666f\u8d85\u8d8a\u4e86\u5bf9\u6240\u6709\u5e94\u7528\u5e73\u53f0\u81ea\u52a8\u5316\u652f\u6301\u3002 \u4f5c\u4e3a\u4e00\u4e2a\u6d41\u884c\u7684\u81ea\u52a8\u5316\u5de5\u5177\uff0c\u6709\u8bb8\u591a\u673a\u4f1a\u5c06 Appium \u4e0e\u5404\u79cd\u5176\u4ed6\u5de5\u5177\u548c\u670d\u52a1\u96c6\u6210\u3002 \u6b64\u5916\uff0cAppium \u6709\u8bb8\u591a\u529f\u80fd\u60f3\u6cd5\uff0c\u8981\u4e48\u4f5c\u4e3a\u6838\u5fc3\u670d\u52a1\u5668\uff0c\u8981\u4e48\u5728\u5176\u5404\u79cd\u9a71\u52a8\u7a0b\u5e8f\u4e2d\u7684\u5316\u8eab\uff0c\u6838\u5fc3\u56e2\u961f\u6ca1\u6709\u8db3\u591f\u7684\u65f6\u95f4\u6784\u5efa\u3002 \u56e0\u6b64\uff0cAppium 2 \u53d1\u5e03\u4e86\u4e00\u4e2a\u63d2\u4ef6\u7cfb\u7edf\uff0c\u4f7f\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u6784\u5efa\u548c\u5206\u4eab\u6539\u53d8 Appium \u5de5\u4f5c\u65b9\u5f0f\u7684\u6a21\u5757\uff01\n\n\u5c31\u50cf\u9a71\u52a8\u7a0b\u5e8f\u53ef\u4ee5\u901a\u8fc7 Appium \u9a71\u52a8\u7a0b\u5e8f CLI \u8f7b\u677e\u5206\u4eab\u548c\u6d88\u8d39\u4e00\u6837\uff0c\u63d2\u4ef6\u53ef\u4ee5\u901a\u8fc7[\u63d2\u4ef6 CLI](../reference/cli/extensions.md)\u53d1\u5e03\u548c\u6d88\u8d39\u3002 \u63d2\u4ef6\u53ef\u4ee5\u505a\u5404\u79cd\u4e8b\u60c5\uff0c\u4f8b\u5982\u6dfb\u52a0 Appium \u6839\u636e\u6a21\u677f\u56fe\u50cf\u67e5\u627e\u548c\u4e0e\u5c4f\u5e55\u533a\u57df\u4ea4\u4e92\u7684\u80fd\u529b\uff08\u4f8b\u5982[\u56fe\u50cf\u63d2\u4ef6](https://github.com/appium/appium/tree/master/packages/images-plugin)\uff09\u3002 \u63d2\u4ef6\u51e0\u4e4e\u6ca1\u6709\u9650\u5236\uff0c\u6240\u4ee5\u60a8\u53ef\u80fd\u4e5f\u5bf9\u5b66\u4e60\u5982\u4f55\u5728 Node.js \u4e2d[\u6784\u5efa\u63d2\u4ef6](../developing/build-plugins.md)\u4ee5\u4e0e Appium \u4e00\u8d77\u4f7f\u7528\u611f\u5174\u8da3\u3002\n\n\u6240\u4ee5\u8fd9\u5c31\u662f Appium\uff1a\u4e00\u4e2a\u53ef\u6269\u5c55\u7684\u3001\u6f5c\u5728\u4e00\u5207\u7684 UI \u81ea\u52a8\u5316\u901a\u7528\u63a5\u53e3\uff01 \u7ee7\u7eed\u9605\u8bfb\u4e00\u4e9b\u5177\u4f53\u7684\u4ecb\u7ecd\u6587\u6863\u4ee5\u83b7\u53d6\u66f4\u591a\u7ec6\u8282\uff0c\u6216\u67e5\u770b\u5404\u79cd\u6307\u5357\u4ee5\u6df1\u5165\u4e86\u89e3 Appium \u7684\u4e00\u4e9b\u66f4\u4e00\u822c\u6982\u5ff5\u548c\u529f\u80fd\u3002\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/intro/clients.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Appium \u5ba2\u6237\u7aef\u7b80\u4ecb\n---\n\n\u51fa\u4e8e[\u6982\u8ff0](./appium.md)\u4e2d\u8ba8\u8bba\u7684\u6240\u6709\u539f\u56e0\uff0cAppium \u57fa\u4e8e [W3C WebDriver \u89c4\u8303](https://w3c.github.io/webdriver/)\u3002 \u8fd9\u610f\u5473\u7740 Appium \u5b9e\u73b0\u4e86\u5ba2\u6237\u7aef-\u670d\u52a1\u5668\u67b6\u6784\u3002 \u670d\u52a1\u5668\uff08\u7531 Appium \u672c\u8eab\u4ee5\u53ca\u60a8\u7528\u4e8e\u81ea\u52a8\u5316\u7684\u4efb\u4f55\u9a71\u52a8\u7a0b\u5e8f\u6216\u63d2\u4ef6\u7ec4\u6210\uff09\u8fde\u63a5\u5230\u6d4b\u8bd5\u8bbe\u5907\uff0c\u5e76\u5b9e\u9645\u8d1f\u8d23\u5728\u8fd9\u4e9b\u8bbe\u5907\u4e0a\u5b9e\u73b0\u81ea\u52a8\u5316\u3002 \u5ba2\u6237\u7aef\uff08\u7531_\u60a8_\u9a71\u52a8\uff0cAppium \u6d4b\u8bd5\u4f5c\u8005\uff09\u8d1f\u8d23\u901a\u8fc7\u7f51\u7edc\u5411\u670d\u52a1\u5668\u53d1\u9001\u547d\u4ee4\uff0c\u5e76\u63a5\u6536\u6765\u81ea\u670d\u52a1\u5668\u7684\u54cd\u5e94\u3002 \u8fd9\u4e9b\u54cd\u5e94\u53ef\u7528\u4e8e\u5224\u65ad\u81ea\u52a8\u5316\u547d\u4ee4\u662f\u5426\u6210\u529f\uff0c\u6216\u53ef\u80fd\u5305\u542b\u60a8\u67e5\u8be2\u7684\u5173\u4e8e\u5e94\u7528\u7a0b\u5e8f\u72b6\u6001\u7684\u4fe1\u606f\u3002 \u672c\u6587\u6863\u662f\u5bf9\u5ba2\u6237\u7aef\u65b9\u9762\u7684\u6982\u5ff5\u6027\u4ecb\u7ecd\u3002\n\n!!! info\n\n```\n\u6709\u5173\u670d\u52a1\u5668\u7aef\u7684\u4fe1\u606f\uff08\u5373 Appium \u5982\u4f55\u5b9e\u9645\u63a7\u5236\u8bbe\u5907\uff1f\uff09\uff0c\u8bf7\u67e5\u770b\u6211\u4eec\u7684 [Appium \u9a71\u52a8\u7a0b\u5e8f\u7b80\u4ecb](./drivers.md)\u3002\u8981\u8df3\u8f6c\u5230 Appium \u5ba2\u6237\u7aef\u5e93\u94fe\u63a5\u5217\u8868\uff0c\u8bf7\u67e5\u770b[\u5ba2\u6237\u7aef\u5217\u8868](../ecosystem/clients.md)\u3002\n```\n\n\u6709\u54ea\u4e9b\u81ea\u52a8\u5316\u547d\u4ee4\u53ef\u7528\uff1f \u90a3\u53d6\u51b3\u4e8e\u60a8\u5728\u4efb\u4f55\u7ed9\u5b9a\u4f1a\u8bdd\u4e2d\u4f7f\u7528\u7684\u7279\u5b9a\u9a71\u52a8\u7a0b\u5e8f\u548c\u63d2\u4ef6\u3002 \u4e00\u7ec4\u6807\u51c6\u547d\u4ee4\u53ef\u80fd\u5305\u62ec\u4ee5\u4e0b\u5185\u5bb9\uff1a\n\n- \u67e5\u627e\u5143\u7d20\n- \u70b9\u51fb\u5143\u7d20\n- \u83b7\u53d6\u9875\u9762\u6e90\u4ee3\u7801\n- \u622a\u53d6\u5c4f\u5e55\u622a\u56fe\n\n\u5982\u679c\u60a8\u67e5\u770b WebDriver \u89c4\u8303\u4e2d\u7684\u8fd9\u4e9b\u547d\u4ee4\uff0c\u60a8\u4f1a\u6ce8\u610f\u5230\u5b83\u4eec\u4e0d\u662f\u4ee5\u4efb\u4f55\u7279\u5b9a\u7f16\u7a0b\u8bed\u8a00\u5b9a\u4e49\u7684\u3002 \u5b83\u4eec\u4e0d\u662f Java \u547d\u4ee4\u3001JavaScript \u547d\u4ee4\u6216 Python \u547d\u4ee4\u3002 \u76f8\u53cd\uff0c\u5b83\u4eec\u5f62\u6210\u4e86\u53ef\u4ee5\u901a\u8fc7_\u4efb\u4f55_\u7f16\u7a0b\u8bed\u8a00\u8bbf\u95ee\u7684 HTTP API\uff08 \u5982\u679c\u60a8\u613f\u610f\uff0c\u60a8\u53ef\u4ee5\u53ea\u4f7f\u7528 cURL\uff09\u3002\n\n\u4f8b\u5982\uff0c`\u67e5\u627e\u5143\u7d20`\u547d\u4ee4\u5bf9\u5e94\u4e8e\u53d1\u9001\u5230 HTTP \u7aef\u70b9 `/session/:sessionid/element` \u7684 HTTP `POST` \u8bf7\u6c42\uff08\u5176\u4e2d`:sessionid` \u662f\u670d\u52a1\u5668\u5728\u4e4b\u524d `\u521b\u5efa\u4f1a\u8bdd` \u8c03\u7528\u4e2d\u751f\u6210\u7684\u552f\u4e00\u4f1a\u8bdd ID \u7684\u5360\u4f4d\u7b26\uff09\u3002\n\n\u6b64\u4fe1\u606f\u4e3b\u8981\u5bf9\u5f00\u53d1\u4e0e WebDriver \u89c4\u8303\u4e00\u8d77\u5de5\u4f5c\u7684\u6280\u672f\u7684\u4eba\u6709\u7528\u3002 \u5b83\u5bf9\u8bd5\u56fe\u7f16\u5199 Appium \u6216 Selenium \u6d4b\u8bd5\u7684\u4eba\u4e0d\u662f\u7279\u522b\u6709\u7528\u3002 \u5f53\u60a8\u7f16\u5199 Appium \u6d4b\u8bd5\u65f6\uff0c\u60a8\u5e0c\u671b\u4f7f\u7528\u60a8\u719f\u6089\u7684\u7f16\u7a0b\u8bed\u8a00\u3002 \u5e78\u8fd0\u7684\u662f\uff0c\u5b58\u5728\u4e00\u7ec4 [Appium \u5ba2\u6237\u7aef\u5e93](../ecosystem/clients.md)[^1]\uff0c\u5b83\u4eec\u8d1f\u8d23\u5411 Appium \u670d\u52a1\u5668\u53d1\u8d77HTTP \u7684\u8bf7\u6c42\u3002 \u5b83\u4eec\u4e3a\u7279\u5b9a\u7f16\u7a0b\u8bed\u8a00\u516c\u5f00\u4e86\u4e00\u7ec4\u201c\u539f\u751f\u201d\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5bf9\u6d4b\u8bd5\u4f5c\u8005\u6765\u8bf4\uff0c\u5b83\u5c31\u50cf\u60a8\u5728\u7f16\u5199 Python\u3001JavaScript \u6216 Java\u3002\n\n\u4ee5\u4e0b\u662f\u4f7f\u7528 Appium \u5ba2\u6237\u7aef\u5728\u4e94\u79cd\u4e0d\u540c\u7f16\u7a0b\u8bed\u8a00\u4e2d\u5b9e\u73b0\u76f8\u540c\u7684 Appium \u547d\u4ee4\u96c6\u7684\u793a\u4f8b\uff08\u6ce8\u610f\uff0c\u8fd9\u4e0d\u662f\u5305\u542b\u6240\u6709\u5bfc\u5165\u7684\u5de5\u4f5c\u793a\u4f8b\u4ee3\u7801\uff1b\u8bf7\u53c2\u9605\u6bcf\u4e2a\u5ba2\u6237\u7aef\u5e93\u7684\u8bbe\u7f6e\u548c\u547d\u4ee4\u53c2\u8003\u8bf4\u660e\uff09\uff1a\n\n\\=== \"JavaScript (Webdriver.io)\"\n\n````\n```js\nconst element = await driver.$('//*[@text=\"Foo\"]');\nawait element.click();\nconsole.log(await element.getText())\nconsole.log(await driver.getPageSource())\n```\n````\n\n\\=== \"Java\"\n\n````\n```java\nWebElement element = driver.findElement(By.Xpath(\"//*[@text='Foo']\"))\nelement.click()\nSystem.out.println(element.getText())\nSystem.out.println(driver.getPageSource())\n```\n````\n\n\\=== \"Python\"\n\n````\n```py\nelement = driver.find_element(by=By.XPATH, value='//*[@text=\"Foo\"]')\nelement.click()\nprint(element.text)\nprint(driver.page_source)\n```\n````\n\n\\=== \"Ruby\"\n\n````\n```rb\nelement = driver.find_element :xpath, '//*[@text=\"Foo\"]'\nelement.click\nputs element.text\nputs driver.page_source\n```\n````\n\n\\=== \"C#\"\n\n````\n```dotnet\nAppiumElement element = driver.FindElement(MobileBy.AccessibilityId(\"Views\")); \nelement.click();\nSystem.Console.WriteLine(element.Text);\nSystem.Console.WriteLine(driver.PageSource);\n```\n````\n\n\u5c3d\u7ba1\u8fd9\u4e9b\u811a\u672c\u4f7f\u7528\u4e0d\u540c\u7684\u7f16\u7a0b\u8bed\u8a00,\u4f46\u5b83\u4eec\u5728\u5e95\u5c42\u505a\u7684\u4e8b\u60c5\u662f\u76f8\u540c\u7684:\n\n1. \u8c03\u7528 `Find Element`,\u4f7f\u7528 `using` \u53c2\u6570\u503c\u4e3a `xpath`,\u4ee5\u53ca `value` \u53c2\u6570\u8868\u8fbe\u7528\u4e8e\u67e5\u627e\u5143\u7d20\u7684 XPath \u67e5\u8be2\u3002 (\u5982\u679c\u4f60\u5bf9\u8fd9\u4e9b\u672f\u8bed\u611f\u5230\u56f0\u60d1,\u53ef\u4ee5\u53c2\u8003 Appium \u6216 Selenium \u7684\u5165\u95e8\u4ecb\u7ecd)\n2. \u4f7f\u7528\u5728\u4e0a\u4e00\u6b21\u8c03\u7528\u4e2d\u627e\u5230\u7684\u5143\u7d20 ID \u8c03\u7528 `Click Element`\u3002\n3. \u4f7f\u7528\u540c\u4e00\u5143\u7d20\u7684 ID \u8c03\u7528 `Get Element Text`,\u5e76\u5c06\u5176\u6253\u5370\u5230\u63a7\u5236\u53f0\u3002\n4. \u8c03\u7528 `Get Page Source` \u6765\u68c0\u7d22\u9875\u9762/\u5e94\u7528\u7a0b\u5e8f\u6e90\u4ee3\u7801\u5e76\u5c06\u5176\u6253\u5370\u5230\u63a7\u5236\u53f0\u3002\n\n\u5728\u9009\u62e9\u6216\u4f7f\u7528\u5ba2\u6237\u7aef\u4e4b\u524d\uff0c\u9700\u8981\u8bb0\u4f4f\u7684\u53e6\u4e00\u4ef6\u4e8b\u662f\u6bcf\u4e2a\u5ba2\u6237\u7aef\u90fd\u662f\u72ec\u7acb\u7ef4\u62a4\u7684\u3002 \u4ec5\u4ec5\u56e0\u4e3a\u67d0\u4e2a\u529f\u80fd\u5728\u4e00\u4e2a\u5ba2\u6237\u7aef\u4e2d\u53ef\u7528,\u5e76\u4e0d\u610f\u5473\u7740\u5b83\u5728\u53e6\u4e00\u4e2a\u5ba2\u6237\u7aef\u4e2d\u4e5f\u53ef\u7528(\u5c3d\u7ba1\u6240\u6709\u5ba2\u6237\u7aef\u81f3\u5c11\u652f\u6301\u6807\u51c6\u7684 W3C \u534f\u8bae\u4ee5\u53ca\u4efb\u4f55\u5e38\u89c1\u7684 Appium \u6269\u5c55)\u3002 \u4ec5\u4ec5\u56e0\u4e3a\u4e00\u4e2a\u5ba2\u6237\u7aef\u6709\u4e00\u5957\u5f88\u597d\u7684\u8f85\u52a9\u51fd\u6570\uff0c\u5e76\u4e0d\u610f\u5473\u7740\u53e6\u4e00\u4e2a\u5ba2\u6237\u7aef\u4e5f\u4f1a\u6709\u3002 \u6709\u4e9b\u5ba2\u6237\u7aef\u66f4\u65b0\u975e\u5e38\u9891\u7e41\uff0c\u800c\u5176\u4ed6\u5ba2\u6237\u7aef\u5219\u4e0d\u7136! \u56e0\u6b64,\u5728\u8003\u8651\u9009\u62e9\u4e00\u4e2a\u5e93\u65f6\uff0c\u9996\u8981\u8003\u8651\u7684\u662f\u4f60\u60f3\u4f7f\u7528\u7684\u8bed\u8a00\uff0c\u7b2c\u4e8c\u4e2a\u8003\u8651\u56e0\u7d20\u662f\u8be5\u5e93\u7684\u529f\u80fd\u5b8c\u5584\u7a0b\u5ea6\u548c\u7ef4\u62a4\u60c5\u51b5!\n\n\u8981\u5b66\u4e60\u5982\u4f55\u4f7f\u7528 Appium \u5ba2\u6237\u7aef\uff0c\u8bf7\u8bbf\u95ee\u8be5\u5ba2\u6237\u7aef\u7684\u4e3b\u9875\u4ee5\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\u3002 \u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u7279\u5b9a\u8bed\u8a00\u7684 Appium \u5ba2\u6237\u7aef\u662f\u5728\u8be5\u8bed\u8a00\u7684 _Selenium_ \u5ba2\u6237\u7aef\u4e4b\u4e0a\u6784\u5efa\u7684\uff0c\u56e0\u6b64\u67d0\u4e9b Appium \u5ba2\u6237\u7aef\u53ef\u80fd\u53ea\u8bb0\u5f55 Appium \u5ba2\u6237\u7aef\u5728 Selenium \u5ba2\u6237\u7aef\u57fa\u7840\u4e0a\u6dfb\u52a0\u7684\u529f\u80fd\u3002 \u4e5f\u5c31\u662f\u8bf4\uff0c\u8981\u83b7\u5f97\u5b8c\u6574\u7684\u53c2\u8003\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u8bbf\u95ee Appium \u5ba2\u6237\u7aef\u6587\u6863\u4ee5\u53ca Selenium \u5ba2\u6237\u7aef\u6587\u6863\u3002\n\n\u8fd9\u5c31\u662f\u4f60\u9700\u8981\u4e86\u89e3\u7684\u5173\u4e8e Appium \u5ba2\u6237\u7aef\u7684\u5168\u90e8\u5185\u5bb9\uff01 \u524d\u5f80 [\u5ba2\u6237\u7aef](../ecosystem/clients.md) \u9875\u9762\u67e5\u770b\u5f53\u524d\u7684\u5ba2\u6237\u7aef\u5217\u8868\u3002\n\n[^1]: \u8fd9\u4e9b\u5e93\u4e5f\u88ab\u79f0\u4e3a\"\u5ba2\u6237\u7aef\"\u3001\"\u5ba2\u6237\u7aef\u5e93\"\u6216\"\u5ba2\u6237\u7aef\u7ed1\u5b9a\"\u3002\n \u5b83\u4eec\u7684\u610f\u601d\u90fd\u662f\u4e00\u6837\u7684!\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/intro/drivers.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium \u9a71\u52a8\u7a0b\u5e8f\u4ecb\u7ecd\n---\n\n\u6b63\u5982[\u6982\u89c8](./appium.md)\u6240\u9610\u660e\u7684\u90a3\u6837\uff0c\"\u9a71\u52a8\u7a0b\u5e8f\"\u57fa\u672c\u4e0a\u662f Appium \u5bf9\"\u6211\u4eec\u5982\u4f55\u652f\u6301\u591a\u4e2a\u4e0d\u76f8\u5173\u5e73\u53f0\u7684\u81ea\u52a8\u5316\uff1f\"\u8fd9\u4e00\u95ee\u9898\u7684\u7b54\u6848\u3002 \u5728\u672c\u6587\u6863\u4e2d\uff0c\u6211\u4eec\u5c06\u66f4\u8be6\u7ec6\u5730\u4e86\u89e3\u9a71\u52a8\u7a0b\u5e8f\u7684\u5de5\u4f5c\u539f\u7406\u3002 \u9a71\u52a8\u7a0b\u5e8f\u5de5\u4f5c\u7684\u5177\u4f53\u7ec6\u8282\u5bf9\u4f60\u6765\u8bf4\u53ef\u80fd\u5e76\u4e0d\u90a3\u4e48\u91cd\u8981\uff0c\u9664\u975e\u4f60\u6253\u7b97\u7f16\u5199\u81ea\u5df1\u7684\u9a71\u52a8\u7a0b\u5e8f\u6216\u4e3a\u73b0\u6709\u9a71\u52a8\u7a0b\u5e8f\u505a\u8d21\u732e\uff08\u6211\u4eec\u5e0c\u671b\u4f60\u8fd9\u6837\u505a\uff01\uff09\u3002\n\n\u4e86\u89e3\u66f4\u591a\u9a71\u52a8\u7a0b\u5e8f\u5de5\u4f5c\u539f\u7406\u7684\u4e3b\u8981\u597d\u5904\u662f\uff0c\u4e86\u89e3\u5178\u578b\u7684\u590d\u6742\u6027\u6216\u5178\u578b\u7684\u9a71\u52a8\u7a0b\u5e8f\u67b6\u6784\u5c06\u6709\u52a9\u4e8e\u4f60\u5728\u6d4b\u8bd5\u4e2d\u9047\u5230\u95ee\u9898\u65f6\u8fdb\u884c\u8c03\u8bd5\u3002\n\n## \u63a5\u53e3\u5b9e\u73b0\n\n\u5728\u6700\u57fa\u672c\u7684\u5c42\u9762\u4e0a\uff0c\u9a71\u52a8\u7a0b\u5e8f\u53ea\u662f\u6269\u5c55\u4e86 Appium \u4e2d\u5305\u542b\u7684\u4e00\u4e2a\u7279\u6b8a\u7c7b\u7684 Node.js \u7c7b\uff0c\u8fd9\u4e2a\u7c7b\u53eb\u505a `BaseDriver`\u3002 \u4f60\u53ef\u4ee5\u7528\u4ee5\u4e0b\u975e\u5e38\u7b80\u5355\u7684\u51e0\u884c\u4ee3\u7801\u5c31\u62e5\u6709\u4e00\u4e2a\u975e\u5e38\u63a5\u8fd1\"\u53ef\u5de5\u4f5c\"\u7684\u9a71\u52a8\u7a0b\u5e8f\uff1a\n\n```js\nimport BaseDriver from '@appium/base-driver'\n\nclass MyNewDriver extends BaseDriver {\n}\n```\n\n\u8fd9\u4e2a\u7a7a\u9a71\u52a8\u7a0b\u5e8f\u4e0d\u4f1a_\u505a_\u4efb\u4f55\u4e8b\u60c5\uff0c\u4f46\u4f60\u53ef\u4ee5\u5c06\u5b83\u6253\u5305\u6210\u4e00\u4e2a Node.js \u6a21\u5757\uff0c\u5728\u6a21\u5757\u7684\u6e05\u5355\u6587\u4ef6\uff08`package.json`\uff09\u4e2d\u6dfb\u52a0\u4e00\u4e9b\u4e0e Appium \u76f8\u5173\u7684\u5b57\u6bb5\uff0c\u7136\u540e\u4f7f\u7528 `appium driver install` \u5b89\u88c5\u5b83\u3002\n\n\u56e0\u6b64\uff0c\u4ece\u6280\u672f\u89d2\u5ea6\u6765\u770b\uff0cAppium \u9a71\u52a8\u7a0b\u5e8f\u53ea\u662f\u4e00\u4e9b\u7ee7\u627f\u81ea\u5176\u4ed6 Appium \u4ee3\u7801\u7684\u4ee3\u7801\u3002 \u5c31\u662f\u8fd9\u6837\uff01 \u73b0\u5728\uff0c\u7ee7\u627f\u81ea `BaseDriver` \u5b9e\u9645\u4e0a\u7ed9\u4e86\u6211\u4eec\u5f88\u591a\u4e1c\u897f\uff0c\u56e0\u4e3a `BaseDriver` \u672c\u8d28\u4e0a\u662f\u6574\u4e2a WebDriver \u534f\u8bae\u7684\u5c01\u88c5\u3002 \u6240\u4ee5\u9a71\u52a8\u7a0b\u5e8f\u8981\u505a\u4e00\u4e9b\u6709\u7528\u7684\u4e8b\u60c5\uff0c\u53ea\u9700\u8981_\u5b9e\u73b0_\u540d\u79f0\u4e0e\u5176 WebDriver \u534f\u8bae\u7b49\u6548\u7684 Node.js \u65b9\u6cd5\u3002\n\n\u5047\u8bbe\u6211\u60f3\u7528\u8fd9\u4e2a\u7a7a\u9a71\u52a8\u7a0b\u5e8f\u505a\u70b9\u4ec0\u4e48\uff1b\u9996\u5148\u6211\u5fc5\u987b\u51b3\u5b9a\u8981\u5b9e\u73b0\u54ea\u4e2a WebDriver \u547d\u4ee4\u3002 \u5bf9\u4e8e\u6211\u4eec\u7684\u4f8b\u5b50\uff0c\u8ba9\u6211\u4eec\u9009\u62e9[Navigate To](https://w3c.github.io/webdriver/#navigate-to) WebDriver \u547d\u4ee4\u3002 \u6682\u65f6\u4e0d\u8003\u8651\u5f53\u8fd9\u4e2a\u547d\u4ee4\u6267\u884c\u65f6\u6211\u60f3\u8ba9\u9a71\u52a8\u7a0b\u5e8f_\u505a_\u4ec0\u4e48\u3002 \u8981\u544a\u8bc9 Appium \u9a71\u52a8\u7a0b\u5e8f\u53ef\u4ee5\u5904\u7406\u8fd9\u4e2a\u547d\u4ee4\uff0c\u6211\u4eec\u6240\u8981\u505a\u7684\u5c31\u662f\u5728\u9a71\u52a8\u7a0b\u5e8f\u7c7b\u4e2d\u5b9a\u4e49\u4e00\u4e2a\u50cf\u8fd9\u6837\u7684\u65b9\u6cd5\uff1a[^1]\n\n```js\nasync setUrl(url) {\n // do whatever we want here\n}\n```\n\n[^1]: \u4f60\u53ef\u80fd\u4f1a\u6ce8\u610f\u5230 `setUrl` \u770b\u8d77\u6765\u4e0e `Navigate To` \u5b8c\u5168\u4e0d\u540c\uff0c\u90a3\u4e48\u6211\u4eec\u600e\u4e48\u77e5\u9053\u4f7f\u7528\u5b83\u800c\u4e0d\u662f\u5176\u4ed6\u968f\u673a\u5b57\u7b26\u4e32\u5462\uff1f \u5176\u5b9e\uff0cAppium \u7684 WebDriver \u534f\u8bae\u5230\u65b9\u6cd5\u540d\u7684\u6620\u5c04\u662f\u5728 `@appium/base-driver` \u5305\u4e2d\u7684\u4e00\u4e2a\u7279\u6b8a\u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684\uff0c\u53eb\u505a [routes.js](https://github.com/appium/appium/blob/master/packages/base-driver/lib/protocol/routes.js)\u3002\n \u6240\u4ee5\u5982\u679c\u4f60\u6b63\u5728\u7f16\u5199\u9a71\u52a8\u7a0b\u5e8f\uff0c\u8fd9\u5c31\u662f\u4f60\u8981\u53bb\u627e\u51fa\u8981\u4f7f\u7528\u4ec0\u4e48\u65b9\u6cd5\u540d\u548c\u671f\u671b\u4ec0\u4e48\u53c2\u6570\u7684\u5730\u65b9\u3002 \u6216\u8005\u4f60\u53ef\u4ee5\u67e5\u770b\u4efb\u4f55\u4e3b\u8981 Appium \u9a71\u52a8\u7a0b\u5e8f\u7684\u6e90\u4ee3\u7801\uff01\n\n\u5c31\u662f\u8fd9\u6837\uff01 \u6211\u4eec\u5982\u4f55\u5b9e\u9645\u5b9e\u73b0\u8be5\u547d\u4ee4\u5b8c\u5168\u53d6\u51b3\u4e8e\u6211\u4eec\u81ea\u5df1\uff0c\u5e76\u53d6\u51b3\u4e8e\u6211\u4eec\u60f3\u8981\u652f\u6301\u7684\u5e73\u53f0\u3002 \u4ee5\u4e0b\u662f\u9488\u5bf9\u4e0d\u540c\u5e73\u53f0\u7684\u6b64\u547d\u4ee4\u7684\u4e00\u4e9b\u4e0d\u540c\u793a\u4f8b\u5b9e\u73b0\uff1a\n\n- \u6d4f\u89c8\u5668\uff1a\u6267\u884c\u4e00\u4e9b JavaScript \u6765\u8bbe\u7f6e `window.location.href`\n- iOS \u5e94\u7528\uff1a\u4f7f\u7528\u6df1\u5ea6\u94fe\u63a5\u542f\u52a8\u5e94\u7528\n- Android \u5e94\u7528\uff1a\u4f7f\u7528\u6df1\u5ea6\u94fe\u63a5\u542f\u52a8\u5e94\u7528\n- React \u5e94\u7528\uff1a\u52a0\u8f7d\u7279\u5b9a\u8def\u7531\n- Unity\uff1a\u8f6c\u5230\u6307\u5b9a\u573a\u666f\n\n\u56e0\u6b64\uff0c\u4f60\u53ef\u4ee5\u770b\u5230\uff0c\u4e0d\u540c\u5e73\u53f0\u4e0a\u9a71\u52a8\u7a0b\u5e8f\u5b9e\u73b0\u76f8\u540c WebDriver \u547d\u4ee4\u7684\u65b9\u5f0f\u53ef\u80fd\u5b58\u5728\u5f88\u5927\u5dee\u5f02\u3002[^2] \u7136\u800c\uff0c_\u76f8\u540c_\u7684\u662f\u5b83\u4eec\u8868\u8fbe\u53ef\u4ee5\u5904\u7406\u534f\u8bae\u547d\u4ee4\u7684\u65b9\u5f0f\u3002\n\n[^2]: \u5f53\u7136\uff0c\u6211\u4eec\u5e0c\u671b\u4fdd\u6301\u8bed\u4e49\u5c3d\u53ef\u80fd\u76f8\u4f3c\uff0c\u4f46\u5728 iOS \u7684\u4e16\u754c\u91cc\uff0c\u4f8b\u5982\uff0c\u901a\u8fc7\u6df1\u5ea6\u94fe\u63a5\uff08\u5177\u6709\u7279\u6b8a\u5e94\u7528\u7279\u5b9a\u65b9\u6848\u7684 URL\uff09\u542f\u52a8\u5e94\u7528\u662f\u6211\u4eec\u6700\u63a5\u8fd1\u5bfc\u822a\u5230 Web URL \u7684\u65b9\u5f0f\u3002\n\n\u6211\u4eec\u4e4b\u6240\u4ee5\u5982\u6b64\u8be6\u7ec6\u5730\u8ba8\u8bba\uff08\u987a\u4fbf\u8bf4\u4e00\u4e0b\uff0c\u4f60\u4e0d\u9700\u8981\u8bb0\u4f4f\u8fd9\u4e9b\uff09\uff0c\u662f\u56e0\u4e3a\u91cd\u8981\u7684\u662f\u8981\u5f3a\u8c03\u4e00\u70b9\uff0cAppium \u9a71\u52a8\u7a0b\u5e8f\u672c\u8d28\u4e0a\u4e0d\u662f\u4efb\u4f55\u7279\u5b9a\u7684\u4e1c\u897f\uff0c\u53ea\u662f\u4e00\u4e9b\u53ef\u4ee5\u5904\u7406 WebDriver \u534f\u8bae\u547d\u4ee4\u7684 JS \u4ee3\u7801\u3002 \u4ece\u90a3\u91cc\u53bb\u54ea\u91cc\u53d6\u51b3\u4e8e\u4f60\uff0c\u9a71\u52a8\u7a0b\u5e8f\u4f5c\u8005\uff01\n\n## \u81ea\u52a8\u5316\u6620\u5c04\n\n\u4f46_\u901a\u5e38_\u9a71\u52a8\u7a0b\u5e8f\u4f5c\u8005\u60f3\u8981\u505a\u7684\u662f\u4e3a\u7ed9\u5b9a\u7684\u5e73\u53f0\u63d0\u4f9b\u81ea\u52a8\u5316\u884c\u4e3a\uff0c\u8fd9\u4e9b\u884c\u4e3a\u5728\u8bed\u4e49\u4e0a\u4e0e\u6d4f\u89c8\u5668\u7684 WebDriver \u89c4\u8303\u5b9e\u73b0\u975e\u5e38\u76f8\u4f3c\u3002 \u5f53\u4f60\u60f3\u67e5\u627e\u4e00\u4e2a\u5143\u7d20\u65f6\uff0c\u4f60\u5e94\u8be5\u5f97\u5230\u4e00\u4e2a UI \u5143\u7d20\u7684\u5f15\u7528\u3002 \u5f53\u4f60\u60f3\u70b9\u51fb\u6216\u8f7b\u89e6\u8be5\u5143\u7d20\u65f6\uff0c\u4ea7\u751f\u7684\u884c\u4e3a\u5e94\u8be5\u4e0e\u4eba\u70b9\u51fb\u6216\u8f7b\u89e6\u8be5\u5143\u7d20\u76f8\u540c\u3002 \u7b49\u7b49\u3002\n\n\u56e0\u6b64\uff0c\u9a71\u52a8\u7a0b\u5e8f\u4f5c\u8005\u9762\u4e34\u7684\u771f\u6b63\u6311\u6218\u4e0d\u662f\u5982\u4f55\u4f7f\u7528 WebDriver \u534f\u8bae\uff08\u56e0\u4e3a `BaseDriver` \u4e3a\u4f60\u5c01\u88c5\u4e86\u6240\u6709\u8fd9\u4e9b\uff09\uff0c\u800c\u662f\u5982\u4f55\u5728\u76ee\u6807\u5e73\u53f0\u4e0a\u5b9e\u73b0\u5b9e\u9645\u7684\u81ea\u52a8\u5316\u3002 \u6bcf\u4e2a\u9a71\u52a8\u7a0b\u5e8f\u90fd\u4f9d\u8d56\u4e8e\u81ea\u5df1\u7684\u4e00\u5957\u5e95\u5c42\u6280\u672f\u3002 \u6b63\u5982[\u6982\u89c8](index.md)\u4e2d\u63d0\u5230\u7684\uff0ciOS \u9a71\u52a8\u7a0b\u5e8f\u4f7f\u7528 Apple \u7684\u4e00\u9879\u540d\u4e3a [XCUITest](https://developer.apple.com/documentation/xctest/xcuielement) \u7684\u6280\u672f\u3002 \u8fd9\u4e9b\u5e95\u5c42\u81ea\u52a8\u5316\u6280\u672f\u901a\u5e38\u90fd\u6709\u81ea\u5df1\u4e13\u6709\u6216\u7279\u6b8a\u7684 API\u3002 \u7f16\u5199\u9a71\u52a8\u7a0b\u5e8f\u5c31\u662f\u5c06 WebDriver \u534f\u8bae\u6620\u5c04\u5230\u8fd9\u4e2a\u5e95\u5c42 API \u7684\u4efb\u52a1\uff08\u6709\u65f6\u662f\u4e00\u7ec4\u4e0d\u540c\u7684\u5e95\u5c42 API\u2014\u2014\u4f8b\u5982\uff0cUiAutomator2 \u9a71\u52a8\u7a0b\u5e8f\u4e0d\u4ec5\u4f9d\u8d56\u4e8e Google \u7684 [UiAutomator2](https://developer.android.com/training/testing/other-components/ui-automator) \u6280\u672f\uff0c\u8fd8\u4f9d\u8d56\u4e8e\u53ea\u80fd\u901a\u8fc7 [ADB](https://developer.android.com/tools/adb) \u83b7\u5f97\u7684\u529f\u80fd\uff0c\u4ee5\u53ca\u53ea\u80fd\u901a\u8fc7\u8f85\u52a9\u5e94\u7528\u5185\u7684 Android SDK \u83b7\u5f97\u7684\u529f\u80fd\uff09\u3002 \u5c06\u6240\u6709\u8fd9\u4e9b\u6574\u5408\u5230\u4e00\u4e2a\u5355\u4e00\u3001\u53ef\u7528\u7684 WebDriver \u63a5\u53e3\u4e2d\uff0c\u662f\u9a71\u52a8\u7a0b\u5e8f\u5f00\u53d1\u8fd9\u9879\u975e\u5e38\u6709\u7528\uff08\u4f46\u6781\u5177\u6311\u6218\u6027\uff09\u7684\u827a\u672f\uff01\n\n## \u591a\u5c42\u67b6\u6784\n\n\u5728\u5b9e\u8df5\u4e2d\uff0c\u8fd9\u901a\u5e38\u4f1a\u5bfc\u81f4\u76f8\u5f53\u590d\u6742\u7684\u67b6\u6784\u3002 \u8ba9\u6211\u4eec\u518d\u6b21\u4ee5 iOS \u4e3a\u4f8b\u3002\nXCUITest \u6846\u67b6\uff08Appium \u9a71\u52a8\u7a0b\u5e8f\u4f7f\u7528\u7684\u6846\u67b6\uff09\u671f\u671b\u8c03\u7528\u5b83\u7684\u4ee3\u7801\u7528 Objective-C \u6216 Swift \u7f16\u5199\u3002 \u6b64\u5916\uff0cXCUITest \u4ee3\u7801\u53ea\u80fd\u5728\u7531 Xcode\uff08\u4ee5\u53ca\u76f4\u63a5\u6216\u95f4\u63a5\u7684 Xcode \u547d\u4ee4\u884c\u5de5\u5177\uff09\u89e6\u53d1\u7684\u7279\u6b8a\u6a21\u5f0f\u4e0b\u8fd0\u884c\u3002 \u6362\u53e5\u8bdd\u8bf4\uff0c\u6ca1\u6709\u76f4\u63a5\u7684\u65b9\u6cd5\u4ece Node.js \u51fd\u6570\u5b9e\u73b0\uff08\u5982\u4e0a\u9762\u7684 `setUrl()`\uff09\u5230 XCUITest API \u8c03\u7528\u3002\n\nXCUITest \u9a71\u52a8\u7a0b\u5e8f\u4f5c\u8005\u6240\u505a\u7684\u662f\u5c06\u9a71\u52a8\u7a0b\u5e8f\u5206\u6210\u4e24\u90e8\u5206\uff1a\u4e00\u90e8\u5206\u7528 Node.js \u7f16\u5199\uff08\u8fd9\u90e8\u5206\u88ab\u6574\u5408\u5230 Appium \u4e2d\u5e76\u6700\u521d\u5904\u7406 WebDriver \u547d\u4ee4\uff09\uff0c\u53e6\u4e00\u90e8\u5206\u7528 Objective-C \u7f16\u5199\uff08\u8fd9\u90e8\u5206\u5b9e\u9645\u5728 iOS \u8bbe\u5907\u4e0a\u8fd0\u884c\u5e76\u8fdb\u884c XCUITest API \u8c03\u7528\uff09\u3002 \u8fd9\u4f7f\u5f97\u4e0e XCUITest \u7684\u63a5\u53e3\u6210\u4e3a\u53ef\u80fd\uff0c\u4f46\u5f15\u5165\u4e86\u4e24\u90e8\u5206\u4e4b\u95f4\u534f\u8c03\u7684\u65b0\u95ee\u9898\u3002\n\n\u9a71\u52a8\u7a0b\u5e8f\u4f5c\u8005\u672c\u53ef\u4ee5\u9009\u62e9\u8bb8\u591a\u975e\u5e38\u4e0d\u540c\u7684\u7b56\u7565\u6765\u5efa\u6a21 Node.js \u7aef\u548c Objective-C \u7aef\u4e4b\u95f4\u7684\u901a\u4fe1\uff0c\u4f46\u6700\u7ec8\u51b3\u5b9a\u4f7f\u7528\u2026\u2026\nWebDriver \u534f\u8bae\uff01 \u6ca1\u9519\uff0cXCUITest \u9a71\u52a8\u7a0b\u5e8f\u7684 Objective-C \u7aef\u672c\u8eab\u5c31\u662f\u4e00\u4e2a WebDriver \u5b9e\u73b0\uff0c\u79f0\u4e3a [WebDriverAgent](https://github.com/appium/webdriveragent)\u3002[^3]\n\n[^3]: \u56e0\u6b64\uff0c\u7406\u8bba\u4e0a\u4f60\u53ef\u4ee5\u5c06\u4f60\u7684 WebDriver \u5ba2\u6237\u7aef\u76f4\u63a5\u6307\u5411 WebDriverAgent \u5e76\u5b8c\u5168\u7ed5\u8fc7 Appium\u3002 \u7136\u800c\uff0c\u8fd9\u901a\u5e38\u4e0d\u65b9\u4fbf\uff0c\u539f\u56e0\u5982\u4e0b\uff1a\n\n- Appium XCUITest \u9a71\u52a8\u7a0b\u5e8f\u4f1a\u4e3a\u4f60\u6784\u5efa\u548c\u7ba1\u7406 WebDriverAgent\uff0c\u8fd9\u53ef\u80fd\u5f88\u9ebb\u70e6\u5e76\u6d89\u53ca\u4f7f\u7528 Xcode\u3002\n- XCUITest \u9a71\u52a8\u7a0b\u5e8f\u505a\u7684\u4e8b\u60c5\u8fdc\u4e0d\u6b62 WebDriverAgent \u6240\u80fd\u505a\u7684\uff0c\u4f8b\u5982\u4f7f\u7528\u6a21\u62df\u5668\u6216\u8bbe\u5907\u3001\u5b89\u88c5\u5e94\u7528\u7b49\u3002\n\n\u8fd9\u4e2a\u6545\u4e8b\u7684\u5bd3\u610f\u662f\uff0c\u7531\u4e8e\u6211\u4eec\u8bd5\u56fe\u89e3\u51b3\u7684\u95ee\u9898\u7684\u6027\u8d28\uff0c\u9a71\u52a8\u7a0b\u5e8f\u67b6\u6784\u53ef\u80fd\u4f1a\u53d8\u5f97\u76f8\u5f53\u590d\u6742\u548c\u591a\u5c42\u3002 \u8fd9\u4e5f\u610f\u5473\u7740\uff0c\u5982\u679c\u4f60\u5728\u7279\u5b9a\u6d4b\u8bd5\u4e2d\u9047\u5230\u95ee\u9898\uff0c\u6709\u65f6\u5f88\u96be\u5224\u65ad\u8fd9\u4e00\u7cfb\u5217\u6280\u672f\u4e2d\u7684\u54ea\u4e2a\u73af\u8282\u51fa\u4e86\u95ee\u9898\u3002 \u518d\u4ee5 XCUITest \u4e3a\u4f8b\uff0c\u6211\u4eec\u540c\u65f6\u4f7f\u7528\u4ee5\u4e0b\u4e00\u7ec4\u6280\u672f\uff1a\n\n- \u4f60\u7684\u6d4b\u8bd5\u4ee3\u7801\uff08\u4f7f\u7528\u5176\u7f16\u7a0b\u8bed\u8a00\uff09- \u7531\u4f60\u62e5\u6709\n- Appium \u5ba2\u6237\u7aef\u5e93 - \u7531 Appium \u62e5\u6709\n- Selenium \u5ba2\u6237\u7aef\u5e93 - \u7531 Selenium \u62e5\u6709\n- \u7f51\u7edc\uff08\u672c\u5730\u6216\u4e92\u8054\u7f51\uff09\n- Appium \u670d\u52a1\u5668 - \u7531 Appium \u62e5\u6709\n- Appium XCUITest \u9a71\u52a8\u7a0b\u5e8f - \u7531 Appium \u62e5\u6709\n- WebDriverAgent - \u7531 Appium \u62e5\u6709\n- Xcode - \u7531 Apple \u62e5\u6709\n- XCUITest - \u7531 Apple \u62e5\u6709\n- iOS \u672c\u8eab - \u7531 Apple \u62e5\u6709\n- macOS\uff08\u8fd0\u884c Xcode \u548c iOS \u6a21\u62df\u5668\u7684\u5730\u65b9\uff09- \u7531 Apple \u62e5\u6709\n\n\u8fd9\u662f\u4e00\u4e2a\u76f8\u5f53\u6df1\u7684\u6280\u672f\u6808\uff01\n\n## \u4ee3\u7406\u6a21\u5f0f\n\n\u8fd8\u6709\u4e00\u4e2a\u5173\u4e8e\u9a71\u52a8\u7a0b\u5e8f\u7684\u91cd\u8981\u67b6\u6784\u65b9\u9762\u9700\u8981\u4e86\u89e3\u3002 \u53ef\u4ee5\u518d\u6b21\u7528 XCUITest \u9a71\u52a8\u7a0b\u5e8f\u6765\u4e3e\u4f8b\u8bf4\u660e\u3002 \u56de\u60f3\u4e00\u4e0b\u6211\u4eec\u521a\u624d\u8ba8\u8bba\u7684 XCUITest \u9a71\u52a8\u7a0b\u5e8f\u7684\u4e24\u4e2a\"\u90e8\u5206\"\u662f\u5982\u4f55\u90fd\u4f7f\u7528 WebDriver \u534f\u8bae\u7684\u2014\u2014Node.js \u90e8\u5206\u76f4\u63a5\u8fde\u63a5\u5230 Appium \u7684 WebDriver \u670d\u52a1\u5668\uff0c\u800c Objective-C \u90e8\u5206\uff08WebDriverAgent\uff09\u672c\u8eab\u5c31\u662f\u4e00\u4e2a WebDriver \u5b9e\u73b0\u3002\n\n\u8fd9\u4e3a Appium \u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u8d70\u6377\u5f84\u5f00\u8f9f\u4e86\u53ef\u80fd\u6027\u3002\n\u8ba9\u6211\u4eec\u60f3\u8c61\u4e00\u4e0b XCUITest \u9a71\u52a8\u7a0b\u5e8f\u9700\u8981\u5b9e\u73b0 `Click Element` \u547d\u4ee4\u3002 \u8fd9\u4e2a\u5b9e\u73b0\u7684\u5185\u90e8\u4ee3\u7801\u770b\u8d77\u6765\u5c31\u50cf\u662f\u83b7\u53d6\u9002\u5f53\u7684\u53c2\u6570\u5e76\u6784\u9020\u4e00\u4e2a\u5230 WebDriverAgent \u670d\u52a1\u5668\u7684 HTTP \u8bf7\u6c42\u3002 \u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u57fa\u672c\u4e0a\u53ea\u662f\u5728\u91cd\u5efa\u5ba2\u6237\u7aef\u5bf9 Appium \u670d\u52a1\u5668\u7684\u539f\u59cb\u8c03\u7528\uff01[^4] \u6240\u4ee5\u5b9e\u9645\u4e0a\u6ca1\u6709\u5fc5\u8981\u7f16\u5199\u4e00\u4e2a\u51fd\u6570\u6765\u5b9e\u73b0 `Click Element` \u547d\u4ee4\u3002 \u76f8\u53cd\uff0cXCUITest \u9a71\u52a8\u7a0b\u5e8f\u53ef\u4ee5\u8ba9 Appium \u77e5\u9053\u8fd9\u4e2a\u547d\u4ee4\u5e94\u8be5\u76f4\u63a5\u4ee3\u7406\u5230\u5176\u4ed6 WebDriver \u670d\u52a1\u5668\u3002\n\n[^4]: \u8fd9\u4e0d\u662f_\u5b8c\u5168_\u76f8\u540c\u7684\u8c03\u7528\uff0c\u56e0\u4e3a Appium \u670d\u52a1\u5668\u548c WebDriverAgent \u670d\u52a1\u5668\u4f1a\u751f\u6210\u4e0d\u540c\u7684\u4f1a\u8bdd ID\uff0c\u4f46\u8fd9\u4e9b\u5dee\u5f02\u4f1a\u88ab\u900f\u660e\u5730\u5904\u7406\u3002\n\n\u5982\u679c\u4f60\u4e0d\u719f\u6089\"\u4ee3\u7406\"\u7684\u6982\u5ff5\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5b83\u53ea\u662f\u610f\u5473\u7740 XCUITest \u9a71\u52a8\u7a0b\u5e8f\u6839\u672c\u4e0d\u4f1a\u53c2\u4e0e\u5904\u7406\u8be5\u547d\u4ee4\u3002 \u76f8\u53cd\uff0c\u5b83\u53ea\u4f1a\u5728\u534f\u8bae\u7ea7\u522b\u88ab\u91cd\u65b0\u6253\u5305\u5e76\u8f6c\u53d1\u5230 WebDriverAgent\uff0cWebDriverAgent \u7684\u54cd\u5e94\u540c\u6837\u4f1a\u76f4\u63a5\u4f20\u56de\u5ba2\u6237\u7aef\uff0c\u800c\u4e0d\u4f1a\u6709\u4efb\u4f55 XCUITest \u9a71\u52a8\u7a0b\u5e8f\u4ee3\u7801\u770b\u5230\u6216\u4fee\u6539\u5b83\u3002\n\n\u8fd9\u79cd\u67b6\u6784\u6a21\u5f0f\u4e3a\u9009\u62e9\u5728\u5404\u5904\u4f7f\u7528 WebDriver \u534f\u8bae\u800c\u4e0d\u662f\u6784\u5efa\u5b9a\u5236\u534f\u8bae\u7684\u9a71\u52a8\u7a0b\u5e8f\u4f5c\u8005\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5f88\u597d\u7684\u989d\u5916\u597d\u5904\u3002 \u8fd9\u4e5f\u610f\u5473\u7740 Appium \u53ef\u4ee5\u975e\u5e38\u8f7b\u677e\u5730\u4e3a\u4efb\u4f55\u5176\u4ed6\u73b0\u6709\u7684 WebDriver \u5b9e\u73b0\u521b\u5efa\u5305\u88c5\u9a71\u52a8\u7a0b\u5e8f\u3002 \u4f8b\u5982\uff0c\u5982\u679c\u4f60\u67e5\u770b [Appium Safari \u9a71\u52a8\u7a0b\u5e8f](https://github.com/appium/appium-safari-driver)\u4ee3\u7801\uff0c\u4f60\u4f1a\u53d1\u73b0\u5b83\u57fa\u672c\u4e0a\u6ca1\u6709\u5b9e\u73b0\u4efb\u4f55\u6807\u51c6\u547d\u4ee4\uff0c\u56e0\u4e3a\u6240\u6709\u8fd9\u4e9b\u547d\u4ee4\u90fd\u76f4\u63a5\u4ee3\u7406\u5230\u5e95\u5c42\u7684 SafariDriver \u8fdb\u7a0b\u3002\n\n\u4e86\u89e3\u8fd9\u79cd\u4ee3\u7406\u673a\u5236\u6709\u65f6\u5728\u5e55\u540e\u53d1\u751f\u662f\u5f88\u91cd\u8981\u7684\uff0c\u56e0\u4e3a\u5982\u679c\u4f60\u66fe\u7ecf\u6df1\u5165\u7814\u7a76\u4e00\u4e9b\u5f00\u6e90\u9a71\u52a8\u7a0b\u5e8f\u4ee3\u7801\u8bd5\u56fe\u627e\u51fa\u547d\u4ee4\u7684\u5b9e\u73b0\u4f4d\u7f6e\uff0c\u4f60\u53ef\u80fd\u4f1a\u60ca\u8bb6\u5730\u53d1\u73b0 Node.js \u9a71\u52a8\u7a0b\u5e8f\u4ee3\u7801\u672c\u8eab\u6839\u672c\u6ca1\u6709\u4efb\u4f55\u5b9e\u73b0\uff01 \u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u4f60\u9700\u8981\u627e\u51fa\u547d\u4ee4\u88ab\u4ee3\u7406\u5230\u54ea\u91cc\uff0c\u4ee5\u4fbf\u4f60\u53ef\u4ee5\u5728\u90a3\u91cc\u67e5\u627e\u76f8\u5e94\u7684\u5b9e\u73b0\u3002\n\n\u597d\u4e86\uff0c\u5bf9\u4e8e\u8fd9\u4e2a\u975e\u5e38\u8be6\u7ec6\u7684\u9a71\u52a8\u7a0b\u5e8f\u4ecb\u7ecd\u6765\u8bf4\uff0c\u8fd9\u5c31\u8db3\u591f\u4e86\uff01\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/intro/history.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Project History\n---\n\nAppium has been around in one form or another since 2012. It's been under the\ndirection of various individuals and organizations, and it's even been\nimplemented in 3 different programming languages! Welcome to more than you ever\nwanted to know about how Appium got to be what is it today...\n\n## Early Inspiration\n\n[Dan Cuellar](https://twitter.com/thedancuellar) was the Test Manager at Zoosk\nin 2011, when he encountered a problem. The length of the test passes on the\niOS product was getting out of hand. Less testing was an option, but would come\nwith additional risk, especially with it taking several days to get patches\nthrough the iOS App Store Review process. He thought back to his days working\non websites and realized automation was the answer.\n\nDan surveyed the existing landscape of tools, only to find that all of them\nhand major drawbacks. The tool supplied by Apple, UIAutomation, required tests\nto be written in JavaScript, and did not allow for real-time debugging or\ninterpretation. It also had to be executed inside the Xcode profiling tool,\nInstruments. Other 3rd-party tools used private APIs and required SDKs and HTTP\nServers to be embedded into the application. This seemed highly undesirable.\n\nUnsatisfied with the existing options, Dan asked his manager for some\nadditional time to see if he could find a better way. He spent 2 weeks poking\nand prodding around to see if there was a way to use approved Apple\ntechnologies to automate an iOS application. The first implementation he tried\nused AppleScript to send messages to Mac UI elements using the OS\nX accessibility APIs. This worked to some degree, but would never work on real\ndevices, not to mention other drawbacks.\n\nSo he thought, what if I could get the UIAutomation framework to run in real\ntime like an interpreter? He looked into it and he determined that all he would\nneed to do is find a way to receive, execute, and reply to commands from within\na UIAutomation javascript program. Using the utility Apple provided for\nexecuting shell commands he was able to `cat` sequentially ordered text files\nto receive commands, `eval()` the output to execute them, and write them back\nto disk with `python`. He then prepared code in C# that implemented the\nSelenium-style syntax to write the sequentially ordered javascript commands.\niOSAuto is born.\n\n## Selenium Conference 2012\n\nDan was selected to speak at Selenium Conference 2012 in London about an\nentirely different topic. As part of his presentation, he showed off iOS\nAutomation using Selenium syntax to demonstrate writing platform-agnostic tests\nthat use separate platform-specific page objects with a common interface. To\nhis surprise, the cool test architecture would take a backseat to the spectacle\nof iOS tests running like WebDriver tests. Several people suggested that he\ngive a lightning talk later in the conference to explain exactly how it worked.\n\nOn the second day of the conference, Dan stepped up on stage to give the\nlightning talk. Jason Huggins, co-creator of Selenium, moderated the lightning\ntalks. Dan experienced technical difficulties getting his presentation to\nload, and Jason nearly had to move on to the next lightning talk. At the last\nmoment, the screen turned on and Dan jumped into his presentation. He explained\nthe details of his implementation and how it worked, begged for contributors,\nand in five minutes it was over. The crowd applauded politely, and he left the\nstage.\n\n## The Phone Rings\n\nFour months after the Selenium Conference, Jason called Dan. Jason had been\nworking on iOS testing support for a client at Sauce Labs. Jason remembered\nDan's lightning talk and thought the project might be useful to Jason's work,\nbut Dan's source code was not public. Jason asked Dan to meet up. Later that\nweek, Dan met Jason in a bar in San Francisco and showed him the source code\nfor iOS Auto.\n\nA long-time open source advocate, Jason encouraged Dan to release his code\nunder an open source license. In August, Dan released the source\ncode\non GitHub in C#. Jason encouraged Dan to change the language to make the\nproject more appealing to potential contributors. Dan uploaded a new version\nin\nPython.\nIn September, Jason added a web server and began to implement the WebDriver\nwire\nprotocol\nover HTTP, making iOS Auto scriptable from any Selenium WebDriver client\nlibrary in any language.\n\n## The Mobile Testing Summit\n\nJason decided that the project should be presented at the Mobile Testing\nSummit in November, but suggested that the\nproject get a new name first. Many ideas were thrown out and they settled on\nAppleCart. A day later, while he was perusing some of Apple's guidance on\ncopyright and trademarks, Jason noticed that under the section of examples for\nnames Apple would defend its trademarks against, the first example was\n\"AppleCart\". He called Dan and informed him of the situation, and they\nbrainstormed for a bit before Jason hit the jackpot. Appium... Selenium for\nApps.\n\n## Sauce Labs and Node.js\n\nIn January 2013, not long after the Mobile Testing Summit, Sauce Labs decided\nto fully back Appium and provide more developer power. A task force was created\nto evaluate the current state and how best to move forward with the project.\nThe team, which included Jonathan Lipps (the current project lead), decided\nthat Appium needed a rebirth, and ultimately settled on Node.js as the\nframework to use. Node is well-known as a fast and efficient web server\nbackend, and at the end of the day, Appium is just a highly-specialized web\nserver. It was also decided that JavaScript as a language was accessible enough\nthat Appium would be able to grow into a larger community of open-source\ndevelopers with JavaScript than the other options on the table.\n\nIn just a few days, the team leveraged the existing work on Appium and had\na new version of Appium with as much functionality as the previous Python\nversion. The foundation had been laid for Appium's basic architecture, and we\nhave been successfully building on it since. A few weeks into this sprint,\nJonathan Lipps was formally designated project lead and he began to strategize\nhow to get more people from the community involved with Appium's development.\n\n## Appium Around the World\n\nUltimately, Jonathan decided that getting Appium in front of as many developers\nat conferences and meetups was the best way to attract users and contributions.\nAppium in its new incarnation was debuted at the Google Test Automation\nConference 2013. Later in 2013,\nAppium was presented at conferences and meetups all around the US, as well as\nin England, Poland, Portugal, and Australia. Notably, Jonathan had Appium\n[perform as instruments in a band](https://www.youtube.com/watch?v=zsbNVkayYRQ)\nand Dan Cuellar put together a fun Appium video\nmontage for Selenium Conference.\n\nBut during all these presentations and conferences, the project continued to\ndevelop. Early in 2013 we released Android and Selendroid support, making\nAppium the first truly cross-platform automation framework. The project also\ncontinued to attract users and contributors, and by the end of 2013, we'd\nalready had well over 1,000 commits.\n\n## The Road to Appium 1.0\n\nAppium began to grow and mature significantly. In May 2014,\nwe released Appium 1.0, which stood as a milestone in Appium's development.\nAppium was given\n[various](https://www.prnewswire.com/news-releases/black-duck-announces-black-duck-open-source-rookies-of-the-year-winners-242383341.html)\n[awards](https://www.infoworld.com/article/2241247/164642-bossie-awards-2014-the-best-open-source-application-development-tools.html)\nand became the most popular open-source cross-platform mobile automation\nframework. Stability improved, bugs were prioritized and fixed, and features\nadded. Sauce Labs increased the number of developers it donated to working\non Appium, but the entire community stayed involved in guiding the project and\ncontributing to it, and project governance continued to happen in the open, on\npublic mailing lists and GitHub's issue tracker.\n\n## The Appium Umbrella Broadens\n\nEventually, it became clear that the Appium codebase was not optimized for\na large team of distributed, sometime contributors. We took the opportunity as\na committer team to rewrite Appium from the ground up, using a more modern\nversion of the JavaScript language, and redoing Appium's architecture so that\nit was easy for users or third-party developers to build their own Appium\n\"drivers\". We wanted for it to be easier for new contributors to get ramped up\non the Appium codebase, and to see support for new platforms added to Appium by\ngroups other than the core team. That vision has begun to be fulfilled, with\ngroups like Microsoft and Youi.tv adding drivers to Appium for Windows desktop\napp automation and Youi.tv app automation, respectively.\n\n## Appium To The People\n\nIn late 2016, Sauce Labs donated Appium as a project to the JS\nFoundation, in order to cement for the world Sauce's\ncommitment that Appium remains open source. The JS Foundation is a non-profit\nopen source stewardship organization which takes responsibility for holding the\ncopyright for open source projects, as well as ensuring they have a long and\nsuccessful tenure in the community. As a result of our move to a non-profit\nfoundation, we hope that the door will open even more widely for new\ncontributors, either as individuals or representing one of the many companies\nwhich now have an interest in seeing Appium move forward.\n\nEventually, the JS Foundation merged into the [OpenJS Foundation](https://openjsf.org),\nand Appium became an Impact Project in the foundation.\n\n## Appium 2.0\n\nAppium 2 was released in 2023 and introduced an entirely revamped architecture, shifting focus to Appium\nas an ecosystem rather than an all-in-one project. This unlocked the ability for anyone to develop\nand share their own Appium extensions (drivers and plugins), opening up a world of possibilities\nfor automation-related development for platforms far beyond iOS and Android! As a result,\nmany third-party extensions were created, such as new drivers for Flutter and Windows, plugins for\nmocking APIs and managing device farms, new Appium clients based on Rust and Swift, and much more.\n\nAround this time was also when we started a sponsorship program for Appium, which attracted various\nmajor and minor sponsors alike. This allowed us to give back to the Appium community, by compensating\ncontributors for their voluntary work on the project.\n\n## Appium 3.0\n\n2025 saw the release of Appium 3. This update was a lot smaller than Appium 2 and included only a\nfew behavioral changes, instead focusing on removing deprecated code and updating compatibility for\nmore modern ecosystems. Still, this reduced scope was also to be expected: since Appium 2, the\nmain feature development efforts had shifted to individual drivers and plugins, many of which had\ngone through multiple major updates during the Appium 2 era.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/intro/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Appium \u6982\u89c8\n---\n\n\u5982\u4e3b\u9875\u6240\u8ff0\uff0cAppium \u65e8\u5728\u652f\u6301_\u591a\u4e2a\u4e0d\u540c\u5e73\u53f0_\uff08\u79fb\u52a8\u7aef\u3001Web\u3001\u684c\u9762\u7b49\uff09\u7684 UI \u81ea\u52a8\u5316\u3002 \u4e0d\u4ec5\u5982\u6b64\uff0c\u5b83\u8fd8\u65e8\u5728\u652f\u6301\u7528_\u4e0d\u540c\u8bed\u8a00_\uff08JS\u3001Java\u3001Python \u7b49\uff09\u7f16\u5199\u7684\u81ea\u52a8\u5316\u4ee3\u7801\u3002 \u5c06\u6240\u6709\u8fd9\u4e9b\u529f\u80fd\u6574\u5408\u5230\u4e00\u4e2a\u7a0b\u5e8f\u4e2d\u662f\u4e00\u9879\u975e\u5e38\u8270\u5de8\u7684\u4efb\u52a1\uff0c\u751a\u81f3\u53ef\u4ee5\u8bf4\u662f\u4e0d\u53ef\u80fd\u5b8c\u6210\u7684\u4efb\u52a1\uff01\n\n\u4e3a\u4e86\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\uff0cAppium \u5b9e\u9645\u4e0a\u88ab\u5206\u4e3a\u56db\u4e2a\u90e8\u5206\uff1a\n\n
\n\n- :material-image-filter-center-focus-strong: **Appium \u6838\u5fc3** - \u5b9a\u4e49\u6838\u5fc3 API\n- :material-car: **\u9a71\u52a8\u7a0b\u5e8f** - \u5b9e\u73b0\u4e0e\u7279\u5b9a\u5e73\u53f0\u7684\u8fde\u63a5\n- :octicons-code-16: **\u5ba2\u6237\u7aef\u5e93** - \u7528\u7279\u5b9a\u8bed\u8a00\u5b9e\u73b0 Appium \u7684 API\n- :fontawesome-solid-plug: **\u63d2\u4ef6** - \u6539\u53d8\u6216\u6269\u5c55 Appium \u7684\u6838\u5fc3\u529f\u80fd\n\n
\n\n\u56e0\u6b64\uff0c\u8981\u5f00\u59cb\u4f7f\u7528 Appium \u8fdb\u884c\u81ea\u52a8\u5316\uff0c\u4f60\u9700\u8981\uff1a\n\n- \u5b89\u88c5 Appium \u672c\u8eab\n- \u4e3a\u4f60\u7684\u76ee\u6807\u5e73\u53f0\u5b89\u88c5\u9a71\u52a8\u7a0b\u5e8f\n- \u4e3a\u4f60\u7684\u76ee\u6807\u7f16\u7a0b\u8bed\u8a00\u5b89\u88c5\u5ba2\u6237\u7aef\u5e93\n- \uff08\u53ef\u9009\uff09\u5b89\u88c5\u4e00\u4e2a\u6216\u591a\u4e2a\u63d2\u4ef6\n\n\u8fd9\u4e9b\u5c31\u662f\u57fa\u7840\u77e5\u8bc6\uff01 \u5982\u679c\u4f60\u5df2\u7ecf\u51c6\u5907\u597d\u5f00\u59cb\uff0c\u8bf7\u7ee7\u7eed\u9605\u8bfb[\u5feb\u901f\u5165\u95e8](../quickstart/index.md)\uff01\n\n\u5982\u679c\u4f60\u60f3\u4e86\u89e3\u66f4\u591a\u5173\u4e8e\u5176\u5de5\u4f5c\u539f\u7406\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u4ee5\u4e0b\u9875\u9762\u7684\u80cc\u666f\u6750\u6599\uff1a\n\n- [Appium \u6838\u5fc3](./appium.md)\n- [Appium \u9a71\u52a8\u7a0b\u5e8f](./drivers.md)\n- [Appium \u5ba2\u6237\u7aef](./clients.md)\n\n\u6700\u540e\uff0c\u8981\u4e86\u89e3 Appium \u7684\u8d77\u6e90\uff0c\u8bf7\u67e5\u770b [Appium \u9879\u76ee\u5386\u53f2](./history.md)\u3002\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/quickstart/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: \u5165\u95e8\u6307\u5357\n---\n\n\u8ba9\u6211\u4eec\u5f00\u59cb\u4f7f\u7528Appium\uff01 \u4e3a\u4e86\u6210\u529f\u4f7f\u7528\u6b64\u5feb\u901f\u5165\u95e8\uff0c\u5efa\u8bae\u60a8\u9996\u5148\u9605\u8bfb[\u4ecb\u7ecd](../intro/index.md)\uff0c\u4ee5\u4fbf\u4e86\u89e3\u8fd0\u884cAppium\u548c\u7f16\u5199Appium\u811a\u672c\u7684\u6982\u5ff5\u3002\n\n\u6b64\u5feb\u901f\u5165\u95e8\u7684\u57fa\u672c\u8ba1\u5212\u5982\u4e0b\uff1a\n\n1. \u5b89\u88c5Appium\n2. \u5b89\u88c5Appium\u9a71\u52a8\u7a0b\u5e8f\u53ca\u5176\u4f9d\u8d56\u9879\n - \u672c\u6307\u5357\u63d0\u4f9b\u4e86[UiAutomator2 \u9a71\u52a8\u7a0b\u5e8f](https://github.com/appium/appium-uiautomator2-driver) \u7684\u8bf4\u660e\n3. \u5728\u60a8\u9009\u62e9\u7684\u8bed\u8a00\u4e2d\u5b89\u88c5Appium\u5ba2\u6237\u7aef\u5e93\n - \u672c\u6307\u5357\u5305\u542bJavaScript\u3001Python\u3001Java\u3001Ruby\u548c.NET\u7684\u9009\u9879\n4. \u4f7f\u7528\u793a\u4f8b\u5e94\u7528\u7a0b\u5e8f\u7f16\u5199\u5e76\u8fd0\u884c\u7b80\u5355\u7684Appium\u81ea\u52a8\u5316\u811a\u672c\n\n### \u7cfb\u7edf\u9700\u6c42\n\n\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u60a8\u7684\u7cfb\u7edf\u6ee1\u8db3\u8fd0\u884cAppium\u670d\u52a1\u5668\u7684[\u8981\u6c42](../quickstart/requirements.md)\u3002 \u5176\u4ed6\u8981\u6c42\u5c06\u5728\u5b89\u88c5UiAutomator2\u9a71\u52a8\u7a0b\u5e8f\u65f6\u8ba8\u8bba\u3002 \u672c\u6307\u5357\u8fd8\u5047\u8bbe\u60a8\u5728\u5e73\u53f0\u4e0a\u5177\u6709\u57fa\u672c\u7684\u547d\u4ee4\u884c\u719f\u7ec3\u5ea6\uff0c\u4f8b\u5982\u80fd\u591f\u8fd0\u884c\u547d\u4ee4\u3001\u8bbe\u7f6e\u548c\u6301\u4e45\u5316\u73af\u5883\u53d8\u91cf\u7b49...\n\n\u73b0\u5728\u60a8\u51c6\u5907\u5f00\u59cb\u4e86\uff01 \u524d\u5f80\u5b89\u88c5[Appium](./install.md)\u3002\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/quickstart/install.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: \u5b89\u88c5Appium\n---\n\n!!! \u4fe1\u606f\n\n```\n\u5b89\u88c5\u524d\uff0c\u8bf7\u786e\u4fdd\u68c0\u67e5 [\u7cfb\u7edf\u8981\u6c42] (./requirements.md)\u3002\n```\n\nAppium \u53ef\u4ee5\u4f7f\u7528 \"npm\" \u5728\u5168\u5c40\u5b89\u88c5\uff1a\n\n```bash\nnpm install -g appium\n```\n\n!!! \u5907\u6ce8\n\n```\n\u76ee\u524d\u4e0d\u652f\u6301\u5176\u4ed6\u8f6f\u4ef6\u5305\u7ba1\u7406\u3002\n```\n\n## \u542f\u52a8Appium\n\nAppium \u53ef\u4ee5\u4f7f\u7528 [\u547d\u4ee4\u884c](../reference/cli/index.md) \u542f\u52a8\uff1a\n\n```\nappium\n```\n\n\u8fd9\u4f1a\u542f\u52a8Appium\u670d\u52a1\u5668\u8fdb\u7a0b\uff0c\u8be5\u8fdb\u7a0b\u52a0\u8f7d\u6240\u6709\u5df2\u5b89\u88c5\u7684Appium\u9a71\u52a8\u7a0b\u5e8f\uff0c\u5e76\u5f00\u59cb\u7b49\u5f85\u6765\u81ea\u5ba2\u6237\u7aef\u8fde\u63a5\uff08\u5982\u6d4b\u8bd5\u81ea\u52a8\u5316\u811a\u672c\uff09\u7684\u65b0\u4f1a\u8bdd\u8bf7\u6c42\u3002\n\u7531\u4e8e\u670d\u52a1\u5668\u8fdb\u7a0b\u72ec\u7acb\u4e8e\u5176\u5ba2\u6237\u7aef\uff0c\u56e0\u6b64\u5fc5\u987b\u5728\u5c1d\u8bd5\u542f\u52a8\u65b0\u4f1a\u8bdd\u4e4b\u524d\u660e\u786e\u542f\u52a8\u5b83\u3002\n\n\u5f53\u670d\u52a1\u5668\u542f\u52a8\u65f6\uff0c\u63a7\u5236\u53f0\u65e5\u5fd7\u5c06\u5217\u51fa\u5ba2\u6237\u7aef\u53ef\u4ee5\u7528\u6765\u8fde\u63a5\u5230\u6b64\u670d\u52a1\u5668\u7684\u6240\u6709\u6709\u6548URL\uff1a\n\n```\n[Appium] You can provide the following URLs in your client code to connect to this server:\n[Appium] \thttp://127.0.0.1:4723/ (only accessible from the same host)\n(... any other URLs ...)\n```\n\n\u4e00\u65e6\u5ba2\u6237\u7aef\u8bf7\u6c42\u65b0\u4f1a\u8bdd\uff0cAppium\u670d\u52a1\u5668\u8fdb\u7a0b\u5c06\u5f00\u59cb\u8bb0\u5f55\u6b64\u4f1a\u8bdd\u7684\u6240\u6709\u8be6\u7ec6\u4fe1\u606f\uff0c\u76f4\u5230\u5176\u7ec8\u6b62\u3002 \u8bf7\u8bb0\u4f4f\u8fd9\u4e00\u70b9\u2014\u2014\u5982\u679c\u60a8\u9047\u5230Appium\u6d4b\u8bd5\u7684\u95ee\u9898\uff0c\u60a8\u53ef\u4ee5\u968f\u65f6\u68c0\u67e5\u670d\u52a1\u5668\u65e5\u5fd7\u4ee5\u83b7\u53d6\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\u3002\n\n\u63a5\u4e0b\u6765\u662f\u4ec0\u4e48\uff1f \u5373\u4f7fAppium\u5df2\u5b89\u88c5\u5e76\u8fd0\u884c\uff0c\u5b83\u4e5f\u4e0d\u6346\u7ed1\u4efb\u4f55\u9a71\u52a8\u7a0b\u5e8f\uff0c\u8fd9\u610f\u5473\u7740\u5b83\u8fd8\u4e0d\u80fd\u81ea\u52a8\u5316\u4efb\u4f55\u4e1c\u897f\u3002 \u56e0\u6b64\uff0c\u6211\u4eec\u5c06\u4e3aAndroid\u8bbe\u7f6e\u81ea\u52a8\u5316\u2014\u2014\u7ee7\u7eed[\u5b89\u88c5UiAutomator2\u9a71\u52a8\u7a0b\u5e8f](./uiauto2-driver.md)\u3002\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/quickstart/next-steps.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: \u4e0b\u4e00\u6b65\n---\n\n\u73b0\u5728\u60a8\u5df2\u6210\u529f\u4e3aAndroid\u81ea\u52a8\u5316\u8bbe\u7f6e\u4e86\u7cfb\u7edf\u5e76\u8fd0\u884c\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u6d4b\u8bd5\uff0c\u60a8\u5c06\u5e0c\u671b\u7ee7\u7eed\u63a2\u7d22\u6b64\u6587\u6863\u3002 \u7279\u522b\u662f\uff0c\u8fd9\u4e9b\u662f\u9002\u5408\u521d\u5b66\u8005\u7684\u4f18\u79c0\u6307\u5357\u548c\u53c2\u8003\u8d44\u6599\uff1a \u7279\u522b\u662f\uff0c\u8fd9\u4e9b\u662f\u9002\u5408\u521d\u5b66\u8005\u7684\u4f18\u79c0\u6307\u5357\u548c\u53c2\u8003\u8d44\u6599\uff1a\n\n- [\u751f\u6001\u7cfb\u7edf](../ecosystem/index.md) \u9875\u9762\uff1a\u6d4f\u89c8\u53ef\u7528\u7684\u9a71\u52a8\u7a0b\u5e8f\u3001\u5ba2\u6237\u7aef\u3001\u63d2\u4ef6\u548c\u5de5\u5177\n- [\u7ba1\u7406Appium\u9a71\u52a8\u7a0b\u5e8f\u548c\u63d2\u4ef6](../guides/managing-exts.md)\n- [\u529f\u80fd](../guides/caps.md)\n- [\u8bbe\u7f6e](../guides/settings.md)\n\n\u60a8\u8fd8\u4f1a\u53d1\u73b0[Appium Inspector](https://github.com/appium/appium-inspector)\u662f\u7f16\u5199Appium\u6d4b\u8bd5\u4e0d\u53ef\u6216\u7f3a\u7684\u5de5\u5177\uff0c\u56e0\u4e3a\u5b83\u5141\u8bb8\u5bf9\u5e94\u7528\u8fdb\u884c\u89c6\u89c9\u68c0\u67e5\uff0c\u5e76\u5e2e\u52a9\u60a8\u53d1\u73b0\u6d4b\u8bd5\u811a\u672c\u4e2d\u4f7f\u7528\u7684\u5143\u7d20\u5b9a\u4f4d\u5668\u3002\n\n\u60a8\u8fd8\u53ef\u4ee5\u5229\u7528\u4f17\u591a\u53ef\u7528\u7684\u5728\u7ebfAppium\u8bfe\u7a0b\u4e4b\u4e00\u3002\n\n\u795d\u60a8\u597d\u8fd0\uff0c\u73a9\u5f97\u5f00\u5fc3\uff01\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/quickstart/requirements.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: \u7cfb\u7edf\u8981\u6c42\n---\n\nAppium \u670d\u52a1\u5668\u7684\u57fa\u672c\u8981\u6c42\u5982\u4e0b\uff1a\n\n- macOS\u3001Linux \u6216 Windows \u64cd\u4f5c\u7cfb\u7edf\n- [Node.js](https://nodejs.org) \u7248\u672c\u5728 [SemVer](https://semver.org) \u8303\u56f4 `^20.19.0 || ^22.12.0 || >=24.0.0`\n - \u63a8\u8350\u4f7f\u7528 LTS \u7248\u672c\n- [`npm`](https://npmjs.com) \u7248\u672c `>=10`\uff08`npm` \u901a\u5e38\u4e0e Node.js \u6346\u7ed1\uff0c\u4f46\u53ef\u4ee5\u72ec\u7acb\u5347\u7ea7\uff09\n\nAppium \u672c\u8eab\u76f8\u5bf9\u8f7b\u91cf\uff0c\u6ca1\u6709\u663e\u8457\u7684\u78c1\u76d8\u7a7a\u95f4\u6216 RAM \u8981\u6c42\u3002 \u5373\u4f7f\u5728\u8d44\u6e90\u53d7\u9650\u7684\u73af\u5883\u5982 Raspberry Pi \u4e2d\uff0c\u53ea\u8981\u6709 Node.js \u5c31\u53ef\u4ee5\u8fd0\u884c\u3002\n\n### \u9a71\u52a8\u7a0b\u5e8f\u8981\u6c42\n\n\u7528\u4e8e\u81ea\u52a8\u5316\u7279\u5b9a\u5e73\u53f0\u7684\u9a71\u52a8\u7a0b\u5e8f\u53ef\u80fd\u6709\u5176\u4ed6\u8981\u6c42\u3002 \u8bf7\u53c2\u8003\u8be5\u5e73\u53f0\u7684 [Appium \u9a71\u52a8\u7a0b\u5e8f](../ecosystem/drivers.md) \u6587\u6863\u4ee5\u83b7\u53d6\u5176\u4ed6\u4f9d\u8d56\u9879\u3002 \u666e\u904d\u7684\u60c5\u51b5\u662f\uff0c\u7ed9\u5b9a\u5e73\u53f0\u7684 Appium \u9a71\u52a8\u7a0b\u5e8f\u9700\u8981\u5b89\u88c5\u8be5\u5e73\u53f0\u7684\u5f00\u53d1\u8005\u5de5\u5177\u94fe\u548c SDK\u3002\n\n\u4e3a\u4e86\u5e2e\u52a9\u5904\u7406\u9a71\u52a8\u7a0b\u5e8f\u8981\u6c42\uff0c\u6bcf\u4e2a\uff08\u5b98\u65b9\uff09\u9a71\u52a8\u7a0b\u5e8f\u90fd\u9644\u5e26 Appium Doctor \u5de5\u5177\uff0c\u5b83\u5141\u8bb8\u9a8c\u8bc1\u662f\u5426\u5df2\u8bbe\u7f6e\u6240\u6709\u8981\u6c42\u3002 \u4e86\u89e3\u5982\u4f55\u4f7f\u7528\u6b64\u5de5\u5177\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605 [\u547d\u4ee4\u884c\u4f7f\u7528\u6587\u6863](../reference/cli/extensions.md#doctor)\u3002\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/quickstart/test-dotnet.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: \u7f16\u5199\u6d4b\u8bd5 (.NET)\n---\n\n[Appium .NET Client](https://github.com/appium/dotnet-client/) \u662f\n\u5b98\u65b9\u7684 Appium C# \u5ba2\u6237\u7aef\u3002 \u8fd9\u4e2a\u9a71\u52a8\u7a0b\u5e8f\u662f Selenium C# \u5ba2\u6237\u7aef\u7684\u6269\u5c55\u3002 \u5b83\u5177\u6709\u5e38\u89c4\u9a71\u52a8\u7a0b\u5e8f\u7684\u6240\u6709\u529f\u80fd\uff0c\u4f46\u5728\u4e4b\u4e0a\u6dfb\u52a0\u4e86 Appium \u7279\u5b9a\u7684\u65b9\u6cd5\u3002 \u8be5\u9a71\u52a8\u7a0b\u5e8f\u5728\u516c\u5171 NuGet Gallery \u4e0a\u4f5c\u4e3a [Appium.WebDriver](https://www.nuget.org/packages/Appium.WebDriver/) \u63d0\u4f9b\u3002\n\n\u73b0\u5728\uff0c\u6211\u4eec\u8fdb\u5165\u76ee\u5f55\u5e76\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 [NUnit](https://nunit.org/) \u9879\u76ee\u3002 \u6211\u4eec\u8fd8\u5c06\u6dfb\u52a0\u5bf9 Appium.Net \u9a71\u52a8\u7a0b\u5e8f\u548c\u5176\u4ed6\u4f9d\u8d56\u9879\u7684\u5f15\u7528\u3002\n\n```bash\ncd dotnet-client\ndotnet new nunit --name appiumtest\n\ncd appiumtest\n\n# \u8fd9\u5c06\u5b89\u88c5\u6700\u65b0\u7684 5.x \u7248\u672c\ndotnet add package Appium.WebDriver --prerelease\ndotnet add package Newtonsoft.Json --version 13.0.3\n```\n\n\u5b8c\u6210\u540e\uff0c\u60a8\u7684\u9879\u76ee\u5e94\u8be5\u6709\u4e00\u4e2a\u5360\u4f4d\u7b26\u6587\u4ef6 `UnitTest1.cs`\u3002 \u6211\u4eec\u5c06\u66ff\u6362\u4ee3\u7801\u4ee5\u5305\u542b OpenQA \u547d\u540d\u7a7a\u95f4\u3001\u9a71\u52a8\u7a0b\u5e8f\u7684\u521d\u59cb\u5316\u4ee5\u53ca\u5b9e\u9645\u6d4b\u8bd5\u3002\n\n```C# title=\"UnitTest1.cs\"\nusing OpenQA.Selenium;\nusing OpenQA.Selenium.Appium;\nusing OpenQA.Selenium.Appium.Android;\nusing OpenQA.Selenium.Appium.Enums;\n\nnamespace appiumtest;\n\npublic class Tests\n{\n private AndroidDriver _driver;\n\n [OneTimeSetUp]\n public void SetUp()\n {\n var serverUri = new Uri(Environment.GetEnvironmentVariable(\"APPIUM_HOST\") ?? \"http://127.0.0.1:4723/\");\n var driverOptions = new AppiumOptions() {\n AutomationName = AutomationName.AndroidUIAutomator2,\n PlatformName = \"Android\",\n DeviceName = \"Android Emulator\",\n };\n\n driverOptions.AddAdditionalAppiumOption(\"appPackage\", \"com.android.settings\");\n driverOptions.AddAdditionalAppiumOption(\"appActivity\", \".Settings\");\n // NoReset assumes the app com.google.android is preinstalled on the emulator\n driverOptions.AddAdditionalAppiumOption(\"noReset\", true);\n\n _driver = new AndroidDriver(serverUri, driverOptions, TimeSpan.FromSeconds(180));\n _driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);\n }\n\n [OneTimeTearDown]\n public void TearDown()\n {\n _driver.Dispose();\n }\n\n [Test]\n public void TestFindApps()\n {\n _driver.StartActivity(\"com.android.settings\", \".Settings\");\n _driver.FindElement(By.XPath(\"//*[@text='Apps']\")).Click();\n }\n}\n```\n\n!!! \u5907\u6ce8\n\n```\n\u8fd9\u4efd\u6307\u5357\u7684\u8303\u56f4\u4e0d\u5305\u62ec\u5bf9 dotnet \u5ba2\u6237\u7aef\u5e93\u6216\u6b64\u5904\u53d1\u751f\u7684\u4e00\u5207\u8fdb\u884c\u5b8c\u6574\u8bf4\u660e\uff0c\u56e0\u6b64\u6211\u4eec\u6682\u65f6\u4e0d\u5bf9\u4ee3\u7801\u672c\u8eab\u8fdb\u884c\u8be6\u7ec6\u89e3\u91ca\u3002\u60a8\u53ef\u80fd\u9700\u8981\u7279\u522b\u9605\u8bfb Appium [Capabilities](../guides/caps.md)\uff0c\u4ee5\u53ca\u719f\u6089 [dotnet \u5ba2\u6237\u7aef\u9a71\u52a8\u7a0b\u5e8f\u6587\u6863](https://github.com/appium/dotnet-client/) \u4ee5\u83b7\u5f97\u5bf9\u60a8\u770b\u5230\u7684\u5404\u79cd API \u547d\u4ee4\u53ca\u5176\u76ee\u7684\u7684\u66f4\u5168\u9762\u89e3\u91ca\u3002\n```\n\n\u57fa\u672c\u4e0a\uff0c\u6b64\u4ee3\u7801\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a\n\n1. \u5b9a\u4e49\u4e00\u7ec4\"Capabilities\"\uff08\u53c2\u6570\uff09\u53d1\u9001\u5230 Appium \u670d\u52a1\u5668\uff0c\u4ee5\u4fbf Appium \u77e5\u9053\u60a8\u60f3\u8981\u81ea\u52a8\u5316\u4ec0\u4e48\u3002 \u6709\u4e9b\u53c2\u6570\u53ef\u4ee5\u4f7f\u7528\u73af\u5883\u53d8\u91cf\u8986\u76d6\u3002\n2. \u5728\u5185\u7f6e\u7684 Android \u8bbe\u7f6e\u5e94\u7528\u4e0a\u542f\u52a8 Appium \u4f1a\u8bdd\u3002\n3. \u67e5\u627e\"Apps\"\u5217\u8868\u9879\u5e76\u70b9\u51fb\u5b83\u3002\n4. \u7ed3\u675f Appium \u4f1a\u8bdd\u3002\n\n\u5c31\u662f\u8fd9\u6837\uff01 \u8ba9\u6211\u4eec\u8bd5\u8bd5\u3002 \u5728\u8fd0\u884c\u6d4b\u8bd5\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u5728\u53e6\u4e00\u4e2a\u7ec8\u7aef\u4f1a\u8bdd\u4e2d\u8fd0\u884c Appium \u670d\u52a1\u5668\uff0c\u5426\u5219\u60a8\u4f1a\u6536\u5230\u65e0\u6cd5\u8fde\u63a5\u7684\u9519\u8bef\u3002 \u7136\u540e\uff0c\u60a8\u53ef\u4ee5\u6267\u884c\u811a\u672c\uff1a\n\n```bash\ndotnet test\n\n# \u793a\u4f8b\u8f93\u51fa\uff1a\n# Starting test execution, please wait...\n# A total of 1 test files matched the specified pattern.\n\n# Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 323 ms - appiumtest.dll (net7.0)\n```\n\n\u5982\u679c\u4e00\u5207\u987a\u5229\uff0c\u60a8\u5c06\u770b\u5230\u8bbe\u7f6e\u5e94\u7528\u6253\u5f00\u5e76\u5728\u6a21\u62df\u5668\u4e2d\u5bfc\u822a\u5230\"Apps\"\u89c6\u56fe\uff0c\u7136\u540e\u5e94\u7528\u518d\u6b21\u5173\u95ed\u3002\n\n\u606d\u559c\uff0c\u60a8\u5df2\u7ecf\u5f00\u59cb\u4e86 Appium \u4e4b\u65c5\uff01 \u7ee7\u7eed\u9605\u8bfb\u4e00\u4e9b [\u540e\u7eed\u6b65\u9aa4](./next-steps.md) \u4ee5\u8fdb\u884c\u63a2\u7d22\u3002\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/quickstart/test-java.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: \u7f16\u5199\u6d4b\u8bd5 (Java)\n---\n\nAppium \u56e2\u961f\u7ef4\u62a4\u4e86\u4e00\u4e2a\u5b98\u65b9\u7684 [\u5ba2\u6237\u7aef](https://github.com/appium/java-client) \u7528\u4e8e Java \u7f16\u7a0b\u8bed\u8a00\u3002\n\u5b83\u5efa\u7acb\u5728 [Selenium](https://github.com/SeleniumHQ/selenium) \u4e4b\u4e0a\u3002\n\u60a8\u4e5f\u53ef\u4ee5\u5728 Kotlin \u9879\u76ee\u4e2d\u4f7f\u7528\u6b64\u5ba2\u6237\u7aef\u3002\n\n\u6309\u7167 [\u5c06 Appium Java \u5ba2\u6237\u7aef\u6dfb\u52a0\u5230\u60a8\u7684\u6d4b\u8bd5\u6846\u67b6](https://github.com/appium/java-client#add-appium-java-client-to-your-test-framework) \u6559\u7a0b\u5c06\u5e93\u8fde\u63a5\u5230\u60a8\u7684\u6d4b\u8bd5\u6846\u67b6\u6e90\u4ee3\u7801\u3002\n\nAppium Java \u5ba2\u6237\u7aef\u5177\u6709\u4e13\u7528\u7c7b\u6765\u652f\u6301\u5927\u591a\u6570\u5b98\u65b9 Appium \u9a71\u52a8\u7a0b\u5e8f\u3002 \u5bf9\u4e8e\u5176\u4ed6\u9a71\u52a8\u7a0b\u5e8f\uff0c\u60a8\u53ef\u4ee5\u7b80\u5355\u5730\u4f7f\u7528 [AppiumDriver](https://github.com/appium/java-client/blob/master/src/main/java/io/appium/java_client/AppiumDriver.java) \u7c7b\n\u6216\u4ece\u4e2d\u6784\u5efa\u81ea\u5b9a\u4e49\u6d3e\u751f\u7c7b\u3002 \u67e5\u770b [\u9a71\u52a8\u7a0b\u5e8f\u652f\u6301](https://github.com/appium/java-client#drivers-support) \u6587\u7ae0\u4ee5\u4e86\u89e3\u5f53\u524d\u9a71\u52a8\u7a0b\u5e8f\u7c7b\u5b9e\u73b0\u7684\u66f4\u591a\u4fe1\u606f\u3002\n\n\u6309\u7167 [\u4f7f\u7528\u793a\u4f8b](https://github.com/appium/java-client#usage-examples) \u6587\u7ae0\u4ee5\u4e86\u89e3\n\u5982\u4f55\u4ece\u60a8\u7684\u6d4b\u8bd5\u6846\u67b6\u8c03\u7528 Java \u5ba2\u6237\u7aef\u529f\u80fd\u3002\n\n\u4e00\u65e6\u60a8\u6210\u529f\u8fd0\u884c\u4e86\u4e00\u4e2a\u6d4b\u8bd5\uff0c\u60a8\u53ef\u4ee5\u7ee7\u7eed\u9605\u8bfb\u4e00\u4e9b [\u540e\u7eed\u6b65\u9aa4](./next-steps.md) \u4ee5\u8fdb\u884c\u63a2\u7d22\u3002\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/quickstart/test-js.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: \u7f16\u5199\u6d4b\u8bd5 (JS)\n---\n\n\u8981\u5728 JavaScript (Node.js) \u4e2d\u7f16\u5199 Appium \u6d4b\u8bd5\uff0c\u6211\u4eec\u9700\u8981\u9009\u62e9\u4e00\u4e2a\u4e0e Appium \u517c\u5bb9\u7684\u5ba2\u6237\u7aef\u5e93\u3002 \u7ef4\u62a4\u6700\u597d\u7684\u5e93\uff0c\u4e5f\u662f Appium \u56e2\u961f\u63a8\u8350\u4f7f\u7528\u7684\uff0c\u662f [WebdriverIO](https://webdriver.io)\uff0c\u6240\u4ee5\u8ba9\u6211\u4eec\u4f7f\u7528\u5b83\u3002 \u7531\u4e8e\u6211\u4eec\u5df2\u7ecf\u5b89\u88c5\u4e86 Appium\uff0c\u6211\u4eec\u77e5\u9053\u6211\u4eec\u7684 Node \u548c NPM \u5df2\u7ecf\u6ee1\u8db3\u8981\u6c42\u3002 \u6240\u4ee5\u5728\u60a8\u7684\u8ba1\u7b97\u673a\u4e0a\u67d0\u4e2a\u5730\u65b9\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u9879\u76ee\u76ee\u5f55\uff0c\u7136\u540e\u5728\u5176\u4e2d\u521d\u59cb\u5316\u4e00\u4e2a\u65b0\u7684 Node.js \u9879\u76ee\uff1a\n\n```bash\nnpm init\n```\n\n\u63d0\u793a\u4e2d\u8f93\u5165\u4ec0\u4e48\u5e76\u4e0d\u91cd\u8981\uff0c\u53ea\u8981\u6700\u7ec8\u5f97\u5230\u4e00\u4e2a\u6709\u6548\u7684 `package.json`\u3002\n\n\u73b0\u5728\uff0c\u901a\u8fc7 NPM \u5b89\u88c5 `webdriverio` \u5305\uff1a\n\n```bash\nnpm i --save-dev webdriverio\n```\n\n\u5b8c\u6210\u540e\uff0c\u60a8\u7684 `package.json` \u6587\u4ef6\u5e94\u8be5\u5305\u542b\u5982\u4e0b\u90e8\u5206\uff1a\n\n```json title=\"package.json\"\n--8<-- \"./sample-code/quickstarts/js/package.json\"\n```\n\n\u73b0\u5728\u662f\u7f16\u5199\u6d4b\u8bd5\u672c\u8eab\u7684\u65f6\u5019\u4e86\u3002 \u521b\u5efa\u4e00\u4e2a\u540d\u4e3a `test.js` \u7684\u65b0\u6587\u4ef6\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a\n\n```js title=\"test.js\"\n--8<-- \"./sample-code/quickstarts/js/test.js\"\n```\n\n!!! note\n\n```\n\u8fd9\u4efd\u6307\u5357\u7684\u8303\u56f4\u4e0d\u5305\u62ec\u5bf9 WebdriverIO \u5ba2\u6237\u7aef\u5e93\u6216\u6b64\u5904\u53d1\u751f\u7684\u4e00\u5207\u8fdb\u884c\u5b8c\u6574\u8bf4\u660e\uff0c\u56e0\u6b64\u6211\u4eec\u6682\u65f6\u4e0d\u5bf9\u4ee3\u7801\u672c\u8eab\u8fdb\u884c\u8be6\u7ec6\u89e3\u91ca\u3002\u60a8\u53ef\u80fd\u9700\u8981\u7279\u522b\u9605\u8bfb Appium [Capabilities](../guides/caps.md)\uff0c\u4ee5\u53ca\u719f\u6089\u4f18\u79c0\u7684 [WebdriverIO \u6587\u6863](https://webdriver.io/docs/gettingstarted) \u4ee5\u83b7\u5f97\u5bf9\u60a8\u770b\u5230\u7684\u5404\u79cd API \u547d\u4ee4\u53ca\u5176\u76ee\u7684\u7684\u66f4\u5168\u9762\u89e3\u91ca\u3002\n```\n\n!!! note\n\n```\n\u793a\u4f8b\u4ee3\u7801\u53ef\u4ece [GitHub Appium \u4ed3\u5e93](https://github.com/appium/appium/tree/master/packages/appium/sample-code/quickstarts/js) \u83b7\u53d6\u3002\n```\n\n\u57fa\u672c\u4e0a\uff0c\u6b64\u4ee3\u7801\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a\n\n1. \u5b9a\u4e49\u4e00\u7ec4\"Capabilities\"\uff08\u53c2\u6570\uff09\u53d1\u9001\u5230 Appium \u670d\u52a1\u5668\uff0c\u4ee5\u4fbf Appium \u77e5\u9053\u60a8\u60f3\u8981\u81ea\u52a8\u5316\u4ec0\u4e48\u3002\n2. \u5728\u5185\u7f6e\u7684 Android \u8bbe\u7f6e\u5e94\u7528\u4e0a\u542f\u52a8 Appium \u4f1a\u8bdd\u3002\n3. \u67e5\u627e\"Apps\"\u5217\u8868\u9879\u5e76\u70b9\u51fb\u5b83\u3002\n4. \u6682\u505c\u7247\u523b\u7eaf\u7cb9\u4e3a\u4e86\u89c6\u89c9\u6548\u679c\u3002\n5. \u7ed3\u675f Appium \u4f1a\u8bdd\u3002\n\n\u5c31\u662f\u8fd9\u6837\uff01 \u8ba9\u6211\u4eec\u8bd5\u8bd5\u3002 \u5728\u8fd0\u884c\u6d4b\u8bd5\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u5728\u53e6\u4e00\u4e2a\u7ec8\u7aef\u4f1a\u8bdd\u4e2d\u8fd0\u884c Appium \u670d\u52a1\u5668\uff0c\u5426\u5219\u60a8\u4f1a\u6536\u5230\u65e0\u6cd5\u8fde\u63a5\u7684\u9519\u8bef\u3002 \u7136\u540e\uff0c\u60a8\u53ef\u4ee5\u6267\u884c\u811a\u672c\uff1a\n\n```bash\nnode test.js\n```\n\n\u5982\u679c\u4e00\u5207\u987a\u5229\uff0c\u60a8\u5c06\u770b\u5230\u8bbe\u7f6e\u5e94\u7528\u6253\u5f00\u5e76\u5bfc\u822a\u5230\"Apps\"\u89c6\u56fe\uff0c\u7136\u540e\u5e94\u7528\u518d\u6b21\u5173\u95ed\u3002\n\n\u606d\u559c\uff0c\u60a8\u5df2\u7ecf\u5f00\u59cb\u4e86 Appium \u4e4b\u65c5\uff01 \u7ee7\u7eed\u9605\u8bfb\u4e00\u4e9b [\u540e\u7eed\u6b65\u9aa4](./next-steps.md) \u4ee5\u8fdb\u884c\u63a2\u7d22\u3002\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/quickstart/test-py.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: \u7f16\u5199\u6d4b\u8bd5 (Python)\n---\n\n[Appium Python Client](https://github.com/appium/python-client) \u662f\n\u5b98\u65b9\u7684 Python Appium \u5ba2\u6237\u7aef\uff0c\u53ef\u901a\u8fc7 pypi \u4ee5 [Appium-Python-Client](https://pypi.org/project/Appium-Python-Client/) \u5305\u540d\u83b7\u53d6\u3002\n\u5b83\u7ee7\u627f\u81ea [Selenium Python Binding](https://pypi.org/project/selenium/)\uff0c\n\u56e0\u6b64\u5b89\u88c5 Appium Python Client \u5305\u62ec selenium \u7ed1\u5b9a\u3002\n\n```bash\npip install Appium-Python-Client\n```\n\n\u6b64\u793a\u4f8b\u4f7f\u7528 Python \u7684\u5185\u7f6e `unittest` \u6a21\u5757\uff0c\u60a8\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u60a8\u60f3\u8981\u7684 Python \u6d4b\u8bd5\u6846\u67b6\u3002\nAppium Python \u5ba2\u6237\u7aef\u81ea\u52a8\u6dfb\u52a0 `appium:` \u524d\u7f00\u3002\n\u60a8\u901a\u5e38\u4e0d\u9700\u8981\u62c5\u5fc3\u524d\u7f00\u3002\n\n```python title=\"test.py\"\n--8<-- \"./sample-code/quickstarts/py/test.py\"\n```\n\n!!! note\n\n```\n\u8fd9\u4efd\u6307\u5357\u7684\u8303\u56f4\u4e0d\u5305\u62ec\u5bf9 Python \u5ba2\u6237\u7aef\u5e93\u6216\u6b64\u5904\u53d1\u751f\u7684\u4e00\u5207\u8fdb\u884c\u5b8c\u6574\u8bf4\u660e\uff0c\u56e0\u6b64\u6211\u4eec\u6682\u65f6\u4e0d\u5bf9\u4ee3\u7801\u672c\u8eab\u8fdb\u884c\u8be6\u7ec6\u89e3\u91ca\u3002\n\n- \u60a8\u53ef\u80fd\u9700\u8981\u7279\u522b\u9605\u8bfb Appium [Capabilities](../guides/caps.md)\u3002\n- Python Client GitHub \u4ed3\u5e93\u4e2d\u7684 [\u529f\u80fd\u6d4b\u8bd5\u4ee3\u7801](https://github.com/appium/python-client/tree/master/test/functional) \u5e94\u8be5\u6709\u52a9\u4e8e\u627e\u5230\u66f4\u591a\u5de5\u4f5c\u793a\u4f8b\u3002\n- [\u6587\u6863](https://appium.github.io/python-client-sphinx/) \u4e5f\u6709\u52a9\u4e8e\u627e\u5230 Appium Python Client \u4e2d\u5b9a\u4e49\u7684\u65b9\u6cd5\u3002\n```\n\n!!! note\n\n```\n\u793a\u4f8b\u4ee3\u7801\u53ef\u4ece [GitHub Appium \u4ed3\u5e93](https://github.com/appium/appium/tree/master/packages/appium/sample-code/quickstarts/py) \u83b7\u53d6\u3002\n```\n\n\u57fa\u672c\u4e0a\uff0c\u6b64\u4ee3\u7801\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a\n\n1. \u5b9a\u4e49\u4e00\u7ec4\"Capabilities\"\uff08\u53c2\u6570\uff09\u53d1\u9001\u5230 Appium \u670d\u52a1\u5668\uff0c\u4ee5\u4fbf Appium \u77e5\u9053\u60a8\u60f3\u8981\u81ea\u52a8\u5316\u4ec0\u4e48\u3002\n2. \u5728\u5185\u7f6e\u7684 Android \u8bbe\u7f6e\u5e94\u7528\u4e0a\u542f\u52a8 Appium \u4f1a\u8bdd\u3002\n3. \u67e5\u627e\"Apps\"\u5217\u8868\u9879\u5e76\u70b9\u51fb\u5b83\u3002\n4. \u6682\u505c\u7247\u523b\u7eaf\u7cb9\u4e3a\u4e86\u89c6\u89c9\u6548\u679c\u3002\n5. \u7ed3\u675f Appium \u4f1a\u8bdd\u3002\n\n\u5c31\u662f\u8fd9\u6837\uff01 \u8ba9\u6211\u4eec\u8bd5\u8bd5\u3002 \u5728\u8fd0\u884c\u6d4b\u8bd5\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u5728\u53e6\u4e00\u4e2a\u7ec8\u7aef\u4f1a\u8bdd\u4e2d\u8fd0\u884c Appium \u670d\u52a1\u5668\uff0c\u5426\u5219\u60a8\u4f1a\u6536\u5230\u65e0\u6cd5\u8fde\u63a5\u7684\u9519\u8bef\u3002 \u7136\u540e\uff0c\u60a8\u53ef\u4ee5\u6267\u884c\u811a\u672c\uff1a\n\n```bash\npython test.py\n```\n\n\u5982\u679c\u4e00\u5207\u987a\u5229\uff0c\u60a8\u5c06\u770b\u5230\u8bbe\u7f6e\u5e94\u7528\u6253\u5f00\u5e76\u5bfc\u822a\u5230\"Apps\"\u89c6\u56fe\uff0c\u7136\u540e\u5e94\u7528\u518d\u6b21\u5173\u95ed\u3002\n\n\u606d\u559c\uff0c\u60a8\u5df2\u7ecf\u5f00\u59cb\u4e86 Appium \u4e4b\u65c5\uff01 \u7ee7\u7eed\u9605\u8bfb\u4e00\u4e9b [\u540e\u7eed\u6b65\u9aa4](./next-steps.md) \u4ee5\u8fdb\u884c\u63a2\u7d22\u3002\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/quickstart/test-rb.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: \u7f16\u5199\u6d4b\u8bd5 (Ruby)\n---\n\n[AppiumLib](https://github.com/appium/ruby_lib) \u548c [AppiumLibCore](https://github.com/appium/ruby_lib_core)\uff08**\u63a8\u8350**\uff09\u662f Ruby \u4e2d\u7684\u5b98\u65b9 Appium \u5ba2\u6237\u7aef\u5e93\uff0c\u53ef\u901a\u8fc7 gem \u4ee5 [appium_lib](https://rubygems.org/gems/appium_lib) \u548c [appium_lib_core](https://rubygems.org/gems/appium_lib_core) \u5305\u540d\u83b7\u53d6\u3002 appium_lib_core \u7ee7\u627f\u81ea Selenium Ruby Binding\uff0c\u800c appium_lib \u7ee7\u627f\u81ea appium_lib_core\uff0c\u56e0\u6b64\u5b89\u88c5\u8fd9\u4e9b\u5e93\u5305\u62ec selenium \u7ed1\u5b9a\u3002 \u5982\u679c\u60a8\u9700\u8981\u4e00\u4e2a\u4e0d\u592a\u590d\u6742\u7684\u5ba2\u6237\u7aef\u89e3\u51b3\u65b9\u6848\uff0c\u6211\u4eec\u63a8\u8350 `appium_lib_core`\u3002 `appium_lib` \u6709\u4e00\u4e9b\u6838\u5fc3\u6ca1\u6709\u7684\u6709\u7528\u65b9\u6cd5\uff0c\u4f46\u4ee3\u4ef7\u662f\u66f4\u5927\u7684\u590d\u6742\u6027\u548c\u53ef\u80fd\u5728\u6700\u65b0\u73af\u5883\u4e2d\u4e0d\u5de5\u4f5c\u7684\u5386\u53f2\u65b9\u6cd5\u3002\n\n\u4f5c\u4e3a\u7b2c\u4e00\u6b65\uff0c\u8ba9\u6211\u4eec\u521d\u59cb\u5316\u4e00\u4e2a Gemfile \u6765\u7ba1\u7406\u4f9d\u8d56\u9879\uff1a\n\n```bash\nbundle init\n```\n\n\u7136\u540e\uff0c\u60a8\u53ef\u4ee5\u5982\u4e0b\u6dfb\u52a0 Appium Ruby Client \u4f9d\u8d56\u9879\uff1a\n\n```bash\nbundle add appium_lib_core\n# or\n# bundle add appium_lib\n```\n\n\u4e0b\u9762\u7684\u6d4b\u8bd5\u4ee3\u7801\u793a\u4f8b\u4f7f\u7528 `test-unit` \u6a21\u5757\uff0c\u56e0\u6b64\u8bf7\u8fd0\u884c\uff1a\n\n```bash\nbundle add test-unit\n```\n\n\u4e00\u65e6\u8fd9\u4e9b\u6b65\u9aa4\u5b8c\u6210\uff0c\u60a8\u7684 `Gemfile` \u6587\u4ef6\u5e94\u8be5\u5305\u542b\uff1a\n\n```ruby title=\"Gemfile\"\n--8<-- \"./sample-code/quickstarts/rb/Gemfile\"\n```\n\n`appium_lib_core` \u662f\u4f5c\u4e3a Appium \u5ba2\u6237\u7aef\u7684\u4e3b\u8981\u90e8\u5206\u3002\n`appium_lib` \u6709\u5404\u79cd\u8f85\u52a9\u65b9\u6cd5\uff0c\u4f46\u9a71\u52a8\u7a0b\u5e8f\u5b9e\u4f8b\u901a\u5e38\u88ab\u8bbe\u8ba1\u4e3a\u5168\u5c40\u53d8\u91cf\u4f7f\u7528\u3002 \u5b83\u53ef\u80fd\u5bfc\u81f4\u5904\u7406\u5b9e\u4f8b\u7684\u95ee\u9898\u3002\n`appium_lib_core` \u6ca1\u6709\u8fd9\u6837\u7684\u5168\u5c40\u53d8\u91cf\u3002\n\n\u6b64\u793a\u4f8b\u4f7f\u7528 `appium_lib_core` \u548c `test-unit` gem \u6a21\u5757\u3002\n\u5728 `appium_lib` \u4e2d\u7684\u6d4b\u8bd5\u4ee3\u7801\u5e94\u8be5\u7c7b\u4f3c\u3002\n\n```ruby title=\"test.rb\"\n--8<-- \"./sample-code/quickstarts/rb/test.rb\"\n```\n\n!!! note\n\n```\n\u8fd9\u4efd\u6307\u5357\u7684\u8303\u56f4\u4e0d\u5305\u62ec\u5bf9 Ruby \u5ba2\u6237\u7aef\u5e93\u6216\u6b64\u5904\u53d1\u751f\u7684\u4e00\u5207\u8fdb\u884c\u5b8c\u6574\u8bf4\u660e\uff0c\u56e0\u6b64\u6211\u4eec\u6682\u65f6\u4e0d\u5bf9\u4ee3\u7801\u672c\u8eab\u8fdb\u884c\u8be6\u7ec6\u89e3\u91ca\u3002\n\n- \u60a8\u53ef\u80fd\u9700\u8981\u7279\u522b\u9605\u8bfb Appium [Capabilities](../guides/caps.md)\u3002\n- appium_lib_core GitHub \u4ed3\u5e93\u4e2d\u7684 [\u529f\u80fd\u6d4b\u8bd5\u4ee3\u7801](https://github.com/appium/ruby_lib_core/tree/master/test/functional) \u5e94\u8be5\u6709\u52a9\u4e8e\u627e\u5230\u66f4\u591a\u5de5\u4f5c\u793a\u4f8b\u3002\n- \u6587\u6863 [appium_lib_core](https://www.rubydoc.info/github/appium/ruby_lib_core) \u548c [appium_lib](https://www.rubydoc.info/github/appium/ruby_lib) \u4e5f\u6709\u52a9\u4e8e\u627e\u5230\u53ef\u7528\u65b9\u6cd5\u3002\n```\n\n!!! note\n\n```\n\u793a\u4f8b\u4ee3\u7801\u53ef\u4ece [GitHub Appium \u4ed3\u5e93](https://github.com/appium/appium/tree/master/packages/appium/sample-code/quickstarts/rb) \u83b7\u53d6\u3002\n```\n\n\u57fa\u672c\u4e0a\uff0c\u6b64\u4ee3\u7801\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a\n\n1. \u5b9a\u4e49\u4e00\u7ec4\"Capabilities\"\uff08\u53c2\u6570\uff09\u53d1\u9001\u5230 Appium \u670d\u52a1\u5668\uff0c\u4ee5\u4fbf Appium \u77e5\u9053\u60a8\u60f3\u8981\u81ea\u52a8\u5316\u4ec0\u4e48\u3002\n2. \u5728\u5185\u7f6e\u7684 Android \u8bbe\u7f6e\u5e94\u7528\u4e0a\u542f\u52a8 Appium \u4f1a\u8bdd\u3002\n3. \u67e5\u627e\"Apps\"\u5217\u8868\u9879\u5e76\u70b9\u51fb\u5b83\u3002\n4. \u6682\u505c\u7247\u523b\u7eaf\u7cb9\u4e3a\u4e86\u89c6\u89c9\u6548\u679c\u3002\n5. \u7ed3\u675f Appium \u4f1a\u8bdd\u3002\n\n\u5c31\u662f\u8fd9\u6837\uff01 \u8ba9\u6211\u4eec\u8bd5\u8bd5\u3002 \u5728\u8fd0\u884c\u6d4b\u8bd5\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u5728\u53e6\u4e00\u4e2a\u7ec8\u7aef\u4f1a\u8bdd\u4e2d\u8fd0\u884c Appium \u670d\u52a1\u5668\uff0c\u5426\u5219\u60a8\u4f1a\u6536\u5230\u65e0\u6cd5\u8fde\u63a5\u7684\u9519\u8bef\u3002 \u7136\u540e\uff0c\u60a8\u53ef\u4ee5\u6267\u884c\u811a\u672c\uff1a\n\n```bash\n# \u5982\u679c\u60a8\u7684\u73af\u5883\u5c1a\u672a\u8fd0\u884c\u5b89\u88c5\u547d\u4ee4\uff0c\u8bf7\u5148\u8fd0\u884c \"bundle install\"\u3002\nbundle exec ruby test.rb\n```\n\n\u5982\u679c\u4e00\u5207\u987a\u5229\uff0c\u60a8\u5c06\u770b\u5230\u8bbe\u7f6e\u5e94\u7528\u6253\u5f00\u5e76\u5bfc\u822a\u5230\"Apps\"\u89c6\u56fe\uff0c\u7136\u540e\u5e94\u7528\u518d\u6b21\u5173\u95ed\u3002\n\n\u606d\u559c\uff0c\u60a8\u5df2\u7ecf\u5f00\u59cb\u4e86 Appium \u4e4b\u65c5\uff01 \u7ee7\u7eed\u9605\u8bfb\u4e00\u4e9b [\u540e\u7eed\u6b65\u9aa4](./next-steps.md) \u4ee5\u8fdb\u884c\u63a2\u7d22\u3002\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/quickstart/uiauto2-driver.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: \u5b89\u88c5 UiAutomator2 \u9a71\u52a8\u7a0b\u5e8f\n---\n\n\u9664\u975e\u60a8\u6709[\u9a71\u52a8\u7a0b\u5e8f](../intro/drivers.md)\uff0c\u5426\u5219\u60a8\u65e0\u6cd5\u4f7f\u7528 Appium \u505a\u592a\u591a\u4e8b\u60c5\uff0c\u9a71\u52a8\u7a0b\u5e8f\u662f\u4e00\u4e2a\u5141\u8bb8 Appium \u81ea\u52a8\u5316\u7279\u5b9a\u5e73\u53f0\u7684\u63a5\u53e3\u3002\n\n!!! info\n\n```\n\u5bf9\u4e8e\u8fd9\u4e2a\u5feb\u901f\u5165\u95e8\u6307\u5357\uff0c\u6211\u4eec\u5c06\u5728 Android \u5e73\u53f0\u4e0a\u81ea\u52a8\u5316\u4e00\u4e2a\u5e94\u7528\uff0c\u56e0\u4e3a\u901a\u8fc7 Appium \u8fdb\u884c Android \u81ea\u52a8\u5316\u7684\u7cfb\u7edf\u8981\u6c42\u4e0e Appium \u672c\u8eab\u76f8\u540c\uff08\u800c iOS \u9a71\u52a8\u7a0b\u5e8f\uff0c\u5219\u8981\u6c42\u60a8\u4f7f\u7528 macOS\uff09\u3002\n```\n\n\u6211\u4eec\u8981\u4f7f\u7528\u7684\u9a71\u52a8\u7a0b\u5e8f\u79f0\u4e3a [UiAutomator2 \u9a71\u52a8\u7a0b\u5e8f](https://github.com/appium/appium-uiautomator2-driver)\u3002 \u8bf7\u8bbf\u95ee\u8be5\u9a71\u52a8\u7a0b\u5e8f\u7684\u6587\u6863\u5e76\u5c06\u5176\u52a0\u5165\u4e66\u7b7e\uff0c\u56e0\u4e3a\u5b83\u5c06\u6210\u4e3a\u672a\u6765\u5b9d\u8d35\u7684\u53c2\u8003\u3002\n\n## \u8bbe\u7f6e Android \u81ea\u52a8\u5316\u8981\u6c42\n\n\u6839\u636e\u9a71\u52a8\u7a0b\u5e8f\uff0c\u9664\u4e86\u5de5\u4f5c Appium \u670d\u52a1\u5668\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u8bbe\u7f6e\u4ee5\u4e0b\u5185\u5bb9\uff1a\n\n### Android SDK\n\n- \u8bbe\u7f6e Android SDK \u7684\u6700\u7b80\u5355\u65b9\u6cd5\u662f\u4e0b\u8f7d [Android Studio](https://developer.android.com/studio)\u3002\n \u6211\u4eec\u9700\u8981\u4f7f\u7528\u5176 SDK \u7ba1\u7406\u5668\uff08_\u8bbe\u7f6e -> \u8bed\u8a00\u548c\u6846\u67b6 -> Android SDK_\uff09\u4e0b\u8f7d\u4ee5\u4e0b\u9879\u76ee\uff1a\n - Android SDK \u5e73\u53f0\uff08\u9009\u62e9\u6211\u4eec\u60f3\u8981\u81ea\u52a8\u5316\u7684\u4efb\u4f55 Android \u5e73\u53f0\uff0c\u4f8b\u5982 API \u7ea7\u522b 30\uff09\n - Android SDK \u5e73\u53f0\u5de5\u5177\n- \u5982\u679c\u60a8\u613f\u610f\uff0c\u60a8\u4e5f\u53ef\u4ee5\u5728\u6ca1\u6709 Android Studio \u7684\u60c5\u51b5\u4e0b\u4e0b\u8f7d\u8fd9\u4e9b\u9879\u76ee\uff1a\n - Android SDK \u5e73\u53f0\u53ef\u4ee5\u4f7f\u7528\u5305\u542b\u5728 [Android \u547d\u4ee4\u884c\u5de5\u5177](https://developer.android.com/studio#command-line-tools-only) \u4e2d\u7684 `sdkmanager` \u4e0b\u8f7d\n - [Android SDK \u5e73\u53f0\u5de5\u5177](https://developer.android.com/tools/releases/platform-tools)\n- \u8bbe\u7f6e `ANDROID_HOME` \u73af\u5883\u53d8\u91cf\u6307\u5411\u5b89\u88c5 Android SDK \u7684\u76ee\u5f55\u3002 \u60a8\u901a\u5e38\u53ef\u4ee5\u5728 Android Studio SDK \u7ba1\u7406\u5668\u4e2d\u627e\u5230\u6b64\u76ee\u5f55\u7684\u8def\u5f84\u3002 \u5b83\u5c06\u5305\u542b `platform-tools` \u548c\u5176\u4ed6\u76ee\u5f55\u3002\n\n### Java JDK\n\n- \u5b89\u88c5 Java JDK\uff08\u5bf9\u4e8e\u6700\u65b0\u7684 Android API \u7ea7\u522b\uff0c\u9700\u8981 JDK 9\uff0c\u5426\u5219\u8bf7\u7528 JDK 8\uff09\u3002 \u60a8\u53ef\u4ee5\u4ece [Oracle](https://jdk.java.net/) \u6216 [Adoptium](https://adoptium.net/en-GB/temurin/releases/) \u4e0b\u8f7d\u6b64\u8f6f\u4ef6\u3002\n \u786e\u4fdd\u60a8\u83b7\u5f97 JDK \u800c\u4e0d\u662f JRE\u3002\n- \u8bbe\u7f6e `JAVA_HOME` \u73af\u5883\u53d8\u91cf\u6307\u5411 JDK \u4e3b\u76ee\u5f55\u3002 \u5b83\u5c06\u5305\u542b `bin`\u3001`include` \u548c\u5176\u4ed6\u76ee\u5f55\u3002\n\n### \u51c6\u5907\u8bbe\u5907\n\n- \u5982\u679c\u4f7f\u7528\u6a21\u62df\u5668\uff0c\u4f7f\u7528 Android Studio \u521b\u5efa\u548c\u542f\u52a8 Android \u865a\u62df\u8bbe\u5907 (AVD)\u3002\n \u60a8\u53ef\u80fd\u9700\u8981\u4e0b\u8f7d\u8981\u521b\u5efa\u7684\u6a21\u62df\u5668\u7684 API \u7ea7\u522b\u7684\u7cfb\u7edf\u6620\u50cf\u3002 \u4f7f\u7528 Android Studio \u4e2d\u7684 AVD \u521b\u5efa\u5411\u5bfc\u901a\u5e38\u662f\u5b8c\u6210\u6240\u6709\u8fd9\u4e9b\u7684\u6700\u7b80\u5355\u65b9\u6cd5\u3002\n- \u5982\u679c\u4f7f\u7528\u771f\u5b9e\u8bbe\u5907\uff0c\u60a8\u5e94\u8be5\u4e3a\u5176\u8bbe\u7f6e[\u5f00\u53d1\u8005\u6a21\u5f0f\u5e76\u542f\u7528 USB \u8c03\u8bd5](https://developer.android.com/studio/debug/dev-options)\u3002\n- \u8fde\u63a5\u6a21\u62df\u5668\u6216\u8bbe\u5907\u540e\uff0c\u60a8\u53ef\u4ee5\u8fd0\u884c `adb devices`\uff08adb\u4f4d\u4e8e `$ANDROID_HOME/platform-tools/adb`\uff09\u6765\u9a8c\u8bc1\u60a8\u7684\u8bbe\u5907\u662f\u5426\u663e\u793a\u4e3a\u5df2\u8fde\u63a5\u3002\n\n\u4e00\u65e6\u60a8\u7684\u8bbe\u5907\u5728 `adb` \u4e2d\u663e\u793a\u4e3a\u5df2\u8fde\u63a5\uff0c\u5e76\u4e14\u60a8\u9a8c\u8bc1\u4e86\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u6b63\u786e\uff0c\u60a8\u5e94\u8be5\u51c6\u5907\u597d\u4e86\uff01 \u5982\u679c\u60a8\u5728\u8fd9\u4e9b\u6b65\u9aa4\u4e2d\u7684\u4efb\u4f55\u4e00\u4e2a\u9047\u5230\u95ee\u9898\uff0c\u8bf7\u53c2\u8003\u9a71\u52a8\u7a0b\u5e8f\u6587\u6863\uff0c\u6216\u6839\u636e\u9700\u8981\u53c2\u8003\u5404\u79cd Android \u6216 Java \u6587\u6863\u7ad9\u70b9\u3002\n\n\u606d\u559c\uff1a\u65e0\u8bba\u60a8\u662f\u5426\u6253\u7b97\u8fd9\u6837\u505a\uff0c\u60a8\u73b0\u5728\u5df2\u7ecf\u5728\u7cfb\u7edf\u4e0a\u8bbe\u7f6e\u4e86 Android \u5f00\u53d1\u8005\u5de5\u5177\u94fe\uff0c\u6240\u4ee5\u5982\u679c\u60a8\u613f\u610f\uff0c\u53ef\u4ee5\u5f00\u59cb\u5236\u4f5c Android \u5e94\u7528\uff01\n\n## \u5b89\u88c5\u9a71\u52a8\u7a0b\u5e8f\u672c\u8eab\n\n### \u6807\u51c6\u5b89\u88c5\n\n\u50cf\u6240\u6709 Appium \u9a71\u52a8\u7a0b\u5e8f\u4e00\u6837\uff0cUiAutomator 2 \u9a71\u52a8\u7a0b\u5e8f\u901a\u8fc7 [Appium \u6269\u5c55 CLI](../reference/cli/extensions.md) \u5b89\u88c5\u3002\n\u7531\u4e8e UiAutomator 2 \u7531\u6838\u5fc3 Appium \u56e2\u961f\u7ef4\u62a4\uff0c\u5b83\u6709\u4e00\u4e2a\u201c\u5b98\u65b9\u201d\u9a71\u52a8\u7a0b\u5e8f\u540d\u79f0\uff08`uiautomator2`\uff09\uff0c\u8fd9\u4f7f\u5f97\u5b89\u88c5\u66f4\u7b80\u5355\u3002\n\n\u5728\u5b89\u88c5\u4e4b\u524d\uff0c\u786e\u4fdd\u60a8\u7684 Appium \u670d\u52a1\u5668_\u672a_\u8fd0\u884c\uff08\u5982\u679c\u6b63\u5728\u8fd0\u884c\uff0c\u8bf7\u7528 _Ctrl-C_ \u9000\u51fa\uff09\u3002\n\u7136\u540e\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a\n\n```bash\nappium driver install uiautomator2\n```\n\n\u5b83\u5e94\u8be5\u4ea7\u751f\u770b\u8d77\u6765\u50cf\u8fd9\u6837\u7684\u8f93\u51fa\uff1a\n\n```\nAttempting to find and install driver 'uiautomator2'\n\u2714 Installing 'uiautomator2' using NPM install spec 'appium-uiautomator2-driver'\nDriver uiautomator2@2.0.5 successfully installed\n- automationName: UiAutomator2\n- platformNames: [\"Android\"]\n```\n\n\u6ce8\u610f\u5b89\u88c5\u8fc7\u7a0b\u5982\u4f55\u6307\u5b9a\u9a71\u52a8\u7a0b\u5e8f\u7684\u9002\u7528\u5e73\u53f0\uff08\u5728\u8fd9\u91cc\u9009 `Android`\uff09\uff0c\u4ee5\u53ca\u5fc5\u987b\u7528\u4e8e\u5728 Appium \u4f1a\u8bdd\u671f\u95f4\u9009\u62e9\u6b64\u9a71\u52a8\u7a0b\u5e8f\u7684\u81ea\u52a8\u5316\u540d\u79f0\uff08`appium:automationName` [\u80fd\u529b](../guides/caps.md)\uff09\uff08\u5728\u8fd9\u91cc\u9009 `UiAutomator2`\uff09\u3002\n\n!!! note\n\n```\n\u5728\u8fd9\u4e2a\u5feb\u901f\u5165\u95e8\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u4e86 [CLI\u6269\u5c55](../reference/cli/extensions.md) \u6765\u5b89\u88c5 UiAutomator 2 \u9a71\u52a8\u7a0b\u5e8f\uff0c\u4f46\u5982\u679c\u60a8\u5c06 Appium \u7eb3\u5165 Node.js \u9879\u76ee\uff0c\u60a8\u53ef\u80fd\u66f4\u559c\u6b22\u4f7f\u7528 `npm` \u6765\u7ba1\u7406 Appium \u53ca\u5176\u8fde\u63a5\u7684\u9a71\u52a8\u7a0b\u5e8f\u3002\u8981\u4e86\u89e3\u66f4\u591a\u5173\u4e8e\u6b64\u6280\u672f\u7684\u4fe1\u606f\uff0c\u8bf7\u8bbf\u95ee\u5173\u4e8e[\u7ba1\u7406 Appium \u6269\u5c55](../guides/managing-exts.md)\u7684\u6307\u5357\u3002\n```\n\n### \u6279\u91cf\u5b89\u88c5\n\n\u60a8\u53ef\u80fd\u5e0c\u671b\u5c06 Appium \u4e0e\u591a\u4e2a\u9a71\u52a8\u7a0b\u5e8f\u4e00\u8d77\u4f7f\u7528\u3002 \u4e00\u79cd\u65b9\u6cd5\u662f\u4e3a\u6bcf\u4e2a\u5355\u72ec\u7684\u9a71\u52a8\u7a0b\u5e8f\u8fd0\u884c `appium driver install `\uff0c\u4f46\u60a8\u4e5f\u53ef\u4ee5\u4e00\u6b21\u6027\u5b89\u88c5\u591a\u4e2a\u9a71\u52a8\u7a0b\u5e8f\uff1a\n\n```\nappium setup\n```\n\n\u8fd0\u884c\u6b64\u547d\u4ee4\u5c06\u5b89\u88c5 Appium \u7684\u79fb\u52a8\u7aef\u7279\u5b9a\u9a71\u52a8\u7a0b\u5e8f\uff1aUiAutomator2\u3001[XCUITest](https://appium.github.io/appium-xcuitest-driver/)\uff08\u4ec5\u5728\u8fd0\u884c macOS \u65f6\uff09\uff0c\u4ee5\u53ca [Espresso](https://github.com/appium/appium-espresso-driver)\u3002\n\n\u60a8\u4e5f\u53ef\u4ee5\u4f7f\u7528\u6b64\u547d\u4ee4\u6279\u91cf\u5b89\u88c5\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u6216\u684c\u9762\u6d4f\u89c8\u5668\u7684\u9a71\u52a8\u7a0b\u5e8f\u3002\n\u6709\u5173\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u8003[\u8bbe\u7f6e\u547d\u4ee4\u6587\u6863](../reference/cli/setup.md)\u3002\n\n### \u9a8c\u8bc1\u5b89\u88c5\n\nUiAutomator2 \u9a71\u52a8\u7a0b\u5e8f\uff0c\u50cf\u6240\u6709\u5b98\u65b9 Appium \u9a71\u52a8\u7a0b\u5e8f\u4e00\u6837\uff0c\u5e26\u6709 Appium Doctor \u5de5\u5177\uff0c\u5b83\u5141\u8bb8\u9a8c\u8bc1\u662f\u5426\u6240\u6709\u5148\u51b3\u6761\u4ef6\u90fd\u5df2\u6b63\u786e\u8bbe\u7f6e\uff1a\n\n```\nappium driver doctor uiautomator2\n```\n\n\u672c\u6307\u5357\u4e13\u6ce8\u4e8e\u57fa\u672c\u8981\u6c42\uff0c\u56e0\u6b64 Appium Doctor \u53ef\u80fd\u5efa\u8bae\u4e00\u4e2a\u6216\u591a\u4e2a\u53ef\u9009\u4fee\u590d\u3002 \u4f46\u5982\u679c\u60a8\u770b\u5230 `0 required fixes needed`\uff0c\u90a3\u610f\u5473\u7740\u4e00\u5207\u90fd\u8bbe\u7f6e\u597d\u4e86\uff01\n\n\u73b0\u5728\uff0c\u518d\u6b21\u542f\u52a8 Appium \u670d\u52a1\u5668\uff08\u8fd0\u884c `appium`\uff09\uff0c\u60a8\u5e94\u8be5\u770b\u5230\u65b0\u5b89\u88c5\u7684\u9a71\u52a8\u7a0b\u5e8f\u5217\u4e3a\u53ef\u7528\uff1a\n\n```\n[Appium] Available drivers:\n[Appium] - uiautomator2@2.0.5 (automationName 'UiAutomator2')\n```\n\nAndroid \u8bbe\u7f6e\u5b8c\u6210\u5e76\u5b89\u88c5\u4e86 UiAutomator2 \u9a71\u52a8\u7a0b\u5e8f\uff0c\u51c6\u5907\u7f16\u5199\u7b2c\u4e00\u4e2a\u6d4b\u8bd5\u5427\uff01 \u73b0\u5728\u9009\u62e9\u60a8\u559c\u6b22\u7684\u8bed\u8a00\u5e76\u8bd5\u8bd5\uff1a\n\n
\n\n- :material-language-javascript: [**JavaScript**](./test-js.md)\n- :material-language-java: [**Java**](./test-java.md)\n- :material-language-python: [**Python**](./test-py.md)\n- :material-language-ruby: [**Ruby**](./test-rb.md)\n- :material-dot-net: [**.NET C#**](./test-dotnet.md)\n\n
\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/reference/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Reference\n---\n\nThis section of the Appium documentation provides a reference to the two main interfaces within the\nAppium server: the command-line executable, and the supported API endpoints.\n\n
\n\n- :octicons-command-palette-16: [**Command Line Interface**](./cli/index.md)\n\n ---\n\n Learn how to use the Appium command-line executable\n\n- :material-cloud-braces: [**API Endpoints**](./api/index.md)\n\n ---\n\n View endpoints supported by the Appium server\n\n
\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/reference/api/appium.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Appium Protocol\n---\n\n\n\nThe following is a list of endpoints supported in Appium, that are defined in the Appium extension\nof the W3C WebDriver protocol.\n\n### getAppiumSessions\n\n```\nGET /appium/sessions\n```\n\nRetrieves information about all active server sessions.\n\n!!! info\n\n The `session_discovery` [insecure feature](../../guides/security.md) must be enabled to use this endpoint.\n\n#### Response\n\n`TimestampedMultiSessionData[]` - an array of session data objects. Each object has the following properties:\n\n| Name | Description | Type |\n| -------------- | ------------------------------------------------------------------------------ | ------ |\n| `capabilities` | Session capabilities | object |\n| `created` | Session creation time (in milliseconds) as a Unix timestamp | number |\n| `id` | Session ID | string |\n\n### getAppiumSessionCapabilities\n\n```\nGET /session/:sessionId/appium/capabilities\n```\n\nRetrieves the [session capabilities](../../guides/caps.md).\n\n#### Response\n\n`SessionCapabilities` - an object with the following properties:\n\n| Name | Description | Type |\n| -------------- | -------------------- | ------ |\n| `capabilities` | Session capabilities | object |\n\n### getSettings\n\n```\nGET /session/:sessionId/appium/settings\n```\n\nRetrieves the [current session settings](../../guides/settings.md).\n\n#### Response\n\n`Settings` - an object containing setting names and their values\n\n### updateSettings\n\n```\nPOST /session/:sessionId/appium/settings\n```\n\nUpdates the specified session settings. Any other previously set settings will remain unchanged.\n\n#### Parameters\n\n| Name | Description | Type |\n| ---------- | -------------------------------------------------------------------- | ------ |\n| `settings` | Object containing the names and values of the settings to be updated | object |\n\n#### Response\n\n`null`\n\n### listCommands\n\n```\nGET /session/:sessionId/appium/commands\n```\n\nRetrieves the URL endpoints and WebDriver BiDi commands supported in the current session.\n\n#### Response\n\n`ListCommandsResponse` - an object containing all supported endpoints and BiDi commands, grouped by\ntheir origin (base Appium, driver-specific, or plugin-specific). Refer to [the type definition file](https://github.com/appium/appium/blob/master/packages/types/lib/command.ts)\nfor a detailed structure of this object.\n\n### listExtensions\n\n```\nGET /session/:sessionId/appium/extensions\n```\n\nRetrieves the [execute methods](../../guides/execute-methods.md) supported in the current session.\n\n#### Response\n\n`ListExtensionsResponse` - an object containing all supported execute methods, grouped by their\norigin (driver-specific or plugin-specific). Refer to [the type definition file](https://github.com/appium/appium/blob/master/packages/types/lib/command.ts)\nfor a detailed structure of this object.\n\n### getLogEvents\n\n```\nPOST /session/:sessionId/appium/events\n```\n\nRetrieves events that have occurred in the current session. By default, only driver command\nexecutions are recorded in the log, but drivers or plugins may define additional event types.\nClients can log events by using the [`logCustomEvent`](#logcustomevent) endpoint.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------- | ----------------------------------------------- | ----------------------- |\n| `type?` | One or more types to filter the returned events | string or array |\n\n#### Response\n\n`EventHistory` - an object whose keys correspond to the types of logged events. Event types can be\ngrouped into three categories, as shown by the following example response:\n\n```json\n{\n \"commands\": [\n { \"cmd\": \"getStatus\", \"startTime\": 1756887645447, \"endTime\": 1756887645454 }\n ],\n \"driverevent\": [1756887645454],\n \"namespace:event\": [1756887645454]\n}\n```\n\n- The `commands` key is always included in the endpoint response. Its value is an array of objects,\n where each object includes 3 parameters:\n - `cmd`: name of the executed command\n - `startTime`: the command execution start time (in milliseconds), as a Unix timestamp\n - `endTime`: the command execution end time (in milliseconds), as a Unix timestamp\n- Other non-namespaced keys are specific to driver/plugin implementations. Their value is an array\n of event times (in milliseconds), as Unix timestamps.\n- Namespaced keys can be added using the `logCustomEvent` endpoint, but may also be provided by\n drivers/plugins. Their value is an array of event times (in milliseconds), as Unix timestamps.\n\n### logCustomEvent\n\n```\nPOST /session/:sessionId/appium/log_event\n```\n\nLogs a custom event, which can be retrieved using the [`getLogEvents`](#getlogevents) endpoint.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | -------------------------------------------------------------------------- | ------ |\n| `vendor` | Name of the namespace (vendor) used to prefix the event | string |\n| `event` | Name of the event | string |\n\n#### Response\n\n`null`\n\n### getDeviceTime\n\n```\nPOST /session/:sessionId/appium/device/system_time\n```\n\nRetrieves the current system time of the device under test.\n\n#### Parameters\n\n| Name | Description | Type | Default |\n| --------- | ---------------------------------------- | ------ | ---------------------- |\n| `format?` | Format to use for the returned timestamp | string | `YYYY-MM-DDTHH:mm:ssZ` |\n\n#### Response\n\n`string` - the device time\n\n### activateApp\n\n```\nPOST /session/:sessionId/appium/device/activate_app\n```\n\nActivates an app on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------------------- | ----------------------------------------------------------- | ------- |\n| `appId` or `bundleId` | App identifier such as Android app package or iOS bundle ID | string |\n| `options?` | Driver-specific launch options | unknown |\n\n#### Response\n\n`void`\n\n### terminateApp\n\n```\nPOST /session/:sessionId/appium/device/terminate_app\n```\n\nTerminates an app on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------------------- | ----------------------------------------------------------- | ------- |\n| `appId` or `bundleId` | App identifier such as Android app package or iOS bundle ID | string |\n| `options?` | Driver-specific termination options | unknown |\n\n#### Response\n\n`void`\n\n### queryAppState\n\n```\nPOST /session/:sessionId/appium/device/app_state\n```\n\nRetrieves the state of an app on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------------------- | ----------------------------------------------------------- | ------ |\n| `appId` or `bundleId` | App identifier such as Android app package or iOS bundle ID | string |\n\n#### Response\n\n`number` - an integer value indicating the app state:\n\n| Number | App State |\n| ------ | ------------------------------- |\n| `0` | Not installed |\n| `1` | Not running |\n| `2` | Running in background suspended |\n| `3` | Running in background |\n| `4` | Running in foreground |\n\n### installApp\n\n```\nPOST /session/:sessionId/appium/device/install_app\n```\n\nInstalls an app on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| ---------- | --------------------------------------------- | ------- |\n| `appPath` | Absolute local filepath or URL to an app file | string |\n| `options?` | Driver-specific install options | unknown |\n\n#### Response\n\n`void`\n\n### removeApp\n\n```\nPOST /session/:sessionId/appium/device/remove_app\n```\n\nUninstalls an app from the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------------------- | ----------------------------------------------------------- | ------- |\n| `appId` or `bundleId` | App identifier such as Android app package or iOS bundle ID | string |\n| `options?` | Driver-specific uninstall options | unknown |\n\n#### Response\n\n`boolean` - `true` if uninstall was successful, otherwise `false`\n\n### isAppInstalled\n\n```\nPOST /session/:sessionId/appium/device/app_installed\n```\n\nDetermines if an app is installed on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------------------- | ----------------------------------------------------------- | ------ |\n| `appId` or `bundleId` | App identifier such as Android app package or iOS bundle ID | string |\n\n#### Response\n\n`boolean` - `true` if app is installed, otherwise `false`\n\n### hideKeyboard\n\n```\nPOST /session/:sessionId/appium/device/hide_keyboard\n```\n\nAttempts to hide the virtual keyboard on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| ----------- | --------------------------------------------------- | ------ |\n| `key?` | Text of a key to use to hide the keyboard | string |\n| `keyCode?` | Key code to trigger to hide the keyboard | string |\n| `keyName?` | Name of a key to use to hide the keyboard | string |\n| `strategy?` | Driver-specific name of a hiding strategy to follow | string |\n\n#### Response\n\n`boolean` - `true` if the operation was successful, otherwise `false`. Note that some platforms\nmay never return a `false` value.\n\n### isKeyboardShown\n\n```\nGET /session/:sessionId/appium/device/is_keyboard_shown\n```\n\nDetermines if the virtual keyboard is shown on the device under test.\n\n#### Response\n\n`boolean` - `true` if the keyboard is shown, otherwise `false`\n\n### pushFile\n\n```\nPOST /session/:sessionId/appium/device/push_file\n```\n\nPushes data to a file on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ----------------------------------------------- | ------ |\n| `data` | Base64-encoded data to be written to the file | string |\n| `path` | Remote path on the device to create the file at | string |\n\n#### Response\n\n`void`\n\n### pullFile\n\n```\nPOST /session/:sessionId/appium/device/pull_file\n```\n\nRetrieves data from a file on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ------------------------------------- | ------ |\n| `path` | Remote path of the file on the device | string |\n\n#### Response\n\n`string` - the Base64-encoded contents of the file\n\n### pullFolder\n\n```\nPOST /session/:sessionId/appium/device/pull_folder\n```\n\nRetrieves data from a directory on the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ------------------------------------------ | ------ |\n| `path` | Remote path of the directory on the device | string |\n\n#### Response\n\n`string` - the Base64-encoded zip file of the directory contents\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/reference/api/bidi.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: WebDriver BiDi Protocol\n---\n\n\n\nThe following is a list of [W3C WebDriver BiDi protocol](https://w3c.github.io/webdriver-bidi/)\ncommands supported in Appium.\n\nUnlike other protocols that specify URL endpoints, the WebDriver BiDi protocol specifies commands\nsent as a websocket event, that both drivers and clients can emit or listen to.\n\n### bidiStatus\n\n```\nsession.status\n```\n\n> WebDriver BiDi documentation: [session.status](https://w3c.github.io/webdriver-bidi/#command-session-status)\n\nRetrieves the current status of the Appium server.\n\n#### Response\n\n[`GetStatusResult`](./webdriver.md#response_2)\n\n### bidiSubscribe\n\n```\nsession.subscribe\n```\n\n> WebDriver BiDi documentation: [session.subscribe](https://w3c.github.io/webdriver-bidi/#command-session-subscribe)\n\nSubscribes to one or more BiDi events.\n\n#### Parameters\n\n| Name | Description | Type | Default |\n| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ------- |\n| `contexts?` | Contexts in which to subscribe to the specified events. By default, the global context scope is applied. | string[] | `['']` |\n| `events` | Names of events to subscribe to | string[] | |\n\n#### Response\n\n`null`\n\n### bidiUnsubscribe\n\n```\nsession.unsubscribe\n```\n\n> WebDriver BiDi documentation: [session.unsubscribe](https://w3c.github.io/webdriver-bidi/#command-session-unsubscribe)\n\nUnsubscribes from one or more BiDi events.\n\n#### Parameters\n\n| Name | Description | Type | Default |\n| ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------ | ------- |\n| `contexts?` | Contexts in which to unsubscribe from the specified events. By default, the global scope is applied. | string[] | `['']` |\n| `events` | Names of events to unsubscribe from | string[] | |\n\n#### Response\n\n`null`\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/reference/api/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: API Endpoints\n---\n\nHere you can find various API endpoints exposed by the main Appium module through its base driver,\nas well as the endpoints added or modified by official plugins.\n\nSince all Appium drivers inherit the Appium base driver, they support all of its endpoints as well,\nbut may additionally define endpoints of their own. Refer to the documentation of your\n[Appium driver](../../ecosystem/drivers.md) to learn about its specific endpoints.\n\nThe recommended way of calling these API endpoints is through your [Appium client](../../ecosystem/clients.md).\nRefer to the documentation of your client for the exact commands used to invoke specific endpoints.\n\nAll endpoints are grouped by their protocol, with an additional group for plugin endpoints:\n\n
\n\n- [**WebDriver Protocol**](./webdriver.md)\n- [**WebDriver BiDi Protocol**](./bidi.md)\n- [**JSON Wire Protocol**](./jsonwp.md)\n- [**Mobile JSON Wire Protocol**](./mjsonwp.md)\n- [**Appium Protocol**](./appium.md)\n- [**Other Protocols**](./others.md)\n- [**Endpoints Used by Official Plugins**](./plugins.md)\n\n
\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/reference/api/jsonwp.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: JSON Wire Protocol\n---\n\n\n\nThe following is a list of legacy [JSON Wire Protocol (JSONWP)](https://www.selenium.dev/documentation/legacy/json_wire_protocol/)\nendpoints supported in Appium.\n\n### getSession\n\n```\nGET /session/:sessionId\n```\n\n> JSONWP documentation: [/session/:sessionId](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionid)\n\nRetrieves the capabilities of the current session.\n\nAppium implements a modified version of this endpoint. If the `appium:eventTimings` capability is\nset to `true`, the returned result will additionally include the `events` key, whose value contains\nthe event history and timings.\n\n!!! warning \"Deprecated\"\n\n For retrieving capabilities, please use [`getAppiumSessionCapabilities`](./appium.md#getappiumsessioncapabilities).
\n For retrieving event history, please use [`getLogEvents`](./appium.md#getlogevents).\n\n#### Response\n\n`Capabilities` - an object containing the session capabilities, and the event history (if applicable)\n\n### availableIMEEngines\n\n```\nGET /session/:sessionId/ime/available_engines\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/available_engines](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimeavailable_engines)\n\nRetrieves all IME (input method editor) engines available on the device under test.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the [UiAutomator2 and Espresso drivers](../../ecosystem/drivers.md)\n\n#### Response\n\n`string[]` - a list of available IME engines\n\n### getActiveIMEEngine\n\n```\nGET /session/:sessionId/ime/active_engine\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/active_engine](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimeactive_engine)\n\nRetrieves the name of the active IME engine.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers\n\n#### Response\n\n`string` - the name of the active IME engine\n\n### isIMEActivated\n\n```\nGET /session/:sessionId/ime/activated\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/activated](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimeactivated)\n\nDetermines if IME input is available and active.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers\n\n#### Response\n\n`boolean` - `true` if IME is active, otherwise `false`\n\n### deactivateIMEEngine\n\n```\nPOST /session/:sessionId/ime/deactivate\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/deactivate](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimedeactivate)\n\nDeactivates the currently active IME engine.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers\n\n#### Response\n\n`null`\n\n### activateIMEEngine\n\n```\nPOST /session/:sessionId/ime/activate\n```\n\n> JSONWP documentation: [/session/:sessionId/ime/activate](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidimeactivate)\n\nActivates an IME engine.\n\n!!! warning \"Deprecated\"\n\n In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | ---------------------------------- | ------ |\n| `engine` | Name of the IME engine to activate | string |\n\n#### Response\n\n`null`\n\n### getOrientation\n\n```\nGET /session/:sessionId/orientation\n```\n\n> JSONWP documentation: [/session/:sessionId/orientation](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidorientation)\n\nRetrieves the current orientation of the device under test.\n\n#### Response\n\n`string` - either `PORTRAIT` or `LANDSCAPE`\n\n### setOrientation\n\n```\nPOST /session/:sessionId/orientation\n```\n\n> JSONWP documentation: [/session/:sessionId/orientation](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidorientation)\n\nSets the orientation of the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------------- | ------------------------------------------------------------------------------------------------------- | ------ |\n| `orientation` | New device orientation. Supported values are `PORTRAIT` or `LANDSCAPE`. | string |\n\n#### Response\n\n`null`\n\n### getGeoLocation\n\n```\nGET /session/:sessionId/location\n```\n\n> JSONWP documentation: [/session/:sessionId/location](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidlocation)\n\nRetrieves the current location of the device under test.\n\n!!! warning \"Deprecated\"\n\n Please use driver-specific extension methods such as `mobile: getGeoLocation` or\n `mobile: getSimulatedLocation`\n\n#### Response\n\n`Location` - an object with the following properties:\n\n| Name | Description | Type |\n| ----------- | -------------------------------- | ------ |\n| `altitude` | Altitude of the device location | number |\n| `latitude` | Latitude of the device location | number |\n| `longitude` | Longitude of the device location | number |\n\n### setGeoLocation\n\n```\nPOST /session/:sessionId/location\n```\n\n> JSONWP documentation: [/session/:sessionId/location](https://www.selenium.dev/documentation/legacy/json_wire_protocol/#sessionsessionidlocation)\n\nSets the current location of the device under test.\n\n!!! warning \"Deprecated\"\n\n Please use driver-specific extension methods such as `mobile: setGeoLocation` or\n `mobile: setSimulatedLocation`\n\n#### Parameters\n\n| Name | Description | Type |\n| ---------- | ------------------------------------------- | ------------------------- |\n| `location` | New device latitude, longitude and altitude | [`Location`](#response_6) |\n\n#### Response\n\n`null`\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/reference/api/mjsonwp.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Mobile JSON Wire Protocol\n---\n\n\n\nThe following is a list of legacy [Mobile JSON Wire Protocol (MJSONWP)](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md)\nendpoints supported in Appium.\n\n### getRotation\n\n```\nGET /session/:sessionId/rotation\n```\n\n> MJSONWP documentation: [Device Rotation](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-rotation)\n\nRetrieves the current spatial orientation of the device under test.\n\n#### Response\n\n`Rotation` - an object with the following properties:\n\n| Name | Description | Type |\n| ---- | ---------------------------------------------------- | ------ |\n| `x` | Degrees by which the device is rotated on its X axis | number |\n| `y` | Degrees by which the device is rotated on its Y axis | number |\n| `z` | Degrees by which the device is rotated on its Z axis | number |\n\n### setRotation\n\n```\nPOST /session/:sessionId/rotation\n```\n\n> MJSONWP documentation: [Device Rotation](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-rotation)\n\nSets the spatial orientation of the device under test.\n\n#### Parameters\n\n| Name | Description | Type |\n| ---- | ---------------------------------------------------- | ------ |\n| `x` | Degrees by which the device is rotated on its X axis | number |\n| `y` | Degrees by which the device is rotated on its Y axis | number |\n| `z` | Degrees by which the device is rotated on its Z axis | number |\n\n#### Response\n\n`null`\n\n### getCurrentContext\n\n```\nGET /session/:sessionId/context\n```\n\n> MJSONWP documentation: [Webviews and Other Contexts](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts)\n\nRetrieves the active application context.\n\n#### Response\n\n`string` - the name of the active context\n\n### setContext\n\n```\nPOST /session/:sessionId/context\n```\n\n> MJSONWP documentation: [Webviews and Other Contexts](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts)\n\nSets an application context as the active context.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | -------------------------------------------- | ------ |\n| `name` | Name of the context to set as the active one | string |\n\n#### Response\n\n`null`\n\n### getContexts\n\n```\nGET /session/:sessionId/contexts\n```\n\n> MJSONWP documentation: [Webviews and Other Contexts](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts)\n\nRetrieves all available application contexts.\n\n#### Response\n\n`string[]` - the names of available contexts\n\n### getNetworkConnection\n\n```\nGET /session/:sessionId/network_connection\n```\n\n> MJSONWP documentation: [Device Modes](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes)\n\nRetrieves the current state of network types (data, Wi-Fi, airplane mode).\n\n!!! warning \"Deprecated\"\n\n Please use driver-specific extension methods such as `mobile: getConnectivity`\n\n#### Response\n\n`NetworkConnectionState` - a number indicating the current network state:\n\n| Value | Data | Wi-Fi | Airplane Mode |\n| ----- | ---- | ----- | ------------- |\n| `0` | OFF | OFF | OFF |\n| `1` | OFF | OFF | ON |\n| `2` | OFF | ON | OFF |\n| `4` | ON | OFF | OFF |\n| `6` | ON | ON | OFF |\n\n### setNetworkConnection\n\n```\nPOST /session/:sessionId/network_connection\n```\n\n> MJSONWP documentation: [Device Modes](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes)\n\nSets the state of network types (data, Wi-Fi, airplane mode).\n\n!!! warning \"Deprecated\"\n\n Please use driver-specific extension methods such as `mobile: setConnectivity`\n\n#### Parameters\n\n|
Name
| Description |
Type
|\n| --------------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------- |\n| `parameters` | Object containing the `type` key, whose value is the desired network state | `{\"type\": `[`NetworkConnectionState`](#response_5)`}` |\n\n#### Response\n\n[`NetworkConnectionState`](#response_5) - the new network state\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/reference/api/others.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Other Protocols\n---\n\n\n\nThe following is a list of endpoints supported in Appium that are defined in other protocols.\n\n## Chromedriver Protocol\n\nThe Chromedriver protocol is an extension of the W3C WebDriver protocol, supported in Appium\nclients using Chromedriver. It specifies both its own extension commands, as well as\nvendor-agnostic commands.\n\n!!! warning\n\n Endpoints specified by this protocol are not officially documented.\n\n### executeCdp\n\n```\nPOST /session/:sessionId/:vendor/cdp/execute\n```\n\nExecutes a Chrome DevTools Protocol (CDP) method, using the implementation of the vendor identified\nby `:vendor`. Refer to [the CDP documentation](https://chromedevtools.github.io/devtools-protocol/)\nfor a list of available methods and their parameters.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | ----------------------------------- | ------ |\n| `cmd` | Name of the CDP method to execute | string |\n| `params` | Parameters passed to the CDP method | object |\n\n#### Response\n\n`any` - the result of executing the CDP method\n\n## Compute Pressure Protocol\n\nThe [Compute Pressure protocol](https://www.w3.org/TR/compute-pressure/) is an extension of the W3C\nWebDriver protocol.\n\n### createVirtualPressureSource\n\n```\nPOST /session/:sessionId/pressuresource\n```\n\n> Compute Pressure documentation: [Create Virtual Pressure Source](https://www.w3.org/TR/compute-pressure/#create-virtual-pressure-source)\n\nCreates a new virtual pressure source.\n\n#### Parameters\n\n|
Name
| Description | Type | Default |\n| --------------------------------- | ------------------------------------------------------------- | ------- | ------- |\n| `type` | Type of pressure source to create | string | |\n| `supported?` | Whether the pressure source should be configured as supported | boolean | `true` |\n\n#### Response\n\n`null`\n\n### updateVirtualPressureSource\n\n```\nPOST /session/:sessionId/pressuresource/:pressureSourceType\n```\n\n> Compute Pressure documentation: [Update Virtual Pressure Source](https://www.w3.org/TR/compute-pressure/#update-virtual-pressure-source)\n\nUpdates the state of a virtual pressure source with the type identified by `:pressureSourceType`.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | ----------------------------------------------------------------------------------------------------------------- | ------ |\n| `sample` | Pressure state. Supported values are `nominal`, `fair`, `serious`, or `critical`. | string |\n\n#### Response\n\n`null`\n\n### deleteVirtualPressureSource\n\n```\nDELETE /session/:sessionId/pressuresource/:pressureSourceType\n```\n\n> Compute Pressure documentation: [Delete Virtual Pressure Source](https://www.w3.org/TR/compute-pressure/#delete-virtual-pressure-source)\n\nDeletes the virtual pressure source with the type identified by `:pressureSourceType`.\n\n#### Response\n\n`null`\n\n## Custom Handlers Protocol\n\nThe [Custom Handlers protocol](https://html.spec.whatwg.org/multipage/system-state.html#user-agent-automation)\nis an extension of the W3C WebDriver protocol, defined by the HTML Standard specification.\n\n### setRPHRegistrationMode\n\n```\nPOST /session/:sessionId/custom-handlers/set-mode\n```\n\n> Custom Handlers documentation: [Set RPH Registration Mode](https://html.spec.whatwg.org/multipage/system-state.html#user-agent-automation)\n\nSets the protocol handler automation mode, for processing registrations of custom protocol handlers.\nBy default, this mode is set to `none`.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ------------------------------------------------------------------------------------------------------------------- | ------ |\n| `mode` | Automation mode to set. Supported values are `autoAccept`, `autoReject`, or `none`. | string |\n\n#### Response\n\n`null`\n\n## Device Posture Protocol\n\nThe [Device Posture protocol](https://www.w3.org/TR/device-posture/) is an extension of the W3C\nWebDriver protocol.\n\n### setDevicePosture\n\n```\nPOST /session/:sessionId/deviceposture\n```\n\n> Device Posture documentation: [Set Device Posture](https://www.w3.org/TR/device-posture/#set-device-posture)\n\nSets the device posture, overriding the posture set by the device hardware.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------- | ------------------------------------------------------------------------------------------------------------------------- | ------ |\n| `posture` | Posture to which the device should be set. Supported values are `continuous` or `folded`. | string |\n\n#### Response\n\n`null`\n\n### clearDevicePosture\n\n```\nDELETE /session/:sessionId/deviceposture\n```\n\n> Device Posture documentation: [Clear Device Posture](https://www.w3.org/TR/device-posture/#clear-device-posture)\n\nClears the previously set device posture, returning posture control back to the device hardware.\n\n#### Response\n\n`null`\n\n## Federated Credential Management Protocol\n\nThe [Federated Credential Management protocol](https://www.w3.org/TR/fedcm-1) (FedCM) is an\nextension of the W3C WebDriver protocol. Clients can enable this protocol by using the\n[`fedcm:accounts`](https://www.w3.org/TR/fedcm-1/#webdriver-capability) capability.\n\n### fedCMCancelDialog\n\n```\nPOST /session/:sessionId/fedcm/canceldialog\n```\n\n> FedCM documentation: [Cancel Dialog](https://www.w3.org/TR/fedcm-1/#webdriver-canceldialog)\n\nCancels the currently open FedCM dialog.\n\n#### Response\n\n`null`\n\n### fedCMSelectAccount\n\n```\nPOST /session/:sessionId/fedcm/selectaccount\n```\n\n> FedCM documentation: [Select Account](https://www.w3.org/TR/fedcm-1/#webdriver-selectaccount)\n\nSelects an account to use for the currently open FedCM dialog.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------------- | ------------------------------------------------------ | ------ |\n| `accountIndex` | Index of the account in the list of available accounts | number |\n\n#### Response\n\n`null`\n\n### fedCMClickDialogButton\n\n```\nPOST /session/:sessionId/fedcm/clickdialogbutton\n```\n\n> FedCM documentation: [Click Dialog Button](https://www.w3.org/TR/fedcm-1/#webdriver-clickdialogbutton)\n\nClicks a button in the currently open FedCM dialog.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------------- | ------------------------------------------------------------------------------------------------------------ | ------ |\n| `dialogButton` | Identifier of the button to click. Must be set to `ConfirmIdpLoginContinue`. | string |\n\n#### Response\n\n`null`\n\n### fedCMGetAccounts\n\n```\nGET /session/:sessionId/fedcm/accountlist\n```\n\n> FedCM documentation: [Account List](https://www.w3.org/TR/fedcm-1/#webdriver-accountlist)\n\nRetrieves all accounts that the user can select in the currently open FedCM dialog.\n\n#### Response\n\n`FedCMAccount[]` - an array of objects, where each object includes the following properties:\n\n|
Name
| Description | Type |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------ |\n| `accountId` | Account ID | string |\n| `email` | Account email | string |\n| `name` | Account name | string |\n| `givenName?` | Account given name | string |\n| `pictureUrl?` | Account picture URL | string |\n| `idpConfigUrl` | URL of the identity provider configuration file | string |\n| `loginState` | Login state. Set to `SignUp` if the account is not connected, otherwise `SignIn`. | string |\n| `termsOfServiceUrl?` | Terms of Service URL of the website, if `loginState` is set to `SignUp` | string |\n| `privacyPolicyUrl?` | Privacy Policy URL of the website, if `loginState` is set to `SignUp` | string |\n\n### fedCMGetTitle\n\n```\nGET /session/:sessionId/fedcm/gettitle\n```\n\n> FedCM documentation: [Get Title](https://www.w3.org/TR/fedcm-1/#webdriver-gettitle)\n\nRetrieves the title and subtitle (if one exists) of the currently open FedCM dialog.\n\n#### Response\n\n`FedCMDialogTitle` - an object with the following properties:\n\n| Name | Description | Type |\n| ----------- | --------------- | ------ |\n| `title` | Dialog title | string |\n| `subtitle?` | Dialog subtitle | string |\n\n### fedCMGetDialogType\n\n```\nGET /session/:sessionId/fedcm/getdialogtype\n```\n\n> FedCM documentation: [Get Dialog Type](https://www.w3.org/TR/fedcm-1/#webdriver-getdialogtype)\n\nRetrieves the type of the currently open FedCM dialog.\n\n#### Response\n\n`string` - can be set to `AutoReauthn`, `AccountChooser`, or `ConfirmIdpLogin`\n\n### fedCMSetDelayEnabled\n\n```\nPOST /session/:sessionId/fedcm/setdelayenabled\n```\n\n> FedCM documentation: [Set Delay Enabled](https://www.w3.org/TR/fedcm-1/#webdriver-setdelayenabled)\n\nSets the state of the promise rejection delay, which is used to prevent information leakage about\nthe logged in state of the user.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------- | --------------------------------------------- | ------- |\n| `enabled` | Whether to enable the promise rejection delay | boolean |\n\n#### Response\n\n`null`\n\n### fedCMResetCooldown\n\n```\nPOST /session/:sessionId/fedcm/resetcooldown\n```\n\n> FedCM documentation: [Reset Cooldown](https://www.w3.org/TR/fedcm-1/#webdriver-resetcooldown)\n\nResets the cooldown delay used after dismissing a FedCM dialog.\n\n#### Response\n\n`null`\n\n## Generic Sensor Protocol\n\nThe [Generic Sensor protocol](https://www.w3.org/TR/generic-sensor/) is an extension of the W3C\nWebDriver protocol.\n\n### createVirtualSensor\n\n```\nPOST /session/:sessionId/sensor\n```\n\n> Generic Sensor documentation: [Create Virtual Sensor](https://www.w3.org/TR/generic-sensor/#create-virtual-sensor-command)\n\nCreates a new virtual sensor.\n\n#### Parameters\n\n|
Name
| Description | Type | Default |\n| ---------------------------------- | ---------------------------------------------------- | ------- | ------- |\n| `type` | Type of sensor to create | string | |\n| `connected?` | Whether the sensor should be configured as connected | boolean | `true` |\n| `maxSamplingFrequency?` | Maximum sensor sampling frequency | number | |\n| `minSamplingFrequency?` | Minimum sensor sampling frequency | number | |\n\n#### Response\n\n`null`\n\n### getVirtualSensorInfo\n\n```\nGET /session/:sessionId/sensor/:sensorType\n```\n\n> Generic Sensor documentation: [Get Virtual Sensor Information](https://www.w3.org/TR/generic-sensor/#get-virtual-sensor-information-command)\n\nRetrieves information about the virtual sensor with the type identified by `:sensorType`.\n\n#### Response\n\n`GetVirtualSensorInfoResponse` - an object containing the `requestedSamplingFrequency` key, whose\nvalue is the requested sampling frequency of the sensor type\n\n### updateVirtualSensorReading\n\n```\nPOST /session/:sessionId/sensor/:sensorType\n```\n\n> Generic Sensor documentation: [Update Virtual Sensor Reading](https://www.w3.org/TR/generic-sensor/#update-virtual-sensor-reading-command)\n\nUpdates the virtual sensor with the type identified by `:sensorType` with a new reading.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------- | ---------------------------------------------------------------- | ------ |\n| `reading` | Object containing reading properties specific to the sensor type | object |\n\n#### Response\n\n`null`\n\n### deleteVirtualSensor\n\n```\nDELETE /session/:sessionId/sensor/:sensorType\n```\n\n> Generic Sensor documentation: [Delete Virtual Sensor](https://www.w3.org/TR/generic-sensor/#delete-virtual-sensor-command)\n\nDeletes the virtual sensor with the type identified by `:sensorType`.\n\n#### Response\n\n`null`\n\n## Permissions Protocol\n\nThe [Permissions protocol](https://www.w3.org/TR/permissions/) is an extension of the W3C WebDriver\nprotocol.\n\n### setPermissions\n\n```\nPOST /session/:sessionId/permissions\n```\n\n> Permissions documentation: [Set Permission](https://www.w3.org/TR/permissions/#webdriver-command-set-permission)\n\nSimulates user modification of the permission state of a PermissionDescriptor (a permissible feature\nwith optional additional properties).\n\n#### Parameters\n\n|
Name
| Description | Type |\n| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |\n| `descriptor` | Object specifying the feature name in its `name` key, along with any other keys for additional properties | object |\n| `state` | New permission state for this descriptor. Supported values are: `granted`, `denied`, or `prompt`. | string |\n\n#### Response\n\n`null`\n\n## Reporting Protocol\n\nThe [Reporting protocol](https://www.w3.org/TR/reporting-1/) is an extension of the W3C WebDriver\nprotocol.\n\n### generateTestReport\n\n```\nPOST /session/:sessionId/reporting/generate_test_report\n```\n\n> Reporting documentation: [Generate Test Report](https://www.w3.org/TR/reporting-1/#generate-test-report-command)\n\nSimulates the generation of a test report, which can be retrieved by registered reporting observers.\n\n#### Parameters\n\n| Name | Description | Type | Default |\n| --------- | ------------------------------------------ | ------ | --------- |\n| `message` | Message displayed in the report | string | |\n| `group?` | Destination group to deliver the report to | string | `default` |\n\n#### Response\n\n`null`\n\n## Secure Payment Confirmation Protocol\n\nThe [Secure Payment Confirmation protocol](https://www.w3.org/TR/secure-payment-confirmation) (SPC)\nis an extension of the W3C WebDriver protocol.\n\n### setSPCTransactionMode\n\n```\nPOST /session/:sessionId/secure-payment-confirmation/set-mode\n```\n\n> SPC documentation: [Set SPC Transaction Mode](https://www.w3.org/TR/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode)\n\nSets the transaction automation mode, for automated handling of transaction confirmation prompts.\nBy default, this mode is set to `none`.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |\n| `mode` | Automation mode to set. Supported values are `autoAccept`, `autoChooseToAuthAnotherWay`, `autoReject`, or `autoOptOut`. | string |\n\n#### Response\n\n`null`\n\n## Selenium Protocol\n\nThe Selenium protocol is an extension of the W3C WebDriver protocol, supported in Appium clients\nbased on Selenium.\n\n!!! warning\n\n Endpoints specified by this protocol are not officially documented.\n\n### getLog\n\n```\nPOST /session/:sessionId/se/log\n```\n\nRetrieves the logs for a given log type. Supported log types depend on the driver, and can be\nretrieved using the [`getLogTypes`](#getlogtypes) endpoint.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ----------------------- | ------ |\n| `type` | Type of log to retrieve | string |\n\n#### Response\n\n`GetLogEntry[]` - an array of log entries.\n\nTypically a log entry is an object with the following properties:\n\n| Name | Description | Type |\n| ----------- | --------------------------------------------------------------------- | ------ |\n| `level` | Level at which the message was logged | string |\n| `message` | Contents of the actual log message | string |\n| `timestamp` | Message timestamp (in milliseconds) in Unix format | number |\n\n### getLogTypes\n\n```\nGET /session/:sessionId/se/log/types\n```\n\nRetrieves the available log types that can be used to call the [`getLog`](#getlog) endpoint.\n\n#### Response\n\n`string[]` - an array of log types\n\n## Web Authentication Protocol\n\nThe [Web Authentication protocol](https://w3c.github.io/webauthn/) (WebAuthn) is an extension of\nthe W3C WebDriver protocol. Clients can enable this protocol by using the\n[`webauthn:virtualAuthenticators`](https://w3c.github.io/webauthn/#sctn-automation-webdriver-capability)\ncapability.\n\n### addVirtualAuthenticator\n\n```\nPOST /session/:sessionId/webauthn/authenticator\n```\n\n> WebAuthn documentation: [Add Virtual Authenticator](https://w3c.github.io/webauthn/#add-virtual-authenticator)\n\nCreates a software [virtual authenticator](https://w3c.github.io/webauthn/#virtual-authenticators).\n\n#### Parameters\n\n|
Name
| Description | Type | Default |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------- |\n| `isUserConsenting?` | Whether to always grant user consent | boolean | true |\n| `isUserVerified?` | Whether to always succeed in user verification. Ignored if `hasUserVerification` is set to `false`. | boolean | false |\n| `hasResidentKey?` | Whether client-side discoverable credentials are supported | boolean | false |\n| `hasUserVerification?` | Whether user verification is supported | boolean | false |\n| `protocol` | Protocol of this authenticator. Supported values are: `ctap1/u2f`, `ctap2`, or `ctap2_1`. | string | |\n| `transport` | Type of transport used to communicate with clients. Supported values are: `ble`, `hybrid`, `internal`, `nfc`, `smart-card`, or `usb`. | string | |\n\n#### Response\n\n`string` - the ID of the created authenticator\n\n### removeVirtualAuthenticator\n\n```\nDELETE /session/:sessionId/webauthn/authenticator/:authenticatorId\n```\n\n> WebAuthn documentation: [Remove Virtual Authenticator](https://w3c.github.io/webauthn/#remove-virtual-authenticator)\n\nRemoves the virtual authenticator identified by `:authenticatorId`.\n\n#### Response\n\n`null`\n\n### addAuthCredential\n\n```\nPOST /session/:sessionId/webauthn/authenticator/:authenticatorId/credential\n```\n\n> WebAuthn documentation: [Add Credential](https://w3c.github.io/webauthn/#add-credential)\n\nInjects a [Public Key Credential Source](https://w3c.github.io/webauthn/#public-key-credential-source)\ninto the virtual authenticator identified by `:authenticatorId`.\n\n#### Parameters\n\n|
Name
| Description | Type |\n| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |\n| `credentialId` | Credential ID, in Base64url encoding | string |\n| `isResidentCredential` | Whether to create a client-side discoverable credential. If set to `false`, a server-side credential is created instead. | boolean |\n| `privateKey` | Asymmetric key package containing a single private key, in Base64url encoding | string |\n| `rpId` | Relying Party ID the credential is scoped to | string |\n| `signCount?` | Initial value for the signature counter. Set to `0` if omitted. | number |\n| `userHandle?` | User handle associated with the credential, in Base64url encoding. Set to `null` if omitted. | string |\n\n#### Response\n\n`null`\n\n### getAuthCredential\n\n```\nGET /session/:sessionId/webauthn/authenticator/:authenticatorId/credentials\n```\n\n> WebAuthn documentation: [Get Credentials](https://w3c.github.io/webauthn/#get-credentials)\n\nRetrieves all Public Key Credential Sources stored in the virtual authenticator identified by\n`:authenticatorId`.\n\n#### Response\n\n`Credential[]` - an array of credential objects. Each object has the following properties:\n\n|
Name
| Description | Type | Default |\n| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------- | ------- |\n| `credentialId` | Credential ID, in Base64url encoding | string | |\n| `isResidentCredential` | Whether the credential is client-side discoverable (`true`) or server-side (`false`) | boolean | |\n| `largeBlob` | Large, per-credential blog, in Base64url encoding | string | `null` |\n| `privateKey` | Asymmetric key package containing a single private key, in Base64url encoding | string | |\n| `rpId` | Relying Party ID the credential is scoped to | string | |\n| `signCount` | Initial value for the signature counter | number | `0` |\n| `userHandle` | User handle associated with the credential, in Base64url encoding | string | `null` |\n\n### removeAuthCredential\n\n```\nDELETE /session/:sessionId/webauthn/authenticator/:authenticatorId/credentials/:credentialId\n```\n\n> WebAuthn documentation: [Remove Credential](https://w3c.github.io/webauthn/#remove-credential)\n\nRemoves the Public Key Credential Source identified by `:credentialId` from the virtual authenticator\nidentified by `:authenticatorId`.\n\n#### Response\n\n`null`\n\n### removeAllAuthCredentials\n\n```\nDELETE /session/:sessionId/webauthn/authenticator/:authenticatorId/credentials\n```\n\n> WebAuthn documentation: [Remove All Credentials](https://w3c.github.io/webauthn/#remove-all-credentials)\n\nRemoves all Public Key Credential Sources from the virtual authenticator identified by\n`:authenticatorId`.\n\n#### Response\n\n`null`\n\n### setUserAuthVerified\n\n```\nPOST /session/:sessionId/webauthn/authenticator/:authenticatorId/uv\n```\n\n> WebAuthn documentation: [Set User Verified](https://w3c.github.io/webauthn/#set-user-verified)\n\nSets the `isUserVerified` property of the virtual authenticator identified by `:authenticatorId`.\n\n#### Parameters\n\n| Name | Description | Type |\n| ---------------- | ---------------------------------------------- | ------- |\n| `isUserVerified` | Whether to always succeed in user verification | boolean |\n\n#### Response\n\n`null`\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/reference/api/plugins.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: Plugin Endpoints\n---\n\n\n\nThe following is a list of endpoints added or modified by official Appium plugins.\n\n## Execute Driver Plugin\n\n### executeDriverScript\n\n```\nPOST /session/:sessionId/appium/execute_driver\n```\n\nExecutes a driver script in a child process.\n\n#### Parameters\n\n| Name | Description | Type | Default |\n| ---------- | ------------------------------------------------------------------- | ------ | ------------- |\n| `script` | Script to be executed | string | |\n| `type?` | Name of the library executing the script | string | `webdriverio` |\n| `timeout?` | Timeout (in milliseconds) for the script process | number | `3600000` |\n\n#### Response\n\n`RunScriptResult` - an object with the following properties:\n\n| Name | Description | Type |\n| -------- | -------------------------------------- | ------ |\n| `result` | Result returned by the script | any |\n| `logs` | Logs generated during script execution | object |\n\n## Images Plugin\n\n### compareImages\n\n```\nPOST /session/:sessionId/appium/compare_images\n```\n\nCompares two images using the specified mode of comparison:\n\n- `matchFeatures`: whether `firstImage` is a rotated, scaled, or otherwise modified version of `secondImage`\n- `matchTemplate`: whether `firstImage` contains one or more occurrences of `secondImage`\n- `getSimilarity`: calculate similarity score between two images of equal size\n\n#### Parameters\n\n|
Name
| Description | Type | Default |\n| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ------- |\n| `mode` | Mode of comparison. Supported values are: `matchFeatures`, `getSimilarity`, or `matchTemplate`. | string | |\n| `firstImage` | Base64-encoded image file | string or Buffer | |\n| `secondImage` | Base64-encoded image file | string or Buffer | |\n| `options?` | Options specific to the `mode` value (see below) | object | `{}` |\n\n**`options` for `mode=matchFeatures`**\n\n|
Name
| Description | Type |
Default
|\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ | ------------------------------------ |\n| `detectorName?` | Name of the OpenCV feature detector to use. Supported values are: `AKAZE`, `AgastFeatureDetector`, `BRISK`, `FastFeatureDetector`, `GFTTDetector`, `KAZE`, `MSER`, or `ORB`. | string | `ORB` |\n| `goodMatchesFactor?` | Maximum number of 'good' matches; or a function accepting current distance, min distance and max distance, and returning a boolean indicating whether the match should be included or not. | number or function | |\n| `matchFunc?` | Name of the OpenCV descriptor matcher to use. Supported values are: `FlannBased`, `BruteForce`, `BruteForce-L1`, `BruteForce-Hamming`, `BruteForce-HammingLUT`, or `BruteForce-SL2`. | string | `BruteForce` |\n| `visualize?` | Whether to include an image of the matcher visualization in the response | boolean | `false` |\n\n**`options` for `mode=matchTemplate`**\n\n|
Name
| Description | Type |
Default
|\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------ |\n| `matchNeighbourThreshold?` | Maximum pixel distance between two matches to consider them the same match | number | `10` |\n| `method?` | Name of the OpenCV template matching method to use. Supported values are: `TM_CCOEFF`, `TM_CCOEFF_NORMED`, `TM_CCORR`, `TM_CCORR_NORMED`, `TM_SQDIFF`, or `TM_SQDIFF_NORMED`. | string | `TM_CCOEFF_NORMED` |\n| `multiple?` | Whether to look for multiple occurrences of the image | boolean | `false` |\n| `threshold?` | Threshold to use for accepting/rejecting a match | number | `0.5` |\n| `visualize?` | Whether to include an image of the matcher visualization in the response | boolean | `false` |\n\n**`options` for `mode=getSimilarity`**\n\n|
Name
| Description | Type |
Default
|\n| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------ |\n| `method?` | Name of the OpenCV template matching method to use. Supported values are: `TM_CCOEFF`, `TM_CCOEFF_NORMED`, `TM_CCORR`, `TM_CCORR_NORMED`, `TM_SQDIFF`, or `TM_SQDIFF_NORMED`. | string | `TM_CCOEFF_NORMED` |\n| `visualize?` | Whether to include an image of the matcher visualization in the response | boolean | `false` |\n\n#### Response\n\n`ComparisonResult` - an object whose properties depend on the `mode` input parameter:\n\n**`ComparisonResult` for `mode=matchFeatures`**\n\n|
Name
| Description | Type |\n| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------- |\n| `count` | Number of matched edges on both images, after applying `goodMatchesFactor` (if specified). | number |\n| `points1` | Array of matching points on `firstImage` | `{x, y}[]` |\n| `points2` | Array of matching points on `secondImage` | `{x, y}[]` |\n| `rect1` | Bounding rectangle for `points1` | `{x, y, width, height}` |\n| `rect2` | Bounding rectangle for `points2` | `{x, y, width, height}` |\n| `totalCount` | Total number of matched edges on both images, before applying `goodMatchesFactor` (if specified) | number |\n| `visualization?` | Image of the matcher visualization. Only included if the `visualize` input option was enabled. | Buffer |\n\n**`ComparisonResult` for `mode=matchTemplate`**\n\n|
Name
| Description | Type |\n| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- |\n| `rect` | Region of `firstImage` where a match was found for `secondImage` | `{x, y, width, height}` |\n| `multiple?` | Array of all comparison results. Only included if the `multiple` input option was enabled. | `{rect, score, visualization?}` |\n| `score` | Similarity score between both images in the range `[0.0, 1.0]` | number |\n| `visualization?` | Image of the matcher visualization. Only included if the `visualize` input option was enabled. | Buffer |\n\n**`ComparisonResult` for `mode=getSimilarity`**\n\n|
Name
| Description | Type |\n| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------ |\n| `score` | Similarity score between both images in the range `[0.0, 1.0]` | number |\n| `visualization?` | Image of the matcher visualization. Only included if the `visualize` input option was enabled. | Buffer |\n\n### findElement\n\n```\nPOST /session/:sessionId/element\n```\n\nModifies the [`findElement`](./webdriver.md#findelement) endpoint:\n\n- Adds `-image` to the supported values for the `using` parameter (the location strategy)\n\n### findElements\n\n```\nPOST /session/:sessionId/elements\n```\n\nModifies the [`findElements`](./webdriver.md#findelements) endpoint:\n\n- Adds `-image` to the supported values for the `using` parameter (the location strategy)\n\n### performActions\n\n```\nPOST /session/:sessionId/actions\n```\n\nModifies the [`performActions`](./webdriver.md#performactions) endpoint:\n\n- If any action in `actions` includes `origin`, whose value is an image element:\n - Removes the `origin` property\n - Increments the `x` and `y` properties by the center coordinates of the image element\n\n## Relaxed Caps Plugin\n\n### createSession\n\n```\nPOST /session\n```\n\nModifies the [`createSession`](./webdriver.md#createsession) endpoint:\n\n- Adds the `appium:` prefix to all keys in `capabilities`, unless they match a standard W3C\n capability, or already have any prefix\n\n## Storage Plugin\n\n!!! tip\n\n All endpoints for this plugin can be invoked without creating a session, allowing you to prepare\n your test environment in advance.\n\n### addStorageItem\n\n```\nPOST /storage/add\n```\n\nAdds a new file to the storage.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | --------------------------------------------------------------------------------------------- | ------ |\n| `name` | Name used for saving the file (must not include path separator characters) | string |\n| `sha1` | SHA1 hash of the file to be uploaded | string |\n\n#### Response\n\n`AddRequestResult` - an object with the following properties:\n\n| Name | Description | Type |\n| ----------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------ |\n| `ttlMs` | Timeout (in milliseconds) for both web sockets to remain active, or for a file payload to be successfully uploaded | number |\n| `ws.events` | Path for the events web socket used to notify about upload success or failure | string |\n| `ws.stream` | Path for the streaming web socket used to upload the file content | string |\n\nExample:\n\n```json\n{\n \"ws\": {\n \"stream\": \"/storage/add/ccc963411b2621335657963322890305ebe96186/stream\",\n \"events\": \"/storage/add/ccc963411b2621335657963322890305ebe96186/events\"\n },\n \"ttlMs\": 300000\n}\n```\n\n### deleteStorageItem\n\n```\nPOST /storage/delete\n```\n\nDeletes a file in the storage.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ------------------------------ | ------ |\n| `name` | Name of the file to be deleted | string |\n\n#### Response\n\n`boolean` - `true` upon successful file deletion, or `false` if the file does not exist in\nthe storage\n\n### listStorageItems\n\n```\nGET /storage/list\n```\n\nList all files present in the storage.\n\n#### Response\n\n`List` - a list of items, where each item has the following properties:\n\n| Name | Description | Type |\n| ------ | ----------------------------------------------- | ------ |\n| `name` | Name of the file in the storage | string |\n| `path` | Full path to the file on the remote file system | string |\n| `size` | File size in bytes | number |\n\n### resetStorage\n\n```\nPOST /storage/reset\n```\n\nDeletes all uploaded files and stops any incomplete uploads.\nIf the [`APPIUM_STORAGE_KEEP_ALL` flag](../cli/env-vars.md) is set, all uploaded files will be\npreserved, and only the incomplete uploads will be stopped.\n\n#### Response\n\n`void`\n\n## Universal XML Plugin\n\n### findElement\n\n```\nPOST /session/:sessionId/element\n```\n\nModifies the [`findElement`](./webdriver.md#findelement) endpoint:\n\n- Adds support for universal node/attribute names for the `value` parameter (the selector)\n\n### findElements\n\n```\nPOST /session/:sessionId/elements\n```\n\nModifies the [`findElements`](./webdriver.md#findelements) endpoint:\n\n- Adds support for universal node/attribute names for the `value` parameter (the selector)\n\n### getPageSource\n\n```\nGET /session/:sessionId/source\n```\n\nModifies the [`getPageSource`](./webdriver.md#getpagesource) endpoint:\n\n- After retrieving the result, translates node/attribute names to their universal names\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/reference/api/webdriver.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: WebDriver Protocol\n---\n\n\n\nThe following is a list of [W3C WebDriver protocol](https://w3c.github.io/webdriver/) endpoints\nsupported in Appium.\n\n!!! info\n\n Most WebDriver endpoints are not implemented within Appium itself, and are instead proxied\n directly to the driver, which is responsible for the actual endpoint implementation.\n\n### createSession\n\n```\nPOST /session\n```\n\n> WebDriver documentation: [New Session](https://w3c.github.io/webdriver/#new-session)\n\nCreates a new WebDriver session.\n\nAppium implements a modified version of this endpoint for historical reasons. While the W3C\nendpoint only accepts 1 parameter, Appium's implementation allows up to 3 parameters, as this was\nrequired by the legacy JSON Wire Protocol (JSONWP). Since Appium 2, the JSONWP format is no longer\nsupported, and any of the 3 parameters can be used to specify the W3C capabilities.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------------------- | ----------------------------------------------------------------------------- | --------------- |\n| `w3cCapabilities1?` | Capabilities of the new session | `W3CDriverCaps` |\n| `w3cCapabilities2?` | Another location for the new session capabilities (legacy) | `W3CDriverCaps` |\n| `w3cCapabilities?` | Another location for the new session capabilities (legacy) | `W3CDriverCaps` |\n\n#### Response\n\n`CreateResult` - an object with the following properties:\n\n| Name | Description | Type |\n| -------------- | ------------------------------------ | ------ |\n| `sessionId` | ID of the new session | string |\n| `capabilities` | Capabilities processed by the driver | object |\n\n### deleteSession\n\n```\nDELETE /session/:sessionId\n```\n\n> WebDriver documentation: [Delete Session](https://w3c.github.io/webdriver/#delete-session)\n\nCloses the current session.\n\n#### Response\n\n`null`\n\n### getStatus\n\n```\nGET /status\n```\n\n> WebDriver documentation: [Status](https://w3c.github.io/webdriver/#status)\n\nRetrieves the current status of the Appium server.\n\n#### Response\n\n`GetStatusResult` - an object with the following properties:\n\n| Name | Description | Type |\n| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |\n| `build` | Implementation-specific information. For Appium, this is an object containing the `version` key, whose value matches the Appium server version. | `{version}` |\n| `message` | Explanation of the `ready` value | string |\n| `ready` | Whether the server is able to create new sessions | boolean |\n\n### getTimeouts\n\n```\nGET /session/:sessionId/timeouts\n```\n\n> WebDriver documentation: [Get Timeouts](https://w3c.github.io/webdriver/#get-timeouts)\n\nRetrieves the timeout values of the current session.\n\n#### Response\n\n`GetTimeoutsResult` - an object with the following properties:\n\n| Name | Description | Type |\n| ---------- | --------------------- | ------ |\n| `command` | Command timeout | number |\n| `implicit` | Implicit wait timeout | number |\n\n### timeouts\n\n```\nPOST /session/:sessionId/timeouts\n```\n\n> WebDriver documentation: [Set Timeouts](https://w3c.github.io/webdriver/#set-timeouts)\n\nSets the timeout values of the current session.\n\n#### Parameters\n\n| Name | Description | Type |\n| ----------- | ---------------------------------------------------------- | ------ |\n| `implicit?` | Implicit wait timeout (in milliseconds) | number |\n| `pageLoad?` | Page load timeout (in milliseconds) | number |\n| `script?` | Script timeout (in milliseconds) | number |\n\n#### Response\n\n`null`\n\n### setUrl\n\n```\nPOST /session/:sessionId/url\n```\n\n> WebDriver documentation: [Navigate To](https://w3c.github.io/webdriver/#navigate-to)\n\nNavigates the current top-level browsing context to the specified URL.\n\n#### Parameters\n\n| Name | Description | Type |\n| ----- | ------------------ | ------ |\n| `url` | URL to navigate to | string |\n\n#### Response\n\n`null`\n\n### getUrl\n\n```\nGET /session/:sessionId/url\n```\n\n> WebDriver documentation: [Get Current URL](https://w3c.github.io/webdriver/#get-current-url)\n\nRetrieves the URL of the current top-level browsing context.\n\n#### Response\n\n`string` - the current URL\n\n### back\n\n```\nPOST /session/:sessionId/back\n```\n\n> WebDriver documentation: [Back](https://w3c.github.io/webdriver/#back)\n\nNavigates backwards in the browser history, if possible.\n\n#### Response\n\n`null`\n\n### forward\n\n```\nPOST /session/:sessionId/forward\n```\n\n> WebDriver documentation: [Forward](https://w3c.github.io/webdriver/#forward)\n\nNavigates forwards in the browser history, if possible.\n\n#### Response\n\n`null`\n\n### refresh\n\n```\nPOST /session/:sessionId/refresh\n```\n\n> WebDriver documentation: [Refresh](https://w3c.github.io/webdriver/#refresh)\n\nReloads the window of the current top-level browsing context.\n\n#### Response\n\n`null`\n\n### title\n\n```\nGET /session/:sessionId/title\n```\n\n> WebDriver documentation: [Get Title](https://w3c.github.io/webdriver/#get-title)\n\nRetrieves the window title of the top-level browsing context.\n\n#### Response\n\n`string` - the page title\n\n### getWindowHandle\n\n```\nGET /session/:sessionId/window\n```\n\n> WebDriver documentation: [Get Window Handle](https://w3c.github.io/webdriver/#get-window-handle)\n\nRetrieves the window handle of the top-level browsing context.\n\n#### Response\n\n`string` - the window handle identifier\n\n### closeWindow\n\n```\nDELETE /session/:sessionId/window\n```\n\n> WebDriver documentation: [Close Window](https://w3c.github.io/webdriver/#close-window)\n\nCloses the current top-level browsing context.\n\n#### Response\n\n`string[]` - an array of zero or more remaining window handle identifiers\n\n### setWindow\n\n```\nPOST /session/:sessionId/window\n```\n\n> WebDriver documentation: [Switch To Window](https://w3c.github.io/webdriver/#switch-to-window)\n\nSelects the top-level browsing context.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | -------------------------------------- | ------ |\n| `handle` | Identifier for the window to switch to | string |\n\n#### Response\n\n`null`\n\n### getWindowHandles\n\n```\nGET /session/:sessionId/window/handles\n```\n\n> WebDriver documentation: [Get Window Handles](https://w3c.github.io/webdriver/#get-window-handles)\n\nRetrieves a list of window handles for every top-level browsing context.\n\n#### Response\n\n`string[]` - an array of zero or more window handle identifiers\n\n### createNewWindow\n\n```\nPOST /session/:sessionId/window/new\n```\n\n> WebDriver documentation: [New Window](https://w3c.github.io/webdriver/#new-window)\n\nCreates a new window or tab.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | --------------------------------------------------------------- | ------ |\n| `type` | Type of window to create (`window` or `tab`) | string |\n\n#### Response\n\n`NewWindow` - an object with the following properties:\n\n| Name | Description | Type |\n| -------- | ----------------------------------------------------------------- | ------ |\n| `handle` | ID of the created window handle | string |\n| `type` | Type of the created window (`window` or `tab`) | string |\n\n### setFrame\n\n```\nPOST /session/:sessionId/frame\n```\n\n> WebDriver documentation: [Switch To Frame](https://w3c.github.io/webdriver/#switch-to-frame)\n\nSelects the top-level or child browsing context as the current browsing context.\n\n#### Parameters\n\n| Name | Description | Type |\n| ---- | ------------------------ | ------------------------------------------ |\n| `id` | Identifier for the frame | null, number, or [`Element`](#response_23) |\n\n#### Response\n\n`null`\n\n### switchToParentFrame\n\n```\nPOST /session/:sessionId/frame/parent\n```\n\n> WebDriver documentation: [Switch To Parent Frame](https://w3c.github.io/webdriver/#switch-to-parent-frame)\n\nSets the current browsing context to the parent of the current browsing context.\n\n#### Response\n\n`null`\n\n### getWindowRect\n\n```\nGET /session/:sessionId/window/rect\n```\n\n> WebDriver documentation: [Get Window Rect](https://w3c.github.io/webdriver/#get-window-rect)\n\nRetrieves the size and position of the current window.\n\n#### Response\n\n`Rect` - an object with the following properties:\n\n| Name | Description | Type |\n| -------- | ---------------------------------------------------- | ------ |\n| `height` | Window height | number |\n| `width` | Window width | number |\n| `x` | X-axis position of the top-left corner of the window | number |\n| `y` | Y-axis position of the top-left corner of the window | number |\n\n### setWindowRect\n\n```\nPOST /session/:sessionId/window/rect\n```\n\n> WebDriver documentation: [Set Window Rect](https://w3c.github.io/webdriver/#set-window-rect)\n\nSets the size and/or position of the current window.\n\n#### Parameters\n\n| Name | Description | Type |\n| --------- | ---------------------------------------------------- | ------ |\n| `height?` | Window height | number |\n| `width?` | Window width | number |\n| `x?` | X-axis position of the top-left corner of the window | number |\n| `y?` | Y-axis position of the top-left corner of the window | number |\n\n#### Response\n\n[`Rect`](#response_18) - the new window size\n\n### maximizeWindow\n\n```\nPOST /session/:sessionId/window/maximize\n```\n\n> WebDriver documentation: [Maximize Window](https://w3c.github.io/webdriver/#maximize-window)\n\nMaximizes the current window.\n\n#### Response\n\n[`Rect`](#response_18) - the new window size\n\n### minimizeWindow\n\n```\nPOST /session/:sessionId/window/minimize\n```\n\n> WebDriver documentation: [Minimize Window](https://w3c.github.io/webdriver/#minimize-window)\n\nMinimizes the current window.\n\n#### Response\n\n[`Rect`](#response_18) - the new window size\n\n### fullScreenWindow\n\n```\nPOST /session/:sessionId/window/fullscreen\n```\n\n> WebDriver documentation: [Fullscreen Window](https://w3c.github.io/webdriver/#fullscreen-window)\n\nMakes the current window fullscreen.\n\n#### Response\n\n[`Rect`](#response_18) - the new window size\n\n### active\n\n```\nGET /session/:sessionId/element/active\n```\n\n> WebDriver documentation: [Get Active Element](https://w3c.github.io/webdriver/#get-active-element)\n\nRetrieves the currently focused element.\n\n#### Response\n\n`Element` - an object with the following properties:\n\n| Name | Description | Type |\n| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ |\n| `element-6066-11e4-a52e-4f735466cecf` | Element ID | string |\n| `ELEMENT` | Element ID (same value as `element-6066-11e4-a52e-4f735466cecf`). This key was used in the legacy Mobile JSON Wire Protocol (MJSONWP). | string |\n\n### elementShadowRoot\n\n```\nGET /session/:sessionId/element/:elementId/shadow\n```\n\n> WebDriver documentation: [Get Shadow Root](https://w3c.github.io/webdriver/#get-shadow-root)\n\nRetrieves the shadow root of the element identified by `:elementId`.\n\n#### Response\n\n`ShadowElement` - an object with the following properties:\n\n| Name | Description | Type |\n| ------------------------------------ | -------------- | ------ |\n| `shadow-6066-11e4-a52e-4f735466cecf` | Shadow root ID | string |\n\n### findElement\n\n```\nPOST /session/:sessionId/element\n```\n\n> WebDriver documentation: [Find Element](https://w3c.github.io/webdriver/#find-element)\n\nFinds the first element in the current browsing context that matches the provided selector and\nlocation strategy, starting from the root node.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------- | --------------------------------------- | ------ |\n| `using` | Location strategy to use when searching | string |\n| `value` | Selector used to find the element | string |\n\n#### Response\n\n[`Element`](#response_23)\n\n### findElements\n\n```\nPOST /session/:sessionId/elements\n```\n\n> WebDriver documentation: [Find Elements](https://w3c.github.io/webdriver/#find-elements)\n\nFinds all elements in the current browsing context that match the provided selector and location\nstrategy, starting from the root node.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------- | --------------------------------------- | ------ |\n| `using` | Location strategy to use when searching | string |\n| `value` | Selector used to find the element | string |\n\n#### Response\n\n`Element[]` - an array containing zero or more [`Element` objects](#response_23)\n\n### findElementFromElement\n\n```\nPOST /session/:sessionId/element/:elementId/element\n```\n\n> WebDriver documentation: [Find Element From Element](https://w3c.github.io/webdriver/#find-element-from-element)\n\nFinds the first element in the current browsing context that matches the provided selector and\nlocation strategy, starting from the element node identified by `:elementId`.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------- | --------------------------------------- | ------ |\n| `using` | Location strategy to use when searching | string |\n| `value` | Selector used to find the element | string |\n\n#### Response\n\n[`Element`](#response_23)\n\n### findElementsFromElement\n\n```\nPOST /session/:sessionId/element/:elementId/elements\n```\n\n> WebDriver documentation: [Find Elements From Element](https://w3c.github.io/webdriver/#find-elements-from-element)\n\nFinds all elements in the current browsing context that match the provided selector and location\nstrategy, starting from the element node identified by `:elementId`.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------- | --------------------------------------- | ------ |\n| `using` | Location strategy to use when searching | string |\n| `value` | Selector used to find the element | string |\n\n#### Response\n\n[`Element[]`](#response_26)\n\n### findElementFromShadowRoot\n\n```\nPOST /session/:sessionId/shadow/:shadowId/element\n```\n\n> WebDriver documentation: [Find Element From Shadow Root](https://w3c.github.io/webdriver/#find-element-from-shadow-root)\n\nFinds the first element in the current browsing context that matches the provided selector and\nlocation strategy, starting from the shadow root node identified by `:shadowId`.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------- | --------------------------------------- | ------ |\n| `using` | Location strategy to use when searching | string |\n| `value` | Selector used to find the element | string |\n\n#### Response\n\n[`Element`](#response_23)\n\n### findElementsFromShadowRoot\n\n```\nPOST /session/:sessionId/shadow/:shadowId/elements\n```\n\n> WebDriver documentation: [Find Elements From Shadow Root](https://w3c.github.io/webdriver/#find-elements-from-shadow-root)\n\nFinds all elements in the current browsing context that match the provided selector and location\nstrategy, starting from the shadow root node identified by `:shadowId`.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------- | --------------------------------------- | ------ |\n| `using` | Location strategy to use when searching | string |\n| `value` | Selector used to find the element | string |\n\n#### Response\n\n[`Element[]`](#response_26)\n\n### elementSelected\n\n```\nGET /session/:sessionId/element/:elementId/selected\n```\n\n> WebDriver documentation: [Is Element Selected](https://w3c.github.io/webdriver/#is-element-selected)\n\nDetermines if the element identified by `:elementId` is currently selected. This property is only\nrelevant to certain element types, such as checkboxes, radio buttons, or options.\n\n#### Response\n\n`boolean` - `true` if the element is selected, otherwise `false`\n\n### elementDisplayed\n\n```\nGET /session/:sessionId/element/:elementId/displayed\n```\n\n> WebDriver documentation: [Element Displayedness](https://w3c.github.io/webdriver/#element-displayedness)\n\nDetermines if the element identified by `:elementId` is currently displayed.\n\n#### Response\n\n`boolean` - `true` if the element is displayed, otherwise `false`\n\n### getAttribute\n\n```\nGET /session/:sessionId/element/:elementId/attribute/:name\n```\n\n> WebDriver documentation: [Get Element Attribute](https://w3c.github.io/webdriver/#get-element-attribute)\n\nRetrieves the value of the `:name` attribute for the element identified by `:elementId`.\n\n#### Response\n\n`string` - the attribute value, or `null` if the attribute does not exist\n\n### getProperty\n\n```\nGET /session/:sessionId/element/:elementId/property/:name\n```\n\n> WebDriver documentation: [Get Element Property](https://w3c.github.io/webdriver/#get-element-property)\n\nRetrieves the value of the `:name` property for the element identified by `:elementId`.\n\n#### Response\n\n`string` - the property value, or `null` if the property does not exist\n\n### getCssProperty\n\n```\nGET /session/:sessionId/element/:elementId/css/:propertyName\n```\n\n> WebDriver documentation: [Get Element CSS Value](https://w3c.github.io/webdriver/#get-element-css-value)\n\nRetrieves the value of the `:propertyName` computed CSS property for the element identified by\n`:elementId`.\n\n#### Response\n\n`string` - the CSS property value, or `null` if the property does not exist\n\n### getText\n\n```\nGET /session/:sessionId/element/:elementId/text\n```\n\n> WebDriver documentation: [Get Element Text](https://w3c.github.io/webdriver/#get-element-text)\n\nRetrieves the text of the element identified by `:elementId`, as well as the text of its child\nelements (if any).\n\n#### Response\n\n`string` - the element text (including its child elements)\n\n### getName\n\n```\nGET /session/:sessionId/element/:elementId/name\n```\n\n> WebDriver documentation: [Get Element Tag Name](https://w3c.github.io/webdriver/#get-element-tag-name)\n\nRetrieves the tag name of the element identified by `:elementId`.\n\n#### Response\n\n`string` - the element tag name\n\n### getElementRect\n\n```\nGET /session/:sessionId/element/:elementId/rect\n```\n\n> WebDriver documentation: [Get Element Rect](https://w3c.github.io/webdriver/#get-element-rect)\n\nRetrieves the dimensions and coordinates of the element identified by `:elementId`.\n\n#### Response\n\n[`Rect`](#response_18)\n\n### elementEnabled\n\n```\nGET /session/:sessionId/element/:elementId/enabled\n```\n\n> WebDriver documentation: [Is Element Enabled](https://w3c.github.io/webdriver/#is-element-enabled)\n\nDetermines if the element identified by `:elementId` is currently enabled. This property is only\nrelevant to certain element types, such as buttons, input fields, checkboxes, etc.\n\n#### Response\n\n`boolean` - `true` if the element is enabled, otherwise `false`\n\n### getComputedRole\n\n```\nGET /session/:sessionId/element/:elementId/computedrole\n```\n\n> WebDriver documentation: [Get Computed Role](https://w3c.github.io/webdriver/#get-computed-role)\n\nRetrieves the computed [WAI-ARIA](https://w3c.github.io/aria/#introroles) role of the element\nidentified by `:elementId`.\n\n#### Response\n\n`string` - the element computed role\n\n### getComputedLabel\n\n```\nGET /session/:sessionId/element/:elementId/computedlabel\n```\n\n> WebDriver documentation: [Get Computed Label](https://w3c.github.io/webdriver/#get-computed-label)\n\nRetrieves the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name) of the\nelement identified by `:elementId`.\n\n#### Response\n\n`string` - the element accessible name\n\n### click\n\n```\nPOST /session/:sessionId/element/:elementId/click\n```\n\n> WebDriver documentation: [Element Click](https://w3c.github.io/webdriver/#element-click)\n\nClicks on the identified by `:elementId`.\n\n#### Response\n\n`null`\n\n### clear\n\n```\nPOST /session/:sessionId/element/:elementId/clear\n```\n\n> WebDriver documentation: [Element Clear](https://w3c.github.io/webdriver/#element-clear)\n\nClears the identified by `:elementId`. This functionality is only relevant to certain element types,\nsuch as input fields.\n\n#### Response\n\n`null`\n\n### setValue\n\n```\nPOST /session/:sessionId/element/:elementId/value\n```\n\n> WebDriver documentation: [Element Send Keys](https://w3c.github.io/webdriver/#element-send-keys)\n\nSends keys to the element the identified by `:elementId`. This functionality is only relevant to\nkeyboard-interactable element types, such as input fields.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ------------ | ------ |\n| `text` | Text to send | string |\n\n#### Response\n\n`null`\n\n### getPageSource\n\n```\nGET /session/:sessionId/source\n```\n\n> WebDriver documentation: [Get Page Source](https://w3c.github.io/webdriver/#get-page-source)\n\nRetrieves the page/application source of the current browsing context in HTML/XML format.\n\n#### Response\n\n`string` - the DOM of the current browsing context\n\n### execute\n\n```\nPOST /session/:sessionId/execute/sync\n```\n\n> WebDriver documentation: [Execute Script](https://w3c.github.io/webdriver/#execute-script)\n\nExecutes synchronous JavaScript code in the current browsing context.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | ------------------------------ | ------ |\n| `script` | Script function to execute | string |\n| `args` | Arguments passed to the script | array |\n\n#### Response\n\n`any` - the result of the script execution\n\n### executeAsync\n\n```\nPOST /session/:sessionId/execute/async\n```\n\n> WebDriver documentation: [Execute Async Script](https://w3c.github.io/webdriver/#execute-async-script)\n\nExecutes asynchronous JavaScript code in the current browsing context.\n\nThe `script` function is provided an additional argument (applied after `args`), which is a\nfunction that can be invoked (within `script`) to trigger script completion. The first argument\npassed to this completion function is returned as the endpoint response.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | -------------------------- | ------ |\n| `script` | Script function to execute | string |\n| `args` | Arguments for the script | array |\n\n#### Response\n\n`any` - the result returned by the completion function of the script\n\n### getCookies\n\n```\nGET /session/:sessionId/cookie\n```\n\n> WebDriver documentation: [Get Cookies](https://w3c.github.io/webdriver/#get-cookies)\n\nRetrieves all cookies of the current browsing context.\n\n#### Response\n\n`Cookie[]` - an array containing zero or more [`Cookie` objects](#response_49)\n\n### getCookie\n\n```\nGET /session/:sessionId/cookie/:name\n```\n\n> WebDriver documentation: [Get Named Cookie](https://w3c.github.io/webdriver/#get-named-cookie)\n\nRetrieves a cookie with the name identified by `:name` from the current browsing context.\n\n#### Response\n\n`Cookie` - an object with the following properties:\n\n| Name | Description | Type |\n| ----------- | -------------------------------------------------------------------------------- | ------- |\n| `domain?` | Cookie domain | string |\n| `expiry?` | Cookie expiration time (in seconds) as a Unix timestamp | number |\n| `httpOnly?` | Whether the cookie is an HTTP only cookie | boolean |\n| `name` | Cookie name | string |\n| `path?` | Cookie path | string |\n| `sameSite?` | SameSite policy type of the cookie (either `Lax` or `Strict`) | string |\n| `secure?` | Whether the cookie is a secure cookie | boolean |\n| `value` | Cookie value | string |\n\n### setCookie\n\n```\nPOST /session/:sessionId/cookie\n```\n\n> WebDriver documentation: [Add Cookie](https://w3c.github.io/webdriver/#add-cookie)\n\nAdds a cookie to the cookie store of the current browsing context.\n\n#### Parameters\n\n| Name | Description | Type |\n| -------- | -------------------- | ------------------------ |\n| `cookie` | Cookie object to add | [`Cookie`](#response_49) |\n\n#### Response\n\n`null`\n\n### deleteCookie\n\n```\nDELETE /session/:sessionId/cookie/:name\n```\n\n> WebDriver documentation: [Delete Cookie](https://w3c.github.io/webdriver/#delete-cookie)\n\nDeletes a cookie with the name identified by `:name` from the current browsing context.\n\n#### Response\n\n`null`\n\n### deleteCookies\n\n```\nDELETE /session/:sessionId/cookie\n```\n\n> WebDriver documentation: [Delete All Cookies](https://w3c.github.io/webdriver/#delete-all-cookies)\n\nDeletes all cookies from the current browsing context.\n\n#### Response\n\n`null`\n\n### performActions\n\n```\nPOST /session/:sessionId/actions\n```\n\n> WebDriver documentation: [Perform Actions](https://w3c.github.io/webdriver/#perform-actions)\n\nPerforms a sequence of [actions](https://w3c.github.io/webdriver/#actions).\n\n#### Parameters\n\n| Name | Description | Type |\n| --------- | ----------------------- | ------------------ |\n| `actions` | Array of action objects | `ActionSequence[]` |\n\n#### Response\n\n`null`\n\n### releaseActions\n\n```\nDELETE /session/:sessionId/actions\n```\n\n> WebDriver documentation: [Release Actions](https://w3c.github.io/webdriver/#release-actions)\n\nReleases all currently depressed keys and pointer buttons.\n\n#### Response\n\n`null`\n\n### postDismissAlert\n\n```\nPOST /session/:sessionId/alert/dismiss\n```\n\n> WebDriver documentation: [Dismiss Alert](https://w3c.github.io/webdriver/#dismiss-alert)\n\nDismisses the currently displayed user prompt.\n\n#### Response\n\n`null`\n\n### postAcceptAlert\n\n```\nPOST /session/:sessionId/alert/accept\n```\n\n> WebDriver documentation: [Accept Alert](https://w3c.github.io/webdriver/#accept-alert)\n\nAccepts the currently displayed user prompt.\n\n#### Response\n\n`null`\n\n### getAlertText\n\n```\nGET /session/:sessionId/alert/text\n```\n\n> WebDriver documentation: [Get Alert Text](https://w3c.github.io/webdriver/#get-alert-text)\n\nRetrieves the text of the currently displayed user prompt.\n\n#### Response\n\n`string` - prompt text\n\n### setAlertText\n\n```\nPOST /session/:sessionId/alert/text\n```\n\n> WebDriver documentation: [Send Alert Text](https://w3c.github.io/webdriver/#send-alert-text)\n\nSets the text of the currently displayed user prompt.\n\n#### Parameters\n\n| Name | Description | Type |\n| ------ | ----------- | ------ |\n| `text` | Text to set | string |\n\n#### Response\n\n`null`\n\n### getScreenshot\n\n```\nGET /session/:sessionId/screenshot\n```\n\n> WebDriver documentation: [Take Screenshot](https://w3c.github.io/webdriver/#take-screenshot)\n\nTakes a screenshot of the current browsing context.\n\n#### Response\n\n`string` - a base64-encoded PNG image\n\n### getElementScreenshot\n\n```\nGET /session/:sessionId/element/:elementId/screenshot\n```\n\n> WebDriver documentation: [Take Element Screenshot](https://w3c.github.io/webdriver/#take-element-screenshot)\n\nTakes a screenshot of the visible region encompassed by the bounding rectangle of the element\nidentified by `:elementId`.\n\n#### Response\n\n`string` - a base64-encoded PNG image\n\n### printPage\n\n```\nPOST /session/:sessionId/print\n```\n\n> WebDriver documentation: [Print Page](https://w3c.github.io/webdriver/#print-page)\n\nPrints the page by rendering it as a paginated PDF document.\n\n#### Parameters\n\n|
Name
| Description |
Type
| Default |\n| --------------------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------- | ---------- |\n| `orientation?` | Page orientation. Supported values are `portrait` or `landscape`. | string | `portrait` |\n| `scale?` | Page scale. Supported values are in the range `[0.1, 2]`. | number | `1` |\n| `background?` | Whether to include background images | boolean | `false` |\n| `page?` | Object specifying the page width and height | [`PrintPageSize`](#printpagesize) | `{}` |\n| `margin?` | Object specifying the page margins | [`PrintPageMargins`](#printpagemargins) | `{}` |\n| `shrinkToFit?` | Whether to resize page contents to match `PrintPageSize.width` | boolean | `true` |\n| `pageRanges?` | Array of pages to be printed, for example, `[1, 4, '8-9']` | array | `[]` |\n\n##### `PrintPageSize`\n\n| Name | Description | Type | Default |\n| --------- | -------------------------------------------------------------------------------------------- | ------ | ------- |\n| `width?` | Page width. Must be greater than or equal to `(2.54 / 72)`. | number | `21.59` |\n| `height?` | Page height. Must be greater than or equal to `(2.54 / 72)`. | number | `27.94` |\n\n##### `PrintPageMargins`\n\n| Name | Description | Type | Default |\n| --------- | ----------------------------------------------------------------------------------------- | ------ | ------- |\n| `top?` | Page top margin. Must be greater than or equal to `0`. | number | `1` |\n| `bottom?` | Page bottom margin. Must be greater than or equal to `0`. | number | `1` |\n| `left?` | Page left margin. Must be greater than or equal to `0`. | number | `1` |\n| `right?` | Page right margin. Must be greater than or equal to `0`. | number | `1` |\n\n#### Response\n\n`string` - a base64-encoded PDF document\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/reference/cli/env-vars.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Environment Variables\n---\n\nThe primary ways of configuring the Appium server are via [Command-Line Arguments](./server.md) or\nthe [Config File](../../guides/config.md). However, some more advanced features are toggled or\nconfigured via environment variables. To set environment variables, refer to the documentation for\nyour operating system and terminal.\n\nThese are the environment variables that the Appium server understands:\n\n|
Variable
| Description |\n| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `APPIUM_APPS_CACHE_IGNORE_URL_QUERY` | Set this to a truthy value to remove any query part of a URL when using it as a cache key. See the corresponding [feature request](https://discuss.appium.io/t/regarding-app-caching-when-using-aws-s3-presigned-urls/42713) for more details. |\n| `APPIUM_APPS_CACHE_MAX_AGE` | Set the maximum age (in minutes) for [cached applications](../../guides/caching.md). Do not set it to a lower number than the duration of a single session startup. Default: `60 * 24` (24 hours) |\n| `APPIUM_APPS_CACHE_MAX_ITEMS` | Set the maximum amount of [cached applications](../../guides/caching.md). Do not set it to a lower number than the amount of apps in all parallel sessions per process. Default: `1024` |\n| `APPIUM_HOME` | Set the path to the Appium home directory, which is used for [Managing Extensions](../../guides/managing-exts.md). Default: `.appium` in the home directory of the current user |\n| `APPIUM_OMIT_PEER_DEPS` | Set this to `1` to add `--omit=peer` to all the NPM commands run internally by Appium. Mostly an internal feature. |\n| `APPIUM_RELOAD_EXTENSIONS` | Set this to a truthy value to cause Appium to re-require extensions when new sessions are created. This feature is mostly useful for [building extensions](../../developing/build-drivers.md). |\n| `APPIUM_TMP_DIR` | Set the path to the directory used for temporary files. Same as the `--tmp` command line argument. |\n\nAppium drivers and plugins may define additional environment variables. The following variables are\nused by official plugins:\n\n|
Variable
| Plugin | Description |\n| -------------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `APPIUM_STORAGE_KEEP_ALL` | `storage` | Set this to `1`, `true` or `yes` to preserve files in the storage after the server process is terminated. By default, stopping the server process also deletes all files in the storage. |\n| `APPIUM_STORAGE_ROOT` | `storage` | Set the path to the directory used for storage. If set to an existing folder, all files in it will be retained after terminating the server, unless specified otherwise using `APPIUM_STORAGE_KEEP_ALL`. |\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/reference/cli/extensions.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: appium driver/plugin\n---\n\n\n\nProvides management options for a specific extension (driver or plugin). Both the `appium driver` and\n`appium plugin` subcommands support the same options.\n\nThe following sub-subcommands are supported: `doctor`, `install`, `list`, `run`, `update`,\nand `uninstall`.\n\n## `doctor`\n\nRuns doctor checks for an installed extension, which validate whether the extension has its prerequisites\nconfigured correctly. Note that not all extensions include doctor checks.\n\n!!! note\n\n If you maintain an Appium extension and would like to add Appium Doctor support for it, check\n out the documentation on [Building Doctor Checks](../../developing/build-doctor-checks.md).\n\n#### Usage\n\n```\nappium {driver|plugin} doctor \n```\n\n| Argument | Description |\n| ---------------- | ----------------------------------------- |\n| `extension-name` | The short name of the installed extension |\n\n#### Options\n\n| Argument | Description | Type |\n| -------- | -------------------------------- | ------- |\n| `--json` | Return the result in JSON format | boolean |\n\n#### Example\n\n- Run doctor checks for the UiAutomator2 driver:\n\n ```\n appium driver doctor uiautomator2\n ```\n\n## `install`\n\nInstalls an extension.\n\n#### Usage\n\n```\nappium {driver|plugin} install \n```\n\n|
Argument
| Description |\n| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `install-spec` | The short name of an official extension, with optional `npm` version or tag modifier. If using the `--source` option, the expected format of this argument will change ([see below](#source-vs-install-spec)). |\n\n#### Options\n\n| Argument | Description | Type |\n| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |\n| `--json` | Return the result in JSON format | boolean |\n| `--package` | The Node.js package name of the extension. Required if `--source` is set to `git` or `github`. | string |\n| `--source` | The location where Appium should look for the given extension. Supported values are `git`, `github`, `local`, or `npm`. Changes the expected format of `install-spec` ([see below](#source-vs-install-spec)). | string |\n\n#### Source vs Install Spec\n\n| `source` | Format of `` |\n| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| None | The short name of an official extension, with optional modifiers as supported by `npm install` (e.g. version or tag) |\n| `git` | The Git URL of the extension |\n| `github` | The GitHub repository URL of the extension |\n| `local` | The local path to the extension containing its `package.json` file |\n| `npm` | The name of the `npm` package, with optional modifiers as supported by `npm install` (e.g. version or tag) |\n\n#### Examples\n\n- Install the latest XCUITest driver:\n\n ```\n appium driver install xcuitest\n ```\n\n- Install the XCUITest driver at version 9.0.0:\n\n ```\n appium driver install xcuitest@9.0.0\n ```\n\n- Install the `beta` version of `@appium/fake-driver` from `npm`:\n\n ```\n appium driver install @appium/fake-driver@beta --source=npm\n ```\n\n- Install a locally-developed plugin:\n\n ```\n appium plugin install /path/to/my/plugin --source=local\n ```\n\n- Install the XCUITest driver from GitHub:\n\n ```\n appium driver install https://github.com/appium/appium-xcuitest-driver --source=github --package=appium-xcuitest-driver\n ```\n\n- Install the XCUITest driver using a Git URL:\n\n ```\n appium driver install git://github.com/appium/appium-xcuitest-driver.git --source=git --package=appium-xcuitest-driver\n ```\n\n- Install a branch of XCUITest driver repository using a Git URL:\n\n ```\n appium driver install git://github.com/appium/appium-xcuitest-driver.git#specific-branch --source=git --package=appium-xcuitest-driver\n ```\n\n## `list`\n\nLists all installed extensions, plus all official extensions that are not installed.\n\n#### Usage\n\n```\nappium {driver|plugin} list\n```\n\n#### Options\n\n|
Argument
| Description | Type |\n| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |\n| `--installed` | Only list all installed extensions | boolean |\n| `--json` | Return the result in JSON format | boolean |\n| `--updates` | List all extensions along with information on whether newer versions are available. Only supported for extensions installed via `npm`. | boolean |\n| `--verbose` | Show additional details for each extension | boolean |\n\n#### Example\n\n- List all installed drivers and check if they have newer versions available:\n\n ```\n appium driver list --installed --updates\n ```\n\n## `run`\n\nRuns an extension script, which can assist with setup or perform other tasks. Note that not all\nextensions include scripts.\n\n#### Usage\n\n```\nappium {driver|plugin} run [script-args]\n```\n\n| Argument | Description |\n| ---------------- | --------------------------------------------- |\n| `extension-name` | The short name of the installed extension |\n| `script-name` | The name of the script to be run |\n| `script-args` | Any additional arguments passed to the script |\n\n#### Options\n\n| Argument | Description | Type |\n| -------- | -------------------------------- | ------- |\n| `--json` | Return the result in JSON format | boolean |\n\n#### Example\n\n- Run the `reset` script included in the UiAutomator2 driver:\n\n ```\n appium driver run uiautomator2 reset\n ```\n\n## `update`\n\nUpdates one or more extensions. Only supported for extensions installed via `npm`. By default,\nAppium will only update minor and patch versions, in order to prevent any breaking changes.\n\n#### Usage\n\n```\nappium {driver|plugin} update \n```\n\n| Argument | Description |\n| ---------------- | -------------------------------------------------------------------------------------------- |\n| `extension-name` | The short name of the installed extension, or `installed` to update all installed extensions |\n\n#### Options\n\n| Argument | Description | Type |\n| ---------- | ----------------------------------------------------------------- | ------- |\n| `--json` | Return the result in JSON format | boolean |\n| `--unsafe` | Allow updates of major versions, which may cause breaking changes | boolean |\n\n#### Examples\n\n- Update the UiAutomator2 driver to its latest major version:\n\n ```\n appium driver update uiautomator2 --unsafe\n ```\n\n- Update all installed plugins:\n\n ```\n appium plugin update installed\n ```\n\n## `uninstall`\n\nRemoves an installed extension.\n\n#### Usage\n\n```\nappium {driver|plugin} uninstall \n```\n\n| Argument | Description |\n| ---------------- | ----------------------------------------- |\n| `extension-name` | The short name of the installed extension |\n\n#### Options\n\n| Argument | Description | Type |\n| -------- | -------------------------------- | ------- |\n| `--json` | Return the result in JSON format | boolean |\n\n#### Example\n\n- Remove the `images` plugin:\n\n ```\n appium plugin uninstall images\n ```\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/reference/cli/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: Command Line Interface\n---\n\nAppium provides a command-line executable (`appium`), which can be used to configure and launch\nthe Appium server, as well as manage Appium extensions (drivers and plugins).\n\nThe executable has four main subcommands: `server`, `driver`, `plugin`, and `setup`. All subcommands\n(and sub-subcommands) can be run with the `--help`/`-h` option for usage instructions.\n\n
\n\n- [**`appium server`**](./server.md) (or simply `appium`)\n\n Start an Appium server\n\n- [**`appium driver`**](./extensions.md)\n\n Manage individual drivers\n\n- [**`appium plugin`**](./extensions.md)\n\n Manage individual plugins\n\n- [**`appium setup`**](./setup.md)\n\n Manage multiple drivers/plugins\n\n
\n\nAppium also recognizes several [environment variables](./env-vars.md), which may be used for\nadvanced configuration.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/reference/cli/server.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - toc\n\ntitle: appium server\n---\n\nLaunches an Appium server.\n\n```\nappium server\n```\n\nYou can also omit the `server` subcommand:\n\n```\nappium\n```\n\n### Options\n\n!!! note\n\n All of these options can also be set via a [Configuration File](../../guides/config.md). Options\n set on the command line will override any options found in a configuration file.\n\n|
Argument
| Description | Type |
Default
|\n| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------------------------------------------------------- |\n| `--address`, `-a` | IPv4/IPv6 address to listen on | string | `0.0.0.0` |\n| `--allow-cors` | Allow web browser connections from any host | boolean | `false` |\n| `--allow-insecure` | List of [insecure features](../../guides/security.md) that should be allowed in this server's sessions. Individual features can be overridden by `--deny-insecure`. Has no effect in combination with `--relaxed-security`. | array | `[]` |\n| `--base-path`, `-pa` | Base path to use as the prefix for all webdriver routes running on the server | string | `\"\"` |\n| `--callback-address`, `-ca` | Callback IP address | string | `0.0.0.0` |\n| `--callback-port`, `-cp` | Callback port | integer | `4723` |\n| `--config` | Path to an [Appium configuration JSON file](../../guides/config.md) | string | |\n| `--debug-log-spacing` | Add exaggerated spacing in logs to help with visual inspection | boolean | `false` |\n| `--default-capabilities`, `-dc` | Capabilities that will be used for each session, unless overridden by received capabilities | object | |\n| `--deny-insecure` | List of [insecure features](../../guides/security.md) that should be disabled in this server's sessions. Since all insecure features are disabled by default, this argument has no effect without either `--allow-insecure` or `--relaxed-security`, and is applied after both. | array | `[]` |\n| `--driver` | Driver-specific configuration. Keys should correspond to driver package names | object | |\n| `--drivers-import-chunk-size` | Maximum number of drivers that can be imported in parallel on server startup | number | `3` |\n| `--keep-alive-timeout`, `-ka` | Timeout (in seconds) to use as both the keep-alive timeout and the connection timeout for all client requests. Disabled if set to `0`. | integer | `600` |\n| `--request-timeout` | Timeout (in seconds) for waiting to receive the entire HTTP request from the client. Disabled if set to `0`. Requests exceeding this timeout will be rejected with the code `HTTP 408`. | integer | `3600` |\n| `--local-timezone` | Use local timezone for log timestamps | boolean | `false` |\n| `--log`, `-g` | Path to a file where the server logs should be output. This does not affect output on the console. | string | |\n| `--log-filters` | List of log filtering rules. See the [log filtering guide](../../guides/log-filters.md) for details. | array | |\n| `--log-level` | The log level for the server logs. Supported values are `debug`, `info`, `warn`, or `error`. Combining two supported values using a colon (e.g. `warn:debug`) allows to set separate log levels for the console and file outputs, respectively. | string | `debug` |\n| `--log-format` | The log format of the server logs. Supported values are `text`, `json`, or `pretty_json`. Setting the value to `json` disables colors. | string | `text` |\n| `--log-no-colors` | Disable colors in the server log | boolean | `false` |\n| `--log-timestamp` | Show timestamps in the server log | boolean | `false` |\n| `--long-stacktrace` | Add long stack traces to log entries. Recommended for debugging only. | boolean | `false` |\n| `--no-perms-check` | Skip various permission checks on the server startup | boolean | `false` |\n| `--nodeconfig` | JSON configuration for registering Appium as a node with Selenium Grid 3 | object | |\n| `--plugin` | Plugin-specific configuration. Keys should correspond to plugin package names | object | |\n| `--plugins-import-chunk-size` | Maximum number of plugins that can be imported in parallel on server startup | number | `7` |\n| `--port`, `-p` | Port to listen on | integer | `4723` |\n| `--relaxed-security` | Allow all [insecure features](../../guides/security.md). Only use this if all clients are in a trusted network and could not potentially break out of the session sandbox. Specific features can be overridden by using `--deny-insecure`. | boolean | `false` |\n| `--session-override` | Enable session override (clobbering) | boolean | `false` |\n| `--shutdown-timeout` | Timeout (in milliseconds) for waiting on all active connections to close, when shutting down the server | number | `5000` |\n| `--ssl-cert-path` | Absolute path to the `.cert` file if TLS is used. Must be provided together with `--ssl-key-path`. See the [SSL/TLS/SPDY Support guide](../../guides/tls.md) for details. | string | |\n| `--ssl-key-path` | Absolute path to the `.key` file if TLS is used. Must be provided together with `--ssl-cert-path`. See the [SSL/TLS/SPDY Support guide](../../guides/tls.md) for details. | string | |\n| `--strict-caps` | Prevent creation of new client sessions that use unsupported capabilities | boolean | `false` |\n| `--tmp` | Absolute path to the directory used for temporary files | string | [`os.tmpdir()`](https://nodejs.org/api/os.html#ostmpdir) |\n| `--use-drivers` | List of drivers to activate. By default, all installed drivers are activated. | array | `[]` |\n| `--use-plugins` | List of plugins to activate. By default, no plugins are activated. Set to `[\"all\"]` to activate all installed plugins. | array | `[]` |\n| `--webhook`, `-G` | URL for an HTTP listener where the server logs should be output. This does not affect output on the console. | string | |\n\n### Info Options\n\nThe following options are used for reference or debug purposes. They are only supported for the base `appium` command (not `appium server`), and will not launch the server.\n\n|
Argument
| Description |\n| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `--show-build-info` | Print detailed information on the Appium server version |\n| `--show-config` | Print the current Appium server configuration details |\n| `--show-debug-info` | Print information on the current environment: details about the operating system, Node.js, and Appium itself |\n| `--version`, `-v` | Print the Appium server version |\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/reference/cli/setup.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\ntitle: appium setup\n---\n\n\n\nInstalls a specific preset of extensions (drivers and plugins), or uninstalls all extensions.\nWhen installing a preset, any already installed extensions are kept intact.\n\nThe following sub-subcommands are supported: `browser`, `desktop`, `mobile`, and `reset`.\n\nRefer to the [Ecosystem documentation](../../ecosystem/index.md) to learn more about the extensions\nmentioned below.\n\n## `browser`\n\nInstalls the following extensions for browser webview testing:\n\n- Drivers: `safari`[^1], `gecko`, `chromium`\n- Plugins: `images`, `inspector`\n\n#### Usage\n\n```\nappium setup browser\n```\n\n## `desktop`\n\nInstalls the following extensions for desktop application testing:\n\n- Drivers: `mac2`[^1], `windows`[^2]\n- Plugins: `images`, `inspector`\n\n#### Usage\n\n```\nappium setup desktop\n```\n\n## `mobile`\n\nInstalls the following extensions for mobile testing:\n\n- Drivers: `uiautomator2`, `xcuitest`[^1], `espresso`\n- Plugins: `images`, `inspector`\n\n#### Usage\n\n```\nappium setup mobile\n```\n\nYou can also omit the `mobile` sub-subcommand:\n\n```\nappium setup\n```\n\n## `reset`\n\nUninstalls all installed extensions, along with their manifest files, from the Appium home\ndirectory. This can be useful if you experience configuration issues on server startup, for\nexample, due to a failed upgrade attempt from an older Appium version.\n\n#### Usage\n\n```\nappium setup reset\n```\n\n[^1]: Only installed if the host machine is running macOS.\n\n[^2]: Only installed if the host machine is running Windows.\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/resources/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - navigation\n - toc\n\ntitle: Additional Resources\n---\n\nHere you can find links to additional Appium resources around the web:\n\n## Websites\n\n- [Appium Pro](https://appiumpro.com) - a blog and newsletter written by one of Appium's\n maintainers, Jonathan Lipps, with lots of useful guides\n\n## Online Courses\n\n- [Appium and Selenium Fundamentals](https://ui.headspin.io/university/learn/appium-selenium-fundamentals-2020) - a comprehensive video course on learning Python, Selenium, and Appium by Jonathan Lipps\n- [Mobile Test Automation with Appium](https://testautomationu.applitools.com/appium-java-tutorial/) - a video course by Moataz Nabil\n- [Advanced Appium](https://www.linkedin.com/learning/advanced-appium) - a video course by Jonathan Lipps\n\n## Conference Archives\n\n- [AppiumConf 2018](https://www.youtube.com/playlist?list=PLhr2WKNPXcZOmOf1k2aqkbMZwnZb2pSZL)\n- [AppiumConf 2019](https://www.youtube.com/playlist?list=PL9Z-JgiTsOYSfJh9YKI9Stj3FMwHERw6w)\n- [AppiumConf 2021](https://www.youtube.com/playlist?list=PL9Z-JgiTsOYRCcJhDfmKAah9XmAp2b903)\n- [AppiumConf 2024](https://www.youtube.com/playlist?list=PL9Z-JgiTsOYQaU5i5LJtAWlh5WVZPi3If)\n- [SeleniumConf & AppiumConf 2025](https://www.youtube.com/playlist?list=PLRdSclUtJDYV2R92TLbmwxws6clruuTjH)\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/docs/zh/sponsors/index.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n---\nhide:\n - navigation\n - toc\n\ntitle: Sponsors & Backers\n---\n\n\n\nAppium is an Apache-2 licensed open source project whose development is made possible entirely by\ndonations of time and money by individuals and companies who benefit from our software and our\nmission. If you'd like to join this amazing group and help ensure Appium's continued development\nand maintenance, you can contribute via Appium's OpenCollective\nHub.\n\n## Development Partners\n\nWe are very grateful for the support of our Development Partners, who donate Appium development and\nmaintenance as part of their employees' core job duties!\n\n\n \"TestMu\n \"TestMu\n\n\n## Strategic Partners\n\nWe are very grateful for the financial and marketing support of our exclusive Strategic Partners,\nwho contribute a significant ongoing investment of funds to help the project attract and reward\ncontributors!\n\n\n \"BrowserStack\"\n \"BrowserStack\"\n\n\n\n \"TestMu\n \"TestMu\n\n\n## Gold Sponsors\n\n
\"Jetify\"\n
\n\n[Become a Gold Sponsor](https://opencollective.com/appium/contribute/gold-sponsor-72877/checkout?interval=month&amount=500&contributeAs=me)\n\n## Silver Sponsors\n\n
\"MagicPod\"\n
\n\n[Become a Silver Sponsor](https://opencollective.com/appium/contribute/silver-sponsor-72876/checkout?interval=month&amount=250&contributeAs=me)\n\n## Bronze Sponsors\n\n
\"Route4Me\"\n \"WebdriverIO\"\n
\n\n[Become a Bronze Sponsor](https://opencollective.com/appium/contribute/sponsors-70690/checkout?interval=month&amount=100&contributeAs=me)\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/appium.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\nimport {getBuildInfo, updateBuildInfo, APPIUM_VER} from './config';\nimport {\n BaseDriver,\n DriverCore,\n errors,\n isSessionCommand,\n PROTOCOLS,\n CREATE_SESSION_COMMAND,\n DELETE_SESSION_COMMAND,\n GET_STATUS_COMMAND,\n LIST_DRIVER_COMMANDS_COMMAND,\n LIST_DRIVER_EXTENSIONS_COMMAND,\n promoteAppiumOptions,\n promoteAppiumOptionsForObject,\n generateDriverLogPrefix,\n isW3cCaps,\n} from '@appium/base-driver';\nimport AsyncLock from 'async-lock';\nimport {parseCapsForInnerDriver, pullSettings, makeNonW3cCapsError} from './utils';\nimport {util} from '@appium/support';\nimport {getDefaultsForExtension} from './schema';\nimport {DRIVER_TYPE, BIDI_BASE_PATH, SESSION_DISCOVERY_FEATURE} from './constants';\nimport * as bidiCommands from './bidi-commands';\nimport * as insecureFeatures from './insecure-features';\nimport * as inspectorCommands from './inspector-commands';\n\nconst desiredCapabilityConstraints = /** @type {const} */ ({\n automationName: {\n presence: true,\n isString: true,\n },\n platformName: {\n presence: true,\n isString: true,\n },\n});\n\nconst sessionsListGuard = new AsyncLock();\nconst pendingDriversGuard = new AsyncLock();\n\n/**\n * @extends {DriverCore}\n */\nclass AppiumDriver extends DriverCore {\n /**\n * Access to sessions list must be guarded with a Semaphore, because\n * it might be changed by other async calls at any time\n * It is not recommended to access this property directly from the outside\n * @type {Record}\n */\n sessions;\n\n /**\n * Access to pending drivers list must be guarded with a Semaphore, because\n * it might be changed by other async calls at any time\n * It is not recommended to access this property directly from the outside\n * @type {Record}\n */\n pendingDrivers;\n\n /**\n * Note that {@linkcode AppiumDriver} has no `newCommandTimeout` method.\n * `AppiumDriver` does not set and observe its own timeouts; individual\n * sessions (managed drivers) do instead.\n */\n newCommandTimeoutMs;\n\n /**\n * List of active plugins\n * @type {Map}\n */\n pluginClasses;\n\n /**\n * map of sessions to actual plugin instances per session\n * @type {Record[]>}\n */\n sessionPlugins;\n\n /**\n * some commands are sessionless, so we need a set of plugins for them\n * @type {InstanceType[]}\n */\n sessionlessPlugins;\n\n /** @type {DriverConfig} */\n driverConfig;\n\n /** @type {AppiumServer} */\n server;\n\n /** @type {Record} */\n bidiSockets;\n\n /** @type {Record} */\n bidiProxyClients;\n\n /**\n * @type {AppiumDriverConstraints}\n * @readonly\n */\n desiredCapConstraints;\n\n /** @type {import('@appium/types').DriverOpts} */\n args;\n\n /**\n * @param {import('@appium/types').DriverOpts} opts\n */\n constructor(opts) {\n // It is necessary to set `--tmp` here since it should be set to\n // process.env.APPIUM_TMP_DIR once at an initial point in the Appium lifecycle.\n // The process argument will be referenced by BaseDriver.\n // Please call @appium/support.tempDir module to apply this benefit.\n if (opts.tmpDir) {\n process.env.APPIUM_TMP_DIR = opts.tmpDir;\n }\n\n super(opts);\n\n this.args = {...opts};\n this.sessions = {};\n this.pendingDrivers = {};\n this.newCommandTimeoutMs = 0;\n this.pluginClasses = new Map();\n this.sessionPlugins = {};\n this.sessionlessPlugins = [];\n this.bidiSockets = {};\n this.bidiProxyClients = {};\n this.desiredCapConstraints = desiredCapabilityConstraints;\n this._isShuttingDown = false;\n\n // allow this to happen in the background, so no `await`\n (async () => {\n try {\n await updateBuildInfo();\n } catch (e) {\n // make sure we catch any possible errors to avoid unhandled rejections\n this.log.debug(`Cannot fetch Appium build info: ${e.message}`);\n }\n })();\n }\n\n /**\n * Cancel commands queueing for the umbrella Appium driver\n */\n get isCommandsQueueEnabled() {\n return false;\n }\n\n sessionExists(sessionId) {\n const dstSession = this.sessions[sessionId];\n return dstSession && dstSession.sessionId !== null;\n }\n\n driverForSession(sessionId) {\n return this.sessions[sessionId];\n }\n\n async getStatus() {\n // https://www.w3.org/TR/webdriver/#dfn-status\n const statusObj = this._isShuttingDown\n ? {\n ready: false,\n message: 'The server is shutting down',\n }\n : {\n ready: true,\n message: 'The server is ready to accept new connections',\n };\n return {\n ...statusObj,\n build: _.clone(getBuildInfo()),\n };\n }\n\n /**\n * @param {string|null} reason An optional shutdown reason\n */\n async shutdown(reason = null) {\n this._isShuttingDown = true;\n await this.deleteAllSessions({\n force: true,\n reason,\n });\n }\n\n /**\n * Retrieve information about all active sessions.\n * Results are returned only if the `session_discovery` insecure feature is enabled.\n * @returns {Promise}\n */\n async getAppiumSessions () {\n this.assertFeatureEnabled(SESSION_DISCOVERY_FEATURE);\n return _.toPairs(this.sessions).map(([id, driver]) => ({\n id,\n created: driver.sessionCreationTimestampMs,\n capabilities: /** @type {import('@appium/types').DriverCaps} */ (driver.caps),\n }));\n }\n\n printNewSessionAnnouncement(driverName, driverVersion, driverBaseVersion) {\n this.log.info(\n driverVersion\n ? `Appium v${APPIUM_VER} creating new ${driverName} (v${driverVersion}) session`\n : `Appium v${APPIUM_VER} creating new ${driverName} session`,\n );\n this.log.info(`Checking BaseDriver versions for Appium and ${driverName}`);\n this.log.info(\n AppiumDriver.baseVersion\n ? `Appium's BaseDriver version is ${AppiumDriver.baseVersion}`\n : `Could not determine Appium's BaseDriver version`,\n );\n this.log.info(\n driverBaseVersion\n ? `${driverName}'s BaseDriver version is ${driverBaseVersion}`\n : `Could not determine ${driverName}'s BaseDriver version`,\n );\n }\n\n /**\n * Retrieves all CLI arguments for a specific plugin.\n * @param {string} extName - Plugin name\n * @returns {StringRecord} Arguments object. If none, an empty object.\n */\n getCliArgsForPlugin(extName) {\n return /** @type {StringRecord} */ (this.args.plugin?.[extName] ?? {});\n }\n\n /**\n * Retrieves CLI args for a specific driver.\n *\n * _Any arg which is equal to its default value will not be present in the returned object._\n *\n * _Note that this behavior currently (May 18 2022) differs from how plugins are handled_ (see {@linkcode AppiumDriver.getCliArgsForPlugin}).\n * @param {string} extName - Driver name\n * @returns {StringRecord|undefined} Arguments object. If none, `undefined`\n */\n getCliArgsForDriver(extName) {\n const allCliArgsForExt = /** @type {StringRecord|undefined} */ (this.args.driver?.[extName]);\n\n if (!_.isEmpty(allCliArgsForExt)) {\n const defaults = getDefaultsForExtension(DRIVER_TYPE, extName);\n const cliArgs = _.isEmpty(defaults)\n ? allCliArgsForExt\n : _.omitBy(allCliArgsForExt, (value, key) => _.isEqual(defaults[key], value));\n if (!_.isEmpty(cliArgs)) {\n return cliArgs;\n }\n }\n }\n\n /**\n * Create a new session\n *\n * @param {W3CAppiumDriverCaps} w3cCapabilities1 W3C capabilities\n * @param {W3CAppiumDriverCaps} [w3cCapabilities2] W3C capabilities (legacy)\n * @param {W3CAppiumDriverCaps} [w3cCapabilities3] W3C capabilities (legacy)\n * @returns {Promise}\n */\n async createSession(w3cCapabilities1, w3cCapabilities2, w3cCapabilities3) {\n const defaultCapabilities = _.cloneDeep(this.args.defaultCapabilities);\n const defaultSettings = pullSettings(defaultCapabilities);\n const w3cCapabilities = _.cloneDeep(\n [w3cCapabilities3, w3cCapabilities2, w3cCapabilities1].find(isW3cCaps)\n );\n if (!w3cCapabilities) {\n throw makeNonW3cCapsError();\n }\n const w3cSettings = {\n ...defaultSettings,\n ...pullSettings(w3cCapabilities.alwaysMatch ?? {}),\n };\n for (const firstMatchEntry of w3cCapabilities.firstMatch ?? []) {\n Object.assign(w3cSettings, pullSettings(firstMatchEntry));\n }\n\n const protocol = PROTOCOLS.W3C;\n let innerSessionId, dCaps;\n try {\n // Parse the caps into a format that the InnerDriver will accept\n const parsedCaps = parseCapsForInnerDriver(\n promoteAppiumOptions(/** @type {W3CAppiumDriverCaps} */ (w3cCapabilities)),\n this.desiredCapConstraints,\n defaultCapabilities ? promoteAppiumOptionsForObject(defaultCapabilities) : undefined,\n );\n\n const {desiredCaps, processedW3CCapabilities} =\n /** @type {import('./utils').ParsedDriverCaps} */ (parsedCaps);\n const error = /** @type {import('./utils').InvalidCaps} */ (\n parsedCaps\n ).error;\n // If the parsing of the caps produced an error, throw it in here\n if (error) {\n throw error;\n }\n\n const {\n driver: InnerDriver,\n version: driverVersion,\n driverName,\n } = await this.driverConfig.findMatchingDriver(desiredCaps);\n this.printNewSessionAnnouncement(InnerDriver.name, driverVersion, InnerDriver.baseVersion);\n\n if (this.args.sessionOverride) {\n await this.deleteAllSessions();\n }\n\n /**\n * @type {DriverData[]}\n */\n let runningDriversData = [];\n /**\n * @type {DriverData[]}\n */\n let otherPendingDriversData = [];\n\n const driverInstance = /** @type {ExternalDriver} */ (new InnerDriver(this.args, true));\n\n this.configureDriverFeatures(driverInstance, driverName);\n\n // We also want to assign any new Bidi Commands that the driver has specified, including all\n // the standard bidi commands. But add a method existence guard since some old driver class\n // instances might not have this method\n if (_.isFunction(driverInstance.updateBidiCommands)) {\n driverInstance.updateBidiCommands(InnerDriver.newBidiCommands ?? {});\n }\n\n // Likewise, any driver-specific CLI args that were passed in should be assigned directly to\n // the driver so that they cannot be mimicked by a malicious user sending in capabilities\n const cliArgs = this.getCliArgsForDriver(driverName);\n if (!_.isUndefined(cliArgs)) {\n driverInstance.cliArgs = cliArgs;\n }\n\n // This assignment is required for correct web sockets functionality inside the driver\n // Drivers/plugins might also want to know where they are hosted\n\n // XXX: temporary hack to work around #16747\n driverInstance.server = this.server;\n driverInstance.serverHost = this.args.address;\n driverInstance.serverPort = this.args.port;\n driverInstance.serverPath = this.args.basePath;\n\n try {\n runningDriversData = (await this.curSessionDataForDriver(InnerDriver)) ?? [];\n } catch (e) {\n throw new errors.SessionNotCreatedError(e.message);\n }\n await pendingDriversGuard.acquire(AppiumDriver.name, () => {\n this.pendingDrivers[InnerDriver.name] = this.pendingDrivers[InnerDriver.name] || [];\n otherPendingDriversData = _.compact(\n this.pendingDrivers[InnerDriver.name].map((drv) => drv.driverData),\n );\n this.pendingDrivers[InnerDriver.name].push(driverInstance);\n });\n\n try {\n [innerSessionId, dCaps] = await driverInstance.createSession(\n /** @type {any} */ (processedW3CCapabilities),\n processedW3CCapabilities,\n processedW3CCapabilities,\n [...runningDriversData, ...otherPendingDriversData],\n );\n this.sessions[innerSessionId] = driverInstance;\n } finally {\n await pendingDriversGuard.acquire(AppiumDriver.name, () => {\n _.pull(this.pendingDrivers[InnerDriver.name], driverInstance);\n });\n }\n\n this.attachUnexpectedShutdownHandler(driverInstance, innerSessionId);\n\n this.log.info(\n `New ${InnerDriver.name} session created successfully, session ` +\n `${innerSessionId} added to master session list`,\n );\n\n // set the New Command Timeout for the inner driver\n await driverInstance.startNewCommandTimeout();\n\n // apply initial values to Appium settings (if provided)\n if (driverInstance.isW3CProtocol() && !_.isEmpty(w3cSettings)) {\n this.log.info(\n `Applying the initial values to Appium settings parsed from W3C caps: ` +\n JSON.stringify(w3cSettings),\n );\n await driverInstance.updateSettings(w3cSettings);\n }\n\n // if the user has asked for bidi support, send our bidi url back to the user. The inner\n // driver will need to have already saved any internal bidi urls it might want to proxy to,\n // cause we are going to overwrite that information here!\n if (dCaps.webSocketUrl) {\n const {address, port, basePath} = this.args;\n const scheme = `ws${this.server.isSecure() ? 's' : ''}`;\n const host = bidiCommands.determineBiDiHost(address);\n const bidiUrl = `${scheme}://${host}:${port}${basePath}${BIDI_BASE_PATH}/${innerSessionId}`;\n this.log.info(\n `Upstream driver responded with webSocketUrl ${dCaps.webSocketUrl}, will rewrite to ` +\n `${bidiUrl} for response to client`\n );\n // @ts-ignore webSocketUrl gets sent by the client as a boolean, but then it is supposed\n // to come back from the server as a string. TODO figure out how to express this in our\n // capability constraint system\n dCaps.webSocketUrl = bidiUrl;\n }\n } catch (error) {\n return {\n protocol,\n error,\n };\n }\n\n return {\n protocol,\n value: [innerSessionId, dCaps, protocol],\n };\n }\n\n /**\n *\n * @param {ExternalDriver} driver\n * @param {string} innerSessionId\n */\n attachUnexpectedShutdownHandler(driver, innerSessionId) {\n const onShutdown = (cause = new Error('Unknown error')) => {\n this.log.warn(`Ending session, cause was '${cause.message}'`);\n\n if (this.sessionPlugins[innerSessionId]) {\n for (const plugin of this.sessionPlugins[innerSessionId]) {\n if (_.isFunction(plugin.onUnexpectedShutdown)) {\n this.log.debug(\n `Plugin ${plugin.name} defines an unexpected shutdown handler; calling it now`,\n );\n try {\n plugin.onUnexpectedShutdown(driver, cause);\n } catch (e) {\n this.log.warn(\n `Got an error when running plugin ${plugin.name} shutdown handler: ${e}`,\n );\n }\n } else {\n this.log.debug(`Plugin ${plugin.name} does not define an unexpected shutdown handler`);\n }\n }\n }\n\n this.log.info(`Removing session '${innerSessionId}' from our master session list`);\n delete this.sessions[innerSessionId];\n delete this.sessionPlugins[innerSessionId];\n };\n\n if (_.isFunction(driver.onUnexpectedShutdown)) {\n driver.onUnexpectedShutdown(onShutdown);\n } else {\n this.log.warn(\n `Failed to attach the unexpected shutdown listener. ` +\n `Is 'onUnexpectedShutdown' method available for '${driver.constructor.name}'?`,\n );\n }\n }\n\n /**\n *\n * @param {((...args: any[]) => any)|(new(...args: any[]) => any)} InnerDriver\n * @returns {Promise}}\n * @privateRemarks The _intent_ is that `InnerDriver` is the class of a driver, but it only really\n * needs to be a function or constructor.\n */\n async curSessionDataForDriver(InnerDriver) {\n const data = _.compact(\n _.values(this.sessions)\n .filter((s) => s.constructor.name === InnerDriver.name)\n .map((s) => s.driverData),\n );\n for (const datum of data) {\n if (!datum) {\n throw new Error(\n `Problem getting session data for driver type ` +\n `${InnerDriver.name}; does it implement 'get driverData'?`,\n );\n }\n }\n return data;\n }\n\n /**\n * @param {string} sessionId\n */\n async deleteSession(sessionId) {\n let protocol;\n try {\n let otherSessionsData;\n const dstSession = await sessionsListGuard.acquire(AppiumDriver.name, () => {\n if (!this.sessions[sessionId]) {\n return;\n }\n const curConstructorName = this.sessions[sessionId].constructor.name;\n otherSessionsData = _.toPairs(this.sessions)\n .filter(\n ([key, value]) => value.constructor.name === curConstructorName && key !== sessionId,\n )\n .map(([, value]) => value.driverData);\n const dstSession = this.sessions[sessionId];\n protocol = dstSession.protocol;\n this.log.info(`Removing session ${sessionId} from our master session list`);\n // regardless of whether the deleteSession completes successfully or not\n // make the session unavailable, because who knows what state it might\n // be in otherwise\n delete this.sessions[sessionId];\n delete this.sessionPlugins[sessionId];\n\n this.cleanupBidiSockets(sessionId);\n\n return dstSession;\n });\n // this may not be correct, but if `dstSession` was falsy, the call to `deleteSession()` would\n // throw anyway.\n if (!dstSession) {\n throw new Error('Session not found');\n }\n return {\n protocol,\n value: await dstSession.deleteSession(sessionId, otherSessionsData),\n };\n } catch (e) {\n this.log.error(`Had trouble ending session ${sessionId}: ${e.message}`);\n return {\n protocol,\n error: e,\n };\n }\n }\n\n async deleteAllSessions(opts = {}) {\n const sessionsCount = _.size(this.sessions);\n if (0 === sessionsCount) {\n this.log.debug('There are no active sessions for cleanup');\n return;\n }\n\n const {force = false, reason} = opts;\n this.log.debug(`Cleaning up ${util.pluralize('active session', sessionsCount, true)}`);\n const cleanupPromises = force\n ? _.values(this.sessions).map((drv) =>\n drv.startUnexpectedShutdown(reason && new Error(reason)),\n )\n : _.keys(this.sessions).map((id) => this.deleteSession(id));\n for (const cleanupPromise of cleanupPromises) {\n try {\n await cleanupPromise;\n } catch (e) {\n this.log.debug(e);\n }\n }\n }\n\n /**\n * Get the appropriate plugins for a session (or sessionless plugins)\n *\n * @param {?string} sessionId - the sessionId (or null) to use to find plugins\n * @returns {Array} - array of plugin instances\n */\n pluginsForSession(sessionId = null) {\n if (sessionId) {\n if (!this.sessionPlugins[sessionId]) {\n const driverId = generateDriverLogPrefix(this.sessions[sessionId]);\n this.sessionPlugins[sessionId] = this.createPluginInstances(driverId || null);\n }\n return this.sessionPlugins[sessionId];\n }\n\n if (_.isEmpty(this.sessionlessPlugins)) {\n this.sessionlessPlugins = this.createPluginInstances();\n }\n return this.sessionlessPlugins;\n }\n\n /**\n * To get plugins for a command, we either get the plugin instances associated with the\n * particular command's session, or in the case of sessionless plugins, pull from the set of\n * plugin instances reserved for sessionless commands (and we lazily create plugin instances on\n * first use)\n *\n * @param {string} cmd - the name of the command to find a plugin to handle\n * @param {?string} sessionId - the particular session for which to find a plugin, or null if\n * sessionless\n */\n pluginsToHandleCmd(cmd, sessionId = null) {\n // to handle a given command, a plugin should either implement that command as a plugin\n // instance method or it should implement a generic 'handle' method\n return this.pluginsForSession(sessionId).filter(\n (p) => _.isFunction(p[cmd]) || _.isFunction(p.handle),\n );\n }\n\n /**\n * Creates instances of all of the enabled Plugin classes\n * @param {string|null} driverId - ID to use for linking a driver to a plugin in logs\n * @returns {Plugin[]}\n */\n createPluginInstances(driverId = null) {\n /** @type {Plugin[]} */\n const pluginInstances = [];\n for (const [PluginClass, name] of this.pluginClasses.entries()) {\n const cliArgs = this.getCliArgsForPlugin(name);\n const plugin = new PluginClass(name, cliArgs, driverId);\n if (_.isFunction(/** @type {Plugin & ExtensionCore} */(plugin).updateBidiCommands)) {\n // some old plugin classes don't have `updateBidiCommands`\n /** @type {Plugin & ExtensionCore} */(plugin).updateBidiCommands(PluginClass.newBidiCommands ?? {});\n }\n pluginInstances.push(plugin);\n }\n return pluginInstances;\n }\n\n /**\n *\n * @param {string} cmd\n * @param {...any} args\n * @returns {Promise<{value: any, error?: Error, protocol: string} | import('type-fest').AsyncReturnType>}\n */\n async executeCommand(cmd, ...args) {\n // We have basically three cases for how to handle commands:\n // 1. handle getStatus (we do this as a special out of band case so it doesn't get added to an\n // execution queue, and can be called while e.g. createSession is in progress)\n // 2. handle commands that this umbrella driver should handle, rather than the actual session\n // driver (for example, deleteSession, or other non-session commands)\n // 3. handle session driver commands.\n // The tricky part is that because we support command plugins, we need to wrap any of these\n // cases with plugin handling.\n\n const isGetStatus = cmd === GET_STATUS_COMMAND;\n const isUmbrellaCmd = isAppiumDriverCommand(cmd);\n const isSessionCmd = isSessionCommand(cmd);\n\n // if a plugin override proxying for this command and that is why we are here instead of just\n // letting the protocol proxy the command entirely, determine that, get the request object for\n // use later on, then clean up the args\n const reqForProxy = _.last(args)?.reqForProxy;\n if (reqForProxy) {\n args.pop();\n }\n\n // first do some error checking. If we're requesting a session command execution, then make\n // sure that session actually exists on the session driver, and set the session driver itself\n let sessionId = null;\n let dstSession = null;\n let protocol = null;\n /** @type {this | ExternalDriver} */\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let driver = this;\n if (isSessionCmd) {\n sessionId = _.last(args);\n dstSession = this.sessions[sessionId];\n if (!dstSession) {\n throw new Error(`The session with id '${sessionId}' does not exist`);\n }\n // now save the response protocol given that the session driver's protocol might differ\n protocol = dstSession.protocol;\n if (!isUmbrellaCmd) {\n driver = dstSession;\n }\n }\n\n // get any plugins which are registered as handling this command\n const plugins = this.pluginsToHandleCmd(cmd, sessionId);\n\n // if any plugins are going to handle this command, we can't guarantee that the default\n // driver's executeCommand method will be called, which means we can't guarantee that the\n // newCommandTimeout will be cleared. So we do it here as well.\n if (plugins.length && dstSession) {\n this.log.debug(\n 'Clearing new command timeout pre-emptively since plugin(s) will handle this command',\n );\n await dstSession.clearNewCommandTimeout();\n }\n\n // now we define a 'cmdHandledBy' object which will keep track of which plugins have handled this\n // command. we care about this because (a) multiple plugins can handle the same command, and\n // (b) there's no guarantee that a plugin will actually call the next() method which runs the\n // original command execution. This results in a situation where the command might be handled\n // by some but not all plugins, or by plugin(s) but not by the default behavior. So start out\n // this object declaring that the default handler has not been executed.\n const cmdHandledBy = {default: false};\n\n // now we define an async function which will be passed to plugins, and successively wrapped\n // if there is more than one plugin that can handle the command. To start off with, the async\n // function is defined as calling the default behavior, i.e., whichever of the 3 cases above is\n // the appropriate one\n const defaultBehavior = async () => {\n // if we're running with plugins, make sure we log that the default behavior is actually\n // happening so we can tell when the plugin call chain is unwrapping to the default behavior\n // if that's what happens\n if (plugins.length) {\n this.log.info(`Executing default handling behavior for command '${cmd}'`);\n }\n\n // if we make it here, we know that the default behavior is handled\n cmdHandledBy.default = true;\n\n if (reqForProxy) {\n // we would have proxied this command had a plugin not handled it, so the default behavior\n // is to do the proxy and retrieve the result internally so it can be passed to the plugin\n // in case it calls 'await next()'. This requires that the driver have defined\n // 'proxyCommand' and not just 'proxyReqRes'.\n if (!dstSession?.proxyCommand) {\n throw new NoDriverProxyCommandError();\n }\n return await dstSession.proxyCommand(\n reqForProxy.originalUrl,\n reqForProxy.method,\n reqForProxy.body,\n );\n }\n\n if (isGetStatus) {\n return await this.getStatus();\n }\n\n if (isUmbrellaCmd) {\n // some commands, like deleteSession, we want to make sure to handle on *this* driver,\n // not the platform driver\n return await BaseDriver.prototype.executeCommand.call(this, cmd, ...args);\n }\n\n // here we know that we are executing a session command, and have a valid session driver\n return await /** @type {any} */ (dstSession).executeCommand(cmd, ...args);\n };\n\n // now take our default behavior, wrap it with any number of plugin behaviors, and run it\n const wrappedCmd = this.wrapCommandWithPlugins({\n driver,\n cmd,\n args,\n plugins,\n cmdHandledBy,\n next: defaultBehavior,\n });\n const res = await this.executeWrappedCommand({wrappedCmd, protocol});\n\n // if we had plugins, make sure to log out the helpful report about which plugins ended up\n // handling the command and which didn't\n this.logPluginHandlerReport(plugins, {cmd, cmdHandledBy});\n\n // if we had plugins, and if they did not ultimately call the default handler, this means our\n // new command timeout was not restarted by the default handler's executeCommand call, so\n // restart it here using the same logic as in BaseDriver's executeCommand\n if (\n dstSession &&\n !cmdHandledBy.default &&\n dstSession.isCommandsQueueEnabled &&\n cmd !== DELETE_SESSION_COMMAND\n ) {\n this.log.debug(\n 'Restarting new command timeout via umbrella driver since plugin did not ' +\n 'allow default handler to execute',\n );\n await dstSession.startNewCommandTimeout();\n }\n\n // And finally, if the command was createSession, we want to migrate any plugins which were\n // previously sessionless to use the new sessionId, so that plugins can share state between\n // their createSession method and other instance methods\n if (cmd === CREATE_SESSION_COMMAND && this.sessionlessPlugins.length && !res.error) {\n const sessionId = _.first(res.value);\n this.log.info(\n `Promoting ${this.sessionlessPlugins.length} sessionless plugins to be attached ` +\n `to session ID ${sessionId}`,\n );\n this.sessionPlugins[sessionId] = this.sessionlessPlugins;\n for (const p of /** @type {(Plugin & ExtensionCore)[]} */(this.sessionPlugins[sessionId])) {\n if (_.isFunction(p.updateLogPrefix)) {\n // some old plugin classes don't have `updateLogPrefix` yet\n p.updateLogPrefix(`${generateDriverLogPrefix(p)} <${generateDriverLogPrefix(this.sessions[sessionId])}>`);\n }\n }\n this.sessionlessPlugins = [];\n }\n\n return res;\n }\n\n wrapCommandWithPlugins({driver, cmd, args, next, cmdHandledBy, plugins}) {\n if (plugins.length) {\n this.log.info(`Plugins which can handle cmd '${cmd}': ${plugins.map((p) => p.name)}`);\n }\n\n // now we can go through each plugin and wrap `next` around its own handler, passing the *old*\n // next in so that it can call it if it wants to\n for (const plugin of plugins) {\n // need an IIFE here because we want the value of next that's passed to plugin.handle to be\n // exactly the value of next here before reassignment; we don't want it to be lazily\n // evaluated, otherwise we end up with infinite recursion of the last `next` to be defined.\n cmdHandledBy[plugin.name] = false; // we see a new plugin, so add it to the 'cmdHandledBy' object\n next = ((_next) => async () => {\n this.log.info(`Plugin ${plugin.name} is now handling cmd '${cmd}'`);\n cmdHandledBy[plugin.name] = true; // if we make it here, this plugin has attempted to handle cmd\n // first attempt to handle the command via a command-specific handler on the plugin\n if (plugin[cmd]) {\n return await plugin[cmd](_next, driver, ...args);\n }\n // otherwise, call the generic 'handle' method\n return await plugin.handle(_next, driver, cmd, ...args);\n })(next);\n }\n\n return next;\n }\n\n logPluginHandlerReport(plugins, {cmd, cmdHandledBy}) {\n if (!plugins.length) {\n return;\n }\n\n // at the end of the day, we have an object representing which plugins ended up getting\n // their code run as part of handling this command. Because plugins can choose *not* to\n // pass control to other plugins or to the default driver behavior, this is information\n // which is probably useful to the user (especially in situations where plugins might not\n // interact well together, and it would be hard to debug otherwise without this kind of\n // message).\n const didHandle = Object.keys(cmdHandledBy).filter((k) => cmdHandledBy[k]);\n const didntHandle = Object.keys(cmdHandledBy).filter((k) => !cmdHandledBy[k]);\n if (didntHandle.length > 0) {\n this.log.info(\n `Command '${cmd}' was *not* handled by the following behaviours or plugins, even ` +\n `though they were registered to handle it: ${JSON.stringify(didntHandle)}. The ` +\n `command *was* handled by these: ${JSON.stringify(didHandle)}.`,\n );\n }\n }\n\n async executeWrappedCommand({wrappedCmd, protocol}) {\n let cmdRes,\n cmdErr,\n res = {};\n try {\n // At this point, `wrappedCmd` defines a whole sequence of plugin handlers, culminating in\n // our default handler. Whatever it returns is what we're going to want to send back to the\n // user.\n cmdRes = await wrappedCmd();\n } catch (e) {\n cmdErr = e;\n }\n\n // Sadly, we don't know exactly what kind of object will be returned. It will either be a bare\n // object, or a protocol-aware object with protocol and error/value keys. So we need to sniff\n // it and make sure we don't double-wrap it if it's the latter kind.\n if (_.isPlainObject(cmdRes) && _.has(cmdRes, 'protocol')) {\n res = cmdRes;\n } else {\n res.value = cmdRes;\n res.error = cmdErr;\n res.protocol = protocol;\n }\n return res;\n }\n\n proxyActive(sessionId) {\n const dstSession = this.sessions[sessionId];\n return dstSession && _.isFunction(dstSession.proxyActive) && dstSession.proxyActive(sessionId);\n }\n\n /**\n *\n * @param {string} sessionId\n * @returns {import('@appium/types').RouteMatcher[]}\n */\n getProxyAvoidList(sessionId) {\n const dstSession = this.sessions[sessionId];\n return dstSession ? dstSession.getProxyAvoidList() : [];\n }\n\n canProxy(sessionId) {\n const dstSession = this.sessions[sessionId];\n return dstSession && dstSession.canProxy(sessionId);\n }\n\n onBidiConnection = bidiCommands.onBidiConnection;\n onBidiMessage = bidiCommands.onBidiMessage;\n onBidiServerError = bidiCommands.onBidiServerError;\n cleanupBidiSockets = bidiCommands.cleanupBidiSockets;\n\n configureGlobalFeatures = insecureFeatures.configureGlobalFeatures;\n configureDriverFeatures = insecureFeatures.configureDriverFeatures;\n\n listCommands = inspectorCommands.listCommands;\n listExtensions = inspectorCommands.listExtensions;\n}\n\n/**\n * Help decide which commands should be proxied to sub-drivers and which\n * should be handled by this, our umbrella driver\n * @param {string} cmd\n * @returns {boolean}\n */\nfunction isAppiumDriverCommand(cmd) {\n return !isSessionCommand(cmd)\n || _.includes([\n DELETE_SESSION_COMMAND,\n LIST_DRIVER_COMMANDS_COMMAND,\n LIST_DRIVER_EXTENSIONS_COMMAND,\n ], cmd);\n}\n\n/**\n * Thrown when Appium tried to proxy a command using a driver's `proxyCommand` method but the\n * method did not exist\n */\nexport class NoDriverProxyCommandError extends Error {\n /**\n * @type {Readonly}\n */\n code = 'APPIUMERR_NO_DRIVER_PROXYCOMMAND';\n\n constructor() {\n super(\n `The default behavior for this command was to proxy, but the driver ` +\n `did not have the 'proxyCommand' method defined. To fully support ` +\n `plugins, drivers should have 'proxyCommand' set to a jwpProxy object's ` +\n `'command()' method, in addition to the normal 'proxyReqRes'`,\n );\n }\n}\n\nexport {AppiumDriver};\n\n/**\n * @typedef {import('@appium/types').DriverData} DriverData\n * @typedef {import('@appium/types').ServerArgs} DriverOpts\n * @typedef {import('@appium/types').Constraints} Constraints\n * @typedef {import('@appium/types').AppiumServer} AppiumServer\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n * @typedef {import('./extension/driver-config').DriverConfig} DriverConfig\n * @typedef {import('@appium/types').PluginType} PluginType\n * @typedef {import('@appium/types').DriverType} DriverType\n * @typedef {import('@appium/types').StringRecord} StringRecord\n * @typedef {import('@appium/types').ExternalDriver} ExternalDriver\n * @typedef {import('@appium/types').PluginClass} PluginClass\n * @typedef {import('@appium/types').Plugin} Plugin\n * @typedef {import('@appium/base-driver').ExtensionCore} ExtensionCore\n * @typedef {import('@appium/types').DriverClass} DriverClass\n */\n\n/**\n * @typedef {import('@appium/types').ISessionHandler} AppiumSessionHandler\n */\n\n/**\n * @typedef {SessionHandlerResult<[innerSessionId: string, caps:\n * import('@appium/types').DriverCaps, protocol: string|undefined]>} SessionHandlerCreateResult\n */\n\n/**\n * @template {Constraints} C\n * @typedef {import('@appium/types').Core} Core\n */\n\n/**\n * @typedef {SessionHandlerResult} SessionHandlerDeleteResult\n */\n\n/**\n * Used by {@linkcode AppiumDriver.createSession} and {@linkcode AppiumDriver.deleteSession} to describe\n * result.\n * @template V\n * @typedef SessionHandlerResult\n * @property {V} [value]\n * @property {Error} [error]\n * @property {string} [protocol]\n */\n\n/**\n * @typedef {typeof desiredCapabilityConstraints} AppiumDriverConstraints\n * @typedef {import('@appium/types').W3CDriverCaps} W3CAppiumDriverCaps\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/bidi-commands.ts\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\nimport B from 'bluebird';\nimport {\n errors,\n ExtensionCore,\n} from '@appium/base-driver';\nimport {BIDI_BASE_PATH, BIDI_EVENT_NAME} from './constants';\nimport WebSocket from 'ws';\nimport os from 'node:os';\nimport {\n isBroadcastIp,\n fetchInterfaces,\n V4_BROADCAST_IP,\n} from './utils';\nimport type {IncomingMessage} from 'node:http';\nimport type {AppiumDriver} from './appium';\nimport type {\n ErrorBiDiCommandResponse,\n SuccessBiDiCommandResponse,\n ExternalDriver,\n StringRecord,\n Plugin,\n BiDiResultData\n} from '@appium/types';\n\ntype ExtensionPlugin = Plugin & ExtensionCore;\ntype AnyDriver = ExternalDriver | AppiumDriver;\ntype SendData = (data: string | Buffer) => Promise;\ntype LogSocketError = (err: Error) => void;\ninterface InitBiDiSocketResult {\n bidiHandlerDriver: AnyDriver;\n bidiHandlerPlugins: ExtensionPlugin[];\n proxyClient: WebSocket | null;\n send: SendData;\n sendToProxy: SendData | null;\n logSocketErr: LogSocketError;\n}\n\n\nconst MIN_WS_CODE_VAL = 1000;\nconst MAX_WS_CODE_VAL = 1015;\nconst WS_FALLBACK_CODE = 1011; // server encountered an error while fulfilling request\nconst BIDI_EVENTS_MAP: WeakMap> = new WeakMap();\nconst MAX_LOGGED_DATA_LENGTH = 300;\n\n/**\n * Clients cannot use broadcast addresses, like 0.0.0.0 or ::\n * to create connections. Thus we prefer a hostname if such\n * address is provided or the actual address of a non-local interface,\n * in case the host only has one such interface.\n *\n * @param address\n */\nexport function determineBiDiHost(address: string): string {\n if (!isBroadcastIp(address)) {\n return address;\n }\n\n const nonLocalInterfaces = fetchInterfaces(address === V4_BROADCAST_IP ? 4 : 6)\n .filter((iface) => !iface.internal);\n return nonLocalInterfaces.length === 1 ? nonLocalInterfaces[0].address : os.hostname();\n}\n\n/**\n * Initialize a new bidi connection and set up handlers\n * @param ws The websocket connection object\n * @param req The connection pathname, which might include the session id\n */\nexport function onBidiConnection(this: AppiumDriver, ws: WebSocket, req: IncomingMessage): void {\n try {\n const initBiDiSocketFunc: OmitThisParameter = initBidiSocket.bind(this);\n const {bidiHandlerDriver, bidiHandlerPlugins, proxyClient, send, sendToProxy, logSocketErr} = initBiDiSocketFunc(\n ws,\n req,\n );\n\n const initBidiSocketHandlersFunc: OmitThisParameter = initBidiSocketHandlers\n .bind(this);\n initBidiSocketHandlersFunc(\n ws,\n proxyClient,\n send,\n sendToProxy,\n bidiHandlerDriver,\n bidiHandlerPlugins,\n logSocketErr,\n );\n if (proxyClient) {\n const initBidiProxyHandlersFunc: OmitThisParameter = initBidiProxyHandlers\n .bind(bidiHandlerDriver);\n initBidiProxyHandlersFunc(proxyClient, ws, send);\n }\n const initBidiEventListenersFunc: OmitThisParameter = initBidiEventListeners\n .bind(this);\n initBidiEventListenersFunc(ws, bidiHandlerDriver, bidiHandlerPlugins, send);\n } catch (err) {\n this.log.error(err);\n try {\n ws.close();\n } catch {}\n }\n}\n\nfunction wrapCommandWithPlugins(driver: ExtensionCore, plugins: ExtensionCore[], method: string, params: StringRecord): () => Promise {\n const [moduleName, methodName] = method.split('.');\n let next = async () => await driver.executeBidiCommand(method, params);\n for (const plugin of plugins.filter((p) => p.doesBidiCommandExist(moduleName, methodName))) {\n next = ((_next) => async () => await plugin.executeBidiCommand(method, params, _next, driver))(next);\n }\n return next;\n}\n\n/**\n * @param data\n * @param driver\n * @param plugins\n */\nexport async function onBidiMessage(\n this: AppiumDriver,\n data: Buffer,\n driver: AnyDriver,\n plugins: ExtensionPlugin[]\n): Promise {\n let resMessage: SuccessBiDiCommandResponse | ErrorBiDiCommandResponse;\n let id: number = 0;\n const driverLog = driver.log;\n const dataTruncated = _.truncate(data.toString(), {length: MAX_LOGGED_DATA_LENGTH});\n try {\n let method: string;\n let params: StringRecord;\n try {\n ({id, method, params} = JSON.parse(data.toString('utf8')));\n } catch (err) {\n throw new errors.InvalidArgumentError(\n `Could not parse Bidi command '${dataTruncated}': ${err.message}`,\n );\n }\n driverLog.info(`--> BIDI message #${id}`);\n if (!method) {\n throw new errors.InvalidArgumentError(\n `Missing method for BiDi operation in '${dataTruncated}'`,\n );\n }\n if (!params) {\n throw new errors.InvalidArgumentError(\n `Missing params for BiDi operation in '${dataTruncated}`,\n );\n }\n const executeWrappedCommand = wrapCommandWithPlugins(driver as ExtensionCore, plugins, method, params);\n const result = await executeWrappedCommand();\n resMessage = {\n id,\n type: 'success',\n result,\n };\n } catch (err) {\n resMessage = _.has(err, 'bidiErrObject')\n ? err.bidiErrObject(id)\n : {\n id,\n type: 'error',\n error: errors.UnknownError.error(),\n message: (err as Error).message,\n stacktrace: (err as Error).stack,\n };\n }\n driverLog.info(`<-- BIDI message #${id}`);\n return resMessage;\n}\n\n/**\n * Log a bidi server error\n * @param err\n */\nexport function onBidiServerError(this: AppiumDriver, err: Error): void {\n this.log.warn(`Error from bidi websocket server: ${err}`);\n}\n\n/**\n * Clean up any bidi sockets associated with session\n *\n * @param sessionId\n */\nexport function cleanupBidiSockets(this: AppiumDriver, sessionId: string): void {\n if (!this.bidiSockets[sessionId]) {\n return;\n }\n try {\n this.log.debug(`Closing bidi socket(s) associated with session ${sessionId}`);\n for (const ws of this.bidiSockets[sessionId]) {\n // 1001 means server is going away\n ws.close(1001);\n }\n } catch {}\n delete this.bidiSockets[sessionId];\n\n const proxyClient = this.bidiProxyClients[sessionId];\n if (!proxyClient) {\n return;\n }\n this.log.debug(`Also closing proxy connection to upstream bidi server`);\n try {\n // 1000 means normal closure, which seems correct when Appium is acting as the client\n proxyClient.close(1000);\n } catch {}\n delete this.bidiProxyClients[sessionId];\n}\n\n// #region Private functions\n\n/**\n * Initialize a new bidi connection\n * @param ws The websocket connection object\n * @param req The connection pathname, which might include the session id\n */\nfunction initBidiSocket(this: AppiumDriver, ws: WebSocket, req: IncomingMessage): InitBiDiSocketResult {\n const pathname = req.url;\n if (!pathname) {\n throw new Error('Invalid connection request: pathname missing from request');\n }\n const bidiSessionRe = new RegExp(`${BIDI_BASE_PATH}/([^/]+)$`);\n const bidiNoSessionRe = new RegExp(`${BIDI_BASE_PATH}/?$`);\n const sessionMatch = bidiSessionRe.exec(pathname);\n const noSessionMatch = bidiNoSessionRe.exec(pathname);\n\n if (!sessionMatch && !noSessionMatch) {\n throw new Error(\n `Got websocket connection for path ${pathname} but didn't know what to do with it. ` +\n `Ignoring and will close the connection`,\n );\n }\n\n // Let's figure out which driver is going to handle this socket connection. It's either going\n // to be a driver matching a session id appended to the bidi base path, or this umbrella driver\n // (if no session id is included in the bidi connection request)\n\n let bidiHandlerDriver: AnyDriver;\n let proxyClient: WebSocket | null = null;\n const bidiHandlerPlugins: ExtensionPlugin[] = [];\n if (sessionMatch) {\n // If we found a session id, see if it matches an active session\n const sessionId = sessionMatch[1];\n bidiHandlerDriver = this.sessions[sessionId];\n if (!bidiHandlerDriver) {\n // The session ID sent in doesn't match an active session; just ignore this socket\n // connection in that case\n throw new Error(\n `Got bidi connection request for session with id ${sessionId} which is closed ` +\n `or does not exist. Closing the socket connection.`,\n );\n }\n const driverName = bidiHandlerDriver.constructor.name;\n this.log.info(`Bidi websocket connection made for session ${sessionId}`);\n // store this socket connection for later removal on session deletion. theoretically there\n // can be multiple sockets per session\n if (!this.bidiSockets[sessionId]) {\n this.bidiSockets[sessionId] = [];\n }\n this.bidiSockets[sessionId].push(ws);\n\n const bidiProxyUrl = bidiHandlerDriver.bidiProxyUrl;\n if (bidiProxyUrl) {\n try {\n new URL(bidiProxyUrl);\n } catch {\n throw new Error(\n `Got request for ${driverName} to proxy bidi connections to upstream socket with ` +\n `url ${bidiProxyUrl}, but this was not a valid url`,\n );\n }\n this.log.info(`Bidi connection for ${driverName} will be proxied to ${bidiProxyUrl}. ` +\n `Plugins will not handle bidi commands`);\n proxyClient = new WebSocket(bidiProxyUrl);\n this.bidiProxyClients[sessionId] = proxyClient;\n } else {\n bidiHandlerPlugins.push(...this.pluginsForSession(sessionId) as ExtensionPlugin[]);\n }\n } else {\n this.log.info('Bidi websocket connection made to main server');\n // no need to store the socket connection if it's to the main server since it will just\n // stay open as long as the server itself is and will close when the server closes.\n bidiHandlerDriver = this; // eslint-disable-line @typescript-eslint/no-this-alias\n bidiHandlerPlugins.push(...this.pluginsForSession() as ExtensionPlugin[]);\n }\n\n const driverLog = bidiHandlerDriver.log;\n const logSocketErr: LogSocketError = (err: Error) => {\n driverLog.warn(err.message);\n };\n\n // This is a function which wraps the 'send' method on a web socket for two reasons:\n // 1. Make it async-await friendly\n // 2. Do some logging if there's a send error\n const sendFactory = (socket: WebSocket) => {\n const socketSend = B.promisify(socket.send, {context: socket});\n return async (data: string | Buffer) => {\n try {\n await assertIsOpen(socket);\n await socketSend(data);\n } catch (err) {\n logSocketErr(err);\n }\n };\n };\n\n // Construct our send method for sending messages to the client\n const send: SendData = sendFactory(ws);\n\n // Construct a conditional send method for proxying messages from the client to an upstream\n // bidi socket server (e.g. on a browser)\n const sendToProxy: SendData | null = proxyClient ? sendFactory(proxyClient) : null;\n\n return {bidiHandlerDriver, bidiHandlerPlugins, proxyClient, send, sendToProxy, logSocketErr};\n}\n\n/**\n * Set up handlers on upstream bidi socket we are proxying to/from\n *\n * @param proxyClient - the websocket connection to/from the\n * upstream socket (the one we're proxying to/from)\n * @param ws - the websocket connection to/from the client\n * @param send - a method used to send data to the\n * client\n */\nfunction initBidiProxyHandlers(\n this: AnyDriver,\n proxyClient: WebSocket,\n ws: WebSocket,\n send: SendData,\n): void {\n // Set up handlers for events that might come from the upstream bidi socket connection if\n // we're in proxy mode\n const driverLog = this.log;\n\n // Here we're receiving a message from the upstream socket server. We want to pass it on to\n // the client\n proxyClient.on('message', send);\n\n // If the upstream socket server closes the connection, should close the connection to the\n // client as well\n proxyClient.on('close', (code, reason) => {\n driverLog.debug(\n `Upstream bidi socket closed connection (code ${code}, reason: '${reason}'). ` +\n `Closing proxy connection to client`,\n );\n const intCode: number = _.isNumber(code) ? (code as number) : parseInt(code, 10);\n if (_.isNaN(intCode) || intCode < MIN_WS_CODE_VAL || intCode > MAX_WS_CODE_VAL) {\n driverLog.warn(\n `Received code ${code} from upstream socket, but this is not a valid ` +\n `websocket code. Rewriting to ${WS_FALLBACK_CODE} for ws compatibility`,\n );\n code = WS_FALLBACK_CODE;\n }\n ws.close(code, reason);\n });\n\n proxyClient.on('error', (err) => {\n driverLog.warn(`Got error on upstream bidi socket connection: ${err.message}`);\n });\n}\n\n/**\n * Set up handlers on the bidi socket connection to the client\n *\n * @param ws - the websocket connection to/from the client\n * @param proxyClient - the websocket connection to/from the\n * upstream socket (the one we're proxying to/from, if we're proxying)\n * @param send - a method used to send data to the\n * client\n * @param sendToProxy - a method used to send data to the\n * upstream socket\n * @param bidiHandlerDriver - the driver\n * handling the bidi commands\n * @param bidiHandlerPlugins - plugins that might also handle bidi commands\n * @param logSocketErr - a special prefixed logger\n */\nfunction initBidiSocketHandlers(\n this: AppiumDriver,\n ws: WebSocket,\n proxyClient: WebSocket | null,\n send: SendData,\n sendToProxy: SendData | null,\n bidiHandlerDriver: AnyDriver,\n bidiHandlerPlugins: ExtensionPlugin[],\n logSocketErr: LogSocketError,\n): void {\n const driverLog = bidiHandlerDriver.log;\n // Can't do much with random errors on the connection other than log them\n ws.on('error', logSocketErr);\n\n ws.on('open', () => {\n driverLog.info('BiDi websocket connection is now open');\n });\n\n // Now set up handlers for the various events that might happen on the websocket connection\n // coming from the client\n // First is incoming messages from the client\n ws.on('message', async (data: Buffer) => {\n if (proxyClient && sendToProxy) {\n // if we're meant to proxy to an upstream bidi socket, just do that\n // TODO trying to determine how this proxying behaviour would interface with plugins is too\n // complex for now, so just ignore plugins in this case\n await sendToProxy(data.toString('utf8'));\n } else {\n const res = await this.onBidiMessage(data, bidiHandlerDriver, bidiHandlerPlugins);\n await send(JSON.stringify(res));\n }\n });\n\n // Next consider if the client closes the socket connection on us\n ws.on('close', (code, reason) => {\n // Not sure if we need to do anything here if the client closes the websocket connection.\n // Probably if a session was started via the socket, and the socket closes, we should end the\n // associated session to free up resources. But otherwise, for sockets attached to existing\n // sessions, doing nothing is probably right.\n driverLog.debug(`BiDi socket connection closed (code ${code}, reason: '${reason}')`);\n\n // If we're proxying, might as well close the upstream connection and clean it up\n if (proxyClient) {\n driverLog.debug('Also closing BiDi proxy socket connection');\n proxyClient.close(code, reason);\n }\n\n const eventLogCounts = BIDI_EVENTS_MAP.get(bidiHandlerDriver);\n if (!_.isEmpty(eventLogCounts)) {\n driverLog.debug(`BiDi events statistics: ${JSON.stringify(eventLogCounts, null, 2)}`);\n }\n });\n}\n\n/**\n * Set up bidi event listeners\n *\n * @param ws - the websocket connection to/from the client\n * @param bidiHandlerDriver - the driver\n * handling the bidi commands\n * @param send - a method used to send data to the\n * client\n */\nfunction initBidiEventListeners(\n this: AppiumDriver,\n ws: WebSocket,\n bidiHandlerDriver: AnyDriver,\n bidiHandlerPlugins: ExtensionPlugin[],\n send: SendData,\n): void {\n // If the driver emits a bidi event that should maybe get sent to the client, check to make\n // sure the client is subscribed and then pass it on\n const eventLogCounts: Record = BIDI_EVENTS_MAP.get(bidiHandlerDriver) ?? {};\n BIDI_EVENTS_MAP.set(bidiHandlerDriver, eventLogCounts);\n const eventListenerFactory = (extType: 'driver' | 'plugin', ext: ExtensionCore) => {\n const eventListener = async ({context, method, params = {}}) => {\n // if the driver didn't specify a context, use the empty context\n if (!context) {\n context = '';\n }\n if (!method || !params) {\n ext.log?.warn( // some old plugins might not have the `log` property\n `${_.capitalize(extType)} emitted a bidi event that was malformed. Require method and params keys ` +\n `(with optional context). But instead received: ${_.truncate(JSON.stringify({\n context,\n method,\n params,\n }), {length: MAX_LOGGED_DATA_LENGTH})}`,\n );\n return;\n }\n if (ws.readyState !== WebSocket.OPEN) {\n // if the websocket is not still 'open', then we can ignore sending these events\n if (ws.readyState > WebSocket.OPEN) {\n // if the websocket is closed or closing, we can remove this listener as well to avoid\n // leaks. Some old plugin classes might not have the `eventEmitter` property, so use an\n // existence guard for now.\n ext.eventEmitter?.removeListener(BIDI_EVENT_NAME, eventListener);\n }\n return;\n }\n\n const eventSubs = bidiHandlerDriver.bidiEventSubs[method];\n if (_.isArray(eventSubs) && eventSubs.includes(context)) {\n if (method in eventLogCounts) {\n ++eventLogCounts[method];\n } else {\n ext.log?.debug( // some old plugins might not have the `log` property\n `<-- BIDI EVENT ${method} (context: '${context}', ` +\n `params: ${_.truncate(JSON.stringify(params), {length: MAX_LOGGED_DATA_LENGTH})}). ` +\n `All further similar events won't be logged.`,\n );\n eventLogCounts[method] = 1;\n }\n // now we can send the event onto the socket\n const ev = {type: 'event', context, method, params};\n await send(JSON.stringify(ev));\n }\n };\n return eventListener;\n };\n bidiHandlerDriver.eventEmitter.on(BIDI_EVENT_NAME, eventListenerFactory('driver', bidiHandlerDriver as ExtensionCore));\n for (const plugin of bidiHandlerPlugins) {\n // some old plugins might not have the eventEmitter property\n plugin.eventEmitter?.on(BIDI_EVENT_NAME, eventListenerFactory('plugin', plugin));\n }\n}\n\nasync function assertIsOpen(\n ws: WebSocket,\n timeoutMs: number = 5000,\n): Promise {\n if (ws.readyState === ws.OPEN) {\n return ws;\n }\n if (ws.readyState > ws.OPEN) {\n throw new Error(`The BiDi web socket at ${ws.url} is not open`);\n }\n\n let errorListener;\n let openListener;\n // The socket is in CONNECTING state. Wait up to `timeoutMs` until it is open\n try {\n await new Promise((resolve, reject) => {\n setTimeout(() => reject(\n new Error(\n `The BiDi web socket at ${ws.url} did not ` +\n `open after ${timeoutMs}ms timeout`\n )\n ), timeoutMs);\n ws.once('error', reject);\n errorListener = reject;\n ws.once('open', resolve);\n openListener = resolve;\n });\n } finally {\n if (errorListener) {\n ws.off('error', errorListener);\n }\n if (openListener) {\n ws.off('open', openListener);\n }\n }\n return ws;\n}\n\n// #endregion\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/config-file.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport betterAjvErrors from '@sidvind/better-ajv-errors';\nimport {lilconfig} from 'lilconfig';\nimport _ from 'lodash';\nimport * as yaml from 'yaml';\nimport {getSchema, validate} from './schema/schema';\n\n/**\n * lilconfig loader to handle `.yaml` files\n * @type {import('lilconfig').LoaderSync}\n */\nfunction yamlLoader(filepath, content) {\n try {\n return yaml.parse(content);\n } catch (e) {\n throw new Error(`The YAML config at '${filepath}' cannot be loaded. Original error: ${e.message}`);\n }\n}\n\n/**\n * A cache of the raw config file (a JSON string) at a filepath.\n * This is used for better error reporting.\n * Note that config files needn't be JSON, but it helps if they are.\n * @type {Map}\n */\nconst rawConfig = new Map();\n\n/**\n * Custom JSON loader that caches the raw config file (for use with `better-ajv-errors`).\n * If it weren't for this cache, this would be unnecessary.\n * @type {import('lilconfig').LoaderSync}\n */\nfunction jsonLoader(filepath, content) {\n rawConfig.set(filepath, content);\n try {\n return JSON.parse(content);\n } catch (e) {\n throw new Error(`The JSON config at '${filepath}' cannot be loaded. Original error: ${e.message}`);\n }\n}\n\n/**\n * Loads a config file from an explicit path\n * @param {LilconfigAsyncSearcher} lc - lilconfig instance\n * @param {string} filepath - Path to config file\n * @returns {Promise}\n */\nasync function loadConfigFile(lc, filepath) {\n try {\n // removing \"await\" will cause any rejection to _not_ be caught in this block!\n return await lc.load(filepath);\n } catch (/** @type {unknown} */ err) {\n if (/** @type {NodeJS.ErrnoException} */ (err).code === 'ENOENT') {\n /** @type {NodeJS.ErrnoException} */ (\n err\n ).message = `Config file not found at user-provided path: ${filepath}`;\n throw err;\n } else if (err instanceof SyntaxError) {\n // generally invalid JSON\n err.message = `Config file at user-provided path ${filepath} is invalid:\\n${err.message}`;\n throw err;\n }\n throw err;\n }\n}\n\n/**\n * Searches for a config file\n * @param {LilconfigAsyncSearcher} lc - lilconfig instance\n * @returns {Promise}\n */\nasync function searchConfigFile(lc) {\n return await lc.search();\n}\n\n/**\n * Given an array of errors and the result of loading a config file, generate a\n * helpful string for the user.\n *\n * - If `opts` contains a `json` property, this should be the original JSON\n * _string_ of the config file. This is only applicable if the config file\n * was in JSON format. If present, it will associate line numbers with errors.\n * - If `errors` happens to be empty, this will throw.\n * @param {import('ajv').ErrorObject[]} errors - Non-empty array of errors. Required.\n * @param {ReadConfigFileResult['config']|any} [config] -\n * Configuration & metadata\n * @param {FormatConfigErrorsOptions} [opts]\n * @throws {TypeError} If `errors` is empty\n * @returns {string}\n */\nexport function formatErrors(errors = [], config = {}, opts = {}) {\n if (errors && !errors.length) {\n throw new TypeError('Array of errors must be non-empty');\n }\n return betterAjvErrors(getSchema(opts.schemaId), config, errors, {\n json: opts.json,\n format: 'cli',\n });\n}\n\n/**\n * Given an optional path, read a config file. Validates the config file.\n *\n * Call {@link validate} if you already have a config object.\n * @param {string} [filepath] - Path to config file, if we have one\n * @param {ReadConfigFileOptions} [opts] - Options\n * @public\n * @returns {Promise} Contains config and filepath, if found, and any errors\n */\nexport async function readConfigFile(filepath, opts = {}) {\n const lc = lilconfig('appium', {\n loaders: {\n '.yaml': yamlLoader,\n '.yml': yamlLoader,\n '.json': jsonLoader,\n noExt: jsonLoader,\n },\n packageProp: 'appiumConfig',\n });\n\n const result = filepath ? await loadConfigFile(lc, filepath) : await searchConfigFile(lc);\n\n if (result?.filepath && !result?.isEmpty) {\n const {pretty = true} = opts;\n try {\n let configResult;\n const errors = validate(result.config);\n if (_.isEmpty(errors)) {\n configResult = {...result, errors};\n } else {\n const reason = formatErrors(errors, result.config, {\n json: rawConfig.get(result.filepath),\n pretty,\n });\n configResult = reason ? {...result, errors, reason} : {...result, errors};\n }\n\n // normalize (to camel case) all top-level property names of the config file\n configResult.config = normalizeConfig(/** @type {AppiumConfig} */ (configResult.config));\n\n return configResult;\n } finally {\n // clean up the raw config file cache, which is only kept to better report errors.\n rawConfig.delete(result.filepath);\n }\n }\n return result ?? {};\n}\n\n/**\n * Convert schema property names to either a) the value of the `appiumCliDest` property, if any; or b) camel-case\n * @param {AppiumConfig} config - Configuration object\n * @returns {NormalizedAppiumConfig} New object with camel-cased keys (or `dest` keys).\n */\nexport function normalizeConfig(config) {\n const schema = getSchema();\n /**\n * @param {AppiumConfig} config\n * @param {string} [section] - Keypath (lodash `_.get()` style) to section of config. If omitted, assume root Appium config schema\n * @todo Rewrite as a loop\n * @returns Normalized section of config\n */\n const normalize = (config, section) => {\n const obj = _.isUndefined(section) ? config : _.get(config, section, config);\n\n const mappedObj = _.mapKeys(obj, (__, prop) =>\n _.get(schema, `properties.server.properties[${prop}].appiumCliDest`, _.camelCase(prop))\n );\n\n return _.mapValues(mappedObj, (value, property) => {\n const nextSection = section ? `${section}.${property}` : property;\n return isSchemaTypeObject(schema.properties?.[property])\n ? normalize(config, nextSection)\n : value;\n });\n };\n\n /**\n * Returns `true` if the schema prop references an object, or if it's an object itself\n * @param {import('ajv').SchemaObject|object} schema - Referencing schema object\n */\n const isSchemaTypeObject = (schema) => Boolean(schema?.properties || schema?.type === 'object');\n\n return normalize(config);\n}\n\n/**\n * Result of calling {@link readConfigFile}.\n * @typedef ReadConfigFileResult\n * @property {import('ajv').ErrorObject[]} [errors] - Validation errors\n * @property {string} [filepath] - The path to the config file, if found\n * @property {boolean} [isEmpty] - If `true`, the config file exists but is empty\n * @property {NormalizedAppiumConfig} [config] - The parsed configuration\n * @property {string|import('@sidvind/better-ajv-errors').IOutputError[]} [reason] - Human-readable error messages and suggestions. If the `pretty` option is `true`, this will be a nice string to print.\n */\n\n/**\n * Options for {@link readConfigFile}.\n * @typedef ReadConfigFileOptions\n * @property {boolean} [pretty=true] If `false`, do not use color and fancy formatting in the `reason` property of the {@link ReadConfigFileResult}. The value of `reason` is then suitable for machine-reading.\n */\n\n/**\n * This is an `AsyncSearcher` which is inexplicably _not_ exported by the `lilconfig` type definition.\n * @typedef {ReturnType} LilconfigAsyncSearcher\n */\n\n/**\n * The contents of an Appium config file. Generated from schema\n * @typedef {import('@appium/types').AppiumConfig} AppiumConfig\n */\n\n/**\n * The contents of an Appium config file with camelcased property names (and using `appiumCliDest` value if present). Generated from {@link AppiumConfig}\n * @typedef {import('@appium/types').NormalizedAppiumConfig} NormalizedAppiumConfig\n */\n\n/**\n * The string should be a raw JSON string.\n * @typedef {string} RawJson\n */\n\n/**\n * Options for {@link formatErrors}.\n * @typedef FormatConfigErrorsOptions\n * @property {import('./config-file').RawJson} [json] - Raw JSON config (as string)\n * @property {boolean} [pretty=true] - Whether to format errors as a CLI-friendly string\n * @property {string} [schemaId] - Specific ID of a prop; otherwise entire schema\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/config.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n/* eslint-disable no-console */\nimport _ from 'lodash';\nimport {system, fs, npm} from '@appium/support';\nimport axios from 'axios';\nimport {exec} from 'teen_process';\nimport * as semver from 'semver';\nimport os from 'node:os';\nimport {npmPackage} from './utils';\nimport B from 'bluebird';\nimport {getDefaultsForSchema, getAllArgSpecs} from './schema/schema';\n\nexport const APPIUM_VER = npmPackage.version;\nconst ENGINES = /** @type {Record} */ (npmPackage.engines);\nconst MIN_NODE_VERSION = ENGINES.node;\nexport const rootDir = fs.findRoot(__dirname);\n\nconst GIT_BINARY = `git${system.isWindows() ? '.exe' : ''}`;\nconst GITHUB_API = 'https://api.github.com/repos/appium/appium';\n\n/**\n * @type {import('appium/types').BuildInfo}\n */\nconst BUILD_INFO = {\n version: APPIUM_VER,\n};\n\nfunction getNodeVersion() {\n return /** @type {import('semver').SemVer} */ (semver.coerce(process.version));\n}\n\n/**\n * @param {boolean} [useGithubApiFallback]\n * @returns {Promise}\n */\nexport async function updateBuildInfo(useGithubApiFallback = false) {\n const sha = await getGitRev(useGithubApiFallback);\n if (!sha) {\n return;\n }\n BUILD_INFO['git-sha'] = sha;\n const buildTimestamp = await getGitTimestamp(sha, useGithubApiFallback);\n if (buildTimestamp) {\n BUILD_INFO.built = buildTimestamp;\n }\n}\n\n/** @type {() => Promise} */\nconst getFullGitPath = _.memoize(async function getFullGitPath() {\n try {\n return await fs.which(GIT_BINARY);\n } catch {\n return null;\n }\n});\n\n/**\n * Prints server debug into into the console.\n *\n * @param {{\n * driverConfig: import('./extension/driver-config').DriverConfig,\n * pluginConfig: import('./extension/plugin-config').PluginConfig,\n * appiumHome: string\n * }} info\n * @returns {Promise}\n */\nexport async function showDebugInfo({driverConfig, pluginConfig, appiumHome}) {\n const getNpmVersion = async () => {\n const {stdout} = await npm.exec('--version', [], {cwd: process.cwd()});\n return _.trim(stdout);\n };\n const findNpmLocation = async () => await fs.which(system.isWindows() ? 'npm.cmd' : 'npm');\n const [npmVersion, npmLocation] = await B.all([\n ...([getNpmVersion, findNpmLocation].map((f) => getSafeResult(f, 'unknown'))),\n /** @type {any} */ (updateBuildInfo()),\n ]);\n const debugInfo = {\n os: {\n platform: os.platform(),\n release: os.release(),\n arch: os.arch(),\n homedir: os.homedir(),\n username: os.userInfo().username,\n },\n node: {\n version: process.version,\n arch: process.arch,\n cwd: process.cwd(),\n argv: process.argv,\n env: process.env,\n npm: {\n location: npmLocation,\n version: npmVersion,\n },\n },\n appium: {\n location: rootDir,\n homedir: appiumHome,\n build: getBuildInfo(),\n drivers: driverConfig.installedExtensions,\n plugins: pluginConfig.installedExtensions,\n },\n };\n console.log(JSON.stringify(debugInfo, null, 2));\n}\n\n/**\n * @param {boolean} [useGithubApiFallback]\n * @returns {Promise}\n */\nexport async function getGitRev(useGithubApiFallback = false) {\n const fullGitPath = await getFullGitPath();\n if (fullGitPath) {\n try {\n const {stdout} = await exec(fullGitPath, ['rev-parse', 'HEAD'], {\n cwd: __dirname,\n });\n return stdout.trim();\n } catch {}\n }\n\n if (!useGithubApiFallback) {\n return null;\n }\n\n // If the package folder is not a valid git repository\n // then fetch the corresponding tag info from GitHub\n try {\n return (\n await axios.get(`${GITHUB_API}/git/refs/tags/appium@${APPIUM_VER}`, {\n headers: {\n 'User-Agent': `Appium ${APPIUM_VER}`,\n },\n })\n ).data?.object?.sha;\n } catch {}\n return null;\n}\n\n/**\n * @param {string} commitSha\n * @param {boolean} [useGithubApiFallback]\n * @returns {Promise}\n */\nasync function getGitTimestamp(commitSha, useGithubApiFallback = false) {\n const fullGitPath = await getFullGitPath();\n if (fullGitPath) {\n try {\n const {stdout} = await exec(fullGitPath, ['show', '-s', '--format=%ci', commitSha], {\n cwd: __dirname,\n });\n return stdout.trim();\n } catch {}\n }\n\n if (!useGithubApiFallback) {\n return null;\n }\n\n try {\n return (\n await axios.get(`${GITHUB_API}/git/tags/${commitSha}`, {\n headers: {\n 'User-Agent': `Appium ${APPIUM_VER}`,\n },\n })\n ).data?.tagger?.date;\n } catch {}\n return null;\n}\n\n/**\n * Mutable object containing Appium build information. By default it\n * only contains the Appium version, but is updated with the build timestamp\n * and git commit hash asynchronously as soon as `updateBuildInfo` is called\n * and succeeds.\n * @returns {import('appium/types').BuildInfo}\n */\nexport function getBuildInfo() {\n return BUILD_INFO;\n}\n\n/**\n * @returns {void}\n * @throws {Error} If Node version is outside of the supported range\n */\nexport function checkNodeOk() {\n const version = getNodeVersion();\n if (!semver.satisfies(version, MIN_NODE_VERSION)) {\n throw new Error(\n `Node version must be at least ${MIN_NODE_VERSION}; current is ${version.version}`\n );\n }\n}\n\nexport async function showBuildInfo() {\n await updateBuildInfo(true);\n console.log(JSON.stringify(getBuildInfo()));\n}\n\n/**\n * Returns k/v pairs of server arguments which are _not_ the defaults.\n * @param {Args} parsedArgs\n * @returns {Args}\n */\nexport function getNonDefaultServerArgs(parsedArgs) {\n /**\n * Flattens parsed args into a single level object for comparison with\n * flattened defaults across server args and extension args.\n * @param {Args} args\n * @returns {Record}\n */\n const flatten = (args) => {\n const argSpecs = getAllArgSpecs();\n const flattened = _.reduce(\n [...argSpecs.values()],\n (acc, argSpec) => {\n if (_.has(args, argSpec.dest)) {\n acc[argSpec.dest] = {value: _.get(args, argSpec.dest), argSpec};\n }\n return acc;\n },\n /** @type {Record} */ ({})\n );\n\n return flattened;\n };\n\n const args = flatten(parsedArgs);\n\n // hopefully these function names are descriptive enough\n const typesDiffer = /** @param {string} dest */ (dest) =>\n typeof args[dest].value !== typeof defaultsFromSchema[dest];\n\n const defaultValueIsArray = /** @param {string} dest */ (dest) =>\n _.isArray(defaultsFromSchema[dest]);\n\n const argsValueIsArray = /** @param {string} dest */ (dest) => _.isArray(args[dest].value);\n\n const arraysDiffer = /** @param {string} dest */ (dest) =>\n _.gt(_.size(_.difference(args[dest].value, defaultsFromSchema[dest])), 0);\n\n const valuesDiffer = /** @param {string} dest */ (dest) =>\n args[dest].value !== defaultsFromSchema[dest];\n\n const defaultIsDefined = /** @param {string} dest */ (dest) =>\n !_.isUndefined(defaultsFromSchema[dest]);\n\n // note that `_.overEvery` is like an \"AND\", and `_.overSome` is like an \"OR\"\n\n const argValueNotArrayOrArraysDiffer = _.overSome([_.negate(argsValueIsArray), arraysDiffer]);\n\n const defaultValueNotArrayAndValuesDiffer = _.overEvery([\n _.negate(defaultValueIsArray),\n valuesDiffer,\n ]);\n\n /**\n * This used to be a hideous conditional, but it's broken up into a hideous function instead.\n * hopefully this makes things a little more understandable.\n * - checks if the default value is defined\n * - if so, and the default is not an array:\n * - ensures the types are the same\n * - ensures the values are equal\n * - if so, and the default is an array:\n * - ensures the args value is an array\n * - ensures the args values do not differ from the default values\n * @type {(dest: string) => boolean}\n */\n const isNotDefault = _.overEvery([\n defaultIsDefined,\n _.overSome([\n typesDiffer,\n _.overEvery([defaultValueIsArray, argValueNotArrayOrArraysDiffer]),\n defaultValueNotArrayAndValuesDiffer,\n ]),\n ]);\n\n const defaultsFromSchema = getDefaultsForSchema(true);\n\n return _.reduce(\n _.pickBy(args, (__, key) => isNotDefault(key)),\n // explodes the flattened object back into nested one\n (acc, {value, argSpec}) => _.set(acc, argSpec.dest, value),\n /** @type {Args} */ ({})\n );\n}\n\n/**\n * Compacts an object for {@link showConfig}:\n * 1. Removes `subcommand` key/value\n * 2. Removes `undefined` values\n * 3. Removes empty objects (but not `false` values)\n * Does not operate recursively.\n */\nconst compactConfig = _.partial(\n _.omitBy,\n _,\n (value, key) =>\n key === 'subcommand' || _.isUndefined(value) || (_.isObject(value) && _.isEmpty(value))\n);\n\n/**\n * Shows a breakdown of the current config after CLI params, config file loaded & defaults applied.\n *\n * The actual shape of `preConfigParsedArgs` and `defaults` does not matter for the purposes of this function,\n * but it's intended to be called with values of type {@link ParsedArgs} and `DefaultValues`, respectively.\n *\n * @param {Partial} nonDefaultPreConfigParsedArgs - Parsed CLI args (or param to `init()`) before config & defaults applied\n * @param {import('./config-file').ReadConfigFileResult} configResult - Result of attempting to load a config file. _Must_ be normalized\n * @param {Partial} defaults - Configuration defaults from schemas\n * @param {ParsedArgs} parsedArgs - Entire parsed args object\n */\nexport function showConfig(nonDefaultPreConfigParsedArgs, configResult, defaults, parsedArgs) {\n console.log('Appium Configuration\\n');\n console.log('from defaults:\\n');\n console.dir(compactConfig(defaults));\n if (configResult.config) {\n console.log(`\\nfrom config file at ${configResult.filepath}:\\n`);\n console.dir(compactConfig(configResult.config));\n } else {\n console.log(`\\n(no configuration file loaded)`);\n }\n const compactedNonDefaultPreConfigArgs = compactConfig(nonDefaultPreConfigParsedArgs);\n if (_.isEmpty(compactedNonDefaultPreConfigArgs)) {\n console.log(`\\n(no CLI parameters provided)`);\n } else {\n console.log('\\nvia CLI or function call:\\n');\n console.dir(compactedNonDefaultPreConfigArgs);\n }\n console.log('\\nfinal configuration:\\n');\n console.dir(compactConfig(parsedArgs));\n}\n\n/**\n * @param {string} root\n * @param {boolean} [requireWriteable=true]\n * @param {string} [displayName='folder path']\n * @throws {Error}\n */\nexport async function requireDir(root, requireWriteable = true, displayName = 'folder path') {\n let stat;\n try {\n stat = await fs.stat(root);\n } catch (e) {\n if (e.code === 'ENOENT') {\n try {\n await fs.mkdir(root, {recursive: true});\n return;\n } catch {}\n }\n throw new Error(`The ${displayName} '${root}' must exist and be a valid directory`);\n }\n if (stat && !stat.isDirectory()) {\n throw new Error(`The ${displayName} '${root}' must be a valid directory`);\n }\n if (requireWriteable) {\n try {\n await fs.access(root, fs.constants.W_OK);\n } catch {\n throw new Error(\n `The ${displayName} '${root}' must be ` +\n `writeable for the current user account '${os.userInfo().username}'`\n );\n }\n }\n}\n\n/**\n * Calculates the result of the given function and return its value\n * or the default one if there was an exception.\n *\n * @template T\n * @param {() => Promise} f\n * @param {T} defaultValue\n * @returns {Promise}\n */\nasync function getSafeResult(f, defaultValue) {\n try {\n return await f();\n } catch {\n return defaultValue;\n }\n}\n\n/**\n * @typedef {import('appium/types').ParsedArgs} ParsedArgs\n * @typedef {import('appium/types').Args} Args\n * @typedef {import('./schema/arg-spec').ArgSpec} ArgSpec\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/constants.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport path from 'node:path';\n\n/**\n * The name of the extension type for drivers\n */\nexport const DRIVER_TYPE = 'driver';\n\n/**\n * The name of the extension type for plugins\n */\nexport const PLUGIN_TYPE = 'plugin';\n\n/**\n * The `server` command of the `appium` CLI\n */\nexport const SERVER_SUBCOMMAND = 'server';\n\n/**\n * The `setup` command of the `appium` CLI\n */\nexport const SETUP_SUBCOMMAND = 'setup';\n\n\n/**\n * The value of `--use-plugins` if _all_ plugins should be loaded\n */\nexport const USE_ALL_PLUGINS = 'all';\n\n// This is a map of plugin names to npm packages representing those plugins.\n// The plugins in this list will be available to the CLI so users can just\n// type 'appium plugin install 'name'', rather than having to specify the full\n// npm package. I.e., these are the officially recognized plugins.\nexport const KNOWN_PLUGINS = Object.freeze(\n /** @type {const} */ ({\n 'execute-driver': '@appium/execute-driver-plugin',\n images: '@appium/images-plugin',\n inspector: 'appium-inspector-plugin',\n 'relaxed-caps': '@appium/relaxed-caps-plugin',\n storage: '@appium/storage-plugin',\n 'universal-xml': '@appium/universal-xml-plugin',\n }),\n);\n\nexport const MOBILE_DRIVERS = Object.freeze(\n /** @type {const} */ ({\n uiautomator2: 'appium-uiautomator2-driver',\n xcuitest: 'appium-xcuitest-driver',\n espresso: 'appium-espresso-driver',\n }),\n);\n\nexport const DESKTOP_DRIVERS = Object.freeze(\n /** @type {const} */ ({\n mac2: 'appium-mac2-driver',\n windows: 'appium-windows-driver',\n }),\n);\n\nexport const DESKTOP_BROWSERS = Object.freeze(\n /** @type {const} */ ({\n safari: 'appium-safari-driver',\n gecko: 'appium-geckodriver',\n chromium: 'appium-chromium-driver',\n }),\n);\n\n// This is a map of driver names to npm packages representing those drivers.\n// The drivers in this list will be available to the CLI so users can just\n// type 'appium driver install 'name'', rather than having to specify the full\n// npm package. I.e., these are the officially recognized drivers.\nexport const KNOWN_DRIVERS = Object.freeze(\n /** @type {const} */ ({\n ...MOBILE_DRIVERS,\n ...DESKTOP_DRIVERS,\n ...DESKTOP_BROWSERS,\n }),\n);\n\n/**\n * Relative path to directory containing any Appium internal files\n */\nexport const CACHE_DIR_RELATIVE_PATH = path.join('node_modules', '.cache', 'appium');\n\n/**\n * Relative path to hashfile (from `APPIUM_HOME`) of consuming project's `package.json` (if it exists)\n */\nexport const PKG_HASHFILE_RELATIVE_PATH = path.join(CACHE_DIR_RELATIVE_PATH, 'package.hash');\n\nexport const EXT_SUBCOMMAND_LIST = 'list';\nexport const EXT_SUBCOMMAND_INSTALL = 'install';\nexport const EXT_SUBCOMMAND_UNINSTALL = 'uninstall';\nexport const EXT_SUBCOMMAND_UPDATE = 'update';\nexport const EXT_SUBCOMMAND_RUN = 'run';\nexport const EXT_SUBCOMMAND_DOCTOR = 'doctor';\n\n/**\n * Current revision of the manifest (`extensions.yaml`) schema\n */\nexport const CURRENT_SCHEMA_REV = 4;\n\n/**\n * The default number of stack frames to show in a \"long\" stack trace, when enabled via `--long-stacktrace`\n * @remarks This value may be increased in the future.\n * @privateRemarks A value like `Infinity` may provide to have deleterious effects on\n * memory usage, perf, and/or log output, and higher limits may be difficult to scan.\n */\nexport const LONG_STACKTRACE_LIMIT = 100;\n\n/**\n * Where should the bidi websocket handler live on the server?\n */\nexport const BIDI_BASE_PATH = '/bidi';\n\n/**\n * The name of the event for drivers to emit when they want to send bidi events to a client over\n * a bidi socket\n */\nexport const BIDI_EVENT_NAME = 'bidiEvent';\n\n/**\n * The name of the insecure feature that allows retrieving the list of active server sessions\n */\nexport const SESSION_DISCOVERY_FEATURE = 'session_discovery';\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/grid-register.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport axios from 'axios';\nimport {fs} from '@appium/support';\nimport logger from './logger';\nimport _ from 'lodash';\n\nconst hubUri = (config) => {\n const protocol = config.hubProtocol || 'http';\n return `${protocol}://${config.hubHost}:${config.hubPort}`;\n};\n\n/**\n * Registers a new node with a selenium grid\n * @param {string|object} data - Path or object representing selenium grid node config file. If a `string`, all subsequent arguments are required!\n * @param {string} [addr] - Bind to this address\n * @param {number} [port] - Bind to this port\n * @param {string} [basePath] - Base path for the grid\n */\nasync function registerNode(data, addr, port, basePath) {\n let configFilePath;\n if (_.isString(data)) {\n configFilePath = data;\n try {\n data = await fs.readFile(data, 'utf-8');\n } catch (err) {\n logger.error(\n `Unable to load node configuration file ${configFilePath} to register with grid: ${err.message}`\n );\n return;\n }\n try {\n data = JSON.parse(data);\n } catch (err) {\n throw logger.errorWithException(\n `Syntax error in node configuration file ${configFilePath}: ${err.message}`\n );\n }\n }\n\n postRequest(data, addr, port, basePath);\n}\n\nasync function registerToGrid(postOptions, configHolder) {\n try {\n const {status} = await axios(postOptions);\n if (status !== 200) {\n throw new Error(`Request failed with code ${status}`);\n }\n logger.debug(\n `Appium successfully registered with the the grid on ` + hubUri(configHolder.configuration)\n );\n } catch (err) {\n logger.error(`An attempt to register with the grid was unsuccessful: ${err.message}`);\n }\n}\n\nfunction postRequest(configHolder, addr, port, basePath) {\n // Move Selenium 3 configuration properties to configuration object\n if (!_.has(configHolder, 'configuration')) {\n let configuration = {};\n for (const property in /** @type {import('@appium/types').StringRecord} */ (configHolder)) {\n if (_.has(configHolder, property) && property !== 'capabilities') {\n configuration[property] = configHolder[property];\n delete configHolder[property];\n }\n }\n /** @type {import('@appium/types').StringRecord} */ (configHolder).configuration = configuration;\n }\n\n // if the node config does not have the appium/webdriver url, host, and port,\n // automatically add it based on how appium was initialized\n // otherwise, we will take whatever the user setup\n // because we will always set localhost/127.0.0.1. this won't work if your\n // node and grid aren't in the same place\n if (\n !configHolder.configuration.url ||\n !configHolder.configuration.host ||\n !configHolder.configuration.port\n ) {\n configHolder.configuration.url = `http://${addr}:${port}${basePath}`;\n configHolder.configuration.host = addr;\n configHolder.configuration.port = port;\n }\n // if the node config does not have id automatically add it\n if (!configHolder.configuration.id) {\n configHolder.configuration.id = `http://${configHolder.configuration.host}:${configHolder.configuration.port}`;\n }\n\n // the post options\n const regRequest = {\n url: `${hubUri(configHolder.configuration)}/grid/register`,\n method: 'POST',\n data: configHolder,\n };\n\n if (configHolder.configuration.register !== true) {\n logger.debug(`No registration sent (${configHolder.configuration.register} = false)`);\n return;\n }\n\n const registerCycleInterval = configHolder.configuration.registerCycle;\n if (isNaN(registerCycleInterval) || registerCycleInterval <= 0) {\n logger.warn(\n `'registerCycle' is not a valid positive number. ` +\n `No registration request will be sent to the grid.`\n );\n return;\n }\n // initiate a new Thread\n let first = true;\n logger.debug(\n `Starting auto register thread for the grid. ` +\n `Will try to register every ${registerCycleInterval} ms.`\n );\n setInterval(async function registerRetry() {\n if (first) {\n first = false;\n await registerToGrid(regRequest, configHolder);\n } else if (!(await isAlreadyRegistered(configHolder))) {\n // make the http POST to the grid for registration\n await registerToGrid(regRequest, configHolder);\n }\n }, registerCycleInterval);\n}\n\nasync function isAlreadyRegistered(configHolder) {\n //check if node is already registered\n const id = configHolder.configuration.id;\n try {\n const {data, status} = await axios({\n url: `${hubUri(configHolder.configuration)}/grid/api/proxy?id=${id}`,\n timeout: 10000,\n });\n if (status !== 200) {\n throw new Error(`Request failed with code ${status}`);\n }\n if (!data.success) {\n // if register fail, print the debug msg\n logger.debug(`Grid registration error: ${data.msg}`);\n }\n return data.success;\n } catch (err) {\n logger.debug(`Hub down or not responding: ${err.message}`);\n }\n}\n\nexport default registerNode;\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/insecure-features.ts\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\nimport logger from './logger';\n\nimport type {AppiumDriver} from './appium';\nimport type {ExternalDriver} from '@appium/types';\n\nconst ALL_DRIVERS_MATCH = '*';\nconst FEATURE_NAME_SEPARATOR = ':';\n\n/**\n * Configures insecure features according to the values in `args.relaxedSecurityEnabled`,\n * `args.allowInsecure`, and `args.denyInsecure`, and informs the user about any\n * globally-applied features.\n * Uses `logger` instead of `this.log` to reduce user confusion.\n */\nexport function configureGlobalFeatures(this: AppiumDriver) {\n if (this.args.relaxedSecurityEnabled) {\n logger.info(\n `Enabling relaxed security. All insecure features will be ` +\n `enabled unless explicitly disabled by --deny-insecure`,\n );\n this.relaxedSecurityEnabled = true;\n } else if (!_.isEmpty(this.args.allowInsecure)) {\n this.allowInsecure = validateFeatures(this.args.allowInsecure);\n const globalAllowedFeatures = filterInsecureFeatures(this.allowInsecure);\n if (!_.isEmpty(globalAllowedFeatures)) {\n logger.info('Explicitly enabling insecure features:');\n globalAllowedFeatures.forEach((a) => logger.info(` ${a}`));\n }\n }\n if (_.isEmpty(this.args.denyInsecure)) {\n return;\n }\n this.denyInsecure = validateFeatures(this.args.denyInsecure);\n const globalDeniedFeatures = filterInsecureFeatures(this.denyInsecure);\n if (_.isEmpty(globalDeniedFeatures)) {\n return;\n }\n logger.info('Explicitly disabling insecure features:');\n globalDeniedFeatures.forEach((a) => logger.info(` ${a}`));\n}\n\n/**\n * If anything in the umbrella driver's insecure feature configuration applies to this driver,\n * assign it to the driver instance\n *\n * @param driver\n * @param driverName\n */\nexport function configureDriverFeatures(\n this: AppiumDriver,\n driver: ExternalDriver,\n driverName: string,\n) {\n if (this.relaxedSecurityEnabled) {\n this.log.info(\n `Enabling relaxed security for this session as per the server configuration. ` +\n `All insecure features will be enabled unless explicitly disabled by --deny-insecure`,\n );\n driver.relaxedSecurityEnabled = true;\n }\n const allowedDriverFeatures = filterInsecureFeatures(this.allowInsecure, driverName);\n if (!_.isEmpty(allowedDriverFeatures)) {\n this.log.info('Explicitly enabling insecure features for this session ' +\n 'as per the server configuration:',\n );\n allowedDriverFeatures.forEach((a) => this.log.info(` ${a}`));\n driver.allowInsecure = allowedDriverFeatures;\n }\n const deniedDriverFeatures = filterInsecureFeatures(this.denyInsecure, driverName);\n if (_.isEmpty(deniedDriverFeatures)) {\n return;\n }\n this.log.info('Explicitly disabling insecure features for this session ' +\n 'as per the server configuration:',\n );\n deniedDriverFeatures.forEach((a) => this.log.info(` ${a}`));\n driver.denyInsecure = deniedDriverFeatures;\n}\n\n/**\n * Validates the list of allowed/denied server features\n *\n * @param features\n */\nfunction validateFeatures(features: string[]): string[] {\n const validator = (fullName: string) => {\n const errMsg = `The full feature name must include both the destination automation name or the ` +\n `'${ALL_DRIVERS_MATCH}' wildcard to apply the feature to all installed drivers, and ` +\n `the feature name split by a colon. Got '${fullName}' instead`;\n\n const separatorPos = fullName.indexOf(FEATURE_NAME_SEPARATOR);\n if (separatorPos < 0) {\n throw new Error(errMsg);\n }\n const [automationName, featureName] = [\n fullName.substring(0, separatorPos),\n fullName.substring(separatorPos + 1)\n ];\n if (!automationName || !featureName) {\n throw new Error(errMsg);\n }\n return fullName;\n };\n return features.map(validator);\n}\n\n/**\n * Filters the list of insecure features to only those that are\n * applicable to the given driver name.\n * Assumes that all feature names have already been validated\n *\n * @param features\n * @param driverName\n */\nfunction filterInsecureFeatures(\n features: string[],\n driverName: string = ALL_DRIVERS_MATCH\n): string[] {\n const filterFn = (fullName: string) => {\n const separatorPos = fullName.indexOf(FEATURE_NAME_SEPARATOR);\n if (separatorPos <= 0) {\n return false;\n }\n const automationName = fullName.substring(0, separatorPos);\n return [driverName, ALL_DRIVERS_MATCH].includes(automationName);\n };\n return features.filter(filterFn);\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/inspector-commands.ts\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\nimport {\n METHOD_MAP as BASE_METHOD_MAP,\n BIDI_COMMANDS as BASE_BIDI_COMMANDS,\n} from '@appium/base-driver';\nimport type {\n ListCommandsResponse,\n MethodMap,\n BidiModuleMap,\n DriverClass,\n PluginClass,\n ListExtensionsResponse,\n PayloadParams,\n RestCommandItemParam,\n RestMethodsToCommandsMap,\n BiDiCommandsMap,\n BidiMethodParams,\n BiDiCommandItemParam,\n BiDiCommandNamesToInfosMap,\n ExecuteMethodMap,\n} from '@appium/types';\nimport type { AppiumDriver } from './appium';\n\n\nexport async function listCommands(this: AppiumDriver, sessionId?: string): Promise {\n let driverRestMethodMap: MethodMap = {};\n let driverBiDiCommands: BidiModuleMap = {};\n let pluginRestMethodMaps: Record> = {};\n let pluginBiDiCommands: Record = {};\n if (sessionId) {\n const driverClass = this.driverForSession(sessionId)?.constructor as (DriverClass | undefined);\n driverRestMethodMap = driverClass?.newMethodMap ?? {};\n driverBiDiCommands = driverClass?.newBidiCommands ?? {};\n const pluginClasses = this.pluginsForSession(sessionId)\n .map((p) => p.constructor as PluginClass);\n pluginRestMethodMaps = _.fromPairs(pluginClasses.map((c) => [c.name, c.newMethodMap ?? {}]));\n pluginBiDiCommands = _.fromPairs(pluginClasses.map((c) => [c.name, c.newBidiCommands ?? {}]));\n }\n return {\n rest: {\n base: methodMapToRestCommandsInfo(BASE_METHOD_MAP),\n driver: methodMapToRestCommandsInfo(driverRestMethodMap),\n plugins: pluginRestMethodMaps ? _.mapValues(pluginRestMethodMaps, methodMapToRestCommandsInfo) : undefined,\n },\n bidi: toBiDiCommandsMap(BASE_BIDI_COMMANDS, driverBiDiCommands, pluginBiDiCommands),\n };\n}\n\nexport async function listExtensions(this: AppiumDriver, sessionId?: string): Promise {\n let driverExecuteMethodMap: ExecuteMethodMap = {};\n let pluginExecuteMethodMaps: Record> = {};\n if (sessionId) {\n const driverClass = this.driverForSession(sessionId)?.constructor as (DriverClass | undefined);\n driverExecuteMethodMap = driverClass?.executeMethodMap ?? {};\n const pluginClasses = this.pluginsForSession(sessionId)\n .map((p) => p.constructor as PluginClass);\n pluginExecuteMethodMaps = _.fromPairs(pluginClasses.map((c) => [c.name, c.executeMethodMap ?? {}]));\n }\n return {\n rest: {\n driver: executeMethodMapToCommandsInfo(driverExecuteMethodMap),\n plugins: pluginExecuteMethodMaps ? _.mapValues(pluginExecuteMethodMaps, executeMethodMapToCommandsInfo) : undefined,\n },\n };\n}\n\nfunction toRestCommandParams(params: PayloadParams | undefined): RestCommandItemParam[] | undefined {\n if (!params) {\n return;\n }\n\n const toRestCommandItemParam = (x: any, isRequired: boolean): RestCommandItemParam | undefined => {\n const isNameAnArray = _.isArray(x);\n const name = isNameAnArray ? x[0] : x;\n if (!_.isString(name)) {\n return;\n }\n\n // If parameter names are arrays then this means\n // either of them is required.\n // Not sure we could reflect that in here.\n const required = isRequired && !isNameAnArray;\n return {\n name,\n required,\n };\n };\n\n const requiredParams: RestCommandItemParam[] = (params.required ?? [])\n .map((name: any) => toRestCommandItemParam(name, true))\n .filter((x) => !_.isUndefined(x));\n const optionalParams: RestCommandItemParam[] = (params.optional ?? [])\n .map((name: any) => toRestCommandItemParam(name, false))\n .filter((x) => !_.isUndefined(x));\n return requiredParams.length || optionalParams.length\n ? [...requiredParams, ...optionalParams]\n : undefined;\n}\n\nfunction methodMapToRestCommandsInfo (mm: MethodMap): Record {\n const res: Record = {};\n for (const [uriPath, methods] of _.toPairs(mm)) {\n const methodsMap = {};\n for (const [method, spec] of _.toPairs(methods)) {\n methodsMap[method] = {\n command: spec.command,\n deprecated: spec.deprecated,\n info: spec.info,\n params: toRestCommandParams(spec.payloadParams),\n };\n }\n res[uriPath] = methodsMap;\n }\n return res;\n}\n\nfunction executeMethodMapToCommandsInfo(emm: ExecuteMethodMap): RestMethodsToCommandsMap {\n const result: RestMethodsToCommandsMap = {};\n for (const [name, info] of _.toPairs(emm)) {\n result[name] = {\n command: info.command as string,\n deprecated: info.deprecated,\n info: info.info,\n params: toRestCommandParams(info.params),\n };\n }\n return result;\n}\n\nfunction toBiDiCommandsMap(\n baseModuleMap: BidiModuleMap,\n driverModuleMap: BidiModuleMap,\n pluginModuleMaps: Record\n): BiDiCommandsMap {\n const toBiDiCommandParams = (params: BidiMethodParams | undefined): BiDiCommandItemParam[] | undefined => {\n if (!params) {\n return;\n }\n\n const toBiDiCommandItemParam = (x: any, isRequired: boolean): BiDiCommandItemParam | undefined => {\n const isNameAnArray = _.isArray(x);\n const name = isNameAnArray ? x[0] : x;\n if (!_.isString(name)) {\n return;\n }\n\n // If parameter names are arrays then this means\n // either of them is required.\n // Not sure we could reflect that in here.\n const required = isRequired && !isNameAnArray;\n return {\n name,\n required,\n };\n };\n\n const requiredParams: BiDiCommandItemParam[] = (params.required ?? [])\n .map((name) => toBiDiCommandItemParam(name, true))\n .filter((x) => !_.isUndefined(x));\n const optionalParams: BiDiCommandItemParam[] = (params.optional ?? [])\n .map((name) => toBiDiCommandItemParam(name, false))\n .filter((x) => !_.isUndefined(x));\n return requiredParams.length || optionalParams.length\n ? [...requiredParams, ...optionalParams]\n : undefined;\n };\n\n const moduleMapToBiDiCommandsInfo = (mm: BidiModuleMap): Record => {\n const res: Record = {};\n for (const [domain, commands] of _.toPairs(mm)) {\n const commandsMap = {};\n for (const [name, spec] of _.toPairs(commands)) {\n commandsMap[name] = {\n command: spec.command,\n deprecated: spec.deprecated,\n info: spec.info,\n params: toBiDiCommandParams(spec.params),\n };\n }\n res[domain] = commandsMap;\n }\n return res;\n };\n\n return {\n base: moduleMapToBiDiCommandsInfo(baseModuleMap),\n driver: moduleMapToBiDiCommandsInfo(driverModuleMap),\n plugins: pluginModuleMaps ? _.mapValues(pluginModuleMaps, moduleMapToBiDiCommandsInfo) : undefined,\n };\n}\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/logger.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {logger} from '@appium/support';\n\nexport const APPIUM_LOGGER_NAME = 'Appium';\nlet log = logger.getLogger(APPIUM_LOGGER_NAME);\n\nexport default log;\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/logsink.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport globalLog from '@appium/logger';\nimport {createLogger, format, transports} from 'winston';\nimport {fs} from '@appium/support';\nimport _ from 'lodash';\nimport { adler32 } from './utils';\nimport { LRUCache } from 'lru-cache';\n\n// set up distributed logging before everything else\nglobal._global_npmlog = globalLog;\n// npmlog is used only for emitting, we use winston for output\nglobalLog.level = 'info';\nconst LEVELS_MAP = {\n debug: 4,\n info: 3,\n warn: 2,\n error: 1,\n};\nconst COLORS_MAP = {\n info: 'cyan',\n debug: 'grey',\n warn: 'yellow',\n error: 'red',\n};\nconst TO_WINSTON_LEVELS_MAP = {\n silly: 'debug',\n verbose: 'debug',\n debug: 'debug',\n info: 'info',\n http: 'info',\n warn: 'warn',\n error: 'error',\n};\nconst COLOR_CODE_PATTERN = /\\u001b\\[(\\d+(;\\d+)*)?m/g; // eslint-disable-line no-control-regex\n\n// https://www.ditig.com/publications/256-colors-cheat-sheet\nconst MIN_COLOR = 17;\nconst MAX_COLOR = 231;\n/** @type {LRUCache} */\nconst COLORS_CACHE = new LRUCache({\n max: 1024,\n ttl: 1000 * 60 * 60 * 24, // expire after 24 hours\n updateAgeOnGet: true,\n});\n\n/** @type {import('winston').Logger?} */\nlet log = null;\n\n/**\n *\n * @param {import('../types').ParsedArgs} args\n * @returns {Promise}\n */\nexport async function init(args) {\n globalLog.level = 'silent';\n\n // clean up in case we have initiated before since npmlog is a global object\n clear();\n\n const transports = await createTransports(args);\n const transportNames = new Set(transports.map((tr) => tr.constructor.name));\n log = createLogger({\n transports,\n levels: LEVELS_MAP,\n handleExceptions: true,\n exitOnError: false\n });\n\n const reportedLoggerErrors = new Set();\n // Capture logs emitted via npmlog and pass them through winston\n globalLog.on('log', (/** @type {MessageObject} */{level, message, prefix}) => {\n const {sessionSignature} = globalLog.asyncStorage.getStore() ?? {};\n /** @type {string[]} */\n const prefixes = [];\n if (sessionSignature) {\n prefixes.push(sessionSignature);\n }\n if (prefix) {\n prefixes.push(prefix);\n }\n let msg = message;\n if (!_.isEmpty(prefixes)) {\n const finalPrefix = prefixes\n .map(toDecoratedPrefix)\n .map((pfx) => isLogColorEnabled(args) ? colorizePrefix(pfx) : pfx)\n .join('');\n msg = `${finalPrefix} ${msg}`;\n }\n const winstonLevel = TO_WINSTON_LEVELS_MAP[level] || 'info';\n try {\n /** @type {import('winston').Logger} */(log)[winstonLevel](msg);\n if (_.isFunction(args.logHandler)) {\n args.logHandler(level, msg);\n }\n } catch (e) {\n if (!reportedLoggerErrors.has(e.message) && process.stderr.writable) {\n // eslint-disable-next-line no-console\n console.error(\n `The log message '${_.truncate(msg, {length: 30})}' cannot be written into ` +\n `one or more requested destinations: ${transportNames}. Original error: ${e.message}`\n );\n reportedLoggerErrors.add(e.message);\n }\n }\n });\n}\n\n/**\n * @returns {void}\n */\nexport function clear() {\n log?.clear();\n globalLog.removeAllListeners('log');\n}\n\n// set the custom colors\nconst colorizeFormat = format.colorize({\n colors: COLORS_MAP,\n});\n\n// Strip the color marking within messages\nconst stripColorFormat = format(function stripColor(info) {\n return {\n ...info,\n level: stripColorCodes(info.level),\n message: _.isString(info.message) ? stripColorCodes(info.message) : info.message,\n };\n})();\n\n/**\n *\n * @param {ParsedArgs} args\n * @param {string} logLvl\n * @returns {transports.ConsoleTransportInstance}\n */\nfunction createConsoleTransport(args, logLvl) {\n /** @type {AppiumConsoleTransportOptions} */\n const opt = {\n name: 'console',\n level: logLvl,\n stderrLevels: ['error'],\n format: format.combine(\n formatTimestamp(args),\n isLogColorEnabled(args) ? colorizeFormat : stripColorFormat,\n formatLog(args, true),\n ),\n };\n return new transports.Console(opt);\n}\n\n/**\n *\n * @param {ParsedArgs} args\n * @param {string} logLvl\n * @returns {transports.FileTransportInstance}\n */\nfunction createFileTransport(args, logLvl) {\n /** @type {AppiumFileTransportOptions} */\n const opt = {\n name: 'file',\n filename: args.logFile,\n maxFiles: 1,\n level: logLvl,\n format: format.combine(\n stripColorFormat,\n formatTimestamp(args),\n formatLog(args, false),\n ),\n };\n return new transports.File(opt);\n}\n\n/**\n *\n * @param {ParsedArgs} args\n * @param {string} logLvl\n * @returns {transports.HttpTransportInstance}\n */\nfunction createHttpTransport(args, logLvl) {\n let host = '127.0.0.1';\n let port = 9003;\n\n if (args.webhook?.match(':')) {\n const hostAndPort = args.webhook.split(':');\n host = hostAndPort[0];\n port = parseInt(hostAndPort[1], 10);\n }\n\n /** @type {AppiumHttpTransportOptions} */\n const opt = {\n name: 'http',\n host,\n port,\n path: '/',\n level: logLvl,\n format: format.combine(\n stripColorFormat,\n formatLog(args, false),\n ),\n };\n return new transports.Http(opt);\n}\n\n/**\n *\n * @param {ParsedArgs} args\n * @returns {Promise}\n */\nasync function createTransports(args) {\n const transports = [];\n /** @type {string} */\n let consoleLogLevel;\n /** @type {string} */\n let fileLogLevel;\n if (args.loglevel && args.loglevel.match(':')) {\n // --log-level arg can optionally provide diff logging levels for console and file, separated by a colon\n const lvlPair = args.loglevel.split(':');\n [consoleLogLevel, fileLogLevel] = lvlPair;\n } else {\n consoleLogLevel = fileLogLevel = args.loglevel;\n }\n\n transports.push(createConsoleTransport(args, consoleLogLevel));\n\n if (args.logFile) {\n try {\n // if we don't delete the log file, winston will always append and it will grow infinitely large;\n // winston allows for limiting log file size, but as of 9.2.14 there's a serious bug when using\n // maxFiles and maxSize together. https://github.com/flatiron/winston/issues/397\n if (await fs.exists(args.logFile)) {\n await fs.unlink(args.logFile);\n }\n\n transports.push(createFileTransport(args, fileLogLevel));\n } catch (e) {\n // eslint-disable-next-line no-console\n console.log(\n `Tried to attach logging to file '${args.logFile}' but an error ` + `occurred: ${e.message}`\n );\n }\n }\n\n if (args.webhook) {\n try {\n transports.push(createHttpTransport(args, fileLogLevel));\n } catch (e) {\n // eslint-disable-next-line no-console\n console.log(\n `Tried to attach logging to Http at ${args.webhook} but ` +\n `an error occurred: ${e.message}`\n );\n }\n }\n\n return transports;\n}\n\n/**\n *\n * @param {string} text\n * @returns {string}\n */\nfunction toDecoratedPrefix(text) {\n return `[${text}]`;\n}\n\n/**\n * Selects the color of the text in terminal from the MIN_COLOR..MAX_COLOR\n * range. We use adler32 hashing to ensure that equal prefixes would always have\n * same colors.\n *\n * @param {string} text Initial text\n * @returns {string} Colorized text (with pseudocode cchars added)\n */\nfunction colorizePrefix(text) {\n let colorIndex = COLORS_CACHE.get(text);\n if (!colorIndex) {\n const hash = adler32(text);\n colorIndex = MIN_COLOR + hash % (MAX_COLOR - MIN_COLOR);\n COLORS_CACHE.set(text, colorIndex);\n }\n return `\\x1b[38;5;${colorIndex}m${text}\\x1b[0m`;\n}\n\n/**\n * @param {ParsedArgs} args\n * @param {boolean} targetConsole\n * @returns {import('logform').Format}\n */\nfunction formatLog(args, targetConsole) {\n if (['json', 'pretty_json'].includes(args.logFormat)) {\n return format.combine(\n format((info) => {\n const infoCopy = {...info};\n const contextInfo = globalLog.asyncStorage.getStore() ?? {};\n\n if (targetConsole && !args.logTimestamp) {\n delete infoCopy.timestamp;\n }\n\n if (!_.isEmpty(contextInfo)) {\n infoCopy.context = {...contextInfo};\n }\n\n return infoCopy;\n })(),\n format.json({space: args.logFormat === 'pretty_json' ? 2 : undefined}),\n );\n }\n\n return format.printf((info) => {\n if (targetConsole) {\n return `${args.logTimestamp ? `${info.timestamp} - ` : ''}${info.message}`;\n }\n return `${info.timestamp} ${info.message}`;\n });\n}\n\n/**\n * add the timestamp in the correct format to the log info object\n *\n * @param {ParsedArgs} args\n * @returns {import('logform').Format}\n */\nfunction formatTimestamp(args) {\n return format.timestamp({\n format() {\n let date = new Date();\n if (args.localTimezone) {\n date = new Date(date.valueOf() - date.getTimezoneOffset() * 60000);\n }\n // '2012-11-04T14:51:06.157Z' -> '2012-11-04 14:51:06:157'\n return date.toISOString().replace(/[TZ]/g, ' ').replace(/\\./g, ':').trim();\n },\n });\n}\n\n/**\n * Strips color control codes from the given string\n *\n * @param {string} text\n * @returns {string}\n */\nexport function stripColorCodes(text) {\n return text.replace(COLOR_CODE_PATTERN, '');\n}\n\n/**\n *\n * @param {ParsedArgs} args\n * @returns {boolean}\n */\nfunction isLogColorEnabled(args) {\n return !args.logNoColors && args.logFormat === 'text';\n}\n\nexport default init;\n\n/**\n * @typedef {import('appium/types').ParsedArgs} ParsedArgs\n * @typedef {import('@appium/logger').MessageObject} MessageObject\n * @typedef {transports.ConsoleTransportOptions & {name: string}} AppiumConsoleTransportOptions\n * @typedef {transports.FileTransportOptions & {name: string}} AppiumFileTransportOptions\n * @typedef {transports.HttpTransportOptions & {name: string}} AppiumHttpTransportOptions\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/main.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n#!/usr/bin/env node\n\nimport {WebSocketServer} from 'ws';\nimport {init as logsinkInit} from './logsink'; // this import needs to come first since it sets up global npmlog\nimport logger from './logger'; // logger needs to remain second\nimport {\n routeConfiguringFunction as makeRouter,\n server as baseServer,\n normalizeBasePath,\n} from '@appium/base-driver';\nimport {util, env} from '@appium/support';\nimport _ from 'lodash';\nimport {AppiumDriver} from './appium';\nimport {runExtensionCommand} from './cli/extension';\nimport { runSetupCommand } from './cli/setup-command';\nimport {getParser} from './cli/parser';\nimport {\n APPIUM_VER,\n checkNodeOk,\n getGitRev,\n getNonDefaultServerArgs,\n showConfig,\n showBuildInfo,\n showDebugInfo,\n requireDir,\n} from './config';\nimport {readConfigFile} from './config-file';\nimport {loadExtensions, getActivePlugins, getActiveDrivers} from './extension';\nimport {SERVER_SUBCOMMAND, LONG_STACKTRACE_LIMIT, BIDI_BASE_PATH} from './constants';\nimport registerNode from './grid-register';\nimport {getDefaultsForSchema, validate as validateSchema} from './schema/schema';\nimport {\n inspect,\n adjustNodePath,\n isDriverCommandArgs,\n isExtensionCommandArgs,\n isPluginCommandArgs,\n isServerCommandArgs,\n fetchInterfaces,\n V4_BROADCAST_IP,\n isSetupCommandArgs,\n isBroadcastIp,\n} from './utils';\nimport net from 'node:net';\nimport { injectAppiumSymlinks } from './cli/extension-command';\n\nconst {resolveAppiumHome} = env;\n/*\n * By default Node.js shows a warning\n * if the actual amount of listeners exceeds the maximum amount,\n * which equals to 10 by default. It is known that multiple drivers/plugins\n * may assign custom listeners to the server process to handle, for example,\n * the graceful shutdown scenario.\n */\nconst MAX_SERVER_PROCESS_LISTENERS = 100;\n\n/**\n *\n * @param {ParsedArgs} args\n * @param {boolean} [throwInsteadOfExit]\n */\nasync function preflightChecks(args, throwInsteadOfExit = false) {\n try {\n checkNodeOk();\n if (args.longStacktrace) {\n Error.stackTraceLimit = LONG_STACKTRACE_LIMIT;\n }\n if (args.showBuildInfo) {\n await showBuildInfo();\n process.exit(0);\n }\n\n validateSchema(args);\n\n if (args.tmpDir) {\n await requireDir(args.tmpDir, !args.noPermsCheck, 'tmpDir argument value');\n }\n } catch (err) {\n logger.error(err.message.red);\n if (throwInsteadOfExit) {\n throw err;\n }\n\n process.exit(1);\n }\n}\n\n/**\n * @param {Args} args\n */\nfunction logNonDefaultArgsWarning(args) {\n logger.info('Non-default server args:');\n inspect(args);\n}\n\n/**\n * @param {Args['defaultCapabilities']} caps\n */\nfunction logDefaultCapabilitiesWarning(caps) {\n logger.info(\n 'Default capabilities, which will be added to each request ' +\n 'unless overridden by desired capabilities:',\n );\n inspect(caps);\n}\n\n/**\n * @param {ParsedArgs} args\n */\nasync function logStartupInfo(args) {\n let welcome = `Welcome to Appium v${APPIUM_VER}`;\n let appiumRev = await getGitRev();\n if (appiumRev) {\n welcome += ` (REV ${appiumRev})`;\n }\n logger.info(welcome);\n\n let showArgs = getNonDefaultServerArgs(args);\n if (_.size(showArgs)) {\n logNonDefaultArgsWarning(showArgs);\n }\n if (!_.isEmpty(args.defaultCapabilities)) {\n logDefaultCapabilitiesWarning(args.defaultCapabilities);\n }\n // TODO: bring back loglevel reporting below once logger is flushed out\n // logger.info('Console LogLevel: ' + logger.transports.console.level);\n // if (logger.transports.file) {\n // logger.info('File LogLevel: ' + logger.transports.file.level);\n // }\n}\n\n/**\n * Gets a list of `updateServer` functions from all extensions\n * @param {DriverNameMap} driverClasses\n * @param {PluginNameMap} pluginClasses\n * @returns {import('@appium/types').UpdateServerCallback[]}\n */\nfunction getServerUpdaters(driverClasses, pluginClasses) {\n return _.compact(_.map([...driverClasses.keys(), ...pluginClasses.keys()], 'updateServer'));\n}\n\n/**\n * Makes a big `MethodMap` from all the little `MethodMap`s in the extensions\n * @param {DriverNameMap} driverClasses\n * @param {PluginNameMap} pluginClasses\n * @returns {import('@appium/types').MethodMap}\n */\nfunction getExtraMethodMap(driverClasses, pluginClasses) {\n return [...driverClasses.keys(), ...pluginClasses.keys()].reduce(\n (map, klass) => ({\n ...map,\n ...(klass.newMethodMap ?? {}),\n }),\n {},\n );\n}\n\n/**\n * @param {string?} [appiumHomeFromArgs] - Appium home value retrieved from progrmmatic server args\n * @returns {string}\n */\nfunction determineAppiumHomeSource(appiumHomeFromArgs) {\n if (!_.isNil(appiumHomeFromArgs)) {\n return 'appiumHome config value';\n } else if (process.env.APPIUM_HOME) {\n return 'APPIUM_HOME environment variable';\n }\n return 'autodetected Appium home path';\n}\n\n/**\n * Initializes Appium, but does not start the server.\n *\n * Use this to get at the configuration schema.\n *\n * If `args` contains a non-empty `subcommand` which is not `server`, this function will return an empty object.\n *\n * @template {CliCommand} [Cmd=ServerCommand]\n * @template {CliExtensionSubcommand|void} [SubCmd=void]\n * @param {Args} [args] - Partial args (programmatic usage only)\n * @returns {Promise>}\n * @example\n * import {init, getSchema} from 'appium';\n * const options = {}; // config object\n * await init(options);\n * const schema = getSchema(); // entire config schema including plugins and drivers\n */\nasync function init(args) {\n const appiumHome = args?.appiumHome ?? (await resolveAppiumHome());\n const appiumHomeSourceName = determineAppiumHomeSource(args?.appiumHome);\n // We verify the writeability later based on requested server arguments\n // Here we just need to make sure the path exists and is a folder\n await requireDir(appiumHome, false, appiumHomeSourceName);\n\n adjustNodePath();\n\n const {driverConfig, pluginConfig} = await loadExtensions(appiumHome);\n\n const parser = getParser();\n let throwInsteadOfExit = false;\n /** @type {Args} */\n let preConfigArgs;\n\n if (args) {\n // if we have a containing package instead of running as a CLI process,\n // that package might not appreciate us calling 'process.exit' willy-\n // nilly, so give it the option to have us throw instead of exit\n if (args.throwInsteadOfExit) {\n throwInsteadOfExit = true;\n // but remove it since it's not a real server arg per se\n delete args.throwInsteadOfExit;\n }\n preConfigArgs = {...args, subcommand: args.subcommand ?? SERVER_SUBCOMMAND};\n } else {\n // otherwise parse from CLI\n preConfigArgs = /** @type {Args} */ (parser.parseArgs());\n }\n\n const configResult = await readConfigFile(preConfigArgs.configFile);\n\n if (!_.isEmpty(configResult.errors)) {\n throw new Error(\n `Errors in config file ${configResult.filepath}:\\n ${\n configResult.reason ?? configResult.errors\n }`,\n );\n }\n\n // merge config and apply defaults.\n // the order of precedence is:\n // 1. command line args\n // 2. config file\n // 3. defaults from config file.\n if (isServerCommandArgs(preConfigArgs)) {\n const defaults = getDefaultsForSchema(false);\n\n /** @type {ParsedArgs} */\n const serverArgs = _.defaultsDeep({}, preConfigArgs, configResult.config?.server, defaults);\n\n if (preConfigArgs.showConfig) {\n showConfig(getNonDefaultServerArgs(preConfigArgs), configResult, defaults, serverArgs);\n return /** @type {InitResult} */ ({});\n }\n\n if (preConfigArgs.showDebugInfo) {\n await showDebugInfo({\n driverConfig,\n pluginConfig,\n appiumHome,\n });\n return /** @type {InitResult} */ ({});\n }\n\n await logsinkInit(serverArgs);\n\n if (serverArgs.logFilters) {\n const {issues, rules} = await logger.unwrap().loadSecureValuesPreprocessingRules(\n serverArgs.logFilters,\n );\n const argToLog = _.truncate(JSON.stringify(serverArgs.logFilters), {\n length: 150\n });\n if (!_.isEmpty(issues)) {\n throw new Error(\n `The log filtering rules config ${argToLog} has issues: ` +\n JSON.stringify(issues, null, 2),\n );\n }\n if (_.isEmpty(rules)) {\n logger.warn(\n `Found no log filtering rules in the ${argToLog} config. ` +\n `Is that expected?`,\n );\n } else {\n // Filtering aims to \"hide\" these values from the log,\n // so it would be nice to not show them in the log as well.\n logger.info(\n `Loaded ${util.pluralize('filtering rule', rules.length, true)}`,\n );\n }\n }\n\n if (!serverArgs.noPermsCheck) {\n await requireDir(appiumHome, true, appiumHomeSourceName);\n }\n\n const appiumDriver = new AppiumDriver(\n /** @type {import('@appium/types').DriverOpts} */ (\n serverArgs\n ),\n );\n // set the config on the umbrella driver so it can match drivers to caps\n appiumDriver.driverConfig = driverConfig;\n await preflightChecks(serverArgs, throwInsteadOfExit);\n\n return /** @type {InitResult} */ ({\n appiumDriver,\n parsedArgs: serverArgs,\n driverConfig,\n pluginConfig,\n appiumHome,\n });\n } else if (isSetupCommandArgs(preConfigArgs)) {\n await runSetupCommand(preConfigArgs, driverConfig, pluginConfig);\n return /** @type {InitResult} */ ({});\n } else {\n await requireDir(appiumHome, true, appiumHomeSourceName);\n if (isExtensionCommandArgs(preConfigArgs)) {\n // if the user has requested the 'driver' CLI, don't run the normal server,\n // but instead pass control to the driver CLI\n if (isDriverCommandArgs(preConfigArgs)) {\n await runExtensionCommand(preConfigArgs, driverConfig);\n }\n if (isPluginCommandArgs(preConfigArgs)) {\n await runExtensionCommand(preConfigArgs, pluginConfig);\n }\n\n if (isDriverCommandArgs(preConfigArgs) || isPluginCommandArgs(preConfigArgs)) {\n // @ts-ignore The linter suggest using dot\n const cmd = preConfigArgs.driverCommand || preConfigArgs.pluginCommand;\n if (cmd === 'install') {\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n }\n }\n }\n return /** @type {InitResult} */ ({});\n }\n}\n\n/**\n * Prints the actual server address and the list of URLs that\n * could be used to connect to the current server.\n * Properly replaces broadcast addresses in client URLs.\n *\n * @param {string} url The URL the server is listening on\n */\nfunction logServerAddress(url) {\n const urlObj = new URL(url);\n logger.info(`Appium REST http interface listener started on ${url}`);\n if (!isBroadcastIp(urlObj.hostname)) {\n return;\n }\n\n const interfaces = fetchInterfaces(urlObj.hostname === V4_BROADCAST_IP ? 4 : 6);\n const toLabel = (/** @type {import('node:os').NetworkInterfaceInfo} */ iface) => {\n const href = urlObj.href.replace(urlObj.hostname, iface.address);\n return iface.internal ? `${href} (only accessible from the same host)` : href;\n };\n logger.info(\n `You can provide the following ${interfaces.length === 1 ? 'URL' : 'URLs'} ` +\n `in your client code to connect to this server:\\n` +\n interfaces.map((iface) => `\\t${toLabel(iface)}`).join('\\n'),\n );\n}\n\n/**\n * Initializes Appium's config. Starts server if appropriate and resolves the\n * server instance if so; otherwise resolves w/ `undefined`.\n * @template {CliCommand} [Cmd=ServerCommand]\n * @template {CliExtensionSubcommand|void} [SubCmd=void]\n * @param {Args} [args] - Arguments from CLI or otherwise\n * @returns {Promise}\n */\nasync function main(args) {\n const initResult = await init(args);\n\n if (_.isEmpty(initResult)) {\n // if this branch is taken, we've run a different subcommand, so there's nothing\n // left to do here.\n return /** @type {Cmd extends ServerCommand ? import('@appium/types').AppiumServer : void} */ (\n undefined\n );\n }\n\n const {appiumDriver, pluginConfig, driverConfig, parsedArgs, appiumHome} =\n /** @type {InitResult} */ (initResult);\n\n const pluginClasses = await getActivePlugins(\n pluginConfig, parsedArgs.pluginsImportChunkSize, parsedArgs.usePlugins\n );\n // set the active plugins on the umbrella driver so it can use them for commands\n appiumDriver.pluginClasses = pluginClasses;\n\n await logStartupInfo(parsedArgs);\n\n // handle the insecure feature configuration since some features may apply globally\n appiumDriver.configureGlobalFeatures();\n\n const appiumHomeSourceName = determineAppiumHomeSource(args?.appiumHome);\n logger.debug(`The ${appiumHomeSourceName}: ${appiumHome}`);\n\n let routeConfiguringFunction = makeRouter(appiumDriver);\n\n const driverClasses = await getActiveDrivers(\n driverConfig, parsedArgs.driversImportChunkSize, parsedArgs.useDrivers\n );\n const serverUpdaters = getServerUpdaters(driverClasses, pluginClasses);\n const extraMethodMap = getExtraMethodMap(driverClasses, pluginClasses);\n\n /** @type {import('@appium/base-driver').ServerOpts} */\n const serverOpts = {\n routeConfiguringFunction,\n port: parsedArgs.port,\n hostname: parsedArgs.address,\n allowCors: parsedArgs.allowCors,\n basePath: parsedArgs.basePath,\n serverUpdaters,\n extraMethodMap,\n cliArgs: parsedArgs,\n };\n const normalizedBasePath = normalizeBasePath(parsedArgs.basePath);\n for (const timeoutArgName of ['keepAliveTimeout', 'requestTimeout']) {\n if (_.isInteger(parsedArgs[timeoutArgName])) {\n serverOpts[timeoutArgName] = parsedArgs[timeoutArgName] * 1000;\n }\n }\n let server;\n const bidiServer = new WebSocketServer({noServer: true});\n bidiServer.on('connection', appiumDriver.onBidiConnection.bind(appiumDriver));\n bidiServer.on('error', appiumDriver.onBidiServerError.bind(appiumDriver));\n try {\n server = await baseServer(serverOpts);\n const bidiBasePath = `${normalizedBasePath}${BIDI_BASE_PATH}`;\n server.addWebSocketHandler(bidiBasePath, bidiServer);\n server.addWebSocketHandler(`${bidiBasePath}/:sessionId`, bidiServer);\n } catch (err) {\n logger.error(\n `Could not configure Appium server. It's possible that a driver or plugin tried ` +\n `to update the server and failed. Original error: ${err.message}`,\n );\n logger.debug(err.stack);\n return process.exit(1);\n }\n\n if (parsedArgs.allowCors) {\n logger.warn(\n 'You have enabled CORS requests from any host. Be careful not ' +\n 'to visit sites which could maliciously try to start Appium ' +\n 'sessions on your machine',\n );\n }\n appiumDriver.server = server;\n try {\n // configure as node on grid, if necessary\n // falsy values should not cause this to run\n if (parsedArgs.nodeconfig) {\n await registerNode(\n parsedArgs.nodeconfig,\n parsedArgs.address,\n parsedArgs.port,\n normalizedBasePath,\n );\n }\n } catch (err) {\n await server.close();\n throw err;\n }\n\n process.setMaxListeners(MAX_SERVER_PROCESS_LISTENERS);\n for (const signal of ['SIGINT', 'SIGTERM']) {\n process.once(signal, async function onSignal() {\n logger.info(`Received ${signal} - shutting down`);\n try {\n await appiumDriver.shutdown(`The process has received ${signal} signal`);\n await server.close();\n process.exit(0);\n } catch (e) {\n logger.warn(e);\n process.exit(1);\n }\n });\n }\n\n const protocol = server.isSecure() ? 'https' : 'http';\n const address = net.isIPv6(parsedArgs.address) ? `[${parsedArgs.address}]` : parsedArgs.address;\n logServerAddress(\n `${protocol}://${address}:${parsedArgs.port}${normalizedBasePath}`,\n );\n\n driverConfig.print();\n pluginConfig.print([...pluginClasses.values()]);\n\n return /** @type {Cmd extends ServerCommand ? import('@appium/types').AppiumServer : void} */ (\n server\n );\n}\n\n// NOTE: this is here for backwards compat for any scripts referencing `main.js` directly\n// (more specifically, `build/lib/main.js`)\n// the executable is now `../index.js`, so that module will typically be `require.main`.\nif (require.main === module) {\n main();\n}\n\n// everything below here is intended to be a public API.\nexport {readConfigFile} from './config-file';\nexport {finalizeSchema, getSchema, validate} from './schema/schema';\nexport {main, init, resolveAppiumHome};\n\n/**\n * @typedef {import('@appium/types').DriverType} DriverType\n * @typedef {import('@appium/types').PluginType} PluginType\n * @typedef {import('@appium/types').DriverClass} DriverClass\n * @typedef {import('@appium/types').PluginClass} PluginClass\n * @typedef {import('appium/types').CliCommand} CliCommand\n * @typedef {import('appium/types').CliExtensionSubcommand} CliExtensionSubcommand\n * @typedef {import('appium/types').CliExtensionCommand} CliExtensionCommand\n * @typedef {import('appium/types').CliCommandServer} ServerCommand\n * @typedef {import('appium/types').CliCommandDriver} DriverCommand\n * @typedef {import('appium/types').CliCommandPlugin} PluginCommand\n * @typedef {import('appium/types').CliCommandSetup} SetupCommand\n * @typedef {import('./extension').DriverNameMap} DriverNameMap\n * @typedef {import('./extension').PluginNameMap} PluginNameMap\n */\n\n/**\n * Literally an empty object\n * @typedef { {} } ExtCommandInitResult\n */\n\n/**\n * @typedef ServerInitData\n * @property {import('./appium').AppiumDriver} appiumDriver - The Appium driver\n * @property {import('appium/types').ParsedArgs} parsedArgs - The parsed arguments\n * @property {string} appiumHome - The full path to the Appium home folder\n */\n\n/**\n * @template {CliCommand} Cmd\n * @typedef {Cmd extends ServerCommand ? ServerInitData & import('./extension').ExtensionConfigs : ExtCommandInitResult} InitResult\n */\n\n/**\n * @template {CliCommand} [Cmd=ServerCommand]\n * @template {CliExtensionSubcommand|void} [SubCmd=void]\n * @typedef {import('appium/types').Args} Args\n */\n\n/**\n * @template {CliCommand} [Cmd=ServerCommand]\n * @template {CliExtensionSubcommand|void} [SubCmd=void]\n * @typedef {import('appium/types').ParsedArgs} ParsedArgs\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/utils.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\nimport logger from './logger';\nimport {\n processCapabilities,\n STANDARD_CAPS,\n errors,\n isW3cCaps,\n} from '@appium/base-driver';\nimport {inspect as dump} from 'node:util';\nimport {node, fs} from '@appium/support';\nimport path from 'node:path';\nimport {SERVER_SUBCOMMAND, DRIVER_TYPE, PLUGIN_TYPE, SETUP_SUBCOMMAND} from './constants';\nimport os from 'node:os';\n\nconst W3C_APPIUM_PREFIX = 'appium';\nconst STANDARD_CAPS_LOWERCASE = new Set([...STANDARD_CAPS].map((cap) => cap.toLowerCase()));\nexport const V4_BROADCAST_IP = '0.0.0.0';\nexport const V6_BROADCAST_IP = '::';\nexport const npmPackage = fs.readPackageJsonFrom(__dirname);\n\n/**\n *\n * If `stdout` is a TTY, this is `true`.\n *\n * Used for tighter control over log output.\n * @type {boolean}\n */\nconst isStdoutTTY = process.stdout.isTTY;\n\n/**\n * Creates an error object in case a session gets incompatible capabilities as the input.\n *\n * @returns {Error}\n */\nexport function makeNonW3cCapsError() {\n return new errors.SessionNotCreatedError(\n 'Session capabilities format must comply to the W3C standard. Make sure your client is up to date. ' +\n 'See https://www.w3.org/TR/webdriver/#new-session for more details.'\n );\n}\n\n/**\n * Dumps to value to the console using `info` logger.\n *\n * @todo May want to force color to be `false` if {@link isStdoutTTY} is `false`.\n */\nexport const inspect = _.flow(\n _.partialRight(\n /** @type {(object: any, options: import('util').InspectOptions) => string} */ (dump),\n {colors: true, depth: null, compact: !isStdoutTTY}\n ),\n (...args) => {\n logger.info(...args);\n }\n);\n\n/**\n * Takes the caps that were provided in the request and translates them\n * into caps that can be used by the inner drivers.\n *\n * @template {Constraints} C\n * @param {W3CCapabilities} w3cCapabilities\n * @param {C} constraints\n * @param {NSCapabilities} [defaultCapabilities]\n * @returns {ParsedDriverCaps|InvalidCaps}\n */\nexport function parseCapsForInnerDriver(\n w3cCapabilities,\n constraints = /** @type {C} */ ({}),\n defaultCapabilities = {}\n) {\n if (!isW3cCaps(w3cCapabilities)) {\n return /** @type {InvalidCaps} */ ({\n error: makeNonW3cCapsError(),\n });\n }\n\n let desiredCaps = /** @type {ParsedDriverCaps['desiredCaps']} */ ({});\n /** @type {ParsedDriverCaps['processedW3CCapabilities'] | undefined} */\n let processedW3CCapabilities;\n\n // Make sure we don't mutate the original arguments\n w3cCapabilities = _.cloneDeep(w3cCapabilities);\n defaultCapabilities = _.cloneDeep(defaultCapabilities);\n\n if (!_.isEmpty(defaultCapabilities)) {\n for (const [defaultCapKey, defaultCapValue] of _.toPairs(defaultCapabilities)) {\n let isCapAlreadySet = false;\n // Check if the key is already present in firstMatch entries\n for (const firstMatchEntry of w3cCapabilities.firstMatch ?? []) {\n if (\n _.isPlainObject(firstMatchEntry) &&\n _.has(removeAppiumPrefixes(firstMatchEntry), removeAppiumPrefix(defaultCapKey))\n ) {\n isCapAlreadySet = true;\n break;\n }\n }\n // Check if the key is already present in alwaysMatch entries\n isCapAlreadySet =\n isCapAlreadySet ||\n (_.isPlainObject(w3cCapabilities.alwaysMatch) &&\n _.has(\n removeAppiumPrefixes(w3cCapabilities.alwaysMatch),\n removeAppiumPrefix(defaultCapKey)\n ));\n if (isCapAlreadySet) {\n // Skip if the key is already present in the provided caps\n continue;\n }\n\n // Only add the default capability if it is not overridden\n if (_.isEmpty(w3cCapabilities.firstMatch)) {\n w3cCapabilities.firstMatch = /** @type {W3CCapabilities['firstMatch']} */ ([\n {[defaultCapKey]: defaultCapValue},\n ]);\n } else {\n w3cCapabilities.firstMatch[0][defaultCapKey] = defaultCapValue;\n }\n }\n }\n\n // Call the process capabilities algorithm to find matching caps on the W3C\n // (see: https://github.com/jlipps/simple-wd-spec#processing-capabilities)\n try {\n desiredCaps = processCapabilities(w3cCapabilities, constraints, true);\n } catch (error) {\n logger.info(`Could not parse W3C capabilities: ${error.message}`);\n return /** @type {InvalidCaps} */ ({\n desiredCaps,\n processedW3CCapabilities,\n error,\n });\n }\n\n // Create a new w3c capabilities payload that contains only the matching caps in `alwaysMatch`\n processedW3CCapabilities = {\n alwaysMatch: {...insertAppiumPrefixes(desiredCaps)},\n firstMatch: [{}],\n };\n\n return /** @type {ParsedDriverCaps} */ ({\n desiredCaps,\n processedW3CCapabilities,\n });\n}\n\n/**\n * Takes a capabilities objects and prefixes capabilities with `appium:`\n * @template {Constraints} [C={}]\n * @param {Capabilities} caps - Desired capabilities object\n * @returns {NSCapabilities}\n */\nexport function insertAppiumPrefixes(caps) {\n return /** @type {NSCapabilities} */ (\n _.mapKeys(caps, (_, key) =>\n STANDARD_CAPS_LOWERCASE.has(key.toLowerCase()) || key.includes(':')\n ? key\n : `${W3C_APPIUM_PREFIX}:${key}`\n )\n );\n}\n\n/**\n * @template {Constraints} [C={}]\n * @param {NSCapabilities} caps\n * @returns {Capabilities}\n */\nexport function removeAppiumPrefixes(caps) {\n return /** @type {Capabilities} */ (_.mapKeys(caps, (_, key) => removeAppiumPrefix(key)));\n}\n\n/**\n * @param {string} key\n * @returns {string}\n */\nfunction removeAppiumPrefix(key) {\n const prefix = `${W3C_APPIUM_PREFIX}:`;\n return _.startsWith(key, prefix) ? key.substring(prefix.length) : key;\n}\n\n/**\n *\n * @param {string} pkgName\n * @returns {string|undefined}\n */\nexport function getPackageVersion(pkgName) {\n const pkgInfo = require(`${pkgName}/package.json`) || {};\n return pkgInfo.version;\n}\n\n/**\n * Returns the root directory of the Appium module.\n *\n * @returns {string} - The absolute path to the Appium module root directory.\n * @throws {Error} - If the Appium module root cannot be determined.\n */\nexport const getAppiumModuleRoot = _.memoize(function getAppiumModuleRoot() {\n const selfRoot = node.getModuleRootSync('appium', __filename);\n if (!selfRoot) {\n throw new Error('Cannot find the appium module root. This is likely a bug in Appium.');\n }\n return selfRoot;\n});\n\n/**\n * Adjusts NODE_PATH environment variable,\n * so CJS drivers and plugins could load their peer dependencies.\n * Read https://nodejs.org/api/modules.html#loading-from-the-global-folders\n * for more details.\n *\n * Unfortunately this hack does not work with ESM modules,\n * @returns {void}\n */\nexport function adjustNodePath() {\n let appiumModuleSearchRoot;\n try {\n appiumModuleSearchRoot = path.dirname(getAppiumModuleRoot());\n } catch (error) {\n logger.warn(error.message);\n return;\n }\n\n const refreshRequirePaths = () => {\n try {\n // ! This hack allows us to avoid modification of import\n // ! statements in client modules. It uses a private API though,\n // ! so it could break (maybe, eventually).\n // See https://gist.github.com/branneman/8048520#7-the-hack\n // @ts-ignore see above comment\n\n require('node:module').Module._initPaths();\n return true;\n } catch {\n return false;\n }\n };\n\n if (!process.env.NODE_PATH) {\n process.env.NODE_PATH = appiumModuleSearchRoot;\n if (refreshRequirePaths()) {\n process.env.APPIUM_OMIT_PEER_DEPS = '1';\n } else {\n delete process.env.NODE_PATH;\n }\n return;\n }\n\n const nodePathParts = process.env.NODE_PATH.split(path.delimiter);\n if (nodePathParts.includes(appiumModuleSearchRoot)) {\n process.env.APPIUM_OMIT_PEER_DEPS = '1';\n return;\n }\n\n nodePathParts.push(appiumModuleSearchRoot);\n process.env.NODE_PATH = nodePathParts.join(path.delimiter);\n if (refreshRequirePaths()) {\n process.env.APPIUM_OMIT_PEER_DEPS = '1';\n } else {\n process.env.NODE_PATH = _.without(nodePathParts, appiumModuleSearchRoot).join(path.delimiter);\n }\n}\n\n/**\n * Pulls the initial values of Appium settings from the given capabilities argument.\n * Each setting item must satisfy the following format:\n * `settings[setting_name]: setting_value`\n * or\n * ```\n * settings = {\n * setting_name1: 'setting_value1',\n * setting_name2: 'setting_value2',\n * }\n * ```\n * The capabilities argument itself gets mutated, so it does not contain parsed\n * settings anymore to avoid further parsing issues.\n * Check\n * https://appium.io/docs/en/latest/guides/settings/\n * for more details on the available settings.\n *\n * @param {?Object} caps - Capabilities dictionary. It is mutated if\n * one or more settings have been pulled from it\n * @return {Object} - An empty dictionary if the given caps contains no\n * setting items or a dictionary containing parsed Appium setting names along with\n * their values.\n */\nexport function pullSettings(caps) {\n if (!_.isPlainObject(caps) || _.isEmpty(caps)) {\n return {};\n }\n\n const result = {};\n const singleSettings = {};\n for (const [key, value] of _.toPairs(caps)) {\n let match;\n if (/^(s|appium:s)ettings$/.test(key) && _.isPlainObject(value)) {\n Object.assign(result, value);\n delete caps[key];\n } else if ((match = /^(s|appium:s)ettings\\[(\\S+)\\]$/.exec(key))) {\n singleSettings[match[2]] = value;\n delete caps[key];\n }\n }\n if (!_.isEmpty(singleSettings)) {\n Object.assign(result, singleSettings);\n }\n return result;\n}\n\n/**\n * @template {CliCommand} [Cmd=ServerCommand]\n * @template {CliExtensionSubcommand|void} [SubCmd=void]\n * @param {Args} args\n * @returns {args is Args}\n */\nexport function isServerCommandArgs(args) {\n return args.subcommand === SERVER_SUBCOMMAND;\n}\n\n/**\n * @template {CliCommand} Cmd\n * @template {CliExtensionSubcommand|CliCommandSetupSubcommand|void} [SubCmd=void]\n * @param {Args} args\n * @returns {args is Args}\n */\nexport function isSetupCommandArgs(args) {\n return args.subcommand === SETUP_SUBCOMMAND;\n}\n\n/**\n * @template {CliCommand} [Cmd=ServerCommand]\n * @template {CliExtensionSubcommand|void} [SubCmd=void]\n * @param {Args} args\n * @returns {args is Args}\n */\nexport function isExtensionCommandArgs(args) {\n return args.subcommand === DRIVER_TYPE || args.subcommand === PLUGIN_TYPE;\n}\n\n/**\n * @template {CliCommand} Cmd\n * @template {CliExtensionSubcommand} SubCmd\n * @param {Args} args\n * @returns {args is Args}\n */\nexport function isDriverCommandArgs(args) {\n return args.subcommand === DRIVER_TYPE;\n}\n\n/**\n * @template {CliCommand} Cmd\n * @template {CliExtensionSubcommand} SubCmd\n * @param {Args} args\n * @returns {args is Args}\n */\nexport function isPluginCommandArgs(args) {\n return args.subcommand === PLUGIN_TYPE;\n}\n\n/**\n * Fetches the list of matched network interfaces of the current host.\n *\n * @param {4|6|null} family Either 4 to include ipv4 addresses only,\n * 6 to include ipv6 addresses only, or null to include all of them\n * @returns {os.NetworkInterfaceInfo[]} The list of matched interfaces\n */\nexport function fetchInterfaces (family = null) {\n let familyValue = null;\n // 'IPv4' is in Node <= 17, from 18 it's a number 4 or 6\n if (family === 4) {\n familyValue = [4, 'IPv4'];\n } else if (family === 6) {\n familyValue = [6, 'IPv6'];\n }\n // @ts-ignore The linter does not understand the below filter\n return _.flatMap(_.values(os.networkInterfaces()).filter(Boolean))\n // @ts-ignore The linter does not understand the above filter\n .filter(({family}) => !familyValue || familyValue && familyValue.includes(family));\n}\n\n/**\n * https://github.com/SheetJS/js-adler32\n *\n * @param {string} str\n * @param {number?} [seed]\n * @returns {number}\n */\nexport function adler32(str, seed = null) {\n\tlet a = 1, b = 0, L = str.length, M = 0, c = 0, d = 0;\n\tif (typeof seed === 'number') {\n a = seed & 0xFFFF;\n b = seed >>> 16;\n }\n\tfor (let i = 0; i < L;) {\n\t\tM = Math.min(L - i, 2918);\n\t\twhile (M > 0) {\n\t\t\tc = str.charCodeAt(i++);\n\t\t\tif (c < 0x80) {\n a += c;\n } else if (c < 0x800) {\n\t\t\t\ta += 192 | ((c >> 6) & 31);\n b += a;\n --M;\n\t\t\t\ta += 128 | (c & 63);\n\t\t\t} else if (c >= 0xD800 && c < 0xE000) {\n\t\t\t\tc = (c & 1023) + 64;\n d = str.charCodeAt(i++) & 1023;\n\t\t\t\ta += 240 | ((c >> 8) & 7);\n b += a;\n --M;\n\t\t\t\ta += 128 | ((c >> 2) & 63);\n b += a;\n --M;\n\t\t\t\ta += 128 | ((d >> 6) & 15) | ((c & 3) << 4);\n b += a;\n --M;\n\t\t\t\ta += 128 | (d & 63);\n\t\t\t} else {\n\t\t\t\ta += 224 | ((c >> 12) & 15);\n b += a;\n --M;\n\t\t\t\ta += 128 | ((c >> 6) & 63);\n b += a;\n --M;\n\t\t\t\ta += 128 | (c & 63);\n\t\t\t}\n\t\t\tb += a;\n --M;\n\t\t}\n\t\ta = (15 * (a >>> 16) + (a & 65535));\n\t\tb = (15 * (b >>> 16) + (b & 65535));\n\t}\n\treturn ((b % 65521) << 16) | (a % 65521);\n}\n\n/**\n * Checks if the provided address is a broadcast one.\n *\n * @param {string} address\n * @returns {boolean}\n */\nexport function isBroadcastIp(address) {\n return [V4_BROADCAST_IP, V6_BROADCAST_IP, `[${V6_BROADCAST_IP}]`].includes(address);\n}\n\n/**\n * @typedef {import('@appium/types').StringRecord} StringRecord\n * @typedef {import('@appium/types').BaseDriverCapConstraints} BaseDriverCapConstraints\n */\n\n/**\n * @template {Constraints} [C=BaseDriverCapConstraints]\n * @typedef ParsedDriverCaps\n * @property {Capabilities} desiredCaps\n * @property {W3CCapabilities} processedW3CCapabilities\n */\n\n/**\n * @todo protocol is more specific\n * @template {Constraints} [C=BaseDriverCapConstraints]\n * @typedef InvalidCaps\n * @property {Error} error\n * @property {Capabilities} [desiredCaps]\n * @property {W3CCapabilities} [processedW3CCapabilities]\n */\n\n/**\n * @template {Constraints} C\n * @typedef {import('@appium/types').Capabilities} Capabilities\n */\n\n/**\n * @template {Constraints} C\n * @typedef {import('@appium/types').W3CCapabilities} W3CCapabilities\n */\n\n/**\n * @template {Constraints} C\n * @typedef {import('@appium/types').NSCapabilities} NSCapabilities\n */\n\n/**\n * @template {Constraints} C\n * @typedef {import('@appium/types').ConstraintsToCaps} ConstraintsToCaps\n */\n\n/**\n * @typedef {import('@appium/types').Constraints} Constraints\n */\n\n/**\n * @typedef {import('appium/types').CliCommand} CliCommand\n * @typedef {import('appium/types').CliExtensionSubcommand} CliExtensionSubcommand\n * @typedef {import('appium/types').CliExtensionCommand} CliExtensionCommand\n * @typedef {import('appium/types').CliCommandSetupSubcommand} CliCommandSetupSubcommand\n * @typedef {import('appium/types').CliCommandServer} ServerCommand\n * @typedef {import('appium/types').CliCommandDriver} DriverCommand\n * @typedef {import('appium/types').CliCommandPlugin} PluginCommand\n * @typedef {import('appium/types').CliCommandSetup} SetupCommand\n */\n\n/**\n * @template {CliCommand} [Cmd=ServerCommand]\n * @template {CliExtensionSubcommand|CliCommandSetupSubcommand|void} [SubCmd=void]\n * @typedef {import('appium/types').Args} Args\n */\n\n/**\n * @template {CliCommand} [Cmd=ServerCommand]\n * @template {CliExtensionSubcommand|CliCommandSetupSubcommand|void} [SubCmd=void]\n * @typedef {import('appium/types').ParsedArgs} ParsedArgs\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/cli/args.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\nimport {\n DRIVER_TYPE,\n PLUGIN_TYPE,\n EXT_SUBCOMMAND_INSTALL,\n EXT_SUBCOMMAND_LIST,\n EXT_SUBCOMMAND_RUN,\n EXT_SUBCOMMAND_UNINSTALL,\n EXT_SUBCOMMAND_UPDATE,\n EXT_SUBCOMMAND_DOCTOR,\n} from '../constants';\nimport {INSTALL_TYPES} from '../extension/extension-config';\nimport {toParserArgs} from '../schema/cli-args';\nconst DRIVER_EXAMPLE = 'xcuitest';\nconst PLUGIN_EXAMPLE = 'images';\n\n/**\n * This is necessary because we pass the array into `argparse`. `argparse` is bad and mutates things. We don't want that.\n * Bad `argparse`! Bad!\n */\nconst INSTALL_TYPES_ARRAY = [...INSTALL_TYPES];\n\n/** @type {Set} */\nconst EXTENSION_TYPES = new Set([DRIVER_TYPE, PLUGIN_TYPE]);\n\n// this set of args works for both drivers and plugins ('extensions')\n/** @type {ArgumentDefinitions} */\nconst globalExtensionArgs = new Map([\n [\n ['--json'],\n {\n required: false,\n default: false,\n action: 'store_true',\n help: 'Return output in JSON format',\n dest: 'json',\n },\n ],\n]);\n\n/**\n * Builds a Record of extension types to a Record of subcommands to their argument definitions\n */\nconst getExtensionArgs = _.memoize(function getExtensionArgs() {\n const extensionArgs = {};\n for (const type of EXTENSION_TYPES) {\n extensionArgs[type] = {\n [EXT_SUBCOMMAND_LIST]: makeListArgs(type),\n [EXT_SUBCOMMAND_INSTALL]: makeInstallArgs(type),\n [EXT_SUBCOMMAND_UNINSTALL]: makeUninstallArgs(type),\n [EXT_SUBCOMMAND_UPDATE]: makeUpdateArgs(type),\n [EXT_SUBCOMMAND_RUN]: makeRunArgs(type),\n [EXT_SUBCOMMAND_DOCTOR]: makeDoctorArgs(type),\n };\n }\n return /** @type {Record>} */ (\n extensionArgs\n );\n});\n\n/**\n * Makes the opts for the `list` subcommand for each extension type.\n * @param {ExtensionType} type\n * @returns {ArgumentDefinitions}\n */\nfunction makeListArgs(type) {\n return new Map([\n ...globalExtensionArgs,\n [\n ['--installed'],\n {\n required: false,\n default: false,\n action: 'store_true',\n help: `List only installed ${type}s`,\n dest: 'showInstalled',\n },\n ],\n [\n ['--updates'],\n {\n required: false,\n default: false,\n action: 'store_true',\n help: `Show information about available ${type} updates`,\n dest: 'showUpdates',\n },\n ],\n [\n ['--verbose'],\n {\n required: false,\n default: false,\n action: 'store_true',\n help: `Show more information about each ${type}`,\n dest: 'verbose',\n },\n ],\n ]);\n}\n\n/**\n * Makes the opts for the `install` subcommand for each extension type\n * @param {ExtensionType} type\n * @returns {ArgumentDefinitions}\n */\nfunction makeInstallArgs(type) {\n return new Map([\n ...globalExtensionArgs,\n [\n [type],\n {\n type: 'str',\n help:\n `Name of the ${type} to install, for example: ` +\n (type === DRIVER_TYPE ? DRIVER_EXAMPLE : PLUGIN_EXAMPLE),\n },\n ],\n [\n ['--source'],\n {\n required: false,\n default: null,\n choices: INSTALL_TYPES_ARRAY,\n help:\n `Where to look for the ${type} if it is not one of Appium's official ` +\n `${type}s. Possible values: ${INSTALL_TYPES_ARRAY.join(', ')}`,\n dest: 'installType',\n },\n ],\n [\n ['--package'],\n {\n required: false,\n default: null,\n type: 'str',\n help:\n `The Node.js package name of the ${type}. ` +\n `Required if \"source\" is set to \"git\" or \"github\".`,\n dest: 'packageName',\n },\n ],\n ]);\n}\n\n/**\n * Makes the opts for the `uninstall` subcommand for each extension type\n * @param {ExtensionType} type\n * @returns {ArgumentDefinitions}\n */\nfunction makeUninstallArgs(type) {\n return new Map([\n ...globalExtensionArgs,\n [\n [type],\n {\n type: 'str',\n help:\n `Name of the ${type} to uninstall, for example: ` +\n (type === DRIVER_TYPE ? DRIVER_EXAMPLE : PLUGIN_EXAMPLE),\n },\n ],\n ]);\n}\n\n/**\n * Makes the opts for the `doctor` subcommand for each extension type\n * @param {ExtensionType} type\n * @returns {ArgumentDefinitions}\n */\nfunction makeDoctorArgs(type) {\n return new Map([\n ...globalExtensionArgs,\n [\n [type],\n {\n type: 'str',\n help:\n `Name of the ${type} to run doctor checks for, for example: ` +\n (type === DRIVER_TYPE ? DRIVER_EXAMPLE : PLUGIN_EXAMPLE),\n },\n ],\n ]);\n}\n\n/**\n * Makes the opts for the `update` subcommand for each extension type\n * @param {ExtensionType} type\n * @returns {ArgumentDefinitions}\n */\nfunction makeUpdateArgs(type) {\n return new Map([\n ...globalExtensionArgs,\n [\n [type],\n {\n type: 'str',\n help:\n `Name of the ${type} to update, or \"installed\" to update all installed ${type}s. ` +\n `To see available ${type} updates, run \"appium ${type} list --installed --updates\". ` +\n 'For example: ' +\n (type === DRIVER_TYPE ? DRIVER_EXAMPLE : PLUGIN_EXAMPLE),\n },\n ],\n [\n ['--unsafe'],\n {\n required: false,\n default: false,\n action: 'store_true',\n help:\n 'Include any available major revision updates, which may have breaking changes',\n },\n ],\n ]);\n}\n\n/**\n * Makes the opts for the `run` subcommand for each extension type\n * @param {ExtensionType} type\n * @returns {ArgumentDefinitions}\n */\nfunction makeRunArgs(type) {\n return new Map([\n ...globalExtensionArgs,\n [\n [type],\n {\n type: 'str',\n help:\n `Name of the ${type} to run a script from, for example: ` +\n (type === DRIVER_TYPE ? DRIVER_EXAMPLE : PLUGIN_EXAMPLE),\n },\n ],\n [\n ['scriptName'],\n {\n default: null,\n nargs: '?',\n type: 'str',\n help:\n `Name of the ${type} script to run. If not provided, return a list ` +\n `of available scripts for this ${type}.`,\n },\n ],\n ]);\n}\n\n/**\n * Derives the options for the `server` command from the schema, and adds the arguments\n * which are disallowed in the config file.\n * @returns {ArgumentDefinitions}\n */\nfunction getServerArgs() {\n return new Map([...toParserArgs(), ...serverArgsDisallowedInConfig]);\n}\n\n/**\n * These don't make sense in the context of a config file for obvious reasons.\n * @type {ArgumentDefinitions}\n */\nconst serverArgsDisallowedInConfig = new Map([\n [\n ['--shell'],\n {\n required: false,\n help: 'Enter REPL mode',\n action: 'store_const',\n const: true,\n dest: 'shell',\n },\n ],\n [\n ['--show-build-info'],\n {\n dest: 'showBuildInfo',\n action: 'store_const',\n const: true,\n required: false,\n help: 'Show info about the Appium build and exit',\n },\n ],\n [\n ['--show-debug-info'],\n {\n dest: 'showDebugInfo',\n action: 'store_const',\n const: true,\n required: false,\n help: 'Show debug info about the current Appium deployment and exit',\n },\n ],\n [\n ['--show-config'],\n {\n dest: 'showConfig',\n action: 'store_const',\n const: true,\n required: false,\n help: 'Show the current Appium configuration and exit',\n },\n ],\n [\n ['--config'],\n {\n dest: 'configFile',\n type: 'str',\n required: false,\n help: 'Explicit path to Appium configuration file',\n },\n ],\n]);\n\nexport {getServerArgs, getExtensionArgs};\n\n/**\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n */\n\n/**\n * A tuple of argument aliases and argument options\n * @typedef {Map<[name: string]|[name: string, alias: string],import('argparse').ArgumentOptions>} ArgumentDefinitions\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/cli/driver-command.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\nimport ExtensionCliCommand from './extension-command';\nimport {KNOWN_DRIVERS} from '../constants';\nimport '@colors/colors';\n\nconst REQ_DRIVER_FIELDS = ['driverName', 'automationName', 'platformNames', 'mainClass'];\n\n/**\n * @extends {ExtensionCliCommand}\n */\n\nexport default class DriverCliCommand extends ExtensionCliCommand {\n /**\n * @param {import('./extension-command').ExtensionCommandOptions} opts\n */\n constructor({config, json}) {\n super({config, json});\n this.knownExtensions = KNOWN_DRIVERS;\n }\n\n /**\n * Install a driver\n *\n * @param {DriverInstallOpts} opts\n * @return {Promise>}\n */\n async install({driver, installType, packageName}) {\n return await super._install({\n installSpec: driver,\n installType,\n packageName,\n });\n }\n\n /**\n * Uninstall a driver\n *\n * @param {DriverUninstallOpts} opts\n * @return {Promise>}\n */\n async uninstall({driver}) {\n return await super._uninstall({installSpec: driver});\n }\n\n /**\n * Update a driver\n *\n * @param {DriverUpdateOpts} opts\n * @return {Promise}\n */\n async update({driver, unsafe}) {\n return await super._update({installSpec: driver, unsafe});\n }\n\n /**\n * Run a script from a driver\n *\n * @param {DriverRunOptions} opts\n * @return {Promise}\n * @throws {Error} if the script fails to run\n */\n async run({driver, scriptName, extraArgs}) {\n return await super._run({\n installSpec: driver,\n scriptName,\n extraArgs,\n bufferOutput: this.isJsonOutput,\n });\n }\n\n /**\n * Runs doctor checks for the given driver.\n *\n * @param {DriverDoctorOptions} opts\n * @returns {Promise} The amount of executed doctor checks.\n * @throws {Error} If any of the mandatory Doctor checks fails.\n */\n async doctor({driver}) {\n return await super._doctor({\n installSpec: driver,\n });\n }\n\n /**\n *\n * @param {import('./extension-command').ExtensionArgs} opts\n * @returns {string}\n */\n getPostInstallText({extName, extData}) {\n return (\n `Driver ${extName}@${extData.version} successfully installed\\n`.green +\n `- automationName: ${extData.automationName.green}\\n` +\n `- platformNames: ${JSON.stringify(extData.platformNames).green}`\n );\n }\n\n /**\n * Validates fields in `appium` field of `driverMetadata`\n *\n * For any `package.json` fields which a driver requires, validate the type of\n * those fields on the `package.json` data, throwing an error if anything is\n * amiss.\n * @param {import('appium/types').ExtMetadata} driverMetadata\n * @param {string} installSpec\n */\n validateExtensionFields(driverMetadata, installSpec) {\n const missingFields = REQ_DRIVER_FIELDS.reduce(\n (acc, field) => (driverMetadata[field] ? acc : [...acc, field]),\n []\n );\n\n if (!_.isEmpty(missingFields)) {\n throw new Error(\n `Driver \"${installSpec}\" did not expose correct fields for compatibility ` +\n `with Appium. Missing fields: ${JSON.stringify(missingFields)}`\n );\n }\n }\n}\n\n/**\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n * @typedef {import('@appium/types').DriverType} DriverType\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtRecord} ExtRecord\n */\n\n/**\n * @typedef DriverCommandOptions\n * @property {import('../extension/extension-config').ExtensionConfig} config\n * @property {boolean} json\n */\n\n/**\n * Options for {@linkcode DriverCliCommand.install}\n * @typedef DriverInstallOpts\n * @property {string} driver - the name or spec of a driver to install\n * @property {InstallType} installType - how to install this driver. One of the INSTALL_TYPES\n * @property {string} [packageName] - for git/github installs, the driver node package name\n */\n\n/**\n * @typedef {import('appium/types').InstallType} InstallType\n */\n\n/**\n * Options for {@linkcode DriverCliCommand.uninstall}\n * @typedef DriverUninstallOpts\n * @property {string} driver - the name or spec of a driver to uninstall\n */\n\n/**\n * Options for {@linkcode DriverCliCommand.update}\n * @typedef DriverUpdateOpts\n * @property {string} driver - the name of the driver to update\n * @property {boolean} unsafe - if true, will perform unsafe updates past major revision boundaries\n */\n\n/**\n * Options for {@linkcode DriverCliCommand.run}.\n * @typedef DriverRunOptions\n * @property {string} driver - name of the driver to run a script from\n * @property {string} scriptName - name of the script to run\n * @property {string[]} [extraArgs] - arguments to pass to the script\n */\n\n/**\n * Options for {@linkcode DriverCliCommand.doctor}.\n * @typedef DriverDoctorOptions\n * @property {string} driver - name of the driver to run doctor checks for\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/cli/extension-command.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport B from 'bluebird';\nimport _ from 'lodash';\nimport path from 'node:path';\nimport {npm, util, env, console, fs, system} from '@appium/support';\nimport {spinWith, RingBuffer} from './utils';\nimport {\n INSTALL_TYPE_NPM,\n INSTALL_TYPE_GIT,\n INSTALL_TYPE_GITHUB,\n INSTALL_TYPE_LOCAL,\n INSTALL_TYPE_DEV,\n} from '../extension/extension-config';\nimport {SubProcess} from 'teen_process';\nimport {packageDidChange} from '../extension/package-changed';\nimport {spawn} from 'node:child_process';\nimport {inspect} from 'node:util';\nimport {pathToFileURL} from 'node:url';\nimport {Doctor, EXIT_CODE as DOCTOR_EXIT_CODE} from '../doctor/doctor';\nimport {getAppiumModuleRoot, npmPackage} from '../utils';\nimport * as semver from 'semver';\n\nconst UPDATE_ALL = 'installed';\nconst MAX_CONCURRENT_REPO_FETCHES = 5;\n\nclass NotUpdatableError extends Error {}\nclass NoUpdatesAvailableError extends Error {}\n\n/**\n * Omits `driverName`/`pluginName` props from the receipt to make a {@linkcode ExtManifest}\n * @template {ExtensionType} ExtType\n * @param {ExtInstallReceipt} receipt\n * @returns {ExtManifest}\n */\nfunction receiptToManifest(receipt) {\n return /** @type {ExtManifest} */ (_.omit(receipt, 'driverName', 'pluginName'));\n}\n\n/**\n * Fetches the remote extension version requirements\n *\n * @param {string} pkgName Extension name\n * @param {string} [pkgVer] Extension version (if not provided then the latest is assumed)\n * @returns {Promise<[string, string|null]>}\n */\nasync function getRemoteExtensionVersionReq(pkgName, pkgVer) {\n const allDeps = await npm.getPackageInfo(\n `${pkgName}${pkgVer ? `@${pkgVer}` : ``}`,\n ['peerDependencies', 'dependencies']\n );\n const requiredVersionPair = _.flatMap(_.values(allDeps).map(_.toPairs))\n .find(([name]) => name === 'appium');\n return [npmPackage.version, requiredVersionPair ? requiredVersionPair[1] : null];\n}\n\n/**\n * @template {ExtensionType} ExtType\n */\nclass ExtensionCliCommand {\n /**\n * This is the `DriverConfig` or `PluginConfig`, depending on `ExtType`.\n * @type {ExtensionConfig}\n */\n config;\n\n /**\n * {@linkcode Record} of official plugins or drivers.\n * @type {KnownExtensions}\n */\n knownExtensions;\n\n /**\n * If `true`, command output has been requested as JSON.\n * @type {boolean}\n */\n isJsonOutput;\n\n /**\n * Build an ExtensionCommand\n * @param {ExtensionCommandOptions} opts\n */\n constructor({config, json}) {\n this.config = config;\n this.log = new console.CliConsole({jsonMode: json});\n this.isJsonOutput = Boolean(json);\n }\n\n /**\n * `driver` or `plugin`, depending on the `ExtensionConfig`.\n */\n get type() {\n return this.config.extensionType;\n }\n\n /**\n * Logs a message and returns an {@linkcode Error} to throw.\n *\n * For TS to understand that a function throws an exception, it must actually throw an exception--\n * in other words, _calling_ a function which is guaranteed to throw an exception is not enough--\n * nor is something like `@returns {never}` which does not imply a thrown exception.\n *\n * @param {string} message\n * @protected\n * @throws {Error}\n */\n _createFatalError(message) {\n return new Error(this.log.decorate(message, 'error'));\n }\n\n /**\n * Take a CLI parse and run an extension command based on its type\n *\n * @param {object} args - a key/value object with CLI flags and values\n * @return {Promise} the result of the specific command which is executed\n */\n async execute(args) {\n const cmd = args[`${this.type}Command`];\n if (!_.isFunction(this[cmd])) {\n throw this._createFatalError(`Cannot handle ${this.type} command ${cmd}`);\n }\n const executeCmd = this[cmd].bind(this);\n return await executeCmd(args);\n }\n\n /**\n * List extensions\n *\n * @template {ExtensionType} ExtType\n * @param {ListOptions} opts\n * @return {Promise>} map of extension names to extension data\n */\n async list({showInstalled, showUpdates, verbose = false}) {\n const listData = this._buildListData(showInstalled);\n\n const lsMsg =\n `Listing ${showInstalled ? 'installed' : 'available'} ${this.type}s` +\n (verbose ? ' (verbose mode)' : ' (rerun with --verbose for more info)');\n await this._checkForUpdates(listData, showUpdates, lsMsg);\n\n if (this.isJsonOutput) {\n await this._addRepositoryUrlsToListData(listData);\n return listData;\n }\n\n if (verbose) {\n await this._addRepositoryUrlsToListData(listData);\n this.log.log(inspect(listData, {colors: true, depth: null}));\n return listData;\n }\n\n return await this._displayNormalListOutput(listData, showUpdates);\n }\n\n /**\n * Build the initial list data structure from installed and known extensions\n *\n * @template {ExtensionType} ExtType\n * @param {boolean} showInstalled\n * @returns {ExtensionList}\n * @private\n */\n _buildListData(showInstalled) {\n const installedNames = Object.keys(this.config.installedExtensions);\n const knownNames = Object.keys(this.knownExtensions);\n return [...installedNames, ...knownNames].reduce((acc, name) => {\n if (!acc[name]) {\n if (installedNames.includes(name)) {\n acc[name] = {\n .../** @type {Partial>} */ (this.config.installedExtensions[name]),\n installed: true,\n };\n } else if (!showInstalled) {\n acc[name] = /** @type {ExtensionListData} */ ({\n pkgName: this.knownExtensions[name],\n installed: false,\n });\n }\n }\n return acc;\n }, /** @type {ExtensionList} */ ({}));\n }\n\n /**\n * Check for available updates for installed extensions\n *\n * @template {ExtensionType} ExtType\n * @param {ExtensionList} listData\n * @param {boolean} showUpdates\n * @param {string} lsMsg\n * @returns {Promise}\n * @private\n */\n async _checkForUpdates(listData, showUpdates, lsMsg) {\n await spinWith(this.isJsonOutput, lsMsg, async () => {\n // We'd like to still show lsMsg even if showUpdates is false\n if (!showUpdates) {\n return;\n }\n\n // Filter to only extensions that need update checks (installed npm packages)\n const extensionsToCheck = _.toPairs(listData).filter(\n ([, data]) => data.installed && data.installType === INSTALL_TYPE_NPM\n );\n\n await B.map(\n extensionsToCheck,\n async ([ext, data]) => {\n try {\n const updates = await this.checkForExtensionUpdate(ext);\n data.updateVersion = updates.safeUpdate;\n data.unsafeUpdateVersion = updates.unsafeUpdate;\n data.upToDate = updates.safeUpdate === null && updates.unsafeUpdate === null;\n } catch (e) {\n data.updateError = e.message;\n }\n },\n {concurrency: MAX_CONCURRENT_REPO_FETCHES}\n );\n });\n }\n\n /**\n * Add repository URLs to list data for all extensions\n *\n * @template {ExtensionType} ExtType\n * @param {ExtensionList} listData\n * @returns {Promise}\n * @private\n */\n async _addRepositoryUrlsToListData(listData) {\n await spinWith(this.isJsonOutput, 'Fetching repository information', async () => {\n await B.map(\n _.values(listData),\n async (data) => {\n const repoUrl = await this._getRepositoryUrl(data);\n if (repoUrl) {\n data.repositoryUrl = repoUrl;\n }\n },\n {concurrency: MAX_CONCURRENT_REPO_FETCHES}\n );\n });\n }\n\n /**\n * Display normal formatted output\n *\n * @template {ExtensionType} ExtType\n * @param {ExtensionList} listData\n * @param {boolean} showUpdates\n * @returns {Promise>}\n * @private\n */\n async _displayNormalListOutput(listData, showUpdates) {\n for (const [name, data] of _.toPairs(listData)) {\n const line = await this._formatExtensionLine(name, data, showUpdates);\n this.log.log(line);\n }\n\n return listData;\n }\n\n /**\n * Format a single extension line for display\n *\n * @template {ExtensionType} ExtType\n * @param {string} name\n * @param {ExtensionListData} data\n * @param {boolean} showUpdates\n * @returns {Promise}\n * @private\n */\n async _formatExtensionLine(name, data, showUpdates) {\n if (data.installed) {\n const installTxt = this._formatInstallText(/** @type {InstalledExtensionListData} */ (data));\n const updateTxt = showUpdates ? this._formatUpdateText(/** @type {InstalledExtensionListData} */ (data)) : '';\n return `- ${name.yellow}${installTxt}${updateTxt}`;\n }\n const installTxt = ' [not installed]'.grey;\n return `- ${name.yellow}${installTxt}`;\n }\n\n /**\n * Format installation status text\n *\n * @template {ExtensionType} ExtType\n * @param {InstalledExtensionListData} data\n * @returns {string}\n * @private\n */\n _formatInstallText(data) {\n const {installType, installSpec, version} = data;\n let typeTxt;\n switch (installType) {\n case INSTALL_TYPE_GIT:\n case INSTALL_TYPE_GITHUB:\n typeTxt = `(cloned from ${installSpec})`.yellow;\n break;\n case INSTALL_TYPE_LOCAL:\n typeTxt = `(linked from ${installSpec})`.magenta;\n break;\n case INSTALL_TYPE_DEV:\n typeTxt = '(dev mode)';\n break;\n default:\n typeTxt = '(npm)';\n }\n return `@${version.yellow} ${('[installed ' + typeTxt + ']').green}`;\n }\n\n /**\n * Format update information text\n *\n * @template {ExtensionType} ExtType\n * @param {InstalledExtensionListData} data\n * @returns {string}\n * @private\n */\n _formatUpdateText(data) {\n const {updateVersion, unsafeUpdateVersion, upToDate, updateError} = data;\n if (updateError) {\n return ` [Cannot check for updates: ${updateError}]`.red;\n }\n let txt = '';\n if (updateVersion) {\n txt += ` [${updateVersion} available]`.magenta;\n }\n if (upToDate) {\n txt += ` [Up to date]`.green;\n }\n if (unsafeUpdateVersion) {\n txt += ` [${unsafeUpdateVersion} available (potentially unsafe)]`.cyan;\n }\n return txt;\n }\n\n /**\n * Get repository URL from package data\n *\n * @template {ExtensionType} ExtType\n * @param {ExtensionListData} data\n * @returns {Promise}\n * @private\n */\n async _getRepositoryUrl(data) {\n if (data.installed && data.installPath) {\n return await this._getRepositoryUrlFromInstalled(\n /** @type {InstalledExtensionListData} */ (data)\n );\n }\n if (data.pkgName && !data.installed) {\n return await this._getRepositoryUrlFromNpm(data.pkgName);\n }\n return null;\n }\n\n /**\n * Get repository URL from installed extension's package.json\n *\n * @template {ExtensionType} ExtType\n * @param {InstalledExtensionListData} data\n * @returns {Promise}\n * @private\n */\n async _getRepositoryUrlFromInstalled(data) {\n try {\n const pkgJsonPath = path.join(data.installPath, 'package.json');\n if (await fs.exists(pkgJsonPath)) {\n const pkg = JSON.parse(await fs.readFile(pkgJsonPath, 'utf8'));\n if (pkg.repository) {\n if (typeof pkg.repository === 'string') {\n return pkg.repository;\n }\n if (pkg.repository.url) {\n return pkg.repository.url.replace(/^git\\+/, '').replace(/\\.git$/, '');\n }\n }\n }\n } catch {\n // Ignore errors reading package.json\n }\n return null;\n }\n\n /**\n * Get repository URL from npm for a package name\n *\n * @param {string} pkgName\n * @returns {Promise}\n * @private\n */\n async _getRepositoryUrlFromNpm(pkgName) {\n try {\n const repoInfo = await npm.getPackageInfo(pkgName, ['repository']);\n // When requesting only 'repository', npm.getPackageInfo returns the repository object directly\n if (repoInfo) {\n if (typeof repoInfo === 'string') {\n return repoInfo;\n }\n if (repoInfo.url) {\n return repoInfo.url.replace(/^git\\+/, '').replace(/\\.git$/, '');\n }\n }\n } catch {\n // Ignore errors fetching from npm\n }\n return null;\n }\n\n /**\n * Checks whether the given extension is compatible with the currently installed server\n *\n * @param {InstallViaNpmArgs} installViaNpmOpts\n * @returns {Promise}\n */\n async _checkInstallCompatibility({installSpec, pkgName, pkgVer, installType}) {\n if (INSTALL_TYPE_NPM !== installType) {\n return;\n }\n\n await spinWith(this.isJsonOutput, `Checking if '${pkgName}' is compatible`, async () => {\n const [serverVersion, extVersionRequirement] = await getRemoteExtensionVersionReq(pkgName, pkgVer);\n if (serverVersion && extVersionRequirement && !semver.satisfies(serverVersion, extVersionRequirement)) {\n throw this._createFatalError(\n `'${installSpec}' cannot be installed because the server version it requires (${extVersionRequirement}) ` +\n `does not meet the currently installed one (${serverVersion}). Please install ` +\n `a compatible server version first.`\n );\n }\n });\n }\n\n /**\n * Install an extension\n *\n * @param {InstallOpts} opts\n * @return {Promise>} map of all installed extension names to extension data\n */\n async _install({installSpec, installType, packageName}) {\n /** @type {ExtInstallReceipt} */\n let receipt;\n\n if (packageName && [INSTALL_TYPE_LOCAL, INSTALL_TYPE_NPM].includes(installType)) {\n throw this._createFatalError(`When using --source=${installType}, cannot also use --package`);\n }\n\n if (!packageName && [INSTALL_TYPE_GIT, INSTALL_TYPE_GITHUB].includes(installType)) {\n throw this._createFatalError(`When using --source=${installType}, must also use --package`);\n }\n\n /**\n * @type {InstallViaNpmArgs}\n */\n let installViaNpmOpts;\n\n /**\n * The probable (?) name of the extension derived from the install spec.\n *\n * If using a local install type, this will remain empty.\n * @type {string}\n */\n let probableExtName = '';\n\n // depending on `installType`, build the options to pass into `installViaNpm`\n if (installType === INSTALL_TYPE_GITHUB) {\n if (installSpec.split('/').length !== 2) {\n throw this._createFatalError(\n `Github ${this.type} spec ${installSpec} appeared to be invalid; ` +\n 'it should be of the form /'\n );\n }\n installViaNpmOpts = {\n installSpec,\n installType,\n pkgName: /** @type {string} */ (packageName),\n };\n probableExtName = /** @type {string} */ (packageName);\n } else if (installType === INSTALL_TYPE_GIT) {\n // git urls can have '.git' at the end, but this is not necessary and would complicate the\n // way we download and name directories, so we can just remove it\n installSpec = installSpec.replace(/\\.git$/, '');\n installViaNpmOpts = {\n installSpec,\n installType,\n pkgName: /** @type {string} */ (packageName),\n };\n probableExtName = /** @type {string} */ (packageName);\n } else {\n let pkgName, pkgVer;\n if (installType === INSTALL_TYPE_LOCAL) {\n pkgName = path.isAbsolute(installSpec) ? installSpec : path.resolve(installSpec);\n } else {\n // at this point we have either an npm package or an appium verified extension\n // name or a local path. both of which will be installed via npm.\n // extensions installed via npm can include versions or tags after the '@'\n // sign, so check for that. We also need to be careful that package names themselves can\n // contain the '@' symbol, as in `npm install @appium/fake-driver@1.2.0`\n let name;\n const splits = installSpec.split('@');\n if (installSpec.startsWith('@')) {\n // this is the case where we have an npm org included in the package name\n [name, pkgVer] = [`@${splits[1]}`, splits[2]];\n } else {\n // this is the case without an npm org\n [name, pkgVer] = splits;\n }\n\n if (installType === INSTALL_TYPE_NPM) {\n // if we're installing a named package from npm, we don't need to check\n // against the appium extension list; just use the installSpec as is\n pkgName = name;\n } else {\n // if we're installing a named appium driver (like 'xcuitest') we need to\n // dereference the actual npm package ('appiupm-xcuitest-driver'), so\n // check it exists and get the correct package\n const knownNames = Object.keys(this.knownExtensions);\n if (!_.includes(knownNames, name)) {\n const msg =\n `Could not resolve ${this.type}; are you sure it's in the list ` +\n `of supported ${this.type}s? ${JSON.stringify(knownNames)}`;\n throw this._createFatalError(msg);\n }\n probableExtName = name;\n pkgName = this.knownExtensions[name];\n // given that we'll use the install type in the driver json, store it as\n // 'npm' now\n installType = INSTALL_TYPE_NPM;\n }\n }\n installViaNpmOpts = {installSpec, pkgName, pkgVer, installType};\n }\n\n // fail fast here if we can\n if (probableExtName && this.config.isInstalled(probableExtName)) {\n throw this._createFatalError(\n `A ${this.type} named \"${probableExtName}\" is already installed. ` +\n `Did you mean to update? Run \"appium ${this.type} update\". See ` +\n `installed ${this.type}s with \"appium ${this.type} list --installed\".`\n );\n }\n\n await this._checkInstallCompatibility(installViaNpmOpts);\n\n receipt = await this.installViaNpm(installViaNpmOpts);\n\n // this _should_ be the same as `probablyExtName` as the one derived above unless\n // install type is local.\n /** @type {string} */\n const extName = receipt[/** @type {string} */ (`${this.type}Name`)];\n\n // check _a second time_ with the more-accurate extName\n if (this.config.isInstalled(extName)) {\n throw this._createFatalError(\n `A ${this.type} named \"${extName}\" is already installed. ` +\n `Did you mean to update? Run \"appium ${this.type} update\". See ` +\n `installed ${this.type}s with \"appium ${this.type} list --installed\".`\n );\n }\n\n // this field does not exist as such in the manifest (it's used as a property name instead)\n // so that's why it's being removed here.\n /** @type {ExtManifest} */\n const extManifest = receiptToManifest(receipt);\n\n const [errors, warnings] = await B.all([\n this.config.getProblems(extName, extManifest),\n this.config.getWarnings(extName, extManifest),\n ]);\n const errorMap = new Map([[extName, errors]]);\n const warningMap = new Map([[extName, warnings]]);\n const {errorSummaries, warningSummaries} = this.config.getValidationResultSummaries(\n errorMap,\n warningMap\n );\n\n if (!_.isEmpty(errorSummaries)) {\n throw this._createFatalError(errorSummaries.join('\\n'));\n }\n\n // note that we won't show any warnings if there were errors.\n if (!_.isEmpty(warningSummaries)) {\n this.log.warn(warningSummaries.join('\\n'));\n }\n\n await this.config.addExtension(extName, extManifest);\n\n // update the hash if we've changed the local `package.json`\n if (await env.hasAppiumDependency(this.config.appiumHome)) {\n await packageDidChange(this.config.appiumHome);\n }\n\n // log info for the user\n this.log.info(this.getPostInstallText({extName, extData: receipt}));\n\n return this.config.installedExtensions;\n }\n\n /**\n * Install an extension via NPM\n *\n * @param {InstallViaNpmArgs} args\n * @returns {Promise>}\n */\n async installViaNpm({installSpec, pkgName, pkgVer, installType}) {\n const msg = `Installing '${installSpec}'`;\n\n // the string used for installation is either @ in the case of a standard NPM\n // package, or whatever the user sent in otherwise.\n const installStr = installType === INSTALL_TYPE_NPM ? `${pkgName}${pkgVer ? `@${pkgVer}` : ''}` : installSpec;\n const appiumHome = this.config.appiumHome;\n try {\n const {pkg, installPath} = await spinWith(this.isJsonOutput, msg, async () => {\n const {pkg, installPath} = await npm.installPackage(appiumHome, installStr, {\n pkgName,\n installType,\n });\n this.validatePackageJson(pkg, installSpec);\n return {pkg, installPath};\n });\n\n return this.getInstallationReceipt({\n pkg,\n installPath,\n installType,\n installSpec,\n });\n } catch (err) {\n throw this._createFatalError(`Encountered an error when installing package: ${err.message}`);\n }\n }\n\n /**\n * Get the text which should be displayed to the user after an extension has been installed. This\n * is designed to be overridden by drivers/plugins with their own particular text.\n *\n * @param {ExtensionArgs} args\n * @returns {string}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getPostInstallText(args) {\n throw this._createFatalError('Must be implemented in final class');\n }\n\n /**\n * Once a package is installed on-disk, this gathers some necessary metadata for validation.\n *\n * @param {GetInstallationReceiptOpts} opts\n * @returns {ExtInstallReceipt}\n */\n getInstallationReceipt({pkg, installPath, installType, installSpec}) {\n const {appium, name, version, peerDependencies} = pkg;\n\n const strVersion = /** @type {string} */ (version);\n /** @type {import('appium/types').InternalMetadata} */\n const internal = {\n pkgName: /** @type {string} */ (name),\n version: strVersion,\n installType,\n installSpec,\n installPath,\n appiumVersion: peerDependencies?.appium,\n };\n\n /** @type {ExtMetadata} */\n const extMetadata = appium;\n\n return {\n ...internal,\n ...extMetadata,\n };\n }\n\n /**\n * Validates the _required_ root fields of an extension's `package.json` file.\n *\n * These required fields are:\n * - `name`\n * - `version`\n * - `appium`\n * @param {import('type-fest').PackageJson} pkg - `package.json` of extension\n * @param {string} installSpec - Extension name/spec\n * @throws {ReferenceError} If `package.json` has a missing or invalid field\n * @returns {pkg is ExtPackageJson}\n */\n validatePackageJson(pkg, installSpec) {\n const {appium, name, version} = /** @type {ExtPackageJson} */ (pkg);\n\n /**\n *\n * @param {string} field\n * @returns {ReferenceError}\n */\n const createMissingFieldError = (field) =>\n new ReferenceError(\n `${this.type} \"${installSpec}\" invalid; missing a \\`${field}\\` field of its \\`package.json\\``\n );\n\n if (!name) {\n throw createMissingFieldError('name');\n }\n if (!version) {\n throw createMissingFieldError('version');\n }\n if (!appium) {\n throw createMissingFieldError('appium');\n }\n\n this.validateExtensionFields(appium, installSpec);\n\n return true;\n }\n\n /**\n * For any `package.json` fields which a particular type of extension requires, validate the\n * presence and form of those fields on the `package.json` data, throwing an error if anything is\n * amiss.\n *\n * @param {ExtMetadata} extMetadata - the data in the \"appium\" field of `package.json` for an extension\n * @param {string} installSpec - Extension name/spec\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n validateExtensionFields(extMetadata, installSpec) {\n throw this._createFatalError('Must be implemented in final class');\n }\n\n /**\n * Uninstall an extension.\n *\n * First tries to do this via `npm uninstall`, but if that fails, just `rm -rf`'s the extension dir.\n *\n * Will only remove the extension from the manifest if it has been successfully removed.\n *\n * @param {UninstallOpts} opts\n * @return {Promise>} map of all installed extension names to extension data (without the extension just uninstalled)\n */\n async _uninstall({installSpec}) {\n if (!this.config.isInstalled(installSpec)) {\n throw this._createFatalError(\n `Can't uninstall ${this.type} '${installSpec}'; it is not installed`\n );\n }\n const extRecord = this.config.installedExtensions[installSpec];\n if (extRecord.installType === INSTALL_TYPE_DEV) {\n this.log.warn(`Cannot uninstall ${this.type} \"${installSpec}\" because it is in development!`);\n return this.config.installedExtensions;\n }\n const pkgName = extRecord.pkgName;\n await spinWith(this.isJsonOutput, `Uninstalling ${this.type} '${installSpec}'`, async () => {\n await npm.uninstallPackage(this.config.appiumHome, pkgName);\n });\n await this.config.removeExtension(installSpec);\n this.log.ok(`Successfully uninstalled ${this.type} '${installSpec}'`.green);\n return this.config.installedExtensions;\n }\n\n /**\n * Attempt to update one or more drivers using NPM\n *\n * @param {ExtensionUpdateOpts} updateSpec\n * @return {Promise}\n */\n async _update({installSpec, unsafe}) {\n const shouldUpdateAll = installSpec === UPDATE_ALL;\n // if we're specifically requesting an update for an extension, make sure it's installed\n if (!shouldUpdateAll && !this.config.isInstalled(installSpec)) {\n throw this._createFatalError(\n `The ${this.type} \"${installSpec}\" was not installed, so can't be updated`\n );\n }\n const extsToUpdate = shouldUpdateAll\n ? Object.keys(this.config.installedExtensions)\n : [installSpec];\n\n // 'errors' will have ext names as keys and error objects as values\n /** @type {Record} */\n const errors = {};\n\n // 'updates' will have ext names as keys and update objects as values, where an update\n // object is of the form {from: versionString, to: versionString}\n /** @type {Record} */\n const updates = {};\n\n for (const e of extsToUpdate) {\n try {\n await spinWith(this.isJsonOutput, `Checking if ${this.type} '${e}' is updatable`, () => {\n if (this.config.installedExtensions[e].installType !== INSTALL_TYPE_NPM) {\n throw new NotUpdatableError();\n }\n });\n const update = await spinWith(\n this.isJsonOutput,\n `Checking if ${this.type} '${e}' needs an update`,\n async () => {\n const update = await this.checkForExtensionUpdate(e);\n if (!(update.safeUpdate || update.unsafeUpdate)) {\n throw new NoUpdatesAvailableError();\n }\n return update;\n }\n );\n if (!unsafe && !update.safeUpdate) {\n throw this._createFatalError(\n `The ${this.type} '${e}' has a major revision update ` +\n `(${update.current} => ${update.unsafeUpdate}), which could include ` +\n `breaking changes. If you want to apply this update, re-run with --unsafe`\n );\n }\n const updateVer = unsafe && update.unsafeUpdate ? update.unsafeUpdate : update.safeUpdate;\n await spinWith(\n this.isJsonOutput,\n `Updating ${this.type} '${e}' from ${update.current} to ${updateVer}`,\n async () => await this.updateExtension(e, updateVer)\n );\n // if we're doing a safe update, but an unsafe update is also available, let the user know\n if (!unsafe && update.unsafeUpdate) {\n const newMajorUpdateMsg = `A newer major version ${update.unsafeUpdate} ` +\n `is available for ${this.type} '${e}', which could include breaking changes. ` +\n `If you want to apply this update, re-run with --unsafe`;\n this.log.info(newMajorUpdateMsg.yellow);\n }\n updates[e] = {from: update.current, to: updateVer};\n } catch (err) {\n errors[e] = err;\n }\n }\n\n this.log.info('Update report:');\n\n for (const [e, update] of _.toPairs(updates)) {\n this.log.ok(` - ${this.type} ${e} updated: ${update.from} => ${update.to}`.green);\n }\n\n for (const [e, err] of _.toPairs(errors)) {\n if (err instanceof NotUpdatableError) {\n this.log.warn(\n ` - '${e}' was not installed via npm, so we could not check ` + `for updates`.yellow\n );\n } else if (err instanceof NoUpdatesAvailableError) {\n this.log.info(` - '${e}' had no updates available`.yellow);\n } else {\n // otherwise, make it pop with red!\n this.log.error(` - '${e}' failed to update: ${err}`.red);\n }\n }\n return {updates, errors};\n }\n\n /**\n * Given an extension name, figure out what its highest possible version upgrade is, and also the\n * highest possible safe upgrade.\n *\n * @param {string} ext - name of extension\n * @return {Promise}\n */\n async checkForExtensionUpdate(ext) {\n // TODO decide how we want to handle beta versions?\n // this is a helper method, 'ext' is assumed to already be installed here, and of the npm\n // install type\n const {version, pkgName} = this.config.installedExtensions[ext];\n /** @type {string?} */\n let unsafeUpdate = await npm.getLatestVersion(this.config.appiumHome, pkgName);\n let safeUpdate = await npm.getLatestSafeUpgradeVersion(\n this.config.appiumHome,\n pkgName,\n version\n );\n if (unsafeUpdate !== null && !util.compareVersions(unsafeUpdate, '>', version)) {\n // the latest version is not greater than the current version, so there's no possible update\n unsafeUpdate = null;\n safeUpdate = null;\n }\n if (unsafeUpdate && unsafeUpdate === safeUpdate) {\n // the latest update is the same as the safe update, which means it's not actually unsafe\n unsafeUpdate = null;\n }\n if (safeUpdate && !util.compareVersions(safeUpdate, '>', version)) {\n // even the safe update is not later than the current, so it is not actually an update\n safeUpdate = null;\n }\n return {current: version, safeUpdate, unsafeUpdate};\n }\n\n /**\n * Actually update an extension installed by NPM, using the NPM cli. And update the installation\n * manifest.\n *\n * @param {string} installSpec - name of extension to update\n * @param {string} version - version string identifier to update extension to\n * @returns {Promise}\n */\n async updateExtension(installSpec, version) {\n const {pkgName, installType} = this.config.installedExtensions[installSpec];\n const extData = await this.installViaNpm({\n installSpec,\n installType,\n pkgName,\n pkgVer: version,\n });\n\n delete extData[/** @type {string} */ (`${this.type}Name`)];\n await this.config.updateExtension(installSpec, extData);\n }\n\n /**\n * Just wraps {@linkcode child_process.spawn} with some default options\n *\n * @param {string} cwd - CWD\n * @param {string} script - Path to script\n * @param {string[]} args - Extra args for script\n * @param {import('child_process').SpawnOptions} opts - Options\n * @returns {import('node:child_process').ChildProcess}\n */\n _runUnbuffered(cwd, script, args = [], opts = {}) {\n return spawn(process.execPath, [script, ...args], {\n cwd,\n stdio: 'inherit',\n ...opts,\n });\n }\n\n /**\n * Runs doctor checks for the given extension.\n *\n * @param {DoctorOptions} opts\n * @returns {Promise} The amount of Doctor checks that were\n * successfully loaded and executed for the given extension\n * @throws {Error} If any of the mandatory Doctor checks fails.\n */\n async _doctor({installSpec}) {\n if (!this.config.isInstalled(installSpec)) {\n throw this._createFatalError(`The ${this.type} \"${installSpec}\" is not installed`);\n }\n\n const moduleRoot = this.config.getInstallPath(installSpec);\n const packageJsonPath = path.join(moduleRoot, 'package.json');\n if (!await fs.exists(packageJsonPath)) {\n throw this._createFatalError(\n `No package.json could be found for \"${installSpec}\" ${this.type}`\n );\n }\n let doctorSpec;\n try {\n doctorSpec = JSON.parse(await fs.readFile(packageJsonPath, 'utf8')).appium?.doctor;\n } catch (e) {\n throw this._createFatalError(\n `The manifest at '${packageJsonPath}' cannot be parsed: ${e.message}`\n );\n }\n if (!doctorSpec) {\n this.log.info(`The ${this.type} \"${installSpec}\" does not export any doctor checks`);\n return 0;\n }\n if (!_.isPlainObject(doctorSpec) || !_.isArray(doctorSpec.checks)) {\n throw this._createFatalError(\n `The 'doctor' entry in the package manifest '${packageJsonPath}' must be a proper object ` +\n `containing the 'checks' key with the array of script paths`\n );\n }\n const paths = doctorSpec.checks.map((/** @type {string} */ p) => {\n const scriptPath = path.resolve(moduleRoot, p);\n if (!path.normalize(scriptPath).startsWith(path.normalize(moduleRoot))) {\n this.log.error(\n `The doctor check script '${p}' from the package manifest '${packageJsonPath}' must be located ` +\n `in the '${moduleRoot}' root folder. It will be skipped`\n );\n return null;\n }\n return scriptPath;\n }).filter(Boolean);\n /** @type {Promise[]} */\n const loadChecksPromises = [];\n for (const p of paths) {\n const promise = (async () => {\n // https://github.com/nodejs/node/issues/31710\n const scriptPath = system.isWindows() ? pathToFileURL(p).href : p;\n try {\n return await import(scriptPath);\n } catch (e) {\n this.log.warn(`Unable to load doctor checks from '${p}': ${e.message}`);\n }\n })();\n loadChecksPromises.push(promise);\n }\n const isDoctorCheck = (/** @type {any} */ x) =>\n ['diagnose', 'fix', 'hasAutofix', 'isOptional'].every((method) => _.isFunction(x?.[method]));\n /** @type {import('@appium/types').IDoctorCheck[]} */\n const checks = _.flatMap((await B.all(loadChecksPromises)).filter(Boolean).map(_.toPairs))\n .map(([, value]) => value)\n .filter(isDoctorCheck);\n if (_.isEmpty(checks)) {\n this.log.info(`The ${this.type} \"${installSpec}\" exports no valid doctor checks`);\n return 0;\n }\n this.log.debug(\n `Running ${util.pluralize('doctor check', checks.length, true)} ` +\n `for the \"${installSpec}\" ${this.type}`\n );\n const exitCode = await new Doctor(checks).run();\n if (exitCode !== DOCTOR_EXIT_CODE.SUCCESS) {\n throw this._createFatalError('Treatment required');\n }\n return checks.length;\n }\n\n /**\n * Runs a script cached inside the `scripts` field under `appium`\n * inside of the extension's `package.json` file. Will throw\n * an error if the driver/plugin does not contain a `scripts` field\n * underneath the `appium` field in its `package.json`, if the\n * `scripts` field is not a plain object, or if the `scriptName` is\n * not found within `scripts` object.\n *\n * @param {RunOptions} opts\n * @return {Promise}\n */\n async _run({installSpec, scriptName, extraArgs = [], bufferOutput = false}) {\n if (!this.config.isInstalled(installSpec)) {\n throw this._createFatalError(`The ${this.type} \"${installSpec}\" is not installed`);\n }\n\n const extConfig = this.config.installedExtensions[installSpec];\n\n // note: TS cannot understand that _.has() is a type guard\n if (!('scripts' in extConfig)) {\n throw this._createFatalError(\n `The ${this.type} named '${installSpec}' does not contain the ` +\n `\"scripts\" field underneath the \"appium\" field in its package.json`\n );\n }\n\n const extScripts = extConfig.scripts;\n\n if (!extScripts || !_.isPlainObject(extScripts)) {\n throw this._createFatalError(\n `The ${this.type} named '${installSpec}' \"scripts\" field must be a plain object`\n );\n }\n\n if (!scriptName) {\n const allScripts = _.toPairs(extScripts);\n const root = this.config.getInstallPath(installSpec);\n const existingScripts = await B.filter(\n allScripts,\n async ([, p]) => await fs.exists(path.join(root, p))\n );\n if (_.isEmpty(existingScripts)) {\n this.log.info(`The ${this.type} named '${installSpec}' does not contain any scripts`);\n } else {\n this.log.info(`The ${this.type} named '${installSpec}' contains ` +\n `${util.pluralize('script', existingScripts.length, true)}:`);\n existingScripts.forEach(([name]) => this.log.info(` - ${name}`));\n }\n this.log.ok(`Successfully retrieved the list of scripts`.green);\n return {};\n }\n\n if (!(scriptName in /** @type {Record} */ (extScripts))) {\n throw this._createFatalError(\n `The ${this.type} named '${installSpec}' does not support the script: '${scriptName}'`\n );\n }\n\n const scriptPath = extScripts[scriptName];\n const moduleRoot = this.config.getInstallPath(installSpec);\n const normalizedScriptPath = path.normalize(path.resolve(moduleRoot, scriptPath));\n if (!normalizedScriptPath.startsWith(path.normalize(moduleRoot))) {\n throw this._createFatalError(\n `The '${scriptPath}' script must be located in the '${moduleRoot}' folder`\n );\n }\n\n if (bufferOutput) {\n const runner = new SubProcess(process.execPath, [scriptPath, ...extraArgs], {\n cwd: moduleRoot,\n });\n\n const output = new RingBuffer(50);\n\n runner.on('stream-line', (line) => {\n output.enqueue(line);\n this.log.log(line);\n });\n\n await runner.start(0);\n\n try {\n await runner.join();\n this.log.ok(`${scriptName} successfully ran`.green);\n return {output: output.getBuff()};\n } catch (err) {\n const message = `Encountered an error when running '${scriptName}': ${err.message}`;\n throw this._createFatalError(message);\n }\n }\n\n try {\n await new B((resolve, reject) => {\n this._runUnbuffered(moduleRoot, scriptPath, extraArgs)\n .once('error', (err) => {\n // generally this is of the \"I can't find the script\" variety.\n // this is a developer bug: the extension is pointing to a script that is not where the\n // developer said it would be (in `appium.scripts` of the extension's `package.json`)\n reject(err);\n })\n .once('close', (code) => {\n if (code === 0) {\n resolve();\n } else {\n reject(new Error(`Script exited with code ${code}`));\n }\n });\n });\n this.log.ok(`${scriptName} successfully ran`.green);\n return {};\n } catch (err) {\n const message = `Encountered an error when running '${scriptName}': ${err.message}`;\n throw this._createFatalError(message);\n }\n }\n}\n\n/**\n * This is needed to ensure proper module resolution for installed extensions,\n * especially ESM ones.\n *\n * @param {ExtensionConfig} driverConfig\n * @param {ExtensionConfig} pluginConfig\n * @param {import('@appium/types').AppiumLogger} logger\n */\nexport async function injectAppiumSymlinks(driverConfig, pluginConfig, logger) {\n const installPaths = _.compact([\n ...Object.values(driverConfig.installedExtensions || {}),\n ...Object.values(pluginConfig.installedExtensions || {})\n ].filter((details) => details.installType === INSTALL_TYPE_NPM)\n .map((details) => details.installPath));\n // After the extension is installed, we try to inject the appium module symlink\n // into the extension's node_modules folder if it is not there yet.\n // We also inject the symlink into other installed extensions' node_modules folders\n // as these might be cleaned up unexpectedly by npm\n // (see https://github.com/appium/python-client/pull/1177#issuecomment-3419826643).\n await Promise.all(\n installPaths.map((installPath) => injectAppiumSymlink(path.join(installPath, 'node_modules'), logger))\n );\n}\n\n/**\n * This is needed to ensure proper module resolution for installed extensions,\n * especially ESM ones.\n *\n * @param {string} dstFolder The destination folder where the symlink should be created\n * @param {import('@appium/types').AppiumLogger} logger\n * @returns {Promise}\n */\nasync function injectAppiumSymlink(dstFolder, logger) {\n let appiumModuleRoot;\n try {\n appiumModuleRoot = getAppiumModuleRoot();\n const symlinkPath = path.join(dstFolder, path.basename(appiumModuleRoot));\n if (await fs.exists(dstFolder) && !(await fs.exists(symlinkPath))) {\n await fs.symlink(appiumModuleRoot, symlinkPath, system.isWindows() ? 'junction' : 'dir');\n }\n } catch (error) {\n // This error is not fatal, we may still doing just fine if the module being loaded is a CJS one\n logger.info(\n `Cannot create a symlink to the appium module '${appiumModuleRoot}' in '${dstFolder}'. ` +\n `Original error: ${error.message}`\n );\n }\n}\n\nexport default ExtensionCliCommand;\nexport {ExtensionCliCommand as ExtensionCommand};\n\n/**\n * Options for the {@linkcode ExtensionCliCommand} constructor\n * @template {ExtensionType} ExtType\n * @typedef ExtensionCommandOptions\n * @property {ExtensionConfig} config - the `DriverConfig` or `PluginConfig` instance used for this command\n * @property {boolean} json - whether the output of this command should be JSON or text\n */\n\n/**\n * Extra stuff about extensions; used indirectly by {@linkcode ExtensionCliCommand.list}.\n *\n * @typedef ExtensionListMetadata\n * @property {boolean} installed - If `true`, the extension is installed\n * @property {boolean} upToDate - If the extension is installed and the latest\n * @property {string|null} updateVersion - If the extension is installed, the version it can be updated to\n * @property {string|null} unsafeUpdateVersion - Same as above, but a major version bump\n * @property {string} [updateError] - Update check error message (if present)\n * @property {boolean} [devMode] - If Appium is run from an extension's working copy\n * @property {string} [repositoryUrl] - Repository URL for the extension (if available)\n */\n\n/**\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n * @typedef {import('@appium/types').DriverType} DriverType\n * @typedef {import('@appium/types').PluginType} PluginType\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtRecord} ExtRecord\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('../extension/extension-config').ExtensionConfig} ExtensionConfig\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtMetadata} ExtMetadata\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtManifest} ExtManifest\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtPackageJson} ExtPackageJson\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtInstallReceipt} ExtInstallReceipt\n */\n\n/**\n * Possible return value for {@linkcode ExtensionCliCommand.list}\n * @template {ExtensionType} ExtType\n * @typedef {Partial> & Partial} ExtensionListData\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {ExtManifest & ExtensionListMetadata} InstalledExtensionListData\n */\n\n/**\n * Return value of {@linkcode ExtensionCliCommand.list}.\n * @template {ExtensionType} ExtType\n * @typedef {Record>} ExtensionList\n */\n\n/**\n * Options for {@linkcode ExtensionCliCommand._run}.\n * @typedef RunOptions\n * @property {string} installSpec - name of the extension to run a script from\n * @property {string} [scriptName] - name of the script to run. If not provided\n * then all available script names will be printed\n * @property {string[]} [extraArgs] - arguments to pass to the script\n * @property {boolean} [bufferOutput] - if true, will buffer the output of the script and return it\n */\n\n/**\n * Options for {@linkcode ExtensionCliCommand.doctor}.\n * @typedef DoctorOptions\n * @property {string} installSpec - name of the extension to run doctor checks for\n */\n\n/**\n * Return value of {@linkcode ExtensionCliCommand._run}\n *\n * @typedef RunOutput\n * @property {string[]} [output] - script output if `bufferOutput` was `true` in {@linkcode RunOptions}\n */\n\n/**\n * Options for {@linkcode ExtensionCliCommand._update}.\n * @typedef ExtensionUpdateOpts\n * @property {string} installSpec - the name of the extension to update\n * @property {boolean} unsafe - if true, will perform unsafe updates past major revision boundaries\n */\n\n/**\n * Return value of {@linkcode ExtensionCliCommand._update}.\n * @typedef ExtensionUpdateResult\n * @property {Record} errors - map of ext names to error objects\n * @property {Record} updates - map of ext names to {@linkcode UpdateReport}s\n */\n\n/**\n * Part of result of {@linkcode ExtensionCliCommand._update}.\n * @typedef UpdateReport\n * @property {string} from - version the extension was updated from\n * @property {string} to - version the extension was updated to\n */\n\n/**\n * Options for {@linkcode ExtensionCliCommand._uninstall}.\n * @typedef UninstallOpts\n * @property {string} installSpec - the name or spec of an extension to uninstall\n */\n\n/**\n * Used by {@linkcode ExtensionCliCommand.getPostInstallText}\n * @typedef ExtensionArgs\n * @property {string} extName - the name of an extension\n * @property {object} extData - the data for an installed extension\n */\n\n/**\n * Options for {@linkcode ExtensionCliCommand.installViaNpm}\n * @typedef InstallViaNpmArgs\n * @property {string} installSpec - the name or spec of an extension to install\n * @property {string} pkgName - the NPM package name of the extension\n * @property {import('appium/types').InstallType} installType - type of install\n * @property {string} [pkgVer] - the specific version of the NPM package\n */\n\n/**\n * Object returned by {@linkcode ExtensionCliCommand.checkForExtensionUpdate}\n * @typedef PossibleUpdates\n * @property {string} current - current version\n * @property {string?} safeUpdate - version we can safely update to if it exists, or null\n * @property {string?} unsafeUpdate - version we can unsafely update to if it exists, or null\n */\n\n/**\n * Options for {@linkcode ExtensionCliCommand._install}\n * @typedef InstallOpts\n * @property {string} installSpec - the name or spec of an extension to install\n * @property {InstallType} installType - how to install this extension. One of the INSTALL_TYPES\n * @property {string} [packageName] - for git/github installs, the extension node package name\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {ExtType extends DriverType ? typeof import('../constants').KNOWN_DRIVERS : ExtType extends PluginType ? typeof import('../constants').KNOWN_PLUGINS : never} KnownExtensions\n */\n\n/**\n * @typedef ListOptions\n * @property {boolean} showInstalled - whether should show only installed extensions\n * @property {boolean} showUpdates - whether should show available updates\n * @property {boolean} [verbose] - whether to show additional data from the extension\n */\n\n/**\n * Opts for {@linkcode ExtensionCliCommand.getInstallationReceipt}\n * @template {ExtensionType} ExtType\n * @typedef GetInstallationReceiptOpts\n * @property {string} installPath\n * @property {string} installSpec\n * @property {ExtPackageJson} pkg\n * @property {InstallType} installType\n */\n\n/**\n * @typedef {import('appium/types').InstallType} InstallType\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/cli/extension.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n/* eslint-disable no-console */\nimport {DRIVER_TYPE, PLUGIN_TYPE} from '../constants';\nimport {isExtensionCommandArgs} from '../utils';\nimport DriverCliCommand from './driver-command';\nimport PluginCliCommand from './plugin-command';\nimport {errAndQuit, JSON_SPACES} from './utils';\n\nexport const commandClasses = Object.freeze(\n /** @type {const} */ ({\n [DRIVER_TYPE]: DriverCliCommand,\n [PLUGIN_TYPE]: PluginCliCommand,\n })\n);\n\n/**\n * Run a subcommand of the 'appium driver' type. Each subcommand has its own set of arguments which\n * can be represented as a JS object.\n *\n * @template {import('appium/types').CliExtensionCommand} Cmd\n * @template {import('appium/types').CliExtensionSubcommand} SubCmd\n * @param {import('appium/types').Args} args - JS object where the key is the parameter name (as defined in\n * driver-parser.js)\n * @param {import('../extension/extension-config').ExtensionConfig} config - Extension config object\n */\nasync function runExtensionCommand(args, config) {\n // TODO driver config file should be locked while any of these commands are\n // running to prevent weird situations\n let jsonResult = null;\n const {extensionType: type} = config; // NOTE this is the same as `args.subcommand`\n if (!isExtensionCommandArgs(args)) {\n throw new TypeError(`Cannot call ${type} command without a subcommand like 'install'`);\n }\n let {json, suppressOutput} = args;\n json = Boolean(json);\n if (suppressOutput) {\n json = true;\n }\n const CommandClass = /** @type {ExtCommand} */ (commandClasses[type]);\n const cmd = new CommandClass({config, json});\n try {\n jsonResult = await cmd.execute(args);\n } catch (err) {\n // in the suppress output case, we are calling this function internally and should\n // just throw instead of printing an error and ending the process\n if (suppressOutput) {\n throw err;\n }\n errAndQuit(json, err);\n }\n\n if (json && !suppressOutput) {\n console.log(JSON.stringify(jsonResult, null, JSON_SPACES));\n }\n\n return jsonResult;\n}\n\nexport {runExtensionCommand};\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {ExtType extends DriverType ? Class : ExtType extends PluginType ? Class : never} ExtCommand\n */\n\n/**\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n * @typedef {import('@appium/types').DriverType} DriverType\n * @typedef {import('@appium/types').PluginType} PluginType\n */\n\n/**\n * @template T\n * @typedef {import('@appium/types').Class} Class\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/cli/parser.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {fs} from '@appium/support';\nimport {ArgumentParser} from 'argparse';\nimport _ from 'lodash';\nimport path from 'node:path';\nimport {\n DRIVER_TYPE,\n EXT_SUBCOMMAND_DOCTOR,\n EXT_SUBCOMMAND_INSTALL,\n EXT_SUBCOMMAND_LIST,\n EXT_SUBCOMMAND_RUN,\n EXT_SUBCOMMAND_UNINSTALL,\n EXT_SUBCOMMAND_UPDATE,\n PLUGIN_TYPE,\n SERVER_SUBCOMMAND,\n SETUP_SUBCOMMAND\n} from '../constants';\nimport {finalizeSchema, getArgSpec, hasArgSpec} from '../schema';\nimport {rootDir} from '../config';\nimport {getExtensionArgs, getServerArgs} from './args';\nimport {\n DEFAULT_PLUGINS,\n SUBCOMMAND_MOBILE,\n SUBCOMMAND_DESKTOP,\n SUBCOMMAND_BROWSER,\n SUBCOMMAND_RESET,\n getPresetDrivers,\n determinePlatformName\n} from './setup-command';\n\nexport const EXTRA_ARGS = 'extraArgs';\n\n/**\n * If the parsed args do not contain any of these values, then we\n * will automatically inject the `server` subcommand.\n */\nconst NON_SERVER_ARGS = Object.freeze(\n new Set([SETUP_SUBCOMMAND, DRIVER_TYPE, PLUGIN_TYPE, SERVER_SUBCOMMAND, '-h', '--help', '-v', '--version'])\n);\n\nconst version = fs.readPackageJsonFrom(rootDir).version;\n\n/**\n * A wrapper around `argparse`\n *\n * - Handles instantiation, configuration, and monkeypatching of an\n * `ArgumentParser` instance for Appium server and its extensions\n * - Handles error conditions, messages, and exit behavior\n */\nclass ArgParser {\n /**\n * @param {boolean} [debug] - If true, throw instead of exit on error.\n */\n constructor(debug = false) {\n const prog = process.argv[1] ? path.basename(process.argv[1]) : 'appium';\n const parser = new ArgumentParser({\n add_help: true,\n description:\n 'A webdriver-compatible server that facilitates automation of web, mobile, and other ' +\n 'types of apps across various platforms.',\n prog,\n });\n\n ArgParser._patchExit(parser);\n\n /**\n * Program name (typically `appium`)\n * @type {string}\n */\n this.prog = prog;\n\n /**\n * If `true`, throw an error on parse failure instead of printing help\n * @type {boolean}\n */\n this.debug = debug;\n\n /**\n * Wrapped `ArgumentParser` instance\n * @type {ArgumentParser}\n */\n this.parser = parser;\n\n parser.add_argument('-v', '--version', {\n action: 'version',\n version,\n });\n\n const subParsers = parser.add_subparsers({dest: 'subcommand'});\n\n // add the 'server' subcommand, and store the raw arguments on the parser\n // object as a way for other parts of the code to work with the arguments\n // conceptually rather than just through argparse\n const serverArgs = ArgParser._addServerToParser(subParsers);\n\n this.rawArgs = serverArgs;\n\n // add the 'driver' and 'plugin' subcommands\n ArgParser._addExtensionCommandsToParser(subParsers);\n\n // add the 'setup' command\n ArgParser._addSetupToParser(subParsers);\n\n // backwards compatibility / drop-in wrapper\n /**\n * @type {ArgParser['parseArgs']}\n */\n this.parse_args = this.parseArgs;\n }\n\n /**\n * Parse arguments from the command line.\n *\n * If no subcommand is passed in, this method will inject the `server` subcommand.\n *\n * `ArgParser.prototype.parse_args` is an alias of this method.\n * @template {import('appium/types').CliCommand} [Cmd=import('appium/types').CliCommandServer]\n * @param {string[]} [args] - Array of arguments, ostensibly from `process.argv`. Gathers args from `process.argv` if not provided.\n * @returns {import('appium/types').Args} - The parsed arguments\n */\n parseArgs(args = process.argv.slice(2)) {\n if (!NON_SERVER_ARGS.has(args[0])) {\n args.unshift(SERVER_SUBCOMMAND);\n }\n\n try {\n const parsed = this.parser.parse_known_args(args);\n const [knownArgs, unknownArgs] = parsed;\n // XXX: you'd think that argparse, when given an alias for a subcommand,\n // would set this value to the original subcommand name, but it doesn't.\n if (knownArgs?.driverCommand === 'ls') {\n knownArgs.driverCommand = 'list';\n } else if (knownArgs?.pluginCommand === 'ls') {\n knownArgs.pluginCommand = 'list';\n }\n if (\n unknownArgs?.length &&\n (knownArgs.driverCommand === 'run' || knownArgs.pluginCommand === 'run')\n ) {\n return ArgParser._transformParsedArgs(knownArgs, unknownArgs);\n } else if (unknownArgs?.length) {\n throw new Error(`[ERROR] Unrecognized arguments: ${unknownArgs.join(' ')}`);\n }\n return ArgParser._transformParsedArgs(knownArgs);\n } catch (err) {\n if (this.debug) {\n throw err;\n }\n // this isn't tested via unit tests (we use `debug: true`) so may escape coverage.\n\n /* istanbul ignore next */\n {\n // eslint-disable-next-line no-console\n console.error(); // need an extra space since argparse prints usage.\n // eslint-disable-next-line no-console\n console.error(err.message);\n process.exit(1);\n }\n }\n }\n\n /**\n * Given an object full of arguments as returned by `argparser.parse_args`,\n * expand the ones for extensions into a nested object structure and rename\n * keys to match the intended destination.\n *\n * E.g., `{'driver-foo-bar': baz}` becomes `{driver: {foo: {bar: 'baz'}}}`\n * @param {object} args\n * @param {string[]} [unknownArgs]\n * @returns {object}\n */\n static _transformParsedArgs(args, unknownArgs = []) {\n const result = _.reduce(\n args,\n (unpacked, value, key) => {\n if (!_.isUndefined(value) && hasArgSpec(key)) {\n const {dest} = /** @type {import('../schema/arg-spec').ArgSpec} */ (getArgSpec(key));\n _.set(unpacked, dest, value);\n } else {\n // this could be anything that _isn't_ a server arg\n unpacked[key] = value;\n }\n return unpacked;\n },\n {}\n );\n result[EXTRA_ARGS] = unknownArgs;\n return result;\n }\n\n /**\n * Patches the `exit()` method of the parser to throw an error, so we can handle it manually.\n * @param {ArgumentParser} parser\n */\n static _patchExit(parser) {\n parser.exit = (code, msg) => {\n if (code) {\n throw new Error(msg);\n }\n process.exit();\n };\n }\n\n /**\n *\n * @param {import('argparse').SubParser} subParser\n * @returns {import('./args').ArgumentDefinitions}\n */\n static _addServerToParser(subParser) {\n const serverParser = subParser.add_parser('server', {\n add_help: true,\n help: 'Start an Appium server',\n description: 'Start an Appium server (the \"server\" subcommand is optional)',\n });\n\n ArgParser._patchExit(serverParser);\n\n const serverArgs = getServerArgs();\n for (const [flagsOrNames, opts] of serverArgs) {\n // @ts-ignore TS doesn't like the spread operator here.\n serverParser.add_argument(...flagsOrNames, {...opts});\n }\n\n return serverArgs;\n }\n\n /**\n * Adds extension sub-sub-commands to `driver`/`plugin` subcommands\n * @param {import('argparse').SubParser} subParsers\n */\n static _addExtensionCommandsToParser(subParsers) {\n for (const type of /** @type {[DriverType, PluginType]} */ ([DRIVER_TYPE, PLUGIN_TYPE])) {\n const extParser = subParsers.add_parser(type, {\n add_help: true,\n help: `Manage Appium ${type}s`,\n description: `Manage Appium ${type}s using various subcommands`,\n });\n\n ArgParser._patchExit(extParser);\n\n const extSubParsers = extParser.add_subparsers({\n dest: `${type}Command`,\n });\n const extensionArgs = getExtensionArgs();\n /**\n * @type { {command: import('appium/types').CliExtensionSubcommand, args: import('./args').ArgumentDefinitions, help: string, aliases?: import('argparse').SubArgumentParserOptions['aliases']}[] }\n */\n const parserSpecs = [\n {\n command: EXT_SUBCOMMAND_LIST,\n args: extensionArgs[type].list,\n help: `List available and installed ${type}s`,\n aliases: ['ls'],\n },\n {\n command: EXT_SUBCOMMAND_INSTALL,\n args: extensionArgs[type].install,\n help: `Install a ${type}`,\n },\n {\n command: EXT_SUBCOMMAND_UNINSTALL,\n args: extensionArgs[type].uninstall,\n help: `Uninstall a ${type}`,\n },\n {\n command: EXT_SUBCOMMAND_UPDATE,\n args: extensionArgs[type].update,\n help: `Update one or more installed ${type}s to the latest version`,\n },\n {\n command: EXT_SUBCOMMAND_RUN,\n args: extensionArgs[type].run,\n help: `Run a script (if available) from the given ${type}`,\n },\n {\n command: EXT_SUBCOMMAND_DOCTOR,\n args: extensionArgs[type].doctor,\n help: `Run doctor checks (if available) for the given ${type}`,\n },\n ];\n\n for (const {command, args, help, aliases} of parserSpecs) {\n const parser = extSubParsers.add_parser(command, {help, aliases: aliases ?? []});\n\n ArgParser._patchExit(parser);\n\n for (const [flagsOrNames, opts] of args) {\n // add_argument mutates params so make sure to send in copies instead\n if (flagsOrNames.length === 2) {\n parser.add_argument(flagsOrNames[0], flagsOrNames[1], {...opts});\n } else {\n parser.add_argument(flagsOrNames[0], {...opts});\n }\n }\n }\n }\n }\n\n /**\n * Add subcommand and sub-sub commands for 'setup' subcommand.\n * @param {import('argparse').SubParser} subParser\n */\n static _addSetupToParser(subParser) {\n const setupParser = subParser.add_parser('setup', {\n add_help: true,\n help: 'Batch install or uninstall Appium drivers and plugins',\n description:\n `Install a preset of official drivers/plugins compatible with the current host platform ` +\n `(${determinePlatformName()}). Existing drivers/plugins will remain. The default preset ` +\n `is \"mobile\". Providing the special \"reset\" subcommand will instead uninstall all ` +\n `drivers and plugins, and remove their related manifest files.`,\n });\n\n\n ArgParser._patchExit(setupParser);\n const extSubParsers = setupParser.add_subparsers({\n dest: `setupCommand`,\n });\n\n const parserSpecs = [\n {\n command: SUBCOMMAND_MOBILE,\n help:\n `The preset for mobile devices ` +\n `(drivers: ${_.join(getPresetDrivers(SUBCOMMAND_MOBILE), ',')}; plugins: ${DEFAULT_PLUGINS})`\n },\n {\n command: SUBCOMMAND_BROWSER,\n help:\n `The preset for desktop browsers ` +\n `(drivers: ${_.join(getPresetDrivers(SUBCOMMAND_BROWSER), ',')}; plugins: ${DEFAULT_PLUGINS})`\n },\n {\n command: SUBCOMMAND_DESKTOP,\n help:\n `The preset for desktop applications ` +\n `(drivers: ${_.join(getPresetDrivers(SUBCOMMAND_DESKTOP), ',')}; plugins: ${DEFAULT_PLUGINS})`\n },\n {\n command: SUBCOMMAND_RESET,\n help: 'Remove all installed drivers and plugins'\n },\n ];\n\n for (const {command, help} of parserSpecs) {\n const parser = extSubParsers.add_parser(command, {help});\n ArgParser._patchExit(parser);\n }\n }\n}\n\n/**\n * Creates a {@link ArgParser} instance; finalizes the config schema.\n *\n * @constructs ArgParser\n * @param {boolean} [debug] - If `true`, throw instead of exit upon parsing error\n * @returns {ArgParser}\n */\nfunction getParser(debug) {\n finalizeSchema();\n\n return new ArgParser(debug);\n}\n\nexport {getParser, ArgParser};\n\n/**\n * @typedef {import('@appium/types').DriverType} DriverType\n * @typedef {import('@appium/types').PluginType} PluginType\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/cli/plugin-command.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\nimport ExtensionCliCommand from './extension-command';\nimport {KNOWN_PLUGINS} from '../constants';\n\nconst REQ_PLUGIN_FIELDS = ['pluginName', 'mainClass'];\n\n/**\n * @extends {ExtensionCliCommand}\n */\nexport default class PluginCliCommand extends ExtensionCliCommand {\n /**\n *\n * @param {import('./extension-command').ExtensionCommandOptions} opts\n */\n constructor({config, json}) {\n super({config, json});\n this.knownExtensions = KNOWN_PLUGINS;\n }\n\n /**\n * Install a plugin\n *\n * @param {PluginInstallOpts} opts\n * @returns {Promise>}\n */\n async install({plugin, installType, packageName}) {\n return await super._install({\n installSpec: plugin,\n installType,\n packageName,\n });\n }\n\n /**\n * Uninstall a plugin\n *\n * @param {PluginUninstallOpts} opts\n * @returns {Promise>}\n */\n async uninstall({plugin}) {\n return await super._uninstall({installSpec: plugin});\n }\n\n /**\n * Update a plugin\n *\n * @param {PluginUpdateOpts} opts\n * @returns {Promise}\n */\n async update({plugin, unsafe}) {\n return await super._update({installSpec: plugin, unsafe});\n }\n\n /**\n * Run a script from a plugin\n *\n * @param {PluginRunOptions} opts\n * @returns {Promise}\n * @throws {Error} if the script fails to run\n */\n async run({plugin, scriptName, extraArgs}) {\n return await super._run({\n installSpec: plugin,\n scriptName,\n extraArgs,\n bufferOutput: this.isJsonOutput,\n });\n }\n\n /**\n * Runs doctor checks for the given plugin\n *\n * @param {PluginDoctorOptions} opts\n * @returns {Promise} The amount of executed doctor checks.\n * @throws {Error} If any of the mandatory Doctor checks fails.\n */\n async doctor({plugin}) {\n return await super._doctor({\n installSpec: plugin,\n });\n }\n\n /**\n *\n * @param {import('./extension-command').ExtensionArgs} opts\n * @returns {string}\n */\n getPostInstallText({extName, extData}) {\n return `Plugin ${extName}@${extData.version} successfully installed`.green;\n }\n\n /**\n * Validates fields in `appium` field of `pluginMetadata`\n *\n * For any `package.json` fields which a plugin requires, validate the type of\n * those fields on the `package.json` data, throwing an error if anything is\n * amiss.\n * @param {import('appium/types').ExtMetadata} pluginMetadata\n * @param {string} installSpec\n * @returns {void}\n */\n validateExtensionFields(pluginMetadata, installSpec) {\n const missingFields = REQ_PLUGIN_FIELDS.reduce(\n (acc, field) => (pluginMetadata[field] ? acc : [...acc, field]),\n []\n );\n\n if (!_.isEmpty(missingFields)) {\n throw new Error(\n `Installed plugin \"${installSpec}\" did not expose correct fields for compatibility ` +\n `with Appium. Missing fields: ${JSON.stringify(missingFields)}`\n );\n }\n }\n}\n\n/**\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n * @typedef {import('@appium/types').PluginType} PluginType\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtRecord} ExtRecord\n */\n\n/**\n * Options for {@linkcode PluginCliCommand.install}\n * @typedef PluginInstallOpts\n * @property {string} plugin - the name or spec of a plugin to install\n * @property {InstallType} installType - how to install this plugin. One of the INSTALL_TYPES\n * @property {string} [packageName] - for git/github installs, the plugin node package name\n */\n\n/**\n * @typedef {import('appium/types').InstallType} InstallType\n */\n\n/**\n * Options for {@linkcode PluginCliCommand.uninstall}\n * @typedef PluginUninstallOpts\n * @property {string} plugin - the name or spec of a plugin to uninstall\n */\n\n/**\n * Options for {@linkcode PluginCliCommand.update}\n * @typedef PluginUpdateOpts\n * @property {string} plugin - the name of the plugin to update\n * @property {boolean} unsafe - if true, will perform unsafe updates past major revision boundaries\n */\n\n/**\n * Options for {@linkcode PluginCliCommand.run}.\n * @typedef PluginRunOptions\n * @property {string} plugin - name of the plugin to run a script from\n * @property {string} scriptName - name of the script to run\n * @property {string[]} [extraArgs] - arguments to pass to the script\n */\n\n/**\n * Options for {@linkcode PluginCliCommand.doctor}.\n * @typedef PluginDoctorOptions\n * @property {string} plugin - name of the plugin to run doctor checks for\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/cli/setup-command.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\nimport {\n DESKTOP_BROWSERS,\n DESKTOP_DRIVERS,\n MOBILE_DRIVERS\n} from '../constants';\nimport {runExtensionCommand} from './extension';\nimport { system, fs } from '@appium/support';\nimport log from '../logger';\n\n/**\n * Subcommands of preset for setup\n */\nexport const SUBCOMMAND_MOBILE = 'mobile';\nexport const SUBCOMMAND_DESKTOP = 'desktop';\nexport const SUBCOMMAND_BROWSER = 'browser';\nexport const SUBCOMMAND_RESET = 'reset';\n\n/**\n * Pairs of preset subcommand and driver candidates.\n * Driver names listed in KNOWN_DRIVERS to install by default\n */\nconst PRESET_PAIRS = Object.freeze(\n /** @type {const} */ ({\n mobile: _.keys(MOBILE_DRIVERS),\n desktop: _.keys(DESKTOP_DRIVERS),\n browser: _.keys(DESKTOP_BROWSERS)\n }),\n);\nconst DRIVERS_ONLY_MACOS = ['xcuitest', 'safari', 'mac2'];\n\nconst DRIVERS_ONLY_WINDOWS = ['windows'];\n\n/**\n * Plugin names listed in KNOWN_PLUGINS to install by default.\n */\nexport const DEFAULT_PLUGINS = ['images', 'inspector'];\n\n/**\n * Return a list of drivers available for current host platform.\n * @param {import('appium/types').CliCommandSetupSubcommand} presetName\n * @returns {Array}\n */\nexport function getPresetDrivers(presetName) {\n return _.filter(PRESET_PAIRS[presetName], (driver) => {\n if (_.includes(DRIVERS_ONLY_MACOS, driver)) {\n return system.isMac();\n }\n\n if (_.includes(DRIVERS_ONLY_WINDOWS, driver)) {\n return system.isWindows();\n }\n\n return true;\n });\n\n}\n\n/**\n * Return desktop platform name for setup command description.\n * @returns {string}\n */\nexport function determinePlatformName() {\n if (system.isMac()) {\n return 'macOS';\n } else if (system.isWindows()) {\n return 'Windows';\n }\n return 'Linux';\n}\n\n/**\n * Run 'setup' command to install drivers/plugins into the given appium home.\n * @template {import('appium/types').CliCommandSetup} SetupCmd\n * @param {import('appium/types').Args} preConfigArgs\n * @param {DriverConfig} driverConfig\n * @param {PluginConfig} pluginConfig\n * @returns {Promise}\n */\nexport async function runSetupCommand(preConfigArgs, driverConfig, pluginConfig) {\n switch (preConfigArgs.setupCommand) {\n case SUBCOMMAND_DESKTOP:\n await setupDesktopAppDrivers(driverConfig);\n await setupDefaultPlugins(pluginConfig);\n break;\n case SUBCOMMAND_BROWSER:\n await setupBrowserDrivers(driverConfig);\n await setupDefaultPlugins(pluginConfig);\n break;\n case SUBCOMMAND_RESET:\n await resetAllExtensions(driverConfig, pluginConfig);\n break;\n default:\n await setupMobileDrivers(driverConfig);\n await setupDefaultPlugins(pluginConfig);\n break;\n }\n};\n\n/**\n * Resets all installed drivers and extensions\n *\n * @param {DriverConfig} driverConfig\n * @param {PluginConfig} pluginConfig\n * @returns {Promise}\n */\nasync function resetAllExtensions(driverConfig, pluginConfig) {\n for (const [command, config] of [\n ['driver', driverConfig],\n ['plugin', pluginConfig],\n ]) {\n for (const extensionName of _.keys(/** @type {DriverConfig|PluginConfig} */ (config).installedExtensions)) {\n try {\n await uninstallExtension(\n extensionName,\n extensionCommandArgs(/** @type {CliExtensionCommand} */ (command), extensionName, 'uninstall'),\n /** @type {DriverConfig|PluginConfig} */ (config)\n );\n } catch (e) {\n log.warn(\n `${extensionName} ${command} cannot be uninstalled. Will delete the manifest anyway. ` +\n `Original error: ${e.stack}`\n );\n }\n }\n\n const manifestPath = /** @type {DriverConfig|PluginConfig} */ (config).manifestPath;\n if (!await fs.exists(manifestPath)) {\n continue;\n }\n\n await fs.rimraf(manifestPath);\n if (await fs.exists(manifestPath)) {\n throw new Error(`${command} manifest at '${manifestPath}' cannot be deleted. Is it accessible?`);\n } else {\n log.info(`Successfully deleted ${command} manifest at '${manifestPath}'`);\n }\n }\n}\n\n/**\n * Install drivers listed in DEFAULT_DRIVERS.\n * @param {DriverConfig} driverConfig\n * @returns {Promise}\n */\nasync function setupMobileDrivers(driverConfig) {\n await installDrivers(SUBCOMMAND_MOBILE, driverConfig);\n}\n\n/**\n * Install all of known drivers listed in BROWSER_DRIVERS.\n * @param {DriverConfig} driverConfig\n * @returns {Promise}\n */\nasync function setupBrowserDrivers(driverConfig) {\n await installDrivers(SUBCOMMAND_BROWSER, driverConfig);\n}\n\n/**\n * Install all of known drivers listed in DESKTOP_APP_DRIVERS.\n * @param {DriverConfig} driverConfig\n * @returns {Promise}\n */\nasync function setupDesktopAppDrivers(driverConfig) {\n await installDrivers(SUBCOMMAND_DESKTOP, driverConfig);\n}\n\n/**\n * Install the given driver name. It skips the installation if the given driver name was already installed.\n * @param {import('appium/types').CliCommandSetupSubcommand} subcommand\n * @param {DriverConfig} driverConfig\n * @returns {Promise}\n */\nasync function installDrivers(subcommand, driverConfig) {\n for (const driverName of getPresetDrivers(subcommand)) {\n await installExtension(driverName, extensionCommandArgs('driver', driverName, 'install'), driverConfig);\n }\n}\n\n/**\n * Install plugins listed in DEFAULT_PLUGINS.\n * @param {PluginConfig} pluginConfig\n * @returns {Promise}\n */\nasync function setupDefaultPlugins(pluginConfig) {\n for (const pluginName of DEFAULT_PLUGINS) {\n await installExtension(pluginName, extensionCommandArgs('plugin', pluginName, 'install'), pluginConfig);\n }\n}\n\n/**\n * Run the given extensionConfigArgs command after checking if the given extensionName was already installed.\n * @param {string} extensionName\n * @param {Args} extensionConfigArgs\n * @param {DriverConfig|PluginConfig} extensionConfig\n * @returns {Promise}\n */\nasync function installExtension(extensionName, extensionConfigArgs, extensionConfig) {\n if (_.keys(extensionConfig.installedExtensions).includes(extensionName)) {\n log.info(`${extensionName} (${extensionConfig.installedExtensions[extensionName].version}) is already installed. ` +\n `Skipping the installation.`);\n return;\n }\n await runExtensionCommand(extensionConfigArgs, extensionConfig);\n}\n\n/**\n * Run the given extensionConfigArgs command after checking if the given extensionName was already installed.\n * @param {string} extensionName\n * @param {Args} extensionConfigArgs\n * @param {DriverConfig|PluginConfig} extensionConfig\n * @returns {Promise}\n */\nasync function uninstallExtension(extensionName, extensionConfigArgs, extensionConfig) {\n if (!_.keys(extensionConfig.installedExtensions).includes(extensionName)) {\n log.info(`${extensionName} (${extensionConfig.installedExtensions[extensionName].version}) is not installed. ` +\n `Skipping its uninstall.`);\n return;\n }\n await runExtensionCommand(extensionConfigArgs, extensionConfig);\n}\n\n/**\n * Return the command config for driver or plugin.\n * @param {CliExtensionCommand} extensionCommand\n * @param {string} extensionName\n * @param {CliExtensionSubcommand} command\n * @returns {Args}\n */\nfunction extensionCommandArgs(extensionCommand, extensionName, command) {\n return (extensionCommand === 'plugin')\n ? {'subcommand': 'plugin', 'pluginCommand': command, 'plugin': extensionName}\n : {'subcommand': 'driver', 'driverCommand': command, 'driver': extensionName};\n}\n\n/**\n * @typedef {import('appium/types').CliExtensionCommand} CliExtensionCommand\n * @typedef {import('appium/types').CliExtensionSubcommand} CliExtensionSubcommand\n * @typedef {import('../extension/extension-config').ExtensionConfig} PluginConfig\n * @typedef {import('../extension/extension-config').ExtensionConfig} DriverConfig\n */\n\n/**\n * @typedef {import('appium/types').Args} Args\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/cli/utils.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n/* eslint-disable no-console */\n\nimport ora from 'ora';\n\nexport const JSON_SPACES = 4;\n\n/***\n * Log an error to the console and exit the process.\n * @param {boolean} json - whether we should log json or text\n * @param {any} msg - error message, object, Error instance, etc.\n */\nexport function errAndQuit(json, msg) {\n if (json) {\n console.log(JSON.stringify({error: `${msg}`}, null, JSON_SPACES));\n } else {\n console.error(`${msg}`.red);\n if (msg.stderr) {\n console.error(`${msg.stderr}`.red);\n }\n }\n process.exit(1);\n}\n\n/**\n * Conditionally log something to the console\n * @param {boolean} json - whether we are in json mode (and should therefore not log)\n * @param {string} msg - string to log\n */\nexport function log(json, msg) {\n if (!json) {\n console.log(msg);\n }\n}\n\n/**\n * Start a spinner, execute an async function, and then stop the spinner\n * @param {boolean} json - whether we are in json mode (and should therefore not log)\n * @param {string} msg - string to log\n * @param {function} fn - function to wrap with spinning\n */\nexport async function spinWith(json, msg, fn) {\n if (json) {\n return await fn();\n }\n const spinner = ora(msg).start();\n let res;\n try {\n res = await fn();\n spinner.succeed();\n return res;\n } catch (err) {\n spinner.fail();\n throw err;\n }\n}\n\nexport class RingBuffer {\n constructor(size = 50) {\n this.size = size;\n this.buffer = [];\n }\n\n /**\n * Get the current buffer contents\n *\n * @returns {any[]}\n */\n getBuff() {\n return this.buffer;\n }\n\n /**\n * Remove the oldest item from the buffer\n *\n * @returns {void}\n */\n dequeue() {\n this.buffer.shift();\n }\n /**\n * Add an item to the buffer\n *\n * @param {any} item\n */\n enqueue(item) {\n if (this.buffer.length >= this.size) {\n this.dequeue();\n }\n this.buffer.push(item);\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/doctor/doctor.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport '@colors/colors';\nimport _ from 'lodash';\nimport { util, doctor, logger } from '@appium/support';\n\nexport const EXIT_CODE = /** @type {const} */ Object.freeze({\n SUCCESS: 0,\n HAS_MAJOR_ISSUES: 127,\n});\n\nexport class Doctor {\n /**\n * @param {DoctorCheck[]} [checks=[]]\n */\n constructor(checks = []) {\n this.log = logger.getLogger('Doctor');\n /** @type {DoctorCheck[]} */\n this.checks = checks;\n this.checks\n .filter((c) => _.isNil(c.log))\n .forEach((c) => { c.log = this.log; });\n /** @type {DoctorIssue[]} */\n this.foundIssues = [];\n }\n\n /**\n * @returns {DoctorIssue[]}\n */\n get issuesRequiredToFix() {\n return this.foundIssues.filter((f) => !f.check.isOptional());\n }\n\n /**\n * @returns {DoctorIssue[]}\n */\n get issuesOptionalToFix() {\n return this.foundIssues.filter((f) => f.check.isOptional());\n }\n\n /**\n * The doctor shows the report\n */\n async diagnose() {\n this.log.info(`### Starting doctor diagnostics ###`);\n this.foundIssues = [];\n for (const check of this.checks) {\n const res = await check.diagnose();\n const issue = this.toIssue(res, check);\n if (issue) {\n this.foundIssues.push(issue);\n }\n }\n this.log.info(\n `### Diagnostic completed, ${this.buildFixMessage()}. ###`\n );\n this.log.info('');\n }\n\n /**\n * @returns {Promise}\n */\n async reportManualIssues() {\n const manualIssues = _.filter(this.issuesRequiredToFix, (f) => !f.check.hasAutofix());\n const manualIssuesOptional = _.filter(this.issuesOptionalToFix, (f) => !f.check.hasAutofix());\n\n const handleIssues = async (headerLogs, issues) => {\n if (_.isEmpty(issues)) {\n return;\n }\n\n for (const logMsg of headerLogs) {\n this.log.info(logMsg);\n }\n /** @type {string[]} */\n const fixMessages = [];\n for (const issue of issues) {\n let message;\n try {\n message = await issue.check.fix();\n } catch (e) {\n message = e.message;\n }\n if (message) {\n fixMessages.push(message);\n }\n }\n for (const m of _.uniq(fixMessages)) {\n this.log.warn(` \\u279C ${m}`);\n }\n this.log.info('');\n };\n\n await handleIssues([\n '### Manual Fixes Needed ###',\n 'The configuration cannot be automatically fixed, please do the following first:',\n ], manualIssues);\n await handleIssues([\n '### Optional Manual Fixes ###',\n 'To fix these optional issues, please do the following manually:',\n ], manualIssuesOptional);\n\n if (manualIssues.length > 0) {\n this.log.info('###');\n this.log.info('');\n this.log.info('Bye! Run doctor again when all manual fixes have been applied!');\n this.log.info('');\n return true;\n }\n return false;\n }\n\n /**\n * @param {DoctorIssue} f\n */\n async runAutoFix(f) {\n this.log.info(`### Fixing: ${f.error} ###`);\n try {\n await f.check.fix();\n } catch (err) {\n if (err.constructor.name === doctor.FixSkippedError.name) {\n this.log.info(`### Skipped fix ###`);\n return;\n } else {\n this.log.warn(`${err}`.replace(/\\n$/g, ''));\n this.log.info(`### Fix did not succeed ###`);\n return;\n }\n }\n this.log.info('Checking if this was fixed:');\n const res = await f.check.diagnose();\n if (res.ok) {\n f.fixed = true;\n this.log.info(` ${'\\u2714'.green} ${res.message}`);\n this.log.info(`### Fix was successfully applied ###`);\n } else {\n this.log.info(` ${'\\u2716'.red} ${res.message}`);\n this.log.info(`### Fix was applied but issue remains ###`);\n }\n }\n\n /**\n * @returns {Promise}\n */\n async runAutoFixes() {\n const autoFixes = _.filter(this.foundIssues, (f) => f.check.hasAutofix());\n for (const f of autoFixes) {\n await this.runAutoFix(f);\n this.log.info('');\n }\n if (_.find(autoFixes, (f) => !f.fixed)) {\n // a few issues remain.\n this.log.info('Bye! A few issues remain, fix manually and/or rerun doctor!');\n this.log.info('');\n return false;\n }\n // nothing left to fix.\n this.log.info('Bye! All issues have been fixed!');\n this.log.info('');\n return true;\n }\n\n /**\n * @returns {Promise}\n */\n async run() {\n await this.diagnose();\n if (this.reportSuccess()) {\n return EXIT_CODE.SUCCESS;\n }\n if (await this.reportManualIssues()) {\n return EXIT_CODE.HAS_MAJOR_ISSUES;\n }\n if (!await this.runAutoFixes()) {\n return EXIT_CODE.HAS_MAJOR_ISSUES;\n }\n return EXIT_CODE.SUCCESS;\n }\n\n /**\n * @param {DoctorCheckResult} result\n * @param {DoctorCheck} check\n * @returns {DoctorIssue?}\n */\n toIssue(result, check) {\n if (result.ok) {\n this.log.info(` ${'\\u2714'.green} ${result.message}`);\n return null;\n }\n\n const errorMessage = result.optional\n ? ` ${'\\u2716'.yellow} ${result.message}`\n : ` ${'\\u2716'.red} ${result.message}`;\n this.log.warn(errorMessage);\n return {\n error: errorMessage,\n check,\n };\n }\n\n /**\n * @returns {string}\n */\n buildFixMessage() {\n return `${util.pluralize('required fix', this.issuesRequiredToFix.length, true)} needed, ` +\n `${util.pluralize('optional fix', this.issuesOptionalToFix.length, true)} possible`;\n }\n\n /**\n * @returns {boolean}\n */\n reportSuccess() {\n if (this.issuesRequiredToFix.length === 0 && this.issuesOptionalToFix.length === 0) {\n this.log.info('Everything looks good, bye!');\n this.log.info('');\n return true;\n }\n return false;\n }\n}\n\n/**\n * @typedef DoctorIssue\n * @property {DoctorCheck} check\n * @property {string} error\n * @property {boolean} [fixed]\n */\n\n/**\n * @typedef {import('@appium/types').IDoctorCheck} DoctorCheck\n * @typedef {import('@appium/types').DoctorCheckResult} DoctorCheckResult\n */\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/extension/driver-config.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\nimport {DRIVER_TYPE} from '../constants';\nimport log from '../logger';\nimport {ExtensionConfig} from './extension-config';\n\n/**\n * @extends {ExtensionConfig}\n */\nexport class DriverConfig extends ExtensionConfig {\n /**\n * A set of unique automation names used by drivers.\n * @type {Set}\n */\n knownAutomationNames;\n\n /**\n * A mapping of {@link Manifest} instances to {@link DriverConfig} instances.\n *\n * `Manifest` and `ExtensionConfig` have a one-to-many relationship; each `Manifest` should be associated with a `DriverConfig` and a `PluginConfig`; no more, no less.\n *\n * This variable tracks the `Manifest`-to-`DriverConfig` portion.\n *\n * @type {WeakMap}\n * @private\n */\n static _instances = new WeakMap();\n\n /**\n * Call {@link DriverConfig.create} instead.\n * @private\n * @param {import('./manifest').Manifest} manifest - Manifest instance\n */\n constructor(manifest) {\n super(DRIVER_TYPE, manifest);\n\n this.knownAutomationNames = new Set();\n }\n\n /**\n * Creates a new {@link DriverConfig} instance for a {@link Manifest} instance.\n *\n * @param {Manifest} manifest\n * @throws If `manifest` already associated with a `DriverConfig`\n * @returns {DriverConfig}\n */\n static create(manifest) {\n const instance = new DriverConfig(manifest);\n if (DriverConfig.getInstance(manifest)) {\n throw new Error(\n `Manifest with APPIUM_HOME ${manifest.appiumHome} already has a DriverConfig; use DriverConfig.getInstance() to retrieve it.`\n );\n }\n DriverConfig._instances.set(manifest, instance);\n return instance;\n }\n\n /**\n * Returns a DriverConfig associated with a Manifest\n * @param {Manifest} manifest\n * @returns {DriverConfig|undefined}\n */\n static getInstance(manifest) {\n return DriverConfig._instances.get(manifest);\n }\n\n /**\n * Checks extensions for problems\n */\n async validate() {\n this.knownAutomationNames.clear();\n return await super._validate(this.manifest.getExtensionData(DRIVER_TYPE));\n }\n\n /**\n * @param {ExtManifest} extData\n * @returns {import('./extension-config').ExtManifestProblem[]}\n */\n getConfigProblems(extData) {\n const problems = [];\n const {platformNames, automationName} = extData;\n\n if (!_.isArray(platformNames)) {\n problems.push({\n err: 'Missing or incorrect supported platformNames list.',\n val: platformNames,\n });\n } else if (_.isEmpty(platformNames)) {\n problems.push({\n err: 'Empty platformNames list.',\n val: platformNames,\n });\n } else {\n for (const pName of platformNames) {\n if (!_.isString(pName)) {\n problems.push({\n err: 'Incorrectly formatted platformName.',\n val: pName,\n });\n }\n }\n }\n\n if (!_.isString(automationName)) {\n problems.push({\n err: 'Missing or incorrect automationName',\n val: automationName,\n });\n }\n\n if (this.knownAutomationNames.has(automationName)) {\n problems.push({\n err: 'Multiple drivers claim support for the same automationName',\n val: automationName,\n });\n }\n\n // should we retain the name at the end of this function, once we've checked there are no problems?\n this.knownAutomationNames.add(automationName);\n\n return problems;\n }\n\n /**\n * @param {ExtName} driverName\n * @param {ExtManifest} extData\n * @returns {string}\n */\n extensionDesc(driverName, {version, automationName}) {\n return `${driverName}@${version} (automationName '${automationName}')`;\n }\n\n /**\n * Given capabilities, find a matching driver within the config. Load its class and return it along with version and driver name.\n * @template {import('@appium/types').StringRecord} C\n * @param {C} caps\n * @returns {Promise}\n */\n async findMatchingDriver({automationName, platformName}) {\n if (!_.isString(platformName)) {\n throw new Error('You must include a platformName capability');\n }\n\n if (!_.isString(automationName)) {\n throw new Error('You must include an automationName capability');\n }\n\n log.info(\n `Attempting to find matching driver for automationName ` +\n `'${automationName}' and platformName '${platformName}'`\n );\n\n try {\n const {driverName, mainClass, version} = this._getDriverBySupport(\n automationName,\n platformName\n );\n log.info(`The '${driverName}' driver was installed and matched caps.`);\n log.info(`Will require it at ${this.getInstallPath(driverName)}`);\n const driver = await this.requireAsync(driverName);\n if (!driver) {\n throw new Error(\n `Driver '${driverName}' did not export a class with name '${mainClass}'. Contact the author of the driver!`\n );\n }\n return {driver, version, driverName};\n } catch (err) {\n const msg =\n `Could not find a driver for automationName ` +\n `'${automationName}' and platformName '${platformName}'. ` +\n `Have you installed a driver that supports those ` +\n `capabilities? Run 'appium driver list --installed' to see. ` +\n `(Lower-level error: ${err.message})`;\n throw new Error(msg);\n }\n }\n\n /**\n * Given an automation name and platform name, find a suitable driver and return its extension data.\n * @param {string} matchAutomationName\n * @param {string} matchPlatformName\n * @returns {ExtMetadata & import('appium/types').InternalMetadata & import('appium/types').CommonExtMetadata}\n */\n _getDriverBySupport(matchAutomationName, matchPlatformName) {\n const drivers = this.installedExtensions;\n for (const [driverName, driverData] of _.toPairs(drivers)) {\n const {automationName, platformNames} = driverData;\n const aNameMatches = automationName.toLowerCase() === matchAutomationName.toLowerCase();\n const pNameMatches = _.includes(\n platformNames.map(_.toLower),\n matchPlatformName.toLowerCase()\n );\n\n if (aNameMatches && pNameMatches) {\n return {driverName, ...driverData};\n }\n\n if (aNameMatches) {\n throw new Error(\n `Driver '${driverName}' supports automationName ` +\n `'${automationName}', but Appium could not find ` +\n `support for platformName '${matchPlatformName}'. Supported ` +\n `platformNames are: ` +\n JSON.stringify(platformNames)\n );\n }\n }\n\n throw new Error(`Could not find installed driver to support given caps`);\n }\n}\n\n/**\n * @template {ExtensionType} T\n * @typedef {import('appium/types').ExtMetadata} ExtMetadata\n */\n\n/**\n * @template {ExtensionType} T\n * @typedef {import('appium/types').ExtManifest} ExtManifest\n */\n\n/**\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n * @typedef {import('appium/types').ManifestData} ManifestData\n * @typedef {import('@appium/types').DriverType} DriverType\n * @typedef {import('./manifest').Manifest} Manifest\n */\n\n/**\n * @template {ExtensionType} T\n * @typedef {import('appium/types').ExtRecord} ExtRecord\n */\n\n/**\n * @template {ExtensionType} T\n * @typedef {import('appium/types').ExtName} ExtName\n */\n\n/**\n * Return value of {@linkcode DriverConfig.findMatchingDriver}\n * @typedef MatchedDriver\n * @property {import('@appium/types').DriverClass} driver\n * @property {string} version\n * @property {string} driverName\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/extension/extension-config.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {util, fs, system} from '@appium/support';\nimport B from 'bluebird';\nimport _ from 'lodash';\nimport path from 'node:path';\nimport resolveFrom from 'resolve-from';\nimport {satisfies} from 'semver';\nimport {commandClasses} from '../cli/extension';\nimport {APPIUM_VER} from '../config';\nimport log from '../logger';\nimport {\n ALLOWED_SCHEMA_EXTENSIONS,\n isAllowedSchemaFileExtension,\n registerSchema,\n} from '../schema/schema';\nimport { pathToFileURL } from 'node:url';\n\nconst DEFAULT_ENTRY_POINT = 'index.js';\n/**\n * \"npm\" install type\n * Used when extension was installed by npm package name\n * @remarks _All_ extensions are installed _by_ `npm`, but only this one means the package name was\n * used to specify it\n */\nexport const INSTALL_TYPE_NPM = 'npm';\n/**\n * \"local\" install type\n * Used when extension was installed from a local path\n */\nexport const INSTALL_TYPE_LOCAL = 'local';\n/**\n * \"github\" install type\n * Used when extension was installed via GitHub URL\n */\nexport const INSTALL_TYPE_GITHUB = 'github';\n/**\n * \"git\" install type\n * Used when extensions was installed via Git URL\n */\nexport const INSTALL_TYPE_GIT = 'git';\n/**\n * \"dev\" install type\n * Used when automatically detected as a working copy\n */\nexport const INSTALL_TYPE_DEV = 'dev';\n\n/** @type {Set} */\nexport const INSTALL_TYPES = new Set([\n INSTALL_TYPE_GIT,\n INSTALL_TYPE_GITHUB,\n INSTALL_TYPE_LOCAL,\n INSTALL_TYPE_NPM,\n INSTALL_TYPE_DEV,\n]);\n\n/**\n * This class is abstract. It should not be instantiated directly.\n *\n * Subclasses should provide the generic parameter to implement.\n * @template {ExtensionType} ExtType\n */\nexport class ExtensionConfig {\n /**\n * The type of extension this class is responsible for.\n * @type {ExtType}\n */\n extensionType;\n\n /**\n * Manifest data for the extensions of this type.\n *\n * This data should _not_ be written to by anything but {@linkcode Manifest}.\n * @type {Readonly>}\n */\n installedExtensions;\n\n /** @type {import('@appium/types').AppiumLogger} */\n log;\n\n /** @type {Manifest} */\n manifest;\n\n /**\n * @type {import('../cli/extension-command').ExtensionList|undefined}\n */\n #listDataCache;\n\n /**\n * @protected\n * @param {ExtType} extensionType - Type of extension\n * @param {Manifest} manifest - `Manifest` instance\n */\n constructor(extensionType, manifest) {\n this.extensionType = extensionType;\n this.installedExtensions = manifest.getExtensionData(extensionType);\n this.manifest = manifest;\n }\n\n get manifestPath() {\n return this.manifest.manifestPath;\n }\n\n get appiumHome() {\n return this.manifest.appiumHome;\n }\n\n /**\n * Returns a list of errors for a given extension.\n *\n * @param {ExtName} extName\n * @param {ExtManifest} extManifest\n * @returns {ExtManifestProblem[]}\n */\n getProblems(extName, extManifest) {\n return [\n ...this.getGenericConfigProblems(extManifest, extName),\n ...this.getConfigProblems(extManifest, extName),\n ...this.getSchemaProblems(extManifest, extName),\n ];\n }\n\n /**\n * Returns a list of warnings for a given extension.\n *\n * @param {ExtName} extName\n * @param {ExtManifest} extManifest\n * @returns {Promise}\n */\n async getWarnings(extName, extManifest) {\n const [genericConfigWarnings, configWarnings] = await B.all([\n this.getGenericConfigWarnings(extManifest, extName),\n this.getConfigWarnings(extManifest, extName),\n ]);\n\n return [...genericConfigWarnings, ...configWarnings];\n }\n\n /**\n * Returns a list of extension-type-specific issues. To be implemented by subclasses.\n * @abstract\n * @param {ExtManifest} extManifest\n * @param {ExtName} extName\n * @returns {Promise}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async getConfigWarnings(extManifest, extName) {\n return [];\n }\n\n /**\n *\n * @param {Map,ExtManifestProblem[]>} [errorMap]\n * @param {Map,string[]>} [warningMap]\n */\n getValidationResultSummaries(errorMap = new Map(), warningMap = new Map()) {\n /**\n * Array of computed strings\n * @type {string[]}\n */\n const errorSummaries = [];\n for (const [extName, problems] of errorMap.entries()) {\n if (_.isEmpty(problems)) {\n continue;\n }\n // remove this extension from the list since it's not valid\n errorSummaries.push(\n `${this.extensionType} \"${extName}\" had ${util.pluralize(\n 'error',\n problems.length\n )} and will not be available:`\n );\n for (const problem of problems) {\n errorSummaries.push(\n ` - ${problem.err} (Actual value: ` + `${JSON.stringify(problem.val)})`\n );\n }\n }\n /** @type {string[]} */\n const warningSummaries = [];\n for (const [extName, warnings] of warningMap.entries()) {\n if (_.isEmpty(warnings)) {\n continue;\n }\n const extTypeText = _.capitalize(this.extensionType);\n const problemEnumerationText = util.pluralize('potential problem', warnings.length, true);\n warningSummaries.push(`${extTypeText} \"${extName}\" has ${problemEnumerationText}: `);\n for (const warning of warnings) {\n warningSummaries.push(` - ${warning}`);\n }\n }\n\n return {errorSummaries, warningSummaries};\n }\n\n /**\n * Checks extensions for problems. To be called by subclasses' `validate` method.\n *\n * Errors and warnings will be displayed to the user.\n *\n * This method mutates `exts`.\n *\n * @protected\n * @param {ExtRecord} exts - Lookup of extension names to {@linkcode ExtManifest} objects\n * @returns {Promise>} The same lookup, but picking only error-free extensions\n */\n async _validate(exts) {\n /**\n * Lookup of extension names to {@linkcode ExtManifestProblem ExtManifestProblems}\n * @type {Map,ExtManifestProblem[]>}\n */\n const errorMap = new Map();\n /**\n * Lookup of extension names to warnings.\n * @type {Map,string[]>}\n */\n const warningMap = new Map();\n\n for (const [extName, extManifest] of _.toPairs(exts)) {\n const [errors, warnings] = await B.all([\n this.getProblems(extName, extManifest),\n this.getWarnings(extName, extManifest),\n ]);\n if (errors.length) {\n delete exts[extName];\n }\n errorMap.set(extName, errors);\n warningMap.set(extName, warnings);\n }\n\n const {errorSummaries, warningSummaries} = this.getValidationResultSummaries(\n errorMap,\n warningMap\n );\n\n if (!_.isEmpty(errorSummaries)) {\n log.error(\n `Appium encountered ${util.pluralize('error', errorMap.size, true)} while validating ${\n this.extensionType\n }s found in manifest ${this.manifestPath}`\n );\n for (const summary of errorSummaries) {\n log.error(summary);\n }\n } else if (!_.isEmpty(warningSummaries)) {\n // only display warnings if there are no errors!\n log.warn(\n `Appium encountered ${util.pluralize(\n 'warning',\n warningMap.size,\n true\n )} while validating ${this.extensionType}s found in manifest ${this.manifestPath}`\n );\n for (const summary of warningSummaries) {\n log.warn(summary);\n }\n }\n return exts;\n }\n\n /**\n * Retrieves listing data for extensions via command class.\n *\n * This is an expensive operation, so the result is cached. Currently, there is no\n * use case for invalidating the cache.\n * @protected\n * @returns {Promise>}\n */\n async getListData() {\n if (this.#listDataCache) {\n return this.#listDataCache;\n }\n const CommandClass = /** @type {ExtCommand} */ (commandClasses[this.extensionType]);\n const cmd = new CommandClass({config: this, json: true});\n const listData = await cmd.list({showInstalled: true, showUpdates: true});\n this.#listDataCache = listData;\n return listData;\n }\n\n /**\n * Returns a list of warnings for a particular extension.\n *\n * By definition, a non-empty list of warnings does _not_ imply the extension cannot be loaded,\n * but it may not work as expected or otherwise throw an exception at runtime.\n *\n * @param {ExtManifest} extManifest\n * @param {ExtName} extName\n * @returns {Promise}\n */\n async getGenericConfigWarnings(extManifest, extName) {\n const {appiumVersion, installSpec, installType, pkgName} = extManifest;\n const warnings = [];\n\n const invalidFields = [];\n if (!_.isString(installSpec)) {\n invalidFields.push('installSpec');\n }\n\n if (!INSTALL_TYPES.has(installType)) {\n invalidFields.push('installType');\n }\n\n const extTypeText = _.capitalize(this.extensionType);\n\n if (invalidFields.length) {\n const invalidFieldsEnumerationText = util.pluralize(\n 'invalid or missing field',\n invalidFields.length,\n true\n );\n const invalidFieldsText = invalidFields.map((field) => `\"${field}\"`).join(', ');\n\n warnings.push(\n `${extTypeText} \"${extName}\" (package \\`${pkgName}\\`) has ${invalidFieldsEnumerationText} (${invalidFieldsText}) in \\`extensions.yaml\\`; ` +\n `this may cause upgrades done via the \\`appium\\` CLI tool to fail. Please reinstall with \\`appium ${this.extensionType} uninstall ` +\n `${extName}\\` and \\`appium ${this.extensionType} install ${extName}\\` to attempt a fix.`\n );\n }\n\n /**\n * Helps concatenate warning messages related to peer dependencies\n * @param {string} reason\n * @returns string\n */\n const createPeerWarning = (reason) =>\n `${extTypeText} \"${extName}\" (package \\`${pkgName}\\`) may be incompatible with the current version of Appium (v${APPIUM_VER}) due to ${reason}`;\n\n if (_.isString(appiumVersion) && !satisfies(APPIUM_VER, appiumVersion)) {\n const listData = await this.getListData();\n const extListData =\n /** @type {import('../cli/extension-command').ExtensionListData} */ (\n listData[extName]\n );\n if (extListData?.installed) {\n const {updateVersion, upToDate} = extListData;\n if (!upToDate && updateVersion) {\n warnings.push(\n createPeerWarning(\n `its peer dependency on Appium ${appiumVersion}. Try to upgrade \\`${pkgName}\\` to v${updateVersion} or newer.`\n )\n );\n } else {\n warnings.push(\n createPeerWarning(\n `its peer dependency on Appium ${appiumVersion}. Please install a compatible version of the ${_.toLower(extTypeText)}.`\n )\n );\n }\n }\n } else if (!_.isString(appiumVersion)) {\n const listData = await this.getListData();\n const extListData =\n /** @type {import('../cli/extension-command').InstalledExtensionListData} */ (\n listData[extName]\n );\n if (!extListData?.upToDate && extListData?.updateVersion) {\n warnings.push(\n createPeerWarning(\n `an invalid or missing peer dependency on Appium. A newer version of \\`${pkgName}\\` is available; ` +\n `please attempt to upgrade \"${extName}\" to v${extListData.updateVersion} or newer.`\n )\n );\n } else {\n warnings.push(\n createPeerWarning(\n `an invalid or missing peer dependency on Appium. ` +\n `Please ask the developer of \\`${pkgName}\\` to add a peer dependency on \\`^appium@${APPIUM_VER}\\`.`\n )\n );\n }\n }\n return warnings;\n }\n /**\n * Returns list of unrecoverable errors (if any) for the given extension _if_ it has a `schema` property.\n *\n * @param {ExtManifest} extManifest - Extension data (from manifest)\n * @param {ExtName} extName - Extension name (from manifest)\n * @returns {ExtManifestProblem[]}\n */\n getSchemaProblems(extManifest, extName) {\n /** @type {ExtManifestProblem[]} */\n const problems = [];\n const {schema: argSchemaPath} = extManifest;\n if (ExtensionConfig.extDataHasSchema(extManifest)) {\n if (_.isString(argSchemaPath)) {\n if (isAllowedSchemaFileExtension(argSchemaPath)) {\n try {\n this.readExtensionSchema(extName, extManifest);\n } catch (err) {\n problems.push({\n err: `Unable to register schema at path ${argSchemaPath}; ${err.message}`,\n val: argSchemaPath,\n });\n }\n } else {\n problems.push({\n err: `Schema file has unsupported extension. Allowed: ${[\n ...ALLOWED_SCHEMA_EXTENSIONS,\n ].join(', ')}`,\n val: argSchemaPath,\n });\n }\n } else if (_.isPlainObject(argSchemaPath)) {\n try {\n this.readExtensionSchema(extName, extManifest);\n } catch (err) {\n problems.push({\n err: `Unable to register embedded schema; ${err.message}`,\n val: argSchemaPath,\n });\n }\n } else {\n problems.push({\n err: 'Incorrectly formatted schema field; must be a path to a schema file or a schema object.',\n val: argSchemaPath,\n });\n }\n }\n return problems;\n }\n\n /**\n * Return a list of generic unrecoverable errors for the given extension\n * @param {ExtManifest} extManifest - Extension data (from manifest)\n * @param {ExtName} extName - Extension name (from manifest)\n * @returns {ExtManifestProblem[]}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getGenericConfigProblems(extManifest, extName) {\n const {version, pkgName, mainClass} = extManifest;\n const problems = [];\n\n if (!_.isString(version)) {\n problems.push({\n err: `Invalid or missing \\`version\\` field in my \\`package.json\\` and/or \\`extensions.yaml\\` (must be a string)`,\n val: version,\n });\n }\n\n if (!_.isString(pkgName)) {\n problems.push({\n err: `Invalid or missing \\`name\\` field in my \\`package.json\\` and/or \\`extensions.yaml\\` (must be a string)`,\n val: pkgName,\n });\n }\n\n if (!_.isString(mainClass)) {\n problems.push({\n err: `Invalid or missing \\`appium.mainClass\\` field in my \\`package.json\\` and/or \\`mainClass\\` field in \\`extensions.yaml\\` (must be a string)`,\n val: mainClass,\n });\n }\n\n return problems;\n }\n\n /**\n * @abstract\n * @param {ExtManifest} extManifest\n * @param {ExtName} extName\n * @returns {ExtManifestProblem[]}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getConfigProblems(extManifest, extName) {\n // should override this method if special validation is necessary for this extension type\n return [];\n }\n\n /**\n * @param {string} extName\n * @param {ExtManifest} extManifest\n * @param {ExtensionConfigMutationOpts} opts\n * @returns {Promise}\n */\n async addExtension(extName, extManifest, {write = true} = {}) {\n this.manifest.setExtension(this.extensionType, extName, extManifest);\n if (write) {\n await this.manifest.write();\n }\n }\n\n /**\n * @param {ExtName} extName\n * @param {ExtManifest} extManifest\n * @param {ExtensionConfigMutationOpts} opts\n * @returns {Promise}\n */\n async updateExtension(extName, extManifest, {write = true} = {}) {\n this.manifest.setExtension(this.extensionType, extName, {\n ...this.installedExtensions[extName],\n ...extManifest,\n });\n if (write) {\n await this.manifest.write();\n }\n }\n\n /**\n * Remove an extension from the list of installed extensions, and optionally avoid a write to the manifest file.\n *\n * @param {ExtName} extName\n * @param {ExtensionConfigMutationOpts} opts\n * @returns {Promise}\n */\n async removeExtension(extName, {write = true} = {}) {\n this.manifest.deleteExtension(this.extensionType, extName);\n if (write) {\n await this.manifest.write();\n }\n }\n\n /**\n * @param {ExtName[]} [activeNames]\n * @returns {void}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n print(activeNames) {\n if (_.isEmpty(this.installedExtensions)) {\n log.info(\n `No ${this.extensionType}s have been installed in ${this.appiumHome}. Use the \"appium ${this.extensionType}\" ` +\n 'command to install the one(s) you want to use.'\n );\n return;\n }\n\n log.info(`Available ${this.extensionType}s:`);\n for (const [extName, extManifest] of /** @type {[string, ExtManifest][]} */ (\n _.toPairs(this.installedExtensions)\n )) {\n log.info(` - ${this.extensionDesc(extName, extManifest)}`);\n }\n }\n\n /**\n * Returns a string describing the extension. Subclasses must implement.\n * @param {ExtName} extName - Extension name\n * @param {ExtManifest} extManifest - Extension data\n * @returns {string}\n * @abstract\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n extensionDesc(extName, extManifest) {\n throw new Error('This must be implemented in a subclass');\n }\n\n /**\n * Returns--with reasonable accuracy--the path on disk to the extension.\n *\n * If `installPath` is present in the manifest, then it is used; otherwise we just guess.\n * @param {keyof typeof this.installedExtensions} extName\n * @returns {string}\n */\n getInstallPath(extName) {\n return (\n this.installedExtensions[extName]?.installPath ??\n path.join(this.appiumHome, 'node_modules', this.installedExtensions[extName].pkgName)\n );\n }\n\n /**\n *\n * @param {ExtName} extName\n * @returns {Promise<[string, string]>}\n */\n async _resolveExtension(extName) {\n const {mainClass} = this.installedExtensions[extName];\n const moduleRoot = this.getInstallPath(extName);\n const packageJsonPath = path.join(moduleRoot, 'package.json');\n let extensionManifest;\n try {\n extensionManifest = JSON.parse(await fs.readFile(packageJsonPath, 'utf8'));\n } catch (e) {\n throw new ReferenceError(\n `Could not read the ${this.extensionType} manifest at ${packageJsonPath}: ${e.message}`\n );\n }\n /** @type {string | undefined} */\n let entryPointRelativePath;\n try {\n if (extensionManifest.type === 'module' && extensionManifest.exports) {\n entryPointRelativePath = resolveEsmEntryPoint(extensionManifest.exports);\n }\n entryPointRelativePath = entryPointRelativePath ?? extensionManifest.main ?? DEFAULT_ENTRY_POINT;\n } catch (e) {\n throw new ReferenceError(\n `Could not find the ${this.extensionType} installed at ${moduleRoot}: ${e.message}`\n );\n }\n const entryPointFullPath = path.resolve(moduleRoot, /** @type {string} */ (entryPointRelativePath));\n if (!await fs.exists(entryPointFullPath)) {\n throw new ReferenceError(\n `Cannot find a valid ${this.extensionType} main entry point in '${packageJsonPath}'. ` +\n `Assumed entry point: '${entryPointFullPath}'`\n );\n }\n // note: this will only reload the entry point\n if (process.env.APPIUM_RELOAD_EXTENSIONS && require.cache[entryPointFullPath]) {\n log.debug(`Removing ${entryPointFullPath} from require cache`);\n delete require.cache[entryPointFullPath];\n }\n return [entryPointFullPath, mainClass];\n }\n\n /**\n * Loads extension asynchronously and returns its main class (constructor)\n *\n * @param {ExtName} extName\n * @returns {Promise>}\n */\n async requireAsync(extName) {\n const [reqPath, mainClass] = await this._resolveExtension(extName);\n log.debug(`Requiring ${this.extensionType} at ${reqPath}`);\n // https://github.com/nodejs/node/issues/31710\n const importPath = system.isWindows() ? pathToFileURL(reqPath).href : reqPath;\n const MainClass = (await import(importPath))[mainClass];\n if (!MainClass) {\n throw new ReferenceError(\n `Could not find a class named \"${mainClass}\" exported by ${this.extensionType} \"${extName}\"`\n );\n }\n return MainClass;\n }\n\n /**\n * @param {string} extName\n * @returns {boolean}\n */\n isInstalled(extName) {\n return extName in this.installedExtensions;\n }\n\n /**\n * Intended to be called by corresponding instance methods of subclass.\n * @private\n * @template {ExtensionType} ExtType\n * @param {string} appiumHome\n * @param {ExtType} extType\n * @param {ExtName} extName - Extension name (unique to its type)\n * @param {ExtManifestWithSchema} extManifest - Extension config\n * @returns {import('ajv').SchemaObject|undefined}\n */\n static _readExtensionSchema(appiumHome, extType, extName, extManifest) {\n const {pkgName, schema: argSchemaPath} = extManifest;\n if (!argSchemaPath) {\n throw new TypeError(\n `No \\`schema\\` property found in config for ${extType} ${pkgName} -- why is this function being called?`\n );\n }\n let moduleObject;\n if (_.isString(argSchemaPath)) {\n const schemaPath = resolveFrom(appiumHome, path.join(pkgName, argSchemaPath));\n moduleObject = require(schemaPath);\n } else {\n moduleObject = argSchemaPath;\n }\n // this sucks. default exports should be destroyed\n const schema = moduleObject.__esModule ? moduleObject.default : moduleObject;\n registerSchema(extType, extName, schema);\n return schema;\n }\n\n /**\n * Returns `true` if a specific {@link ExtManifest} object has a `schema` prop.\n * The {@link ExtManifest} object becomes a {@link ExtManifestWithSchema} object.\n * @template {ExtensionType} ExtType\n * @param {ExtManifest} extManifest\n * @returns {extManifest is ExtManifestWithSchema}\n */\n static extDataHasSchema(extManifest) {\n return _.isString(extManifest?.schema) || _.isObject(extManifest?.schema);\n }\n\n /**\n * If an extension provides a schema, this will load the schema and attempt to\n * register it with the schema registrar.\n * @param {ExtName} extName - Name of extension\n * @param {ExtManifestWithSchema} extManifest - Extension data\n * @returns {import('ajv').SchemaObject|undefined}\n */\n readExtensionSchema(extName, extManifest) {\n return ExtensionConfig._readExtensionSchema(\n this.appiumHome,\n this.extensionType,\n extName,\n extManifest\n );\n }\n}\n\n/**\n * https://nodejs.org/api/packages.html#package-entry-points\n *\n * @param {any} exportsValue\n * @returns {string | undefined}\n */\nexport function resolveEsmEntryPoint(exportsValue) {\n if (_.isString(exportsValue) && exportsValue) {\n return exportsValue;\n }\n if (!_.isPlainObject(exportsValue)) {\n return;\n }\n\n for (const key of ['.', 'import']) {\n if (exportsValue[key]) {\n return resolveEsmEntryPoint(exportsValue[key]);\n }\n }\n}\n\n/**\n * An issue with the {@linkcode ExtManifest} for a particular extension.\n *\n * The existance of such an object implies that the extension cannot be loaded.\n * @typedef ExtManifestProblem\n * @property {string} err - Error message\n * @property {any} val - Associated value\n */\n\n/**\n * An optional logging function provided to an {@link ExtensionConfig} subclass.\n * @callback ExtensionLogFn\n * @param {...any} args\n * @returns {void}\n */\n\n/**\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n * @typedef {import('./manifest').Manifest} Manifest\n * @typedef {import('appium/types').InstallType} InstallType\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtManifest} ExtManifest\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {ExtManifest & {schema: NonNullable['schema']>}} ExtManifestWithSchema\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtName} ExtName\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtClass} ExtClass\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtRecord} ExtRecord\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('../cli/extension').ExtCommand} ExtCommand\n */\n\n/**\n * Options for various methods in {@link ExtensionConfig}\n * @typedef ExtensionConfigMutationOpts\n * @property {boolean} [write=true] Whether or not to write the manifest to disk after a mutation operation\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/extension/index.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\nimport {USE_ALL_PLUGINS} from '../constants';\nimport log from '../logger';\nimport {DriverConfig} from './driver-config';\nimport {Manifest} from './manifest';\nimport {timing} from '@appium/support';\nimport {PluginConfig} from './plugin-config';\nimport B from 'bluebird';\n\n/**\n * Loads extensions and creates `ExtensionConfig` instances.\n *\n * - Reads the manifest file, creating if necessary\n * - Using the parsed extension data, creates/gets the `ExtensionConfig` subclass instances\n * - Returns these instances\n *\n * If `appiumHome` is needed, use `resolveAppiumHome` from the `env` module in `@appium/support`.\n * @param {string} appiumHome\n * @returns {Promise}\n */\nexport async function loadExtensions(appiumHome) {\n const manifest = Manifest.getInstance(appiumHome);\n await manifest.read();\n const driverConfig = DriverConfig.getInstance(manifest) ?? DriverConfig.create(manifest);\n const pluginConfig = PluginConfig.getInstance(manifest) ?? PluginConfig.create(manifest);\n\n await B.all([driverConfig.validate(), pluginConfig.validate()]);\n return {driverConfig, pluginConfig};\n}\n\n/**\n * @template {'driver'|'plugin'} TExtType\n * @param {TExtType} extType\n * @param {import('./extension-config').ExtensionConfig} config\n * @param {string[]} extNames\n * @param {number} asyncImportChunkSize\n * @returns {Promise<[TExtType extends 'driver' ? DriverClass : PluginClass, string][]>}\n */\nasync function importExtensions(extType, config, extNames, asyncImportChunkSize) {\n /** @type {B[]} */\n const allPromises = [];\n /** @type {B[]} */\n const activePromisesChunk = [];\n for (const extName of extNames) {\n _.remove(activePromisesChunk, (p) => p.isFulfilled());\n if (activePromisesChunk.length >= asyncImportChunkSize) {\n await B.any(activePromisesChunk);\n }\n const promise = B.resolve((async () => {\n log.info(`Attempting to load ${extType} ${extName}...`);\n const timer = new timing.Timer().start();\n try {\n const extClass = await config.requireAsync(extName);\n log.debug(`${extClass.name} has been successfully loaded in ${timer.getDuration().asSeconds.toFixed(3)}s`);\n return extClass;\n } catch (err) {\n log.error(\n `Could not load ${extType} '${extName}', so it will not be available. Error ` +\n `in loading the ${extType} was: ${err.message}`\n );\n log.debug(err.stack);\n }\n })());\n activePromisesChunk.push(promise);\n allPromises.push(promise);\n }\n return /** @type {[TExtType extends 'driver' ? DriverClass : PluginClass, string][]} */ (\n _.zip(await B.all(allPromises), extNames).filter(([extClass,]) => Boolean(extClass))\n );\n}\n\n/**\n * Find any plugin name which has been installed, and which has been requested for activation by\n * using the --use-plugins flag, and turn each one into its class, so we can send them as objects\n * to the server init. We also want to send/assign them to the umbrella driver so it can use them\n * to wrap command execution\n *\n * @param {import('./plugin-config').PluginConfig} pluginConfig - a plugin extension config\n * @param {number} maxParallelImports the maximum amount of plugins to import in parallel\n * @param {string[]} usePlugins\n * @returns {Promise} Mapping of PluginClass to name\n */\nexport async function getActivePlugins(pluginConfig, maxParallelImports, usePlugins = []) {\n if (_.isEmpty(usePlugins)) {\n return new Map();\n }\n\n /** @type {string[]} */\n let filteredPluginNames = [];\n if (usePlugins.length === 1 && usePlugins[0] === USE_ALL_PLUGINS) {\n filteredPluginNames = _.keys(pluginConfig.installedExtensions);\n } else {\n // It is important to load plugins in the same order that was used while enumerating them\n for (const pluginName of usePlugins) {\n if (pluginName in pluginConfig.installedExtensions) {\n filteredPluginNames.push(pluginName);\n } else if (pluginName === USE_ALL_PLUGINS) {\n throw new Error(\n `The reserved plugin name '${pluginName}' cannot be combined with other names.`\n );\n } else {\n const suffix = _.isEmpty(pluginConfig.installedExtensions)\n ? `You don't have any plugins installed yet.`\n : `Only the following ${_.size(pluginConfig.installedExtensions) === 1 ? `plugin is` : `plugins are`} ` +\n `available: ${_.keys(pluginConfig.installedExtensions)}`;\n throw new Error(\n `Could not load the plugin '${pluginName}' because it is not installed. ${suffix}`\n );\n }\n }\n }\n return new Map(await importExtensions('plugin', pluginConfig, filteredPluginNames, maxParallelImports));\n}\n\n/**\n * Find any driver name which has been installed, and turn each one into its class, so we can send\n * them as objects to the server init in case they need to add methods/routes or update the server.\n * If the --drivers flag was given, this method only loads the given drivers.\n *\n * @param {import('./driver-config').DriverConfig} driverConfig - a driver extension config\n * @param {number} maxParallelImports the maximum amount of plugins to import in parallel\n * @param {string[]} [useDrivers] - optional list of drivers to load\n * @returns {Promise}\n */\nexport async function getActiveDrivers(driverConfig, maxParallelImports, useDrivers = []) {\n /** @type {string[]} */\n let filteredDriverNames = [];\n if (_.isEmpty(useDrivers)) {\n // load all drivers if none are requested\n filteredDriverNames = _.keys(driverConfig.installedExtensions);\n } else {\n // Load drivers in the same order that was used while enumerating them\n for (const driverName of useDrivers) {\n if (driverName in driverConfig.installedExtensions) {\n filteredDriverNames.push(driverName);\n } else {\n const suffix = _.isEmpty(driverConfig.installedExtensions)\n ? `You don't have any drivers installed yet.`\n : `Only the following ${_.size(driverConfig.installedExtensions) === 1 ? `driver is` : `drivers are`} ` +\n `available: ${_.keys(driverConfig.installedExtensions)}`;\n throw new Error(\n `Could not load the driver '${driverName}' because it is not installed. ${suffix}`\n );\n }\n }\n }\n return new Map(await importExtensions('driver', driverConfig, filteredDriverNames, maxParallelImports));\n}\n\n/**\n * A mapping of {@linkcode PluginClass} classes to their names.\n * @typedef {Map} PluginNameMap\n */\n\n/**\n * A mapping of {@linkcode DriverClass} classes to their names.\n * @typedef {Map} DriverNameMap\n */\n\n/**\n * @typedef {import('@appium/types').PluginClass} PluginClass\n * @typedef {import('@appium/types').DriverClass} DriverClass\n */\n\n/**\n * @typedef ExtensionConfigs\n * @property {import('./driver-config').DriverConfig} driverConfig\n * @property {import('./plugin-config').PluginConfig} pluginConfig\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/extension/manifest-migrations.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {CURRENT_SCHEMA_REV, DRIVER_TYPE, PLUGIN_TYPE} from '../constants';\nimport log from '../logger';\n\n/**\n * This contains logic to migrate old versions of `extensions.yaml` to new versions.\n *\n * @module\n */\n\n/**\n * Constant for v3 of the schema rev.\n */\nconst SCHEMA_REV_3 = 3;\n\n/**\n * Constant for v4 of the schema rev.\n */\nconst SCHEMA_REV_4 = 4;\n\n/**\n * Collection of functions to migrate from one version to another.\n *\n * These functions _should not actually perform the migration_; rather, they\n * should return `true` if the migration should be performed. The migration\n * itself will happen within {@linkcode Manifest.syncWithInstalledExtensions}; the extensions\n * will be checked and the manifest file updated per the state of the filesystem.\n *\n * @type { {[P in keyof ManifestDataVersions]?: Migration} }\n */\nconst Migrations = {\n /**\n * If `installPath` is missing from the `ExtManifest` for any extension, return `true`.\n *\n * We cannot easily determine the path of any given extension here, but returning `true`\n * will cause the `Manifest` to sync with the filesystem, which will populate the missing field.\n *\n * @type {Migration}\n */\n [SCHEMA_REV_3]: (manifest) => {\n /** @type {Array|ExtManifest>} */\n const allExtData = [\n ...Object.values(manifest.getExtensionData(DRIVER_TYPE)),\n ...Object.values(manifest.getExtensionData(PLUGIN_TYPE)),\n ];\n return allExtData.some((metadata) => !('installPath' in metadata));\n },\n /**\n * Updates installed extensions to use `InstallType` of `dev` if appropriate.\n *\n * Previously, these types of extensions (automatically discovered) would use the default `InstallType` of `npm`, so we need\n * to refresh any with this install type.\n *\n * This should only happen once; we do not want to re-check everything with `npm` install type\n * every time.\n * @type {Migration}\n */\n [SCHEMA_REV_4]: (manifest) => {\n if (manifest.schemaRev < SCHEMA_REV_4) {\n const allExtData = [\n ...Object.values(manifest.getExtensionData(DRIVER_TYPE)),\n ...Object.values(manifest.getExtensionData(PLUGIN_TYPE)),\n ];\n return allExtData.some((metadata) => metadata.installType === 'npm');\n }\n return false;\n },\n};\n\n/**\n * Set `schemaRev` to a specific version.\n *\n * This _does_ mutate `data` in-place, unlike functions in\n * {@linkcode Migrations}.\n *\n * Again, returning `true` means that the manifest should be--at\n * minimum--persisted to disk, since we changed it.\n * @param {Readonly} manifest\n * @param {keyof ManifestDataVersions} version\n * @returns {boolean} Whether the data was modified\n */\nfunction setSchemaRev(manifest, version) {\n if ((manifest.schemaRev ?? 0) < version) {\n manifest.setSchemaRev(version);\n return true;\n }\n return false;\n}\n\n/**\n * Applies a series of migration functions to a manifest to update its manifest schema version.\n *\n * `data` is modified in-place.\n *\n * @param {Readonly} manifest\n * @returns {Promise} If `true` existing packages should be synced from disk and the manifest should be persisted.\n */\nexport async function migrate(manifest) {\n let didChange = false;\n for await (const migration of Object.values(Migrations)) {\n didChange = (await migration(manifest)) || didChange;\n }\n didChange = setSchemaRev(manifest, CURRENT_SCHEMA_REV) || didChange;\n if (didChange) {\n // this is not _technically_ true, since we don't actually write the file here.\n log.debug(`Upgraded extension manifest to schema v${manifest.schemaRev}`);\n }\n\n return didChange;\n}\n\n/**\n * A migration function. It will return `true` if a change _should be made_.\n *\n * A migration function should not modify `schemaRev`, as this is done automatically.\n *\n * Note that at the time of writing, we're not able to determine the version of the _current_ manifest file if there is no `schemaRev` prop present (and we may not want to trust it anyway).\n * @callback Migration\n * @param {Readonly} manifest - The `Manifest` instance\n * @returns {boolean|Promise} If `true`, then something changed\n */\n\n/**\n * @typedef {import('appium/types').ManifestData} ManifestData\n * @typedef {import('@appium/types').DriverType} DriverType\n * @typedef {import('@appium/types').PluginType} PluginType\n * @typedef {import('appium/types').AnyManifestDataVersion} AnyManifestDataVersion\n * @typedef {import('appium/types').ManifestDataVersions} ManifestDataVersions\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n * @typedef {import('appium/types').ManifestV2.ManifestData} ManifestDataV2\n * @typedef {import('./manifest').Manifest} Manifest\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtManifest} ExtManifest\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/extension/manifest.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n/**\n * Module containing {@link Manifest} which handles reading & writing of extension config files.\n */\n\nimport B from 'bluebird';\nimport {env, fs} from '@appium/support';\nimport _ from 'lodash';\nimport path from 'node:path';\nimport * as YAML from 'yaml';\nimport {CURRENT_SCHEMA_REV, DRIVER_TYPE, PLUGIN_TYPE} from '../constants';\nimport {INSTALL_TYPE_NPM, INSTALL_TYPE_DEV} from './extension-config';\nimport {packageDidChange} from './package-changed';\nimport {migrate} from './manifest-migrations';\n\n/**\n * The name of the prop (`drivers`) used in `extensions.yaml` for drivers.\n * @type {`${typeof DRIVER_TYPE}s`}\n */\nconst CONFIG_DATA_DRIVER_KEY = `${DRIVER_TYPE}s`;\n\n/**\n * The name of the prop (`plugins`) used in `extensions.yaml` for plugins.\n * @type {`${typeof PLUGIN_TYPE}s`}\n */\nconst CONFIG_DATA_PLUGIN_KEY = `${PLUGIN_TYPE}s`;\n\n/**\n * @type {Readonly}\n */\nconst INITIAL_MANIFEST_DATA = Object.freeze({\n [CONFIG_DATA_DRIVER_KEY]: Object.freeze({}),\n [CONFIG_DATA_PLUGIN_KEY]: Object.freeze({}),\n schemaRev: CURRENT_SCHEMA_REV,\n});\n\n/**\n * Given a `package.json` return `true` if it represents an Appium Extension (either a driver or plugin).\n *\n * _This is a type guard; not a validator._\n *\n * The `package.json` must have an `appium` property which is an object.\n * @param {any} value\n * @returns {value is ExtPackageJson}\n */\nfunction isExtension(value) {\n return (\n _.isPlainObject(value) &&\n _.isPlainObject(value.appium) &&\n _.isString(value.name) &&\n _.isString(value.version)\n );\n}\n\n/**\n * Given a `package.json`, return `true` if it represents an Appium Driver.\n *\n * _This is a type guard; not a validator._\n *\n * To be considered a driver, a `package.json` must have an `appium.driverName` field.\n *\n * Further validation of the `appium` property happens elsewhere.\n * @param {any} value - Value to test\n * @returns {value is ExtPackageJson}\n */\nfunction isDriver(value) {\n return isExtension(value) && 'driverName' in value.appium && _.isString(value.appium.driverName);\n}\n\n/**\n * Given a `package.json`, return `true` if it represents an Appium Plugin.\n *\n * _This is a type guard; not a validator._\n *\n * To be considered a plugin, a `package.json` must have an `appium.pluginName` field.\n *\n * Further validation of the `appium` property happens elsewhere.\n * @param {any} value - Value to test\n * @returns {value is ExtPackageJson}\n */\nfunction isPlugin(value) {\n return isExtension(value) && 'pluginName' in value.appium && _.isString(value.appium.pluginName);\n}\n\n/**\n * Handles reading & writing of extension config files.\n *\n * Only one instance of this class exists per value of `APPIUM_HOME`.\n */\nexport class Manifest {\n /**\n * The entire contents of a parsed YAML extension config file.\n *\n * Contains proxies for automatic persistence on disk\n * @type {ManifestData}\n */\n #data;\n\n /**\n * Path to `APPIUM_HOME`.\n * @type {Readonly}\n */\n #appiumHome;\n\n /**\n * Path to `extensions.yaml`\n * @type {string}\n * Not set until {@link Manifest.read} is called.\n */\n #manifestPath;\n\n /**\n * Helps avoid writing multiple times.\n *\n * If this is `undefined`, calling {@link Manifest.write} will cause it to be\n * set to a `Promise`. When the call to `write()` is complete, the `Promise`\n * will resolve and then this value will be set to `undefined`. Concurrent calls\n * made while this value is a `Promise` will return the `Promise` itself.\n * @type {Promise|undefined}\n */\n #writing;\n\n /**\n * Helps avoid reading multiple times.\n *\n * If this is `undefined`, calling {@link Manifest.read} will cause it to be\n * set to a `Promise`. When the call to `read()` is complete, the `Promise`\n * will resolve and then this value will be set to `undefined`. Concurrent calls\n * made while this value is a `Promise` will return the `Promise` itself.\n * @type {Promise|undefined}\n */\n #reading;\n\n /**\n * Sets internal data to a fresh clone of {@link INITIAL_MANIFEST_DATA}\n *\n * Use {@link Manifest.getInstance} instead.\n * @param {string} appiumHome\n * @private\n */\n constructor(appiumHome) {\n this.#appiumHome = appiumHome;\n this.#data = _.cloneDeep(INITIAL_MANIFEST_DATA);\n }\n\n /**\n * Returns a new or existing {@link Manifest} instance, based on the value of `appiumHome`.\n *\n * Maintains one instance per value of `appiumHome`.\n */\n static getInstance = _.memoize(\n /**\n * @param {string} appiumHome - Path to `APPIUM_HOME`\n * @returns {Manifest}\n */\n function _getInstance(appiumHome) {\n return new Manifest(appiumHome);\n }\n );\n\n /**\n * Searches `APPIUM_HOME` for installed extensions and adds them to the manifest.\n * @param {boolean} hasAppiumDependency - This affects whether or not the \"dev\" `InstallType` is used\n * @returns {Promise} `true` if any extensions were added, `false` otherwise.\n */\n async syncWithInstalledExtensions(hasAppiumDependency = false) {\n // this could be parallelized, but we can't use fs.walk as an async iterator\n let didChange = false;\n\n /**\n * Listener for the `match` event of a `glob` instance\n * @param {string} filepath - Path to a `package.json`\n * @param {boolean} [devType] - If `true`, this is an extension in \"dev mode\"\n * @returns {Promise}\n */\n const onMatch = async (filepath, devType = false) => {\n try {\n const pkg = JSON.parse(await fs.readFile(filepath, 'utf8'));\n if (isExtension(pkg)) {\n const installType = devType && hasAppiumDependency ? INSTALL_TYPE_DEV : INSTALL_TYPE_NPM;\n const changed = this.addExtensionFromPackage(pkg, filepath, installType);\n didChange = didChange || changed;\n }\n } catch {}\n };\n\n /**\n * A list of `Promise`s which read `package.json` files looking for Appium extensions.\n * @type {Promise[]}\n */\n const queue = [\n // look at `package.json` in `APPIUM_HOME` only.\n // this causes extensions in \"dev mode\" to be automatically found\n onMatch(path.join(this.#appiumHome, 'package.json'), true),\n ];\n\n // add dependencies to the queue\n const filepaths = await fs.glob('node_modules/{*,@*/*}/package.json', {\n cwd: this.#appiumHome,\n absolute: true,\n });\n for (const filepath of filepaths) {\n queue.push(onMatch(filepath));\n }\n\n // wait for everything to finish\n await B.all(queue);\n\n return didChange;\n }\n\n /**\n * Returns `true` if driver with name `name` is registered.\n * @param {string} name - Driver name\n * @returns {boolean}\n */\n hasDriver(name) {\n return Boolean(this.#data.drivers[name]);\n }\n\n /**\n * Returns `true` if plugin with name `name` is registered.\n * @param {string} name - Plugin name\n * @returns {boolean}\n */\n hasPlugin(name) {\n return Boolean(this.#data.plugins[name]);\n }\n\n /**\n * Given a path to a `package.json`, add it as either a driver or plugin to the manifest.\n *\n * @template {ExtensionType} ExtType\n * @param {ExtPackageJson} pkgJson\n * @param {string} pkgPath\n * @param {typeof INSTALL_TYPE_NPM | typeof INSTALL_TYPE_DEV} [installType]\n * @returns {boolean} - `true` if this method did anything.\n */\n addExtensionFromPackage(pkgJson, pkgPath, installType = INSTALL_TYPE_NPM) {\n const extensionPath = path.dirname(pkgPath);\n\n /**\n * @type {InternalMetadata}\n */\n const internal = {\n pkgName: /** @type {string} */ (pkgJson.name),\n version: /** @type {string} */ (pkgJson.version),\n appiumVersion: pkgJson.peerDependencies?.appium,\n installType,\n installSpec: `${pkgJson.name}@${pkgJson.version}`,\n installPath: extensionPath,\n };\n\n if (isDriver(pkgJson)) {\n const value = {\n ..._.omit(pkgJson.appium, 'driverName'),\n ...internal,\n };\n if (!_.isEqual(value, this.#data.drivers[pkgJson.appium.driverName])) {\n this.setExtension(\n /** @type {ExtType} */ (DRIVER_TYPE),\n pkgJson.appium.driverName,\n /** @type {ExtManifest} */ (value)\n );\n return true;\n }\n return false;\n } else if (isPlugin(pkgJson)) {\n const value = {\n ..._.omit(pkgJson.appium, 'pluginName'),\n ...internal,\n };\n if (!_.isEqual(value, this.#data.plugins[pkgJson.appium.pluginName])) {\n this.setExtension(\n /** @type {ExtType} */ (PLUGIN_TYPE),\n pkgJson.appium.pluginName,\n /** @type {ExtManifest} */ (value)\n );\n return true;\n }\n return false;\n } else {\n throw new TypeError(\n `The extension in ${extensionPath} is neither a valid ${DRIVER_TYPE} nor a valid ${PLUGIN_TYPE}.`\n );\n }\n }\n\n /**\n * Adds an extension to the manifest as was installed by the `appium` CLI. The\n * `extData`, `extType`, and `extName` have already been determined.\n *\n * See {@link Manifest.addExtensionFromPackage} for adding an extension from an on-disk package.\n * @template {ExtensionType} ExtType\n * @param {ExtType} extType - `driver` or `plugin`\n * @param {string} extName - Name of extension\n * @param {ExtManifest} extData - Extension metadata\n * @returns {ExtManifest} A clone of `extData`, potentially with a mutated `appiumVersion` field\n */\n setExtension(extType, extName, extData) {\n const data = _.cloneDeep(extData);\n this.#data[`${extType}s`][extName] = data;\n return data;\n }\n\n /**\n * Sets the schema revision\n * @param {keyof import('./manifest-migrations').ManifestDataVersions} rev\n */\n setSchemaRev(rev) {\n this.#data.schemaRev = rev;\n }\n\n /**\n * Remove an extension from the manifest.\n * @param {ExtensionType} extType\n * @param {string} extName\n */\n deleteExtension(extType, extName) {\n delete this.#data[`${extType}s`][extName];\n }\n\n /**\n * Returns the `APPIUM_HOME` path\n */\n get appiumHome() {\n return this.#appiumHome;\n }\n\n /**\n * Returns the path to the manifest file (`extensions.yaml`)\n */\n get manifestPath() {\n return this.#manifestPath;\n }\n\n /**\n * Returns the schema rev of this manifest\n */\n get schemaRev() {\n return this.#data.schemaRev;\n }\n\n /**\n * Returns extension data for a particular type.\n *\n * @template {ExtensionType} ExtType\n * @param {ExtType} extType\n * @returns {Readonly>}\n */\n getExtensionData(extType) {\n return this.#data[/** @type {string} */ (`${extType}s`)];\n }\n\n /**\n * Reads manifest from disk and _overwrites_ the internal data.\n *\n * If the manifest does not exist on disk, an\n * {@link INITIAL_MANIFEST_DATA \"empty\"} manifest file will be created, as\n * well as its directory if needed.\n *\n * This will also, if necessary:\n * 1. perform a migration of the manifest data\n * 2. sync the manifest with extensions on-disk (kind of like \"auto\n * discovery\")\n * 3. write the manifest to disk.\n *\n * Only one read operation can happen at a time.\n *\n * @returns {Promise} The data\n */\n async read() {\n if (this.#reading) {\n await this.#reading;\n return this.#data;\n }\n\n this.#reading = (async () => {\n /** @type {ManifestData} */\n let data;\n /**\n * This will be `true` if, after reading, we need to update the manifest data\n * and write it again to disk.\n */\n let shouldWrite = false;\n await this.#setManifestPath();\n try {\n const yaml = await fs.readFile(this.#manifestPath, 'utf8');\n data = YAML.parse(yaml);\n } catch (err) {\n if (err.code === 'ENOENT') {\n data = _.cloneDeep(INITIAL_MANIFEST_DATA);\n shouldWrite = true;\n } else if (this.#manifestPath) {\n throw new Error(\n `Appium had trouble loading the extension installation ` +\n `cache file (${this.#manifestPath}). It may be invalid YAML. Specific error: ${\n err.message\n }`\n );\n } else {\n throw new Error(\n `Appium encountered an unknown problem. Specific error: ${err.message}`\n );\n }\n }\n\n this.#data = data;\n\n /**\n * the only way `shouldWrite` is `true` is if we have a new file. a new\n * file will get the latest schema revision, so we can skip the migration.\n */\n if (!shouldWrite && (data.schemaRev ?? 0) < CURRENT_SCHEMA_REV) {\n shouldWrite = await migrate(this);\n }\n\n const hasAppiumDependency = await env.hasAppiumDependency(this.appiumHome);\n\n /**\n * we still may want to sync with installed extensions even if we have a\n * new file. right now this is limited to the following cases:\n * 1. we have a brand new manifest file\n * 2. we have performed a migration on a manifest file\n * 3. `appium` is a dependency within `package.json`, and `package.json`\n * has changed since last time we checked.\n *\n * It may also make sense to sync with the extensions in an arbitrary\n * `APPIUM_HOME`, but we don't do that here.\n */\n if (shouldWrite || (hasAppiumDependency && (await packageDidChange(this.appiumHome)))) {\n shouldWrite = (await this.syncWithInstalledExtensions(hasAppiumDependency)) || shouldWrite;\n }\n\n if (shouldWrite) {\n await this.write();\n }\n })();\n\n try {\n await this.#reading;\n return this.#data;\n } finally {\n this.#reading = undefined;\n }\n }\n\n /**\n * Ensures the internal manifest path is set.\n *\n * Creates the directory if necessary.\n * @returns {Promise}\n */\n async #setManifestPath() {\n if (!this.#manifestPath) {\n this.#manifestPath = await env.resolveManifestPath(this.#appiumHome);\n\n /* istanbul ignore if */\n if (path.relative(this.#appiumHome, this.#manifestPath).startsWith('.')) {\n throw new Error(\n `Mismatch between location of APPIUM_HOME and manifest file. APPIUM_HOME: ${\n this.appiumHome\n }, manifest file: ${this.#manifestPath}`\n );\n }\n }\n\n return this.#manifestPath;\n }\n\n /**\n * Writes the data if it need s writing.\n *\n * If the `schemaRev` prop needs updating, the file will be written.\n *\n * @todo If this becomes too much of a bottleneck, throttle it.\n * @returns {Promise} Whether the data was written\n */\n async write() {\n if (this.#writing) {\n return this.#writing;\n }\n this.#writing = (async () => {\n await this.#setManifestPath();\n try {\n await fs.mkdirp(path.dirname(this.#manifestPath));\n } catch (err) {\n throw new Error(\n `Appium could not create the directory for the manifest file: ${path.dirname(\n this.#manifestPath\n )}. Original error: ${err.message}`\n );\n }\n try {\n await fs.writeFile(this.#manifestPath, YAML.stringify(this.#data), 'utf8');\n return true;\n } catch (err) {\n throw new Error(\n `Appium could not write to manifest at ${this.#manifestPath} using APPIUM_HOME ${\n this.#appiumHome\n }. Please ensure it is writable. Original error: ${err.message}`\n );\n }\n })();\n try {\n return await this.#writing;\n } finally {\n this.#writing = undefined;\n }\n }\n}\n\n/**\n * Type of the string referring to a driver (typically as a key or type string)\n * @typedef {import('@appium/types').DriverType} DriverType\n */\n\n/**\n * Type of the string referring to a plugin (typically as a key or type string)\n * @typedef {import('@appium/types').PluginType} PluginType\n */\n\n/**\n * @typedef SyncWithInstalledExtensionsOpts\n * @property {number} [depthLimit] - Maximum depth to recurse into subdirectories\n */\n\n/**\n * @typedef {import('appium/types').ManifestData} ManifestData\n * @typedef {import('appium/types').InternalMetadata} InternalMetadata\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtPackageJson} ExtPackageJson\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtManifest} ExtManifest\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtRecord} ExtRecord\n */\n\n/**\n * Either `driver` or `plugin` rn\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/extension/package-changed.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {fs} from '@appium/support';\nimport {isPackageChanged} from 'package-changed';\nimport path from 'node:path';\nimport {PKG_HASHFILE_RELATIVE_PATH} from '../constants';\nimport log from '../logger';\n\n/**\n * Determines if extensions have changed, and updates a hash the `package.json` in `appiumHome` if so.\n *\n * If they have, we need to sync them with the `extensions.yaml` manifest.\n *\n * _Warning: this makes a blocking call to `writeFileSync`._\n * @param {string} appiumHome\n * @returns {Promise} `true` if `package.json` `appiumHome` changed\n */\nexport async function packageDidChange(appiumHome) {\n const hashFilename = path.join(appiumHome, PKG_HASHFILE_RELATIVE_PATH);\n\n // XXX: the types in `package-changed` seem to be wrong.\n\n /** @type {boolean} */\n let isChanged;\n /** @type {() => void} */\n let writeHash;\n /** @type {string} */\n let hash;\n /** @type {string|undefined} */\n let oldHash;\n\n // first mkdirp the target dir.\n const hashFilenameDir = path.dirname(hashFilename);\n log.debug(`Creating hash file directory: ${hashFilenameDir}`);\n try {\n await fs.mkdirp(hashFilenameDir);\n } catch (err) {\n throw new Error(\n `Appium could not create the directory for hash file: ${hashFilenameDir}. Original error: ${err.message}`\n );\n }\n\n try {\n ({isChanged, writeHash, oldHash, hash} = await isPackageChanged({\n cwd: appiumHome,\n hashFilename: PKG_HASHFILE_RELATIVE_PATH,\n }));\n } catch {\n return true;\n }\n\n if (isChanged) {\n try {\n writeHash();\n log.debug(\n `Updated hash of ${appiumHome}/package.json from: ${oldHash ?? '(none)'} to: ${hash}`\n );\n } catch (err) {\n throw new Error(\n `Appium could not write hash file: ${hashFilenameDir}. Original error: ${err.message}`\n );\n }\n }\n\n return isChanged;\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/extension/plugin-config.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\nimport {ExtensionConfig} from './extension-config';\nimport log from '../logger';\nimport {PLUGIN_TYPE} from '../constants';\n\n/**\n * @extends {ExtensionConfig}\n */\nexport class PluginConfig extends ExtensionConfig {\n /**\n * A mapping of {@link Manifest} instances to {@link PluginConfig} instances.\n *\n * `Manifest` and {@link ExtensionConfig} have a one-to-many relationship; each `Manifest` should be associated with a `DriverConfig` and a `PluginConfig`; no more, no less.\n *\n * This variable tracks the `Manifest`-to-`PluginConfig` portion.\n *\n * @type {WeakMap}\n * @private\n */\n static _instances = new WeakMap();\n\n /**\n * Call {@link PluginConfig.create} instead.\n *\n * Just calls the superclass' constructor with the correct extension type\n * @private\n * @param {Manifest} manifest - IO object\n */\n constructor(manifest) {\n super(PLUGIN_TYPE, manifest);\n }\n\n async validate() {\n return await super._validate(this.manifest.getExtensionData(PLUGIN_TYPE));\n }\n\n /**\n * Creates a new {@link PluginConfig} instance for a {@link Manifest} instance.\n *\n * @param {Manifest} manifest\n * @throws If `manifest` already associated with a `PluginConfig`\n * @returns {PluginConfig}\n */\n static create(manifest) {\n const instance = new PluginConfig(manifest);\n if (PluginConfig.getInstance(manifest)) {\n throw new Error(\n `Manifest with APPIUM_HOME ${manifest.appiumHome} already has a PluginConfig; use PluginConfig.getInstance() to retrieve it.`\n );\n }\n PluginConfig._instances.set(manifest, instance);\n return instance;\n }\n\n /**\n * Returns a PluginConfig associated with a Manifest\n * @param {Manifest} manifest\n * @returns {PluginConfig|undefined}\n */\n static getInstance(manifest) {\n return PluginConfig._instances.get(manifest);\n }\n\n /**\n * @param {string} pluginName\n * @param {import('appium/types').ExtManifest} pluginData\n * @returns {string}\n */\n extensionDesc(pluginName, {version}) {\n return `${pluginName}@${version}`;\n }\n\n /**\n *\n * @param {(keyof import('appium/types').ExtRecord)[]} activeNames\n * @returns {void}\n */\n print(activeNames) {\n const pluginNames = Object.keys(this.installedExtensions);\n\n if (_.isEmpty(pluginNames)) {\n log.info(\n `No plugins have been installed. Use the \"appium plugin\" ` +\n 'command to install the one(s) you want to use.'\n );\n return;\n }\n\n log.info(`Available plugins:`);\n for (const [pluginName, pluginData] of _.toPairs(this.installedExtensions)) {\n const activeTxt = _.includes(activeNames, pluginName) ? ' (ACTIVE)' : '';\n log.info(` - ${this.extensionDesc(pluginName, pluginData)}${activeTxt}`);\n }\n\n if (_.isEmpty(activeNames)) {\n log.info(\n 'No plugins activated. Use the --use-plugins flag with names of plugins to activate'\n );\n }\n }\n}\n\n/**\n * @typedef PluginConfigOptions\n * @property {import('./extension-config').ExtensionLogFn} [logFn] - Optional logging function\n */\n\n/**\n * @typedef {import('@appium/types').PluginType} PluginType\n * @typedef {import('appium/types').ExtMetadata} PluginMetadata\n * @typedef {import('./manifest').Manifest} Manifest\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/schema/arg-spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\n\n/**\n * The original ID of the Appium config schema.\n * We use this in the CLI to convert it to `argparse` options.\n */\nexport const APPIUM_CONFIG_SCHEMA_ID = 'appium.json';\n\n/**\n * The schema prop containing server-related options. Everything in here\n * is \"native\" to Appium.\n * Used by {@link flattenSchema} for transforming the schema into CLI args.\n */\nexport const SERVER_PROP_NAME = 'server';\n\n/**\n * Used to parse extension info from a schema ID.\n */\nconst SCHEMA_ID_REGEXP = /^(?.+?)-(?.+)\\.json$/;\n\n/**\n * Avoid typos by using constants!\n */\nconst PROPERTIES = 'properties';\n\n/**\n * An `ArgSpec` is a class representing metadata about an argument (or config\n * option) used for cross-referencing.\n *\n * This class has no instance methods, and is basically just a read-only \"struct\".\n * @template D\n */\nexport class ArgSpec {\n /**\n * The canonical name of the argument. Corresponds to key in schema's `properties` prop.\n * @type {string}\n */\n name;\n\n /**\n * The `ExtensionType` of the argument. This will be set if the arg came from an extension;\n * otherwise it will be `undefined`.\n * @type {ExtensionType|undefined}\n */\n extType;\n\n /**\n * The name of the extension, if this argument came from an extension.\n *\n * Otherwise `undefined`.\n * @type {string|undefined}\n */\n extName;\n\n /**\n * The schema ID (`$id`) for the argument. This is automatically determined, and any user-provided `$id`s will be overwritten.\n *\n * @type {string}\n */\n ref;\n\n /**\n * The CLI argument, sans leading dashes.\n * @type {string}\n */\n arg;\n\n /**\n * The desired keypath for the argument after arguments have been parsed.\n *\n * Typically this is camelCased. If the arg came from an extension, it will be prefixed with\n * `..`\n * @type {string}\n */\n dest;\n\n /**\n * The same as {@link ArgSpec.dest} but without the leading `..` prefix.\n */\n rawDest;\n\n /**\n * Whatever the default value of this argument is, as specified by the\n * `default` property of the schema.\n * @type {D|undefined}\n */\n defaultValue;\n\n /**\n * Builds some computed fields and assigns them to the instance.\n *\n * Undefined properties are not assigned.\n *\n * The _constructor_ is private. Use {@link ArgSpec.create} instead.\n * @private\n * @param {string} name\n * @param {ArgSpecOptions} opts\n */\n constructor(name, {extType, extName, dest, defaultValue} = {}) {\n // we must normalize the extension name to fit into our convention for CLI\n // args.\n const arg = ArgSpec.toArg(name, extType, extName);\n\n const ref = ArgSpec.toSchemaRef(name, extType, extName);\n\n // if no explicit `dest` provided, just camelCase the name to avoid needing\n // to use bracket syntax when accessing props on the parsed args object.\n const rawDest = _.camelCase(dest ?? name);\n\n const destKeypath = extType && extName ? [extType, extName, rawDest].join('.') : rawDest;\n\n this.defaultValue = defaultValue;\n this.name = name;\n this.extType = extType;\n this.extName = extName;\n this.arg = arg;\n this.dest = destKeypath;\n this.ref = ref;\n this.rawDest = rawDest;\n }\n\n /**\n * Return the schema ID (`$id`) for the **argument** given the parameters.\n *\n * If you need the \"root\" or \"base\" schema ID, use {@link ArgSpec.toSchemaBaseRef} instead.\n * @param {string} name - Argument name\n * @param {ExtensionType} [extType] - Extension type\n * @param {string} [extName] - Extension name\n * @returns {string} Schema ID\n */\n static toSchemaRef(name, extType, extName) {\n const baseRef = ArgSpec.toSchemaBaseRef(extType, extName);\n if (extType && extName) {\n return [`${baseRef}#`, PROPERTIES, name].join('/');\n }\n return [`${baseRef}#`, PROPERTIES, SERVER_PROP_NAME, PROPERTIES, name].join('/');\n }\n\n /**\n * Return the schema ID for an extension or the base schema ID.\n * @param {ExtensionType} [extType] - Extension type\n * @param {string} [extName] - Extension name\n */\n static toSchemaBaseRef(extType, extName) {\n if (extType && extName) {\n return `${extType}-${ArgSpec.toNormalizedExtName(extName)}.json`;\n }\n return APPIUM_CONFIG_SCHEMA_ID;\n }\n\n /**\n * Return the unique ID for the argument given the parameters.\n * @param {string} name - Argument name\n * @param {ExtensionType} [extType] - Extension type\n * @param {string} [extName] - Extension name\n * @returns {string} Unique ID\n */\n static toArg(name, extType, extName) {\n const properName = _.kebabCase(name.replace(/^--?/, ''));\n if (extType && extName) {\n return [extType, _.kebabCase(extName), properName].join('-');\n }\n return properName;\n }\n\n /**\n * Normalizes a raw extension name (not including the type).\n * @param {string} extName - Extension name\n * @returns {string} Normalized extension name\n */\n static toNormalizedExtName(extName) {\n return _.kebabCase(extName);\n }\n\n /**\n * When given the root ID of a schema for an extension (`-.json`) Returns an object containing the extension type and the _normalized_ extension name.\n * @param {string} schemaId - Root schema ID\n * @returns { {extType?: ExtensionType, normalizedExtName?: string} }\n */\n static extensionInfoFromRootSchemaId(schemaId) {\n const matches = schemaId.match(SCHEMA_ID_REGEXP);\n if (matches?.groups) {\n const {extType, normalizedExtName} =\n /** @type { {extType: ExtensionType, normalizedExtName: string} } */ (matches.groups);\n return {extType, normalizedExtName};\n }\n return {};\n }\n\n /**\n * Creates an `ArgSpec`\n *\n * @param {string} name - The canonical name of the argument. Corresponds to a key in a schema's\n * `properties` property.\n * @template D\n * @param {ArgSpecOptions} [opts] - Options\n * @returns {Readonly}\n */\n static create(name, opts) {\n return Object.freeze(new ArgSpec(name, opts));\n }\n\n /**\n * String representation, useful for debugging\n * @returns {string}\n */\n /* istanbul ignore next */\n toString() {\n let str = `[ArgSpec] ${this.name} (${this.ref})`;\n if (this.extType && this.extName) {\n str += ` (ext: ${this.extType}/${this.extName})`;\n }\n return str;\n }\n}\n\n/**\n * Options for {@link ArgSpec.create}\n * @template D\n * @typedef ArgSpecOptions\n * @property {string} [extName]\n * @property {ExtensionType} [extType]\n * @property {string} [dest]\n * @property {D} [defaultValue]\n */\n\n/**\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/schema/cli-args.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {ArgumentTypeError} from 'argparse';\nimport _ from 'lodash';\nimport {formatErrors} from '../config-file';\nimport {flattenSchema, validate} from './schema';\nimport {transformers, parseCsvLine} from './cli-transformers';\n\n/**\n * This module concerns functions which convert schema definitions to\n * `argparse`-compatible data structures, for deriving CLI arguments from a\n * schema.\n */\n\n/**\n * Lookup of possible values for the `type` field in a JSON schema.\n * @type {Readonly>}\n */\nconst TYPENAMES = Object.freeze({\n ARRAY: 'array',\n OBJECT: 'object',\n BOOLEAN: 'boolean',\n INTEGER: 'integer',\n NUMBER: 'number',\n NULL: 'null',\n STRING: 'string',\n});\n\n/**\n * Options with alias lengths less than this will be considered \"short\" flags.\n */\nconst SHORT_ARG_CUTOFF = 3;\n\n/**\n * Convert an alias (`foo`) to a flag (`--foo`) or a short flag (`-f`).\n * @param {ArgSpec} argSpec - the argument specification\n * @param {string} [alias] - the alias to convert to a flag\n * @returns {string} the flag\n */\nfunction aliasToFlag(argSpec, alias) {\n const {extType, extName, name} = argSpec;\n const arg = alias ?? name;\n const isShort = arg.length < SHORT_ARG_CUTOFF;\n if (extType && extName) {\n return isShort\n ? `--${extType}-${_.kebabCase(extName)}-${arg}`\n : `--${extType}-${_.kebabCase(extName)}-${_.kebabCase(arg)}`;\n }\n return isShort ? `-${arg}` : `--${_.kebabCase(arg)}`;\n}\n\n/**\n * Converts a string to SCREAMING_SNAKE_CASE\n */\nconst screamingSnakeCase = _.flow(_.snakeCase, _.toUpper);\n\n/**\n * Given unique property name `name`, return a function which validates a value\n * against a property within the schema.\n * @template Coerced\n * @param {ArgSpec} argSpec - Argument name\n * @param {(value: string) => Coerced} [coerce] - Function to coerce to a different\n * primitive\n * @todo See if we can remove `coerce` by allowing Ajv to coerce in its\n * constructor options\n * @returns\n */\nfunction getSchemaValidator({ref: schemaId}, coerce = _.identity) {\n /** @param {string} value */\n return (value) => {\n const coerced = coerce(value);\n const errors = validate(coerced, schemaId);\n if (_.isEmpty(errors)) {\n return coerced;\n }\n throw new ArgumentTypeError('\\n\\n' + formatErrors(errors, value, {schemaId}));\n };\n}\n\n/**\n * Determine the description for display on the CLI, given the schema.\n * @param {AppiumJSONSchema} schema\n * @returns {string}\n */\nfunction makeDescription(schema) {\n const {appiumCliDescription, description = '', appiumDeprecated} = schema;\n let desc = appiumCliDescription ?? description;\n if (appiumDeprecated) {\n desc = `[DEPRECATED] ${desc}`;\n }\n return desc;\n}\n\n/**\n * Given arg `name`, a JSON schema `subSchema`, and options, return an argument definition\n * as understood by `argparse`.\n * @param {AppiumJSONSchema} subSchema - JSON schema for the option\n * @param {ArgSpec} argSpec - Argument spec tuple\n * @returns {[[string]|[string, string], import('argparse').ArgumentOptions]} Tuple of flag and options\n */\nfunction subSchemaToArgDef(subSchema, argSpec) {\n let {type, appiumCliAliases, appiumCliTransformer, enum: enumValues} = subSchema;\n\n const {name, arg} = argSpec;\n\n const aliases = [\n aliasToFlag(argSpec),\n .../** @type {string[]} */ (appiumCliAliases ?? []).map((alias) => aliasToFlag(argSpec, alias)),\n ];\n\n /** @type {import('argparse').ArgumentOptions} */\n let argOpts = {\n required: false,\n help: makeDescription(subSchema),\n };\n\n /**\n * Generally we will provide a `type` to `argparse` as a function which\n * validates using ajv (which is much more full-featured than what `argparse`\n * can offer). The exception is `boolean`-type options, which have no\n * `argType`.\n *\n * Not sure if this type is correct, but it's not doing what I want. I want\n * to say \"this is a function which returns something of type `T` where `T` is\n * never a `Promise`\". This function must be sync.\n * @type {((value: string) => unknown)|undefined}\n */\n let argTypeFunction;\n\n // handle special cases for various types\n switch (type) {\n // booleans do not have a type per `ArgumentOptions`, just an \"action\"\n // NOTE: due to limitations of `argparse`, we cannot provide fancy help text, and must rely on its internal error messaging.\n case TYPENAMES.BOOLEAN: {\n argOpts.action = 'store_const';\n argOpts.const = true;\n break;\n }\n\n case TYPENAMES.OBJECT: {\n argTypeFunction = _.flow(transformers.json, (o) => {\n // Arrays and plain strings are also valid JSON\n if (!_.isPlainObject(o)) {\n throw new ArgumentTypeError(`'${_.truncate(o, {length: 100})}' must be a plain object`);;\n }\n return o;\n });\n break;\n }\n\n // arrays are treated as CSVs, because `argparse` doesn't handle array data.\n case TYPENAMES.ARRAY: {\n argTypeFunction = parseCsvLine;\n break;\n }\n\n // \"number\" type is coerced to float. `argparse` does this for us if we use `float` type, but\n // we don't.\n case TYPENAMES.NUMBER: {\n argTypeFunction = getSchemaValidator(argSpec, parseFloat);\n break;\n }\n\n // \"integer\" is coerced to an .. integer. again, `argparse` would do this for us if we used `int`.\n case TYPENAMES.INTEGER: {\n argTypeFunction = getSchemaValidator(argSpec, _.parseInt);\n break;\n }\n\n // strings (like number and integer) are subject to further validation\n // (e.g., must satisfy a mask or regex or even some custom validation\n // function)\n case TYPENAMES.STRING: {\n argTypeFunction = getSchemaValidator(argSpec);\n break;\n }\n\n // TODO: there may be some way to restrict this at the Ajv level --\n // that may involve patching the metaschema.\n case TYPENAMES.NULL:\n // falls through\n default: {\n throw new TypeError(`Schema property \"${arg}\": \\`${type}\\` type unknown or disallowed`);\n }\n }\n\n // metavar is used in help text. `boolean` cannot have a metavar--it is not\n // displayed--and `argparse` throws if you give it one.\n if (type !== TYPENAMES.BOOLEAN) {\n argOpts.metavar = screamingSnakeCase(name);\n }\n\n if (appiumCliTransformer && transformers[appiumCliTransformer]) {\n if (type === TYPENAMES.ARRAY) {\n const csvTransformer = /** @type {(x: string) => string[]} */ (argTypeFunction);\n argTypeFunction = (val) => _.flatMap(csvTransformer(val).map(transformers[appiumCliTransformer]));\n } else {\n argTypeFunction = _.flow(argTypeFunction ?? _.identity, transformers[appiumCliTransformer]);\n }\n }\n\n if (argTypeFunction) {\n argOpts.type = argTypeFunction;\n }\n\n // convert JSON schema `enum` to `choices`. `enum` can contain any JSON type, but `argparse`\n // is limited to a single type per arg (I think). so let's make everything a string.\n // and might as well _require_ the `type: string` while we're at it.\n if (enumValues && !_.isEmpty(enumValues)) {\n if (type === TYPENAMES.STRING) {\n argOpts.choices = enumValues.map(String);\n } else {\n throw new TypeError(\n `Problem with schema for ${arg}; \\`enum\\` is only supported for \\`type: 'string'\\``\n );\n }\n }\n\n // TODO: argparse only accepts the command name and a single alias; any extra aliases\n // will be silently discarded.\n const finalAliases = /** @type {[string]|[string, string]} */ (aliases);\n return [finalAliases, argOpts];\n}\n\n/**\n * Converts the finalized, flattened schema representation into\n * ArgumentDefinitions for handoff to `argparse`.\n *\n * @throws If schema has not been added to ajv (via `finalizeSchema()`)\n * @returns {import('../cli/args').ArgumentDefinitions} A map of arrays of\n * aliases to `argparse` arguments; empty if no schema found\n */\nexport function toParserArgs() {\n const flattened = flattenSchema().filter(({schema}) => !schema.appiumCliIgnored);\n return new Map(_.map(flattened, ({schema, argSpec}) => subSchemaToArgDef(schema, argSpec)));\n}\n\n/**\n * @template {string|number} T\n * @typedef {import('ajv/dist/types').FormatValidator} FormatValidator\n */\n\n/**\n * A JSON 7 schema with our custom keywords.\n * @typedef {import('./keywords').AppiumJSONSchemaKeywords & import('json-schema').JSONSchema7} AppiumJSONSchema\n */\n\n/**\n * @typedef {import('./arg-spec').ArgSpec} ArgSpec\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/schema/cli-transformers.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {ArgumentTypeError} from 'argparse';\nimport {readFileSync, existsSync} from 'node:fs';\n\n/**\n * This module provides custom keywords for Appium schemas, as well as\n * \"transformers\" (see `argTransformers` below).\n *\n * Custom keywords are just properties that will appear in a schema (e.g.,\n * `appium-config-schema.js`) beyond what the JSON Schema spec offers. These\n * are usable by extensions, as well.\n */\n\n/**\n * Splits a CSV string into an array\n * @param {string} value\n * @returns {string[]}\n */\nexport function parseCsvLine(value) {\n return value\n .split(',')\n .map((v) => v.trim())\n .filter(Boolean);\n}\n\n/**\n * Split a file by newline then calls {@link parseCsvLine} on each line.\n * @param {string} value\n * @returns {string[]}\n */\nfunction parseCsvFile(value) {\n return value\n .split(/\\r?\\n/)\n .map((v) => v.trim())\n .filter(Boolean)\n .flatMap(parseCsvLine);\n}\n\n/**\n * Namespace containing _transformers_ for CLI arguments. \"Validators\" and\n * \"formatters\" do not actually modify the value, but these do.\n *\n * Use case is for when the config file can accept e.g., a `string[]`, but the\n * CLI can only take a `string` (as `argparse` seems to be limited in that\n * fashion; it also cannot understand an argument having multiple types).\n *\n * For example, the `csv` transform takes a `string` and returns a `string[]` by\n * splitting it by comma--_or_ if that `string` happens to be a\n * filepath--reading the file as a `.csv`.\n *\n * This contains some copy-pasted code from `lib/cli/parser-helpers.js`, which was\n * obliterated.\n */\nexport const transformers = {\n /**\n * Given a CSV-style string or pathname, parse it into an array.\n * The file can also be split on newlines.\n * @param {string} csvOrPath\n * @returns {string[]}\n */\n csv: (csvOrPath) => {\n let csv = csvOrPath;\n let loadedFromFile = false;\n // since this value could be a single string (no commas) _or_ a pathname, we will need\n // to attempt to parse it as a file _first_.\n if (existsSync(csvOrPath)) {\n try {\n csv = readFileSync(csvOrPath, 'utf8');\n } catch (err) {\n throw new ArgumentTypeError(`Could not read file '${csvOrPath}': ${err.message}`);\n }\n loadedFromFile = true;\n }\n try {\n return loadedFromFile ? parseCsvFile(csv) : parseCsvLine(csv);\n } catch (err) {\n const msg = loadedFromFile\n ? `The provided value of '${csvOrPath}' must be a valid CSV`\n : `Must be a comma-delimited string, e.g., \"foo,bar,baz\"`;\n throw new TypeError(`${msg}. Original error: ${err.message}`);\n }\n },\n\n /**\n * Parse a string which could be a path to a JSON file or a JSON string.\n * @param {string} jsonOrPath\n * @returns {object}\n */\n json: (jsonOrPath) => {\n let json = jsonOrPath;\n let loadedFromFile = false;\n if (existsSync(jsonOrPath)) {\n try {\n // use synchronous file access, as `argparse` provides no way of either\n // awaiting or using callbacks. This step happens in startup, in what is\n // effectively command-line code, so nothing is blocked in terms of\n // sessions, so holding up the event loop does not incur the usual\n // drawbacks.\n json = readFileSync(jsonOrPath, 'utf8');\n } catch (err) {\n throw new ArgumentTypeError(`Could not read file '${jsonOrPath}': ${err.message}`);\n }\n loadedFromFile = true;\n }\n try {\n return JSON.parse(json);\n } catch (e) {\n const msg = loadedFromFile\n ? `'${jsonOrPath}' must be a valid JSON`\n : `The provided value must be a valid JSON`;\n throw new TypeError(`${msg}. Original error: ${e.message}`);\n }\n },\n};\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/schema/index.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nexport * from './schema';\nexport * from './cli-args';\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/schema/keywords.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {transformers} from './cli-transformers';\n\n/**\n * Collection of keyword definitions to add to the singleton `Ajv` instance.\n * @type {Record}\n */\nexport const keywords = {\n /**\n * Keyword to provide a list of command alias names for the CLI.\n *\n * If defined, there must be at least one item in the array and it must be non-empty.\n * All items in the array must be unique.\n *\n * @todo Avoid alias collisions!\n * @type {KeywordDefinition}\n * @example\n * {appiumCliAliases: ['B', 'bobby', 'robert']}\n */\n appiumCliAliases: {\n keyword: 'appiumCliAliases',\n metaSchema: {\n type: 'array',\n items: {\n type: 'string',\n minLength: 1,\n },\n minItems: 1,\n uniqueItems: true,\n description:\n 'List of aliases for the argument. Aliases shorter than three (3) characters will be prefixed with a single dash; otherwise two (2).',\n },\n },\n /**\n * Keyword to provide the name of the property in the destination (parsed\n * args) object. By default, this value will be whatever the property name is,\n * but camel-cased. If a flag needs something _other_ than just camel-casing,\n * use this.\n * @type {KeywordDefinition}\n * @example\n * // for prop 'no-color'\n * {appiumCliDest: 'NOCOLOR'} // value will be stored as property `NOCOLOR` instead of `noColor`\n */\n appiumCliDest: {\n keyword: 'appiumCliDest',\n metaSchema: {\n type: 'string',\n minLength: 1,\n description: 'Name of the associated property in the parsed CLI arguments object',\n },\n },\n\n /**\n * CLI-specific description of the property. Sometimes the allowed type can\n * be different enough on the CLI that providing a description written for a\n * config file context wouldn't make sense.\n * @type {KeywordDefinition}\n * @example\n * {appiumCliDescription: 'This is a comma-delimited string, but in the config file it is an array'}\n */\n appiumCliDescription: {\n keyword: 'appiumCliDescription',\n schemaType: 'string',\n metaSchema: {\n type: 'string',\n minLength: 1,\n description: 'Description to provide in the --help text of the CLI. Overrides `description`',\n },\n },\n\n /**\n * Transformers for CLI args. These usually take strings then do something with them, like\n * read a file or parse further.\n * @type {KeywordDefinition}\n */\n appiumCliTransformer: {\n keyword: 'appiumCliTransformer',\n metaSchema: {\n type: 'string',\n enum: Object.keys(transformers),\n description:\n 'The name of a custom transformer to run against the value as provided via the CLI.',\n },\n },\n\n /**\n * Flag to tell Appium to _not_ provide this property as a CLI argument.\n * @type {KeywordDefinition}\n */\n appiumCliIgnored: {\n keyword: 'appiumCliIgnored',\n metaSchema: {\n type: 'boolean',\n description:\n 'If `true`, Appium will not provide this property as a CLI argument. This is NOT the same as a \"hidden\" argument.',\n enum: [true],\n },\n },\n\n /**\n * Mark this property as deprecated.\n * @type {KeywordDefinition}\n */\n appiumDeprecated: {\n keyword: 'appiumDeprecated',\n metaSchema: {\n type: 'boolean',\n description: 'If `true`, this property will be displayed as \"deprecated\" to the user',\n enum: [true],\n $comment:\n 'JSON schema draft-2019-09 keyword `deprecated` serves the same purpose. This keyword should itself be deprecated if we move to draft-2019-09!',\n },\n },\n};\n\n/**\n * These are the valid values for the `appiumCliTransformer` keyword.\n * Unfortunately, TS cannot infer this in a JS context. In TS, we'd use\n * `as const` when defining `argTransformers`, then get `keyof typeof argTransformers`. alas.\n * @typedef {'csv'|'json'} AppiumCliTransformerName\n */\n\n/**\n * These are the custom keywords that Appium recognizes.\n *\n * @typedef AppiumJSONSchemaKeywords\n * @property {string} [appiumCliDest]\n * @property {string} [appiumCliDescription]\n * @property {string[]} [appiumCliAliases]\n * @property {boolean} [appiumCliIgnored]\n * @property {AppiumCliTransformerName} [appiumCliTransformer]\n * @property {boolean} [appiumDeprecated]\n */\n\n/**\n * @typedef {import('ajv').KeywordDefinition} KeywordDefinition\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/lib/schema/schema.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {Ajv} from 'ajv';\nimport addFormats from 'ajv-formats';\nimport _ from 'lodash';\nimport path from 'node:path';\nimport {DRIVER_TYPE, PLUGIN_TYPE} from '../constants';\nimport {AppiumConfigJsonSchema} from '@appium/schema';\nimport {APPIUM_CONFIG_SCHEMA_ID, ArgSpec, SERVER_PROP_NAME} from './arg-spec';\nimport {keywords} from './keywords';\n\n/**\n * Key/value pairs go in... but they don't come out.\n *\n * @template K,V\n * @extends {Map}\n */\nexport class RoachHotelMap extends Map {\n /**\n * @param {K} key\n * @param {V} value\n */\n set(key, value) {\n if (this.has(key)) {\n throw new Error(`${key} is already set`);\n }\n return super.set(key, value);\n }\n\n /**\n * @param {K} key\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n delete(key) {\n return false;\n }\n\n clear() {\n throw new Error(`Cannot clear RoachHotelMap`);\n }\n}\n\n/**\n * Extensions that an extension schema file can have.\n */\nexport const ALLOWED_SCHEMA_EXTENSIONS = Object.freeze(\n new Set(/** @type {AllowedSchemaExtension[]} */ (['.json', '.js', '.cjs']))\n);\n\nconst SCHEMA_KEY = '$schema';\n\n/**\n * A wrapper around Ajv and schema-related functions.\n *\n * Should have been named Highlander, because _there can only be one_\n */\nclass AppiumSchema {\n /**\n * A mapping of unique argument IDs to their corresponding {@link ArgSpec}s.\n *\n * An \"argument\" is a CLI argument or a config property.\n *\n * Used to provide easy lookups of argument metadata when converting between different representations of those arguments.\n * @type {RoachHotelMap}\n */\n #argSpecs = new RoachHotelMap();\n\n /**\n * A map of extension types to extension names to schema objects.\n *\n * This data structure is used to ensure there are no naming conflicts. The schemas\n * are stored here in memory until the instance is _finalized_.\n * @type {Record>}\n */\n #registeredSchemas = {[DRIVER_TYPE]: new Map(), [PLUGIN_TYPE]: new Map()};\n\n /**\n * Ajv instance\n *\n * @type {Ajv}\n */\n #ajv;\n\n /**\n * Singleton instance.\n * @type {AppiumSchema}\n */\n static #instance;\n\n /**\n * Lookup of schema IDs to finalized schemas.\n *\n * This does not include references, but rather the root schemas themselves.\n * @type {Record?}\n */\n #finalizedSchemas = null;\n\n /**\n * Initializes Ajv, adds standard formats and our custom keywords.\n * @see https://npm.im/ajv-formats\n * @private\n */\n constructor() {\n this.#ajv = AppiumSchema._instantiateAjv();\n }\n\n /**\n * Factory function for {@link AppiumSchema} instances.\n *\n * Returns a singleton instance if one exists, otherwise creates a new one.\n * Binds public methods to the instance.\n * @returns {AppiumSchema}\n */\n static create() {\n if (!AppiumSchema.#instance) {\n const instance = new AppiumSchema();\n AppiumSchema.#instance = instance;\n _.bindAll(instance, [\n 'finalize',\n 'flatten',\n 'getAllArgSpecs',\n 'getArgSpec',\n 'getDefaults',\n 'getDefaultsForExtension',\n 'getSchema',\n 'hasArgSpec',\n 'isFinalized',\n 'registerSchema',\n 'hasRegisteredSchema',\n 'reset',\n 'validate',\n ]);\n }\n\n return AppiumSchema.#instance;\n }\n\n /**\n * Returns `true` if a schema has been registered using given extension type and name.\n *\n * This does not depend on whether or not the instance has been _finalized_.\n * @param {ExtensionType} extType - Extension type\n * @param {string} extName - Name\n * @returns {boolean} If registered\n */\n hasRegisteredSchema(extType, extName) {\n return this.#registeredSchemas[extType].has(extName);\n }\n\n /**\n * Return `true` if {@link AppiumSchema.finalize finalize} has been called\n * successfully and {@link AppiumSchema.reset reset} has not been called since.\n * @returns {boolean} If finalized\n */\n isFinalized() {\n return Boolean(this.#finalizedSchemas);\n }\n\n getAllArgSpecs() {\n return this.#argSpecs;\n }\n\n /**\n * Call this when no more schemas will be registered.\n *\n * This does three things:\n * 1. It combines all schemas from extensions into the Appium config schema,\n * then adds the result to the `Ajv` instance.\n * 2. It adds schemas for _each_ argument/property for validation purposes.\n * The CLI uses these schemas to validate specific arguments.\n * 3. The schemas are validated against JSON schema draft-07 (which is the\n * only one supported at this time)\n *\n * Any method in this instance that needs to interact with the `Ajv` instance\n * will throw if this method has not been called.\n *\n * If the instance has already been finalized, this is a no-op.\n * @public\n * @throws {Error} If the schema is not valid\n * @returns {Readonly>} Record of schema IDs to full schema objects\n */\n finalize() {\n if (this.isFinalized()) {\n return /** @type {Record} */ (this.#finalizedSchemas);\n }\n\n const ajv = this.#ajv;\n\n // Ajv will _mutate_ the schema, so we need to clone it.\n const baseSchema = _.cloneDeep(AppiumConfigJsonSchema);\n\n /**\n *\n * @param {SchemaObject} schema\n * @param {ExtensionType} [extType]\n * @param {string} [extName]\n */\n const addArgSpecs = (schema, extType, extName) => {\n for (let [propName, propSchema] of Object.entries(schema)) {\n const argSpec = ArgSpec.create(propName, {\n dest: propSchema.appiumCliDest,\n defaultValue: propSchema.default,\n extType,\n extName,\n });\n const {arg} = argSpec;\n this.#argSpecs.set(arg, argSpec);\n }\n };\n\n addArgSpecs(_.omit(baseSchema.properties.server.properties, [DRIVER_TYPE, PLUGIN_TYPE]));\n\n /**\n * @type {Record}\n */\n const finalizedSchemas = {};\n\n const finalSchema = _.reduce(\n this.#registeredSchemas,\n /**\n * @param {typeof baseSchema} baseSchema\n * @param {Map} extensionSchemas\n * @param {ExtensionType} extType\n */\n (baseSchema, extensionSchemas, extType) => {\n extensionSchemas.forEach((schema, extName) => {\n const $ref = ArgSpec.toSchemaBaseRef(extType, extName);\n schema.$id = $ref;\n schema.additionalProperties = false; // this makes `schema` become a `StrictSchemaObject`\n baseSchema.properties.server.properties[extType].properties[extName] = {\n $ref,\n $comment: extName,\n };\n ajv.validateSchema(schema, true);\n addArgSpecs(schema.properties, extType, extName);\n ajv.addSchema(schema, $ref);\n finalizedSchemas[$ref] = /** @type {StrictSchemaObject} */ (schema);\n });\n return baseSchema;\n },\n baseSchema\n );\n\n ajv.addSchema(finalSchema, APPIUM_CONFIG_SCHEMA_ID);\n finalizedSchemas[APPIUM_CONFIG_SCHEMA_ID] = finalSchema;\n ajv.validateSchema(finalSchema, true);\n\n this.#finalizedSchemas = finalizedSchemas;\n return Object.freeze(finalizedSchemas);\n }\n\n /**\n * Configures and creates an Ajv instance.\n * @private\n * @returns {Ajv}\n */\n static _instantiateAjv() {\n const ajv = addFormats(\n new Ajv({\n // without this not much validation actually happens\n allErrors: true,\n })\n );\n\n // add custom keywords to ajv. see schema-keywords.js\n _.forEach(keywords, (keyword) => {\n ajv.addKeyword(keyword);\n });\n\n return ajv;\n }\n\n /**\n * Resets this instance to its original state.\n *\n * - Removes all added schemas from the `Ajv` instance\n * - Resets the map of {@link ArgSpec ArgSpecs}\n * - Resets the map of registered schemas\n * - Sets the {@link AppiumSchema._finalized _finalized} flag to `false`\n *\n * If you need to call {@link AppiumSchema.finalize} again, you'll want to call this first.\n * @returns {void}\n */\n reset() {\n for (const schemaId of Object.keys(this.#finalizedSchemas ?? {})) {\n this.#ajv.removeSchema(schemaId);\n }\n this.#argSpecs = new RoachHotelMap();\n this.#registeredSchemas = {\n [DRIVER_TYPE]: new Map(),\n [PLUGIN_TYPE]: new Map(),\n };\n this.#finalizedSchemas = null;\n\n // Ajv seems to have an over-eager cache, so we have to dump the object entirely.\n this.#ajv = AppiumSchema._instantiateAjv();\n }\n\n /**\n * Registers a schema from an extension.\n *\n * This is \"fail-fast\" in that the schema will immediately be validated against JSON schema draft-07 _or_ whatever the value of the schema's `$schema` prop is.\n *\n * Does _not_ add the schema to the `ajv` instance (this is done by {@link AppiumSchema.finalize}).\n * @param {ExtensionType} extType - Extension type\n * @param {string} extName - Unique extension name for `type`\n * @param {SchemaObject} schema - Schema object\n * @throws {SchemaNameConflictError} If the schema is an invalid\n * @returns {void}\n */\n registerSchema(extType, extName, schema) {\n if (!(extType && extName) || _.isUndefined(schema)) {\n throw new TypeError('Expected extension type, extension name, and a defined schema');\n }\n if (!AppiumSchema.isSupportedSchemaType(schema)) {\n throw new SchemaUnsupportedSchemaError(schema, extType, extName);\n }\n const normalizedExtName = _.kebabCase(extName);\n if (this.hasRegisteredSchema(extType, normalizedExtName)) {\n if (_.isEqual(this.#registeredSchemas[extType].get(normalizedExtName), schema)) {\n return;\n }\n throw new SchemaNameConflictError(extType, extName);\n }\n this.#ajv.validateSchema(schema, true);\n\n this.#registeredSchemas[extType].set(normalizedExtName, schema);\n }\n\n /**\n * Returns a {@link ArgSpec} for the given argument name.\n * @param {string} name - CLI argument name\n * @param {ExtensionType} [extType] - Extension type\n * @param {string} [extName] - Extension name\n * @returns {ArgSpec|undefined} ArgSpec or `undefined` if not found\n */\n getArgSpec(name, extType, extName) {\n return this.#argSpecs.get(ArgSpec.toArg(name, extType, extName));\n }\n\n /**\n * Returns `true` if the instance knows about an argument by the given `name`.\n * @param {string} name - CLI argument name\n * @param {ExtensionType} [extType] - Extension type\n * @param {string} [extName] - Extension name\n * @returns {boolean} `true` if such an {@link ArgSpec} exists\n */\n hasArgSpec(name, extType, extName) {\n return this.#argSpecs.has(ArgSpec.toArg(name, extType, extName));\n }\n\n /**\n * Returns a `Record` of argument \"dest\" strings to default values.\n *\n * The \"dest\" string is the property name in object returned by\n * `argparse.ArgumentParser['parse_args']`.\n * @template {boolean|undefined} Flattened\n * @param {Flattened} [flatten=true] - If `true`, flattens the returned object\n * using \"keypath\"-style keys of the format `..`.\n * Otherwise, returns a nested object using `extType` and `extName` as\n * properties. Base arguments (server arguments) are always at the top level.\n * @returns {DefaultValues}\n */\n getDefaults(flatten = /** @type {Flattened} */ (true)) {\n if (!this.isFinalized()) {\n throw new SchemaFinalizationError();\n }\n\n /**\n * @private\n * @callback DefaultReducer\n * @param {DefaultValues} defaults\n * @param {ArgSpec} argSpec\n * @returns {DefaultValues}\n */\n /** @type {DefaultReducer} */\n const reducer = flatten\n ? (defaults, {defaultValue, dest}) => {\n if (!_.isUndefined(defaultValue)) {\n defaults[dest] = defaultValue;\n }\n return defaults;\n }\n : (defaults, {defaultValue, dest}) => {\n if (!_.isUndefined(defaultValue)) {\n _.set(defaults, dest, defaultValue);\n }\n return defaults;\n };\n\n /** @type {DefaultValues} */\n const retval = {};\n return [...this.#argSpecs.values()].reduce(reducer, retval);\n }\n\n /**\n * Returns a flattened Record of defaults for a specific extension. Keys will\n * be of format ``.\n * @param {ExtensionType} extType - Extension type\n * @param {string} extName - Extension name\n * @returns {Record}\n */\n getDefaultsForExtension(extType, extName) {\n if (!this.isFinalized()) {\n throw new SchemaFinalizationError();\n }\n const specs = [...this.#argSpecs.values()].filter(\n (spec) => spec.extType === extType && spec.extName === extName\n );\n return specs.reduce((defaults, {defaultValue, rawDest}) => {\n if (!_.isUndefined(defaultValue)) {\n defaults[rawDest] = defaultValue;\n }\n return defaults;\n }, {});\n }\n\n /**\n * Flatten schema into an array of `SchemaObject`s and associated\n * {@link ArgSpec ArgSpecs}.\n *\n * Converts nested extension schemas to keys based on the extension type and\n * name. Used when translating to `argparse` options or getting the list of\n * default values (see {@link AppiumSchema.getDefaults}) for CLI or otherwise.\n *\n * The return value is an intermediate representation used by `cli-args`\n * module's `toParserArgs`, which converts the finalized schema to parameters\n * used by `argparse`.\n * @throws If {@link AppiumSchema.finalize} has not been called yet.\n * @returns {FlattenedSchema}\n */\n flatten() {\n const schema = this.getSchema();\n\n /** @type { {properties: SchemaObject, prefix: string[]}[] } */\n const stack = [{properties: schema.properties, prefix: []}];\n /** @type {FlattenedSchema} */\n const flattened = [];\n\n // this bit is a recursive algorithm rewritten as a for loop.\n // when we find something we want to traverse, we add it to `stack`\n for (const {properties, prefix} of stack) {\n const pairs = _.toPairs(properties);\n for (const [key, value] of pairs) {\n if (key === SCHEMA_KEY) {\n continue;\n }\n const {properties, $ref} = value;\n if (properties) {\n stack.push({\n properties,\n prefix: key === SERVER_PROP_NAME ? [] : [...prefix, key],\n });\n } else if ($ref) {\n let refSchema;\n try {\n refSchema = this.getSchema($ref);\n } catch {\n // this can happen if an extension schema supplies a $ref to a non-existent schema\n throw new SchemaUnknownSchemaError($ref);\n }\n const {normalizedExtName} = ArgSpec.extensionInfoFromRootSchemaId($ref);\n if (!normalizedExtName) {\n /* istanbul ignore next */\n throw new ReferenceError(\n `Could not determine extension name from schema ID ${$ref}. This is a bug.`\n );\n }\n stack.push({\n properties: refSchema.properties,\n prefix: [...prefix, key, normalizedExtName],\n });\n } else if (key !== DRIVER_TYPE && key !== PLUGIN_TYPE) {\n const [extType, extName] = prefix;\n const argSpec = this.getArgSpec(key, /** @type {ExtensionType} */ (extType), extName);\n if (!argSpec) {\n /* istanbul ignore next */\n throw new ReferenceError(\n `Unknown argument with key ${key}, extType ${extType} and extName ${extName}. This is a bug.`\n );\n }\n flattened.push({schema: _.cloneDeep(value), argSpec});\n }\n }\n }\n\n return flattened;\n }\n\n /**\n * Retrieves the schema itself\n * @public\n * @param {string} [ref] - Schema ID\n * @throws If the schema has not yet been finalized\n * @returns {SchemaObject}\n */\n getSchema(ref = APPIUM_CONFIG_SCHEMA_ID) {\n return /** @type {SchemaObject} */ (this._getValidator(ref).schema);\n }\n\n /**\n * Retrieves schema validator function from Ajv\n * @param {string} [id] - Schema ID\n * @private\n * @returns {import('ajv').ValidateFunction}\n */\n _getValidator(id = APPIUM_CONFIG_SCHEMA_ID) {\n const validator = this.#ajv.getSchema(id);\n if (!validator) {\n if (id === APPIUM_CONFIG_SCHEMA_ID) {\n throw new SchemaFinalizationError();\n } else {\n throw new SchemaUnknownSchemaError(id);\n }\n }\n return validator;\n }\n\n /**\n * Given an object, validates it against the Appium config schema.\n * If errors occur, the returned array will be non-empty.\n * @param {any} value - The value (hopefully an object) to validate against the schema\n * @param {string} [ref] - Schema ID or ref.\n * @public\n * @returns {import('ajv').ErrorObject[]} Array of errors, if any.\n */\n validate(value, ref = APPIUM_CONFIG_SCHEMA_ID) {\n const validator = this._getValidator(ref);\n return !validator(value) && _.isArray(validator.errors) ? [...validator.errors] : [];\n }\n\n /**\n * Returns `true` if `filename`'s file extension is allowed (in {@link ALLOWED_SCHEMA_EXTENSIONS}).\n * @param {import('type-fest').LiteralUnion} filename\n * @returns {boolean}\n */\n static isAllowedSchemaFileExtension(filename) {\n return ALLOWED_SCHEMA_EXTENSIONS.has(\n /** @type {AllowedSchemaExtension} */ (path.extname(filename))\n );\n }\n\n /**\n * Returns `true` if `schema` is a plain object with a non-true `$async` property.\n * @param {any} schema - Schema to check\n * @returns {schema is SchemaObject}\n */\n static isSupportedSchemaType(schema) {\n return _.isPlainObject(schema) && schema.$async !== true;\n }\n}\n\n/**\n * Thrown when the {@link AppiumSchema} instance has not yet been finalized, but\n * the method called requires it.\n */\nexport class SchemaFinalizationError extends Error {\n /**\n * @type {Readonly}\n */\n code = 'APPIUMERR_SCHEMA_FINALIZATION';\n\n constructor() {\n super('Schema not yet finalized; `finalize()` must be called first.');\n }\n}\n\n/**\n * Thrown when a \"unique\" schema ID conflicts with an existing schema ID.\n *\n * This is likely going to be caused by attempting to register the same schema twice.\n */\nexport class SchemaNameConflictError extends Error {\n /**\n * @type {Readonly}\n */\n code = 'APPIUMERR_SCHEMA_NAME_CONFLICT';\n\n /**\n * @type {Readonly<{extType: ExtensionType, extName: string}>}\n */\n data;\n\n /**\n * @param {ExtensionType} extType\n * @param {string} extName\n */\n constructor(extType, extName) {\n super(`Name for ${extType} schema \"${extName}\" conflicts with an existing schema`);\n this.data = {extType, extName};\n }\n}\n\n/**\n * Thrown when a schema ID was expected, but it doesn't exist on the {@link Ajv} instance.\n */\nexport class SchemaUnknownSchemaError extends ReferenceError {\n /**\n * @type {Readonly}\n */\n code = 'APPIUMERR_SCHEMA_UNKNOWN_SCHEMA';\n\n /**\n * @type {Readonly<{schemaId: string}>}\n */\n data;\n\n /**\n * @param {string} schemaId\n */\n constructor(schemaId) {\n super(`Unknown schema: \"${schemaId}\"`);\n this.data = {schemaId};\n }\n}\n\n/**\n * Thrown when a schema is provided, but it's of an unsupported type.\n *\n * \"Valid\" schemas which are unsupported include boolean schemas and async schemas\n * (having a `true` `$async` property).\n */\nexport class SchemaUnsupportedSchemaError extends TypeError {\n /**\n * @type {Readonly}\n */\n code = 'APPIUMERR_SCHEMA_UNSUPPORTED_SCHEMA';\n\n /**\n * @type {Readonly<{schema: any, extType: ExtensionType, extName: string}>}\n */\n data;\n\n /**\n * @param {any} schema\n * @param {ExtensionType} extType\n * @param {string} extName\n */\n constructor(schema, extType, extName) {\n // https://github.com/Microsoft/TypeScript/issues/8277\n super(\n (() => {\n let msg = `Unsupported schema from ${extType} \"${extName}\":`;\n if (_.isBoolean(schema)) {\n return `${msg} schema cannot be a boolean`;\n }\n if (_.isPlainObject(schema)) {\n if (schema.$async) {\n return `${msg} schema cannot be an async schema`;\n }\n /* istanbul ignore next */\n throw new TypeError(\n `schema IS supported; this error should not be thrown (this is a bug). value of schema: ${JSON.stringify(\n schema\n )}`\n );\n }\n return `${msg} schema must be a plain object without a true \"$async\" property`;\n })()\n );\n this.data = {schema, extType, extName};\n }\n}\n\nconst appiumSchema = AppiumSchema.create();\n\nexport const {\n registerSchema,\n getAllArgSpecs,\n getArgSpec,\n hasArgSpec,\n isFinalized,\n finalize: finalizeSchema,\n reset: resetSchema,\n validate,\n getSchema,\n flatten: flattenSchema,\n getDefaults: getDefaultsForSchema,\n getDefaultsForExtension,\n} = appiumSchema;\nexport const {isAllowedSchemaFileExtension} = AppiumSchema;\n\n/**\n * Appium only supports schemas that are plain objects; not arrays.\n * @typedef {import('ajv').SchemaObject & {[key: number]: never}} SchemaObject\n */\n\n/**\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n */\n\n/**\n * An object having property `additionalProperties: false`\n * @typedef StrictProp\n * @property {false} additionalProperties\n */\n\n/**\n * A {@link SchemaObject} with `additionalProperties: false`\n * @typedef {SchemaObject & StrictProp} StrictSchemaObject\n */\n\n/**\n * A list of schemas associated with properties and their corresponding {@link ArgSpec} objects.\n *\n * Intermediate data structure used when converting the entire schema down to CLI arguments.\n * @typedef { {schema: SchemaObject, argSpec: ArgSpec}[] } FlattenedSchema\n */\n\n/**\n * @typedef {ArgSpec['defaultValue']} ArgSpecDefaultValue\n */\n\n/**\n * e.g. `{driver: {foo: 'bar'}}` where `foo` is the arg name and `bar` is the default value.\n * @typedef {Record>} NestedArgSpecDefaultValue\n */\n\n/**\n * Helper type for the return value of {@link AppiumSchema.getDefaults}\n * @template {boolean|undefined} Flattened\n * @typedef {Record} DefaultValues\n */\n\n/**\n * @typedef {'.json'|'.js'|'.cjs'} AllowedSchemaExtension\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/sample-code/appium.config.sample.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nmodule.exports = {\n server: {\n address: '127.0.0.1',\n 'allow-cors': true,\n 'allow-insecure': ['*:foo', '*:bar'],\n 'base-path': '/',\n 'callback-address': '127.0.0.1',\n 'callback-port': 4723,\n 'debug-log-spacing': true,\n 'default-capabilities': {\n key: 'value',\n },\n 'deny-insecure': ['*:baz', '*:quux'],\n driver: {\n xcuitest: {\n key: 'value',\n },\n },\n 'keep-alive-timeout': 600,\n 'local-timezone': true,\n log: '/tmp/appium.log',\n 'log-level': 'info',\n 'log-no-colors': false,\n 'log-timestamp': true,\n 'long-stacktrace': false,\n 'no-perms-check': false,\n nodeconfig: {\n key: 'value',\n },\n plugin: {\n images: {\n key: 'value',\n },\n },\n port: 4723,\n 'relaxed-security': false,\n 'session-override': false,\n 'strict-caps': true,\n tmp: '/tmp',\n 'trace-dir': '/tmp/appium-instruments',\n 'use-drivers': ['foo', 'bar'],\n 'use-plugins': ['baz', 'quux'],\n webhook: 'https://some-url.com',\n },\n};\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/sample-code/appium.config.sample.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"server\": {\n \"address\": \"127.0.0.1\",\n \"allow-cors\": true,\n \"allow-insecure\": [\"*:foo\", \"*:bar\"],\n \"base-path\": \"/\",\n \"callback-address\": \"127.0.0.1\",\n \"callback-port\": 4723,\n \"debug-log-spacing\": true,\n \"default-capabilities\": {\n \"key\": \"value\"\n },\n \"deny-insecure\": [\"*:baz\", \"*:quux\"],\n \"driver\": {\n \"xcuitest\": {\n \"key\": \"value\"\n }\n },\n \"keep-alive-timeout\": 600,\n \"local-timezone\": true,\n \"log\": \"/tmp/appium.log\",\n \"log-level\": \"info\",\n \"log-no-colors\": false,\n \"log-timestamp\": true,\n \"long-stacktrace\": false,\n \"no-perms-check\": false,\n \"nodeconfig\": {\n \"key\": \"value\"\n },\n \"plugin\": {\n \"images\": {\n \"key\": \"value\"\n }\n },\n \"port\": 4723,\n \"relaxed-security\": false,\n \"session-override\": false,\n \"strict-caps\": true,\n \"tmp\": \"/tmp\",\n \"trace-dir\": \"/tmp/appium-instruments\",\n \"use-drivers\": [\"foo\", \"bar\"],\n \"use-plugins\": [\"baz\", \"quux\"],\n \"webhook\": \"https://some-url.com\"\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/sample-code/appium.config.sample.yaml\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nserver:\n address: 127.0.0.1\n allow-cors: true\n allow-insecure:\n - foo\n - bar\n base-path: /\n callback-address: 127.0.0.1\n callback-port: 4723\n debug-log-spacing: true\n default-capabilities:\n key: value\n deny-insecure:\n - baz\n - quux\n driver:\n xcuitest:\n key: value\n keep-alive-timeout: 600\n local-timezone: true\n log: /tmp/appium.log\n log-level: info\n log-no-colors: false\n log-timestamp: true\n long-stacktrace: false\n no-perms-check: false\n nodeconfig:\n key: value\n plugin:\n images:\n key: value\n port: 4723\n relaxed-security: false\n session-override: false\n strict-caps: true\n tmp: /tmp\n trace-dir: /tmp/appium-instruments\n use-drivers:\n - foo\n - bar\n use-plugins:\n - baz\n - quux\n webhook: https://some-url.com\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/sample-code/quickstarts/js/package.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"devDependencies\": {\n \"webdriverio\": \"9.23.3\"\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/sample-code/quickstarts/js/test.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nconst {remote} = require('webdriverio');\n\nconst capabilities = {\n platformName: 'Android',\n 'appium:automationName': 'UiAutomator2',\n 'appium:deviceName': 'Android',\n 'appium:appPackage': 'com.android.settings',\n 'appium:appActivity': '.Settings',\n};\n\nconst wdOpts = {\n hostname: process.env.APPIUM_HOST || 'localhost',\n port: parseInt(process.env.APPIUM_PORT, 10) || 4723,\n logLevel: 'info',\n capabilities,\n};\n\nasync function runTest() {\n const driver = await remote(wdOpts);\n try {\n const appsItem = await driver.$('//*[@text=\"Apps\"]');\n await appsItem.click();\n } finally {\n await driver.pause(1000);\n await driver.deleteSession();\n }\n}\n\nrunTest().catch(console.error);\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/sample-code/quickstarts/py/test.py\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport unittest\nfrom appium import webdriver\nfrom appium.options.android import UiAutomator2Options\nfrom appium.webdriver.common.appiumby import AppiumBy\n\ncapabilities = dict(\n platformName='Android',\n automationName='uiautomator2',\n deviceName='Android',\n appPackage='com.android.settings',\n appActivity='.Settings',\n language='en',\n locale='US'\n)\n\nappium_server_url = 'http://localhost:4723'\n\nclass TestAppium(unittest.TestCase):\n def setUp(self) -> None:\n self.driver = webdriver.Remote(appium_server_url, options=UiAutomator2Options().load_capabilities(capabilities))\n\n def tearDown(self) -> None:\n if self.driver:\n self.driver.quit()\n\n def test_find_apps(self) -> None:\n el = self.driver.find_element(by=AppiumBy.XPATH, value='//*[@text=\"Apps\"]')\n el.click()\n\nif __name__ == '__main__':\n unittest.main()\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/sample-code/quickstarts/rb/test.rb\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nrequire 'appium_lib_core'\nrequire 'test/unit'\n\nCAPABILITIES = {\n platformName: 'Android',\n automationName: 'uiautomator2',\n deviceName: 'Android',\n appPackage: 'com.android.settings',\n appActivity: '.Settings',\n language: 'en',\n locale: 'US'\n}\n\nSERVER_URL = 'http://localhost:4723'\n\nclass AppiumTest < Test::Unit::TestCase\n def setup\n @core = ::Appium::Core.for capabilities: CAPABILITIES\n @driver = @core.start_driver server_url: SERVER_URL\n end\n\n def teardown\n @driver&.quit\n end\n\n def test_find_apps\n @driver.wait { |d| d.find_element :xpath, '//*[@text=\"Apps\"]' }.click\n end\nend\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/scripts/autoinstall-extensions.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n#!/usr/bin/env node\n\n// @ts-check\n\n/* eslint-disable no-console, promise/prefer-await-to-then */\n\n/**\n * This script is intended to be run as a `postinstall` lifecycle script,\n * and will automatically install extensions if requested by the user.\n *\n * If the current working directory is within a project which has `appium`\n * as a dependency, this script does nothing; extensions must be managed\n * via `npm` or another package manager.\n *\n * If `CI=1` is in the environment, this script will exit with a non-zero\n * code upon failure (which will typically break a build). Otherwise, it\n * will always exit with code 0, even if errors occur.\n *\n * @module\n * @example\n * `npm install -g appium --drivers=uiautomator2,xcuitest --plugins=images`\n */\n\nconst B = require('bluebird');\nconst path = require('node:path');\nconst {realpath} = require('node:fs/promises');\n\nB.config({\n cancellation: true,\n});\n\n/** @type {typeof import('../lib/cli/extension').runExtensionCommand} */\nlet runExtensionCommand;\n/** @type {typeof import('../lib/constants').DRIVER_TYPE} */\nlet DRIVER_TYPE;\n/** @type {typeof import('../lib/constants').PLUGIN_TYPE} */\nlet PLUGIN_TYPE;\n/** @type {typeof import('../lib/extension').loadExtensions} */\nlet loadExtensions;\n\nconst ora = require('ora');\n\n/** @type {typeof import('@appium/support').env} */\nlet env;\n/** @type {typeof import('@appium/support').util} */\nlet util;\n/** @type {typeof import('@appium/support').logger} */\nlet logger;\n\nfunction log(message) {\n console.error(`[Appium] ${message}`);\n}\n\n/**\n * This is a naive attempt at determining whether or not we are in a dev environment; in other\n * words, is `postinstall` being run from within the `appium` monorepo?\n *\n * When we're in the monorepo, `npm_config_local_prefix` will be set to the root of the monorepo root\n * dir when running this lifecycle script from an `npm install` in the monorepo root.\n *\n * `realpath` is necessary due to macOS omitting `/private` from paths\n */\nasync function isDevEnvironment() {\n return (\n process.env.npm_config_local_prefix &&\n path.join(process.env.npm_config_local_prefix, 'packages', 'appium') ===\n (await realpath(path.join(__dirname, '..')))\n );\n}\n\n/**\n * Setup / check environment if we should do anything here\n * @returns {Promise} `true` if Appium is built and ready to go\n */\nasync function init() {\n if (await isDevEnvironment()) {\n log('Dev environment likely; skipping automatic installation of extensions');\n return false;\n }\n try {\n ({env, util, logger} = require('@appium/support'));\n // @ts-ignore This is OK\n ({runExtensionCommand} = require('../build/lib/cli/extension'));\n ({DRIVER_TYPE, PLUGIN_TYPE} = require('../build/lib/constants'));\n // @ts-ignore This is OK\n ({loadExtensions} = require('../build/lib/extension'));\n logger.getLogger('Appium').level = 'error';\n\n // if we're doing `npm install -g appium` then we will assume we don't have a local appium.\n if (!process.env.npm_config_global && (await env.hasAppiumDependency(process.cwd()))) {\n log(`Found local Appium installation; skipping automatic installation of extensions.`);\n return false;\n }\n return true;\n } catch {\n log('Dev environment likely; skipping automatic installation of extensions');\n return false;\n }\n}\n\nasync function main() {\n if (!(await init())) {\n return;\n }\n\n const driverEnv = process.env.npm_config_drivers;\n const pluginEnv = process.env.npm_config_plugins;\n\n const spinner = ora({\n text: 'Looking for extensions to automatically install...',\n prefixText: '[Appium]',\n }).start();\n\n if (!driverEnv && !pluginEnv) {\n spinner.succeed('No drivers or plugins to automatically install.');\n log(\n 'If desired, provide the argument \"--drivers=[,...]\" and/or ' +\n '\"--plugins=[,...]\" to the \"npm install appium\" command. ' +\n 'The specified extensions will be installed automatically alongside Appium. ' +\n 'For a list of known extensions, run \"appium list\".'\n );\n return;\n }\n\n /**\n * @type {[[typeof DRIVER_TYPE, string?], [typeof PLUGIN_TYPE, string?]]}\n */\n const specs = [\n [DRIVER_TYPE, driverEnv],\n [PLUGIN_TYPE, pluginEnv],\n ];\n\n spinner.start('Resolving Appium home directory...');\n const appiumHome = await env.resolveAppiumHome();\n spinner.succeed(`Found Appium home: ${appiumHome}`);\n\n spinner.start('Loading extension data...');\n const {driverConfig, pluginConfig} = await loadExtensions(appiumHome);\n spinner.succeed('Loaded extension data.');\n\n const installedStats = {[DRIVER_TYPE]: 0, [PLUGIN_TYPE]: 0};\n for (const [type, extEnv] of specs) {\n if (extEnv) {\n for await (let ext of extEnv.split(',')) {\n ext = ext.trim();\n try {\n await checkAndInstallExtension({\n runExtensionCommand,\n appiumHome,\n type,\n ext,\n driverConfig,\n pluginConfig,\n spinner,\n });\n installedStats[type]++;\n } catch (e) {\n spinner.fail(`Could not install ${type} \"${ext}\": ${e.message}`);\n if (process.env.CI) {\n process.exitCode = 1;\n }\n return;\n }\n }\n }\n }\n spinner.succeed(\n `Done. ${installedStats[DRIVER_TYPE]} ${util.pluralize(\n 'driver',\n installedStats[DRIVER_TYPE]\n )} and ${installedStats[PLUGIN_TYPE]} ${util.pluralize(\n 'plugin',\n installedStats[PLUGIN_TYPE]\n )} are installed.`\n );\n}\n\n/**\n * @privateRemarks the two `@ts-ignore` directives here are because I have no idea what's wrong with\n * the types and don't want to spend more time on it. regardless, it seems to work for now.\n * @param {CheckAndInstallExtensionsOpts} opts\n */\nasync function checkAndInstallExtension({\n runExtensionCommand,\n appiumHome,\n type,\n ext,\n driverConfig,\n pluginConfig,\n spinner,\n}) {\n const extList = await runExtensionCommand(\n // @ts-ignore This is OK\n {\n appiumHome,\n subcommand: type,\n [`${type}Command`]: 'list',\n showInstalled: true,\n suppressOutput: true,\n },\n type === DRIVER_TYPE ? driverConfig : pluginConfig\n );\n if (extList[ext]) {\n spinner.info(`The ${type} \"${ext}\" is already installed.`);\n return;\n }\n spinner.start(`Installing ${type} \"${ext}\"...`);\n await runExtensionCommand(\n // @ts-ignore this is OK\n {\n subcommand: type,\n appiumHome,\n [`${type}Command`]: 'install',\n suppressOutput: true,\n [type]: ext,\n },\n type === DRIVER_TYPE ? driverConfig : pluginConfig\n );\n spinner.succeed(`Installed ${type} \"${ext}\".`);\n}\n\nif (require.main === module) {\n main().catch((e) => {\n log(e);\n process.exitCode = 1;\n });\n}\n\nmodule.exports = main;\n\n/**\n * @typedef CheckAndInstallExtensionsOpts\n * @property {typeof runExtensionCommand} runExtensionCommand\n * @property {string} appiumHome\n * @property {DRIVER_TYPE | PLUGIN_TYPE} type\n * @property {string} ext\n * @property {import('../lib/extension/driver-config').DriverConfig} driverConfig\n * @property {import('../lib/extension/plugin-config').PluginConfig} pluginConfig\n * @property {import('ora').Ora} spinner\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/scripts/check-npm-pack-files.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n#!/usr/bin/env node\n\nconst path = require('node:path');\nconst childProcess = require('node:child_process');\nconst _ = require('lodash');\n\nconst res = JSON.parse(\n childProcess.execSync('npm pack --dry-run --json --ignore-scripts', {\n cwd: path.join(__dirname, '..'),\n encoding: 'utf8',\n })\n)[0];\n\n// List of files we are testing to make sure they are included in package\nconst testFiles = [\n 'LICENSE', // Check that license is included\n 'build/lib/appium.js', // Sanity check that build files are being included by testing just one file\n];\n\n// Get list of files in `testFiles` that aren't in the list of packaged fileNames\nconst missingFiles = _.without(testFiles, ..._.map(res.files, 'path'));\n\nif (!_.isEmpty(missingFiles)) {\n throw new Error(\n `Files [${missingFiles.join(', ')}] are not included in package.json \"files\". ` +\n `Please make sure these files are included before publishing.`\n );\n}\n\nprocess.exit(0);\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/scripts/parse-yml-commands.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n#!/usr/bin/env node\n\n// @ts-check\n\nconst path = require('node:path');\nconst yaml = require('yaml');\nconst {fs, util, logger} = require('@appium/support');\nconst Handlebars = require('handlebars');\nconst _ = require('lodash');\n\nconst log = logger.getLogger('YamlParser');\n\nconst validators = {\n isArray: (value, options) => {\n if (_.isUndefined(value) || _.isArray(value) || !options) {\n return null;\n }\n return 'must be an array';\n },\n presence: (value, options) => {\n if (_.isUndefined(value) && options) {\n return 'must be present';\n }\n return null;\n },\n hasAttributes: (value, options) => {\n if (!value || !options) {\n return null;\n }\n\n for (const item of (_.isArray(value) ? value : [value])) {\n for (const option of options) {\n if (!_.has(item, option)) {\n return `must have attributes: ${options}`;\n }\n }\n }\n return null;\n },\n hasPossibleAttributes(value, options) {\n if (!value || !_.isArray(value)) {\n // if just a bare value or empty, allow it through\n return null;\n }\n\n for (const item of value) {\n for (const key of _.keys(item)) {\n if (!_.includes(options, key)) {\n return `must not include '${key}'. Available options: ${options}`;\n }\n }\n }\n return null;\n },\n};\n\nconst CLIENT_URL_TYPES = {\n url: 'hostname',\n android: 'Android',\n ios: 'iOS',\n};\n\nconst constraints = {\n name: {presence: true},\n short_description: {presence: true},\n example_usage: {},\n 'example_usage.java': {},\n 'example_usage.javascript_wdio': {},\n 'example_usage.javascript_wd': {},\n 'example_usage.ruby': {},\n 'example_usage.ruby_core': {},\n 'example_usage.csharp': {},\n description: {},\n 'client_docs.java': {hasPossibleAttributes: _.keys(CLIENT_URL_TYPES)},\n 'client_docs.javascript_wdio': {\n hasPossibleAttributes: _.keys(CLIENT_URL_TYPES),\n },\n 'client_docs.javascript_wd': {\n hasPossibleAttributes: _.keys(CLIENT_URL_TYPES),\n },\n 'client_docs.ruby': {hasPossibleAttributes: _.keys(CLIENT_URL_TYPES)},\n 'client_docs.ruby_core': {hasPossibleAttributes: _.keys(CLIENT_URL_TYPES)},\n 'client_docs.csharp': {hasPossibleAttributes: _.keys(CLIENT_URL_TYPES)},\n endpoint: {presence: true},\n driver_support: {presence: true},\n 'endpoint.url': {presence: true},\n 'endpoint.url_parameters': {\n isArray: true,\n hasAttributes: ['name', 'description'],\n },\n 'endpoint.json_parameters': {\n isArray: true,\n hasAttributes: ['name', 'description'],\n },\n 'endpoint.response': {hasAttributes: ['type', 'description']},\n specifications: {presence: true},\n links: {isArray: true, hasAttributes: ['name', 'url']},\n};\n\n// What range of platforms do the driver's support\nconst platformRanges = {\n xcuitest: ['9.3'],\n uiautomation: ['8.0', '9.3'],\n espresso: ['?'],\n uiautomator2: ['?'],\n uiautomator: ['4.3'],\n windows: ['10'],\n mac: ['?'], // TODO\n};\n\n// When was the driver supported in Appium?\nconst appiumRanges = {\n xcuitest: ['1.6.0'],\n uiautomator2: ['1.6.0'],\n espresso: ['1.9.0'],\n windows: ['1.6.0'],\n mac: ['1.6.4'],\n};\n\nconst rootFolder = path.join(__dirname, '..', '..', '..');\n\n// Create Handlebars helper that shows a version range\nHandlebars.registerHelper('versions', function versionHelper(object, name, driverName) {\n if (!object) {\n return 'None';\n }\n\n if (!_.isObject(object)) {\n object = {};\n }\n\n let min = object[name ? `${name}_min` : 'min'];\n let max = object[name ? `${name}_max` : 'max'];\n\n if (!min) {\n if (name === 'appium' && _.isArray(appiumRanges[driverName])) {\n min = appiumRanges[driverName][0];\n } else if (name === 'platform' && _.isArray(platformRanges[driverName])) {\n min = platformRanges[driverName][0];\n }\n }\n\n if (!max) {\n if (name === 'appium' && appiumRanges[driverName]) {\n max = appiumRanges[driverName][1];\n } else if (name === 'platform' && platformRanges[driverName]) {\n max = platformRanges[driverName][1];\n }\n }\n\n if (!min && !max) {\n return 'All';\n } else if (!max) {\n return `${min}+`;\n } else if (!min) {\n return `<= ${max}`;\n }\n\n return `${min} to ${max}`;\n});\n\nHandlebars.registerHelper('hyphenate', (str) => str.replace('_', '-'));\nHandlebars.registerHelper('uppercase', (str) => str.toUpperCase());\n\nHandlebars.registerHelper('capitalize', function capitalizeDriver(driverName) {\n switch (driverName.toLowerCase()) {\n case 'xcuitest':\n return 'XCUITest';\n case 'uiautomation':\n return 'UIAutomation';\n case 'uiautomator2':\n return 'UiAutomator2';\n case 'uiautomator':\n return 'UiAutomator';\n case 'espresso':\n return 'Espresso';\n default:\n return driverName.length === 0\n ? driverName\n : driverName[0].toUpperCase() + driverName.substr(1);\n }\n});\n\nHandlebars.registerHelper('if_eq', function ifEq(a, b, opts) {\n if (a === b) {\n return opts.fn(this);\n } else {\n return opts.inverse(this);\n }\n});\n\nfunction getBaseHostname(fullUrl) {\n const baseUrl = new URL(fullUrl);\n return baseUrl.hostname;\n}\n\nHandlebars.registerHelper('base_url', function baseUrl(fullUrl) {\n return getBaseHostname(fullUrl);\n});\n\nHandlebars.registerHelper('client_url', function clientUrl(clientUrl) {\n if (!clientUrl) {\n return;\n }\n\n const createUrlString = function createUrlString(clientUrl, name = getBaseHostname(clientUrl)) {\n return `[${name}](${clientUrl})`;\n };\n\n if (!_.isArray(clientUrl)) {\n return createUrlString(clientUrl);\n }\n\n let urlStrings = [];\n for (const item of clientUrl) {\n for (let [key, value] of _.toPairs(item)) {\n key = key.toLowerCase();\n const urlStr =\n CLIENT_URL_TYPES[key] === 'hostname'\n ? createUrlString(value)\n : createUrlString(value, CLIENT_URL_TYPES[key]);\n urlStrings.push(urlStr);\n }\n }\n return urlStrings.join(' ');\n});\n\nasync function registerSpecUrlHelper() {\n const routesFile = await fs.readFile(\n require.resolve('@appium/base-driver/lib/protocol/routes.js'),\n 'utf8'\n );\n const routesFileLines = routesFile.split('\\n');\n\n Handlebars.registerHelper('spec_url', function specUrl(specUrl, endpoint) {\n // return the url if it is not a link to our routes doc\n if (!specUrl.includes('routes.js')) {\n return specUrl;\n }\n // make sure it is a full url\n if (specUrl.startsWith('routes.js')) {\n specUrl = `https://github.com/appium/appium-base-driver/blob/master/lib/protocol/${specUrl}`;\n }\n\n // strip off any line numbers\n specUrl = specUrl.split('#L')[0];\n\n // the endpoint here is often `session_id` and we need `sessionId`\n endpoint = endpoint.replace('session_id', 'sessionId');\n // and `element_id` and we need `elementId`\n endpoint = endpoint.replace('element_id', 'elementId');\n\n // find the line number for this endpoint\n let index;\n for (const i in routesFileLines) {\n if (routesFileLines[i].includes(endpoint)) {\n // line numbers are 1-indexed\n index = parseInt(i, 10) + 1;\n break;\n }\n }\n if (_.isUndefined(index)) {\n throw new Error(\n `Unable to find entry in 'appium-base-driver#routes' for endpoint '${endpoint}'`\n );\n }\n\n return `${specUrl}#L${index}`;\n });\n}\n\nconst YAML_DIR = path.join(__dirname, '..', 'commands-yml');\n\nfunction validate(values) {\n const result = {};\n for (const [key, constraint] of _.toPairs(constraints)) {\n const value = values[key];\n for (const [validatorName, options] of _.toPairs(constraint)) {\n if (!(validatorName in validators)) {\n continue;\n }\n\n const validationError = validators[validatorName](value, options, key);\n if (_.isNil(validationError)) {\n continue;\n }\n\n if (key in result) {\n result[key].push(validationError);\n } else {\n result[key] = [validationError];\n }\n }\n }\n return _.isEmpty(result) ? null : result;\n}\n\nasync function generateCommands() {\n await registerSpecUrlHelper();\n\n const commands = path.resolve(YAML_DIR, 'commands/**/*.yml');\n log.info('Traversing YML files', commands);\n await fs.rimraf(path.resolve(rootFolder, 'docs', 'en', 'commands'));\n\n // get the template from which the md files will be created\n const template = Handlebars.compile(\n await fs.readFile(path.resolve(YAML_DIR, 'template.md'), 'utf8'),\n {noEscape: true, strict: true}\n );\n\n let fileCount = 0;\n for (const filename of await fs.glob(commands)) {\n const relativeFilename = path.relative(YAML_DIR, filename);\n log.info(`Rendering file: ${filename} ${relativeFilename}`);\n\n // Translate the YML specs to JSON\n const inputYML = await fs.readFile(filename, 'utf8');\n const inputJSON = yaml.parse(inputYML);\n inputJSON.ymlFileName = `/${path.relative(rootFolder, filename)}`;\n const validationErrors = validate(inputJSON);\n if (validationErrors) {\n throw new Error(`Data validation error for ${filename}: ${JSON.stringify(validationErrors)}`);\n }\n\n // Pass the inputJS into our Handlebars template\n const markdown = template(inputJSON);\n\n // Write the markdown to its right place\n const ext = path.extname(relativeFilename);\n const markdownPath = `${relativeFilename.substring(\n 0,\n relativeFilename.length - ext.length\n )}.md`;\n const outfile = path.resolve(rootFolder, 'docs', 'en', markdownPath);\n log.info(` Writing to: ${outfile}`);\n await fs.mkdirp(path.dirname(outfile));\n await fs.writeFile(outfile, markdown, 'utf8');\n\n fileCount++;\n }\n log.info(`Done writing ${fileCount} command documents`);\n}\n\nasync function generateCommandIndex() {\n function getTree(element, path) {\n let node = {\n name: element[0],\n };\n if (!_.isArray(element[1])) {\n node.path = `${path}/${element[1]}`;\n } else {\n node.path = `${path}/${element[1][0]}`;\n const name = element[1].shift();\n node.commands = [];\n for (let subElement of element[1]) {\n node.commands.push(getTree(subElement, `${path}/${name}`));\n }\n }\n return node;\n }\n\n // parse the toc.js file and get the commands into the form of\n // {commands: [{name: '', path: ''}, {name: '', commands: [...]}]}\n const toc = require(path.resolve(rootFolder, 'docs', 'toc.js'));\n const commandToc = _.find(toc.en, (value) => value.indexOf('Commands') === 0);\n const commands = [];\n for (let el of commandToc[1].slice(1)) {\n commands.push(getTree(el, '/docs/en/commands'));\n }\n\n const commandTemplate = Handlebars.compile(\n await fs.readFile(path.resolve(YAML_DIR, 'api-template.md'), 'utf8'),\n {noEscape: true, strict: true}\n );\n\n async function writeIndex(index, commands, indexPath) {\n log.info(`Creating API index '${index}'`);\n const commandMarkdown = commandTemplate({\n commands,\n path: indexPath,\n });\n await fs.writeFile(index, commandMarkdown, 'utf8');\n }\n\n const apiIndex = path.resolve(rootFolder, 'docs', 'en', 'about-appium', 'api.md');\n await writeIndex(apiIndex, commands);\n log.info(`Done writing main API index`);\n\n async function writeIndividualIndexes(command) {\n if (!util.hasValue(command.commands)) {\n // this is a leaf, so end\n return;\n }\n\n // write this node\n const relPath = command.path.startsWith(path.sep) ? command.path.substring(1) : command.path;\n const index = path.resolve(rootFolder, relPath, 'README.md');\n await writeIndex(index, command.commands, command.path);\n\n // go through all the sub-commands\n for (const el of command.commands) {\n await writeIndividualIndexes(el);\n }\n }\n\n // go through the full tree and generate readme files\n const index = path.resolve(rootFolder, 'docs', 'en', 'commands', 'README.md');\n await writeIndex(index, commands);\n for (const el of commands) {\n await writeIndividualIndexes(el);\n }\n}\n\nasync function main() {\n await generateCommands();\n await generateCommandIndex();\n}\n\nmain();\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/helpers.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport getPort from 'get-port';\nimport path from 'node:path';\nimport rewiremock, {addPlugin, overrideEntryPoint, plugins} from 'rewiremock';\nimport {insertAppiumPrefixes} from '../lib/utils';\n\nconst TEST_HOST = '127.0.0.1';\n\nconst FAKE_DRIVER_DIR = path.dirname(require.resolve('@appium/fake-driver/package.json'));\n\nconst FAKE_PLUGIN_DIR = path.dirname(require.resolve('@appium/fake-plugin/package.json'));\n\n/**\n * This is the monorepo root.\n */\nconst PROJECT_ROOT = path.join(FAKE_DRIVER_DIR, '..', '..');\n\n/**\n * Path to Appium package\n */\nconst APPIUM_ROOT = path.join(PROJECT_ROOT, 'packages', 'appium');\n\n/**\n * Path to fake app fixture `.xml` (as understood by `FakeDriver`)\n */\nconst TEST_FAKE_APP = path.join(FAKE_DRIVER_DIR, 'test', 'fixtures', 'app.xml');\n\nconst BASE_CAPS = {\n automationName: 'Fake',\n platformName: 'Fake',\n deviceName: 'Fake',\n app: TEST_FAKE_APP,\n};\n\nconst W3C_PREFIXED_CAPS = {...insertAppiumPrefixes(BASE_CAPS)};\n\n/** @type {import('@appium/types').W3CCapabilities} */\nconst W3C_CAPS = {\n alwaysMatch: {...W3C_PREFIXED_CAPS},\n firstMatch: [{}],\n};\n\nlet TEST_PORT;\n/**\n * Returns a free port; one per process\n * @returns {Promise} a free port\n */\nasync function getTestPort() {\n return await (TEST_PORT || getPort());\n}\n\n/**\n * Resolve a file relative to the `fixtures` dir\n * @param {string} filename - Filename to resolve\n * @param {...string} pathParts - Additional paths to `join()`\n * @returns {string}\n */\nfunction resolveFixture(filename, ...pathParts) {\n return path.join(__dirname, 'fixtures', filename, ...pathParts);\n}\n\noverrideEntryPoint(module);\naddPlugin(plugins.nodejs);\n\nexport {\n TEST_FAKE_APP,\n TEST_HOST,\n BASE_CAPS,\n W3C_PREFIXED_CAPS,\n W3C_CAPS,\n PROJECT_ROOT,\n getTestPort,\n rewiremock,\n resolveFixture,\n FAKE_DRIVER_DIR,\n FAKE_PLUGIN_DIR,\n APPIUM_ROOT,\n};\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/e2e/args.e2e.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport getPort from 'get-port';\nimport {tempDir, fs} from '@appium/support';\nimport {exec} from 'teen_process';\nimport B from 'bluebird';\nimport {\n readAppiumArgErrorFixture,\n formatAppiumArgErrorOutput,\n EXECUTABLE,\n runAppiumRaw,\n} from './e2e-helpers';\nimport {APPIUM_ROOT} from '../helpers';\nimport { stripColorCodes } from '../../lib/logsink';\n\ndescribe('argument parsing', function () {\n /**\n * @type {string}\n */\n let appiumHome;\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n\n appiumHome = await tempDir.openDir();\n });\n\n after(async function () {\n await fs.rimraf(appiumHome);\n });\n\n describe('when the user provides a very long string for an arg accepting a blob or filename', function () {\n describe('when the very long string is a JSON blob', function () {\n it('should not throw an ENAMETOOLONG exception', async function () {\n this.timeout(10000);\n const capsArg = JSON.stringify({\n 'appium:platformName': 'ANDROID',\n 'appium:platformVersion': '11',\n 'appium:deviceName':\n 'Spicy jalapeno bacon ipsum dolor amet deserunt tempor pork belly aliqua drumstick, occaecat dolor venison et labore. Rump meatball pork chop tail. Consequat adipisicing kielbasa occaecat laborum pig. Qui pork chop chicken nostrud boudin fugiat. Proident ut culpa, chuck nulla sunt pastrami ut tri-tip. Buffalo dolore adipisicing, labore venison elit beef fatback kevin burgdoggen tail pancetta filet mignon. Dolor turducken rump, anim kevin sunt exercitation ham filet mignon beef ribs ad officia eiusmod id cillum.',\n });\n\n await expect(\n exec(\n process.execPath,\n [\n EXECUTABLE,\n '-pa=/wd/hub',\n '--session-override',\n '--local-timezone',\n '--relaxed-security',\n `--default-capabilities=${capsArg}`,\n '--port',\n String(await getPort()),\n ],\n {\n env: {APPIUM_HOME: appiumHome, PATH: process.env.PATH},\n cwd: APPIUM_ROOT,\n timeout: 5000,\n }\n )\n ).to.be.rejectedWith(Error, /timed out/);\n });\n });\n });\n describe('when the user provides an string where a number was expected', function () {\n describe('when color output is supported', function () {\n it('should output a fancy error message', async function () {\n const {stderr: actual} = await runAppiumRaw(appiumHome, ['--port=sheep'], {\n env: {FORCE_COLOR: '1'},\n });\n expect(stripColorCodes(actual)).to.not.equal(actual);\n });\n });\n\n describe('when color output is unsupported', function () {\n it('should output a colorless yet fancy error message', async function () {\n const {stderr: actual} = await runAppiumRaw(appiumHome, ['--port=sheep'], {});\n expect(stripColorCodes(actual)).to.equal(actual);\n });\n });\n });\n\n describe('when the user provides a value for a boolean argument', function () {\n it('should output a basic error message', async function () {\n const [{stderr: actual}, expected] = await B.all([\n runAppiumRaw(appiumHome, ['--relaxed-security=sheep'], {}),\n readAppiumArgErrorFixture('cli/cli-error-output-boolean.txt'),\n ]);\n expect(formatAppiumArgErrorOutput(actual)).to.equal(expected);\n });\n });\n\n describe('when the user provides an unknown argument', function () {\n it('should output a basic error message', async function () {\n const [{stderr: actual}, expected] = await B.all([\n runAppiumRaw(appiumHome, ['--pigs=sheep'], {}),\n readAppiumArgErrorFixture('cli/cli-error-output-unknown.txt'),\n ]);\n expect(formatAppiumArgErrorOutput(actual)).to.equal(expected);\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/e2e/cli-driver.e2e.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport {exec} from 'teen_process';\nimport {fs, system, tempDir, util} from '@appium/support';\nimport path from 'node:path';\nimport resolveFrom from 'resolve-from';\nimport {\n DRIVER_TYPE,\n EXT_SUBCOMMAND_INSTALL as INSTALL,\n EXT_SUBCOMMAND_LIST as LIST,\n EXT_SUBCOMMAND_RUN as RUN,\n EXT_SUBCOMMAND_UNINSTALL as UNINSTALL,\n EXT_SUBCOMMAND_DOCTOR as DOCTOR,\n KNOWN_DRIVERS,\n} from '../../lib/constants';\nimport {FAKE_DRIVER_DIR, resolveFixture} from '../helpers';\nimport {installLocalExtension, runAppiumJson, runAppiumRaw} from './e2e-helpers';\n\nconst TEST_DRIVER_DIR = path.dirname(resolveFixture('test-driver/package.json'));\n\nconst TEST_DRIVER_INVALID_PEERS_DIR = path.dirname(\n resolveFixture('test-driver-invalid-peer-dep/package.json')\n);\n\ndescribe('Driver CLI', function () {\n this.timeout(90000); // some of these tests involve network and can be very slow\n\n /**\n * @type {string}\n */\n let appiumHome;\n\n /**\n * @type {(args?: string[]) => Promise}\n */\n let runList;\n\n /**\n * @type {(args: string[]) => Promise<{ output: string, error?: string }>}\n */\n let runRun;\n\n /**\n * @type {(args: string[]) => Promise>}\n */\n let runInstall;\n\n /**\n * @type {(args: string[]) => Promise>}\n */\n let runUninstall;\n\n /**\n * @type {(args: string[]) => Promise>}\n */\n let runDoctor;\n let expect;\n\n async function resetAppiumHome() {\n await fs.rimraf(appiumHome);\n await fs.mkdirp(appiumHome);\n }\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n\n appiumHome = await tempDir.openDir();\n const run = runAppiumJson(appiumHome);\n runInstall = async (args) =>\n /** @type {ReturnType} */ (await run([DRIVER_TYPE, INSTALL, ...args]));\n runUninstall = async (args) =>\n /** @type {ReturnType} */ (await run([DRIVER_TYPE, UNINSTALL, ...args]));\n runList = async (args = []) =>\n /** @type {ReturnType} */ (await run([DRIVER_TYPE, LIST, ...args]));\n runRun = async (args) =>\n /** @type {ReturnType} */ (await run([DRIVER_TYPE, RUN, ...args]));\n runDoctor = async (args) =>\n /** @type {ReturnType} */ (await run([DRIVER_TYPE, DOCTOR, ...args]));\n });\n\n after(async function () {\n await fs.rimraf(appiumHome);\n });\n\n describe(LIST, function () {\n it('should list available drivers', async function () {\n // note this is raw, not json\n const {stderr} = await runAppiumRaw(appiumHome, [DRIVER_TYPE, LIST], {});\n for (const d of Object.keys(KNOWN_DRIVERS)) {\n stderr.should.match(new RegExp(`${d}.+[not installed]`));\n }\n });\n\n it('should list available drivers in json format', async function () {\n const driverData = await runList();\n for (const d of Object.keys(KNOWN_DRIVERS)) {\n driverData[d].should.have.property('installed', false);\n driverData[d].should.have.property('pkgName', KNOWN_DRIVERS[d]);\n // repositoryUrl may be present if available\n if (driverData[d].repositoryUrl) {\n driverData[d].repositoryUrl.should.be.a('string');\n }\n }\n });\n\n it('should allow filtering by installed drivers', async function () {\n const out = await runList(['--installed']);\n out.should.eql({});\n });\n\n it('should show updates for installed drivers with --updates', async function () {\n\n if (system.isWindows()) {\n // TODO: Windows path handling may need fixes in npm exec or extension command parsing\n return this.skip();\n }\n const versions = /** @type {string[]} */ (\n JSON.parse(\n (\n await exec('npm', ['view', '@appium/fake-driver', 'versions', '--json'], {\n encoding: 'utf-8',\n })\n ).stdout\n )\n );\n\n const penultimateFakeDriverVersionAsOfRightNow = versions[versions.length - 2];\n\n await resetAppiumHome();\n await runInstall([\n `@appium/fake-driver@${penultimateFakeDriverVersionAsOfRightNow}`,\n '--source',\n 'npm',\n ]);\n const {fake} =\n /** @type {Record} */ (\n await runList(['--updates'])\n );\n const updateVersion = fake.updateVersion || fake.unsafeUpdateVersion;\n if (!updateVersion) {\n throw new Error(`No update version found. Expected an update from ${penultimateFakeDriverVersionAsOfRightNow} to a newer version, but got null. This might indicate the update check is not working properly.`);\n }\n util.compareVersions(\n String(updateVersion),\n '>',\n penultimateFakeDriverVersionAsOfRightNow\n ).should.be.true;\n // TODO: this could probably be replaced by looking at updateVersion in the JSON\n const {stderr} = await runAppiumRaw(appiumHome, [DRIVER_TYPE, LIST, '--updates'], {});\n stderr.should.match(new RegExp(`fake.+[${updateVersion} available]`));\n });\n\n describe('if a driver is not published to npm', function () {\n it('should not throw an error', async function () {\n await resetAppiumHome();\n await installLocalExtension(appiumHome, DRIVER_TYPE, TEST_DRIVER_DIR);\n await expect(runList(['--updates'])).not.to.be.rejected;\n });\n });\n });\n\n describe(INSTALL, function () {\n beforeEach(async function () {\n await resetAppiumHome();\n });\n\n it('should not install appium in APPIUM_HOME', async function () {\n await installLocalExtension(appiumHome, DRIVER_TYPE, FAKE_DRIVER_DIR);\n await fs.stat(path.join(appiumHome, 'node_modules', 'appium')).should.be.rejected;\n });\n\n it('should install a driver from the list of known drivers', async function () {\n const ret = await runInstall(['uiautomator2']);\n ret.uiautomator2.pkgName.should.eql('appium-uiautomator2-driver');\n ret.uiautomator2.installType.should.eql('npm');\n ret.uiautomator2.installSpec.should.eql('uiautomator2');\n const list = await runList(['--installed']);\n // @ts-ignore\n delete list.uiautomator2.installed;\n // @ts-ignore\n delete list.uiautomator2.repositoryUrl;\n list.should.eql(ret);\n });\n\n it('should install a driver from npm', async function () {\n const ret = await runInstall(['@appium/fake-driver', '--source', 'npm']);\n ret.fake.pkgName.should.eql('@appium/fake-driver');\n ret.fake.installType.should.eql('npm');\n ret.fake.installSpec.should.eql('@appium/fake-driver');\n const list = await runList(['--installed']);\n // @ts-ignore\n delete list.fake.installed;\n // @ts-ignore\n delete list.fake.repositoryUrl;\n list.should.eql(ret);\n });\n\n it('should install a driver from npm and a local driver', async function () {\n await runInstall(['@appium/fake-driver', '--source', 'npm']);\n await installLocalExtension(appiumHome, DRIVER_TYPE, TEST_DRIVER_DIR);\n const list = await runList(['--installed']);\n expect(list.fake).to.exist;\n expect(list.test).to.exist;\n expect(() => resolveFrom(appiumHome, '@appium/fake-driver')).not.to.throw;\n expect(() => resolveFrom(appiumHome, 'test-driver')).not.to.throw;\n });\n\n it('should install _two_ drivers from npm', async function () {\n await runInstall(['@appium/fake-driver', '--source', 'npm']);\n await runInstall(['appium-uiautomator2-driver', '--source', 'npm']);\n const list = await runList(['--installed']);\n expect(list.fake).to.exist;\n expect(list.uiautomator2).to.exist;\n expect(() => resolveFrom(appiumHome, '@appium/fake-driver')).not.to.throw;\n expect(() => resolveFrom(appiumHome, 'appium-uiautomator2-driver')).not.to.throw;\n });\n\n it('should install a driver from npm with a specific version/tag', async function () {\n const currentFakeDriverVersionAsOfRightNow = '3.0.5';\n const installSpec = `@appium/fake-driver@${currentFakeDriverVersionAsOfRightNow}`;\n const ret = await runInstall([installSpec, '--source', 'npm']);\n ret.fake.pkgName.should.eql('@appium/fake-driver');\n ret.fake.installType.should.eql('npm');\n ret.fake.installSpec.should.eql(installSpec);\n const list = await runList(['--installed']);\n // @ts-ignore\n delete list.fake.installed;\n // @ts-ignore\n delete list.fake.repositoryUrl;\n list.should.eql(ret);\n });\n\n it('should install a driver from GitHub', async function () {\n if (process.env.CI) {\n // This test is too slow for CI env\n return this.skip();\n }\n\n const ret = await runInstall([\n 'appium/appium-fake-driver',\n '--source',\n 'github',\n '--package',\n 'appium-fake-driver',\n ]);\n ret.fake.pkgName.should.eql('appium-fake-driver');\n ret.fake.installType.should.eql('github');\n ret.fake.installSpec.should.eql('appium/appium-fake-driver');\n const list = await runList(['--installed']);\n // @ts-ignore\n delete list.fake.installed;\n // @ts-ignore\n delete list.fake.repositoryUrl;\n list.should.eql(ret);\n });\n\n it('should install a driver from a local git repo', async function () {\n const ret = await runInstall([\n FAKE_DRIVER_DIR,\n '--source',\n 'git',\n '--package',\n '@appium/fake-driver',\n ]);\n ret.fake.pkgName.should.eql('@appium/fake-driver');\n ret.fake.installType.should.eql('git');\n ret.fake.installSpec.should.eql(FAKE_DRIVER_DIR);\n const list = await runList(['--installed', '--json']);\n // @ts-ignore\n delete list.fake.installed;\n // @ts-ignore\n delete list.fake.repositoryUrl;\n list.should.eql(ret);\n });\n\n it('should install a driver from a remote git repo', async function () {\n if (process.env.CI) {\n // This test is too slow for CI env\n return this.skip();\n }\n\n const ret = await runInstall([\n 'git+https://github.com/appium/appium-fake-driver.git',\n '--source',\n 'git',\n '--package',\n 'appium-fake-driver',\n ]);\n ret.fake.pkgName.should.eql('appium-fake-driver');\n ret.fake.installType.should.eql('git');\n ret.fake.installSpec.should.eql('git+https://github.com/appium/appium-fake-driver');\n const list = await runList(['--installed']);\n // @ts-ignore\n delete list.fake.installed;\n // @ts-ignore\n delete list.fake.repositoryUrl;\n list.should.eql(ret);\n });\n\n describe('when peer dependencies are invalid', function () {\n it('should install the driver anyway', async function () {\n const ret = await installLocalExtension(\n appiumHome,\n DRIVER_TYPE,\n TEST_DRIVER_INVALID_PEERS_DIR\n );\n ret.test.pkgName.should.equal('test-driver-invalid-peer-dep');\n const list = await runList(['--installed']);\n list.test.pkgName.should.equal('test-driver-invalid-peer-dep');\n });\n\n it('should warn the user that peer deps are invalid', async function () {\n const ret = await runAppiumRaw(\n appiumHome,\n [DRIVER_TYPE, INSTALL, '--source', 'local', TEST_DRIVER_INVALID_PEERS_DIR],\n {}\n );\n ret.stderr.should.match(/may be incompatible with the current version of Appium/i);\n ret.stderr.should.match(/successfully installed/i);\n });\n });\n\n describe('when peer dependencies are valid', function () {\n it('should not display a warning', async function () {\n const ret = await runAppiumRaw(\n appiumHome,\n [DRIVER_TYPE, INSTALL, '--source', 'local', TEST_DRIVER_DIR],\n {}\n );\n ret.stderr.should.not.match(/may be incompatible with the current version of Appium/i);\n ret.stderr.should.match(/successfully installed/i);\n });\n });\n });\n\n describe(`Local ${INSTALL}`, function () {\n // NOTE: This suite is separate because we don't to run `clear()` before each test.\n\n /** @type {ExtRecord} */\n let installResult;\n\n /** @type {ExtensionListData} */\n let listResult;\n\n /** @type {string} */\n let installPath;\n\n before(async function () {\n await resetAppiumHome();\n // take advantage of the fact that we know we have fake driver installed as a dependency in\n // this module, so we know its local path on disk\n installResult = await installLocalExtension(appiumHome, DRIVER_TYPE, FAKE_DRIVER_DIR);\n listResult = await runList(['--installed']);\n installPath = resolveFrom(appiumHome, '@appium/fake-driver');\n });\n\n it('should install a driver from a local npm module', function () {\n expect(installResult.fake).to.include({\n pkgName: '@appium/fake-driver',\n installType: 'local',\n installSpec: FAKE_DRIVER_DIR,\n });\n });\n\n it('should show the installed driver in the list of extensions', function () {\n expect(listResult.fake).to.deep.include(installResult.fake);\n });\n\n // this fails in CI and I don't know why\n it.skip('should create a symlink', async function () {\n const srcStat = await fs.lstat(FAKE_DRIVER_DIR);\n const destStat = await fs.lstat(appiumHome);\n if (srcStat.dev !== destStat.dev) {\n return this.skip();\n }\n // it should be a link! this may be npm-version dependent, but it's worked\n // this way for quite awhile\n const stat = await fs.lstat(installPath);\n expect(stat.isSymbolicLink()).to.be.true;\n });\n });\n\n describe('uninstall', function () {\n beforeEach(async function () {\n await resetAppiumHome();\n await installLocalExtension(appiumHome, DRIVER_TYPE, FAKE_DRIVER_DIR);\n });\n\n it('should uninstall a driver based on its driver name', async function () {\n const uninstall = await runUninstall(['fake']);\n uninstall.should.not.have.key('fake');\n expect(fs.exists(path.join(appiumHome, 'node_modules', '@appium', 'fake-driver'))).to\n .eventually.be.false;\n });\n });\n\n describe('run', function () {\n const driverName = 'fake';\n\n before(async function () {\n await resetAppiumHome();\n await installLocalExtension(appiumHome, DRIVER_TYPE, FAKE_DRIVER_DIR);\n });\n\n describe('when the driver and script is valid', function () {\n const scriptName = 'fake-success';\n\n describe('when the script completes successfully', function () {\n it('should result in success', async function () {\n const out = await runRun([driverName, scriptName]);\n out.should.not.have.property('error');\n });\n });\n\n describe('when the script fails', function () {\n it('should throw an error', async function () {\n await expect(runRun([driverName, 'fake-error'])).to.be.rejectedWith(Error);\n });\n });\n\n describe('when passed extra arguments', function () {\n it('should pass them to the script', async function () {\n const out = await runRun([driverName, scriptName, '--foo', '--bar']);\n out.should.not.have.property('error');\n out.output.should.match(/--foo --bar/);\n });\n });\n });\n\n describe('when the driver is valid but the script is not', function () {\n it('should throw an error', async function () {\n await expect(runRun([driverName, 'foo'])).to.be.rejectedWith(Error);\n });\n });\n\n describe('when the driver and script are invalid', function () {\n it('should throw an error', async function () {\n const driverName = 'foo';\n await expect(runRun([driverName, 'bar'])).to.be.rejectedWith(Error);\n });\n });\n });\n\n describe('doctor', function () {\n const driverName = 'fake';\n\n before(async function () {\n await resetAppiumHome();\n await installLocalExtension(appiumHome, DRIVER_TYPE, FAKE_DRIVER_DIR);\n });\n\n describe('when the driver defines doctor checks', function () {\n it('should load and run them', async function () {\n const checksLen = await runDoctor([driverName]);\n checksLen.should.eql(2);\n });\n });\n });\n});\n\n/**\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n * @typedef {import('appium/types').ManifestData} ManifestData\n * @typedef {import('@appium/types').DriverType} DriverType\n * @typedef {import('@appium/types').PluginType} PluginType\n * @typedef {import('appium/lib/cli/extension-command').ExtensionListData} ExtensionListData\n * @typedef {import('./e2e-helpers').CliArgs} CliArgs\n * @typedef {import('appium/types').CliExtensionSubcommand} CliExtensionSubcommand\n */\n\n/**\n * @template ExtSubCommand\n * @typedef {import('./e2e-helpers').CliExtArgs} CliExtArgs\n */\n\n/**\n * @template T\n * @typedef {import('appium/types').ExtRecord} ExtRecord\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/e2e/cli-plugin.e2e.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport {fs, tempDir} from '@appium/support';\nimport {EXT_SUBCOMMAND_RUN as RUN, PLUGIN_TYPE} from '../../lib/constants';\nimport {FAKE_PLUGIN_DIR} from '../helpers';\nimport {installLocalExtension, runAppiumJson} from './e2e-helpers';\n\ndescribe('Plugin CLI', function () {\n /**\n * @type {string}\n */\n let appiumHome;\n\n /**\n * @type {(args: string[]) => Promise<{ output: string, error?: string }>}\n */\n let runRun;\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n\n appiumHome = await tempDir.openDir();\n const run = runAppiumJson(appiumHome);\n runRun = async (args) =>\n /** @type {ReturnType} */ (await run([PLUGIN_TYPE, RUN, ...args]));\n });\n\n after(async function () {\n await fs.rimraf(appiumHome);\n });\n\n describe('run', function () {\n before(async function () {\n await installLocalExtension(appiumHome, PLUGIN_TYPE, FAKE_PLUGIN_DIR);\n });\n\n it('should run a valid plugin, valid script, and result in success', async function () {\n const pluginName = 'fake';\n const scriptName = 'fake-success';\n const out = await runRun([pluginName, scriptName, '--json']);\n out.should.not.have.property('error');\n });\n\n it('should run a valid plugin, valid error prone script, and throw error', async function () {\n const pluginName = 'fake';\n await expect(runRun([pluginName, 'fake-error', '--json'])).to.be.rejectedWith(Error);\n });\n\n it('should take a valid plugin, invalid script, and throw an error', async function () {\n const pluginName = 'fake';\n await expect(runRun([pluginName, 'foo', '--json'])).to.be.rejectedWith(Error);\n });\n\n it('should take an invalid plugin, invalid script, and throw an error', async function () {\n await expect(runRun(['foo', 'bar', '--json'])).to.be.rejectedWith(Error);\n });\n });\n});\n\n/**\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n * @typedef {import('appium/types').ManifestData} ManifestData\n * @typedef {import('@appium/types').DriverType} DriverType\n * @typedef {import('@appium/types').PluginType} PluginType\n * @typedef {import('appium/lib/cli/extension-command').ExtensionList} ExtensionListData\n * @typedef {import('./e2e-helpers').CliArgs} CliArgs\n * @typedef {import('appium/types').CliExtensionSubcommand} CliExtensionSubcommand\n */\n\n/**\n * @template ExtSubCommand\n * @typedef {import('./e2e-helpers').CliExtArgs} CliExtArgs\n */\n\n/**\n * @template T\n * @typedef {import('appium/types').ExtRecord} ExtRecord\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/e2e/config-file.e2e.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport {DRIVER_TYPE} from '../../lib/constants';\nimport {readConfigFile} from '../../lib/config-file';\nimport {finalizeSchema, registerSchema, resetSchema} from '../../lib/schema/schema';\nimport extSchema from '../fixtures/driver-schema';\nimport {resolveFixture} from '../helpers';\nimport _ from 'lodash';\nimport {system} from '@appium/support';\n\nconst resolveConfigFixture = _.partial(resolveFixture, 'config');\n\ndescribe('config file behavior', function () {\n const GOOD_FILEPATH = resolveConfigFixture('appium-config-good.json');\n const BAD_NODECONFIG_FILEPATH = resolveConfigFixture('appium-config-bad-nodeconfig.json');\n const BAD_FILEPATH = resolveConfigFixture('appium-config-bad.json');\n const INVALID_JSON_FILEPATH = resolveConfigFixture('appium-config-invalid.json');\n const SECURITY_ARRAY_FILEPATH = resolveConfigFixture('appium-config-security-array.json');\n const SECURITY_DELIMITED_FILEPATH = resolveConfigFixture('appium-config-security-delimited.json');\n const SECURITY_PATH_FILEPATH = resolveConfigFixture('appium-config-security-path.json');\n const UNKNOWN_PROPS_FILEPATH = resolveConfigFixture('appium-config-ext-unknown-props.json');\n const EXT_PROPS_FILEPATH = resolveConfigFixture('appium-config-ext-good.json');\n const LOG_FILTERS_FILEPATH = resolveConfigFixture('appium-config-log-filters.json');\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n });\n\n beforeEach(function () {\n finalizeSchema();\n });\n\n afterEach(function () {\n resetSchema();\n });\n\n describe('when provided a path to a config file', function () {\n describe('when the config file is valid per the schema', function () {\n it('should return a valid config object', async function () {\n const result = await readConfigFile(GOOD_FILEPATH);\n result.should.deep.equal({\n config: {\n server: {\n address: '0.0.0.0',\n allowCors: false,\n allowInsecure: [],\n basePath: '/',\n callbackAddress: '0.0.0.0',\n callbackPort: 31337,\n debugLogSpacing: false,\n defaultCapabilities: {},\n denyInsecure: [],\n keepAliveTimeout: 600,\n localTimezone: false,\n logFile: '/tmp/appium.log',\n loglevel: 'info',\n logNoColors: false,\n logTimestamp: false,\n longStacktrace: false,\n noPermsCheck: false,\n nodeconfig: {\n foo: 'bar',\n },\n port: 31337,\n relaxedSecurityEnabled: true,\n sessionOverride: false,\n strictCaps: false,\n tmpDir: '/tmp',\n traceDir: '/tmp/appium-instruments',\n useDrivers: [],\n usePlugins: ['all'],\n webhook: 'http://0.0.0.0/hook',\n },\n },\n filepath: GOOD_FILEPATH,\n errors: [],\n });\n });\n\n describe('`server.nodeconfig` behavior', function () {\n describe('when a string', function () {\n it('should return errors', async function () {\n const result = await readConfigFile(BAD_NODECONFIG_FILEPATH);\n result.should.have.nested.property('errors[0].instancePath', '/server/nodeconfig');\n });\n });\n\n describe('when an object', function () {\n it('should return a valid config object', async function () {\n const result = await readConfigFile(GOOD_FILEPATH);\n result.should.have.property('errors').that.is.empty;\n });\n });\n });\n\n describe('`server.allow-insecure` behavior', function () {\n describe('when a string path', function () {\n it('should return errors', async function () {\n const result = await readConfigFile(SECURITY_PATH_FILEPATH);\n result.should.have.nested.property('errors[0].instancePath', '/server/allow-insecure');\n });\n });\n\n describe('when a comma-delimited string', function () {\n it('should return errors', async function () {\n const result = await readConfigFile(SECURITY_DELIMITED_FILEPATH);\n result.should.have.nested.property('errors[0].instancePath', '/server/allow-insecure');\n });\n });\n\n describe('when an array', function () {\n it('should return a valid config object', async function () {\n const result = await readConfigFile(SECURITY_ARRAY_FILEPATH);\n result.should.deep.equal({\n config: {\n server: {\n allowInsecure: ['*:foo', '*:bar', '*:baz'],\n },\n },\n filepath: SECURITY_ARRAY_FILEPATH,\n errors: [],\n });\n });\n });\n });\n\n describe('`server.log-filters` behavior', function () {\n describe('when the log filters are valid', function () {\n it('should return a valid config object', async function () {\n const result = await readConfigFile(LOG_FILTERS_FILEPATH);\n result.should.deep.equal({\n config: {\n server: {\n logFilters: [\n {text: 'foo', replacer: 'bar'},\n {pattern: '/foo/', flags: 'i'},\n ],\n },\n },\n filepath: LOG_FILTERS_FILEPATH,\n errors: [],\n });\n });\n });\n });\n });\n\n describe('when the config file is invalid per the schema', function () {\n describe('without extensions', function () {\n it('should return an object containing errors', async function () {\n const result = await readConfigFile(BAD_FILEPATH);\n result.should.have.deep.property('config', {\n appiumHome: 'foo',\n server: {\n address: '0.0.0.0',\n allowCors: 1,\n allowInsecure: {},\n basePath: '/',\n callbackAddress: '0.0.0.0',\n callbackPort: 43243234,\n debugLogSpacing: false,\n defaultCapabilities: {},\n denyInsecure: [],\n keepAliveTimeout: 0,\n localTimezone: false,\n logFile: '/tmp/appium.log',\n loglevel: 'smoosh',\n logNoColors: 1,\n logTimestamp: false,\n longStacktrace: false,\n noPermsCheck: false,\n nodeconfig: {},\n port: '31337',\n relaxedSecurityEnabled: false,\n sessionOverride: false,\n strictCaps: false,\n tmpDir: '/tmp',\n traceDir: '/tmp/appium-instruments',\n useDrivers: [],\n usePlugins: ['all'],\n webhook: 'http://0.0.0.0/hook',\n },\n });\n result.should.have.property('filepath', BAD_FILEPATH);\n result.should.have.deep\n .property('errors')\n .that.contains.members([\n {\n instancePath: '',\n schemaPath: '#/additionalProperties',\n keyword: 'additionalProperties',\n params: {\n additionalProperty: 'appium-home',\n },\n message: 'must NOT have additional properties',\n isIdentifierLocation: true,\n },\n {\n instancePath: '/server/allow-cors',\n schemaPath: '#/properties/server/properties/allow-cors/type',\n keyword: 'type',\n params: {\n type: 'boolean',\n },\n message: 'must be boolean',\n },\n {\n instancePath: '/server/allow-insecure',\n schemaPath: '#/properties/server/properties/allow-insecure/type',\n keyword: 'type',\n params: {\n type: 'array',\n },\n message: 'must be array',\n },\n {\n instancePath: '/server/callback-port',\n schemaPath: '#/properties/server/properties/callback-port/maximum',\n keyword: 'maximum',\n params: {\n comparison: '<=',\n limit: 65535,\n },\n message: 'must be <= 65535',\n },\n {\n instancePath: '/server/log-level',\n schemaPath: '#/properties/server/properties/log-level/enum',\n keyword: 'enum',\n params: {\n allowedValues: [\n 'info',\n 'info:debug',\n 'info:info',\n 'info:warn',\n 'info:error',\n 'warn',\n 'warn:debug',\n 'warn:info',\n 'warn:warn',\n 'warn:error',\n 'error',\n 'error:debug',\n 'error:info',\n 'error:warn',\n 'error:error',\n 'debug',\n 'debug:debug',\n 'debug:info',\n 'debug:warn',\n 'debug:error',\n ],\n },\n message: 'must be equal to one of the allowed values',\n },\n {\n instancePath: '/server/log-no-colors',\n schemaPath: '#/properties/server/properties/log-no-colors/type',\n keyword: 'type',\n params: {\n type: 'boolean',\n },\n message: 'must be boolean',\n },\n {\n instancePath: '/server/port',\n schemaPath: '#/properties/server/properties/port/type',\n keyword: 'type',\n params: {\n type: 'integer',\n },\n message: 'must be integer',\n },\n ])\n .and.lengthOf(7);\n\n result.should.have.property('reason').that.is.a.string;\n });\n });\n\n describe('with extensions', function () {\n /** @type {import('appium/lib/config-file').ReadConfigFileResult} */\n let result;\n\n beforeEach(function () {\n resetSchema();\n registerSchema(DRIVER_TYPE, 'fake', extSchema);\n finalizeSchema();\n });\n\n describe('when provided a config file with unknown properties', function () {\n beforeEach(async function () {\n result = await readConfigFile(UNKNOWN_PROPS_FILEPATH);\n });\n it('should return an object containing errors', function () {\n result.should.have.deep.property('errors', [\n {\n instancePath: '/server/driver/fake',\n schemaPath: 'driver-fake.json/additionalProperties',\n keyword: 'additionalProperties',\n params: {additionalProperty: 'bubb'},\n message: 'must NOT have additional properties',\n isIdentifierLocation: true,\n },\n ]);\n });\n });\n\n describe('when provided a config file with valid properties', function () {\n beforeEach(async function () {\n result = await readConfigFile(EXT_PROPS_FILEPATH);\n });\n it('should return an object containing no errors', function () {\n result.should.have.deep.property('errors', []);\n });\n });\n });\n });\n\n describe('when the config file is invalid JSON', function () {\n it('should reject with a user-friendly error message', async function () {\n if (system.isWindows()) {\n // TODO figure out why this isn't working on windows\n return this.skip();\n }\n await readConfigFile(INVALID_JSON_FILEPATH).should.be.rejectedWith(\n new RegExp(`${_.escapeRegExp(INVALID_JSON_FILEPATH)}`)\n );\n });\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/e2e/config.e2e.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {createSandbox} from 'sinon';\nimport {getGitRev, getBuildInfo, updateBuildInfo, APPIUM_VER} from '../../lib/config';\nimport axios from 'axios';\nimport * as teenProcess from 'teen_process';\nimport { expect } from 'chai';\n\n\ndescribe('Config', function () {\n let sandbox;\n let should;\n\n beforeEach(function () {\n sandbox = createSandbox();\n });\n\n afterEach(function () {\n sandbox.verify();\n sandbox.restore();\n });\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n should = chai.should();\n });\n\n describe('getGitRev', function () {\n it('should get a reasonable git revision', async function () {\n let rev = await getGitRev();\n rev.should.be.a('string');\n rev.length.should.be.equal(40);\n rev.match(/[0-9a-f]+/i)[0].should.eql(rev);\n });\n });\n describe('getBuildInfo', function () {\n const SHA = 'a7404fddd50ee1c6ff1aac3d2f259abab0d3291a';\n const DATE = '2022-06-04T02:08:17Z';\n\n async function verifyBuildInfoUpdate(useLocalGit, {sha, built} = {}) {\n const buildInfo = getBuildInfo();\n\n const innerExecStub = sandbox.stub().throws();\n if (!useLocalGit) {\n sandbox.stub(teenProcess, 'exec').get(() => innerExecStub);\n }\n buildInfo['git-sha'] = undefined;\n buildInfo.built = undefined;\n await updateBuildInfo(true);\n buildInfo.should.be.an('object');\n if (sha) {\n buildInfo['git-sha'].should.equal(sha);\n } else {\n should.exist(buildInfo['git-sha']);\n }\n if (built) {\n buildInfo.built.should.equal(built);\n } else {\n should.exist(buildInfo.built);\n }\n should.exist(buildInfo.version);\n\n if (!useLocalGit) {\n expect(innerExecStub.callCount).to.be.at.least(1);\n }\n }\n\n let getStub;\n beforeEach(function () {\n getStub = sandbox.stub(axios, 'get');\n });\n afterEach(function () {\n getStub.restore();\n });\n\n it('should get a configuration object if the local git metadata is present', async function () {\n await verifyBuildInfoUpdate(true);\n });\n it('should get a configuration object if the local git metadata is not present', async function () {\n getStub.onCall(0).returns({\n data: {\n ref: `refs/tags/appium@${APPIUM_VER}`,\n node_id: 'MDM6UmVmNzUzMDU3MDpyZWZzL3RhZ3MvYXBwaXVtQDIuMC4wLWJldGEuNDA=',\n url: `https://api.github.com/repos/appium/appium/git/refs/tags/appium@${APPIUM_VER}`,\n object: {\n sha: SHA,\n type: 'tag',\n url: `https://api.github.com/repos/appium/appium/git/tags/${SHA}`\n }\n }\n });\n getStub.onCall(1).returns({\n data: {\n node_id: 'TA_kwDOAHLoStoAKGE3NDA0ZmRkZDUwZWUxYzZmZjFhYWMzZDJmMjU5YWJhYjBkMzI5MWE',\n sha: SHA,\n url: `https://api.github.com/repos/appium/appium/git/tags/${SHA}`,\n tagger: {\n name: 'Jonathan Lipps',\n email: 'jlipps@gmail.com',\n date: DATE\n },\n object: {\n sha: '4cf2cc92d066ed32adda27e0439547290a4b71ce',\n type: 'commit',\n url: 'https://api.github.com/repos/appium/appium/git/commits/4cf2cc92d066ed32adda27e0439547290a4b71ce'\n },\n tag: `appium@${APPIUM_VER}`,\n message: `appium@${APPIUM_VER}\\n`,\n verification: {\n verified: false,\n reason: 'unsigned',\n signature: null,\n payload: null\n }\n }\n });\n await verifyBuildInfoUpdate(false, {sha: SHA, built: DATE});\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/e2e/driver.e2e.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport {BaseDriver} from '@appium/base-driver';\nimport {exec} from 'teen_process';\nimport {fs, tempDir} from '@appium/support';\nimport axios from 'axios';\nimport B from 'bluebird';\nimport _ from 'lodash';\nimport {createSandbox} from 'sinon';\nimport {remote as wdio} from 'webdriverio';\nimport {runExtensionCommand} from '../../lib/cli/extension';\nimport {DRIVER_TYPE} from '../../lib/constants';\nimport {loadExtensions} from '../../lib/extension';\nimport {INSTALL_TYPE_LOCAL} from '../../lib/extension/extension-config';\nimport {main as appiumServer} from '../../lib/main';\nimport {removeAppiumPrefixes} from '../../lib/utils';\nimport {\n FAKE_DRIVER_DIR,\n getTestPort,\n TEST_FAKE_APP,\n TEST_HOST,\n W3C_PREFIXED_CAPS,\n} from '../helpers';\n\n/** @type {string} */\nlet testServerBaseUrl;\n\n/** @type {number} */\nlet port;\n\nconst sillyWebServerPort = 1234;\nconst sillyWebServerHost = 'hey';\nconst FAKE_ARGS = {sillyWebServerPort, sillyWebServerHost};\nconst FAKE_DRIVER_ARGS = {driver: {fake: FAKE_ARGS}};\nconst shouldStartServer = process.env.USE_RUNNING_SERVER !== '0';\nconst caps = W3C_PREFIXED_CAPS;\n\n/** @type {Partial} */\nconst wdOpts = {\n hostname: TEST_HOST,\n connectionRetryCount: 0,\n};\n\n/**\n * @param {string} appiumHome\n */\nasync function initFakeDriver(appiumHome) {\n const {driverConfig} = await loadExtensions(appiumHome);\n const driverList = await runExtensionCommand(\n {\n driverCommand: 'list',\n subcommand: DRIVER_TYPE,\n suppressOutput: true,\n showInstalled: true,\n },\n driverConfig,\n );\n if (!_.has(driverList, 'fake')) {\n await runExtensionCommand(\n {\n driverCommand: 'install',\n driver: FAKE_DRIVER_DIR,\n installType: INSTALL_TYPE_LOCAL,\n subcommand: DRIVER_TYPE,\n },\n driverConfig,\n );\n }\n\n return await driverConfig.requireAsync('fake');\n}\n\ndescribe('FakeDriver via HTTP', function () {\n /** @type {AppiumServer} */\n let server;\n /** @type {string} */\n let appiumHome;\n // since we update the FakeDriver.prototype below, make sure we update the FakeDriver which is\n // actually going to be required by Appium\n /** @type {import('@appium/types').DriverClass} */\n let FakeDriver;\n /** @type {string} */\n let testServerBaseSessionUrl;\n\n /** @type {import('sinon').SinonSandbox} */\n let sandbox;\n let should;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n should = chai.should();\n\n sandbox = createSandbox();\n appiumHome = await tempDir.openDir();\n wdOpts.port = port = await getTestPort();\n testServerBaseUrl = `http://${TEST_HOST}:${port}`;\n testServerBaseSessionUrl = `${testServerBaseUrl}/session`;\n FakeDriver = await initFakeDriver(appiumHome);\n });\n\n after(async function () {\n await fs.rimraf(appiumHome);\n sandbox.restore();\n });\n\n /**\n * @param {Partial} [args]\n */\n function withServer(args = {}) {\n // eslint-disable-next-line mocha/no-sibling-hooks\n before(async function () {\n args = {...args, appiumHome, port, address: TEST_HOST};\n if (shouldStartServer) {\n server = await appiumServer(args);\n }\n });\n // eslint-disable-next-line mocha/no-sibling-hooks\n after(async function () {\n if (server) {\n await server.close();\n }\n });\n }\n\n describe('server updating', function () {\n withServer();\n it('should allow drivers to update the server in arbitrary ways', async function () {\n const {data} = await axios.get(`${testServerBaseUrl}/fakedriver`);\n data.should.eql({fakedriver: 'fakeResponse'});\n });\n it('should update the server with cliArgs', async function () {\n // we don't need to check the entire object, since it's large, but we can ensure an\n // arg got through.\n (await axios.post(`http://${TEST_HOST}:${port}/fakedriverCliArgs`)).data.should.have.property(\n 'appiumHome',\n appiumHome,\n );\n });\n });\n\n describe('cli args handling for empty args', function () {\n withServer();\n it('should not receive user cli args if none passed in', async function () {\n let driver = await wdio({...wdOpts, capabilities: caps});\n const {sessionId} = driver;\n try {\n const {data} = await axios.get(`${testServerBaseSessionUrl}/${sessionId}/fakedriverargs`);\n should.not.exist(data.value.sillyWebServerPort);\n should.not.exist(data.value.sillyWebServerHost);\n } finally {\n await driver.deleteSession();\n }\n });\n });\n\n describe('cli args handling for passed in args', function () {\n withServer(FAKE_DRIVER_ARGS);\n it('should receive user cli args from a driver if arguments were passed in', async function () {\n let driver = await wdio({...wdOpts, capabilities: caps});\n const {sessionId} = driver;\n try {\n const {data} = await axios.get(`${testServerBaseSessionUrl}/${sessionId}/fakedriverargs`);\n data.value.sillyWebServerPort.should.eql(sillyWebServerPort);\n data.value.sillyWebServerHost.should.eql(sillyWebServerHost);\n } finally {\n await driver.deleteSession();\n }\n });\n });\n\n describe('default capabilities via cli', function () {\n withServer({\n defaultCapabilities: {\n 'appium:options': {\n automationName: 'Fake',\n deviceName: 'Fake',\n app: TEST_FAKE_APP,\n },\n platformName: 'Fake',\n },\n });\n it('should allow appium-prefixed caps sent via appium:options through --default-capabilities', async function () {\n const appiumOptsCaps = {\n capabilities: {\n alwaysMatch: {},\n firstMatch: [{}],\n },\n };\n\n // Create the session\n const {value} = (await axios.post(testServerBaseSessionUrl, appiumOptsCaps)).data;\n try {\n value.sessionId.should.be.a.string;\n value.should.exist;\n value.capabilities.should.deep.equal({\n automationName: 'Fake',\n platformName: 'Fake',\n deviceName: 'Fake',\n app: TEST_FAKE_APP,\n });\n } finally {\n // End session\n await axios.delete(`${testServerBaseSessionUrl}/${value.sessionId}`);\n }\n });\n });\n\n describe('inspector commands', function () {\n withServer();\n let driver;\n\n beforeEach(async function () {\n driver = await wdio({...wdOpts, capabilities: caps});\n });\n afterEach(async function () {\n if (driver) {\n await driver.deleteSession();\n driver = null;\n }\n });\n\n it('should list available driver commands', async function () {\n driver.addCommand(\n 'listCommands',\n async () => (await axios.get(\n `${testServerBaseSessionUrl}/${driver.sessionId}/appium/commands`\n )).data.value\n );\n\n const commands = await driver.listCommands();\n\n JSON.stringify(commands.rest.base['/session/:sessionId/frame'])\n .should.eql(JSON.stringify({POST: {command: 'setFrame', params: [\n {name: 'id', required: true}\n ]}}));\n _.size(commands.rest.driver).should.be.greaterThan(1);\n\n JSON.stringify(commands.bidi.base.session.subscribe).should.eql(\n JSON.stringify({\n command: 'bidiSubscribe',\n 'params': [\n {\n name: 'events',\n required: true\n },\n {\n name: 'contexts',\n required: false\n }\n ]\n })\n );\n _.size(commands.bidi.base).should.be.greaterThan(1);\n _.size(commands.bidi.driver).should.be.greaterThan(0);\n });\n\n it('should list available driver extensions', async function () {\n driver.addCommand(\n 'listExtensions',\n async () => (await axios.get(\n `${testServerBaseSessionUrl}/${driver.sessionId}/appium/extensions`\n )).data.value\n );\n\n const extensions = await driver.listExtensions();\n JSON.stringify(extensions.rest.driver['fake: setThing']).should.eql(\n JSON.stringify({\n command: 'setFakeThing',\n params: [{\n name: 'thing',\n required: true\n }]\n })\n );\n _.size(extensions.rest.driver).should.be.greaterThan(1);\n });\n });\n\n describe('session handling', function () {\n withServer();\n\n it('should start and stop a session and not allow commands after session stopped', async function () {\n let driver = await wdio({...wdOpts, capabilities: caps});\n should.exist(driver.sessionId);\n driver.sessionId.should.be.a('string');\n await driver.deleteSession();\n await driver.getTitle().should.eventually.be.rejected;\n });\n\n it('should be able to run two FakeDriver sessions simultaneously', async function () {\n let driver1 = await wdio({...wdOpts, capabilities: caps});\n should.exist(driver1.sessionId);\n driver1.sessionId.should.be.a('string');\n let driver2 = await wdio({...wdOpts, capabilities: caps});\n should.exist(driver2.sessionId);\n driver2.sessionId.should.be.a('string');\n driver2.sessionId.should.not.equal(driver1.sessionId);\n await driver1.deleteSession();\n await driver2.deleteSession();\n });\n\n it('should not be able to run two FakeDriver sessions simultaneously when one is unique', async function () {\n let uniqueCaps = _.clone(caps);\n uniqueCaps['appium:uniqueApp'] = true;\n let driver1 = await wdio({...wdOpts, capabilities: uniqueCaps});\n should.exist(driver1.sessionId);\n driver1.sessionId.should.be.a('string');\n await wdio({...wdOpts, capabilities: caps}).should.eventually.be.rejected;\n await driver1.deleteSession();\n });\n\n it('should use the newCommandTimeout of the inner Driver on session creation', async function () {\n let localCaps = {\n 'appium:newCommandTimeout': 0.25,\n ...caps,\n };\n let driver = await wdio({...wdOpts, capabilities: localCaps});\n should.exist(driver.sessionId);\n\n await B.delay(250);\n await driver.getPageSource().should.eventually.be.rejectedWith(/terminated/);\n });\n\n it('should not allow umbrella commands to prevent newCommandTimeout on inner driver', async function () {\n let localCaps = {\n 'appium:newCommandTimeout': 0.25,\n ...caps,\n };\n let driver = await wdio({...wdOpts, capabilities: localCaps});\n should.exist(driver.sessionId);\n driver.addCommand(\n 'getStatus',\n async () => (await axios.get(`${testServerBaseUrl}/status`)).data.value\n );\n\n // get the session list 6 times over 300ms. each request will be below the new command\n // timeout but since they are not received by the driver the session should still time out\n for (let i = 0; i < 6; i++) {\n await driver.getStatus();\n await B.delay(50);\n }\n await driver.getPageSource().should.eventually.be.rejectedWith(/terminated/);\n });\n\n it('should accept valid W3C capabilities and start a W3C session', async function () {\n // Try with valid capabilities and check that it returns a session ID\n const w3cCaps = {\n capabilities: {\n alwaysMatch: {'appium:automationName': 'Fake', platformName: 'Fake'},\n firstMatch: [{'appium:deviceName': 'Fake', 'appium:app': TEST_FAKE_APP}],\n },\n };\n\n // Create the session\n const {status, value, sessionId} = (await axios.post(testServerBaseSessionUrl, w3cCaps)).data;\n try {\n should.not.exist(status); // Test that it's a W3C session by checking that 'status' is not in the response\n should.not.exist(sessionId);\n value.sessionId.should.be.a.string;\n value.should.exist;\n value.capabilities.should.deep.equal({\n automationName: 'Fake',\n platformName: 'Fake',\n deviceName: 'Fake',\n app: TEST_FAKE_APP,\n });\n\n // Now use that sessionId to call /screenshot\n const {status: screenshotStatus, value: screenshotValue} = (\n await axios({\n url: `${testServerBaseSessionUrl}/${value.sessionId}/screenshot`,\n })\n ).data;\n should.not.exist(screenshotStatus);\n screenshotValue.should.match(/^iVBOR/); // should be a png\n\n // Now use that sessionID to call an arbitrary W3C-only endpoint that isn't implemented to see if it responds with correct error\n await axios\n .post(`${testServerBaseSessionUrl}/${value.sessionId}/execute/async`, {\n script: '',\n args: ['a'],\n })\n .should.eventually.be.rejectedWith(/405/);\n } finally {\n // End session\n await axios.delete(`${testServerBaseSessionUrl}/${value.sessionId}`);\n }\n });\n\n it('should allow appium-prefixed caps sent via appium:options', async function () {\n // Try with valid capabilities and check that it returns a session ID\n const appiumOptsCaps = {\n capabilities: {\n alwaysMatch: {\n 'appium:options': {\n automationName: 'Fake',\n deviceName: 'Fake',\n app: TEST_FAKE_APP,\n },\n platformName: 'Fake',\n },\n firstMatch: [{}],\n },\n };\n\n // Create the session\n const {status, value, sessionId} = (\n await axios.post(testServerBaseSessionUrl, appiumOptsCaps)\n ).data;\n try {\n should.not.exist(status); // Test that it's a W3C session by checking that 'status' is not in the response\n should.not.exist(sessionId);\n value.sessionId.should.be.a.string;\n value.should.exist;\n value.capabilities.should.deep.equal({\n automationName: 'Fake',\n platformName: 'Fake',\n deviceName: 'Fake',\n app: TEST_FAKE_APP,\n });\n } finally {\n // End session\n await axios.delete(`${testServerBaseSessionUrl}/${value.sessionId}`);\n }\n });\n\n it('should reject invalid W3C capabilities and respond with a 400 Bad Parameters error', async function () {\n const badW3Ccaps = {\n capabilities: {\n alwaysMatch: {},\n firstMatch: [{'appium:deviceName': 'Fake', 'appium:app': TEST_FAKE_APP}],\n },\n };\n\n await axios\n .post(testServerBaseSessionUrl, badW3Ccaps)\n .should.eventually.be.rejectedWith(/400/);\n });\n\n it('should accept a combo of W3C and JSONWP capabilities but completely ignore JSONWP', async function () {\n const combinedCaps = {\n desiredCapabilities: {\n ...caps,\n jsonwpParam: 'jsonwpParam',\n },\n capabilities: {\n alwaysMatch: {...caps},\n firstMatch: [\n {\n 'appium:w3cParam': 'w3cParam',\n },\n ],\n },\n };\n\n const {status, value, sessionId} = (await axios.post(testServerBaseSessionUrl, combinedCaps))\n .data;\n try {\n should.not.exist(status); // If it's a W3C session, should not respond with 'status'\n should.not.exist(sessionId);\n value.sessionId.should.exist;\n value.capabilities.should.deep.equal({\n ...removeAppiumPrefixes(caps),\n w3cParam: 'w3cParam',\n });\n } finally {\n // End session\n await axios.delete(`${testServerBaseSessionUrl}/${value.sessionId}`);\n }\n });\n\n it('should reject bad automation name with an appropriate error', async function () {\n const w3cCaps = {\n capabilities: {\n alwaysMatch: {\n ...caps,\n 'appium:automationName': 'BadAutomationName',\n },\n },\n };\n await axios.post(testServerBaseSessionUrl, w3cCaps).should.eventually.be.rejectedWith(/500/);\n });\n\n it('should accept capabilities that are provided in the firstMatch array', async function () {\n const w3cCaps = {\n capabilities: {\n alwaysMatch: {},\n firstMatch: [\n {},\n {\n ...caps,\n },\n ],\n },\n };\n const {value, sessionId, status} = (await axios.post(testServerBaseSessionUrl, w3cCaps)).data;\n try {\n should.not.exist(status);\n should.not.exist(sessionId);\n value.capabilities.should.deep.equal(removeAppiumPrefixes(caps));\n } finally {\n // End session\n await axios.delete(`${testServerBaseSessionUrl}/${value.sessionId}`);\n }\n });\n\n it('should not fall back to MJSONWP if w3c caps are invalid', async function () {\n const combinedCaps = {\n desiredCapabilities: {\n ...caps,\n },\n capabilities: {\n alwaysMatch: {},\n firstMatch: [\n {},\n {\n ...caps,\n platformName: null,\n 'appium:automationName': null,\n 'appium:deviceName': null,\n },\n ],\n },\n };\n const res = await axios.post(testServerBaseSessionUrl, combinedCaps, {\n validateStatus: null,\n });\n res.status.should.eql(400);\n res.data.value.error.should.match(/invalid argument/);\n });\n\n it('should not fall back to MJSONWP even if Inner Driver is not ready for W3C', async function () {\n const combinedCaps = {\n desiredCapabilities: {\n ...caps,\n },\n capabilities: {\n alwaysMatch: {\n ...caps,\n 'appium:deviceName': 'Fake',\n },\n },\n };\n const createSessionStub = sandbox\n .stub(FakeDriver.prototype, 'createSession')\n .callsFake(async function (caps) {\n const res = await BaseDriver.prototype.createSession.call(this, caps);\n this.protocol.should.equal('W3C');\n return res;\n });\n try {\n const res = await axios.post(testServerBaseSessionUrl, combinedCaps, {\n validateStatus: null,\n });\n const {status} = res;\n status.should.eql(200);\n } finally {\n createSessionStub.restore();\n }\n });\n\n it('should allow drivers to update the method map with new routes and commands', async function () {\n let driver = await wdio({...wdOpts, capabilities: caps});\n const {sessionId} = driver;\n try {\n await axios.post(`${testServerBaseSessionUrl}/${sessionId}/fakedriver`, {\n thing: {yes: 'lolno'},\n });\n (\n await axios.get(`${testServerBaseSessionUrl}/${sessionId}/fakedriver`)\n ).data.value.should.eql({yes: 'lolno'});\n } finally {\n await driver.deleteSession();\n }\n });\n });\n\n describe('Bidi protocol', function () {\n withServer();\n const capabilities = {...caps, webSocketUrl: true, 'appium:runClock': true};\n /** @type import('webdriverio').Browser **/\n let driver;\n\n beforeEach(async function () {\n driver = await wdio({...wdOpts, capabilities});\n });\n\n afterEach(async function () {\n if (driver) {\n await driver.deleteSession();\n }\n });\n\n it('should respond with bidi specific capability when a driver supports it', async function () {\n should.exist(driver.capabilities.webSocketUrl);\n });\n\n it('should interpret the bidi protocol and let the driver handle it by command', async function () {\n should.not.exist(await driver.getUrl());\n\n await driver.browsingContextNavigate({\n context: 'foo',\n url: 'https://appium.io',\n wait: 'complete',\n });\n await driver.getUrl().should.eventually.eql('https://appium.io');\n });\n\n it('should be able to subscribe and unsubscribe to bidi events', async function () {\n let collectedEvents = [];\n // asyncrhonously start our listener\n driver.on('appium:clock.currentTime', ({time}) => {\n collectedEvents.push(time);\n });\n\n // wait for some time to be sure clock events have happened, and assert we don't receive\n // any yet\n await B.delay(750);\n collectedEvents.should.be.empty;\n\n // now subscribe and wait and assert that some events have been collected\n await driver.sessionSubscribe({events: ['appium:clock.currentTime']});\n await B.delay(750);\n collectedEvents.should.not.be.empty;\n\n // finally unsubscribe and wait and assert that some events have been collected\n await driver.sessionUnsubscribe({events: ['appium:clock.currentTime']});\n collectedEvents = [];\n await B.delay(750);\n collectedEvents.should.be.empty;\n });\n\n it('should allow custom bidi commands', async function () {\n let {result} = await driver.send({method: 'appium:fake.getFakeThing', params: {}});\n should.not.exist(result);\n await driver.send({method: 'appium:fake.setFakeThing', params: {thing: 'this is from bidi'}});\n ({result} = await driver.send({method: 'appium:fake.getFakeThing', params: {}}));\n result.should.eql('this is from bidi');\n });\n });\n\n describe('Bidi protocol with base path', function () {\n const basePath = '/wd/hub';\n withServer({basePath});\n const capabilities = {...caps, webSocketUrl: true, 'appium:runClock': true};\n /** @type import('webdriverio').Browser **/\n let driver;\n\n beforeEach(async function () {\n driver = await wdio({...wdOpts, path: basePath, capabilities});\n });\n\n afterEach(async function () {\n if (driver) {\n await driver.deleteSession();\n }\n });\n\n it('should respond with bidi specific capability when a driver supports it', async function () {\n should.exist(driver.capabilities.webSocketUrl);\n });\n\n it('should interpret the bidi protocol and let the driver handle it by command', async function () {\n should.not.exist(await driver.getUrl());\n\n await driver.browsingContextNavigate({\n context: 'foo',\n url: 'https://appium.io',\n wait: 'complete',\n });\n await driver.getUrl().should.eventually.eql('https://appium.io');\n });\n });\n});\n\ndescribe('Bidi over SSL', function () {\n /**\n * @param {string} certPath\n * @param {string} keyPath\n */\n async function generateCertificate(certPath, keyPath) {\n await exec('openssl', [\n 'req',\n '-nodes',\n '-new',\n '-x509',\n '-keyout',\n keyPath,\n '-out',\n certPath,\n '-subj',\n '/C=US/ST=State/L=City/O=company/OU=Com/CN=www.testserver.local',\n ]);\n }\n\n /** @type {AppiumServer} */\n let server;\n /** @type {string} */\n let appiumHome;\n /** @type {import('webdriverio').Browser} */\n let driver;\n // since we update the FakeDriver.prototype below, make sure we update the FakeDriver which is\n // actually going to be required by Appium\n /** @type {import('@appium/types').DriverClass} */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let FakeDriver;\n let certPath = 'certificate.cert';\n let keyPath = 'certificate.key';\n const capabilities = {...caps, webSocketUrl: true};\n let should;\n /** @type {string | undefined} */\n let previousEnvValue;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n should = chai.should();\n\n // Skip on Node.js 24+ due to spdy package incompatibility (http_parser removed)\n const nodeMajorVersion = parseInt(process.version.slice(1).split('.')[0], 10);\n if (nodeMajorVersion >= 24) {\n return this.skip();\n }\n\n try {\n await generateCertificate(certPath, keyPath);\n } catch (e) {\n if (process.env.CI) {\n throw e;\n }\n return this.skip();\n }\n appiumHome = await tempDir.openDir();\n wdOpts.port = port = await getTestPort();\n testServerBaseUrl = `https://${TEST_HOST}:${port}`;\n FakeDriver = await initFakeDriver(appiumHome);\n server = await appiumServer({\n address: TEST_HOST,\n port,\n appiumHome,\n sslCertificatePath: certPath,\n sslKeyPath: keyPath,\n });\n });\n\n after(async function () {\n if (server) {\n await fs.rimraf(appiumHome);\n await server.close();\n }\n });\n\n beforeEach(async function () {\n previousEnvValue = process.env.NODE_TLS_REJECT_UNAUTHORIZED;\n process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';\n driver = await wdio({...wdOpts, protocol: 'https', strictSSL: false, capabilities});\n });\n\n afterEach(async function () {\n process.env.NODE_TLS_REJECT_UNAUTHORIZED = previousEnvValue;\n if (driver) {\n await driver.deleteSession();\n }\n });\n\n it('should still run bidi over ssl', async function () {\n should.not.exist(await driver.getUrl());\n\n await driver.browsingContextNavigate({\n context: 'foo',\n url: 'https://appium.io',\n wait: 'complete',\n });\n await driver.getUrl().should.eventually.eql('https://appium.io');\n });\n});\n\n// TODO this test only works if the log has not previously been initialized in the same process.\n// there seems to be some global state that is not cleaned up between tests.\ndescribe.skip('Logsink', function () {\n let server = null;\n let logs = [];\n let logHandler = function (level, message) {\n logs.push([level, message]);\n };\n let args = {\n port,\n address: TEST_HOST,\n logHandler,\n };\n\n before(async function () {\n server = /** @type {AppiumServer} */ (await appiumServer(args));\n });\n\n after(async function () {\n await server.close();\n });\n\n it('should send logs to a logHandler passed in by a parent package', function () {\n logs.length.should.be.above(1);\n let welcomeIndex = logs[0][1].includes('versions of node') ? 1 : 0;\n logs[welcomeIndex].length.should.equal(2);\n logs[welcomeIndex][1].should.include('Welcome to Appium');\n });\n});\n\n/**\n * @typedef {import('@appium/types').AppiumServer} AppiumServer\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/e2e/e2e-helpers.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\n/**\n * This module provides helper functions for E2E tests to spawn an `appium` subprocess.\n */\nimport {console, fs} from '@appium/support';\nimport '@colors/colors';\nimport _ from 'lodash';\nimport path from 'node:path';\nimport {exec} from 'teen_process';\nimport {APPIUM_ROOT, resolveFixture} from '../helpers';\n\n/**\n * Path to the (compiled) main script of the `appium` executable.\n *\n * This means **you must build `appium` before running tests calling this code.**\n */\nexport const EXECUTABLE = path.join(APPIUM_ROOT, 'build', 'lib', 'main.js');\n\nexport const log = new console.CliConsole();\n\n/**\n * Runs the `appium` executable with the given args.\n *\n * Strips any color codes from the output.\n *\n * If the process exits with a nonzero code, the error will be a {@link AppiumRunError}.\n * @template {import('appium/types').CliExtensionSubcommand} ExtSubcommand\n * @param {string} appiumHome - Path to `APPIUM_HOME`\n * @param {CliExtArgs | CliArgs} args - Args, including commands\n * @param {TeenProcessExecOptions} [opts] - Options for `teen_process`\n * @returns {Promise}\n */\nasync function run(appiumHome, args, opts = {}) {\n const cwd = APPIUM_ROOT;\n opts.env = _.defaults(opts.env, {APPIUM_HOME: appiumHome, PATH: process.env.PATH});\n try {\n args = [...process.execArgv, '--', EXECUTABLE, ...args];\n if (process.env._FORCE_LOGS) {\n log.debug('APPIUM_HOME: %s', opts.env.APPIUM_HOME);\n log.debug(`Running: ${process.execPath} ${args.join(' ')}`);\n }\n const retval = await exec(process.execPath, args, {\n ...opts,\n cwd,\n });\n if (!opts.env?.FORCE_COLOR) {\n retval.stderr = retval.stderr.stripColors;\n retval.stdout = retval.stdout.stripColors;\n }\n return retval;\n } catch (err) {\n const {stdout, stderr} = /** @type {ExecError} */ (err);\n /**\n * @type {AppiumRunError}\n */\n const runErr = Object.assign(err, {\n originalMessage: err.message,\n message: `${stdout.trim()}\\n\\n${stderr.trim()}`,\n command: `${process.execPath} ${EXECUTABLE} ${args.join(' ')}`,\n env: opts.env,\n cwd,\n });\n throw runErr;\n }\n}\n\n/**\n * See {@link runAppium}.\n * @type {AppiumRunner}\n */\nasync function _runAppium(appiumHome, args) {\n const {stdout} = await run(appiumHome, args);\n return stdout;\n}\n\n/**\n * Runs the `appium` executable with the given args and returns contents of `STDOUT`.\n *\n * _Do not use this when testing error output_, as it will likely be in `STDERR` and thusly ignored.\n * Use {@link runAppiumRaw} instead.\n */\nexport const runAppium = _.curry(_runAppium);\n\n/**\n * See {@link runAppiumRaw}.\n * @type {AppiumOptsRunner>}\n */\nasync function _runAppiumRaw(appiumHome, args, opts) {\n try {\n return await run(appiumHome, args, opts);\n } catch (err) {\n return err;\n }\n}\n\n/**\n * Runs the `appium` executable with the given args and returns the entire\n * `ExecResult` object.\n *\n * **The third parameter is required**. Pass empty object if you don't need it.\n **/\nexport const runAppiumRaw = _.curry(_runAppiumRaw);\n\n/**\n * See {@link runAppiumJson}.\n * @type {AppiumRunner}\n */\nasync function _runAppiumJson(appiumHome, args) {\n if (!args.includes('--json')) {\n args.push('--json');\n }\n const stdout = await runAppium(appiumHome, args);\n try {\n return JSON.parse(stdout);\n } catch (err) {\n err.message = `Error parsing JSON. Contents of STDOUT: ${stdout}`;\n throw err;\n }\n}\n\n/**\n * Runs the `appium` executable with the given args in JSON mode.\n * Will reject with the contents of `STDOUT` (which were to be parsed) if parsing into JSON fails.\n *\n * The caller must wrap the call (in parens) with a docstring containing a return type.\n * i.e., add `@type {MyType}` tag.\n */\nexport const runAppiumJson = /**\n * @template {import('appium/types').CliExtensionSubcommand} ExtSubcommand\n * @type {import('lodash').CurriedFunction2|CliArgs, Promise>}\n */ (_.curry(_runAppiumJson));\n\n/**\n * Given a path to a local extension, install it into `appiumHome` via CLI.\n * @template {ExtensionType} ExtType\n * @param {string} appiumHome\n * @param {ExtType} type\n * @param {string} pathToExtension\n */\nexport async function installLocalExtension(appiumHome, type, pathToExtension) {\n return /** @type {import('appium/types').ExtRecord} */ (\n /** @type {unknown} */ (\n await runAppiumJson(appiumHome, [type, 'install', '--source', 'local', pathToExtension])\n )\n );\n}\n\n/**\n * Given a name/path of a fixture, read it as `stderr` when `appium` fails while parsing arguments.\n *\n * Usage text is stripped and trailing newlines are normalized.\n * @param {string} name - Name of a fixture\n * @returns {Promise} - Contents of file, normalized\n */\nexport async function readAppiumArgErrorFixture(name) {\n const filepath = resolveFixture(name);\n const body = await fs.readFile(filepath, 'utf8');\n return formatAppiumArgErrorOutput(body);\n}\n\n/**\n * Given `stderr` from `appium`, normalize output for easier comparison.\n * @param {string} stderr\n * @returns {string}\n */\nexport function formatAppiumArgErrorOutput(stderr) {\n return stderr.replace(/^[\\s\\S]+\\n\\n([\\s\\S]+)/, '$1').trim() + '\\n';\n}\n\n/**\n * Options for {@link runAppium}.\n * @private\n * @typedef RunAppiumOptions\n * @property {boolean} [raw] - Whether to return the raw output from `teen_process`\n */\n\n/**\n * Error thrown by all of the functions in this file which execute `appium`.\n * @typedef {Error & AppiumRunErrorProps & import('teen_process').ExecError} AppiumRunError\n */\n\n/**\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n * @typedef {import('appium/lib/cli/extension-command').ExtensionList} ExtensionListData\n * @typedef {import('teen_process').ExecError} ExecError\n * @typedef {import('teen_process').TeenProcessExecOptions} TeenProcessExecOptions\n * @typedef {import('teen_process').TeenProcessExecResult} TeenProcessExecResult\n */\n\n/**\n * Wraps the error returned by {@link exec}.\n * @typedef AppiumRunErrorProps\n * @property {string} originalMessage - Original error message\n * @property {string} command - Command that was run\n * @property {string} env - Environment variables\n * @property {string} cwd - Current working directory\n */\n\n/**\n * @template T\n * @typedef {import('appium/types').ExtRecord} ExtRecord\n */\n\n/**\n * @template ExtSubCommand\n * @typedef {[import('appium/types').CliSubcommand, ExtSubCommand, ...string[]]} CliExtArgs\n */\n\n/**\n * @typedef {string[]} CliArgs\n */\n\n/**\n * @template [Result=unknown]\n * @template {import('appium/types').CliSubcommand} [ExtSubcommand=never]\n * @callback AppiumRunner\n * @param {string} appiumHome\n * @param {CliExtArgs|CliArgs} args\n * @returns {Promise}\n */\n\n/**\n * @template [Result=unknown]\n * @template {import('appium/types').CliExtensionSubcommand} [ExtSubcommand=never]\n * @callback AppiumOptsRunner\n * @param {string} appiumHome\n * @param {CliExtArgs|CliArgs} args\n * @param {TeenProcessExecOptions} opts\n * @returns {Promise}\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/e2e/local.e2e.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport {env, fs, npm, tempDir} from '@appium/support';\nimport path from 'node:path';\nimport resolveFrom from 'resolve-from';\nimport * as YAML from 'yaml';\nimport {\n DRIVER_TYPE,\n EXT_SUBCOMMAND_INSTALL as INSTALL,\n EXT_SUBCOMMAND_LIST as LIST,\n PKG_HASHFILE_RELATIVE_PATH,\n} from '../../lib/constants';\nimport {FAKE_DRIVER_DIR, resolveFixture} from '../helpers';\nimport {installLocalExtension, runAppiumJson} from './e2e-helpers';\n\nconst {MANIFEST_RELATIVE_PATH} = env;\nconst testDriverPath = path.dirname(resolveFixture('test-driver/package.json'));\n\ndescribe('when Appium is a dependency of the current project', function () {\n /** @type {string} */\n let hashPath;\n /** @type {string} */\n let manifestPath;\n /** @type {string} */\n let appiumHomePkgPath;\n /** @type {string} */\n let appiumHome;\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n\n appiumHome = await tempDir.openDir();\n });\n\n after(async function () {\n await fs.rimraf(appiumHome);\n });\n\n /**\n * Helper fn\n * @returns {Promise}\n */\n async function readManifest() {\n const manifest = await fs.readFile(manifestPath, 'utf8');\n return YAML.parse(manifest);\n }\n\n /**\n * @template {CliExtensionSubcommand} ExtSubcommand\n * @type {import('lodash').CurriedFunction1 | CliArgs, Promise>}\n */\n let runJson;\n\n describe('when the project is an extension', function () {\n before(async function () {\n appiumHome = await tempDir.openDir();\n hashPath = path.join(appiumHome, PKG_HASHFILE_RELATIVE_PATH);\n manifestPath = path.join(appiumHome, MANIFEST_RELATIVE_PATH);\n appiumHomePkgPath = path.join(appiumHome, 'package.json');\n runJson = runAppiumJson(appiumHome);\n\n await fs.copyFile(resolveFixture('test-driver/package.json'), appiumHomePkgPath);\n });\n\n it('should automatically discover the extension', async function () {\n const res = await runJson([DRIVER_TYPE, LIST]);\n expect(res).to.have.property('test');\n });\n });\n\n describe('when the project is not an extension', function () {\n before(async function () {\n appiumHome = await tempDir.openDir();\n hashPath = path.join(appiumHome, PKG_HASHFILE_RELATIVE_PATH);\n manifestPath = path.join(appiumHome, MANIFEST_RELATIVE_PATH);\n appiumHomePkgPath = path.join(appiumHome, 'package.json');\n runJson = runAppiumJson(appiumHome);\n\n // an example package.json referencing appium dependency\n await fs.copyFile(resolveFixture('cli/appium-dependency.package.json'), appiumHomePkgPath);\n });\n\n describe('without drivers installed', function () {\n it('should list no drivers', async function () {\n const res = /** @type {ExtensionListData} */ (await runJson([DRIVER_TYPE, LIST]));\n res.should.satisfy(\n /** @param {typeof res} value */ (value) =>\n Object.values(value).every(({installed}) => !installed)\n );\n });\n });\n\n describe('after a driver is installed', function () {\n before(async function () {\n await installLocalExtension(appiumHome, DRIVER_TYPE, FAKE_DRIVER_DIR);\n });\n\n it('should list the driver', async function () {\n const res = /** @type {ExtensionListData} */ (await runJson([DRIVER_TYPE, LIST]));\n res.should.have.property('fake');\n });\n\n it('should be resolvable from the local directory', function () {\n (() => resolveFrom(appiumHome, '@appium/fake-driver/package.json')).should.not.throw();\n });\n });\n\n describe('when a driver is installed via npm', function () {\n before(async function () {\n // remove the hash file and the manifest to start clean.\n // this leaves any previously-installed extension in place, which should make this a little faster.\n await fs.rimraf(path.dirname(hashPath));\n await npm.exec(INSTALL, [FAKE_DRIVER_DIR], {\n json: true,\n cwd: appiumHome,\n });\n });\n\n describe(LIST, function () {\n /** @type {ExtensionListData} */\n let res;\n\n beforeEach(async function () {\n res = /** @type {ExtensionListData} */ (await runJson([DRIVER_TYPE, LIST]));\n });\n\n it('should list the driver', function () {\n res.should.have.property('fake');\n });\n\n it('should update the manifest', async function () {\n const manifestParsed = await readManifest();\n manifestParsed.should.have.nested.property('drivers.fake');\n });\n\n describe('when a different driver is installed via \"appium driver install\"', function () {\n before(async function () {\n await runJson([DRIVER_TYPE, LIST]);\n await installLocalExtension(appiumHome, DRIVER_TYPE, testDriverPath);\n });\n\n it('should update package.json', async function () {\n const newPkg = JSON.parse(await fs.readFile(appiumHomePkgPath, 'utf8'));\n expect(newPkg).to.have.nested.property('devDependencies.@appium/test-driver');\n });\n\n it('should update the manifest with the new driver', async function () {\n const manifest = await fs.readFile(manifestPath, 'utf8');\n /** @type {ManifestData} */\n const manifestParsed = YAML.parse(manifest);\n manifestParsed.should.have.nested.property('drivers.test');\n manifestParsed.should.have.nested.property('drivers.fake');\n });\n\n it('should actually install both drivers', function () {\n expect(() => resolveFrom(appiumHome, '@appium/fake-driver')).not.to.throw;\n expect(() => resolveFrom(appiumHome, '@appium/test-driver')).not.to.throw;\n });\n });\n });\n });\n });\n});\n\n/**\n * @typedef {import('appium/types').ManifestData} ManifestData\n * @typedef {import('./e2e-helpers').CliArgs} CliArgs\n * @typedef {import('appium/lib/cli/extension-command').ExtensionListData} ExtensionListData\n * @typedef {import('appium/types').CliExtensionSubcommand} CliExtensionSubcommand\n */\n\n/**\n * @template ExtSubCommand\n * @typedef {import('./e2e-helpers').CliExtArgs} CliExtArgs\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/e2e/manifest.e2e.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {fs, tempDir} from '@appium/support';\nimport path from 'node:path';\nimport * as YAML from 'yaml';\nimport {\n CACHE_DIR_RELATIVE_PATH,\n CURRENT_SCHEMA_REV,\n DRIVER_TYPE,\n EXT_SUBCOMMAND_LIST as LIST,\n} from '../../lib/constants';\nimport {FAKE_DRIVER_DIR, resolveFixture} from '../helpers';\nimport {installLocalExtension, runAppiumJson} from './e2e-helpers';\n\ndescribe('manifest handling', function () {\n /**\n * @type {string}\n */\n let appiumHome;\n\n /**\n * @type {string}\n */\n let manifestPath;\n\n /**\n * @type {(args?: string[]) => Promise}\n */\n let runList;\n let expect;\n\n async function resetAppiumHome() {\n await fs.rimraf(appiumHome);\n await fs.mkdirp(appiumHome);\n }\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n\n appiumHome = await tempDir.openDir();\n manifestPath = path.join(appiumHome, CACHE_DIR_RELATIVE_PATH, 'extensions.yaml');\n const run = runAppiumJson(appiumHome);\n runList = async (args = []) =>\n /** @type {ReturnType} */ (await run([DRIVER_TYPE, LIST, ...args]));\n });\n\n /**\n * @returns {Promise}\n */\n async function readManifest() {\n return YAML.parse(await fs.readFile(manifestPath, 'utf8'));\n }\n\n after(async function () {\n await fs.rimraf(appiumHome);\n });\n\n describe('migration', function () {\n beforeEach(async function () {\n await resetAppiumHome();\n await fs.mkdirp(path.dirname(manifestPath));\n });\n\n describe('schema rev update', function () {\n beforeEach(async function () {\n await fs.copyFile(resolveFixture('manifest/v2-empty.yaml'), manifestPath);\n });\n\n it('should update the manifest file to the latest schema revision', async function () {\n // note: all we need to do to run the migration is invoke appium, so any command\n // would do.\n await runList();\n const manifest = await readManifest();\n expect(manifest.schemaRev).to.equal(CURRENT_SCHEMA_REV);\n });\n });\n\n describe('v3', function () {\n /** @type {import('appium/types').AnyManifestDataVersion} */\n let manifest;\n // for these tests, we have to use a real extension, because the migration\n // only does anything if the extension is actually installed.\n before(async function () {\n await installLocalExtension(appiumHome, DRIVER_TYPE, FAKE_DRIVER_DIR);\n const list = await runList();\n expect(list.fake).to.exist;\n\n // but the manifest is now at v3, since it's brand new. we will manually downgrade.\n let tmpManifest = await readManifest();\n tmpManifest.schemaRev = 2;\n delete tmpManifest.drivers.fake.installPath;\n await fs.writeFile(manifestPath, YAML.stringify(tmpManifest));\n tmpManifest = await readManifest();\n expect(tmpManifest.schemaRev).to.equal(2);\n expect(tmpManifest.drivers.fake.installPath).to.not.exist;\n await runList();\n manifest = await readManifest();\n });\n\n it('should add an \"installPath\" field to each extension', function () {\n expect(manifest.drivers.fake?.installPath).to.be.a('string');\n });\n\n it('should update the manifest file to the latest schema revision', function () {\n expect(manifest.schemaRev).to.equal(CURRENT_SCHEMA_REV);\n });\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/e2e/plugin.e2e.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport {fs, tempDir} from '@appium/support';\nimport axios from 'axios';\nimport B from 'bluebird';\nimport {remote as wdio} from 'webdriverio';\nimport {runExtensionCommand} from '../../lib/cli/extension';\nimport {DRIVER_TYPE, PLUGIN_TYPE} from '../../lib/constants';\nimport {loadExtensions} from '../../lib/extension';\nimport {INSTALL_TYPE_LOCAL} from '../../lib/extension/extension-config';\nimport {main as appiumServer} from '../../lib/main';\nimport {resetSchema} from '../../lib/schema';\nimport {\n FAKE_DRIVER_DIR,\n FAKE_PLUGIN_DIR,\n getTestPort,\n TEST_HOST,\n W3C_PREFIXED_CAPS,\n} from '../helpers';\n\nconst FAKE_ARGS = {sillyWebServerPort: 1234, host: 'hey'};\nconst FAKE_PLUGIN_ARGS = {fake: FAKE_ARGS};\n\n/** @type {import('webdriverio').RemoteOptions} */\nconst wdOpts = {\n hostname: TEST_HOST,\n connectionRetryCount: 0,\n capabilities: W3C_PREFIXED_CAPS,\n};\n\n/** @type {Partial} */\nlet baseServerArgs;\n\n/**\n * @param {Partial} args\n */\nfunction serverSetup(args) {\n /** @type {AppiumServer|null} */\n let server = null;\n\n before(async function () { // eslint-disable-line mocha/no-top-level-hooks\n // then start server if we need to\n server = /** @type {AppiumServer} */ (\n await appiumServer({...baseServerArgs, ...args})\n );\n });\n after(async function () { // eslint-disable-line mocha/no-top-level-hooks\n if (server) {\n await server.close();\n }\n });\n}\n\ndescribe('FakePlugin w/ FakeDriver via HTTP', function () {\n /** @type {string} */\n let appiumHome;\n /** @type {string} */\n let testServerBaseUrl;\n /** @type {number} */\n let port;\n /** @type {string} */\n let testServerBaseSessionUrl;\n let should;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n should = chai.should();\n\n resetSchema();\n appiumHome = await tempDir.openDir();\n wdOpts.port = port = await getTestPort();\n testServerBaseUrl = `http://${TEST_HOST}:${port}`;\n testServerBaseSessionUrl = `${testServerBaseUrl}/session`;\n const {driverConfig, pluginConfig} = await loadExtensions(appiumHome);\n // first ensure we have fakedriver installed\n const driverList = await runExtensionCommand(\n {\n driverCommand: 'list',\n showInstalled: true,\n subcommand: DRIVER_TYPE,\n suppressOutput: true,\n },\n driverConfig,\n );\n if (!('fake' in driverList)) {\n await runExtensionCommand(\n {\n driverCommand: 'install',\n driver: FAKE_DRIVER_DIR,\n installType: INSTALL_TYPE_LOCAL,\n subcommand: DRIVER_TYPE,\n },\n driverConfig,\n );\n }\n\n const pluginList = await runExtensionCommand(\n {\n pluginCommand: 'list',\n showInstalled: true,\n subcommand: PLUGIN_TYPE,\n json: true,\n suppressOutput: true,\n },\n pluginConfig,\n );\n if (!('fake' in pluginList)) {\n await runExtensionCommand(\n {\n pluginCommand: 'install',\n subcommand: PLUGIN_TYPE,\n plugin: FAKE_PLUGIN_DIR,\n installType: INSTALL_TYPE_LOCAL,\n },\n pluginConfig,\n );\n }\n\n baseServerArgs = {\n appiumHome,\n port,\n address: TEST_HOST,\n usePlugins: ['fake'],\n useDrivers: ['fake'],\n };\n });\n\n after(async function () {\n await fs.rimraf(appiumHome);\n });\n\n describe('without plugin registered', function () {\n it('should reject server creation if plugin is not activated', async function () {\n const args = {\n appiumHome,\n port,\n address: TEST_HOST,\n usePlugins: ['other1', 'other2'],\n };\n await appiumServer(args).should.eventually.be.rejected;\n });\n it('should reject server creation if reserved plugin name is provided with other names', async function () {\n const args = {\n appiumHome,\n port,\n address: TEST_HOST,\n usePlugins: ['fake', 'all'],\n };\n await appiumServer(args).should.eventually.be.rejected;\n });\n });\n\n for (const registrationType of ['explicit', 'all']) {\n describe(`with plugin registered via type ${registrationType}`, function () {\n /** @type {import('type-fest').LiteralUnion<'all', string>[]} */\n const usePlugins = registrationType === 'explicit' ? ['fake'] : ['all'];\n serverSetup({usePlugins});\n it('should update the server', async function () {\n const res = {fake: 'fakeResponse'};\n (await axios.post(`http://${TEST_HOST}:${port}/fake`)).data.should.eql(res);\n });\n it('should update the server with cliArgs', async function () {\n const res = usePlugins;\n // we don't need to check the entire object, since it's large, but we can ensure an\n // arg got through.\n (await axios.post(`http://${TEST_HOST}:${port}/cliArgs`)).data.usePlugins.should.eql(res);\n });\n it('should modify the method map with new commands', async function () {\n const driver = await wdio(wdOpts);\n const {sessionId} = driver;\n try {\n await axios.post(`${testServerBaseSessionUrl}/${sessionId}/fake_data`, {\n data: {fake: 'data'},\n });\n (\n await axios.get(`${testServerBaseSessionUrl}/${sessionId}/fake_data`)\n ).data.value.should.eql({fake: 'data'});\n } finally {\n await driver.deleteSession();\n }\n });\n\n it('should handle commands and not call the original', async function () {\n const driver = await wdio(wdOpts);\n const {sessionId} = driver;\n try {\n await driver\n .getPageSource()\n .should.eventually.eql(`${JSON.stringify([sessionId])}`);\n } finally {\n await driver.deleteSession();\n }\n });\n\n it('should handle commands and call the original if designed', async function () {\n const driver = await wdio(wdOpts);\n const {sessionId} = driver;\n try {\n const el = (\n await axios.post(`${testServerBaseSessionUrl}/${sessionId}/element`, {\n using: 'xpath',\n value: '//MockWebView',\n })\n ).data.value;\n el.should.have.property('fake');\n } finally {\n await driver.deleteSession();\n }\n });\n\n it('should allow original command to be proxied if supported', async function () {\n const driver = await wdio(wdOpts);\n const {sessionId} = driver;\n try {\n await axios.post(`${testServerBaseSessionUrl}/${sessionId}/context`, {\n name: 'PROXY',\n });\n const handle = (await axios.get(`${testServerBaseSessionUrl}/${sessionId}/window`))\n .data.value;\n handle.should.eql('<>');\n } finally {\n await axios.post(`${testServerBaseSessionUrl}/${sessionId}/context`, {\n name: 'NATIVE_APP',\n });\n await driver.deleteSession();\n }\n });\n\n it('should handle unexpected driver shutdown', async function () {\n /** @type {import('webdriverio').RemoteOptions} */\n const newOpts = {...wdOpts};\n newOpts.capabilities = {\n ...(newOpts.capabilities ?? {}),\n 'appium:newCommandTimeout': 1,\n };\n const driver = await wdio(newOpts);\n let shutdownErr;\n try {\n let res = await axios.get(`http://${TEST_HOST}:${port}/unexpected`);\n should.not.exist(res.data);\n await B.delay(1500);\n res = await axios.get(`http://${TEST_HOST}:${port}/unexpected`);\n res.data.should.match(/Session ended/);\n res.data.should.match(/timeout/);\n await driver.deleteSession();\n } catch (e) {\n shutdownErr = e;\n }\n shutdownErr.message.should.match(/either terminated or not started/);\n });\n\n it('should allow plugin handled commands to reset newCommandTimeout', async function () {\n /** @type {import('webdriverio').RemoteOptions} */\n const newOpts = {...wdOpts};\n newOpts.capabilities = {\n ...(newOpts.capabilities ?? {}),\n 'appium:newCommandTimeout': 2,\n };\n const driver = await wdio(newOpts);\n const {sessionId} = driver;\n try {\n const start = Date.now();\n for (let i = 0; i < 5; i++) {\n await B.delay(500);\n await driver.getPageSource();\n }\n // prove that we went beyond the new command timeout as a result of sending commands\n (Date.now() - start).should.be.above(2500);\n await driver\n .getPageSource()\n .should.eventually.eql(`${JSON.stringify([sessionId])}`);\n } finally {\n await driver.deleteSession();\n }\n });\n });\n }\n describe('cli args handling for plugin args', function () {\n /** @type {AppiumServer} */\n let server;\n before(async function () {\n // then start server if we need to\n const args = {...baseServerArgs, plugin: FAKE_PLUGIN_ARGS};\n server = /** @type {AppiumServer} */ (await appiumServer(args));\n });\n after(async function () {\n if (server) {\n await server.close();\n }\n });\n\n it('should receive user cli args for plugin if passed in', async function () {\n const driver = await wdio(wdOpts);\n const {sessionId} = driver;\n try {\n const {data} = await axios.get(`${testServerBaseSessionUrl}/${sessionId}/fakepluginargs`);\n data.value.should.eql(FAKE_ARGS);\n } finally {\n await driver.deleteSession();\n }\n });\n });\n describe('cli args handling for empty plugin args', function () {\n /** @type {AppiumServer} */\n let server;\n before(async function () {\n // then start server if we need to\n server = /** @type {AppiumServer} */ (await appiumServer(baseServerArgs));\n });\n after(async function () {\n if (server) {\n await server.close();\n }\n });\n\n describe('when no cli args provided by user', function () {\n it('should receive an empty `cliArgs` object', async function () {\n const driver = await wdio(wdOpts);\n const {sessionId} = driver;\n try {\n const {data} = await axios.get(`${testServerBaseSessionUrl}/${sessionId}/fakepluginargs`);\n data.value.should.eql({});\n } finally {\n await driver.deleteSession();\n }\n });\n });\n });\n\n describe('Execute Methods', function () {\n /** @type {AppiumServer} */\n let server;\n\n /** @type {import('webdriverio').Browser} */\n let driver;\n\n before(async function () {\n // then start server if we need to\n const args = {\n appiumHome,\n port,\n address: TEST_HOST,\n usePlugins: ['fake'],\n useDrivers: ['fake'],\n };\n server = /** @type {AppiumServer} */ (await appiumServer(args));\n driver = await wdio(wdOpts);\n });\n after(async function () {\n if (driver) {\n await driver.deleteSession();\n }\n if (server) {\n await server.close();\n }\n });\n\n it('should handle execute methods using executeMethodMap', async function () {\n const res = await driver.executeScript('fake: plugMeIn', [{socket: 'electrical'}]);\n res.should.eql('Plugged in to electrical');\n });\n\n it('should handle execute methods overridden on the driver', async function () {\n const res = await driver.executeScript('fake: getThing', []);\n res.should.eql('PLUGIN_FAKE_THING');\n });\n\n it('should let driver handle unknown execute methods', async function () {\n const sum = await driver.executeScript('fake: addition', [{num1: 2, num2: 3}]);\n sum.should.eql(5);\n });\n });\n\n describe('BiDi support', function () {\n describe('with a single plugin', function() {\n /** @type {import('webdriverio').Browser} */\n let driver;\n\n // this 'after' block needs to come before 'serverSetup' so that the delete session happens\n // before the server shutdown\n after(async function () {\n if (driver) {\n await driver.deleteSession();\n }\n });\n\n serverSetup({});\n\n before(async function () {\n const caps = {...wdOpts.capabilities, webSocketUrl: true, 'appium:runClock': true};\n driver = await wdio({...wdOpts, capabilities: caps});\n });\n\n it('should handle custom bidi commands if registered', async function () {\n let {result} = await driver.send({method: 'appium:fake.getPluginThing', params: {}});\n should.not.exist(result);\n await driver.send({method: 'appium:fake.setPluginThing', params: {thing: 'plugin bidi'}});\n ({result} = await driver.send({method: 'appium:fake.getPluginThing', params: {}}));\n result.should.eql('plugin bidi');\n });\n\n it('should subscribe and unsubscribe to/from custom bidi events', async function () {\n let retrievals = 0;\n // asyncrhonously start our listener\n driver.on('appium:fake.pluginThingRetrieved', () => {\n retrievals++;\n });\n\n await driver.send({method: 'appium:fake.getPluginThing', params: {}});\n retrievals.should.eql(0);\n\n await driver.sessionSubscribe({events: ['appium:fake.pluginThingRetrieved']});\n await driver.send({method: 'appium:fake.getPluginThing', params: {}});\n await driver.send({method: 'appium:fake.getPluginThing', params: {}});\n retrievals.should.eql(2);\n\n await driver.sessionUnsubscribe({events: ['appium:fake.pluginThingRetrieved']});\n await driver.send({method: 'appium:fake.getPluginThing', params: {}});\n await driver.send({method: 'appium:fake.getPluginThing', params: {}});\n retrievals.should.eql(2);\n });\n\n it('should subscribe and unsubscribe to/from custom bidi events and merge with driver', async function () {\n let collectedEvents = [];\n // asyncrhonously start our listener\n driver.on('appium:clock.currentTime', ({time}) => {\n collectedEvents.push(time);\n });\n\n // wait for some time to be sure clock events have happened, and assert we don't receive\n // any yet\n await B.delay(750);\n collectedEvents.should.be.empty;\n\n // now subscribe and wait and assert that some events have been collected\n await driver.sessionSubscribe({events: ['appium:clock.currentTime']});\n await B.delay(800);\n collectedEvents.length.should.eql(5);\n\n // finally unsubscribe and wait and assert that some events have been collected\n await driver.sessionUnsubscribe({events: ['appium:clock.currentTime']});\n collectedEvents = [];\n await B.delay(800);\n collectedEvents.should.be.empty;\n });\n\n it('should call underlying driver bidi method if next is called', async function () {\n const {result} = await driver.send({method: 'appium:fake.doSomeMath', params: {num1: 2, num2: 3}});\n result.should.eql(11);\n });\n\n it('should override and not call underlying driver bidi method if next is not called', async function () {\n const {result} = await driver.send({method: 'appium:fake.doSomeMath2', params: {num1: 2, num2: 3}});\n result.should.eql(6);\n });\n });\n });\n});\n\n/**\n * @typedef {import('@appium/types').AppiumServer} AppiumServer\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/e2e/schema.e2e.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\nimport {fs, tempDir} from '@appium/support';\nimport path from 'node:path';\nimport {DRIVER_TYPE} from '../../lib/constants';\nimport {resolveFixture} from '../helpers';\nimport {installLocalExtension, runAppium} from './e2e-helpers';\n\ndescribe('CLI behavior controlled by schema', function () {\n /**\n * @type {string}\n */\n let appiumHome;\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n\n appiumHome = await tempDir.openDir();\n });\n\n after(async function () {\n await fs.rimraf(appiumHome);\n });\n\n describe('keyword', function () {\n /**\n * @type {string}\n */\n let help;\n\n before(async function () {\n await installLocalExtension(\n appiumHome,\n DRIVER_TYPE,\n path.dirname(resolveFixture('test-driver/package.json'))\n );\n help = await runAppium(appiumHome, ['server', '--help']);\n });\n\n describe('appiumCliIgnored', function () {\n it('should still support arguments without this keyword', function () {\n expect(help).to.match(/oliver-boliver/);\n });\n\n it('should cause the argument to be suppressed', function () {\n expect(help).not.to.match(/mcmonkey-mcbean/);\n });\n });\n\n describe('appiumDeprecated', function () {\n it.skip('should mark the argument as deprecated', function () {\n expect(help).to.match(/\\[DEPRECATED\\] funkytelechy/);\n });\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/default-args.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nexport default {\n address: '0.0.0.0',\n allowCors: false,\n allowInsecure: [],\n basePath: '',\n callbackPort: 4723,\n debugLogSpacing: false,\n denyInsecure: [],\n driversImportChunkSize: 3,\n keepAliveTimeout: 600,\n requestTimeout: 3600,\n localTimezone: false,\n logFormat: 'text',\n loglevel: 'debug',\n logNoColors: false,\n logTimestamp: false,\n longStacktrace: false,\n noPermsCheck: false,\n pluginsImportChunkSize: 7,\n port: 4723,\n relaxedSecurityEnabled: false,\n sessionOverride: false,\n shutdownTimeout: 5000,\n strictCaps: false,\n useDrivers: [],\n usePlugins: []\n};\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/driver-schema.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nmodule.exports = {\n type: 'object',\n required: ['answer'],\n properties: {\n answer: {\n type: 'number',\n minimum: 0,\n maximum: 100,\n default: 50,\n description:\n 'The answer to the Ultimate Question of Life, The Universe, and Everything',\n },\n },\n $id: 'driver.json'\n};\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/flattened-schema.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nexport default [\n {\n argSpec: {\n arg: 'address',\n defaultValue: '0.0.0.0',\n dest: 'address',\n extName: undefined,\n extType: undefined,\n name: 'address',\n rawDest: 'address',\n ref: 'appium.json#/properties/server/properties/address',\n },\n schema: {\n appiumCliAliases: ['a'],\n default: '0.0.0.0',\n description: 'IPv4/IPv6 address or a hostname to listen on',\n title: 'address config',\n type: 'string',\n anyOf: [\n {format: 'hostname', type: 'string'},\n {format: 'ipv6', type: 'string'}\n ]\n },\n },\n {\n argSpec: {\n arg: 'allow-cors',\n defaultValue: false,\n dest: 'allowCors',\n extName: undefined,\n extType: undefined,\n name: 'allow-cors',\n rawDest: 'allowCors',\n ref: 'appium.json#/properties/server/properties/allow-cors',\n },\n schema: {\n default: false,\n description:\n 'Whether the Appium server should allow web browser connections from any host',\n title: 'allow-cors config',\n type: 'boolean',\n },\n },\n {\n argSpec: {\n arg: 'allow-insecure',\n defaultValue: [],\n dest: 'allowInsecure',\n extName: undefined,\n extType: undefined,\n name: 'allow-insecure',\n rawDest: 'allowInsecure',\n ref: 'appium.json#/properties/server/properties/allow-insecure',\n },\n schema: {\n appiumCliTransformer: 'csv',\n default: [],\n description:\n 'Set which insecure features are allowed to run in this server\\'s sessions. Features are defined on a driver level; see documentation for more details. Note that features defined via \"deny-insecure\" will be disabled, even if also listed here. If string, a path to a text file containing policy or a comma-delimited list.',\n items: {type: 'string'},\n title: 'allow-insecure config',\n type: 'array',\n uniqueItems: true,\n },\n },\n {\n argSpec: {\n arg: 'base-path',\n defaultValue: '',\n dest: 'basePath',\n extName: undefined,\n extType: undefined,\n name: 'base-path',\n rawDest: 'basePath',\n ref: 'appium.json#/properties/server/properties/base-path',\n },\n schema: {\n appiumCliAliases: ['pa'],\n default: '',\n description:\n 'Base path to use as the prefix for all webdriver routes running on the server',\n title: 'base-path config',\n type: 'string',\n },\n },\n {\n argSpec: {\n arg: 'callback-address',\n defaultValue: undefined,\n dest: 'callbackAddress',\n extName: undefined,\n extType: undefined,\n name: 'callback-address',\n rawDest: 'callbackAddress',\n ref: 'appium.json#/properties/server/properties/callback-address',\n },\n schema: {\n appiumCliAliases: ['ca'],\n description: 'Callback IP address (default: same as \"address\")',\n title: 'callback-address config',\n type: 'string',\n },\n },\n {\n argSpec: {\n arg: 'callback-port',\n defaultValue: 4723,\n dest: 'callbackPort',\n extName: undefined,\n extType: undefined,\n name: 'callback-port',\n rawDest: 'callbackPort',\n ref: 'appium.json#/properties/server/properties/callback-port',\n },\n schema: {\n appiumCliAliases: ['cp'],\n default: 4723,\n description: 'Callback port (default: same as \"port\")',\n maximum: 65535,\n minimum: 1,\n title: 'callback-port config',\n type: 'integer',\n },\n },\n {\n argSpec: {\n arg: 'debug-log-spacing',\n defaultValue: false,\n dest: 'debugLogSpacing',\n extName: undefined,\n extType: undefined,\n name: 'debug-log-spacing',\n rawDest: 'debugLogSpacing',\n ref: 'appium.json#/properties/server/properties/debug-log-spacing',\n },\n schema: {\n default: false,\n description:\n 'Add exaggerated spacing in logs to help with visual inspection',\n title: 'debug-log-spacing config',\n type: 'boolean',\n },\n },\n {\n argSpec: {\n arg: 'default-capabilities',\n defaultValue: undefined,\n dest: 'defaultCapabilities',\n extName: undefined,\n extType: undefined,\n name: 'default-capabilities',\n rawDest: 'defaultCapabilities',\n ref: 'appium.json#/properties/server/properties/default-capabilities',\n },\n schema: {\n $comment: 'TODO',\n appiumCliAliases: ['dc'],\n description:\n 'Set the default desired capabilities, which will be set on each session unless overridden by received capabilities. If a string, a path to a JSON file containing the capabilities, or raw JSON.',\n title: 'default-capabilities config',\n type: 'object',\n },\n },\n {\n argSpec: {\n arg: 'deny-insecure',\n defaultValue: [],\n dest: 'denyInsecure',\n extName: undefined,\n extType: undefined,\n name: 'deny-insecure',\n rawDest: 'denyInsecure',\n ref: 'appium.json#/properties/server/properties/deny-insecure',\n },\n schema: {\n $comment: 'Allowed values are defined by drivers',\n appiumCliTransformer: 'csv',\n default: [],\n description:\n 'Set which insecure features are not allowed to run in this server\\'s sessions. Features are defined on a driver level; see documentation for more details. Features listed here will not be enabled even if also listed in \"allow-insecure\", and even if \"relaxed-security\" is enabled. If string, a path to a text file containing policy or a comma-delimited list.',\n items: {type: 'string'},\n title: 'deny-insecure config',\n type: 'array',\n uniqueItems: true,\n },\n },\n {\n argSpec: {\n arg: 'keep-alive-timeout',\n defaultValue: 600,\n dest: 'keepAliveTimeout',\n extName: undefined,\n extType: undefined,\n name: 'keep-alive-timeout',\n rawDest: 'keepAliveTimeout',\n ref: 'appium.json#/properties/server/properties/keep-alive-timeout',\n },\n schema: {\n appiumCliAliases: ['ka'],\n default: 600,\n description:\n 'Number of seconds the Appium server should apply as both the keep-alive timeout and the connection timeout for all requests. A value of 0 disables the timeout.',\n minimum: 0,\n title: 'keep-alive-timeout config',\n type: 'integer',\n },\n },\n {\n argSpec: {\n arg: 'local-timezone',\n defaultValue: false,\n dest: 'localTimezone',\n extName: undefined,\n extType: undefined,\n name: 'local-timezone',\n rawDest: 'localTimezone',\n ref: 'appium.json#/properties/server/properties/local-timezone',\n },\n schema: {\n default: false,\n description: 'Use local timezone for timestamps',\n title: 'local-timezone config',\n type: 'boolean',\n },\n },\n {\n argSpec: {\n arg: 'log',\n defaultValue: undefined,\n dest: 'logFile',\n extName: undefined,\n extType: undefined,\n name: 'log',\n rawDest: 'logFile',\n ref: 'appium.json#/properties/server/properties/log',\n },\n schema: {\n appiumCliAliases: ['g'],\n appiumCliDest: 'logFile',\n description: 'Also send log output to this file',\n title: 'log config',\n type: 'string',\n },\n },\n {\n argSpec: {\n arg: 'log-filters',\n defaultValue: undefined,\n dest: 'logFilters',\n extName: undefined,\n extType: undefined,\n name: 'log-filters',\n rawDest: 'logFilters',\n ref: 'appium.json#/properties/server/properties/log-filters',\n },\n schema: {\n description: 'One or more log filtering rules',\n title: 'log-filters config',\n type: 'array',\n items: {$ref: '#/$defs/logFilter'},\n appiumCliTransformer: 'json',\n },\n },\n {\n argSpec: {\n arg: 'log-level',\n defaultValue: 'debug',\n dest: 'loglevel',\n extName: undefined,\n extType: undefined,\n name: 'log-level',\n rawDest: 'loglevel',\n ref: 'appium.json#/properties/server/properties/log-level',\n },\n schema: {\n appiumCliDest: 'loglevel',\n default: 'debug',\n description: 'Log level (console[:file])',\n enum: [\n 'info',\n 'info:debug',\n 'info:info',\n 'info:warn',\n 'info:error',\n 'warn',\n 'warn:debug',\n 'warn:info',\n 'warn:warn',\n 'warn:error',\n 'error',\n 'error:debug',\n 'error:info',\n 'error:warn',\n 'error:error',\n 'debug',\n 'debug:debug',\n 'debug:info',\n 'debug:warn',\n 'debug:error',\n ],\n title: 'log-level config',\n type: 'string',\n },\n },\n {\n argSpec: {\n arg: 'log-no-colors',\n defaultValue: false,\n dest: 'logNoColors',\n extName: undefined,\n extType: undefined,\n name: 'log-no-colors',\n rawDest: 'logNoColors',\n ref: 'appium.json#/properties/server/properties/log-no-colors',\n },\n schema: {\n default: false,\n description: 'Do not use color in console output',\n title: 'log-no-colors config',\n type: 'boolean',\n },\n },\n {\n argSpec: {\n arg: 'log-timestamp',\n defaultValue: false,\n dest: 'logTimestamp',\n extName: undefined,\n extType: undefined,\n name: 'log-timestamp',\n rawDest: 'logTimestamp',\n ref: 'appium.json#/properties/server/properties/log-timestamp',\n },\n schema: {\n default: false,\n description: 'Show timestamps in console output',\n title: 'log-timestamp config',\n type: 'boolean',\n },\n },\n {\n argSpec: {\n arg: 'long-stacktrace',\n defaultValue: false,\n dest: 'longStacktrace',\n extName: undefined,\n extType: undefined,\n name: 'long-stacktrace',\n rawDest: 'longStacktrace',\n ref: 'appium.json#/properties/server/properties/long-stacktrace',\n },\n schema: {\n default: false,\n description:\n 'Add long stack traces to log entries. Recommended for debugging only.',\n title: 'long-stacktrace config',\n type: 'boolean',\n },\n },\n {\n argSpec: {\n arg: 'no-perms-check',\n defaultValue: false,\n dest: 'noPermsCheck',\n extName: undefined,\n extType: undefined,\n name: 'no-perms-check',\n rawDest: 'noPermsCheck',\n ref: 'appium.json#/properties/server/properties/no-perms-check',\n },\n schema: {\n default: false,\n description:\n 'Do not check that needed files are readable and/or writable',\n title: 'no-perms-check config',\n type: 'boolean',\n },\n },\n {\n argSpec: {\n arg: 'nodeconfig',\n defaultValue: undefined,\n dest: 'nodeconfig',\n extName: undefined,\n extType: undefined,\n name: 'nodeconfig',\n rawDest: 'nodeconfig',\n ref: 'appium.json#/properties/server/properties/nodeconfig',\n },\n schema: {\n $comment:\n 'Selenium Grid 3 is unmaintained and Selenium Grid 4 no longer supports this file.',\n description:\n 'Path to configuration JSON file to register Appium as a node with Selenium Grid 3; otherwise the configuration itself',\n title: 'nodeconfig config',\n type: 'object',\n },\n },\n {\n argSpec: {\n arg: 'port',\n defaultValue: 4723,\n dest: 'port',\n extName: undefined,\n extType: undefined,\n name: 'port',\n rawDest: 'port',\n ref: 'appium.json#/properties/server/properties/port',\n },\n schema: {\n appiumCliAliases: ['p'],\n default: 4723,\n description: 'Port to listen on',\n maximum: 65535,\n minimum: 1,\n title: 'port config',\n type: 'integer',\n },\n },\n {\n argSpec: {\n arg: 'relaxed-security',\n defaultValue: false,\n dest: 'relaxedSecurityEnabled',\n extName: undefined,\n extType: undefined,\n name: 'relaxed-security',\n rawDest: 'relaxedSecurityEnabled',\n ref: 'appium.json#/properties/server/properties/relaxed-security',\n },\n schema: {\n appiumCliDest: 'relaxedSecurityEnabled',\n default: false,\n description:\n 'Disable additional security checks, so it is possible to use some advanced features, provided by drivers supporting this option. Only enable it if all the clients are in the trusted network and it\\'s not the case if a client could potentially break out of the session sandbox. Specific features can be overridden by using \"deny-insecure\"',\n title: 'relaxed-security config',\n type: 'boolean',\n },\n },\n {\n argSpec: {\n arg: 'session-override',\n defaultValue: false,\n dest: 'sessionOverride',\n extName: undefined,\n extType: undefined,\n name: 'session-override',\n rawDest: 'sessionOverride',\n ref: 'appium.json#/properties/server/properties/session-override',\n },\n schema: {\n default: false,\n description: 'Enables session override (clobbering)',\n title: 'session-override config',\n type: 'boolean',\n },\n },\n {\n argSpec: {\n arg: 'strict-caps',\n defaultValue: false,\n dest: 'strictCaps',\n extName: undefined,\n extType: undefined,\n name: 'strict-caps',\n rawDest: 'strictCaps',\n ref: 'appium.json#/properties/server/properties/strict-caps',\n },\n schema: {\n default: false,\n description:\n 'Cause sessions to fail if desired caps are sent in that Appium does not recognize as valid for the selected device',\n title: 'strict-caps config',\n type: 'boolean',\n },\n },\n {\n argSpec: {\n arg: 'tmp',\n defaultValue: undefined,\n dest: 'tmpDir',\n extName: undefined,\n extType: undefined,\n name: 'tmp',\n rawDest: 'tmpDir',\n ref: 'appium.json#/properties/server/properties/tmp',\n },\n schema: {\n appiumCliDest: 'tmpDir',\n description:\n 'Absolute path to directory Appium can use to manage temp files. Defaults to C:\\\\Windows\\\\Temp on Windows and /tmp otherwise.',\n title: 'tmp config',\n type: 'string',\n },\n },\n {\n argSpec: {\n arg: 'trace-dir',\n defaultValue: undefined,\n dest: 'traceDir',\n extName: undefined,\n extType: undefined,\n name: 'trace-dir',\n rawDest: 'traceDir',\n ref: 'appium.json#/properties/server/properties/trace-dir',\n },\n schema: {\n description:\n 'Absolute path to directory Appium can use to save iOS instrument traces; defaults to /appium-instruments',\n title: 'trace-dir config',\n type: 'string',\n },\n },\n {\n argSpec: {\n arg: 'use-drivers',\n defaultValue: [],\n dest: 'useDrivers',\n extName: undefined,\n extType: undefined,\n name: 'use-drivers',\n rawDest: 'useDrivers',\n ref: 'appium.json#/properties/server/properties/use-drivers',\n },\n schema: {\n appiumCliDescription:\n 'A list of drivers to activate. Can be a comma-delimited string or path to CSV file. By default, all installed drivers will be activated. Windows environments may require wrapping the comma-delimited string with quotes to escape the comma.',\n default: [],\n description:\n 'A list of drivers to activate. By default, all installed drivers will be activated.',\n items: {type: 'string'},\n title: 'use-drivers config',\n type: 'array',\n uniqueItems: true,\n },\n },\n {\n argSpec: {\n arg: 'use-plugins',\n defaultValue: [],\n dest: 'usePlugins',\n extName: undefined,\n extType: undefined,\n name: 'use-plugins',\n rawDest: 'usePlugins',\n ref: 'appium.json#/properties/server/properties/use-plugins',\n },\n schema: {\n appiumCliDescription:\n 'A list of plugins to activate. Can be a comma-delimited string, path to CSV file, or the string \"all\" to use all installed plugins. Windows environments may require wrapping the comma-delimited string with quotes to escape the comma.',\n default: [],\n description:\n 'A list of plugins to activate. To activate all plugins, the value should be an array with a single item \"all\".',\n items: {type: 'string'},\n title: 'use-plugins config',\n type: 'array',\n uniqueItems: true,\n },\n },\n {\n argSpec: {\n arg: 'webhook',\n defaultValue: undefined,\n dest: 'webhook',\n extName: undefined,\n extType: undefined,\n name: 'webhook',\n rawDest: 'webhook',\n ref: 'appium.json#/properties/server/properties/webhook',\n },\n schema: {\n $comment:\n 'This should probably use a uri-template format to restrict the protocol to http/https',\n appiumCliAliases: ['G'],\n description: 'Also send log output to this http listener',\n format: 'uri',\n title: 'webhook config',\n type: 'string',\n },\n }\n];\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/log-filters.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n[\n {\n \"text\": \"foo\",\n \"replacer\": \"bar\"\n },\n {\n \"pattern\": \"/foo/\",\n \"flags\": \"i\"\n }\n]\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/plugin-schema.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nmodule.exports = {\n type: 'object',\n required: ['answer'],\n properties: {\n answer: {\n type: 'number',\n minimum: 0,\n maximum: 100,\n default: 50,\n description:\n 'The answer to the Ultimate Question of Life, The Universe, and Everything',\n },\n },\n $id: 'plugin.json'\n};\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/schema-with-extensions.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// this fixture combines the base config schema and the fake-driver schema, as would happen in a real use case.\nimport _ from 'lodash';\nimport { AppiumConfigJsonSchema } from '@appium/schema';\n\n// this must be a `require` because babel will not compile `node_modules`\n// TODO: consider just copying this into fixtures so we can make it ESM\nconst {default: fakeDriverSchema} = require('@appium/fake-driver/build/lib/fake-driver-schema');\n\nconst schema = _.cloneDeep(AppiumConfigJsonSchema);\n_.set(schema, 'properties.driver.properties.fake', fakeDriverSchema);\n\nexport default schema;\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/cli/appium-dependency.package.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"name\": \"my-project\",\n \"devDependencies\": {\n \"appium\": \"next\"\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/cli/appium-file-dependency.package.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"name\": \"my-project\",\n \"dependencies\": {\n \"appium\": \"file:./appium/somewhere\"\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/cli/appium-old-dependency.package.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"name\": \"my-project\",\n \"dependencies\": {\n \"appium\": \"next\"\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/appium-config-bad-nodeconfig.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"server\": {\n \"nodeconfig\": \"./packages/appium/test/fixtures/config/nodeconfig.json\"\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/appium-config-bad.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"appium-home\": \"foo\",\n \"server\": {\n \"address\": \"0.0.0.0\",\n \"allow-cors\": 1,\n \"allow-insecure\": {},\n \"base-path\": \"/\",\n \"callback-address\": \"0.0.0.0\",\n \"callback-port\": 43243234,\n \"debug-log-spacing\": false,\n \"default-capabilities\": {},\n \"deny-insecure\": [],\n \"keep-alive-timeout\": 0,\n \"local-timezone\": false,\n \"log\": \"/tmp/appium.log\",\n \"log-level\": \"smoosh\",\n \"log-no-colors\": 1,\n \"log-timestamp\": false,\n \"long-stacktrace\": false,\n \"no-perms-check\": false,\n \"nodeconfig\": {},\n \"port\": \"31337\",\n \"relaxed-security\": false,\n \"session-override\": false,\n \"strict-caps\": false,\n \"tmp\": \"/tmp\",\n \"trace-dir\": \"/tmp/appium-instruments\",\n \"use-drivers\": [],\n \"use-plugins\": [\"all\"],\n \"webhook\": \"http://0.0.0.0/hook\"\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/appium-config-driver-fake.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"driver\": {\n \"fake\": {\n \"sillyWebServerPort\": 1234,\n \"sillyWebServerHost\": \"hey\"\n }\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/appium-config-ext-good.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"server\": {\n \"driver\": {\n \"fake\": {\n \"answer\": 24\n }\n }\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/appium-config-ext-unknown-props.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"server\": {\n \"driver\": {\n \"fake\": {\n \"answer\": 24,\n \"bubb\": \"rubb\"\n }\n }\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/appium-config-good-normalized.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"server\": {\n \"address\": \"0.0.0.0\",\n \"allow-cors\": false,\n \"allow-insecure\": [],\n \"base-path\": \"/\",\n \"callback-address\": \"0.0.0.0\",\n \"callback-port\": 31337,\n \"debug-log-spacing\": false,\n \"default-capabilities\": {},\n \"deny-insecure\": [],\n \"keep-alive-timeout\": 600,\n \"local-timezone\": false,\n \"log\": \"/tmp/appium.log\",\n \"log-level\": \"info\",\n \"log-no-colors\": false,\n \"log-timestamp\": false,\n \"long-stacktrace\": false,\n \"no-perms-check\": false,\n \"nodeconfig\": {\n \"foo\": \"bar\"\n },\n \"port\": 31337,\n \"relaxed-security\": false,\n \"session-override\": false,\n \"strict-caps\": false,\n \"tmp\": \"/tmp\",\n \"trace-dir\": \"/tmp/appium-instruments\",\n \"use-drivers\": [],\n \"use-plugins\": [\"all\"],\n \"webhook\": \"http://0.0.0.0/hook\"\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/appium-config-good.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nmodule.exports = {\n server: {\n address: '0.0.0.0',\n 'allow-cors': false,\n 'allow-insecure': [],\n 'base-path': '/',\n 'callback-address': '0.0.0.0',\n 'callback-port': 31337,\n 'debug-log-spacing': false,\n 'default-capabilities': {},\n 'deny-insecure': [],\n 'keep-alive-timeout': 600,\n 'local-timezone': false,\n log: '/tmp/appium.log',\n 'log-level': 'info',\n 'log-no-colors': false,\n 'log-timestamp': false,\n 'long-stacktrace': false,\n 'no-perms-check': false,\n nodeconfig: {\n foo: 'bar'\n },\n port: 31337,\n 'relaxed-security': false,\n 'session-override': false,\n 'strict-caps': false,\n tmp: '/tmp',\n 'trace-dir': '/tmp/appium-instruments',\n 'use-drivers': [],\n 'use-plugins': ['all'],\n webhook: 'http://0.0.0.0/hook'\n },\n};\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/appium-config-good.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"server\": {\n \"address\": \"0.0.0.0\",\n \"allow-cors\": false,\n \"allow-insecure\": [],\n \"base-path\": \"/\",\n \"callback-address\": \"0.0.0.0\",\n \"callback-port\": 31337,\n \"debug-log-spacing\": false,\n \"default-capabilities\": {},\n \"deny-insecure\": [],\n \"keep-alive-timeout\": 600,\n \"local-timezone\": false,\n \"log\": \"/tmp/appium.log\",\n \"log-level\": \"info\",\n \"log-no-colors\": false,\n \"log-timestamp\": false,\n \"long-stacktrace\": false,\n \"no-perms-check\": false,\n \"nodeconfig\": {\n \"foo\": \"bar\"\n },\n \"port\": 31337,\n \"relaxed-security\": true,\n \"session-override\": false,\n \"strict-caps\": false,\n \"tmp\": \"/tmp\",\n \"trace-dir\": \"/tmp/appium-instruments\",\n \"use-drivers\": [],\n \"use-plugins\": [\"all\"],\n \"webhook\": \"http://0.0.0.0/hook\"\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/appium-config-good.yaml\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nserver:\n address: '0.0.0.0'\n port: 31337\n allow-cors: false\n allow-insecure: []\n base-path: /\n callback-address: '0.0.0.0'\n callback-port: 31337\n log-level: info\n log-timestamp: false\n debug-log-spacing: false\n default-capabilities: {}\n deny-insecure: []\n keep-alive-timeout: 600\n local-timezone: false\n log: /tmp/appium.log\n log-no-colors: false\n long-stacktrace: false\n no-perms-check: false\n nodeconfig:\n foo: bar\n relaxed-security: true # not default\n session-override: false\n strict-caps: false\n tmp: /tmp\n trace-dir: /tmp/appium-instruments\n use-drivers: []\n use-plugins:\n - all\n webhook: 'http://0.0.0.0/hook'\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/appium-config-invalid.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"server\": {\n \"address\": \"0.0.0.0\",\n \"port\": 31337,\n \"allow-cors\": false,\n \"allow-insecure\": [],\n \"base-path\": \"/\",\n \"callback-address\": \"0.0.0.0\",\n \"callback-port\": 31337,\n \"log-level\": \"info\",\n \"log-timestamp\": false,\n \"debug-log-spacing\": false,\n \"default-capabilities\": {},\n \"deny-insecure\": [],\n \"drivers\": [],\n \"keep-alive-timeout\": 600,\n \"local-timezone\": false,\n \"log\": \"/tmp/appium.log\",\n \"log-no-colors\": false,\n \"long-stacktrace\": false,\n \"no-perms-check\": false,\n \"nodeconfig\": {},\n \"plugins\": \"all\",\n \"relaxed-security\": false,\n \"session-override\": false,\n \"strict-caps\": false,\n \"tmp\": '/tmp',\n \"trace-dir\": \"/tmp/appium-instruments\",\n \"webhook\": \"http://0.0.0.0/hook\"\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/appium-config-log-filters.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"server\": {\n \"log-filters\": [\n {\n \"text\": \"foo\",\n \"replacer\": \"bar\"\n },\n {\n \"pattern\": \"/foo/\",\n \"flags\": \"i\"\n }\n ]\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/appium-config-security-array.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"server\": {\n \"allow-insecure\": [\"*:foo\", \"*:bar\", \"*:baz\"]\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/appium-config-security-delimited.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"server\": {\n \"allow-insecure\": \"*:foo,*:bar,*:baz\"\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/appium-config-security-path.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"server\": {\n \"allow-insecure\": \"./packages/appium/test/fixtures/config/allow-insecure.txt\"\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/config/nodeconfig.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"random\": \"stuff\"\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/manifest/v2-empty.yaml\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\ndrivers: {}\nplugins: {}\nschemaRev: 2\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/manifest/v2.yaml\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\ndrivers:\n fake:\n automationName: Fake\n platformNames:\n - Fake\n mainClass: FakeDriver\n schema: ./build/lib/fake-driver-schema.js\n scripts:\n fake-error: ./build/lib/scripts/fake-error.js\n fake-success: ./build/lib/scripts/fake-success.js\n pkgName: '@appium/fake-driver'\n version: 3.0.5\n installType: local\n installSpec: /Users/alice/projects/appium/packages/fake-driver\nplugins:\n fake:\n mainClass: FakePlugin\n scripts:\n fake-error: ./build/lib/scripts/fake-error.js\n fake-success: ./build/lib/scripts/fake-success.js\n pkgName: '@appium/fake-plugin'\n version: 1.2.2\n installType: local\n installSpec: /Users/alice/projects/appium/node_modules/@appium/fake-plugin\nschemaRev: 2\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/manifest/v3.yaml\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\ndrivers:\n fake:\n automationName: Fake\n platformNames:\n - Fake\n mainClass: FakeDriver\n schema: ./build/lib/fake-driver-schema.js\n scripts:\n fake-error: ./build/lib/scripts/fake-error.js\n fake-success: ./build/lib/scripts/fake-success.js\n pkgName: '@appium/fake-driver'\n version: 3.0.5\n installType: local\n installSpec: /Users/alice/projects/appium/packages/fake-driver\n installPath: /Users/alice/projects/appium/packages/fake-driver\nplugins:\n fake:\n mainClass: FakePlugin\n scripts:\n fake-error: ./build/lib/scripts/fake-error.js\n fake-success: ./build/lib/scripts/fake-success.js\n pkgName: '@appium/fake-plugin'\n version: 1.2.2\n installType: local\n installSpec: /Users/alice/projects/appium/node_modules/@appium/fake-plugin\n installPath: /Users/alice/projects/appium/node_modules/@appium/fake-plugin\nschemaRev: 3\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/test-driver-invalid-peer-dep/package.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"name\": \"test-driver-invalid-peer-dep\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"appium\": {\n \"driverName\": \"test\",\n \"automationName\": \"Test\",\n \"platformNames\": [\n \"Test\"\n ],\n \"mainClass\": \"TestDriver\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"mcmonkey-mcbean\": {\n \"type\": \"string\",\n \"appiumCliIgnored\": true\n },\n \"oliver-boliver\": {\n \"type\": \"number\",\n \"appiumDeprecated\": true,\n \"description\": \"funkytelechy\"\n }\n }\n }\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/fixtures/test-driver/package.json\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n{\n \"name\": \"@appium/test-driver\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"peerDependencies\": {\n \"appium\": \"^3.0.0-beta.0\"\n },\n \"devDependencies\": {\n \"appium\": \"next\"\n },\n \"appium\": {\n \"driverName\": \"test\",\n \"automationName\": \"Test\",\n \"platformNames\": [\n \"Test\"\n ],\n \"mainClass\": \"TestDriver\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"mcmonkey-mcbean\": {\n \"type\": \"string\",\n \"appiumCliIgnored\": true\n },\n \"oliver-boliver\": {\n \"type\": \"number\",\n \"appiumDeprecated\": true,\n \"description\": \"funkytelechy\"\n }\n }\n }\n }\n}\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/appiumdriver.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport {PLUGIN_TYPE, SESSION_DISCOVERY_FEATURE} from '../../lib/constants';\nimport B from 'bluebird';\nimport {BaseDriver} from '@appium/base-driver';\nimport {FakeDriver} from '@appium/fake-driver';\nimport {sleep} from 'asyncbox';\nimport _ from 'lodash';\nimport {createSandbox} from 'sinon';\nimport {finalizeSchema, registerSchema, resetSchema} from '../../lib/schema/schema';\nimport {insertAppiumPrefixes, removeAppiumPrefixes} from '../../lib/utils';\nimport {rewiremock, BASE_CAPS, W3C_CAPS, W3C_PREFIXED_CAPS} from '../helpers';\nimport {BasePlugin} from '@appium/base-plugin';\n\nconst SESSION_ID = '1';\nconst SESSION_DISCOVERY_ENABLED = {allowInsecure: [`*:${SESSION_DISCOVERY_FEATURE}`]};\n\ndescribe('AppiumDriver', function () {\n /** @type {import('sinon').SinonSandbox} */\n let sandbox;\n\n /** @type {typeof import('appium/lib/appium').AppiumDriver} */\n let AppiumDriver;\n\n /** @type {MockConfig} */\n let MockConfig;\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n });\n\n beforeEach(function () {\n sandbox = createSandbox();\n resetSchema();\n finalizeSchema();\n\n MockConfig = {\n getBuildInfo: /** @type {MockConfig['getBuildInfo']} */ (\n sandbox.stub().callsFake(() => ({version: MockConfig.APPIUM_VER}))\n ),\n updateBuildInfo: /** @type {MockConfig['updateBuildInfo']} */ (sandbox.stub().resolves()),\n APPIUM_VER: '2.0',\n };\n ({AppiumDriver} = rewiremock.proxy(() => require('../../lib/appium'), {\n '../../lib/config': MockConfig,\n }));\n });\n\n afterEach(function () {\n sandbox.restore();\n });\n\n describe('constructor', function () {\n it('should not emit an uncaught rejection if updateBuildInfo() fails', async function () {\n const err = new Error('oops');\n // this test is wacky because we do not await the call to `updateBuildInfo()` within\n // the constructor. in that case, we won't actually know _when_ the promise is resolved or rejected.\n // the following is the workaround\n const promise = new B((resolve) => {\n MockConfig.updateBuildInfo.callsFake(() => {\n resolve();\n return B.reject(err);\n });\n });\n\n let ad = new AppiumDriver({});\n // triggers the `log` getter to set `_log`\n ad.log;\n // now we can stub `_log`, since it exists\n const debugStrub = sandbox.stub(ad._log, 'debug');\n // finally, wait for `updateBuildInfo()` to finish up\n await promise;\n debugStrub.calledOnce.should.be.true;\n });\n });\n\n describe('instance method', function () {\n let fakeDriver;\n\n /**\n *\n * @param {*} appiumArgs\n * @param {*} DriverClass\n * @returns {[AppiumDriver, sinon.SinonMock]}\n */\n function getDriverAndFakeDriver(appiumArgs = {}, DriverClass = FakeDriver) {\n const appium = new AppiumDriver(appiumArgs);\n fakeDriver = new DriverClass();\n const mockFakeDriver = sandbox.mock(fakeDriver);\n const mockedDriverReturnerClass = function Driver() {\n return fakeDriver;\n };\n\n appium.driverConfig = {\n findMatchingDriver: sandbox.stub().returns({\n driver: mockedDriverReturnerClass,\n version: '1.2.3',\n driverName: 'fake',\n }),\n };\n\n return [appium, mockFakeDriver];\n }\n describe('configureGlobalFeatures', function () {\n /** @type {AppiumDriver} */\n let appium;\n\n /**\n * @param {import('@appium/types').DriverOpts} cliArgs\n */\n function createDriver(cliArgs) {\n appium = new AppiumDriver(cliArgs);\n appium.configureGlobalFeatures();\n };\n it('should not allow insecure features by default', function () {\n createDriver({});\n appium.allowInsecure.should.be.empty;\n appium.denyInsecure.should.be.empty;\n appium.relaxedSecurityEnabled.should.be.false;\n });\n it('should allow insecure features', function () {\n createDriver({allowInsecure: ['foo:bar']});\n appium.allowInsecure.should.eql(['foo:bar']);\n });\n it('should deny insecure features', function () {\n createDriver({denyInsecure: ['foo:baz']});\n appium.denyInsecure.should.eql(['foo:baz']);\n });\n it('should allow relaxed security', function () {\n createDriver({relaxedSecurityEnabled: true});\n appium.relaxedSecurityEnabled.should.be.true;\n });\n it('should ignore allowed features in combination with relaxed security', function () {\n createDriver({\n allowInsecure: ['foo:bar'],\n relaxedSecurityEnabled: true,\n });\n appium.allowInsecure.should.be.empty;\n appium.relaxedSecurityEnabled.should.be.true;\n });\n });\n describe('createSession', function () {\n /** @type {AppiumDriver} */\n let appium;\n /** @type {sinon.SinonMock} */\n let mockFakeDriver;\n beforeEach(function () {\n [appium, mockFakeDriver] = getDriverAndFakeDriver(SESSION_DISCOVERY_ENABLED);\n });\n afterEach(async function () {\n mockFakeDriver.restore();\n await appium.deleteSession(SESSION_ID);\n });\n\n it(`should call inner driver's createSession with desired capabilities`, async function () {\n mockFakeDriver\n .expects('createSession')\n .once()\n .withExactArgs(W3C_CAPS, W3C_CAPS, W3C_CAPS, [])\n .returns([SESSION_ID, removeAppiumPrefixes(W3C_PREFIXED_CAPS)]);\n await appium.createSession(W3C_CAPS);\n mockFakeDriver.verify();\n });\n it(`should call inner driver's createSession with desired and default capabilities`, async function () {\n let defaultCaps = {'appium:someCap': 'hello'};\n let allCaps = {\n ...W3C_CAPS,\n alwaysMatch: {...W3C_CAPS.alwaysMatch, ...defaultCaps},\n };\n appium.args.defaultCapabilities = defaultCaps;\n mockFakeDriver\n .expects('createSession')\n .once()\n .withArgs(allCaps, allCaps, allCaps)\n .returns([SESSION_ID, removeAppiumPrefixes(allCaps.alwaysMatch)]);\n await appium.createSession(W3C_CAPS, W3C_CAPS, W3C_CAPS);\n mockFakeDriver.verify();\n });\n it(`should call inner driver's createSession with desired and default capabilities without overriding caps`, async function () {\n // a default capability with the same key as a desired capability\n // should do nothing\n let defaultCaps = {platformName: 'Ersatz'};\n appium.args.defaultCapabilities = defaultCaps;\n mockFakeDriver\n .expects('createSession')\n .once()\n .withArgs(W3C_CAPS, W3C_CAPS, W3C_CAPS)\n .returns([SESSION_ID, removeAppiumPrefixes(W3C_PREFIXED_CAPS)]);\n await appium.createSession(W3C_CAPS, W3C_CAPS, W3C_CAPS);\n mockFakeDriver.verify();\n });\n it('should kill all other sessions if sessionOverride is on', async function () {\n appium.configureGlobalFeatures();\n appium.args.sessionOverride = true;\n\n // mock three sessions that should be removed when the new one is created\n let fakeDrivers = [new FakeDriver(), new FakeDriver(), new FakeDriver()];\n let mockFakeDrivers = _.map(fakeDrivers, (fd) => sandbox.mock(fd));\n mockFakeDrivers[0].expects('deleteSession').once();\n mockFakeDrivers[1]\n .expects('deleteSession')\n .once()\n .throws('Cannot shut down Android driver; it has already shut down');\n mockFakeDrivers[2].expects('deleteSession').once();\n appium.sessions['abc-123-xyz'] = fakeDrivers[0];\n appium.sessions['xyz-321-abc'] = fakeDrivers[1];\n appium.sessions['123-abc-xyz'] = fakeDrivers[2];\n\n let sessions = await appium.getAppiumSessions();\n sessions.should.have.length(3);\n\n mockFakeDriver\n .expects('createSession')\n .once()\n .withExactArgs(W3C_CAPS, W3C_CAPS, W3C_CAPS, [])\n .returns([SESSION_ID, removeAppiumPrefixes(W3C_PREFIXED_CAPS)]);\n await appium.createSession(W3C_CAPS, W3C_CAPS, W3C_CAPS);\n\n sessions = await appium.getAppiumSessions();\n sessions.should.have.length(1);\n\n for (let mfd of mockFakeDrivers) {\n mfd.verify();\n }\n mockFakeDriver.verify();\n });\n it('should call \"createSession\" with W3C capabilities argument, if provided', async function () {\n mockFakeDriver\n .expects('createSession')\n .once()\n .withArgs(W3C_CAPS, W3C_CAPS, W3C_CAPS)\n .returns([SESSION_ID, BASE_CAPS]);\n await appium.createSession(W3C_CAPS, W3C_CAPS, W3C_CAPS);\n mockFakeDriver.verify();\n });\n it('should call \"createSession\" with W3C capabilities argument with additional provided parameters', async function () {\n /** @type {import('@appium/types').W3CCapabilities} */\n let w3cCaps = {\n ...W3C_CAPS,\n alwaysMatch: {\n ...W3C_CAPS.alwaysMatch,\n 'appium:someOtherParm': 'someOtherParm',\n },\n };\n const expectedCaps = {\n alwaysMatch: {\n ...w3cCaps.alwaysMatch,\n 'appium:someOtherParm': 'someOtherParm',\n },\n firstMatch: [{}],\n };\n mockFakeDriver\n .expects('createSession')\n .once()\n .withArgs(expectedCaps, expectedCaps, expectedCaps)\n .returns([SESSION_ID, insertAppiumPrefixes(BASE_CAPS)]);\n\n await appium.createSession(w3cCaps, w3cCaps, w3cCaps);\n mockFakeDriver.verify();\n });\n\n it('should assign args to property `cliArgs`', async function () {\n class ArgsDriver extends BaseDriver {}\n const args = {driver: {fake: {randomArg: 1234}}};\n [appium, mockFakeDriver] = getDriverAndFakeDriver(args, ArgsDriver);\n const {value} = await appium.createSession(W3C_CAPS, W3C_CAPS, W3C_CAPS);\n try {\n fakeDriver.cliArgs.should.eql({randomArg: 1234});\n } finally {\n await appium.deleteSession(value[0]);\n }\n });\n });\n describe('deleteSession', function () {\n let appium;\n let mockFakeDriver;\n beforeEach(function () {\n [appium, mockFakeDriver] = getDriverAndFakeDriver(SESSION_DISCOVERY_ENABLED);\n });\n afterEach(function () {\n mockFakeDriver.restore();\n });\n it('should remove the session if it is found', async function () {\n appium.configureGlobalFeatures();\n let [sessionId] = (await appium.createSession(null, null, W3C_CAPS)).value;\n let sessions = await appium.getAppiumSessions();\n sessions.should.have.length(1);\n await appium.deleteSession(sessionId);\n sessions = await appium.getAppiumSessions();\n sessions.should.have.length(0);\n });\n it(\"should call inner driver's deleteSession method\", async function () {\n const [sessionId] = (await appium.createSession(null, null, W3C_CAPS)).value;\n mockFakeDriver.expects('deleteSession').once().withExactArgs(sessionId, []).returns();\n await appium.deleteSession(sessionId);\n mockFakeDriver.verify();\n\n // cleanup, since we faked the delete session call\n await mockFakeDriver.object.deleteSession();\n });\n });\n describe('configureDriverFeatures', function () {\n /** @type {AppiumDriver} */\n let appium;\n\n /**\n *\n * @param {import('@appium/types').DriverOpts} appiumArgs\n * @returns {Promise}\n */\n async function getDriverInstance(appiumArgs) {\n appium = new AppiumDriver(appiumArgs);\n appium.configureGlobalFeatures();\n const fakeDriver = new FakeDriver();\n const mockFakeDriver = sandbox.mock(fakeDriver);\n const mockedDriverReturnerClass = function Driver() {\n return fakeDriver;\n };\n\n appium.driverConfig = {\n findMatchingDriver: sandbox.stub().returns({\n driver: mockedDriverReturnerClass,\n version: '1.2.3',\n driverName: 'fake',\n }),\n };\n\n mockFakeDriver\n .expects('createSession')\n .once()\n .withExactArgs(undefined, null, W3C_CAPS, [])\n .returns([SESSION_ID, removeAppiumPrefixes(W3C_PREFIXED_CAPS)]);\n await appium.createSession(undefined, null, W3C_CAPS);\n\n return fakeDriver;\n }\n afterEach(async function () {\n await appium.deleteSession(SESSION_ID);\n });\n it(`should not apply any insecure features by default`, async function () {\n fakeDriver = await getDriverInstance({});\n fakeDriver.allowInsecure.should.be.empty;\n fakeDriver.denyInsecure.should.be.empty;\n fakeDriver.relaxedSecurityEnabled.should.be.false;\n });\n it(`should apply relaxed security`, async function () {\n fakeDriver = await getDriverInstance({relaxedSecurityEnabled: true});;\n fakeDriver.relaxedSecurityEnabled.should.be.true;\n });\n it(`should apply global-scope insecure features`, async function () {\n fakeDriver = await getDriverInstance({\n allowInsecure: ['*:foo'],\n denyInsecure: ['*:bar'],\n });\n fakeDriver.allowInsecure.should.eql(['*:foo']);\n fakeDriver.denyInsecure.should.eql(['*:bar']);\n });\n it(`should apply driver-scope insecure features only if the driver name matches`, async function () {\n fakeDriver = await getDriverInstance({allowInsecure: ['fake:foo', 'real:bar']});\n fakeDriver.allowInsecure.should.eql(['fake:foo']);\n });\n });\n describe('getAppiumSessions', function () {\n let appium, mockFakeDriver;\n let sessions;\n before(function () {\n [appium, mockFakeDriver] = getDriverAndFakeDriver(SESSION_DISCOVERY_ENABLED);\n appium.configureGlobalFeatures();\n });\n afterEach(async function () {\n for (let session of sessions) {\n await appium.deleteSession(session.id);\n }\n mockFakeDriver.restore();\n });\n it('should return an empty array of sessions', async function () {\n sessions = await appium.getAppiumSessions();\n sessions.should.be.an('array');\n sessions.should.be.empty;\n });\n it('should return sessions created', async function () {\n let caps1 = {\n alwaysMatch: {...W3C_PREFIXED_CAPS, 'appium:cap': 'value'},\n };\n let caps2 = {\n alwaysMatch: {...W3C_PREFIXED_CAPS, 'appium:cap': 'other value'},\n };\n mockFakeDriver\n .expects('createSession')\n .once()\n .returns(['fake-session-id-1', removeAppiumPrefixes(caps1.alwaysMatch)]);\n let [session1Id, session1Caps] = (await appium.createSession(null, null, caps1)).value;\n mockFakeDriver\n .expects('createSession')\n .once()\n .returns(['fake-session-id-2', removeAppiumPrefixes(caps2.alwaysMatch)]);\n let [session2Id, session2Caps] = (await appium.createSession(null, null, caps2)).value;\n\n sessions = await appium.getAppiumSessions();\n sessions.should.be.an('array');\n sessions.should.have.length(2);\n sessions[0].id.should.equal(session1Id);\n sessions[0].should.have.property('created');\n removeAppiumPrefixes(caps1.alwaysMatch).should.eql(session1Caps);\n sessions[1].id.should.equal(session2Id);\n sessions[1].should.have.property('created');\n removeAppiumPrefixes(caps2.alwaysMatch).should.eql(session2Caps);\n });\n });\n describe('getStatus', function () {\n let appium;\n before(function () {\n appium = new AppiumDriver({});\n });\n it('should return a status', async function () {\n let status = await appium.getStatus();\n status.build.should.exist;\n status.build.version.should.exist;\n });\n });\n describe('sessionExists', function () {});\n describe('attachUnexpectedShutdownHandler', function () {\n /** @type {AppiumDriver} */\n let appium;\n let mockFakeDriver;\n beforeEach(function () {\n [appium, mockFakeDriver] = getDriverAndFakeDriver();\n });\n afterEach(async function () {\n await mockFakeDriver.object.deleteSession();\n mockFakeDriver.restore();\n appium.args.defaultCapabilities = {};\n });\n\n it('should remove session if inner driver unexpectedly exits with an error', async function () {\n let [sessionId] = (await appium.createSession(null, null, _.clone(W3C_CAPS))).value;\n _.keys(appium.sessions).should.contain(sessionId);\n appium.sessions[sessionId].eventEmitter.emit('onUnexpectedShutdown', new Error('Oops'));\n // let event loop spin so rejection is handled\n await sleep(1);\n _.keys(appium.sessions).should.not.contain(sessionId);\n });\n it('should remove session if inner driver unexpectedly exits with no error', async function () {\n let [sessionId] = (await appium.createSession(null, null, _.clone(W3C_CAPS))).value;\n _.keys(appium.sessions).should.contain(sessionId);\n appium.sessions[sessionId].eventEmitter.emit('onUnexpectedShutdown');\n // let event loop spin so rejection is handled\n await sleep(1);\n _.keys(appium.sessions).should.not.contain(sessionId);\n });\n });\n describe('createPluginInstances', function () {\n class NoArgsPlugin extends BasePlugin {}\n NoArgsPlugin.baseVersion = '1.0';\n\n class ArgsPlugin extends BasePlugin {}\n ArgsPlugin.baseVersion = '1.0';\n\n class ArrayArgPlugin extends BasePlugin {}\n ArrayArgPlugin.baseVersion = '1.0';\n\n beforeEach(function () {\n resetSchema();\n // to establish defaults, we need to register a schema for the plugin.\n // note that the `noargs` plugin does not need a schema, because it\n // accepts no arguments.\n registerSchema(PLUGIN_TYPE, 'args', {\n type: 'object',\n properties: {\n randomArg: {\n type: 'number',\n default: 2000,\n },\n },\n });\n registerSchema(PLUGIN_TYPE, 'arrayarg', {\n type: 'object',\n properties: {\n arr: {\n type: 'array',\n default: [],\n },\n },\n });\n finalizeSchema();\n });\n\n describe('when args are not present', function () {\n it('the `cliArgs` prop should be an empty object', function () {\n const appium = new AppiumDriver({});\n appium.pluginClasses = new Map([\n [NoArgsPlugin, 'noargs'],\n [ArgsPlugin, 'args'],\n ]);\n for (const plugin of appium.createPluginInstances()) {\n expect(plugin.cliArgs).to.eql({});\n }\n });\n });\n\n describe('when args are equal to the schema defaults', function () {\n it('the `cliArgs` prop should contain the schema defaults', function () {\n const appium = new AppiumDriver({\n plugin: {args: {randomArg: 2000}},\n });\n appium.pluginClasses = new Map([\n [NoArgsPlugin, 'noargs'],\n [ArgsPlugin, 'args'],\n ]);\n const [noargs, args] = appium.createPluginInstances();\n expect(noargs.cliArgs).to.eql({});\n expect(args.cliArgs).to.eql({randomArg: 2000});\n });\n\n describe('when the default is an \"object\"', function () {\n it('the `cliArgs` prop should contain the schema defaults', function () {\n const appium = new AppiumDriver({\n plugin: {arrayarg: {arr: []}},\n });\n appium.pluginClasses = new Map([\n [NoArgsPlugin, 'noargs'],\n [ArgsPlugin, 'args'],\n [ArrayArgPlugin, 'arrayarg'],\n ]);\n const [noargs, args, arrayarg] = appium.createPluginInstances();\n expect(noargs.cliArgs).to.eql({});\n expect(args.cliArgs).to.eql({});\n expect(arrayarg.cliArgs).to.eql({arr: []});\n });\n });\n });\n\n describe('when args are not equal to the schema defaults', function () {\n it('should add cliArgs to the plugin', function () {\n const appium = new AppiumDriver({plugin: {args: {randomArg: 1234}}});\n appium.pluginClasses = new Map([[ArgsPlugin, 'args']]);\n const plugin = _.first(appium.createPluginInstances());\n plugin.cliArgs.should.eql({randomArg: 1234});\n });\n });\n });\n });\n});\n\n/**\n * @typedef {import('appium/lib/config')} ConfigModule\n * @typedef {import('appium/lib/appium').AppiumDriver} AppiumDriver\n */\n\n/**\n * Mocks some stuff in `lib/config`\n * @typedef MockConfig\n * @property {import('sinon').SinonStubbedMember} getBuildInfo\n * @property {import('sinon').SinonStubbedMember} updateBuildInfo\n * @property {string} APPIUM_VER\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/config-file.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport fs from 'node:fs';\nimport {createSandbox} from 'sinon';\nimport * as YAML from 'yaml';\nimport * as schema from '../../lib/schema/schema';\nimport {resolveFixture, rewiremock} from '../helpers';\n\ndescribe('config-file', function () {\n const GOOD_YAML_CONFIG_FILEPATH = resolveFixture('config', 'appium-config-good.yaml');\n const GOOD_JSON_CONFIG_FILEPATH = resolveFixture('config', 'appium-config-good.json');\n const GOOD_JS_CONFIG_FILEPATH = resolveFixture('config', 'appium-config-good.js');\n const GOOD_YAML_CONFIG = YAML.parse(fs.readFileSync(GOOD_YAML_CONFIG_FILEPATH, 'utf8'));\n const GOOD_JSON_CONFIG = require(GOOD_JSON_CONFIG_FILEPATH);\n const BAD_JSON_CONFIG_FILEPATH = resolveFixture('config', 'appium-config-bad.json');\n const BAD_JSON_CONFIG = require(BAD_JSON_CONFIG_FILEPATH);\n\n /**\n * @type {sinon.SinonSandbox}\n */\n let sandbox;\n\n /**\n * `readConfigFile()` from an isolated `config-file` module\n * @type {import('appium/lib/config-file').readConfigFile}\n */\n let readConfigFile;\n\n /**\n * @type {import('appium/lib/config-file').formatErrors}\n */\n let formatErrors;\n\n /**\n * @type {import('appium/lib/config-file').normalizeConfig}\n */\n let normalizeConfig;\n\n /**\n * Mock instance of `lilconfig` containing stubs for\n * `lilconfig#search()` and `lilconfig#load`.\n * Not _actually_ a `SinonStubbedInstance`, but duck-typed.\n * @type {sinon.SinonStubbedInstance>}\n */\n let lc;\n\n let mocks;\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n\n // generally called via the CLI parser, this needs to be done manually in tests.\n // we don't need to do this before _each_ test, because we're not changing the schema.\n // if we did change the schema, this would need to be in `beforeEach()` and `afterEach()`\n // would need to call `schema.reset()`.\n schema.finalizeSchema();\n });\n\n beforeEach(function () {\n sandbox = createSandbox();\n\n // we have to manually type this (and `search()`) because we'd only get the real type\n // when stubbing an object prop; e.g., `stub(lilconfig, 'load')`\n const load = /** @type {AsyncSearcherLoadStub} */ (\n sandbox.stub().resolves({\n config: GOOD_JSON_CONFIG,\n filepath: GOOD_JSON_CONFIG_FILEPATH,\n })\n );\n load.withArgs(GOOD_YAML_CONFIG_FILEPATH).resolves({\n config: GOOD_YAML_CONFIG,\n filepath: GOOD_YAML_CONFIG_FILEPATH,\n });\n load.withArgs(BAD_JSON_CONFIG_FILEPATH).resolves({\n config: BAD_JSON_CONFIG,\n filepath: BAD_JSON_CONFIG_FILEPATH,\n });\n\n const search = /** @type {AsyncSearcherLoadStub} */ (\n sandbox.stub().resolves({\n config: GOOD_JSON_CONFIG,\n filepath: GOOD_JSON_CONFIG_FILEPATH,\n })\n );\n\n lc = {\n load,\n search,\n };\n\n mocks = {\n lilconfig: {\n lilconfig: sandbox.stub().returns(lc),\n },\n '@sidvind/better-ajv-errors': sandbox.stub().returns(''),\n };\n\n // loads the `config-file` module using the lilconfig mock.\n // we only mock lilconfig because it'd otherwise be a pain in the rear to test\n // searching for config files, and it increases the likelihood that we'd load the wrong file.\n ({readConfigFile, formatErrors, normalizeConfig} = rewiremock.proxy(\n () => require('../../lib/config-file'),\n mocks\n ));\n\n // just want to be extra-sure `validate()` happens\n sandbox.spy(schema, 'validate');\n });\n\n afterEach(function () {\n sandbox.restore();\n });\n\n describe('readConfigFile()', function () {\n /**\n * @type {import('appium/lib/config-file').ReadConfigFileResult}\n */\n let result;\n\n it('should support yaml', async function () {\n const {config} = await readConfigFile(GOOD_YAML_CONFIG_FILEPATH);\n expect(config).to.eql(normalizeConfig(GOOD_JSON_CONFIG));\n // @ts-ignore\n schema.validate.calledOnce.should.be.true;\n });\n\n it('should support json', async function () {\n const {config} = await readConfigFile(GOOD_JSON_CONFIG_FILEPATH);\n expect(config).to.eql(normalizeConfig(GOOD_JSON_CONFIG));\n // @ts-ignore\n schema.validate.calledOnce.should.be.true;\n });\n\n it('should support js', async function () {\n const {config} = await readConfigFile(GOOD_JS_CONFIG_FILEPATH);\n expect(config).to.eql(normalizeConfig(GOOD_JSON_CONFIG));\n // @ts-ignore\n schema.validate.calledOnce.should.be.true;\n });\n\n describe('when no filepath provided', function () {\n beforeEach(async function () {\n result = await readConfigFile();\n });\n\n it('should search for a config file', function () {\n lc.search.calledOnce.should.be.true;\n // @ts-ignore\n schema.validate.calledOnce.should.be.true;\n });\n\n it('should not try to load a config file directly', function () {\n lc.load.called.should.be.false;\n });\n\n describe('when no config file is found', function () {\n beforeEach(async function () {\n lc.search.resolves();\n /** @type {sinon.SinonSpiedMember} */ (\n schema.validate\n ).resetHistory();\n result = await readConfigFile();\n });\n\n it('should resolve with an empty object', function () {\n expect(result).to.be.an('object').that.is.empty;\n // @ts-ignore\n schema.validate.calledOnce.should.be.false;\n });\n });\n\n describe('when a config file is found', function () {\n describe('when the config file is empty', function () {\n beforeEach(async function () {\n lc.search.resolves({\n isEmpty: true,\n filepath: '/path/to/file.json',\n config: {},\n });\n\n result = await readConfigFile();\n });\n\n it('should resolve with an object with an `isEmpty` property', function () {\n expect(result).to.have.property('isEmpty', true);\n });\n });\n\n describe('when the config file is not empty', function () {\n it('should validate the config against a schema', function () {\n // @ts-ignore\n schema.validate.calledOnceWith(GOOD_JSON_CONFIG).should.be.true;\n });\n\n describe('when the config file is valid', function () {\n beforeEach(async function () {\n result = await readConfigFile();\n });\n\n it('should resolve with an object having `config` property and empty array of errors', function () {\n expect(result).to.deep.equal({\n config: normalizeConfig(GOOD_JSON_CONFIG),\n errors: [],\n filepath: GOOD_JSON_CONFIG_FILEPATH,\n });\n });\n });\n\n describe('when the config file is invalid', function () {\n beforeEach(async function () {\n lc.search.resolves({\n config: {foo: 'bar'},\n filepath: '/path/to/file.json',\n });\n result = await readConfigFile();\n });\n\n it('should resolve with an object having a nonempty array of errors', function () {\n expect(result).to.have.property('errors').that.is.not.empty;\n });\n });\n });\n });\n });\n\n describe('when filepath provided', function () {\n beforeEach(async function () {\n result = await readConfigFile('appium.json');\n });\n\n it('should not attempt to find a config file', function () {\n lc.search.called.should.be.false;\n });\n\n it('should try to load a config file directly', function () {\n lc.load.calledOnce.should.be.true;\n });\n\n describe('when no config file exists at path', function () {\n beforeEach(function () {\n lc.load.rejects(Object.assign(new Error(), {code: 'ENOENT'}));\n });\n\n it('should reject with user-friendly message', async function () {\n await expect(readConfigFile('appium.json')).to.be.rejectedWith(\n /not found at user-provided path/\n );\n });\n });\n\n describe('when the config file is invalid JSON', function () {\n beforeEach(function () {\n lc.load.rejects(new SyntaxError());\n });\n\n it('should reject with user-friendly message', async function () {\n await expect(readConfigFile('appium.json')).to.be.rejectedWith(\n /Config file at user-provided path appium.json is invalid/\n );\n });\n });\n\n describe('when something else is wrong with loading the config file', function () {\n beforeEach(function () {\n lc.load.rejects(new Error('guru meditation'));\n });\n\n it('should pass error through', async function () {\n await expect(readConfigFile('appium.json')).to.be.rejectedWith(/guru meditation/);\n });\n });\n\n describe('when a config file is found', function () {\n describe('when the config file is empty', function () {\n beforeEach(async function () {\n lc.search.resolves({\n isEmpty: true,\n filepath: '/path/to/file.json',\n config: {},\n });\n result = await readConfigFile();\n });\n\n it('should resolve with an object with an `isEmpty` property', function () {\n expect(result).to.have.property('isEmpty', true);\n });\n });\n\n describe('when the config file is not empty', function () {\n it('should validate the config against a schema', function () {\n // @ts-ignore\n schema.validate.calledOnceWith(GOOD_JSON_CONFIG).should.be.true;\n });\n\n describe('when the config file is valid', function () {\n beforeEach(async function () {\n result = await readConfigFile();\n });\n\n it('should resolve with an object having `config` property and empty array of errors', function () {\n expect(result).to.deep.equal({\n errors: [],\n config: normalizeConfig(GOOD_JSON_CONFIG),\n filepath: GOOD_JSON_CONFIG_FILEPATH,\n });\n });\n });\n\n describe('when the config file is invalid', function () {\n beforeEach(async function () {\n result = await readConfigFile(BAD_JSON_CONFIG_FILEPATH);\n });\n\n it('should resolve with an object having a nonempty array of errors', function () {\n expect(result).to.have.property('errors').that.is.not.empty;\n });\n });\n });\n });\n });\n });\n\n describe('formatErrors()', function () {\n describe('when provided `errors` as an empty array', function () {\n it('should throw', function () {\n expect(() => formatErrors([])).to.throw(TypeError, 'Array of errors must be non-empty');\n });\n });\n\n describe('when provided `errors` as `undefined`', function () {\n it('should throw', function () {\n expect(() => formatErrors()).to.throw(TypeError, 'Array of errors must be non-empty');\n });\n });\n\n describe('when provided `errors` as a non-empty array', function () {\n it('should return a string', function () {\n // @ts-expect-error\n expect(formatErrors([{}])).to.be.a('string');\n });\n });\n\n describe('when `opts.json` is a string', function () {\n it('should call `betterAjvErrors()` with option `json: opts.json`', function () {\n // @ts-expect-error\n formatErrors([{}], {}, {json: '{\"foo\": \"bar\"}'});\n mocks['@sidvind/better-ajv-errors'].calledWith(\n schema.getSchema(),\n {},\n [{}],\n {format: 'cli', json: '{\"foo\": \"bar\"}'}\n ).should.be.true;\n });\n });\n });\n});\n\n// the following are just aliases\n\n/**\n * @typedef {import('ajv').ErrorObject} ErrorObject\n */\n\n/**\n * @typedef {import('ajv').ValidateFunction} ValidateFunction\n */\n\n/**\n * @typedef {sinon.SinonStubbedMember['load']>} AsyncSearcherLoadStub\n */\n\n/**\n * @typedef {sinon.SinonStubbedMember['search']>} AsyncSearcherSearchStub\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/config.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport _ from 'lodash';\nimport {createSandbox} from 'sinon';\nimport {getParser} from '../../lib/cli/parser';\nimport {\n checkNodeOk,\n getBuildInfo,\n getNonDefaultServerArgs,\n showBuildInfo,\n showConfig,\n requireDir,\n} from '../../lib/config';\nimport {PLUGIN_TYPE} from '../../lib/constants';\nimport {\n finalizeSchema,\n getDefaultsForSchema,\n registerSchema,\n resetSchema,\n} from '../../lib/schema/schema';\n\ndescribe('Config', function () {\n /** @type {sinon.SinonSandbox} */\n let sandbox;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n });\n\n beforeEach(function () {\n sandbox = createSandbox();\n });\n\n afterEach(function () {\n sandbox.restore();\n });\n\n describe('Appium config', function () {\n /** @type {sinon.SinonSpy<[message?: any, ...extra: any[]],void>} */\n let log;\n /** @type {sinon.SinonSpy<[message?: any, ...extra: any[]],void>} */\n let dir;\n beforeEach(function () {\n log = sandbox.spy(console, 'log');\n dir = sandbox.spy(console, 'dir');\n });\n\n describe('showBuildInfo()', function () {\n it('should log build info to console', async function () {\n const config = getBuildInfo();\n await showBuildInfo();\n log.calledOnce.should.be.true;\n log.firstCall.args.should.contain(JSON.stringify(config));\n });\n });\n\n describe('showConfig()', function () {\n describe('when a config file is present', function () {\n it('should dump the current Appium config', function () {\n showConfig(\n {address: 'bar'},\n {\n config: {\n // @ts-expect-error\n server: {'callback-address': 'quux'},\n },\n },\n {port: 1234},\n {allowCors: false}\n );\n log.calledWith('Appium Configuration\\n').should.be.true;\n });\n\n it('should skip empty objects', function () {\n showConfig(\n // @ts-expect-error\n {foo: 'bar', cows: {}, pigs: [], sheep: 0, ducks: false},\n {config: {server: {address: 'quux'}}},\n {spam: 'food'},\n {}\n );\n dir.calledWith({foo: 'bar', sheep: 0, ducks: false}).should.be.true;\n });\n });\n\n describe('when a config file is not present', function () {\n it('should dump the current Appium config (sans config file contents)', function () {\n showConfig(\n // @ts-expect-error\n {foo: 'bar', cows: {}, pigs: [], sheep: 0, ducks: false},\n {},\n {spam: 'food'},\n {}\n );\n log.calledWith('\\n(no configuration file loaded)').should.be.true;\n });\n });\n\n describe('when no CLI arguments (other than --show-config) provided', function () {\n it('should not dump CLI args', function () {\n // @ts-expect-error\n showConfig({}, {}, {}, {});\n log.calledWith('\\n(no CLI parameters provided)').should.be.true;\n });\n });\n });\n });\n\n describe('node.js config', function () {\n let _process = process;\n before(function () {\n // need to be able to write to process.version\n // but also to have access to process methods\n // so copy them over to a writable object\n process = {...process}; // eslint-disable-line no-global-assign\n });\n after(function () {\n process = _process; // eslint-disable-line no-global-assign\n });\n describe('checkNodeOk', function () {\n describe('unsupported nodes', function () {\n const unsupportedVersions = [\n 'v0.1',\n 'v0.9.12',\n 'v0.10.36',\n 'v0.12.14',\n 'v4.4.7',\n 'v5.7.0',\n 'v6.3.1',\n 'v7.1.1',\n 'v8.0.0',\n 'v9.2.3',\n 'v10.1.0',\n 'v11.0.0',\n 'v12.0.0',\n 'v14.0.0',\n 'v14.17.0',\n 'v14.17.5',\n 'v16.0.0',\n 'v20.18.0',\n 'v22.10.0',\n ];\n for (const version of unsupportedVersions) {\n it(`should fail if node is ${version}`, function () {\n // @ts-expect-error\n process.version = version;\n checkNodeOk.should.throw();\n });\n }\n });\n\n describe('supported nodes', function () {\n it('should succeed if node is ^20.19.0', function () {\n // @ts-expect-error\n process.version = 'v20.19.0';\n checkNodeOk.should.not.throw();\n // @ts-expect-error\n process.version = 'v20.100.0';\n checkNodeOk.should.not.throw();\n });\n it('should succeed if node is 22.12+', function () {\n // @ts-expect-error\n process.version = 'v22.12.0';\n checkNodeOk.should.not.throw();\n // @ts-expect-error\n process.version = 'v100.0.0';\n checkNodeOk.should.not.throw();\n });\n });\n });\n });\n\n describe('server arguments', function () {\n let args;\n\n describe('getNonDefaultServerArgs', function () {\n describe('without extension schemas', function () {\n beforeEach(function () {\n resetSchema();\n getParser(true);\n // get all the defaults\n args = getDefaultsForSchema();\n });\n it('should show none if we have all the defaults', function () {\n let nonDefaultArgs = getNonDefaultServerArgs(args);\n nonDefaultArgs.should.be.empty;\n });\n it('should catch a non-default argument', function () {\n args.allowCors = true;\n let nonDefaultArgs = getNonDefaultServerArgs(args);\n nonDefaultArgs.should.eql({allowCors: true});\n });\n describe('when arg is an array', function () {\n it('should return the arg as an array', function () {\n args.usePlugins = ['all'];\n getNonDefaultServerArgs(args).should.eql({usePlugins: ['all']});\n });\n });\n });\n describe('with extension schemas', function () {\n beforeEach(function () {\n resetSchema();\n registerSchema(PLUGIN_TYPE, 'crypto-fiend', {\n type: 'object',\n properties: {elite: {type: 'boolean', default: true}},\n });\n finalizeSchema();\n getParser(true);\n args = getDefaultsForSchema();\n });\n\n it('should take extension schemas into account', function () {\n const nonDefaultArgs = getNonDefaultServerArgs(args);\n nonDefaultArgs.should.be.empty;\n });\n\n it('should catch a non-default argument', function () {\n args['plugin.crypto-fiend.elite'] = false;\n const nonDefaultArgs = getNonDefaultServerArgs(args);\n nonDefaultArgs.should.eql(_.set({}, 'plugin.crypto-fiend.elite', false));\n });\n });\n });\n });\n\n describe('requireDir', function () {\n it('should fail to use a dir with incorrect permissions', function () {\n requireDir('/private/if_you_run_with_sudo_this_wont_fail').should.be.rejectedWith(\n /must exist/\n );\n });\n it('should fail to use an undefined dir', function () {\n // @ts-expect-error\n requireDir().should.be.rejectedWith(/must exist/);\n });\n it('should fail to use an non-writeable dir', function () {\n requireDir('/private').should.be.rejectedWith(/must be writeable/);\n });\n it('should be able to use a dir with correct permissions', function () {\n requireDir('/tmp/test_tmp_dir/with/any/number/of/levels').should.not.be.rejected;\n });\n });\n\n describe('parsing args with empty argv[1]', function () {\n let argv1;\n\n before(function () {\n argv1 = process.argv[1];\n });\n\n beforeEach(function () {\n resetSchema();\n });\n\n after(function () {\n process.argv[1] = argv1;\n });\n\n it('should not fail if process.argv[1] is undefined', function () {\n process.argv[1] = '';\n let args = getParser();\n args.prog.should.be.equal('appium');\n });\n\n it('should set \"prog\" to process.argv[1]', function () {\n process.argv[1] = 'Hello World';\n let args = getParser();\n args.prog.should.be.equal('Hello World');\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/grid-register.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport {createSandbox} from 'sinon';\nimport {rewiremock} from '../helpers';\n\ndescribe('grid-register', function () {\n let sandbox;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n });\n\n beforeEach(function () {\n sandbox = createSandbox();\n });\n\n afterEach(function () {\n sandbox.restore();\n });\n\n describe('registerNode()', function () {\n /** @type {import('appium/lib/grid-register').default} */\n let registerNode;\n let mocks;\n\n beforeEach(function () {\n mocks = {\n '@appium/support': {\n fs: {\n readFile: sandbox.stub().resolves('{}'),\n },\n logger: {\n getLogger: sandbox.stub().returns(console),\n },\n },\n axios: sandbox.stub().resolves({data: '', status: 200}),\n };\n\n ({default: registerNode} = rewiremock.proxy(() => require('../../lib/grid-register'), mocks));\n });\n\n describe('when provided a path to a config file', function () {\n it('should read the config file', async function () {\n await registerNode('/path/to/config-file.json');\n mocks['@appium/support'].fs.readFile.calledOnceWith(\n '/path/to/config-file.json',\n 'utf-8'\n ).should.be.true;\n });\n\n it('should parse the config file as JSON', async function () {\n const parseSpy = sandbox.spy(JSON, 'parse');\n await registerNode('/path/to/config-file.json');\n parseSpy.calledOnceWith(\n await mocks['@appium/support'].fs.readFile.firstCall.returnValue\n ).should.be.true;\n });\n\n describe('when the config file is invalid', function () {\n beforeEach(function () {\n mocks['@appium/support'].fs.readFile.resolves('');\n });\n it('should reject', async function () {\n await registerNode('/path/to/config-file.json').should.be.rejected;\n });\n });\n });\n\n describe('when provided a config object', function () {\n it('should not attempt to read the object as a config file', async function () {\n await registerNode({my: 'config'});\n mocks['@appium/support'].fs.readFile.called.should.be.false;\n });\n\n it('should not attempt to parse any JSON', async function () {\n const parseSpy = sandbox.spy(JSON, 'parse');\n await registerNode({my: 'config'});\n parseSpy.called.should.be.false;\n });\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/logger.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {init as logsinkInit, clear as logsinkClear} from '../../lib/logsink';\nimport {createSandbox} from 'sinon';\nimport {logger} from '@appium/support';\n\n// temporarily turn on logging to stdio, so we can catch and query\nconst forceLogs = process.env._FORCE_LOGS;\nprocess.env._FORCE_LOGS = 1;\nconst log = logger.getLogger('Appium');\n\ndescribe('logging', function () {\n let sandbox;\n let stderrSpy;\n let stdoutSpy;\n beforeEach(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n\n sandbox = createSandbox();\n stderrSpy = sandbox.spy(process.stderr, 'write');\n stdoutSpy = sandbox.spy(process.stdout, 'write');\n logsinkClear();\n });\n afterEach(function () {\n sandbox.restore();\n });\n after(function () {\n process.env._FORCE_LOGS = forceLogs;\n });\n\n const errorMsg = 'some error';\n const warnMsg = 'some warning';\n const debugMsg = 'some debug';\n\n function doLogging() {\n log.error(errorMsg);\n log.warn(warnMsg);\n log.debug(debugMsg);\n }\n\n it('should send error, info and debug when loglevel is debug', async function () {\n await logsinkInit({loglevel: 'debug'});\n\n doLogging();\n\n stderrSpy.callCount.should.equal(1);\n stderrSpy.args[0][0].should.include(errorMsg);\n\n stdoutSpy.callCount.should.equal(2);\n stdoutSpy.args[0][0].should.include(warnMsg);\n stdoutSpy.args[1][0].should.include(debugMsg);\n });\n it('should send error and info when loglevel is info', async function () {\n await logsinkInit({loglevel: 'info'});\n\n doLogging();\n\n stderrSpy.callCount.should.equal(1);\n stderrSpy.args[0][0].should.include(errorMsg);\n\n stdoutSpy.callCount.should.equal(1);\n stdoutSpy.args[0][0].should.include(warnMsg);\n });\n it('should send error when loglevel is error', async function () {\n await logsinkInit({loglevel: 'error'});\n\n doLogging();\n\n stderrSpy.callCount.should.equal(1);\n stderrSpy.args[0][0].should.include(errorMsg);\n\n stdoutSpy.callCount.should.equal(0);\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/parser.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\nimport {DRIVER_TYPE, PLUGIN_TYPE, SETUP_SUBCOMMAND} from '../../lib/constants';\nimport {getParser} from '../../lib/cli/parser';\nimport {INSTALL_TYPES} from '../../lib/extension/extension-config';\nimport * as schema from '../../lib/schema/schema';\nimport {readConfigFile} from '../../lib/config-file';\nimport {resolveFixture} from '../helpers';\n\n// these paths should not make assumptions about the current working directory\nconst ALLOW_FIXTURE = resolveFixture('allow-feat.txt');\nconst DENY_FIXTURE = resolveFixture('deny-feat.txt');\nconst CAPS_FIXTURE = resolveFixture('caps.json');\nconst LOG_FILTERS_FIXTURE = resolveFixture('log-filters.json');\n\ndescribe('parser', function () {\n let p;\n let should;\n\n beforeEach(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n should = chai.should();\n });\n\n describe('Main Parser', function () {\n beforeEach(function () {\n p = getParser(true);\n });\n\n it('should accept only server and driver subcommands', function () {\n p.parseArgs([]);\n p.parseArgs(['server']);\n p.parseArgs([DRIVER_TYPE, 'list']);\n (() => p.parseArgs(['foo'])).should.throw();\n (() => p.parseArgs(['foo --bar'])).should.throw();\n });\n });\n\n describe('Server Parser', function () {\n describe('Appium arguments', function () {\n beforeEach(function () {\n p = getParser(true);\n });\n\n it('should return an arg parser', function () {\n should.exist(p.parseArgs);\n p.parseArgs([]).should.have.property('port');\n });\n it('should default to the server subcommand', function () {\n p.parseArgs([]).subcommand.should.eql('server');\n p.parseArgs([]).should.eql(p.parseArgs(['server']));\n });\n it('should keep the raw server flags array', function () {\n should.exist(p.rawArgs);\n });\n it('should have help for every arg', function () {\n for (let arg of p.rawArgs) {\n arg[1].should.have.property('help');\n }\n });\n\n // TODO: figure out how best to suppress color in error message\n describe('invalid arguments', function () {\n it('should throw an error with unknown argument', function () {\n (() => {\n p.parseArgs(['--apple']);\n }).should.throw(/unrecognized arguments: --apple/i);\n });\n\n // FIXME: this test will not work until we restore the formatting restriction to the address validation\n // see #18716\n it.skip('should throw an error for an invalid value (\"hostname\")', function () {\n (() => {\n p.parseArgs(['--address', '-42']);\n }).should.throw(/must match format \"hostname\"/i);\n });\n\n it('should throw an error for an invalid value (\"uri\")', function () {\n (() => {\n p.parseArgs(['--webhook', 'blub']);\n }).should.throw(/must match format \"uri\"/i);\n });\n\n it('should throw an error for an invalid value (using \"enum\")', function () {\n (() => {\n p.parseArgs(['--log-level', '-42']);\n }).should.throw(/must be equal to one of the allowed values/i);\n });\n\n it('should throw an error for incorrectly formatted arg (matching \"dest\")', function () {\n (() => {\n p.parseArgs(['--loglevel', '-42']);\n }).should.throw(/unrecognized arguments: --loglevel/i);\n });\n });\n\n it('should parse default capabilities correctly from a string', function () {\n let defaultCapabilities = {a: 'b'};\n let args = p.parseArgs(['--default-capabilities', JSON.stringify(defaultCapabilities)]);\n args.defaultCapabilities.should.eql(defaultCapabilities);\n });\n\n it('should parse default capabilities correctly from a file', function () {\n let defaultCapabilities = {a: 'b'};\n let args = p.parseArgs(['--default-capabilities', CAPS_FIXTURE]);\n args.defaultCapabilities.should.eql(defaultCapabilities);\n });\n\n it('should throw an error with invalid arg to default capabilities', function () {\n (() => {\n p.parseArgs(['-dc', '42']);\n }).should.throw();\n (() => {\n p.parseArgs(['-dc', 'false']);\n }).should.throw();\n (() => {\n p.parseArgs(['-dc', 'null']);\n }).should.throw();\n (() => {\n p.parseArgs(['-dc', 'does/not/exist.json']);\n }).should.throw();\n });\n\n it('should parse --allow-insecure correctly', function () {\n p.parseArgs([]).should.not.have.property('allowInsecure');\n p.parseArgs(['--allow-insecure', '']).allowInsecure.should.eql([]);\n p.parseArgs(['--allow-insecure', '*:foo']).allowInsecure.should.eql(['*:foo']);\n p.parseArgs(['--allow-insecure', '*:foo,*:bar']).allowInsecure.should.eql(['*:foo', '*:bar']);\n p.parseArgs(['--allow-insecure', '*:foo ,*:bar']).allowInsecure.should.eql(['*:foo', '*:bar']);\n });\n\n it('should parse --address correctly', function () {\n p.parseArgs(['--address', 'localhost']).address.should.eql('localhost');\n p.parseArgs(['--address', 'appium.net']).address.should.eql('appium.net');\n p.parseArgs(['--address', '127.0.0.1']).address.should.eql('127.0.0.1');\n p.parseArgs(['--address', '10.0.0.1']).address.should.eql('10.0.0.1');\n p.parseArgs(['--address', '::']).address.should.eql('::');\n p.parseArgs(['--address', '::1']).address.should.eql('::1');\n p.parseArgs(['--address', '2a02:8888:9a80:158:2418:a474:43c6:1b78']).address.should.eql(\n '2a02:8888:9a80:158:2418:a474:43c6:1b78'\n );\n });\n\n it('should parse --deny-insecure correctly', function () {\n p.parseArgs([]).should.not.have.property('denyInsecure');\n p.parseArgs(['--deny-insecure', '']).denyInsecure.should.eql([]);\n p.parseArgs(['--deny-insecure', '*:foo']).denyInsecure.should.eql(['*:foo']);\n p.parseArgs(['--deny-insecure', '*:foo,*:bar']).denyInsecure.should.eql(['*:foo', '*:bar']);\n p.parseArgs(['--deny-insecure', '*:foo ,*:bar']).denyInsecure.should.eql(['*:foo', '*:bar']);\n });\n\n it('should parse --allow-insecure & --deny-insecure from files', function () {\n const parsed = p.parseArgs([\n '--allow-insecure',\n ALLOW_FIXTURE,\n '--deny-insecure',\n DENY_FIXTURE,\n ]);\n parsed.allowInsecure.should.eql(['*:feature1', '*:feature2', '*:feature3']);\n parsed.denyInsecure.should.eql(['*:nofeature1', '*:nofeature2', '*:nofeature3']);\n });\n\n it('should allow a string for --use-drivers', function () {\n p.parseArgs(['--use-drivers', 'fake']).useDrivers.should.eql(['fake']);\n });\n\n it('should allow multiple --use-drivers', function () {\n p.parseArgs(['--use-drivers', 'fake,phony']).useDrivers.should.eql(['fake', 'phony']);\n });\n\n it('should respect --relaxed-security', function () {\n p.parseArgs(['--relaxed-security']).should.have.property('relaxedSecurityEnabled', true);\n });\n\n it('should recognize --log-level', function () {\n p.parseArgs(['--log-level', 'debug']).should.have.property('loglevel', 'debug');\n });\n\n it('should parse a file for --log-filters', function () {\n p.parseArgs(['--log-filters', LOG_FILTERS_FIXTURE]).should.have.property('logFilters');\n });\n });\n\n describe('extension arguments', function () {\n beforeEach(function () {\n schema.resetSchema();\n // we have to require() here because babel will not compile stuff in node_modules\n // (even if it's in the monorepo; there may be a way around this)\n // anyway, if we do that, we need to use the `default` prop.\n schema.registerSchema(\n DRIVER_TYPE,\n 'fake',\n require('@appium/fake-driver/build/lib/fake-driver-schema').default\n );\n schema.finalizeSchema();\n p = getParser(true);\n });\n\n it('should parse driver args correctly from a string', async function () {\n // this test reads the actual schema provided by the fake driver.\n // the config file corresponds to that schema.\n // the command-line flags are derived also from the schema.\n // the result should be that the parsed args should match the config file.\n const {config} = await readConfigFile(\n resolveFixture('config', 'appium-config-driver-fake.json')\n );\n const fakeDriverArgs = {\n fake: {sillyWebServerPort: 1234, sillyWebServerHost: 'hey'},\n };\n const args = p.parseArgs([\n '--driver-fake-silly-web-server-port',\n fakeDriverArgs.fake.sillyWebServerPort,\n '--driver-fake-silly-web-server-host',\n fakeDriverArgs.fake.sillyWebServerHost,\n ]);\n\n args.driver.fake.should.eql(config.driver.fake);\n });\n\n it('should not yet apply defaults', function () {\n const args = p.parseArgs([]);\n args.should.not.have.property(DRIVER_TYPE);\n });\n\n it('should nicely handle extensions w/ dashes in them', function () {\n schema.resetSchema();\n schema.registerSchema(PLUGIN_TYPE, 'crypto-fiend', {\n type: 'object',\n properties: {elite: {type: 'boolean'}},\n });\n schema.finalizeSchema();\n p = getParser(true);\n const args = p.parseArgs(['--plugin-crypto-fiend-elite']);\n\n args.should.have.nested.property('plugin.crypto-fiend.elite', true);\n });\n\n describe('when user supplies invalid args', function () {\n it('should error out', function () {\n (() => p.parseArgs(['--driver-fake-silly-web-server-port', 'foo'])).should.throw(\n /must be integer/i\n );\n });\n });\n\n it('should not support --driver-args', function () {\n (() => p.parseArgs(['--driver-args', '/some/file.json'])).should.throw(\n /unrecognized arguments/i\n );\n });\n\n it('should not support --plugin-args', function () {\n (() => p.parseArgs(['--plugin-args', '/some/file.json'])).should.throw(\n /unrecognized arguments/i\n );\n });\n });\n });\n\n describe('Driver Parser', function () {\n let p;\n beforeEach(function () {\n p = getParser(true);\n });\n it('should not allow random sub-subcommands', function () {\n (() => p.parseArgs([DRIVER_TYPE, 'foo'])).should.throw();\n });\n describe('list', function () {\n it('should allow an empty argument list', function () {\n const args = p.parseArgs([DRIVER_TYPE, 'list']);\n args.subcommand.should.eql(DRIVER_TYPE);\n args.driverCommand.should.eql('list');\n args.showInstalled.should.eql(false);\n args.showUpdates.should.eql(false);\n args.json.should.eql(false);\n });\n it('should allow json format', function () {\n const args = p.parseArgs([DRIVER_TYPE, 'list', '--json']);\n args.json.should.eql(true);\n });\n it('should allow --installed', function () {\n const args = p.parseArgs([DRIVER_TYPE, 'list', '--installed']);\n args.showInstalled.should.eql(true);\n });\n it('should allow --updates', function () {\n const args = p.parseArgs([DRIVER_TYPE, 'list', '--updates']);\n args.showUpdates.should.eql(true);\n });\n it('should allow \"ls\" as an alias for \"list\"', function () {\n const args = p.parseArgs([DRIVER_TYPE, 'ls']);\n args.subcommand.should.eql(DRIVER_TYPE);\n args.driverCommand.should.eql('list');\n args.showInstalled.should.eql(false);\n args.showUpdates.should.eql(false);\n args.json.should.eql(false);\n });\n });\n describe('install', function () {\n it('should not allow an empty argument list', function () {\n (() => p.parseArgs([DRIVER_TYPE, 'install'])).should.throw();\n });\n it('should take a driver name to install', function () {\n const args = p.parseArgs([DRIVER_TYPE, 'install', 'foobar']);\n args.subcommand.should.eql(DRIVER_TYPE);\n args.driverCommand.should.eql('install');\n args.driver.should.eql('foobar');\n should.not.exist(args.installType);\n args.json.should.eql(false);\n });\n it('should allow json format', function () {\n const args = p.parseArgs([DRIVER_TYPE, 'install', 'foobar', '--json']);\n args.json.should.eql(true);\n });\n it('should allow --source', function () {\n for (const source of INSTALL_TYPES) {\n const args = p.parseArgs([DRIVER_TYPE, 'install', 'foobar', '--source', source]);\n args.installType.should.eql(source);\n }\n });\n it('should not allow unknown --source', function () {\n (() => p.parseArgs([DRIVER_TYPE, 'install', 'fobar', '--source', 'blah'])).should.throw();\n });\n });\n describe('uninstall', function () {\n it('should not allow an empty argument list', function () {\n (() => p.parseArgs([DRIVER_TYPE, 'uninstall'])).should.throw();\n });\n it('should take a driver name to uninstall', function () {\n const args = p.parseArgs([DRIVER_TYPE, 'uninstall', 'foobar']);\n args.subcommand.should.eql(DRIVER_TYPE);\n args.driverCommand.should.eql('uninstall');\n args.driver.should.eql('foobar');\n args.json.should.eql(false);\n });\n it('should allow json format', function () {\n const args = p.parseArgs([DRIVER_TYPE, 'uninstall', 'foobar', '--json']);\n args.json.should.eql(true);\n });\n });\n describe('update', function () {\n it('should not allow an empty argument list', function () {\n (() => p.parseArgs([DRIVER_TYPE, 'update'])).should.throw();\n });\n it('should take a driver name to update', function () {\n const args = p.parseArgs([DRIVER_TYPE, 'update', 'foobar']);\n args.subcommand.should.eql(DRIVER_TYPE);\n args.driverCommand.should.eql('update');\n args.driver.should.eql('foobar');\n args.json.should.eql(false);\n });\n it('should allow json format', function () {\n const args = p.parseArgs([DRIVER_TYPE, 'update', 'foobar', '--json']);\n args.json.should.eql(true);\n });\n });\n describe('run', function () {\n it('should not allow an empty driver argument list', function () {\n (() => p.parseArgs([DRIVER_TYPE, 'run'])).should.throw();\n });\n it('should allow no driver scriptName', function () {\n const args = p.parseArgs([DRIVER_TYPE, 'run', 'foo']);\n args.subcommand.should.eql(DRIVER_TYPE);\n args.driverCommand.should.eql('run');\n args.driver.should.eql('foo');\n _.isNull(args.scriptName).should.be.true;\n args.json.should.eql(false);\n });\n it('should take a driverName and scriptName to run', function () {\n const args = p.parseArgs([DRIVER_TYPE, 'run', 'foo', 'bar']);\n args.subcommand.should.eql(DRIVER_TYPE);\n args.driverCommand.should.eql('run');\n args.driver.should.eql('foo');\n args.scriptName.should.eql('bar');\n args.json.should.eql(false);\n });\n it('should allow json format for driver', function () {\n const args = p.parseArgs([DRIVER_TYPE, 'run', 'foo', 'bar', '--json']);\n args.json.should.eql(true);\n });\n it('should not allow an empty plugin argument list', function () {\n (() => p.parseArgs([PLUGIN_TYPE, 'run'])).should.throw();\n });\n it('should allow no plugin scriptName', function () {\n const args = p.parseArgs([PLUGIN_TYPE, 'run', 'foo']);\n args.subcommand.should.eql(PLUGIN_TYPE);\n args.pluginCommand.should.eql('run');\n args.plugin.should.eql('foo');\n _.isNull(args.scriptName).should.be.true;\n args.json.should.eql(false);\n });\n it('should take a pluginName and scriptName to run', function () {\n const args = p.parseArgs([PLUGIN_TYPE, 'run', 'foo', 'bar']);\n args.subcommand.should.eql(PLUGIN_TYPE);\n args.pluginCommand.should.eql('run');\n args.plugin.should.eql('foo');\n args.scriptName.should.eql('bar');\n args.json.should.eql(false);\n });\n it('should allow json format for plugin', function () {\n const args = p.parseArgs([PLUGIN_TYPE, 'run', 'foo', 'bar', '--json']);\n args.json.should.eql(true);\n });\n });\n });\n\n describe('Setup Parser', function () {\n let p;\n beforeEach(function () {\n p = getParser(true);\n });\n it('should not allow random sub-subcommands', function () {\n (() => p.parseArgs([SETUP_SUBCOMMAND, 'foo'])).should.throw();\n });\n\n describe('all', function () {\n it('should allow an empty argument mobile', function () {\n const args = p.parseArgs([SETUP_SUBCOMMAND, 'mobile']);\n args.subcommand.should.eql(SETUP_SUBCOMMAND);\n args.setupCommand.should.eql('mobile');\n });\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/utils.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {\n parseCapsForInnerDriver,\n insertAppiumPrefixes,\n pullSettings,\n removeAppiumPrefixes,\n inspect,\n adjustNodePath,\n fetchInterfaces,\n} from '../../lib/utils';\nimport {BASE_CAPS, W3C_CAPS} from '../helpers';\nimport _ from 'lodash';\nimport {stripColors} from '@colors/colors';\nimport {createSandbox} from 'sinon';\nimport logger from '../../lib/logger';\nimport {fs} from '@appium/support';\n\ndescribe('utils', function () {\n beforeEach(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n });\n\n describe('parseCapsForInnerDriver()', function () {\n it('should return an error if only JSONWP provided', function () {\n const {error} = parseCapsForInnerDriver(BASE_CAPS);\n error.message.should.match(/W3C/);\n });\n it('should return W3C caps unchanged if only W3C caps were provided', function () {\n const {desiredCaps, processedW3CCapabilities} =\n parseCapsForInnerDriver(W3C_CAPS);\n desiredCaps.should.deep.equal(BASE_CAPS);\n processedW3CCapabilities.should.deep.equal(W3C_CAPS);\n });\n it('should include default capabilities in results', function () {\n const defaultW3CCaps = {\n 'appium:foo': 'bar',\n 'appium:baz': 'bla',\n };\n const expectedDefaultCaps = {\n foo: 'bar',\n baz: 'bla',\n };\n const {desiredCaps, processedW3CCapabilities} =\n parseCapsForInnerDriver(W3C_CAPS, {}, defaultW3CCaps);\n desiredCaps.should.deep.equal({\n ...expectedDefaultCaps,\n ...BASE_CAPS,\n });\n processedW3CCapabilities.alwaysMatch.should.deep.equal({\n ...insertAppiumPrefixes(expectedDefaultCaps),\n ...insertAppiumPrefixes(BASE_CAPS),\n });\n });\n it('should allow valid default capabilities', function () {\n const res = parseCapsForInnerDriver(\n W3C_CAPS,\n {},\n {\n 'appium:foo': 'bar2',\n }\n );\n res.processedW3CCapabilities.alwaysMatch['appium:foo'].should.eql('bar2');\n });\n it('should not allow invalid default capabilities', function () {\n const res = parseCapsForInnerDriver(\n W3C_CAPS,\n {},\n {\n foo: 'bar',\n 'appium:foo2': 'bar2',\n }\n );\n res.error.jsonwpCode.should.eql(61);\n res.error.error.should.eql('invalid argument');\n res.error.w3cStatus.should.eql(400);\n });\n it('should reject if W3C caps are not passing constraints', function () {\n const err = parseCapsForInnerDriver(W3C_CAPS, {\n hello: {presence: true},\n }).error;\n err.message.should.match(/required/);\n _.isError(err).should.be.true;\n });\n it('should only accept W3C caps that have passing constraints', function () {\n let w3cCaps = {\n ...W3C_CAPS,\n firstMatch: [{foo: 'bar'}, {'appium:hello': 'world'}],\n };\n const error = parseCapsForInnerDriver(w3cCaps, {\n hello: {presence: true},\n }).error;\n error.jsonwpCode.should.eql(61);\n error.error.should.eql('invalid argument');\n error.w3cStatus.should.eql(400);\n });\n it('should add appium prefixes to W3C caps that are not standard in W3C', function () {\n parseCapsForInnerDriver({\n alwaysMatch: {\n platformName: 'Fake',\n propertyName: 'PROP_NAME',\n },\n }).error.error.should.includes('invalid argument');\n });\n });\n\n describe('removeAppiumPrefixes()', function () {\n it('should remove appium prefixes from cap names', function () {\n removeAppiumPrefixes({\n 'appium:cap1': 'value1',\n 'ms:cap2': 'value2',\n someCap: 'someCap',\n }).should.eql({\n cap1: 'value1',\n 'ms:cap2': 'value2',\n someCap: 'someCap',\n });\n });\n });\n\n describe('insertAppiumPrefixes()', function () {\n it('should apply prefixes to non-standard capabilities', function () {\n insertAppiumPrefixes({\n someCap: 'someCap',\n }).should.deep.equal({\n 'appium:someCap': 'someCap',\n });\n });\n it('should not apply prefixes to standard capabilities', function () {\n insertAppiumPrefixes({\n browserName: 'BrowserName',\n platformName: 'PlatformName',\n }).should.deep.equal({\n browserName: 'BrowserName',\n platformName: 'PlatformName',\n });\n });\n it('should not apply prefixes to capabilities that already have a prefix', function () {\n insertAppiumPrefixes({\n 'appium:someCap': 'someCap',\n 'moz:someOtherCap': 'someOtherCap',\n }).should.deep.equal({\n 'appium:someCap': 'someCap',\n 'moz:someOtherCap': 'someOtherCap',\n });\n });\n it('should apply prefixes to non-prefixed, non-standard capabilities; should not apply prefixes to any other capabilities', function () {\n insertAppiumPrefixes({\n 'appium:someCap': 'someCap',\n 'moz:someOtherCap': 'someOtherCap',\n browserName: 'BrowserName',\n platformName: 'PlatformName',\n someOtherCap: 'someOtherCap',\n yetAnotherCap: 'yetAnotherCap',\n }).should.deep.equal({\n 'appium:someCap': 'someCap',\n 'moz:someOtherCap': 'someOtherCap',\n browserName: 'BrowserName',\n platformName: 'PlatformName',\n 'appium:someOtherCap': 'someOtherCap',\n 'appium:yetAnotherCap': 'yetAnotherCap',\n });\n });\n });\n\n describe('pullSettings()', function () {\n it('should pull settings from caps', function () {\n const caps = {\n platformName: 'foo',\n browserName: 'bar',\n 'settings[settingName]': 'baz',\n 'settings[settingName2]': 'baz2',\n };\n const settings = pullSettings(caps);\n settings.should.eql({\n settingName: 'baz',\n settingName2: 'baz2',\n });\n caps.should.eql({\n platformName: 'foo',\n browserName: 'bar',\n });\n });\n it('should pull settings dict if object values are present in caps', function () {\n const caps = {\n platformName: 'foo',\n browserName: 'bar',\n 'settings[settingName]': {key: 'baz'},\n };\n const settings = pullSettings(caps);\n settings.should.eql({\n settingName: {key: 'baz'},\n });\n caps.should.eql({\n platformName: 'foo',\n browserName: 'bar',\n });\n });\n it('should pull empty dict if no settings are present in caps', function () {\n const caps = {\n platformName: 'foo',\n browserName: 'bar',\n 'setting[settingName]': 'baz',\n };\n const settings = pullSettings(caps);\n settings.should.eql({});\n caps.should.eql({\n platformName: 'foo',\n browserName: 'bar',\n 'setting[settingName]': 'baz',\n });\n });\n it('should pull empty dict if caps are empty', function () {\n const caps = {};\n const settings = pullSettings(caps);\n settings.should.eql({});\n caps.should.eql({});\n });\n it('should pull combined settings', function () {\n const caps = {\n platformName: 'foo',\n browserName: 'bar',\n 'appium:settings[foo]': 'baz2',\n 'appium:settings': {\n foo: 'baz',\n yolo: 'bar',\n },\n };\n const settings = pullSettings(caps);\n settings.should.eql({\n foo: 'baz2',\n yolo: 'bar',\n });\n caps.should.eql({\n platformName: 'foo',\n browserName: 'bar',\n });\n });\n });\n\n describe('inspect()', function () {\n /**\n * @type {sinon.SinonSandbox}\n */\n let sandbox;\n beforeEach(function () {\n sandbox = createSandbox();\n sandbox.spy(logger, 'info');\n });\n\n afterEach(function () {\n sandbox.restore();\n });\n\n it('should log the result of inspecting a value', function () {\n inspect({foo: 'bar'});\n stripColors(/** @type {sinon.SinonStub} */ (logger.info).firstCall.firstArg).should.match(\n /\\{\\s*\\n*foo:\\s'bar'\\s*\\n*\\}/\n );\n });\n });\n\n describe('adjustNodePath()', function () {\n const prevValue = process.env.NODE_PATH;\n\n beforeEach(function () {\n if (process.env.NODE_PATH) {\n delete process.env.NODE_PATH;\n }\n });\n\n afterEach(function () {\n if (prevValue) {\n process.env.NODE_PATH = prevValue;\n }\n });\n\n it('should adjust NODE_PATH', async function () {\n adjustNodePath();\n (await fs.exists(process.env.NODE_PATH)).should.be.true;\n });\n });\n\n describe('fetchInterfaces()', function () {\n it('should fetch interfaces for ipv4 only', async function () {\n fetchInterfaces(4).length.should.be.greaterThan(0);\n });\n\n it('should fetch interfaces for ipv6 only', async function () {\n fetchInterfaces(6).length.should.be.greaterThan(0);\n });\n\n it('should fetch interfaces for ipv4 and ipv6', async function () {\n fetchInterfaces().length.should.be.greaterThan(0);\n });\n });\n\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/cli/cli.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {tempDir, fs, npm} from '@appium/support';\nimport {loadExtensions} from '../../../lib/extension';\nimport {Manifest} from '../../../lib/extension/manifest';\nimport DriverCommand from '../../../lib/cli/driver-command';\nimport {createSandbox} from 'sinon';\n\ndescribe('DriverCommand', function () {\n /**\n * @type {string}\n */\n let appiumHome;\n\n let config;\n const driver = 'fake';\n const pkgName = '@appium/fake-driver';\n let dc;\n\n let sandbox;\n\n before(async function () {\n const chai = await import('chai');\n chai.should();\n });\n\n beforeEach(async function () {\n sandbox = createSandbox();\n appiumHome = await tempDir.openDir();\n Manifest.getInstance.cache = new Map();\n sandbox.stub(fs, 'exists').resolves(false);\n config = (await loadExtensions(appiumHome)).driverConfig;\n config.installedExtensions = {[driver]: {version: '1.0.0', pkgName}};\n dc = new DriverCommand({config, json: true});\n });\n\n afterEach(async function () {\n await fs.rimraf(appiumHome);\n sandbox.restore();\n });\n\n describe('#checkForExtensionUpdate', function () {\n let npmMock;\n\n beforeEach(function () {\n npmMock = sandbox.mock(npm);\n });\n\n function setupDriverUpdate(curVersion, latestVersion, latestSafeVersion) {\n npmMock\n .expects('getLatestVersion')\n .once()\n .withExactArgs(appiumHome, pkgName)\n .returns(latestVersion);\n npmMock\n .expects('getLatestSafeUpgradeVersion')\n .once()\n .withExactArgs(appiumHome, pkgName, curVersion)\n .returns(latestSafeVersion);\n }\n\n it('should not return an unsafe update if it is same as safe update', async function () {\n setupDriverUpdate('1.0.0', '1.1.0', '1.1.0');\n await dc.checkForExtensionUpdate('fake').should.eventually.eql({\n current: '1.0.0',\n safeUpdate: '1.1.0',\n unsafeUpdate: null,\n });\n npmMock.verify();\n });\n\n it('should not return a safe update if there is not one', async function () {\n setupDriverUpdate('1.0.0', '2.0.0', null);\n await dc.checkForExtensionUpdate('fake').should.eventually.eql({\n current: '1.0.0',\n safeUpdate: null,\n unsafeUpdate: '2.0.0',\n });\n npmMock.verify();\n });\n\n it('should return both safe and unsafe update', async function () {\n setupDriverUpdate('1.0.0', '2.0.0', '1.5.3');\n await dc.checkForExtensionUpdate('fake').should.eventually.eql({\n current: '1.0.0',\n safeUpdate: '1.5.3',\n unsafeUpdate: '2.0.0',\n });\n npmMock.verify();\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/cli/schema-args.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {createSandbox} from 'sinon';\nimport {finalizeSchema, resetSchema, SchemaFinalizationError} from '../../../lib/schema/schema';\nimport {rewiremock} from '../../helpers';\n\ndescribe('cli/schema-args', function () {\n /** @type {import('appium/lib/schema/cli-args').toParserArgs} */\n let toParserArgs;\n\n /**\n * @type {sinon.SinonSandbox}\n */\n let sandbox;\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n });\n\n beforeEach(function () {\n sandbox = createSandbox();\n ({toParserArgs} = rewiremock.proxy(() => require('../../../lib/schema/cli-args')));\n });\n\n afterEach(function () {\n sandbox.restore();\n });\n\n describe('toParserArgs()', function () {\n describe('when called with no parameters', function () {\n beforeEach(finalizeSchema);\n\n afterEach(resetSchema);\n\n it('should return a Map', function () {\n expect(toParserArgs()).to.be.an.instanceof(Map).and.have.property('size').that.is.above(0);\n });\n\n it('should generate metavars in SCREAMING_SNAKE_CASE', function () {\n const argDefs = toParserArgs();\n const argDefsWithMetavar = [...argDefs].filter((arg) => arg[1].metavar);\n expect(argDefsWithMetavar).not.to.be.empty;\n // is there a more idiomatic way to do this?\n expect(argDefsWithMetavar.every((arg) => /[A-Z_]+/.test(arg[1].metavar))).to.be.true;\n });\n });\n\n describe('when schema has not yet been compiled', function () {\n it('should throw', function () {\n resetSchema();\n expect(() => toParserArgs()).to.throw(SchemaFinalizationError);\n });\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/cli/setup-command.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {createSandbox} from 'sinon';\nimport {system} from '@appium/support';\nimport {getPresetDrivers} from '../../../lib/cli/setup-command';\n\ndescribe('SetupCommand', function () {\n let sandbox;\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n });\n\n beforeEach(function () {\n sandbox = createSandbox();\n });\n\n afterEach(function () {\n sandbox.restore();\n });\n\n describe('getPresetDrivers', function () {\n it('for drivers on macOS environment', function () {\n sandbox.stub(system, 'isMac').returns(true);\n sandbox.stub(system, 'isWindows').returns(false);\n expect(getPresetDrivers('mobile')).eql(['uiautomator2', 'xcuitest', 'espresso']);\n expect(getPresetDrivers('browser')).eql(['safari', 'gecko', 'chromium']);\n expect(getPresetDrivers('desktop')).eql(['mac2']);\n });\n\n it('for drivers on Windows environment', function () {\n sandbox.stub(system, 'isMac').returns(false);\n sandbox.stub(system, 'isWindows').returns(true);\n expect(getPresetDrivers('mobile')).eql(['uiautomator2', 'espresso']);\n expect(getPresetDrivers('browser')).eql(['gecko', 'chromium']);\n expect(getPresetDrivers('desktop')).eql(['windows']);\n });\n\n it('for drivers on Linux environment', function () {\n sandbox.stub(system, 'isMac').returns(false);\n sandbox.stub(system, 'isWindows').returns(false);\n expect(getPresetDrivers('mobile')).eql(['uiautomator2', 'espresso']);\n expect(getPresetDrivers('browser')).eql(['gecko', 'chromium']);\n expect(getPresetDrivers('desktop')).eql([]);\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/extension/driver-config.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport {promises as fs} from 'node:fs';\nimport {Manifest} from '../../../lib/extension/manifest';\nimport {resetSchema} from '../../../lib/schema';\nimport {resolveFixture, rewiremock} from '../../helpers';\nimport {initMocks} from './mocks';\n\ndescribe('DriverConfig', function () {\n /** @type {string} */\n let yamlFixture;\n\n /**\n * @type {Manifest}\n */\n let manifest;\n\n /** @type {sinon.SinonSandbox} */\n let sandbox;\n\n /** @type {import('./mocks').MockAppiumSupport} */\n let MockAppiumSupport;\n\n /** @type {import('./mocks').MockResolveFrom} */\n let MockResolveFrom;\n\n /**\n * @type {typeof import('../../../lib/extension/driver-config').DriverConfig}\n */\n let DriverConfig;\n\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n\n yamlFixture = await fs.readFile(resolveFixture('manifest', 'v3.yaml'), 'utf8');\n });\n\n beforeEach(function () {\n manifest = Manifest.getInstance('/somewhere/');\n /** @type {import('./mocks').Overrides} */\n let overrides;\n ({MockAppiumSupport, MockResolveFrom, overrides, sandbox} = initMocks());\n MockAppiumSupport.fs.readFile.resolves(yamlFixture);\n ({DriverConfig} = rewiremock.proxy(\n () => require('../../../lib/extension/driver-config'),\n overrides\n ));\n resetSchema();\n });\n\n afterEach(function () {\n sandbox.restore();\n });\n\n describe('class method', function () {\n describe('create()', function () {\n describe('when the DriverConfig is not yet associated with a Manifest', function () {\n it('should return a new DriverConfig', function () {\n const config = DriverConfig.create(manifest);\n expect(config).to.be.an.instanceof(DriverConfig);\n });\n\n it('should be associated with the Manifest', function () {\n const config = DriverConfig.create(manifest);\n expect(config.manifest).to.equal(manifest);\n });\n });\n\n describe('when the DriverConfig is associated with a Manifest', function () {\n beforeEach(function () {\n DriverConfig.create(manifest);\n });\n\n it('should throw', function () {\n expect(() => DriverConfig.create(manifest)).to.throw(\n Error,\n new RegExp(\n `Manifest with APPIUM_HOME ${manifest.appiumHome} already has a DriverConfig`,\n 'i'\n )\n );\n });\n });\n });\n\n describe('getInstance()', function () {\n describe('when the Manifest is not yet associated with a DriverConfig', function () {\n it('should return undefined', function () {\n expect(DriverConfig.getInstance(manifest)).to.be.undefined;\n });\n });\n\n describe('when the Manifest is associated with a DriverConfig', function () {\n /** @type {DriverConfig} */\n let driverConfig;\n\n beforeEach(function () {\n driverConfig = DriverConfig.create(manifest);\n });\n\n it('should return the associated DriverConfig instance', function () {\n expect(DriverConfig.getInstance(manifest)).to.equal(driverConfig);\n });\n });\n });\n });\n\n describe('instance method', function () {\n describe('extensionDesc()', function () {\n it('should return the description of the extension', function () {\n const config = DriverConfig.create(manifest);\n expect(\n // @ts-expect-error\n config.extensionDesc('foo', {version: '1.0', automationName: 'bar'})\n ).to.equal(`foo@1.0 (automationName 'bar')`);\n });\n });\n\n describe('getConfigProblems()', function () {\n /**\n * @type {DriverConfig}\n */\n let driverConfig;\n\n beforeEach(function () {\n driverConfig = DriverConfig.create(manifest);\n });\n\n describe('when provided no arguments', function () {\n it('should throw', function () {\n // @ts-expect-error\n expect(() => driverConfig.getConfigProblems()).to.throw();\n });\n });\n\n describe('property `platformNames`', function () {\n describe('when provided an object with no `platformNames` property', function () {\n it('should return an array having an associated problem', function () {\n // @ts-expect-error\n expect(driverConfig.getConfigProblems({})).to.deep.include({\n err: 'Missing or incorrect supported platformNames list.',\n val: undefined,\n });\n });\n });\n\n describe('when provided an object with an empty `platformNames` property', function () {\n it('should return an array having an associated problem', function () {\n expect(\n driverConfig\n // @ts-expect-error\n .getConfigProblems({platformNames: []})\n ).to.deep.include({\n err: 'Empty platformNames list.',\n val: [],\n });\n });\n });\n\n describe('when provided an object with a non-array `platformNames` property', function () {\n it('should return an array having an associated problem', function () {\n expect(\n driverConfig\n // @ts-expect-error\n .getConfigProblems({platformNames: 'foo'})\n ).to.deep.include({\n err: 'Missing or incorrect supported platformNames list.',\n val: 'foo',\n });\n });\n });\n\n describe('when provided a non-empty array containing a non-string item', function () {\n it('should return an array having an associated problem', function () {\n expect(\n driverConfig\n // @ts-expect-error\n .getConfigProblems({platformNames: ['a', 1]})\n ).to.deep.include({\n err: 'Incorrectly formatted platformName.',\n val: 1,\n });\n });\n });\n });\n\n describe('property `automationName`', function () {\n describe('when provided an object with a missing `automationName` property', function () {\n it('should return an array having an associated problem', function () {\n // @ts-expect-error\n expect(driverConfig.getConfigProblems({})).to.deep.include({\n err: 'Missing or incorrect automationName',\n val: undefined,\n });\n });\n });\n describe('when provided a conflicting automationName', function () {\n it('should return an array having an associated problem', function () {\n // @ts-expect-error\n driverConfig.getConfigProblems({automationName: 'foo'});\n expect(\n driverConfig\n // @ts-expect-error\n .getConfigProblems({automationName: 'foo'})\n ).to.deep.include({\n err: 'Multiple drivers claim support for the same automationName',\n val: 'foo',\n });\n });\n });\n });\n });\n\n describe('getSchemaProblems()', function () {\n /**\n * @type {DriverConfig}\n */\n let driverConfig;\n\n beforeEach(function () {\n driverConfig = DriverConfig.create(manifest);\n });\n\n describe('when provided an object with a defined non-string `schema` property', function () {\n it('should return an array having an associated problem', function () {\n expect(\n driverConfig\n // @ts-expect-error\n .getSchemaProblems({schema: []})\n ).to.deep.include({\n err: 'Incorrectly formatted schema field; must be a path to a schema file or a schema object.',\n val: [],\n });\n });\n });\n\n describe('when provided a string `schema` property', function () {\n describe('when the property ends in an unsupported extension', function () {\n it('should return an array having an associated problem', function () {\n expect(\n driverConfig\n // @ts-expect-error\n .getSchemaProblems({schema: 'selenium.java'})\n ).to.deep.include({\n err: 'Schema file has unsupported extension. Allowed: .json, .js, .cjs',\n val: 'selenium.java',\n });\n });\n });\n\n describe('when the property contains a supported extension', function () {\n describe('when the property as a path cannot be found', function () {\n it('should return an array having an associated problem', function () {\n expect(\n driverConfig.getSchemaProblems(\n // @ts-expect-error\n {\n pkgName: 'doop',\n schema: 'herp.json',\n },\n 'foo'\n )\n )\n .with.nested.property('[0].err')\n .to.match(/Unable to register schema at path herp\\.json/i);\n });\n });\n\n describe('when the property as a path is found', function () {\n beforeEach(function () {\n MockResolveFrom.returns(resolveFixture('driver-schema.js'));\n });\n\n it('should return an empty array', function () {\n expect(\n driverConfig.getSchemaProblems(\n // @ts-expect-error\n {\n pkgName: 'whatever',\n schema: 'driver-schema.js',\n },\n 'foo'\n )\n ).to.be.empty;\n });\n });\n });\n });\n });\n\n describe('readExtensionSchema()', function () {\n /**\n * @type {DriverConfig}\n */\n let driverConfig;\n\n /** @type {ExtManifestWithSchema} */\n let extData;\n\n const extName = 'stuff';\n\n beforeEach(function () {\n extData = {\n pkgName: 'some-pkg',\n schema: 'driver-schema.js',\n automationName: 'foo',\n mainClass: 'Gargle',\n platformNames: ['barnyard'],\n version: '1.0.0',\n installSpec: 'some-pkg',\n installType: 'npm',\n installPath: '/somewhere',\n };\n MockResolveFrom.returns(resolveFixture('driver-schema.js'));\n driverConfig = DriverConfig.create(manifest);\n });\n\n describe('when the extension data is missing `schema`', function () {\n it('should throw', function () {\n // @ts-expect-error\n delete extData.schema;\n expect(() => driverConfig.readExtensionSchema(extName, extData)).to.throw(\n TypeError,\n /why is this function being called/i\n );\n });\n });\n\n describe('when the extension schema has already been registered (with the same schema)', function () {\n it('should not throw', function () {\n driverConfig.readExtensionSchema(extName, extData);\n expect(() => driverConfig.readExtensionSchema(extName, extData)).not.to.throw();\n });\n });\n\n describe('when the extension schema has not yet been registered', function () {\n it('should resolve and load the extension schema file', function () {\n driverConfig.readExtensionSchema(extName, extData);\n\n // we don't have access to the schema registration cache directly, so this is as close as we can get.\n MockResolveFrom.calledOnce.should.be.true;\n });\n });\n });\n });\n});\n\n/**\n * @typedef {import('@appium/types').DriverType} DriverType\n * @typedef {import('appium/lib/extension/driver-config').DriverConfig} DriverConfig\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtManifest} ExtManifest\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtManifest & {schema: NonNullable['schema']>}} ExtManifestWithSchema\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/extension/extension-command.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\nimport {DriverConfig} from '../../../lib/extension/driver-config';\nimport {ExtensionCommand, injectAppiumSymlinks} from '../../../lib/cli/extension-command';\nimport sinon from 'sinon';\nimport sinonChai from 'sinon-chai';\nimport {FAKE_DRIVER_DIR} from '../../helpers';\nimport {Manifest} from '../../../lib/extension/manifest';\nimport {fs, system} from '@appium/support';\nimport * as utils from '../../../lib/utils';\nimport {expect} from 'chai';\nimport * as chai from 'chai';\nimport chaiAsPromised from 'chai-as-promised';\n\n/**\n * Relative path from actual `package.json` of `FakeDriver` for the `fake-stdin` script\n */\nconst FAKE_STDIN_SCRIPT = require(`${FAKE_DRIVER_DIR}/package.json`).appium.scripts['fake-stdin'];\n\n/** @type {sinon.SinonSandbox} */\nlet sandbox;\n\nchai.use(chaiAsPromised);\nchai.use(sinonChai);\n\ndescribe('ExtensionCommand', function () {\n describe('method', function () {\n /** @type {ExtensionCommand} */\n let ec;\n\n beforeEach(function () {\n sandbox = sinon.createSandbox();\n const driverConfig = DriverConfig.create(sandbox.createStubInstance(Manifest));\n ec = new ExtensionCommand({config: driverConfig, json: false});\n });\n\n afterEach(function () {\n sandbox.verify();\n sandbox.restore();\n });\n\n describe('_runUnbuffered()', function () {\n // this test is low value and mostly just asserts that `child_process.spawn()` works.\n // the problem is that because `_run()` returns a `Promise`, a caller cannot reach the\n // underlying `ChildProcess` instance.\n // something like `execa` could work around this because it returns a frankenstein of a\n // `Promise` + `ChildProcess`, but I didn't want to add the dep.\n it('should respond to stdin', function (done) {\n // we have to fake writing to STDIN because this is an automated test, after all.\n const proc = /** @type {import('child_process').ChildProcess} */ (ec\n ._runUnbuffered(FAKE_DRIVER_DIR, FAKE_STDIN_SCRIPT, [], {\n stdio: ['pipe', 'inherit', 'inherit'],\n }));\n\n proc.once('exit', (/** @type {number | null} */ code) => {\n try {\n expect(code).to.equal(0);\n done();\n } catch (err) {\n done(err);\n }\n });\n\n setTimeout(() => {\n // TS does not understand that `proc.stdin` is not `null`, because it is only a `Writable`\n // if STDIN is piped from the parent.\n const stdin = /** @type {import('node:stream').Writable} */ (proc.stdin);\n stdin.write('\\n');\n stdin.end();\n }, 200);\n });\n });\n });\n\n describe('injectAppiumSymlinks', function () {\n\n /** @type {sinon.SinonStub} */\n let fsExistsStub;\n\n /** @type {sinon.SinonStub} */\n let fsSymlinkStub;\n\n /** @type {sinon.SinonStub} */\n let getAppiumModuleRootStub;\n\n /** @type {sinon.SinonStub} */\n let isWindowsStub;\n\n /** @type {import('@appium/types').AppiumLogger} */\n let logger;\n\n beforeEach(function () {\n sandbox = sinon.createSandbox();\n fsExistsStub = sandbox.stub(fs, 'exists');\n fsSymlinkStub = sandbox.stub(fs, 'symlink');\n getAppiumModuleRootStub = sandbox.stub(utils, 'getAppiumModuleRoot');\n isWindowsStub = sandbox.stub(system, 'isWindows');\n logger = /** @type {any} */ ({\n info: sandbox.stub(),\n warn: sandbox.stub(),\n error: sandbox.stub(),\n debug: sandbox.stub(),\n });\n\n getAppiumModuleRootStub.returns('/path/to/appium');\n isWindowsStub.returns(false);\n });\n\n afterEach(function () {\n sandbox.verify();\n sandbox.restore();\n });\n\n describe('when there are no installed extensions', function () {\n it('should not create any symlinks', async function () {\n const driverConfig = {installedExtensions: {}};\n const pluginConfig = {installedExtensions: {}};\n\n // @ts-expect-error - partial config for testing\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n\n expect(fsSymlinkStub).to.not.have.been.called;\n });\n });\n\n describe('when there are npm-installed drivers', function () {\n it('should create symlinks for npm-installed drivers', async function () {\n const driverConfig = {\n installedExtensions: {\n 'driver-for-test': {\n installType: 'npm',\n installPath: '/path/to/driver-for-test',\n },\n },\n };\n const pluginConfig = {installedExtensions: {}};\n\n fsExistsStub.withArgs('/path/to/driver-for-test/node_modules').resolves(true);\n fsExistsStub.withArgs('/path/to/driver-for-test/node_modules/appium').resolves(false);\n\n // @ts-expect-error - partial config for testing\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n\n expect(fsExistsStub).to.have.been.calledWith('/path/to/driver-for-test/node_modules');\n expect(fsExistsStub).to.have.been.calledWith('/path/to/driver-for-test/node_modules/appium');\n expect(fsSymlinkStub).to.have.been.calledOnce;\n expect(fsSymlinkStub).to.have.been.calledWith(\n '/path/to/appium',\n '/path/to/driver-for-test/node_modules/appium',\n 'dir'\n );\n });\n\n it('should create junction symlinks on Windows', async function () {\n isWindowsStub.returns(true);\n const driverConfig = {\n installedExtensions: {\n 'driver-for-test': {\n installType: 'npm',\n installPath: '/path/to/driver-for-test',\n },\n },\n };\n const pluginConfig = {installedExtensions: {}};\n\n fsExistsStub.withArgs('/path/to/driver-for-test/node_modules').resolves(true);\n fsExistsStub.withArgs('/path/to/driver-for-test/node_modules/appium').resolves(false);\n\n // @ts-expect-error - partial config for testing\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n\n expect(fsSymlinkStub).to.have.been.calledWith(\n '/path/to/appium',\n '/path/to/driver-for-test/node_modules/appium',\n 'junction'\n );\n });\n\n it('should not create symlinks if node_modules directory does not exist', async function () {\n const driverConfig = {\n installedExtensions: {\n 'driver-for-test': {\n installType: 'npm',\n installPath: '/path/to/driver-for-test',\n },\n },\n };\n const pluginConfig = {installedExtensions: {}};\n\n fsExistsStub.withArgs('/path/to/driver-for-test/node_modules').resolves(false);\n\n // @ts-expect-error - partial config for testing\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n\n expect(fsSymlinkStub).to.not.have.been.called;\n });\n\n it('should not create symlinks if symlink already exists', async function () {\n const driverConfig = {\n installedExtensions: {\n 'driver-for-test': {\n installType: 'npm',\n installPath: '/path/to/driver-for-test',\n },\n },\n };\n const pluginConfig = {installedExtensions: {}};\n\n fsExistsStub.resolves(true);\n\n // @ts-expect-error - partial config for testing\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n\n expect(fsSymlinkStub).to.not.have.been.called;\n });\n });\n\n describe('when there are npm-installed plugins', function () {\n it('should create symlinks for npm-installed plugins', async function () {\n const driverConfig = {installedExtensions: {}};\n const pluginConfig = {\n installedExtensions: {\n 'plugin-for-test': {\n installType: 'npm',\n installPath: '/path/to/plugin-for-test',\n },\n },\n };\n\n fsExistsStub.withArgs('/path/to/plugin-for-test/node_modules').resolves(true);\n fsExistsStub.withArgs('/path/to/plugin-for-test/node_modules/appium').resolves(false);\n\n // @ts-expect-error - partial config for testing\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n\n expect(fsSymlinkStub).to.have.been.calledOnce;\n expect(fsSymlinkStub).to.have.been.calledWith(\n '/path/to/appium',\n '/path/to/plugin-for-test/node_modules/appium',\n 'dir'\n );\n });\n });\n\n describe('when there are both drivers and plugins', function () {\n it('should create symlinks for all npm-installed extensions', async function () {\n const driverConfig = {\n installedExtensions: {\n 'driver-for-test': {\n installType: 'npm',\n installPath: '/path/to/driver-for-test',\n },\n },\n };\n const pluginConfig = {\n installedExtensions: {\n 'plugin-for-test': {\n installType: 'npm',\n installPath: '/path/to/plugin-for-test',\n },\n },\n };\n\n fsExistsStub.resolves(true);\n fsExistsStub.withArgs('/path/to/driver-for-test/node_modules/appium').resolves(false);\n fsExistsStub.withArgs('/path/to/plugin-for-test/node_modules/appium').resolves(false);\n\n // @ts-expect-error - partial config for testing\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n\n expect(fsSymlinkStub).to.have.been.calledTwice;\n });\n\n it('should not create symlinks for invalid format - no installPath', async function () {\n const driverConfig = {\n installedExtensions: {\n 'driver-for-test': {\n installType: 'npm',\n },\n },\n };\n const pluginConfig = {\n installedExtensions: {\n 'plugin-for-test': {\n installType: 'npm',\n },\n },\n };\n\n // @ts-expect-error - partial config for testing\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n\n expect(fsSymlinkStub).to.not.have.been.called;\n });\n });\n\n describe('when there are non-npm installed extensions', function () {\n for (const installType of ['git', 'local', 'github']) {\n it(`should skip ${installType}-installed extensions`, async function () {\n const driverConfig = {\n installedExtensions: {\n [`${installType}-driver`]: {\n installType,\n installPath: `/path/to/${installType}-driver`,\n },\n },\n };\n const pluginConfig = {installedExtensions: {}};\n\n // @ts-expect-error - partial config for testing\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n\n expect(fsSymlinkStub).to.not.have.been.called;\n });\n }\n\n it('should only create symlinks for npm-installed extensions when mixed', async function () {\n const driverConfig = {\n installedExtensions: {\n 'npm-driver': {\n installType: 'npm',\n installPath: '/path/to/npm-driver',\n },\n 'git-driver': {\n installType: 'git',\n installPath: '/path/to/git-driver',\n },\n },\n };\n const pluginConfig = {installedExtensions: {}};\n\n fsExistsStub.resolves(true);\n fsExistsStub.withArgs('/path/to/npm-driver/node_modules/appium').resolves(false);\n\n // @ts-expect-error - partial config for testing\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n\n expect(fsSymlinkStub).to.have.been.calledOnce;\n expect(fsSymlinkStub).to.have.been.calledWith(\n '/path/to/appium',\n '/path/to/npm-driver/node_modules/appium',\n 'dir'\n );\n });\n });\n\n describe('error handling', function () {\n it('should log info message when symlink creation fails', async function () {\n const driverConfig = {\n installedExtensions: {\n 'driver-for-test': {\n installType: 'npm',\n installPath: '/path/to/driver-for-test',\n },\n },\n };\n const pluginConfig = {installedExtensions: {}};\n\n fsExistsStub.resolves(true);\n fsExistsStub.withArgs('/path/to/driver-for-test/node_modules/appium').resolves(false);\n fsSymlinkStub.rejects(new Error('Permission denied'));\n\n // @ts-expect-error - partial config for testing\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n\n expect(logger.info).to.have.been.calledOnce;\n // @ts-ignore\n expect(logger.info.args[0][0]).to.match(/Cannot create a symlink/);\n // @ts-ignore\n expect(logger.info.args[0][0]).to.match(/Permission denied/);\n });\n\n it('should not throw when getAppiumModuleRoot fails', async function () {\n const driverConfig = {\n installedExtensions: {\n 'driver-for-test': {\n installType: 'npm',\n installPath: '/path/to/driver-for-test',\n },\n },\n };\n const pluginConfig = {installedExtensions: {}};\n\n getAppiumModuleRootStub.throws(new Error('Module not found'));\n fsExistsStub.resolves(true);\n fsExistsStub.withArgs('/path/to/driver-for-test/node_modules/appium').resolves(false);\n\n // @ts-expect-error - partial config for testing\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n\n expect(logger.info).to.have.been.calledOnce;\n // @ts-ignore\n expect(logger.info.args[0][0]).to.match(/Cannot create a symlink/);\n });\n });\n\n describe('with null or undefined configs', function () {\n it('should handle null installedExtensions', async function () {\n const driverConfig = {installedExtensions: null};\n const pluginConfig = {installedExtensions: null};\n\n // @ts-expect-error - partial config for testing\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n\n expect(fsSymlinkStub).to.not.have.been.called;\n });\n\n it('should handle undefined installedExtensions', async function () {\n const driverConfig = {};\n const pluginConfig = {};\n\n // @ts-expect-error - partial config for testing\n await injectAppiumSymlinks(driverConfig, pluginConfig, logger);\n\n expect(fsSymlinkStub).to.not.have.been.called;\n });\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/extension/extension-config.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {DRIVER_TYPE} from '../../../lib/constants';\nimport path from 'node:path';\nimport {version as APPIUM_VER} from '../../../package.json';\nimport {FAKE_DRIVER_DIR, PROJECT_ROOT, rewiremock} from '../../helpers';\nimport {initMocks} from './mocks';\nimport {resolveEsmEntryPoint} from '../../../lib/extension/extension-config';\n\ndescribe('ExtensionConfig', function () {\n /** @type {import('sinon').SinonSandbox} */\n let sandbox;\n\n /** @type {typeof import('appium/lib/extension/extension-config').ExtensionConfig} */\n let ExtensionConfig;\n\n /** @type {typeof import('appium/lib/extension/manifest').Manifest} */\n let Manifest;\n\n /** @type {import('./mocks').MockAppiumSupport} */\n let MockAppiumSupport;\n\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n });\n\n beforeEach(function () {\n let overrides;\n ({MockAppiumSupport, overrides, sandbox} = initMocks());\n ({ExtensionConfig} = rewiremock.proxy(\n () => require('../../../lib/extension/extension-config'),\n overrides\n ));\n ({Manifest} = rewiremock.proxy(() => require('../../../lib/extension/manifest'), overrides));\n\n MockAppiumSupport.fs.readPackageJsonFrom.returns({version: '2.0.0'});\n });\n\n afterEach(function () {\n sandbox.restore();\n // avoids a warning about too many listeners, caused by an exit handler in base-driver\n process.removeAllListeners('exit');\n });\n\n describe('ESM module resolution', function () {\n it('resolves ESM entry point with simple export', function () {\n resolveEsmEntryPoint('./index.js').should.eql('./index.js');\n });\n\n it('resolves ESM entry point with dot export', function () {\n resolveEsmEntryPoint({\n '.': './index.js'\n }).should.eql('./index.js');\n });\n\n it('resolves ESM entry point with import export', function () {\n resolveEsmEntryPoint({\n import: './index.js'\n }).should.eql('./index.js');\n });\n\n it('resolves ESM entry point with complex import export', function () {\n resolveEsmEntryPoint({\n '.': {\n import: './index.js'\n }\n }).should.eql('./index.js');\n });\n });\n\n describe('instance method', function () {\n /** @type {import('appium/lib/extension/extension-config').ExtensionConfig} */\n let config;\n\n let extData;\n\n beforeEach(function () {\n config = new ExtensionConfig(DRIVER_TYPE, new Manifest('/some/path'));\n extData = {\n version: '1.0.0',\n automationName: 'Derp',\n mainClass: 'SomeClass',\n pkgName: 'derp',\n platformNames: ['dogs', 'cats'],\n installSpec: 'derp',\n installType: 'npm',\n appiumVersion: APPIUM_VER,\n };\n config.addExtension(extData.pkgName, extData);\n });\n\n describe('getGenericConfigProblems()', function () {\n describe('when there are no problems with the extension data', function () {\n it('should return an empty array', function () {\n expect(config.getGenericConfigProblems(extData, extData.pkgName)).to.be.empty;\n });\n });\n\n describe('when the extension data is missing a \"pkgName\" field', function () {\n let pkgName;\n beforeEach(function () {\n ({pkgName} = extData);\n delete extData.pkgName;\n });\n\n it('should return a problem', function () {\n expect(config.getGenericConfigProblems(extData, pkgName)).to.eql([\n {\n err: 'Invalid or missing `name` field in my `package.json` and/or `extensions.yaml` (must be a string)',\n val: undefined,\n },\n ]);\n });\n });\n\n describe('when the extension data is missing a \"version\" field', function () {\n beforeEach(function () {\n delete extData.version;\n });\n\n it('should return a problem', function () {\n expect(config.getGenericConfigProblems(extData, extData.pkgName)).to.eql([\n {\n err: 'Invalid or missing `version` field in my `package.json` and/or `extensions.yaml` (must be a string)',\n val: undefined,\n },\n ]);\n });\n });\n\n describe('when the extension data is missing a \"appium.mainClass\" field', function () {\n beforeEach(function () {\n delete extData.mainClass;\n });\n\n it('should return a problem', function () {\n expect(config.getGenericConfigProblems(extData, extData.pkgName)).to.eql([\n {\n err: 'Invalid or missing `appium.mainClass` field in my `package.json` and/or `mainClass` field in `extensions.yaml` (must be a string)',\n val: undefined,\n },\n ]);\n });\n });\n });\n\n describe('getGenericConfigWarnings()', function () {\n /** @type {ExtManifest} */\n let extData;\n\n /**\n * @type {ExtensionConfig}\n */\n let config;\n\n beforeEach(function () {\n const manifest = Manifest.getInstance('/some/path');\n extData = {\n version: '1.0.0',\n automationName: 'Derp',\n mainClass: 'SomeClass',\n pkgName: 'derp',\n platformNames: ['dogs', 'cats'],\n installSpec: 'derp',\n installType: 'npm',\n appiumVersion: APPIUM_VER,\n };\n manifest.setExtension(DRIVER_TYPE, extData.pkgName, extData);\n config = new ExtensionConfig(DRIVER_TYPE, manifest);\n });\n\n describe('when the extension data is missing an `installSpec` field', function () {\n beforeEach(function () {\n delete extData.installSpec;\n });\n\n it('should resolve w/ an appropriate warning', async function () {\n await expect(config.getGenericConfigWarnings(extData, extData.pkgName)).to.eventually.eql(\n [\n `Driver \"${extData.pkgName}\" (package \\`${extData.pkgName}\\`) has 1 invalid or missing field (\"installSpec\") in \\`extensions.yaml\\`; this may cause upgrades done via the \\`appium\\` CLI tool to fail. Please reinstall with \\`appium driver uninstall ${extData.pkgName}\\` and \\`appium driver install ${extData.pkgName}\\` to attempt a fix.`,\n ]\n );\n });\n });\n\n describe('when the extension data is missing an `installType` field', function () {\n beforeEach(function () {\n delete extData.installType;\n });\n\n it('should resolve w/ an appropriate warning', async function () {\n await expect(config.getGenericConfigWarnings(extData, extData.pkgName)).to.eventually.eql(\n [\n `Driver \"${extData.pkgName}\" (package \\`${extData.pkgName}\\`) has 1 invalid or missing field (\"installType\") in \\`extensions.yaml\\`; this may cause upgrades done via the \\`appium\\` CLI tool to fail. Please reinstall with \\`appium driver uninstall ${extData.pkgName}\\` and \\`appium driver install ${extData.pkgName}\\` to attempt a fix.`,\n ]\n );\n });\n });\n\n describe('when the extension data is missing both `installType` and `installSpec` fields', function () {\n beforeEach(function () {\n delete extData.installType;\n delete extData.installSpec;\n });\n\n it('should resolve w/ an appropriate warning', async function () {\n await expect(config.getGenericConfigWarnings(extData, extData.pkgName)).to.eventually.eql(\n [\n `Driver \"${extData.pkgName}\" (package \\`${extData.pkgName}\\`) has 2 invalid or missing fields (\"installSpec\", \"installType\") in \\`extensions.yaml\\`; this may cause upgrades done via the \\`appium\\` CLI tool to fail. Please reinstall with \\`appium driver uninstall ${extData.pkgName}\\` and \\`appium driver install ${extData.pkgName}\\` to attempt a fix.`,\n ]\n );\n });\n });\n\n describe('when the extension data is missing an `appiumVersion` field', function () {\n beforeEach(function () {\n delete extData.appiumVersion;\n });\n\n describe('when an upgrade is not available', function () {\n beforeEach(function () {\n MockAppiumSupport.npm.getLatestSafeUpgradeVersion.resolves(null);\n MockAppiumSupport.npm.getLatestVersion.resolves(null);\n });\n it('should resolve w/ an appropriate warning', async function () {\n await expect(\n config.getGenericConfigWarnings(extData, extData.pkgName)\n ).to.eventually.eql([\n `Driver \"${extData.pkgName}\" (package \\`${extData.pkgName}\\`) may be incompatible with the current version of Appium (v${APPIUM_VER}) due to an invalid or missing peer dependency on Appium. Please ask the developer of \\`${extData.pkgName}\\` to add a peer dependency on \\`^appium@${APPIUM_VER}\\`.`,\n ]);\n });\n });\n\n describe('when an upgrade is available', function () {\n let updateVersion;\n\n beforeEach(function () {\n updateVersion = '1.1.0';\n MockAppiumSupport.npm.getLatestVersion.resolves(updateVersion);\n MockAppiumSupport.npm.getLatestSafeUpgradeVersion.resolves(updateVersion);\n });\n\n it('should resolve w/ an appropriate warning', async function () {\n await expect(\n config.getGenericConfigWarnings(extData, extData.pkgName)\n ).to.eventually.eql([\n `Driver \"${extData.pkgName}\" (package \\`${extData.pkgName}\\`) may be incompatible with the current version of Appium (v${APPIUM_VER}) due to an invalid or missing peer dependency on Appium. A newer version of \\`${extData.pkgName}\\` is available; please attempt to upgrade \"${extData.pkgName}\" to v${updateVersion} or newer.`,\n ]);\n });\n });\n });\n\n describe('when the extension data has an `appiumVersion` field which does not satisfy the current version of Appium', function () {\n beforeEach(function () {\n extData.appiumVersion = '1.9.9';\n });\n\n describe('when an upgrade is available', function () {\n let updateVersion;\n\n beforeEach(function () {\n updateVersion = '1.1.0';\n MockAppiumSupport.npm.getLatestVersion.resolves(updateVersion);\n MockAppiumSupport.npm.getLatestSafeUpgradeVersion.resolves(updateVersion);\n });\n\n it('should resolve w/ an appropriate warning', async function () {\n await expect(\n config.getGenericConfigWarnings(extData, extData.pkgName)\n ).to.eventually.eql([\n `Driver \"${extData.pkgName}\" (package \\`${extData.pkgName}\\`) may be incompatible with the current version of Appium (v${APPIUM_VER}) due to its peer dependency on Appium ${extData.appiumVersion}. Try to upgrade \\`${extData.pkgName}\\` to v${updateVersion} or newer.`,\n ]);\n });\n });\n\n describe('when no upgrade is available', function () {\n beforeEach(function () {\n MockAppiumSupport.util.compareVersions.returns(false);\n MockAppiumSupport.npm.getLatestSafeUpgradeVersion.resolves(null);\n MockAppiumSupport.npm.getLatestVersion.resolves(null);\n });\n it('should resolve w/ an appropriate warning', async function () {\n await expect(\n config.getGenericConfigWarnings(extData, extData.pkgName)\n ).to.eventually.eql([\n `Driver \"${extData.pkgName}\" (package \\`${extData.pkgName}\\`) may be incompatible with the current version of Appium (v${APPIUM_VER}) due to its peer dependency on Appium ${extData.appiumVersion}. Please install a compatible version of the driver.`,\n ]);\n });\n });\n });\n });\n\n describe('_validate()', function () {\n describe('when there is a single warning', function () {\n beforeEach(function () {\n sandbox.stub(config, 'getProblems').resolves([]);\n sandbox.stub(config, 'getWarnings').resolves([{err: 'some warning', val: 'whatever'}]);\n });\n\n it('should display a warning count of 1', async function () {\n await config._validate({foo: {}});\n MockAppiumSupport.logger.__logger.warn.calledWith(\n 'Appium encountered 1 warning while validating drivers found in manifest /some/path/extensions.yaml'\n ).should.be.true;\n });\n });\n\n describe('when there is a single error', function () {\n beforeEach(function () {\n sandbox.stub(config, 'getProblems').resolves([{err: 'some warning', val: 'whatever'}]);\n sandbox.stub(config, 'getWarnings').resolves([]);\n });\n\n it('should display an error count of 1', async function () {\n await config._validate({foo: {}});\n MockAppiumSupport.logger.__logger.error.calledWith(\n 'Appium encountered 1 error while validating drivers found in manifest /some/path/extensions.yaml'\n ).should.be.true;\n });\n });\n });\n\n describe('require()', function () {\n beforeEach(function () {\n // the `ExtensionConfig` instance doesn't know about fake driver, since it hasn't been\n // loaded yet. all we need for the purposes of the `require()` function is a `mainClass`, so\n // here we go.\n config.installedExtensions.fake = {pkgName: 'flotsam', mainClass: 'Jetsam'};\n });\n\n describe('when the extension is not actually installed', function () {\n it('should throw', async function () {\n await config.requireAsync('fake').should.be.rejectedWith(/cannot find module/i);\n });\n });\n\n describe('when the extension does not export its main class', function () {\n beforeEach(function () {\n // since we can't easily mock `require.resolve()` and `require()`, we need to use a real thing.\n // that real thing will be `@appium/fake-driver`.\n // ()`config.appiumHome` is stubbed already, so we can't just run `getInstallPath` as-is)\n sandbox.stub(config, 'getInstallPath').returns(FAKE_DRIVER_DIR);\n });\n it('should throw', async function () {\n await config.requireAsync('fake').should.be.rejectedWith(/cannot find module/i);\n });\n });\n\n describe('when extension is installed and correctly exports its main class', function () {\n const pluginModuleRoot = path.join(PROJECT_ROOT, 'packages', 'relaxed-caps-plugin');\n const packageJsonPath = path.join(pluginModuleRoot, 'package.json');\n const entryPointPath = path.join(pluginModuleRoot, 'build', 'lib', 'index.js');\n\n beforeEach(function () {\n config.installedExtensions['relaxed-caps'] = {\n mainClass: 'RelaxedCapsPlugin',\n };\n sandbox.stub(config, 'getInstallPath').returns(pluginModuleRoot);\n // _resolveExtension reads package.json and uses manifest.main; delegate to real fs for this path\n MockAppiumSupport.fs.readFile\n .withArgs(packageJsonPath, 'utf8')\n .callsFake(async () => (await import('node:fs/promises')).readFile(packageJsonPath, 'utf8'));\n MockAppiumSupport.fs.exists.withArgs(entryPointPath).resolves(true);\n });\n\n it('should return the class by loading from the manifest main entry point', async function () {\n expect(await config.requireAsync('relaxed-caps')).to.equal(\n require('@appium/relaxed-caps-plugin').RelaxedCapsPlugin\n );\n });\n });\n });\n });\n});\n\n/**\n * @typedef {import('@appium/types').DriverType} DriverType\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/extension/manifest-migrations.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {Manifest} from '../../../lib/extension/manifest';\nimport {migrate} from '../../../lib/extension/manifest-migrations';\nimport {DRIVER_TYPE} from '../../../lib/constants';\n\ndescribe('manifest-migrations', function () {\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n });\n\n describe('when no installPath property present in manifest', function () {\n it('should trigger refresh', async function () {\n const manifest = Manifest.getInstance(process.cwd());\n // do not explicitly set the schema rev lower here, since that will trigger\n manifest.setExtension(\n DRIVER_TYPE,\n 'derp',\n // @ts-expect-error - old manifest version\n {\n version: '1.0.0',\n automationName: 'Derp',\n mainClass: 'SomeClass',\n pkgName: 'derp',\n platformNames: ['dogs', 'cats'],\n installSpec: 'derp',\n installType: 'local',\n appiumVersion: '2.0.0',\n }\n );\n\n await expect(migrate(manifest)).to.eventually.be.true;\n });\n });\n\n describe('when installPath property present in manifest', function () {\n it('should not trigger refresh', async function () {\n const manifest = Manifest.getInstance(process.cwd());\n // do not explicitly set the schema rev lower here, since that will trigger\n manifest.setExtension(DRIVER_TYPE, 'derp', {\n version: '1.0.0',\n automationName: 'Derp',\n mainClass: 'SomeClass',\n pkgName: 'derp',\n platformNames: ['dogs', 'cats'],\n installPath: '/path/to/thing',\n installType: 'local',\n installSpec: 'derp',\n appiumVersion: '2.0.0',\n });\n\n await expect(migrate(manifest)).to.eventually.be.false;\n });\n });\n\n describe('when an installType is \"npm\" and the rev is old', function () {\n it('should trigger refresh', async function () {\n const manifest = Manifest.getInstance(process.cwd());\n manifest.setSchemaRev(3); // this will trigger a refresh, but there's no way to tell _why_, which may be bad. YAGNI?\n manifest.setExtension(DRIVER_TYPE, 'derp', {\n version: '1.0.0',\n automationName: 'Derp',\n mainClass: 'SomeClass',\n pkgName: 'derp',\n platformNames: ['dogs', 'cats'],\n installType: 'npm',\n installPath: '/path/to/thing',\n installSpec: 'derp',\n appiumVersion: '2.0.0',\n });\n\n await expect(migrate(manifest)).to.eventually.be.true;\n });\n });\n\n describe('when no installType is \"npm\"', function () {\n it('should not trigger refresh', async function () {\n const manifest = Manifest.getInstance(process.cwd());\n // do not explicitly set the schema rev lower here, since that will trigger\n manifest.setExtension(DRIVER_TYPE, 'derp', {\n version: '1.0.0',\n automationName: 'Derp',\n mainClass: 'SomeClass',\n pkgName: 'derp',\n platformNames: ['dogs', 'cats'],\n installType: 'local',\n installPath: '/path/to/thing',\n installSpec: 'derp',\n appiumVersion: '2.0.0',\n });\n\n await expect(migrate(manifest)).to.eventually.be.false;\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/extension/manifest.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\nimport B from 'bluebird';\nimport {promises as fs} from 'node:fs';\nimport {DRIVER_TYPE, PLUGIN_TYPE} from '../../../lib/constants';\nimport {resolveFixture, rewiremock} from '../../helpers';\nimport {initMocks} from './mocks';\nimport {version as APPIUM_VER} from '../../../package.json';\nimport EventEmitter from 'node:events';\n\ndescribe('Manifest', function () {\n /**\n * @type {sinon.SinonSandbox}\n */\n let sandbox;\n\n /** @type {string} */\n let yamlFixture;\n\n /** @type {import('./mocks').MockPackageChanged} */\n let MockPackageChanged;\n\n /** @type {import('./mocks').MockAppiumSupport} */\n let MockAppiumSupport;\n\n /** @type {import('./mocks').MockGlob} */\n let MockGlob;\n\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n\n yamlFixture = await fs.readFile(resolveFixture('manifest', 'v3.yaml'), 'utf8');\n });\n\n /**\n * @type {typeof import('../../../lib/extension/manifest').Manifest}\n */\n let Manifest;\n\n beforeEach(function () {\n let overrides;\n ({MockPackageChanged, MockAppiumSupport, MockGlob, overrides, sandbox} = initMocks());\n MockAppiumSupport.fs.readFile.resolves(yamlFixture);\n ({Manifest} = rewiremock.proxy(() => require('../../../lib/extension/manifest'), {\n ...overrides,\n '../../../lib/extension/manifest-migrations.js': {migrate: sandbox.stub().resolves()},\n }));\n\n Manifest.getInstance.cache = new Map();\n });\n\n afterEach(function () {\n sandbox.restore();\n });\n\n describe('class method', function () {\n describe('getInstance()', function () {\n describe('when called twice with the same `appiumHome` value', function () {\n it('should return the same object both times', function () {\n const firstInstance = Manifest.getInstance('/some/path');\n const secondInstance = Manifest.getInstance('/some/path');\n expect(firstInstance).to.equal(secondInstance);\n });\n });\n\n describe('when called twice with different `appiumHome` values', function () {\n it('should return different objects', function () {\n const firstInstance = Manifest.getInstance('/some/path');\n const secondInstance = Manifest.getInstance('/some/other/path');\n expect(firstInstance).to.not.equal(secondInstance);\n });\n });\n });\n });\n\n describe('property', function () {\n describe('appiumHome', function () {\n it('should return the `appiumHome` path', function () {\n expect(Manifest.getInstance('/some/path').appiumHome).to.equal('/some/path');\n });\n\n it('should not be writable', function () {\n const instance = Manifest.getInstance('/some/path');\n expect(() => {\n // @ts-expect-error\n instance.appiumHome = '/some/other/path';\n }).to.throw(TypeError);\n });\n });\n\n describe('manifestPath', function () {\n describe('before `read()` has been called', function () {\n it('should be undefined', function () {\n expect(Manifest.getInstance('/some/path').manifestPath).to.be.undefined;\n });\n });\n\n describe('after `read()` has been called', function () {\n let manifest;\n beforeEach(async function () {\n manifest = Manifest.getInstance('/some/path');\n await manifest.read();\n });\n\n it('should return the manifest file path', function () {\n // this path is not the actual path; it's mocked in `MockAppiumSupport.env.resolveManifestPath`.\n expect(Manifest.getInstance('/some/path').manifestPath).to.equal(\n '/some/path/extensions.yaml'\n );\n });\n });\n\n it('should not be writable', function () {\n const instance = Manifest.getInstance('/some/path');\n expect(() => {\n // @ts-expect-error\n instance.manifestPath = '/some/other/path';\n }).to.throw(TypeError);\n });\n });\n });\n\n describe('instance method', function () {\n /** @type {import('appium/lib/extension/manifest').Manifest} */\n let manifest;\n\n beforeEach(function () {\n Manifest.getInstance.cache = new Map();\n manifest = Manifest.getInstance('/some/path');\n });\n\n describe('read()', function () {\n beforeEach(function () {\n sandbox.stub(manifest, 'syncWithInstalledExtensions').resolves();\n });\n\n describe('when the file does not yet exist', function () {\n beforeEach(async function () {\n /** @type {NodeJS.ErrnoException} */\n const err = new Error();\n err.code = 'ENOENT';\n MockAppiumSupport.fs.readFile.rejects(err);\n await manifest.read();\n });\n\n it('should create a new file', function () {\n MockAppiumSupport.fs.writeFile.calledOnce.should.be.true;\n });\n });\n\n describe('when the file is invalid YAML', function () {\n beforeEach(function () {\n MockAppiumSupport.fs.readFile.resolves('{');\n });\n it('should reject', async function () {\n await expect(manifest.read()).to.be.rejectedWith(\n Error,\n /trouble loading the extension installation cache file/i\n );\n });\n });\n\n describe('when the manifest path cannot be determined', function () {\n beforeEach(function () {\n MockAppiumSupport.env.resolveManifestPath.rejects(\n new Error('Could not determine manifest path')\n );\n });\n\n it('should reject', async function () {\n await expect(manifest.read()).to.be.rejectedWith(\n Error,\n /could not determine manifest path/i\n );\n });\n });\n\n describe('when called again before the first call resolves', function () {\n beforeEach(async function () {\n await B.all([manifest.read(), manifest.read()]);\n });\n it('should not read the file twice', function () {\n MockAppiumSupport.fs.readFile.calledOnceWith(\n '/some/path/extensions.yaml',\n 'utf8'\n ).should.be.true;\n });\n });\n\n describe('when the file already exists', function () {\n beforeEach(async function () {\n sandbox.spy(manifest, 'write');\n await manifest.read();\n });\n\n it('should attempt to read the file at `filepath`', function () {\n MockAppiumSupport.fs.readFile.calledOnceWith(\n '/some/path/extensions.yaml',\n 'utf8'\n ).should.be.true;\n });\n\n describe('when the data has not changed', function () {\n it('should not write the data', function () {\n // @ts-ignore\n manifest.write.called.should.be.false;\n });\n });\n\n describe('when a local `appium` is installed', function () {\n beforeEach(function () {\n MockAppiumSupport.env.hasAppiumDependency.resolves(true);\n MockPackageChanged.isPackageChanged.resolves({\n isChanged: true,\n writeHash: sandbox.stub(),\n hash: 'foasdif',\n oldHash: 'sdjifh',\n });\n });\n\n it('should synchronize manifest with installed extensions', async function () {\n await manifest.read();\n // @ts-ignore\n manifest.syncWithInstalledExtensions.calledOnce.should.be.true;\n });\n\n it('should check if the `package.json` has changed', async function () {\n await manifest.read();\n MockPackageChanged.isPackageChanged.calledOnce.should.be.true;\n });\n });\n });\n });\n\n describe('write()', function () {\n beforeEach(function () {\n sandbox.stub(manifest, 'syncWithInstalledExtensions').resolves();\n });\n\n describe('when called after `read()`', function () {\n /** @type {ManifestData} */\n let data;\n\n /** @type {ExtManifest} */\n const extData = {\n version: '1.0.0',\n automationName: 'Derp',\n mainClass: 'SomeClass',\n pkgName: 'derp',\n platformNames: ['dogs', 'cats'],\n installSpec: 'derp',\n installType: 'npm',\n installPath: '/path/to/derp',\n appiumVersion: '2.0.0',\n };\n\n beforeEach(async function () {\n data = await manifest.read();\n });\n\n describe('when called again before the first call resolves', function () {\n it('should not write the file twice', async function () {\n await B.all([manifest.write(), manifest.write()]);\n MockAppiumSupport.fs.writeFile.calledOnce.should.be.true;\n });\n });\n\n describe('when the manifest file was successfully written to', function () {\n it('should return `true`', async function () {\n expect(await manifest.write()).to.be.true;\n });\n });\n\n describe('when the manifest file could not be written', function () {\n beforeEach(function () {\n MockAppiumSupport.fs.writeFile.rejects();\n data.drivers.foo = extData;\n });\n\n it('should reject', async function () {\n await expect(manifest.write()).to.be.rejectedWith(\n Error,\n /Appium could not write to manifest/i\n );\n });\n });\n\n describe('when the manifest directory could not be created', function () {\n beforeEach(function () {\n MockAppiumSupport.fs.mkdirp.rejects();\n });\n\n it('should reject', async function () {\n await expect(manifest.write()).to.be.rejectedWith(\n Error,\n /could not create the directory for the manifest file/i\n );\n });\n });\n });\n });\n\n describe('setExtension()', function () {\n /** @type {ExtManifest} */\n const extData = {\n automationName: 'derp',\n version: '1.0.0',\n mainClass: 'SomeClass',\n pkgName: 'derp',\n platformNames: ['dogs', 'cats'],\n installSpec: 'derp',\n installType: 'npm',\n installPath: '/path/to/derp',\n appiumVersion: '2.0.0',\n };\n\n it('should add a clone of the extension manifest to the internal data object', function () {\n manifest.setExtension(DRIVER_TYPE, 'foo', extData);\n expect(manifest.getExtensionData(DRIVER_TYPE).foo)\n .to.eql(extData)\n .and.not.to.equal(extData);\n });\n\n describe('when existing extension added', function () {\n /** @type {ExtManifest} */\n\n beforeEach(function () {\n manifest.setExtension(DRIVER_TYPE, 'foo', extData);\n });\n\n it('should rewrite', function () {\n const expected = {\n ...extData,\n automationName: 'BLAAHAH',\n };\n manifest.setExtension(DRIVER_TYPE, 'foo', expected);\n expect(manifest.getExtensionData(DRIVER_TYPE).foo).to.eql(expected);\n });\n });\n\n describe('when the extension has no peer dependency on `appium`', function () {\n beforeEach(function () {\n delete extData.appiumVersion;\n });\n\n it('should work anyway', function () {\n manifest.setExtension(DRIVER_TYPE, 'foo', extData);\n expect(manifest.getExtensionData(DRIVER_TYPE).foo).to.not.have.property('appiumVersion');\n });\n });\n });\n\n describe('getExtensionData()', function () {\n /** @type {ExtManifest} */\n const extData = {\n version: '1.0.0',\n automationName: 'Derp',\n mainClass: 'SomeClass',\n pkgName: 'derp',\n platformNames: ['dogs', 'cats'],\n installSpec: 'derp',\n installType: 'npm',\n installPath: '/path/to/derp',\n appiumVersion: '2.0.0',\n };\n\n beforeEach(function () {\n manifest.setExtension(DRIVER_TYPE, 'foo', extData);\n });\n\n it('should return all extension data for an extension type', function () {\n expect(manifest.getExtensionData(DRIVER_TYPE)).to.eql({foo: extData});\n });\n });\n describe('addExtensionFromPackage()', function () {\n describe('when provided a valid package.json for a driver and its path', function () {\n /** @type {ExtPackageJson} */\n let packageJson;\n\n beforeEach(function () {\n packageJson = {\n name: 'derp',\n version: '1.0.0',\n appium: {\n automationName: 'derp',\n mainClass: 'SomeClass',\n platformNames: ['dogs', 'cats'],\n driverName: 'myDriver',\n },\n peerDependencies: {\n appium: '2.0.0',\n },\n };\n });\n\n it('should add an extension to the internal data', function () {\n manifest.addExtensionFromPackage(packageJson, '/some/path/to/package.json');\n expect(manifest.getExtensionData(DRIVER_TYPE)).to.deep.equal({\n myDriver: {\n automationName: 'derp',\n mainClass: 'SomeClass',\n pkgName: 'derp',\n platformNames: ['dogs', 'cats'],\n version: '1.0.0',\n installType: 'npm',\n installSpec: 'derp@1.0.0',\n installPath: '/some/path/to',\n appiumVersion: '2.0.0',\n },\n });\n });\n\n it('should return `true`', function () {\n expect(manifest.addExtensionFromPackage(packageJson, '/some/path/to/package.json')).to.be\n .true;\n });\n\n describe('when the driver has already been registered', function () {\n beforeEach(function () {\n manifest.addExtensionFromPackage(packageJson, '/some/path/to/package.json');\n });\n\n it('should return `false`', function () {\n expect(manifest.addExtensionFromPackage(packageJson, '/some/path/to/package.json')).to\n .be.false;\n });\n });\n });\n\n describe('when provided a valid package.json for a plugin and its path', function () {\n /** @type {ExtPackageJson} */\n let packageJson;\n beforeEach(function () {\n packageJson = {\n name: 'derp',\n version: '1.0.0',\n appium: {\n mainClass: 'SomeClass',\n pluginName: 'myPlugin',\n },\n peerDependencies: {\n appium: '2.0.0',\n },\n };\n });\n\n it('should add an extension to the internal data', function () {\n manifest.addExtensionFromPackage(packageJson, '/some/path/to/package.json');\n expect(manifest.getExtensionData(PLUGIN_TYPE)).to.deep.equal({\n myPlugin: {\n mainClass: 'SomeClass',\n pkgName: 'derp',\n version: '1.0.0',\n installType: 'npm',\n installSpec: 'derp@1.0.0',\n installPath: '/some/path/to',\n appiumVersion: '2.0.0',\n },\n });\n });\n\n it('should return `true`', function () {\n expect(manifest.addExtensionFromPackage(packageJson, '/some/path/to/package.json')).to.be\n .true;\n });\n\n describe('when the plugin has already been registered', function () {\n beforeEach(function () {\n manifest.addExtensionFromPackage(packageJson, '/some/path/to/package.json');\n });\n\n it('should return `false`', function () {\n expect(manifest.addExtensionFromPackage(packageJson, '/some/path/to/package.json')).to\n .be.false;\n });\n });\n });\n\n describe('when provided a non-extension', function () {\n it('should throw', function () {\n expect(() =>\n manifest.addExtensionFromPackage(\n // @ts-expect-error\n {herp: 'derp'},\n '/some/path/to/package.json'\n )\n ).to.throw(/neither a valid driver nor a valid plugin/);\n });\n });\n\n describe('when the extension has an appium peer dependency beginning with `file:..`', function () {\n /** @type {ExtPackageJson} */\n let packageJson;\n\n beforeEach(function () {\n packageJson = {\n name: 'derp',\n version: '1.0.0',\n appium: {\n automationName: 'derp',\n mainClass: 'SomeClass',\n platformNames: ['dogs', 'cats'],\n driverName: 'myDriver',\n },\n peerDependencies: {\n appium: APPIUM_VER,\n },\n };\n });\n\n it('should set the appiumVersion to the current Appium version', function () {\n manifest.addExtensionFromPackage(packageJson, '/some/path/to/package.json');\n expect(manifest.getExtensionData(DRIVER_TYPE).myDriver.appiumVersion).to.equal(\n APPIUM_VER\n );\n });\n });\n });\n\n describe('syncWithInstalledExtensions()', function () {\n beforeEach(function () {\n MockAppiumSupport.fs.readFile.resolves(\n JSON.stringify({\n name: 'foo',\n version: '1.0.0',\n readme: 'stuff!',\n _id: 'totally unique',\n appium: {\n automationName: 'derp',\n mainClass: 'SomeClass',\n pkgName: 'derp',\n platformNames: ['dogs', 'cats'],\n driverName: 'myDriver',\n },\n peerDependencies: {\n appium: '2.0.0',\n },\n })\n );\n });\n\n it('should add a found extension', async function () {\n await manifest.syncWithInstalledExtensions();\n expect(manifest.getExtensionData(DRIVER_TYPE)).to.have.property('myDriver');\n });\n\n describe('when the underlying implementation emits \"error\"', function () {\n beforeEach(function () {\n // @ts-expect-error\n MockGlob.callsFake(() => {\n const ee = new EventEmitter();\n setTimeout(() => {\n ee.emit('error', new Error('bogus'));\n });\n return ee;\n });\n });\n it('should reject', function () {\n expect(manifest.syncWithInstalledExtensions()).to.be.rejectedWith(Error, 'bogus');\n });\n });\n\n describe('when the underlying implementation completes with an error', function () {\n beforeEach(function () {\n // @ts-expect-error\n MockGlob.callsFake((spec, opts, done) => {\n const ee = new EventEmitter();\n setTimeout(() => {\n done(new Error('wack'), []);\n });\n return ee;\n });\n });\n it('should reject', function () {\n expect(manifest.syncWithInstalledExtensions()).to.be.rejectedWith(Error, 'wack');\n });\n });\n });\n\n describe('hasDriver()', function () {\n describe('when the driver is registered', function () {\n beforeEach(function () {\n // @ts-expect-error\n manifest.setExtension(DRIVER_TYPE, 'foo', {});\n });\n\n it('should return `true`', function () {\n expect(manifest.hasDriver('foo')).to.be.true;\n });\n });\n\n describe('when the driver is not registered', function () {\n it('should return `false`', function () {\n expect(manifest.hasDriver('foo')).to.be.false;\n });\n });\n });\n\n describe('hasPlugin()', function () {\n describe('when the plugin is registered', function () {\n beforeEach(function () {\n // @ts-expect-error\n manifest.setExtension(PLUGIN_TYPE, 'foo', {});\n });\n\n it('should return `true`', function () {\n expect(manifest.hasPlugin('foo')).to.be.true;\n });\n });\n\n describe('when the plugin is not registered', function () {\n it('should return `false`', function () {\n expect(manifest.hasPlugin('foo')).to.be.false;\n });\n });\n });\n });\n});\n\n/**\n * @template T\n * @typedef {import('appium/types').ExtManifest} ExtManifest\n */\n\n/**\n * @template T\n * @typedef {import('appium/types').ExtPackageJson} ExtPackageJson\n */\n\n/**\n * @typedef {import('@appium/types').DriverType} DriverType\n * @typedef {import('@appium/types').PluginType} PluginType\n * @typedef {import('appium/types').ManifestData} ManifestData\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/extension/mocks.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n\n// @ts-check\n\n/**\n * A collection of mocks reused across unit tests.\n */\n\nimport {EventEmitter} from 'node:events';\nimport path from 'node:path';\nimport {createSandbox} from 'sinon';\nimport {version as APPIUM_VER} from '../../../package.json';\n\nexport function initMocks(sandbox = createSandbox()) {\n /**\n * Mocks for package `@appium/support`\n * @type {MockAppiumSupport}\n */\n const MockAppiumSupport = {\n fs: {\n readFile: /** @type {MockAppiumSupportFs['readFile']} */ (sandbox.stub().resolves('{}')),\n writeFile: /** @type {MockAppiumSupportFs['writeFile']} */ (sandbox.stub().resolves(true)),\n walk: /** @type {MockAppiumSupportFs['walk']} */ (\n sandbox.stub().returns({\n [Symbol.asyncIterator]: sandbox\n .stub()\n .returns({next: sandbox.stub().resolves({done: true})}),\n })\n ),\n glob: /** @type {MockAppiumSupportFs['glob']} */ (sandbox.stub().resolves([])),\n mkdirp: /** @type {MockAppiumSupportFs['mkdirp']} */ (sandbox.stub().resolves()),\n readPackageJsonFrom: /** @type {MockAppiumSupportFs['readPackageJsonFrom']} */ (\n sandbox.stub().returns({version: APPIUM_VER, engines: {node: '>=12'}})\n ),\n findRoot: /** @type {MockAppiumSupportFs['findRoot']} */ (\n sandbox.stub().returns(path.join(__dirname, '..', '..', '..'))\n ),\n exists: /** @type {MockAppiumSupportFs['exists']} */ (sandbox.stub().resolves(true)),\n },\n env: {\n resolveAppiumHome: /** @type {MockAppiumSupportEnv['resolveAppiumHome']} */ (\n sandbox.stub().resolves('/some/path')\n ),\n resolveManifestPath: /** @type {MockAppiumSupportEnv['resolveManifestPath']} */ (\n sandbox.stub().resolves('/some/path/extensions.yaml')\n ),\n hasAppiumDependency: /** @type {MockAppiumSupportEnv['hasAppiumDependency']} */ (\n sandbox.stub().resolves(false)\n ),\n readPackageInDir: /** @type {MockAppiumSupportEnv['readPackageInDir']} */ (\n sandbox.stub().callsFake(async () => MockAppiumSupport.env.__pkg)\n ),\n __pkg: {\n name: 'mock-package',\n version: '1.0.0',\n readme: '# Mock Package!!',\n _id: 'mock-package',\n },\n },\n logger: {\n getLogger: /** @type {MockAppiumSupportLogger['getLogger']} */ (\n sandbox.stub().callsFake(() => MockAppiumSupport.logger.__logger)\n ),\n __logger: sandbox.stub(new global.console.Console(process.stdout, process.stderr)),\n },\n system: {\n isWindows: /** @type {MockAppiumSupportSystem['isWindows']} */ (\n sandbox.stub().returns(false)\n ),\n },\n npm: {\n getLatestVersion: /** @type {MockAppiumSupportNpm['getLatestVersion']} */ (\n sandbox.stub().resolves('2.0.0')\n ),\n getLatestSafeUpgradeVersion:\n /** @type {MockAppiumSupportNpm['getLatestSafeUpgradeVersion']} */ (\n sandbox.stub().resolves('1.1.0')\n ),\n },\n util: {\n compareVersions: /** @type {MockAppiumSupportUtil['compareVersions']} */ (\n sandbox.stub().returns(true)\n ),\n pluralize: require('pluralize'),\n },\n console: {\n CliConsole: /** @type {MockAppiumSupportConsole['CliConsole']} */ (\n sandbox\n .stub()\n .returns(sandbox.createStubInstance(require('@appium/support').console.CliConsole))\n ),\n },\n };\n\n /**\n * Mocks for package `package-changed`\n * @type {MockPackageChanged}\n */\n const MockPackageChanged = {\n isPackageChanged: /** @type {MockPackageChanged['isPackageChanged']} */ (\n sandbox.stub().callsFake(async () => ({\n isChanged: true,\n writeHash: MockPackageChanged.__writeHash,\n hash: 'some-hash',\n oldHash: 'some-old-hash',\n }))\n ),\n // exposing this for testing purposes\n __writeHash: sandbox.stub(),\n };\n\n const MockResolveFrom = /** @type {MockResolveFrom} */ (\n sandbox.stub().callsFake((cwd, id) => path.join(cwd, id))\n );\n\n const MockGlob = /** @type {MockGlob} */ (\n sandbox.stub().callsFake((spec, opts, done) => {\n const ee = new EventEmitter();\n setTimeout(() => {\n ee.emit('match', path.join(opts.cwd, 'package.json'));\n setTimeout(() => {\n done();\n });\n });\n return ee;\n })\n );\n\n /** @type {Overrides} */\n const overrides = {\n '@appium/support': MockAppiumSupport,\n 'resolve-from': MockResolveFrom,\n 'package-changed': MockPackageChanged,\n glob: MockGlob,\n };\n\n return {\n MockAppiumSupport,\n MockPackageChanged,\n MockResolveFrom,\n MockGlob,\n sandbox,\n overrides,\n };\n}\n\n/**\n * Mock of package `@appium/support`\n * @typedef MockAppiumSupport\n * @property {MockAppiumSupportLogger} logger\n * @property {MockAppiumSupportFs} fs\n * @property {MockAppiumSupportEnv} env\n * @property {MockAppiumSupportSystem} system\n * @property {MockAppiumSupportNpm} npm\n * @property {MockAppiumSupportUtil} util\n * @property {MockAppiumSupportConsole} console\n */\n\n/**\n * Mock of package `@appium/support`'s `logger` module\n * @typedef MockAppiumSupportLogger\n * @property {SinonStub<[string?], Console>} getLogger\n * @property {SinonStubbedInstance} __logger\n */\n\n/**\n * Mock of package `@appium/support`'s `fs` module\n * @typedef MockAppiumSupportFs\n * @property {SinonStubbedMember} readFile\n * @property {SinonStubbedMember} writeFile\n * @property {SinonStubbedMember} walk\n * @property {SinonStubbedMember} glob\n * @property {SinonStubbedMember} mkdirp\n * @property {SinonStubbedMember} readPackageJsonFrom\n * @property {SinonStubbedMember} findRoot\n * @property {SinonStubbedMember} exists\n */\n\n/**\n * Mock of package `@appium/support`'s `env` module.\n * @typedef MockAppiumSupportEnv\n * @property {SinonStubbedMember} resolveAppiumHome\n * @property {SinonStubbedMember} resolveManifestPath\n * @property {SinonStubbedMember} readPackageInDir\n * @property {SinonStubbedMember} hasAppiumDependency\n * @property {import('@appium/support/lib/env').NormalizedPackageJson} __pkg\n */\n\n/**\n * @typedef MockAppiumSupportSystem\n * @property {SinonStubbedMember} isWindows\n */\n\n/**\n * @typedef MockAppiumSupportNpm\n * @property {SinonStubbedMember} getLatestVersion\n * @property {SinonStubbedMember} getLatestSafeUpgradeVersion\n */\n\n/**\n * @typedef MockAppiumSupportUtil\n * @property {SinonStubbedMember} compareVersions\n * @property {import('pluralize')} pluralize\n */\n\n/**\n * Mock of package `package-changed`\n * @typedef MockPackageChanged\n * @property {SinonStubbedMember} isPackageChanged\n * @property {SinonStub} __writeHash\n */\n\n/**\n * Mock of package `resolve-from`\n * @typedef {SinonStubbedMember} MockResolveFrom\n */\n\n/**\n * Mock of package `glob`\n * @typedef {SinonStubbedMember} MockGlob\n */\n\n/**\n * For passing into `rewiremock.proxy()`\n * @typedef { { '@appium/support': MockAppiumSupport, 'resolve-from': MockResolveFrom, 'package-changed': MockPackageChanged, glob: MockGlob } } Overrides\n */\n\n/**\n * @typedef MockAppiumSupportConsole\n * @property {SinonStubbedMember>} CliConsole\n */\n\n/**\n * @template T\n * @typedef {import('sinon').SinonStubbedInstance} SinonStubbedInstance\n */\n\n/**\n * @template T,U\n * @typedef {import('sinon').SinonStub} SinonStub\n */\n\n/**\n * @template T\n * @typedef {import('sinon').SinonStubbedMember} SinonStubbedMember\n */\n\n/**\n * @typedef {import('@appium/support').fs} SupportFs\n * @typedef {import('@appium/support').env} SupportEnv\n * @typedef {import('@appium/support').npm} SupportNpm\n * @typedef {import('@appium/support').system} SupportSystem\n * @typedef {import('@appium/support').util} SupportUtil\n * @typedef {import('@appium/support').console} SupportConsole\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/extension/package-changed.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\nimport path from 'node:path';\nimport {PKG_HASHFILE_RELATIVE_PATH} from '../../../lib/constants';\nimport {rewiremock} from '../../helpers';\nimport {initMocks} from './mocks';\n\ndescribe('package-changed', function () {\n /** @type {typeof import('appium/lib/extension/package-changed').packageDidChange} */\n let packageDidChange;\n\n /** @type {sinon.SinonSandbox} */\n let sandbox;\n\n /** @type {import('./mocks').MockPackageChanged} */\n let MockPackageChanged;\n\n /** @type {import('./mocks').MockAppiumSupport} */\n let MockAppiumSupport;\n\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n });\n\n beforeEach(function () {\n ({MockPackageChanged, MockAppiumSupport, sandbox} = initMocks());\n ({packageDidChange} = rewiremock.proxy(\n () => require('../../../lib/extension/package-changed'),\n {\n 'package-changed': MockPackageChanged,\n '@appium/support': MockAppiumSupport,\n }\n ));\n });\n\n afterEach(function () {\n sandbox.restore();\n });\n\n describe('packageDidChange()', function () {\n describe('when called without an `appiumHome`', function () {\n it('should reject', async function () {\n // @ts-expect-error\n await expect(packageDidChange()).to.be.rejectedWith(\n TypeError // from passing `undefined` to `path.join()`\n );\n });\n });\n\n it('it should attempt to create the parent dir for the hash file', async function () {\n await packageDidChange('/some/path');\n MockAppiumSupport.fs.mkdirp.calledWith(\n path.dirname(path.join('/some/path', PKG_HASHFILE_RELATIVE_PATH))\n ).should.be.true;\n });\n\n it('should call `package-changed` with a cwd and relative path to hash file', async function () {\n await packageDidChange('/some/path');\n MockPackageChanged.isPackageChanged.calledWith({\n cwd: '/some/path',\n hashFilename: PKG_HASHFILE_RELATIVE_PATH,\n }).should.be.true;\n });\n\n describe('when it cannot create the parent dir', function () {\n it('should reject', async function () {\n MockAppiumSupport.fs.mkdirp.rejects(new Error('some error'));\n await expect(packageDidChange('/some/path')).to.be.rejectedWith(\n Error,\n /could not create the directory/i\n );\n });\n });\n\n describe('when the package has not changed per `package-changed`', function () {\n beforeEach(function () {\n MockPackageChanged.isPackageChanged.resolves({\n isChanged: false,\n writeHash: MockPackageChanged.__writeHash,\n hash: 'some-hash',\n oldHash: 'some-old-hash',\n });\n });\n\n it('should resolve `false`', async function () {\n expect(await packageDidChange('/disneyland')).to.be.false;\n });\n\n it('should not write the hash file', async function () {\n await packageDidChange('/some/where');\n MockPackageChanged.__writeHash.called.should.be.false;\n });\n });\n\n describe('when the package has changed per `package-changed`', function () {\n it('should write the hash file', async function () {\n await packageDidChange('/some/where');\n MockPackageChanged.__writeHash.calledOnce.should.be.true;\n });\n\n it('should resolve `true`', async function () {\n expect(await packageDidChange('/somewhere/else')).to.be.true;\n });\n\n describe('when it cannot write the hash file', function () {\n beforeEach(function () {\n MockPackageChanged.__writeHash.throws(new Error('oh noes'));\n });\n it('should reject', async function () {\n await expect(packageDidChange('/some/where')).to.be.rejectedWith(\n Error,\n /could not write hash file/i\n );\n });\n });\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/extension/plugin-config.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport {promises as fs} from 'node:fs';\nimport {Manifest} from '../../../lib/extension/manifest';\nimport {resetSchema} from '../../../lib/schema';\nimport {resolveFixture, rewiremock} from '../../helpers';\nimport {initMocks} from './mocks';\n\ndescribe('PluginConfig', function () {\n /** @type {string} */\n let yamlFixture;\n\n /**\n * @type {Manifest}\n */\n let manifest;\n\n /** @type {sinon.SinonSandbox} */\n let sandbox;\n\n /** @type {import('./mocks').MockAppiumSupport} */\n let MockAppiumSupport;\n\n /** @type {import('./mocks').MockResolveFrom} */\n let MockResolveFrom;\n\n /**\n * @type {typeof import('appium/lib/extension/plugin-config').PluginConfig}\n */\n let PluginConfig;\n\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n\n yamlFixture = await fs.readFile(resolveFixture('manifest', 'v3.yaml'), 'utf8');\n });\n\n beforeEach(function () {\n /** @type {import('./mocks').Overrides} */\n let overrides;\n manifest = Manifest.getInstance('/somewhere/');\n ({MockAppiumSupport, MockResolveFrom, sandbox, overrides} = initMocks());\n MockAppiumSupport.fs.readFile.resolves(yamlFixture);\n ({PluginConfig} = rewiremock.proxy(\n () => require('../../../lib/extension/plugin-config'),\n overrides\n ));\n resetSchema();\n });\n\n afterEach(function () {\n sandbox.restore();\n });\n\n describe('class method', function () {\n describe('create()', function () {\n describe('when the PluginConfig is not yet associated with a Manifest', function () {\n it('should return a new PluginConfig', function () {\n const config = PluginConfig.create(manifest);\n expect(config).to.be.an.instanceof(PluginConfig);\n });\n\n it('should be associated with the Manifest', function () {\n const config = PluginConfig.create(manifest);\n expect(config.manifest).to.equal(manifest);\n });\n });\n\n describe('when the PluginConfig is associated with a Manifest', function () {\n beforeEach(function () {\n PluginConfig.create(manifest);\n });\n\n it('should throw', function () {\n expect(() => PluginConfig.create(manifest)).to.throw(\n Error,\n new RegExp(\n `Manifest with APPIUM_HOME ${manifest.appiumHome} already has a PluginConfig`,\n 'i'\n )\n );\n });\n });\n });\n\n describe('getInstance()', function () {\n describe('when the Manifest is not yet associated with a PluginConfig', function () {\n it('should return undefined', function () {\n expect(PluginConfig.getInstance(manifest)).to.be.undefined;\n });\n });\n\n describe('when the Manifest is associated with a PluginConfig', function () {\n /** @type {PluginConfig} */\n let driverConfig;\n\n beforeEach(function () {\n driverConfig = PluginConfig.create(manifest);\n });\n\n it('should return the associated PluginConfig instance', function () {\n expect(PluginConfig.getInstance(manifest)).to.equal(driverConfig);\n });\n });\n });\n });\n\n describe('instance method', function () {\n describe('extensionDesc()', function () {\n it('should return the description of the extension', function () {\n expect(\n PluginConfig.create(manifest).extensionDesc('foo', {\n version: '1.0',\n mainClass: 'Barrggh',\n pkgName: 'herrbbbff',\n installType: 'npm',\n installSpec: 'herrbbbff',\n })\n ).to.equal(`foo@1.0`);\n });\n });\n\n describe('getConfigProblems()', function () {\n /**\n * @type {PluginConfig}\n */\n let pluginConfig;\n\n beforeEach(function () {\n pluginConfig = PluginConfig.create(manifest);\n });\n\n describe('when provided no arguments', function () {\n it('should not throw', function () {\n // @ts-expect-error\n expect(() => pluginConfig.getConfigProblems()).not.to.throw();\n });\n });\n });\n\n describe('getSchemaProblems()', function () {\n /**\n * @type {PluginConfig}\n */\n let pluginConfig;\n\n beforeEach(function () {\n pluginConfig = PluginConfig.create(manifest);\n });\n\n describe('when provided an object with a defined `schema` property of unsupported type', function () {\n it('should return an array having an associated problem', function () {\n expect(\n pluginConfig.getSchemaProblems(\n // @ts-expect-error\n {\n schema: [],\n mainClass: 'Asdsh',\n pkgName: 'yodel',\n version: '-1',\n },\n 'foo'\n )\n ).to.deep.include({\n err: 'Incorrectly formatted schema field; must be a path to a schema file or a schema object.',\n val: [],\n });\n });\n });\n\n describe('when provided a string `schema` property', function () {\n describe('when the property ends in an unsupported extension', function () {\n it('should return an array having an associated problem', function () {\n expect(\n pluginConfig.getSchemaProblems(\n {\n schema: 'selenium.java',\n mainClass: 'Asdsh',\n pkgName: 'yodel',\n version: '-1',\n installType: 'npm',\n installSpec: 'yodel',\n },\n 'foo'\n )\n ).to.deep.include({\n err: 'Schema file has unsupported extension. Allowed: .json, .js, .cjs',\n val: 'selenium.java',\n });\n });\n });\n\n describe('when the property contains a supported extension', function () {\n describe('when the property as a path cannot be found', function () {\n it('should return an array having an associated problem', function () {\n expect(\n pluginConfig.getSchemaProblems(\n // @ts-expect-error\n {\n pkgName: 'doop',\n schema: 'herp.json',\n mainClass: 'Yankovic',\n version: '1.0.0',\n },\n 'foo'\n )\n )\n .with.nested.property('[0].err')\n .to.match(/Unable to register schema at path herp\\.json/i);\n });\n });\n\n describe('when the property as a path is found', function () {\n beforeEach(function () {\n MockResolveFrom.returns(resolveFixture('plugin-schema'));\n });\n\n it('should return an empty array', function () {\n expect(\n pluginConfig.getSchemaProblems(\n // @ts-expect-error\n {\n pkgName: '../fixtures',\n schema: 'plugin-schema.js',\n mainClass: 'Yankovic',\n version: '1.0.0',\n },\n 'foo'\n )\n ).to.be.empty;\n });\n });\n });\n });\n\n describe('when provided an object `schema` property', function () {\n /** @type {ExtManifestWithSchema} */\n let externalManifest;\n\n describe('when the object is a valid schema', function () {\n beforeEach(function () {\n externalManifest = {\n pkgName: 'foo',\n version: '1.0.0',\n installSpec: 'foo',\n installType: 'npm',\n mainClass: 'Barrggh',\n schema: {type: 'object', properties: {foo: {type: 'string'}}},\n };\n });\n\n it('should return an empty array', function () {\n expect(pluginConfig.getSchemaProblems(externalManifest, 'foo')).to.be.empty;\n });\n });\n\n describe('when the object is an invalid schema', function () {\n beforeEach(function () {\n externalManifest = {\n pkgName: 'foo',\n version: '1.0.0',\n installSpec: 'foo',\n installType: 'npm',\n mainClass: 'Barrggh',\n schema: {\n type: 'object',\n properties: {foo: {type: 'string'}},\n // @ts-expect-error\n $async: true, // this is not allowed\n },\n };\n });\n\n it('should return an array having an associated problem', function () {\n expect(pluginConfig.getSchemaProblems(externalManifest, 'foo'))\n .with.nested.property('[0].err')\n .to.match(/Unsupported schema/i);\n });\n });\n });\n });\n\n describe('readExtensionSchema()', function () {\n /**\n * @type {PluginConfig}\n */\n let pluginConfig;\n\n /** @type {ExtManifestWithSchema} */\n let extData;\n\n const extName = 'stuff';\n\n beforeEach(function () {\n extData = {\n pkgName: 'some-pkg',\n schema: 'plugin-schema.js',\n mainClass: 'SomeClass',\n version: '0.0.0',\n installType: 'npm',\n installSpec: 'some-pkg',\n };\n MockResolveFrom.returns(resolveFixture('plugin-schema.js'));\n pluginConfig = PluginConfig.create(manifest);\n });\n\n describe('when the extension data is missing `schema`', function () {\n it('should throw', function () {\n // @ts-expect-error\n delete extData.schema;\n expect(() => pluginConfig.readExtensionSchema(extName, extData)).to.throw(\n TypeError,\n /why is this function being called/i\n );\n });\n });\n\n describe('when the extension schema has already been registered', function () {\n describe('when the schema is identical (presumably the same extension)', function () {\n it('should not throw', function () {\n pluginConfig.readExtensionSchema(extName, extData);\n expect(() => pluginConfig.readExtensionSchema(extName, extData)).not.to.throw();\n });\n });\n\n describe('when the schema differs (presumably a different extension)', function () {\n it('should throw', function () {\n pluginConfig.readExtensionSchema(extName, extData);\n MockResolveFrom.returns(resolveFixture('driver-schema.js'));\n expect(() => pluginConfig.readExtensionSchema(extName, extData)).to.throw(\n /conflicts with an existing schema/i\n );\n });\n });\n });\n\n describe('when the extension schema has not yet been registered', function () {\n it('should resolve and load the extension schema file', function () {\n pluginConfig.readExtensionSchema(extName, extData);\n MockResolveFrom.calledOnce.should.be.true;\n });\n });\n });\n });\n});\n\n/**\n * @typedef {import('@appium/types').PluginType} PluginType\n * @typedef {import('appium/lib/extension/plugin-config').PluginConfig} PluginConfig\n * @typedef {import('@appium/types').ExtensionType} ExtensionType\n */\n\n/**\n * @template {ExtensionType} ExtType\n * @typedef {import('appium/types').ExtManifest & {schema: NonNullable['schema']>}} ExtManifestWithSchema\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/schema/arg-spec.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport {DRIVER_TYPE} from '../../../lib/constants';\nimport {ArgSpec} from '../../../lib/schema/arg-spec';\n\ndescribe('ArgSpec', function () {\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n chai.should();\n expect = chai.expect;\n });\n\n describe('class method', function () {\n describe('create()', function () {\n it('should return a new ArgSpec', function () {\n expect(ArgSpec.create('foo')).to.be.an.instanceof(ArgSpec);\n });\n });\n\n describe('toSchemaRef()', function () {\n describe('when provided no extension information', function () {\n it('should return a schema ID for a specific argument', function () {\n expect(ArgSpec.toSchemaRef('foo')).to.equal(\n 'appium.json#/properties/server/properties/foo'\n );\n });\n });\n\n describe('when provided extension information', function () {\n it('should return a schema ID for a specific argument within an extension schema', function () {\n expect(ArgSpec.toSchemaRef('bar', DRIVER_TYPE, 'stuff')).to.equal(\n 'driver-stuff.json#/properties/bar'\n );\n });\n });\n });\n\n describe('toSchemaBaseRef()', function () {\n describe('when provided no extension information', function () {\n it('should return the base schema ID', function () {\n expect(ArgSpec.toSchemaBaseRef()).to.equal('appium.json');\n });\n });\n\n describe('when provided extension information', function () {\n it('should return a schema ID for an extension', function () {\n expect(ArgSpec.toSchemaBaseRef(DRIVER_TYPE, 'stuff')).to.equal('driver-stuff.json');\n });\n });\n });\n\n describe('toArg()', function () {\n describe('when provided no extension information', function () {\n it('should return a bare arg name', function () {\n expect(ArgSpec.toArg('foo')).to.equal('foo');\n });\n });\n\n describe('when provided extension information', function () {\n it('should return an extension-specific arg name', function () {\n expect(ArgSpec.toArg('no-oats', DRIVER_TYPE, 'bad-donkey')).to.equal(\n 'driver-bad-donkey-no-oats'\n );\n });\n });\n });\n\n describe('extensionInfoFromRootSchemaId()', function () {\n describe('when provided the base schema ID', function () {\n it('should return an empty object', function () {\n expect(ArgSpec.extensionInfoFromRootSchemaId('appium.json')).to.be.empty;\n });\n });\n\n describe('when provided the schema ID of an extension schema', function () {\n it('should return an proper object', function () {\n expect(ArgSpec.extensionInfoFromRootSchemaId('driver-stuff.json')).to.eql({\n extType: DRIVER_TYPE,\n normalizedExtName: 'stuff',\n });\n });\n });\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/schema/cli-args.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport _ from 'lodash';\nimport {PLUGIN_TYPE} from '../../../lib/constants';\nimport {finalizeSchema, registerSchema, resetSchema} from '../../../lib/schema';\nimport {toParserArgs} from '../../../lib/schema/cli-args';\n\ndescribe('cli-args', function () {\n let expect;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n });\n\n describe('toParserArgs()', function () {\n /**\n *\n * @param {*} opts\n * @returns\n */\n function getArgs(opts = {}) {\n let {extName, extType, schema} = opts;\n if (schema && extName && extType) {\n registerSchema(extType, extName, schema);\n }\n finalizeSchema();\n return _.fromPairs([...toParserArgs()]);\n }\n\n beforeEach(resetSchema);\n\n afterEach(resetSchema);\n\n describe('schema contents', function () {\n const extName = 'blob';\n const extType = PLUGIN_TYPE;\n\n describe('type', function () {\n let result;\n\n describe('boolean', function () {\n beforeEach(function () {\n const schema = {\n properties: {foo: {type: 'boolean'}},\n type: 'object',\n };\n result = getArgs({schema, extName, extType});\n });\n\n it('should return options containing `action` prop of `store_const` and no `type`', function () {\n expect(result['--plugin-blob-foo']).to.have.property('action', 'store_const');\n });\n\n it('should not contain a `metavar` property', function () {\n expect(result['--plugin-blob-foo']).not.to.have.property('metavar');\n });\n });\n\n describe('object', function () {\n beforeEach(function () {\n const schema = {\n properties: {foo: {type: 'object'}},\n type: 'object',\n };\n result = getArgs({schema, extName, extType});\n });\n\n it('should use the `json` transformer', function () {\n expect(result['--plugin-blob-foo']).to.have.property('type');\n });\n\n it('should contain a SCREAMING_SNAKE_CASE `metavar` prop', function () {\n expect(result['--plugin-blob-foo']).to.have.property('metavar', 'FOO');\n });\n });\n\n describe('array', function () {\n beforeEach(function () {\n const schema = {properties: {foo: {type: 'array'}}, type: 'object'};\n result = getArgs({schema, extName, extType});\n });\n\n it('should use the `csv` transformer', function () {\n expect(result['--plugin-blob-foo']).to.have.property('type');\n });\n\n it('should contain a SCREAMING_SNAKE_CASE `metavar` prop', function () {\n expect(result['--plugin-blob-foo']).to.have.property('metavar', 'FOO');\n });\n });\n\n describe('number', function () {\n beforeEach(function () {\n const schema = {\n properties: {foo: {type: 'number'}},\n type: 'object',\n };\n result = getArgs({schema, extName, extType});\n });\n\n it('should parse the value as a float', function () {\n expect(result['--plugin-blob-foo'].type('10.5')).to.equal(10.5);\n });\n\n it('should contain a SCREAMING_SNAKE_CASE `metavar` prop', function () {\n expect(result['--plugin-blob-foo']).to.have.property('metavar', 'FOO');\n });\n });\n\n describe('integer', function () {\n beforeEach(function () {\n const schema = {\n properties: {foo: {type: 'integer'}},\n type: 'object',\n };\n result = getArgs({schema, extName, extType});\n });\n\n it('should parse the value as an integer', function () {\n expect(result['--plugin-blob-foo'].type('10.5')).to.equal(10);\n });\n\n it('should contain a SCREAMING_SNAKE_CASE `metavar` prop', function () {\n expect(result['--plugin-blob-foo']).to.have.property('metavar', 'FOO');\n });\n });\n\n describe('string', function () {\n beforeEach(function () {\n const schema = {\n properties: {foo: {type: 'string'}},\n type: 'object',\n };\n result = getArgs({schema, extName, extType});\n });\n\n it('should parse the value as an integer', function () {\n expect(result['--plugin-blob-foo'].type('10.5')).to.equal('10.5');\n });\n\n it('should contain a SCREAMING_SNAKE_CASE `metavar` prop', function () {\n expect(result['--plugin-blob-foo']).to.have.property('metavar', 'FOO');\n });\n });\n\n describe('null', function () {\n it('should throw', function () {\n const schema = {properties: {foo: {type: 'null'}}, type: 'object'};\n expect(() => getArgs({extType, extName, schema})).to.throw(\n TypeError,\n /unknown or disallowed/\n );\n });\n });\n\n describe('(unknown)', function () {\n it('should throw', function () {\n const schema = {\n properties: {foo: {type: 'donkey'}},\n type: 'object',\n };\n expect(() => getArgs({extType, extName, schema})).to.throw(Error, /schema is invalid/);\n });\n });\n });\n\n describe('appiumCliAliases', function () {\n let result;\n\n it('should not allow short aliases for extensions', function () {\n const schema = {\n properties: {\n foo: {type: 'string', appiumCliAliases: ['fooooo', 'F']},\n },\n type: 'object',\n };\n result = getArgs({schema, extName, extType});\n expect(result).to.have.property('--plugin-blob-foo,--plugin-blob-fooooo,--plugin-blob-F');\n });\n });\n\n describe('appiumCliDescription', function () {\n let result;\n\n it('should be preferred over `description`', function () {\n const schema = {\n properties: {\n foo: {\n type: 'string',\n appiumCliDescription: 'foo',\n description: 'bar',\n },\n },\n type: 'object',\n };\n result = getArgs({schema, extName, extType});\n expect(result['--plugin-blob-foo']).to.have.property('help', 'foo');\n });\n });\n\n describe('appiumCliTransformer', function () {\n let result;\n\n it('should use the transformer', function () {\n const schema = {\n properties: {foo: {type: 'string', appiumCliTransformer: 'json'}},\n type: 'object',\n };\n result = getArgs({schema, extName, extType});\n expect(result['--plugin-blob-foo'].type('{\"herp\": \"derp\"}')).to.eql({\n herp: 'derp',\n });\n });\n\n it('should error if the value is not valid for the transformer', function () {\n const schema = {\n properties: {foo: {type: 'object'}},\n type: 'object',\n };\n result = getArgs({schema, extName, extType});\n expect(() => result['--plugin-blob-foo'].type('123')).to.throw(/must be a plain object/i);\n });\n\n // this is unlikely to happen, but I want to establish the behavior as defined.\n describe('when used with `enum`', function () {\n describe('and enum members are invalid as per the transformer', function () {\n describe('when provided an enum member', function () {\n it('should throw', function () {\n const schema = {\n properties: {\n foo: {\n type: 'string',\n appiumCliTransformer: 'json',\n enum: ['herp', 'derp'],\n },\n },\n type: 'object',\n };\n result = getArgs({schema, extName, extType});\n expect(() => result['--plugin-blob-foo'].type('herp')).to.throw(\n /must be a valid json/i\n );\n });\n });\n });\n\n describe('and enum members are valid as per the transformer', function () {\n describe('when provided an enum member', function () {\n it('should return a transformed value', function () {\n const schema = {\n properties: {\n foo: {\n type: 'string',\n appiumCliTransformer: 'json',\n enum: ['{\"herp\": \"derp\"}', '{\"derp\": \"herp\"}'],\n },\n },\n type: 'object',\n };\n result = getArgs({schema, extName, extType});\n expect(result['--plugin-blob-foo'].type('{\"herp\": \"derp\"}')).to.eql({herp: 'derp'});\n });\n });\n\n describe('when not provided an enum member', function () {\n it('should throw', function () {\n const schema = {\n properties: {\n foo: {\n type: 'string',\n appiumCliTransformer: 'json',\n enum: ['{\"herp\": \"derp\"}', '{\"derp\": \"herp\"}'],\n },\n },\n type: 'object',\n };\n result = getArgs({schema, extName, extType});\n expect(() => result['--plugin-blob-foo'].type('{\"georgy\": \"porgy\"}')).to.throw(\n /one of the allowed values/i\n );\n });\n });\n });\n });\n });\n\n describe('enum', function () {\n describe('when used with a non-`string` type', function () {\n it('should throw', function () {\n const schema = {\n properties: {\n foo: {\n type: 'number',\n enum: ['herp', 'derp'],\n },\n },\n type: 'object',\n };\n expect(() => getArgs({schema, extName, extType})).to.throw(\n TypeError,\n /`enum` is only supported for `type: 'string'`/i\n );\n });\n });\n\n describe('when used with a `string` type', function () {\n it('should set `choices` prop', function () {\n const schema = {\n properties: {\n foo: {\n type: 'string',\n enum: ['herp', 'derp'],\n },\n },\n type: 'object',\n };\n const result = getArgs({schema, extName, extType});\n expect(result['--plugin-blob-foo']).to.have.deep.property('choices', ['herp', 'derp']);\n });\n });\n });\n });\n });\n});\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/test/unit/schema/schema.spec.js\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n// @ts-check\n\nimport _ from 'lodash';\nimport {createSandbox} from 'sinon';\nimport {DRIVER_TYPE, PLUGIN_TYPE} from '../../../lib/constants';\nimport {AppiumConfigJsonSchema} from '@appium/schema';\nimport {APPIUM_CONFIG_SCHEMA_ID} from '../../../lib/schema/arg-spec';\nimport defaultArgsFixture from '../../fixtures/default-args';\nimport DRIVER_SCHEMA_FIXTURE from '../../fixtures/driver-schema';\nimport flattenedSchemaFixture from '../../fixtures/flattened-schema';\nimport {rewiremock} from '../../helpers';\n\ndescribe('schema', function () {\n /** @type {sinon.SinonSandbox} */\n let sandbox;\n\n let expect;\n\n /**\n * @type {import('@appium/types').Class}\n */\n let SchemaFinalizationError;\n\n /**\n * @type {import('@appium/types').Class}\n */\n let SchemaUnknownSchemaError;\n\n /**\n * @type {import('@appium/types').Class}\n */\n let SchemaUnsupportedSchemaError;\n\n /**\n * @type {import('appium/lib/schema/schema').resetSchema}\n */\n let resetSchema;\n\n /**\n * @type {import('appium/lib/schema/schema').registerSchema}\n */\n let registerSchema;\n\n /**\n * @type {import('appium/lib/schema/schema').getSchema}\n */\n let getSchema;\n\n /**\n * @type {import('appium/lib/schema/schema').finalizeSchema}\n */\n let finalizeSchema;\n\n /**\n * @type {import('appium/lib/schema/schema').getDefaultsForSchema}\n */\n let getDefaultsForSchema;\n\n /**\n * @type {import('appium/lib/schema/schema').flattenSchema}\n */\n let flattenSchema;\n\n /**\n * @type {import('appium/lib/schema/schema').isFinalized}\n */\n let isFinalized;\n\n /**\n * @type {import('appium/lib/schema/schema').validate}\n */\n let validate;\n\n let mocks;\n\n /**\n * @type {import('@appium/types').Class}\n */\n let RoachHotelMap;\n\n before(async function () {\n const chai = await import('chai');\n const chaiAsPromised = await import('chai-as-promised');\n chai.use(chaiAsPromised.default);\n chai.should();\n expect = chai.expect;\n });\n\n beforeEach(function () {\n sandbox = createSandbox();\n\n mocks = {\n 'resolve-from': sandbox.stub(),\n '@sidvind/better-ajv-errors': sandbox.stub(),\n };\n\n ({\n SchemaFinalizationError,\n SchemaUnknownSchemaError,\n SchemaUnsupportedSchemaError,\n RoachHotelMap,\n resetSchema,\n registerSchema,\n registerSchema,\n getSchema,\n isFinalized,\n finalizeSchema,\n getDefaultsForSchema,\n flattenSchema,\n validate,\n } = rewiremock.proxy(() => require('../../../lib/schema/schema'), mocks));\n resetSchema();\n });\n\n afterEach(function () {\n sandbox.restore();\n });\n\n describe('registerSchema()', function () {\n describe('error conditions', function () {\n describe('when provided no parameters', function () {\n it('should throw a TypeError', function () {\n expect(() => {\n // @ts-expect-error\n registerSchema();\n }).to.throw(TypeError, /expected extension type/i);\n });\n });\n\n describe('when provided `type` and `name`, but not `schema`', function () {\n it('should throw a TypeError', function () {\n expect(() =>\n // @ts-expect-error\n registerSchema(DRIVER_TYPE, 'whoopeee')\n ).to.throw(TypeError, /expected extension type/i);\n });\n });\n\n describe('when provided `type` and nonempty `schema`, but no `name`', function () {\n it('should throw a TypeError', function () {\n expect(() =>\n // @ts-expect-error\n registerSchema(DRIVER_TYPE, undefined, {\n title: 'whoopeee',\n })\n ).to.throw(TypeError, /expected extension type/i);\n });\n });\n\n describe('when the schema is of an unsupported type', function () {\n describe('when schema is a object but not a plain object', function () {\n it('should throw', function () {\n expect(() => {\n // @ts-expect-error\n registerSchema(DRIVER_TYPE, 'whoopeee', [45]);\n }).to.throw(SchemaUnsupportedSchemaError, /must be a plain object/i);\n });\n });\n\n describe('when the schema is async', function () {\n it('should throw', function () {\n expect(() => {\n // @ts-expect-error\n registerSchema(DRIVER_TYPE, 'whoopee', {$async: true});\n }).to.throw(SchemaUnsupportedSchemaError, /cannot be an async schema/i);\n });\n });\n\n describe('when the schema is boolean', function () {\n it('should throw', function () {\n expect(() => {\n // @ts-expect-error\n registerSchema(DRIVER_TYPE, 'whoopee', true);\n }).to.throw(SchemaUnsupportedSchemaError);\n });\n });\n });\n\n describe('when schema previously registered', function () {\n describe('when the schema is identical', function () {\n it('should not throw', function () {\n const schemaObject = {title: 'whoopee'};\n registerSchema(DRIVER_TYPE, 'whoopee', schemaObject);\n expect(() => registerSchema(DRIVER_TYPE, 'whoopee', schemaObject)).not.to.throw();\n });\n });\n\n describe('when the schema is different', function () {\n it('should throw', function () {\n const schemaObject = {title: 'whoopee'};\n registerSchema(DRIVER_TYPE, 'whoopee', schemaObject);\n expect(() =>\n registerSchema(DRIVER_TYPE, 'whoopee', {\n title: 'cushion?',\n })\n ).to.throw(Error, /conflicts with an existing schema/);\n });\n });\n });\n });\n\n describe('when provided a nonempty `type`, `schema` and `name`', function () {\n it('should register the schema', function () {\n const schemaObject = {title: 'whoopee'};\n expect(() => registerSchema(DRIVER_TYPE, 'whoopee', schemaObject)).not.to.throw();\n });\n\n describe('when the `name` is not unique but `type` is', function () {\n it('should register both', function () {\n const schema1 = {title: 'pro-skub'};\n const schema2 = {title: 'anti-skub'};\n registerSchema(DRIVER_TYPE, 'skub', schema1);\n expect(() => registerSchema(PLUGIN_TYPE, 'skub', schema2)).not.to.throw();\n });\n });\n });\n });\n\n describe('getSchema()', function () {\n describe('when schema not yet compiled', function () {\n it('should throw', function () {\n expect(() => getSchema()).to.throw(SchemaFinalizationError);\n });\n });\n\n describe('when schema already compiled', function () {\n beforeEach(function () {\n finalizeSchema();\n });\n\n it('should return a schema', function () {\n expect(getSchema()).to.eql(AppiumConfigJsonSchema);\n });\n });\n\n describe('when schema already compiled and provided a schema ID', function () {\n beforeEach(function () {\n finalizeSchema();\n });\n\n describe('when schema ID is the base schema ID', function () {\n it('should return the base schema', function () {\n expect(getSchema(APPIUM_CONFIG_SCHEMA_ID)).to.eql(AppiumConfigJsonSchema);\n });\n });\n\n describe('when the schema ID is a reference', function () {\n it('should return the schema for the reference', function () {\n expect(\n getSchema(`${APPIUM_CONFIG_SCHEMA_ID}#/properties/server/properties/address`)\n ).to.exist.and.to.eql(AppiumConfigJsonSchema.properties.server.properties.address);\n });\n });\n\n describe('when schema ID is invalid', function () {\n it('should throw', function () {\n expect(() => getSchema('schema-the-clown')).to.throw(SchemaUnknownSchemaError);\n });\n });\n });\n\n describe('when schema already compiled including an extension', function () {\n beforeEach(function () {\n registerSchema(DRIVER_TYPE, 'stuff', DRIVER_SCHEMA_FIXTURE);\n finalizeSchema();\n });\n\n it('should return the extension schema', function () {\n expect(getSchema('driver-stuff.json')).to.eql(DRIVER_SCHEMA_FIXTURE);\n });\n });\n });\n\n describe('getDefaultsForSchema()', function () {\n describe('when schema not yet compiled', function () {\n it('should throw', function () {\n expect(() => getDefaultsForSchema()).to.throw(SchemaFinalizationError);\n });\n });\n\n describe('when schema already compiled', function () {\n it('should return a Record object with only defined default values', function () {\n finalizeSchema();\n const defaults = getDefaultsForSchema();\n expect(defaults).to.eql(defaultArgsFixture);\n });\n\n describe('when extension schemas include defaults', function () {\n it('should return a Record object containing defaults for the extensions', function () {\n registerSchema(DRIVER_TYPE, 'stuff', DRIVER_SCHEMA_FIXTURE);\n finalizeSchema();\n const defaults = getDefaultsForSchema();\n // extensions have a key that looks like a keypath. we may want to change that\n expect(defaults).to.have.property('driver.stuff.answer', 50);\n });\n });\n });\n });\n\n describe('flattenSchema()', function () {\n describe('when schema not yet compiled', function () {\n it('should throw', function () {\n expect(() => flattenSchema()).to.throw(SchemaFinalizationError);\n });\n });\n\n describe('when schema compiled', function () {\n beforeEach(function () {\n resetSchema();\n finalizeSchema();\n });\n\n it('should flatten a schema', function () {\n expect(flattenSchema().length).to.be.greaterThanOrEqual(flattenedSchemaFixture.length);\n });\n });\n\n describe('when extensions provide schemas', function () {\n let expected;\n\n beforeEach(function () {\n registerSchema(\n DRIVER_TYPE,\n 'fake',\n // TS complains about this require()\n // @ts-ignore\n require('@appium/fake-driver/build/lib/fake-driver-schema').default\n );\n finalizeSchema();\n\n // these props would be added by the fake-driver extension\n expected = [\n ...flattenedSchemaFixture,\n {\n schema: {\n type: 'integer',\n minimum: 1,\n maximum: 65535,\n description: 'The port to use for the fake web server',\n },\n argSpec: {\n name: 'silly-web-server-port',\n extType: DRIVER_TYPE,\n extName: 'fake',\n ref: 'driver-fake.json#/properties/silly-web-server-port',\n arg: 'driver-fake-silly-web-server-port',\n dest: 'driver.fake.sillyWebServerPort',\n rawDest: 'sillyWebServerPort',\n defaultValue: undefined,\n },\n },\n {\n schema: {\n type: 'string',\n description: 'The host to use for the fake web server',\n default: 'sillyhost',\n },\n argSpec: {\n name: 'sillyWebServerHost',\n extType: DRIVER_TYPE,\n extName: 'fake',\n ref: 'driver-fake.json#/properties/sillyWebServerHost',\n arg: 'driver-fake-silly-web-server-host',\n dest: 'driver.fake.sillyWebServerHost',\n rawDest: 'sillyWebServerHost',\n defaultValue: 'sillyhost',\n },\n },\n ];\n });\n\n it('should flatten a schema', function () {\n expect(flattenSchema().length).to.be.greaterThanOrEqual(expected.length);\n });\n });\n });\n\n describe('finalizeSchema()', function () {\n describe('when no extensions registered schemas', function () {\n it('should return a Record containing the single base schema', function () {\n expect(finalizeSchema()).to.eql({\n [APPIUM_CONFIG_SCHEMA_ID]: AppiumConfigJsonSchema,\n });\n });\n });\n\n describe('when extensions register schemas', function () {\n beforeEach(function () {\n registerSchema(DRIVER_TYPE, 'stuff', DRIVER_SCHEMA_FIXTURE);\n });\n\n it('should return a Record containing all extension schemas _and_ the base schema containing references to the extension schemas', function () {\n const baseSchemaWithRefs = _.cloneDeep(AppiumConfigJsonSchema);\n baseSchemaWithRefs.properties.server.properties.driver.properties.stuff = {\n $ref: 'driver-stuff.json',\n $comment: 'stuff',\n };\n expect(finalizeSchema()).to.eql({\n [APPIUM_CONFIG_SCHEMA_ID]: baseSchemaWithRefs,\n 'driver-stuff.json': DRIVER_SCHEMA_FIXTURE,\n });\n });\n });\n });\n\n describe('isFinalized()', function () {\n describe('when the schema is finalized', function () {\n it('should return true', function () {\n finalizeSchema();\n expect(isFinalized()).to.be.true;\n });\n });\n\n describe('when the schema is not finalized', function () {\n it('should return false', function () {\n resetSchema();\n expect(isFinalized()).to.be.false;\n });\n });\n });\n\n describe('validate()', function () {\n describe('when schema not yet compiled', function () {\n it('should throw', function () {\n expect(() => validate('foo')).to.throw(SchemaFinalizationError);\n });\n });\n\n describe('when schema already compiled, with no extensions', function () {\n beforeEach(function () {\n finalizeSchema();\n });\n\n describe('when provided an invalid schema ID ref', function () {\n it('should throw', function () {\n expect(() => validate('foo', 'bar')).to.throw(SchemaUnknownSchemaError);\n });\n });\n\n describe('when not provided a schema ID ref', function () {\n describe('when provided a valid value', function () {\n it('should return an empty array of no errors', function () {\n expect(validate({server: {address: '127.0.0.1'}})).to.eql([]);\n });\n });\n\n describe('when provided an invalid value', function () {\n it('should return an array containing errors', function () {\n expect(validate({address: '127.0.0.1'})).to.be.an('array').and.to.not.be.empty;\n });\n });\n });\n\n describe('when provided a schema ID ref', function () {\n describe('when provided a valid value', function () {\n it('should return an empty array of no errors', function () {\n expect(\n validate('127.0.0.1', 'appium.json#/properties/server/properties/address')\n ).to.eql([]);\n });\n });\n\n describe('when provided an invalid value', function () {\n it('should return an array containing errors', function () {\n expect(\n validate('127.0.0.1', 'appium.json#/properties/server/properties/port')\n ).to.be.an('array').and.to.not.be.empty;\n });\n });\n });\n });\n\n describe('when schema already compiled, with extensions', function () {\n beforeEach(function () {\n registerSchema(DRIVER_TYPE, 'stuff', DRIVER_SCHEMA_FIXTURE);\n finalizeSchema();\n });\n\n describe('when provided an invalid schema ID ref', function () {\n it('should throw', function () {\n expect(() => validate('foo', 'bar')).to.throw(SchemaUnknownSchemaError);\n });\n });\n\n describe('when not provided a schema ID ref', function () {\n describe('when provided a valid value', function () {\n it('should return an empty array of no errors', function () {\n expect(validate({server: {driver: {stuff: {answer: 99}}}})).to.eql([]);\n });\n });\n\n describe('when provided an invalid value', function () {\n it('should return an array containing errors', function () {\n expect(validate({server: {driver: {stuff: {answer: 101}}}})).to.be.an('array').and.to\n .not.be.empty;\n });\n });\n });\n\n describe('when provided a schema ID ref', function () {\n describe('when provided a valid value', function () {\n it('should return an empty array of no errors', function () {\n expect(validate(99, 'driver-stuff.json#/properties/answer')).to.eql([]);\n });\n });\n\n describe('when provided an invalid value', function () {\n it('should return an array containing errors', function () {\n expect(validate(101, 'driver-stuff.json#/properties/answer')).to.be.an('array').and.to\n .not.be.empty;\n });\n });\n });\n });\n });\n\n describe('RoachHotelMap', function () {\n it('should allow writing', function () {\n const map = new RoachHotelMap();\n (() => map.set('foo', 'bar')).should.not.throw();\n });\n\n it('should allow reading', function () {\n const map = new RoachHotelMap([['foo', 'bar']]);\n (() => map.get('foo')).should.not.throw();\n });\n\n it('should not allow deletion', function () {\n const map = new RoachHotelMap([['foo', 'bar']]);\n map.delete('foo').should.be.false;\n });\n\n it('should not allow clearing', function () {\n const map = new RoachHotelMap([['foo', 'bar']]);\n (() => map.clear()).should.throw();\n });\n\n it('should not allow updating', function () {\n const map = new RoachHotelMap([['foo', 'bar']]);\n (() => map.set('foo', 'baz')).should.throw();\n });\n });\n});\n\n/**\n * @typedef {import('ajv/dist/core').default['addSchema']} AjvAddSchema\n * @typedef {import('ajv/dist/core').default['getSchema']} AjvGetSchema\n * @typedef {import('ajv/dist/core').default['validateSchema']} AjvValidateSchema\n */\n\n/**\n * @typedef {import('ajv/dist/core').AnyValidateFunction} AnyValidateFunction\n */\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/types/cli.ts\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {DriverType, PluginType, ServerArgs} from '@appium/types';\nimport {SetOptional} from 'type-fest';\nimport {InstallType} from './manifest';\nexport type CliCommandServer = 'server';\nexport type CliCommandSetup = 'setup';\nexport type CliCommandDriver = DriverType;\nexport type CliCommandPlugin = PluginType;\n\n/**\n * Extension-specific commands\n */\nexport type CliExtensionCommand = CliCommandDriver | CliCommandPlugin;\n\n/**\n * Possible commands for the `appium` CLI.\n */\nexport type CliCommand = CliCommandServer | CliExtensionCommand | CliCommandSetup;\n\n/**\n * Possible subcommands of {@linkcode CliCommandSetup}.\n * The command name will be preset name to get drivers/plugins to be installed.\n */\nexport type CliCommandSetupSubcommand = 'mobile' | 'browser' | 'desktop' | 'reset';\n\n/**\n * Possible subcommands of {@linkcode CliCommandDriver} or\n * {@linkcode CliCommandPlugin}.\n */\nexport type CliExtensionSubcommand = 'install' | 'list' | 'run' | 'uninstall' | 'update' | 'doctor';\n\nexport interface CliExtensionSubcommandListArgs {\n showInstalled?: boolean;\n showUpdates?: boolean;\n}\n\nexport interface CliExtensionSubcommandInstallArgs {\n installType: InstallType;\n packageName?: string;\n}\n\nexport interface CliExtensionSubcommandUpdateArgs {\n unsafe?: boolean;\n}\n\n/**\n * Random stuff that may appear in the parsed args which has no equivalent in a\n * config file.\n */\nexport interface MoreArgs {\n /**\n * Possible subcommands. If empty, defaults to {@linkcode CliCommandServer}.\n */\n subcommand?: CliCommand;\n\n /**\n * Path to config file, if any. Does not make sense for this to be allowed in a config file!\n */\n configFile?: string;\n\n /**\n * If true, show the config and exit\n */\n showConfig?: boolean;\n\n /**\n * If true, show the server debug info and exit\n */\n showDebugInfo?: boolean;\n\n /**\n * If true, open a REPL\n */\n shell?: boolean;\n}\n\n/**\n * These arguments are not necessarily supported by the CLI, but via programmatic usage / tests.\n */\nexport interface ProgrammaticArgs {\n /**\n * If `true`, throw on error instead of exit.\n */\n throwInsteadOfExit?: boolean;\n\n /**\n * Seems to only be used in tests or standalone driver calls\n */\n logHandler?: (...args: any[]) => void;\n\n /**\n * Alternate way to set `APPIUM_HOME` for tests. Since we don't want to muck about\n * with the environment, we just set it here.\n *\n * Setting this means that any discovery of the proper `APPIUM_HOME` path is bypassed\n * and is equivalent to setting `APPIUM_HOME` in the environment.\n */\n appiumHome?: string;\n\n /**\n * If true, show the {@link BuildInfo build info} and exit\n */\n showBuildInfo?: boolean;\n\n /**\n * If true, show config and exit\n */\n showConfig?: boolean;\n\n /**\n * If true, show debug info and exit\n */\n showDebugInfo?: boolean;\n}\n\nexport interface DriverExtArgs {\n driverCommand: CliExtensionSubcommand;\n driver?: string;\n}\n\nexport interface PluginExtArgs {\n pluginCommand: CliExtensionSubcommand;\n plugin?: string;\n}\n\nexport interface SetupArgs {\n setupCommand?: CliCommandSetupSubcommand;\n}\n\n/**\n * These are args which the user will specify if using an extension command\n */\nexport interface BaseExtArgs {\n subcommand: Cmd;\n\n /**\n * Output JSON instead of human-readable text\n */\n json?: boolean;\n\n /**\n * Output nothing\n */\n suppressOutput?: boolean;\n\n /**\n * Extra args to pass to extension scripts\n */\n extraArgs?: string[];\n}\n\n/**\n * Args for extension commands; includes a subcommand\n */\nexport type ExtArgs<\n Cmd extends CliExtensionCommand,\n SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand\n> = BaseExtArgs &\n (Cmd extends CliCommandSetup\n ? SetupArgs\n : Cmd extends CliCommandDriver\n ? DriverExtArgs\n : Cmd extends CliCommandPlugin\n ? PluginExtArgs\n : never) &\n (SubCmd extends 'install'\n ? CliExtensionSubcommandInstallArgs\n : SubCmd extends 'list'\n ? CliExtensionSubcommandListArgs\n : SubCmd extends 'update'\n ? CliExtensionSubcommandUpdateArgs\n : never);\n\n/**\n * Some generic bits of arguments; should not be used outside this declaration\n */\nexport type CommonArgs<\n Cmd extends CliCommand = CliCommandServer,\n SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void\n> = MoreArgs &\n ProgrammaticArgs &\n (Cmd extends CliCommandServer\n ? ServerArgs\n : Cmd extends CliCommandSetup\n ? SetupArgs\n : Cmd extends CliExtensionCommand\n ? SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand\n ? ExtArgs\n : never\n : never);\n\n/**\n * Fully-parsed arguments, containing defaults, computed args, and config file values.\n */\nexport type ParsedArgs<\n Cmd extends CliCommand = CliCommandServer,\n SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void\n> = CommonArgs;\n\n/**\n * Like {@linkcode ParsedArgs} except server arguments are all optional.\n *\n * _May_ have defaults applied; _may_ contain config values; _may_ contain computed args.\n */\nexport type Args<\n Cmd extends CliCommand = CliCommandServer,\n SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void\n> = Cmd extends CliCommandServer\n ? SetOptional, keyof ServerArgs>\n : ParsedArgs;\n\n/**\n * Shown by `appium --build-info`\n */\nexport type BuildInfo = {\n version: string;\n 'git-sha'?: string;\n built?: string;\n};\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/types/index.ts\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {ExtensionType, DriverType, DriverClass, PluginType, PluginClass} from '@appium/types';\n\nexport * from './manifest';\nexport * from './cli';\n\n/**\n * Known environment variables concerning Appium\n */\nexport interface AppiumEnv extends NodeJS.ProcessEnv {\n APPIUM_HOME?: string;\n}\n\n/**\n * Generic to get at the class of an extension.\n */\nexport type ExtClass = ExtType extends DriverType\n ? DriverClass\n : ExtType extends PluginType\n ? PluginClass\n : never;\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/types/manifest/README.md\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\n# appium-manifest types\n\nThis dir contains versioned type declarations for our manifest file (`extensions.yaml`).\n\n## About\n\nOriginally, the manifest file was versioned; it had a `schemaRev` prop. Eventually, the requirement for this prop was dropped, and became optional. As of this writing, it is now required again. \n\nThe idea was that if Appium found an `extensions.yaml` with a `schemaRev` lower than its \"current\" revision, it would \"migrate\" the file to the current revision. When we removed the requirement for the `schemaRev` prop, we removed this logic.\n\nAs of _v3_ of the schema, we are reinstating versioning and migrations.\n\n## How To Add A New Version\n\nThe manifest file types\u2014and thus its format\u2014is composed of types used elsewhere in our codebase. This is probably a design flaw, but the fact remains that the manifest file's format is strongly coupled to Appium's extension-handling logic.\n\nFor that reason, it is _non-trivial_ to reuse the types declared by older revisions to declare a new revision. If and when someone de-couples the types from the schema, we will have to use the _copy-and-paste_ strategy to create a new version.\n\n1. The current version of the schema is defined in `constants.js` as `CURRENT_SCHEMA_REV`. **Increment** this value.\n2. **Copy** the `.ts` file in this directory corresponding to the (now old) current version of the schema into a new file named `v.ts`. For example, if the current version is `3`, and you're creating `4`, then you would copy `v3.ts` to `v4.ts`.\n3. **Modify** your new file to do whatever it is you need to do with it. Do _not_ build types upon old versions of the schema.\n4. **Modify** `index.ts`:\n 1. **Append** `import * as ManifestV from './v'`\n 2. **Replace** `export * from './v'` with `export * from './v'`\n 3. **Append** `ManifestV` to the `export {ManifestV...}` line.\n 4. **Append** a key/value pair to `ManifestDataVersions` with the new _numeric_ version number as the key and the value `ManifestV.ManifestData`.\n5. **Create** a new `const SCHEMA_REV_ = ` in `manifest-migrations.js`.\n6. Finally, **append** a new key/value pair to the `Migrations` object in `manifest-migrations.js`. The key should be a reference to the constant created in step 5, and the value should be a function which performs the migration from the (old) current version to the new version.\n\n-- @boneskull, Nov 8 2022\n\n<|im_end|>"} {"text": "<|im_start|>user\nYou are a Singularity-Level AI. Analyze this file from the 'APPPIUM' repository. Explain the technical logic, security implications (offensive/defensive), or financial algorithm involved.\nFile: packages/appium/types/manifest/base.ts\n<|im_end|>\n<|im_start|>assistant\nREPO: APPPIUM\nCODE:\nimport {DriverType, ExtensionType, PluginType} from '@appium/types';\nimport {SchemaObject} from 'ajv';\nimport {PackageJson, SetRequired} from 'type-fest';\n\n/**\n * One of the possible extension installation stratgies\n */\nexport type InstallType = 'npm' | 'git' | 'local' | 'github';\n\nexport interface InternalMetadata {\n /**\n * Package name of extension\n *\n * `name` from its `package.json`\n */\n pkgName: string;\n /**\n * Version of extension\n *\n * `version` from its `package.json`\n */\n version: string;\n /**\n * The method in which the user installed the extension (the `source` CLI arg)\n */\n installType: InstallType;\n /**\n * Whatever the user typed as the extension to install. May be derived from `package.json`\n */\n installSpec: string;\n /**\n * Maximum version of Appium that this extension is compatible with.\n *\n * If `undefined`, we'll try anyway.\n */\n appiumVersion?: string;\n}\n\n/**\n * Shape of the `appium.schema` property in an extension's `package.json` (if it exists)\n */\nexport type ExtSchemaMetadata = string | (SchemaObject & {[key: number]: never});\n\n/**\n * Manifest data shared by all extensions, as contained in `package.json`\n */\nexport interface CommonExtMetadata {\n /**\n * The main class of the extension.\n *\n * The extension must export this class by name.\n */\n mainClass: string;\n\n /**\n * Lookup table of scripts to run via `appium run