Commit Graph

9655 Commits

Author SHA1 Message Date
Christopher Hiller d171219938 chore: cleanup root tsconfig.json 2023-02-15 16:19:30 -08:00
Christopher Hiller 61a0275e29 fix(base-driver): fix type problem w/r/t axios headers 2023-02-15 16:19:30 -08:00
Christopher Hiller 8f9de63e4a fix: update axios to v1.3.3
because renovate cannot seem to do it
2023-02-15 16:19:30 -08:00
Christopher Hiller 90c0d36f2a chore(ci): add cache cleanup workflow on PR close
I noticed we were filling up our allotted cache space.  Reading about it, I found this example to cleanup caches we no longer need (specifically, from closed PRs)
2023-02-15 10:50:36 -08:00
Christopher Hiller 988c088873 chore: force http-cache-semantics to v4.1.1
for https://github.com/advisories/GHSA-rc47-6667-2j5j

this override should be removed when upgrading webdriver to v8+.  unfortunately "npm audit" is so stupid that it does not understand overrides, so we will see warnings anyway.
2023-02-14 15:43:28 -08:00
Christopher Hiller 7c2c642ce7 chore(typedoc-plugin-appium): blast entire build dir on clean due to stale artifacts 2023-02-14 14:31:38 -08:00
Christopher Hiller 6b8eb2cbfe fix(docutils): fix typescript version 2023-02-14 14:31:38 -08:00
Christopher Hiller 242c2ccbdc fix(typedoc-plugin-appium): fix broken references during clone operations
= moves example extraction to conversion phase (from rendering phase)
- add `cloneTypeParameterReflection()` util
- add support for passing explicit comments to `deriveComment` when `refl` is a `ParameterReflection`
- some tests
2023-02-14 14:31:38 -08:00
Christopher Hiller c5dadbbd36 chore(docutils): fix old mike test for wallaby 2023-02-14 14:31:38 -08:00
Christopher Hiller 74800cdf61 chore(docutils): tweaky refactors for new ts 2023-02-14 14:31:38 -08:00
Christopher Hiller 70c98ea12f chore(typedoc-plugin-appium): isolate e2e tests due to memory pressure in CI 2023-02-14 14:31:38 -08:00
Christopher Hiller 592f9adcb1 fix(typedoc-plugin-appium): parameter descriptions work
In #18132, I found that parameter descriptions of commands were being omitted from the output. Those descriptions have to come from a method, because they cannot be expressed in their original location (a method map) via JS or a docstring.

In addition, if an extension's implementation did not describe the parameters (e.g., in `@param` tags), we need to pull those descriptions out of `ExternalDriver` (assuming they exist).

Furthermore, we were executing the conversion _too early_ in TypeDoc's lifecycle, since its internal plugins haven't run yet. One of those plugins actually moves the `@param` comments from the _signature_ into the appropriate parameter. Once those are there, we can find them.

- Added a new list of "comment finders" which are parameter-specific (could probably do the same thing for return statements)
- Moved some functions into different modules and renamed a couple things to be more accurate.
- Update VSCode launch config
- `CommandData` now requires a reflection of a method. This was true before, but not formalized
2023-02-14 14:31:38 -08:00
Christopher Hiller fac31a3d68 chore(typedoc-plugin-appium): move kind-related utils into the kind module
Nothing else will ever use them, so in they go
2023-02-14 14:31:38 -08:00
renovate[bot] 2bbf42ff6b chore(deps): update dependency lerna to v6.5.1 2023-02-14 19:47:29 +00:00
renovate[bot] 1f65161e56 chore(deps): update dependency ws to v8.12.1 2023-02-14 14:36:45 +00:00
renovate[bot] 355bf8e5da chore(deps): update dependency lint-staged to v13.1.2 2023-02-14 11:23:36 +00:00
renovate[bot] 0ca5e7e21b chore(deps): update commitlint monorepo to v17.4.3 2023-02-14 07:37:19 +00:00
Jonathan Lipps 11e7ad0cd4 fix: appium:options should work via --default-capabilities
fix #18191
2023-02-13 16:20:21 -08:00
Christopher Hiller c69b602d1b fix(renovate): do not upgrade "figures" package to a major 2023-02-13 12:24:11 -08:00
Christopher Hiller 4cf13c5bfa chore(deps): upgrade typescript to v4.9.5
anything newer than v4.7.4 fails to ignore an optional arg in `@param {T} [foo]` if `foo` has a default assignment in the function signature.  removing the square brackets fixes the issue.

