Commit Graph

9886 Commits

Author SHA1 Message Date
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
Christopher Hiller 71e91107f9 feat(docutils): add config file support
e.g., `appium-docs.config.js` and the its ilk. Not strictly necessary, but can be useful if there are a bunch of custom paths or multiple builds.
2023-02-06 15:11:43 -08:00
renovate[bot] 3b4d9dde60 fix(support): update dependency jimp to v0.21.3 2023-02-06 17:45:51 +00:00
renovate[bot] 37803b1e37 fix(execute-driver-plugin): update dependency vm2 to v3.9.14 2023-02-06 12:59:36 +00:00
renovate[bot] 9bc1fbdf3d fix(support): update dependency jimp to v0.21.0 2023-02-05 10:23:47 +00:00
renovate[bot] 9bf320c87c fix(types): update dependency type-fest to v3.5.5 2023-02-05 04:43:53 +00:00
renovate[bot] 172bdae436 fix(types): update definitelytyped 2023-02-05 00:47:22 +00:00
renovate[bot] 8129a228a9 fix(support): update dependency jimp to v0.17.10 2023-02-04 23:08:22 +00:00
renovate[bot] 9ce3263918 fix(support): update dependency jimp to v0.16.13 2023-02-04 11:37:47 +00:00
renovate[bot] c342bb0eed chore(docutils): update dependency mkdocs-material to v9.0.11 2023-02-04 09:56:59 +00:00
renovate[bot] e92911f5ca fix(docutils): update dependency type-fest to v3.5.4 2023-02-03 23:36:13 +00:00
Christopher Hiller abfeb21be6 feat(docutils): implement mkdocs validation
- Better grouping of `validate` command options in `--help`
- Move some more constants into the module
- Removed the "guess" functions and replaced them with functions which use `which` to actually find the necessary executables
- Moved `isStringArray()` to `util`
- Fixed some error messages and added more
- Simplified use of `DocutilsValidator#fail()`
- Removed option for custom path to `requirements.txt`
2023-02-03 11:54:02 -08:00
renovate[bot] 706efcf9cf chore(docutils): update dependency mkdocs-material to v9.0.10 2023-02-03 15:38:21 +00:00
renovate[bot] bcda967fec chore(deps): update dependency @types/yargs to v17.0.22 2023-02-03 12:01:13 +00:00
Christopher Hiller db4a1d6489 fix(typedoc-plugin-appium): better top-level header for extension reflection
It now shows "Command API" if there's only one 3p extension we're documenting, and "(name) Command API" if there are multiple (e.g. in the case of a monorepo)
2023-02-02 16:25:45 -08:00
Christopher Hiller f16e6c8a16 chore(docutils): tweak some logging 2023-02-02 16:25:45 -08:00
Christopher Hiller 6bb06e2c19 feat(typedoc-plugin-appium): implemented outputBuiltinCommands
This value defaults to `false`, as extension authors will typically not want that stuff.

As with removal of non-command reflections (via the plugin's `outputModules` option), this happens in a post-processing step after conversion but before rendering.
2023-02-02 16:25:45 -08:00
Christopher Hiller d9304d8212 chore(docutils): when complete, build command mentions the site dir 2023-02-02 16:25:45 -08:00
Christopher Hiller 21eb6b59f8 fix(docutils): disallow both --no-reference and --no-site
also add a final "done" message
2023-02-02 16:25:45 -08:00
Christopher Hiller 3872d40291 docs(docutils): more docstrings dogg 2023-02-02 16:25:45 -08:00