Commit Graph

9871 Commits

Author SHA1 Message Date
Christopher Hiller ebe9477a3c feat(typedoc-plugin-appium): extract descriptions of return values from builtins
If a command is not documented with a `@returns` tag, but a builtin method _does_ have this tag (e.g., `ExternalDriver.createSession()`), then the plugin will use the tag from the builtin.

If a command _does_ have a `@returns` tag, but it provides no description, then the plugin will use the original `@returns` tag (which may have a type) and combine it with the content/description from the builtin (if any).

This requires further inspection of `SignatureReflection` data, which needed a new set of "comment finders", which prompted me to refactor the comment finders into their own files (because it was becoming unwieldy).  The call to `deriveComment` happens in the static `BaseCommandData.rewriteSignature()` method (whereas before it was just a straightforward clone operation).

- Fixed the block tag aggregation to prefer contentful over contentless tags in all cases.
- Modified the `@returns` tag of `FakeDriver.createSession()` for testing
- Moved some types around that were used outside of their sibling modules (e.g. `CommentSource` which used to be called `CommentSourceType`)
- pruned dead imports
2023-02-20 10:05:30 -08:00
Christopher Hiller 3b82c9f1a1 chore(docutils): smol type upgrade
`type-fest`@3.6.0 has a `TsConfigJson` type which no longer contains `unknown` (courtesy of yours truly), so we can use it directly instead of wrapping it in `Jsonify`.
2023-02-20 10:05:13 -08:00
renovate[bot] a9476a67ff chore(deps): update dependency json-schema-to-typescript to v11.0.4 2023-02-20 12:30:24 +00:00
renovate[bot] 24ad9f8741 chore(deps): update dependency @types/node to v18.14.0 2023-02-19 14:01:21 +00:00
renovate[bot] 639d475627 chore(docutils): update dependency mkdocs-material to v9.0.13 2023-02-19 10:43:21 +00:00
renovate[bot] 2fa6bf1e11 fix(images-plugin): update dependency lru-cache to v7.16.1 2023-02-18 15:41:23 +00:00
renovate[bot] d3dc9ce733 chore(deps): update commitlint monorepo to v17.4.4 2023-02-18 14:40:18 +00:00
renovate[bot] 08a6f3a308 fix(types): update dependency type-fest to v3.6.0 2023-02-17 13:47:51 -08:00
Christopher Hiller 24fb515a52 fix(types): base cap webSocketUrl is now a boolean instead of a string.
note that it is a string in the server response, but it is expected to be a boolean in the request.  punting on that for now
2023-02-17 11:03:11 -08:00
Christopher Hiller 893bd888cf feat(driver-test-support): add startStoppableAppium()
This adds a function `startStoppableAppium()` which starts an Appium server (via its `main()` entry point), but resolves with an object having a `stop() => Promise<boolean>` method. This method force-quits the server, even if there are active connections.
2023-02-17 11:02:44 -08:00
renovate[bot] d54901a9c3 fix(images-plugin): update dependency lru-cache to v7.16.0 2023-02-17 18:03:38 +00:00
renovate[bot] 70d65b7d62 fix(docutils): update dependency yargs to v17.7.0 2023-02-17 14:57:25 +00:00
renovate[bot] 33442bd61b chore(deps): update dependency rewiremock to v3.14.5 2023-02-17 11:22:10 +00:00
renovate[bot] 4cf8dbc0d3 fix(images-plugin): update dependency lru-cache to v7.15.0 2023-02-16 12:03:52 +00:00
Christopher Hiller 943dce5eec fix(schema): move output files due to tsc's confusion
It seemed to think I wanted to overwrite the root `index.js` file, and I don't know why. It doesn't do that anymore.
2023-02-15 16:19:30 -08:00
Christopher Hiller 04633e3e6d chore: clean:distfiles script now blasts everything 2023-02-15 16:19:30 -08:00
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