whether or not this is a bug, I am not entirely sure: it is marked as a bug, but it is also not something the TS team is in a hurry to fix, so whatevs.
2023-02-13 12:09:20 -08:00
renovate[bot] a4c58cc561 fix(docutils): update dependency typedoc to v0.23.25 2023-02-12 14:48:52 +00:00
renovate[bot] 64098c5f1a chore(deps): update dependency eslint to v8.34.0 2023-02-11 15:35:02 +00:00
renovate[bot] b4416c5c0f fix(types): update dependency type-fest to v3.5.7 2023-02-11 09:08:44 +00:00
renovate[bot] 547b8a45c4 fix(execute-driver-plugin): update dependency webdriverio to v7.30.1 2023-02-10 20:21:13 +00:00
renovate[bot] 1bf841736b chore(docutils): update dependency mkdocs-material to v9.0.12 2023-02-10 16:27:51 +00:00
Christopher Hiller 29a5bdac9a chore: publish
- appium@2.0.0-beta.55
 - @appium/docutils@0.2.1
@appium/docutils@0.2.1 appium@2.0.0-beta.55
2023-02-09 14:49:28 -08:00
Christopher Hiller ab366f3a1f fix(docutils): fix bad offset in nav updates
Also warn if no TypeDoc output files found
2023-02-09 14:48:20 -08:00
Christopher Hiller 5446e5c7a7 fix(docutils): fix bad option name and ignore most falsy args
- in type `DeployOpts`, `mkDocsYml` should have been `mkdocsYml`
- arguments were only being omitted from being passed to `mike` if they were `false`, but it needed to also consider `undefined` values and empty string values.  `0` is falsy, but we should not disallow this.  thus... "most" falsy values get ignored.
2023-02-09 14:48:20 -08:00
Christopher Hiller 322363b887 chore: publish
- appium@2.0.0-beta.54
 - @appium/base-driver@9.3.1
 - @appium/base-plugin@2.2.1
 - @appium/doctor@2.0.7
 - @appium/docutils@0.2.0
 - @appium/driver-test-support@0.3.7
 - @appium/execute-driver-plugin@3.0.6
 - @appium/fake-driver@5.1.5
 - @appium/fake-plugin@3.1.5
 - @appium/images-plugin@2.0.6
 - @appium/opencv@2.0.6
 - @appium/plugin-test-support@0.3.7
 - @appium/relaxed-caps-plugin@1.0.5
 - @appium/schema@0.2.4
 - @appium/support@3.1.5
 - @appium/test-support@3.0.7
 - @appium/tsconfig@0.2.4
 - @appium/typedoc-plugin-appium@0.4.0
 - @appium/types@0.9.1
 - @appium/universal-xml-plugin@1.0.5
@appium/base-driver@9.3.1 @appium/base-plugin@2.2.1 @appium/doctor@2.0.7 @appium/docutils@0.2.0 @appium/driver-test-support@0.3.7 @appium/execute-driver-plugin@3.0.6 @appium/fake-driver@5.1.5 @appium/fake-plugin@3.1.5 @appium/images-plugin@2.0.6 @appium/opencv@2.0.6 @appium/plugin-test-support@0.3.7 @appium/relaxed-caps-plugin@1.0.5 @appium/schema@0.2.4 @appium/support@3.1.5 @appium/test-support@3.0.7 @appium/tsconfig@0.2.4 @appium/typedoc-plugin-appium@0.4.0 @appium/types@0.9.1 @appium/universal-xml-plugin@1.0.5 appium@2.0.0-beta.54
2023-02-09 11:44:44 -08:00
Christopher Hiller 393f9ef32a feat(typedoc-appium-converter): add packageTitles option and populate extension titles
This changes how packages get their titles (the h1 in the commands page, which is used by mkdocs in the nav bar).

A new option, `packageTitles` is available in `typedoc.json`.  This is an array of objects like so:

```json
{
  "packageTitles": [
    {"name": "@appium/fake-driver": "title": "Fake Driver"},
    {"name": "@appium/fake-plugin": "title": "Fake Plugin"}
  ]
}
```

This allows granular control over how each package is titled.  However, if this option is not provided, the plugin will "extract" a title from the `package.json` of each package, assuming that package is an Appium extension.  By default, it will name drivers `Driver: ${appium.driverName}` and plugins `Plugin: ${appium.pluginName}` where `appium` is a prop in `package.json`.

If the package is _not_ an extension but _does_ have commands -- and currently the only package that fulfills this criteria is `@appium/base-driver` -- _and_ is in a multi-package project, the title will be `${name} Commands` where `name` is from `package.json`.  Otherwise, if we are documenting a project with a single package (e.g., a 3p extension) _and_ we cannot otherwise derive a title, we will just use `Commands` for the title.
2023-02-09 11:39:54 -08:00
Christopher Hiller 2271f34d9b chore(docutils): improve logging output 2023-02-09 11:39:54 -08:00
renovate[bot] be222d0ab9 fix(docutils): update dependency yargs-parser to v21 2023-02-09 10:12:25 -08:00
Jonathan Lipps e4dfa52ddb docs(appium): note that --port 0 doesn't work anymore in migration doc (#18167)
* docs(appium): note that --port 0 doesn't work anymore in migration doc
(related to #18147)

* Update packages/appium/docs/en/guides/migrating-1-to-2.md

Co-authored-by: Kazuaki Matsuo <fly.49.89.over@gmail.com>

---------

Co-authored-by: Kazuaki Matsuo <fly.49.89.over@gmail.com>
2023-02-08 14:04:50 -08:00
renovate[bot] 742abf2503 fix(support): update dependency jimp to v0.22.4 2023-02-08 21:26:43 +00:00
renovate[bot] c2289ad607 fix(base-driver): update definitelytyped 2023-02-08 15:14:04 +00:00
renovate[bot] d31d3c6e73 chore(deps): update dependency prettier to v2.8.4 2023-02-08 11:43:45 +00:00
Christopher Hiller d8286ab7f1 docs(appium): update navs 2023-02-07 17:10:15 -08:00
Christopher Hiller 3aeb24dc1d docs(appium): build-docs now uses appium-docs' API
While we _could_ update `appium-docs` to support multiple languages, it's easier to just reuse what we have.

This changes the `build-docs` script in `appium/docs/scripts` to use new APIs `deploy()`, `buildReferenceDocs()` and `deploy()` from `@appium/docutils`.

The "default" language is `en`, and `packages/appium/docs/reference/en` is where TypeDoc outputs its markdown files. This is configured in the `typedoc.json`.  Once TypeDoc has run, each language's `mkdocs.yml` is updated with the new `nav` as computed from the output of TypeDocs.  Importantly--and I don't know if this is right--those TypeDoc-docs are _not_ copied into the specific language dir (if not `en`) and instead are referenced within `en`.  This _may_ pose a navigation problem as it's _might_ be possible for a browsing user to accidentally switch away from the target language.

The script `copy-assets` remains the same and script `build-reference` was removed due to duplication.
2023-02-07 17:10:15 -08:00
Christopher Hiller f5ec354e3d fix(docutils): fix various problems in deploy pipeline
- Do not send boolean flags to `mike`
- Do not send `mike serve`-specific args to `mike deploy`
- Derive version from `package.json` if no version present (like the CLI docs say it should)
- `version` and `alias` are positional args to `mike deploy`/`mike serve`, not options
- Fix update nav logic
- Fix monkeypatching of TypeDoc if `typedoc` is not installed in the `node_modules` of a workspace
- Fix parsing of `typedoc.json`
- Fix finding of `typedoc.json`
2023-02-07 17:09:29 -08:00
renovate[bot] 0d7390faa4 fix(appium): update dependency package-changed to v2 2023-02-07 15:52:44 -08:00
renovate[bot] 775c990f9d fix(types): update dependency type-fest to v3.5.6 2023-02-07 15:52:09 -08:00
Christopher Hiller 65c6ca528b chore(docutils): split huge updateNav into smaller functions
per peer review by @mykola-mokhnach
2023-02-07 15:50:11 -08:00
Christopher Hiller 42dd6785c3 fix(docutils): better parsing/updating of nav tree in mkdocs.yml
After we build the reference docs, we need to update the `nav` prop of the given `mkdocs.yml` before building the site.  This was only _sorta_ working before; it did not take into account the myriad ways in which the data structure could be expressed (particularly, it did not understand "custom names").

I think I've done this in such a way that if a custom name is provided (they must be provided manually by hand-editing `mkdocs.yml`), it retains them _unless_ the file in question disappears.  Or that's the idea. Can't really be too sure; needs tests.

This change makes an attempt to parse the `nav` prop into something "normalized", then the data is processed and recomplexified before writing out to `mkdocs.yml`.  However, I've disabled the ability to define a custom header for command docs and/or omit the header entirely, as the latter especially was causing extra complexity and it's already bad enough.  I think we can re-enable "custom header" somehow, if needed.

Also added an `--all` flag which causes the nav to be updated with _all_ the TypeDoc-generated content--not just command docs.
2023-02-07 15:50:11 -08:00
Christopher Hiller 2b3e576393 fix(appium): fix broken autoinstall script
The script was failing to pass the `subcommand` prop to `runExtensionCommand` in multiple places.
2023-02-07 14:30:14 -08:00
renovate[bot] 92d0a946ea chore(deps): update dependency lint-staged to v13.1.1 2023-02-07 13:49:23 +00:00
Christopher Hiller c9a82926a8 feat(docutils): add support for deploying with mike
This is enabled via `appium-docs build --deploy`.  Instead of invoking `mkdocs` directly, `mike` will be invoked.

Implementation is in `lib/builder/deploy.ts`.  It's very similar to the MkDocs implementation in `lib/builder/site.ts`; just with new/different options.

I marked the `Mike` class as deprecated, since the new one is fancy
2023-02-06 15:28:36 -08:00
Christopher Hiller 5326cb1840 chore(docutils): reorganize some build-related modules into a 'builder' subdir
Also rename a few things.  `typedoc` module is now `reference` and `mkdocs` module is now `site`.

Moved a couple things into `util` as well

The `nav` module will be in stacked PR
2023-02-06 15:28:06 -08:00
Christopher Hiller cd72da3b3f fix(docutils): fix the docutils logger
Proxy wasn't working properly. Now it is
2023-02-06 15:27:21 -08:00
Christopher Hiller 258860f377 fix(docutils): fix --mkdocs-yml arg for validate command 2023-02-06 15:26:25 -08:00
Christopher Hiller fd98351a47 feat(docutils): better mkdocs validation
When validating `mkdocs.yml`, `appium-docs` is now aware of the `INHERITS` property, and expands this property (by loading more `mkdocs.yml` files).

Also:

- Updated the types for `mkdocs.yml`
- Squelch warnings from `YAML.parse()`
- Change YAML indentation back to 2, since that seems to be correct and I was confused
2023-02-06 15:26:25 -08:00