mirror of
https://github.com/appium/appium.git
synced 2026-11-02 23:33:14 +08:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af066eb5c3 | ||
|
|
e5254b5b45 | ||
|
|
c18eb03261 |
Generated
+55
-33
@@ -24,6 +24,7 @@
|
||||
"@types/semver": "7.5.0",
|
||||
"@types/sinon": "10.0.15",
|
||||
"@types/sinon-chai": "3.2.9",
|
||||
"@types/source-map-support": "0.5.6",
|
||||
"@types/teen_process": "2.0.0",
|
||||
"@types/ws": "8.5.4",
|
||||
"@types/yargs": "17.0.24",
|
||||
@@ -4498,6 +4499,15 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/source-map-support": {
|
||||
"version": "0.5.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.6.tgz",
|
||||
"integrity": "sha512-b2nJ9YyXmkhGaa2b8VLM0kJ04xxwNyijcq12/kDoomCt43qbHBeK2SLNJ9iJmETaAj+bKUT05PQUu3Q66GvLhQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"source-map": "^0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/stack-utils": {
|
||||
"version": "2.0.1",
|
||||
"dev": true,
|
||||
@@ -19083,7 +19093,8 @@
|
||||
},
|
||||
"node_modules/source-map-support": {
|
||||
"version": "0.5.21",
|
||||
"license": "MIT",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
|
||||
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
|
||||
"dependencies": {
|
||||
"buffer-from": "^1.0.0",
|
||||
"source-map": "^0.6.0"
|
||||
@@ -21529,15 +21540,15 @@
|
||||
}
|
||||
},
|
||||
"packages/appium": {
|
||||
"version": "2.0.0-rc.1",
|
||||
"version": "2.0.0-rc.2",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "^9.3.11",
|
||||
"@appium/base-plugin": "^2.2.11",
|
||||
"@appium/docutils": "^0.4.0",
|
||||
"@appium/base-driver": "^9.3.12",
|
||||
"@appium/base-plugin": "^2.2.12",
|
||||
"@appium/docutils": "^0.4.1",
|
||||
"@appium/schema": "^0.3.0",
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@appium/types": "^0.12.0",
|
||||
"@sidvind/better-ajv-errors": "2.1.0",
|
||||
"@types/argparse": "2.0.10",
|
||||
@@ -21741,10 +21752,10 @@
|
||||
},
|
||||
"packages/base-driver": {
|
||||
"name": "@appium/base-driver",
|
||||
"version": "9.3.11",
|
||||
"version": "9.3.12",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@appium/types": "^0.12.0",
|
||||
"@colors/colors": "1.5.0",
|
||||
"@types/async-lock": "1.4.0",
|
||||
@@ -21793,11 +21804,11 @@
|
||||
},
|
||||
"packages/base-plugin": {
|
||||
"name": "@appium/base-plugin",
|
||||
"version": "2.2.11",
|
||||
"version": "2.2.12",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "^9.3.11",
|
||||
"@appium/support": "^4.0.2"
|
||||
"@appium/base-driver": "^9.3.12",
|
||||
"@appium/support": "^4.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
|
||||
@@ -21806,10 +21817,10 @@
|
||||
},
|
||||
"packages/doctor": {
|
||||
"name": "@appium/doctor",
|
||||
"version": "2.0.17",
|
||||
"version": "2.0.18",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@colors/colors": "1.5.0",
|
||||
"@types/bluebird": "3.5.38",
|
||||
"@types/teen_process": "2.0.0",
|
||||
@@ -21831,10 +21842,10 @@
|
||||
},
|
||||
"packages/docutils": {
|
||||
"name": "@appium/docutils",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@appium/tsconfig": "^0.3.0",
|
||||
"@appium/typedoc-plugin-appium": "^0.6.5",
|
||||
"@sliphua/lilconfig-ts-loader": "3.2.2",
|
||||
@@ -22074,11 +22085,11 @@
|
||||
},
|
||||
"packages/fake-plugin": {
|
||||
"name": "@appium/fake-plugin",
|
||||
"version": "3.1.15",
|
||||
"version": "3.1.16",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/base-plugin": "^2.2.11",
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/base-plugin": "^2.2.12",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@types/bluebird": "3.5.38",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
@@ -22200,7 +22211,7 @@
|
||||
},
|
||||
"packages/support": {
|
||||
"name": "@appium/support",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.3",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/tsconfig": "^0.3.0",
|
||||
@@ -22447,10 +22458,10 @@
|
||||
},
|
||||
"packages/test-support": {
|
||||
"name": "@appium/test-support",
|
||||
"version": "3.0.16",
|
||||
"version": "3.0.17",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@colors/colors": "1.5.0",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
@@ -22551,7 +22562,7 @@
|
||||
"@appium/base-driver": {
|
||||
"version": "file:packages/base-driver",
|
||||
"requires": {
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@appium/types": "^0.12.0",
|
||||
"@colors/colors": "1.5.0",
|
||||
"@types/async-lock": "1.4.0",
|
||||
@@ -22594,14 +22605,14 @@
|
||||
"@appium/base-plugin": {
|
||||
"version": "file:packages/base-plugin",
|
||||
"requires": {
|
||||
"@appium/base-driver": "^9.3.11",
|
||||
"@appium/support": "^4.0.2"
|
||||
"@appium/base-driver": "^9.3.12",
|
||||
"@appium/support": "^4.0.3"
|
||||
}
|
||||
},
|
||||
"@appium/doctor": {
|
||||
"version": "file:packages/doctor",
|
||||
"requires": {
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@colors/colors": "1.5.0",
|
||||
"@types/bluebird": "3.5.38",
|
||||
"@types/teen_process": "2.0.0",
|
||||
@@ -22617,7 +22628,7 @@
|
||||
"@appium/docutils": {
|
||||
"version": "file:packages/docutils",
|
||||
"requires": {
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@appium/tsconfig": "^0.3.0",
|
||||
"@appium/typedoc-plugin-appium": "^0.6.5",
|
||||
"@sliphua/lilconfig-ts-loader": "3.2.2",
|
||||
@@ -22757,8 +22768,8 @@
|
||||
"@appium/fake-plugin": {
|
||||
"version": "file:packages/fake-plugin",
|
||||
"requires": {
|
||||
"@appium/base-plugin": "^2.2.11",
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/base-plugin": "^2.2.12",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@types/bluebird": "3.5.38",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
@@ -22997,7 +23008,7 @@
|
||||
"@appium/test-support": {
|
||||
"version": "file:packages/test-support",
|
||||
"requires": {
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@colors/colors": "1.5.0",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
@@ -26022,6 +26033,15 @@
|
||||
"version": "8.1.2",
|
||||
"dev": true
|
||||
},
|
||||
"@types/source-map-support": {
|
||||
"version": "0.5.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.6.tgz",
|
||||
"integrity": "sha512-b2nJ9YyXmkhGaa2b8VLM0kJ04xxwNyijcq12/kDoomCt43qbHBeK2SLNJ9iJmETaAj+bKUT05PQUu3Q66GvLhQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"source-map": "^0.6.0"
|
||||
}
|
||||
},
|
||||
"@types/stack-utils": {
|
||||
"version": "2.0.1",
|
||||
"dev": true
|
||||
@@ -26457,11 +26477,11 @@
|
||||
"appium": {
|
||||
"version": "file:packages/appium",
|
||||
"requires": {
|
||||
"@appium/base-driver": "^9.3.11",
|
||||
"@appium/base-plugin": "^2.2.11",
|
||||
"@appium/docutils": "^0.4.0",
|
||||
"@appium/base-driver": "^9.3.12",
|
||||
"@appium/base-plugin": "^2.2.12",
|
||||
"@appium/docutils": "^0.4.1",
|
||||
"@appium/schema": "^0.3.0",
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@appium/types": "^0.12.0",
|
||||
"@sidvind/better-ajv-errors": "2.1.0",
|
||||
"@types/argparse": "2.0.10",
|
||||
@@ -35767,6 +35787,8 @@
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.21",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
|
||||
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
"source-map": "^0.6.0"
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
"@types/semver": "7.5.0",
|
||||
"@types/sinon": "10.0.15",
|
||||
"@types/sinon-chai": "3.2.9",
|
||||
"@types/source-map-support": "0.5.6",
|
||||
"@types/teen_process": "2.0.0",
|
||||
"@types/ws": "8.5.4",
|
||||
"@types/yargs": "17.0.24",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [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)
|
||||
|
||||
**Note:** Version bump only for package appium
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [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)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "appium",
|
||||
"version": "2.0.0-rc.1",
|
||||
"version": "2.0.0-rc.2",
|
||||
"description": "Automation for Apps.",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -60,11 +60,11 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "^9.3.11",
|
||||
"@appium/base-plugin": "^2.2.11",
|
||||
"@appium/docutils": "^0.4.0",
|
||||
"@appium/base-driver": "^9.3.12",
|
||||
"@appium/base-plugin": "^2.2.12",
|
||||
"@appium/docutils": "^0.4.1",
|
||||
"@appium/schema": "^0.3.0",
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@appium/types": "^0.12.0",
|
||||
"@sidvind/better-ajv-errors": "2.1.0",
|
||||
"@types/argparse": "2.0.10",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [9.3.12](https://github.com/appium/appium/compare/@appium/base-driver@9.3.11...@appium/base-driver@9.3.12) (2023-06-14)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-driver
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [9.3.11](https://github.com/appium/appium/compare/@appium/base-driver@9.3.10...@appium/base-driver@9.3.11) (2023-06-14)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/base-driver",
|
||||
"version": "9.3.11",
|
||||
"version": "9.3.12",
|
||||
"description": "Base driver class for Appium drivers",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -44,7 +44,7 @@
|
||||
"test:types": "tsd"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@appium/types": "^0.12.0",
|
||||
"@colors/colors": "1.5.0",
|
||||
"@types/async-lock": "1.4.0",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.2.12](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.11...@appium/base-plugin@2.2.12) (2023-06-14)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.2.11](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.10...@appium/base-plugin@2.2.11) (2023-06-14)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-plugin
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/base-plugin",
|
||||
"version": "2.2.11",
|
||||
"version": "2.2.12",
|
||||
"description": "The base plugin used to create Appium 2.0 plugins",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -40,8 +40,8 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "^9.3.11",
|
||||
"@appium/support": "^4.0.2"
|
||||
"@appium/base-driver": "^9.3.12",
|
||||
"@appium/support": "^4.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.0.18](https://github.com/appium/appium/compare/@appium/doctor@2.0.17...@appium/doctor@2.0.18) (2023-06-14)
|
||||
|
||||
**Note:** Version bump only for package @appium/doctor
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.0.17](https://github.com/appium/appium/compare/@appium/doctor@2.0.16...@appium/doctor@2.0.17) (2023-06-14)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/doctor",
|
||||
"version": "2.0.17",
|
||||
"version": "2.0.18",
|
||||
"description": "Test environment for fitness to run Appium",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -44,7 +44,7 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@colors/colors": "1.5.0",
|
||||
"@types/bluebird": "3.5.38",
|
||||
"@types/teen_process": "2.0.0",
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.4.1](https://github.com/appium/appium/compare/@appium/docutils@0.4.0...@appium/docutils@0.4.1) (2023-06-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **docutils:** fixes some weirdness with default behavior and the "implies" keyword ([#18751](https://github.com/appium/appium/issues/18751)) ([e5254b5](https://github.com/appium/appium/commit/e5254b5b4564450252fd3eb55b773c0d7c615316))
|
||||
|
||||
|
||||
|
||||
## [0.4.0](https://github.com/appium/appium/compare/@appium/docutils@0.3.13...@appium/docutils@0.4.0) (2023-06-14)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env node
|
||||
// @ts-check
|
||||
|
||||
'use strict';
|
||||
require('source-map-support').install();
|
||||
|
||||
const {main} = require('../build/lib/cli');
|
||||
const {getLogger} = require('../build/lib/logger');
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
NAME_PYTHON,
|
||||
} from '../constants';
|
||||
import {DocutilsError} from '../error';
|
||||
import {findMkDocsYml, findPython, readPackageJson} from '../fs';
|
||||
import {findMike, findMkDocsYml, findPython, readPackageJson} from '../fs';
|
||||
import {getLogger} from '../logger';
|
||||
import {argify, spawnBackgroundProcess, SpawnBackgroundProcessOpts, stopwatch} from '../util';
|
||||
|
||||
@@ -26,33 +26,33 @@ const log = getLogger('builder:deploy');
|
||||
|
||||
/**
|
||||
* Runs `mike serve`
|
||||
* @param pythonPath Path to Python 3 executable
|
||||
* @param mikePath Path to `mike` executable
|
||||
* @param args Extra args to `mike build`
|
||||
* @param opts Extra options for `teen_process.Subprocess.start`
|
||||
*/
|
||||
async function doServe(
|
||||
pythonPath: string,
|
||||
mikePath: string,
|
||||
args: string[] = [],
|
||||
opts: SpawnBackgroundProcessOpts = {}
|
||||
) {
|
||||
const finalArgs = ['-m,', NAME_MIKE, 'serve', ...args];
|
||||
return spawnBackgroundProcess(pythonPath, finalArgs, opts);
|
||||
const finalArgs = ['serve', ...args];
|
||||
return spawnBackgroundProcess(mikePath, finalArgs, opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs `mike build`
|
||||
* @param pythonPath Path to Python 3 executable
|
||||
* @param mikePath Path to `mike` executable
|
||||
* @param args Extra args to `mike build`
|
||||
* @param opts Extra options to `teen_process.exec`
|
||||
*/
|
||||
async function doDeploy(
|
||||
pythonPath: string,
|
||||
mikePath: string,
|
||||
args: string[] = [],
|
||||
opts: TeenProcessExecOptions = {}
|
||||
) {
|
||||
const finalArgs = ['-m', NAME_MIKE, 'deploy', ...args];
|
||||
log.debug('Executing %s via: %s %O', NAME_MIKE, pythonPath, finalArgs);
|
||||
return await exec(pythonPath, finalArgs, opts);
|
||||
const finalArgs = ['deploy', ...args];
|
||||
log.debug('Executing %s via: %s %O', NAME_MIKE, mikePath, finalArgs);
|
||||
return await exec(mikePath, finalArgs, opts);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -125,6 +125,11 @@ export async function deploy({
|
||||
port,
|
||||
host,
|
||||
};
|
||||
|
||||
const mikePath = await findMike();
|
||||
if (!mikePath) {
|
||||
throw new DocutilsError(`Could not find ${NAME_MIKE} executable; please run "${NAME_BIN} init"`);
|
||||
}
|
||||
if (serve) {
|
||||
const mikeArgs = [
|
||||
...argify(_.pickBy(mikeOpts, (value) => _.isNumber(value) || Boolean(value))),
|
||||
@@ -135,7 +140,7 @@ export async function deploy({
|
||||
}
|
||||
stop(); // discard
|
||||
// unsure about how SIGHUP is handled here
|
||||
await doServe(pythonPath, mikeArgs, serveOpts);
|
||||
await doServe(mikePath, mikeArgs, serveOpts);
|
||||
} else {
|
||||
log.info('Deploying into branch %s', branch);
|
||||
const mikeArgs = [
|
||||
@@ -150,7 +155,7 @@ export async function deploy({
|
||||
if (alias) {
|
||||
mikeArgs.push(alias);
|
||||
}
|
||||
await doDeploy(pythonPath, mikeArgs, execOpts);
|
||||
await doDeploy(mikePath, mikeArgs, execOpts);
|
||||
|
||||
log.success('Finished deployment into branch %s (%dms)', branch, stop());
|
||||
}
|
||||
|
||||
@@ -100,8 +100,10 @@ export function parseNav(nav: MkDocsYmlNav): ParsedNavData[] {
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds all items within the list of parsed nav data which correpsond to the header. This is
|
||||
* imperfect, as it's possible for the header string to appear in multiple places in the nav, but let's just ignore that until we can't.
|
||||
* Finds all items within the list of parsed nav data which correpsond to the header.
|
||||
*
|
||||
* This is imperfect, as it's possible for the header string to appear in multiple places in the
|
||||
* nav, but let's just ignore that until we can't.
|
||||
* @param navData Some parsed nav data
|
||||
* @param header Header name
|
||||
*/
|
||||
@@ -110,6 +112,8 @@ function filterHeaderItems(navData: ParsedNavData[], header: string) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a root header keypath (like a prefix), a numeric offset, and some parsed nav data, compute
|
||||
* a keypath
|
||||
*
|
||||
* @param rootHeaderKeypath Root keypath as determined by {@linkcode getRootHeaderKeypath}
|
||||
* @param offset Numeric offset within the array of items for the header
|
||||
@@ -136,16 +140,16 @@ function navDataDidChange(
|
||||
newNavData: Array<Omit<ParsedNavData, 'name'>>,
|
||||
navData: ParsedNavData[]
|
||||
): boolean {
|
||||
const diff = _.xorWith(
|
||||
newNavData,
|
||||
navData,
|
||||
(a, b) => a.keypath === b.keypath && a.fileOrUrl === b.fileOrUrl
|
||||
);
|
||||
// the result should be the items from newNavData which either don't appear in
|
||||
// navdata, or the items which do appear in navData but have a different fileOrUrl
|
||||
const matchedKeypaths = _.intersectionBy(newNavData, navData, 'keypath');
|
||||
const diff = _.xorBy(newNavData, matchedKeypaths, 'fileOrUrl');
|
||||
return !_.isEmpty(diff);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the "root" keypath for a particular header
|
||||
*
|
||||
* @param headerItems Some subset of the nav data having keypaths corresponding to `header`
|
||||
* @param header Header string
|
||||
* @returns The keypath up to the header string, inclusive
|
||||
@@ -167,7 +171,6 @@ function getRootHeaderKeypath(headerItems: ParsedNavData[], header: string) {
|
||||
* by `dir`; if `all` is true, we just use the default header, because we will be returning a whole
|
||||
* lot of headers).
|
||||
*
|
||||
*
|
||||
* @param dir Abs path to directory containing markdown files generated by TypeDoc
|
||||
* @param mkDocsDocsDir Configured `docs_dir` or via options
|
||||
* @param navData Nav data parsed by {@linkcode parseNav}
|
||||
@@ -202,7 +205,6 @@ async function getNavItemsForDir(
|
||||
const offset = navHeaderItems.findIndex((item) => item.fileOrUrl === fileOrUrl);
|
||||
const newOffset = offset >= 0 ? offset : navHeaderItems.length;
|
||||
const data = navHeaderItems[offset];
|
||||
log.warn(rootHeaderKeypath, newOffset, data);
|
||||
const keypath = getKeypathForHeaderItem(rootHeaderKeypath, newOffset, data);
|
||||
newNavHeaderItems.push({keypath, fileOrUrl});
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ const opts = {
|
||||
remote: {
|
||||
alias: 'r',
|
||||
describe: 'Remote to push to',
|
||||
implies: ['deploy', 'push'],
|
||||
implies: 'push',
|
||||
group: BuildCommandGroup.Deploy,
|
||||
type: 'string',
|
||||
requiresArg: true,
|
||||
@@ -133,7 +133,7 @@ const opts = {
|
||||
},
|
||||
prefix: {
|
||||
describe: 'Subdirectory within <branch> to commit to',
|
||||
implies: ['deploy', 'branch'],
|
||||
implies: 'branch',
|
||||
group: BuildCommandGroup.Deploy,
|
||||
type: 'string',
|
||||
nargs: 1,
|
||||
@@ -168,9 +168,10 @@ const opts = {
|
||||
},
|
||||
rebase: {
|
||||
describe: 'Rebase <branch> with remote before deploy',
|
||||
implies: ['deploy', 'branch', 'remote'],
|
||||
implies: 'deploy',
|
||||
group: BuildCommandGroup.Deploy,
|
||||
type: 'boolean',
|
||||
defaultDescription: 'true',
|
||||
},
|
||||
serve: {
|
||||
describe: 'Start development server',
|
||||
|
||||
@@ -14,6 +14,7 @@ import {JsonValue} from 'type-fest';
|
||||
import {Application, TypeDocReader} from 'typedoc';
|
||||
import YAML from 'yaml';
|
||||
import {
|
||||
NAME_MIKE,
|
||||
NAME_MKDOCS_YML,
|
||||
NAME_NPM,
|
||||
NAME_PACKAGE_JSON,
|
||||
@@ -24,6 +25,7 @@ import {
|
||||
import {DocutilsError} from './error';
|
||||
import {getLogger} from './logger';
|
||||
import {MkDocsYml} from './model';
|
||||
import { exec } from 'teen_process';
|
||||
|
||||
const log = getLogger('fs');
|
||||
|
||||
@@ -228,6 +230,34 @@ const whichPython3 = _.partial(cachedWhich, `${NAME_PYTHON}3`, {nothrow: true});
|
||||
*/
|
||||
const whichTypeDoc = _.partial(cachedWhich, NAME_TYPEDOC, {nothrow: true});
|
||||
|
||||
/**
|
||||
* `mike` cannot be invoked via `python -m`, so we need to find the script.
|
||||
*/
|
||||
export const findMike = _.partial(async () => {
|
||||
// see if it's in PATH
|
||||
let mikePath = await cachedWhich(NAME_MIKE, {nothrow: true});
|
||||
if (mikePath) {
|
||||
return mikePath;
|
||||
}
|
||||
// if it isn't, it may be in a user dir
|
||||
const pythonPath = await findPython();
|
||||
if (!pythonPath) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// the user dir can be found this way.
|
||||
// usually it's something like ~/.local
|
||||
const {stdout} = await exec(pythonPath, ['-m', 'site', '--user-base']);
|
||||
if (stdout) {
|
||||
mikePath = path.join(stdout.trim(), 'bin', 'mike');
|
||||
if (await fs.isExecutable(mikePath)) {
|
||||
return mikePath;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch {}
|
||||
});
|
||||
|
||||
/**
|
||||
* Finds the `typedoc` executable.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/docutils",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"description": "Documentation generation utilities for Appium and related projects",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -49,7 +49,7 @@
|
||||
"start": "node ./build/lib/cli/index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@appium/tsconfig": "^0.3.0",
|
||||
"@appium/typedoc-plugin-appium": "^0.6.5",
|
||||
"@sliphua/lilconfig-ts-loader": "3.2.2",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [3.1.16](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.15...@appium/fake-plugin@3.1.16) (2023-06-14)
|
||||
|
||||
**Note:** Version bump only for package @appium/fake-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.1.15](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.14...@appium/fake-plugin@3.1.15) (2023-06-14)
|
||||
|
||||
**Note:** Version bump only for package @appium/fake-plugin
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/fake-plugin",
|
||||
"version": "3.1.15",
|
||||
"version": "3.1.16",
|
||||
"description": "A fake Appium 2.0 plugin",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -39,8 +39,8 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-plugin": "^2.2.11",
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/base-plugin": "^2.2.12",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@types/bluebird": "3.5.38",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [4.0.3](https://github.com/appium/appium/compare/@appium/support@4.0.2...@appium/support@4.0.3) (2023-06-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** Require the optional sharp dep properly from mjpeg module ([#18769](https://github.com/appium/appium/issues/18769)) ([c18eb03](https://github.com/appium/appium/commit/c18eb03261a4c0f73ec71417825a387da1c59991))
|
||||
|
||||
|
||||
|
||||
## [4.0.2](https://github.com/appium/appium/compare/@appium/support@4.0.1...@appium/support@4.0.2) (2023-06-14)
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ let _sharp;
|
||||
/**
|
||||
* @returns {import('sharp')}
|
||||
*/
|
||||
function requireSharp() {
|
||||
export function requireSharp() {
|
||||
if (!_sharp) {
|
||||
try {
|
||||
_sharp = require('sharp');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import _ from 'lodash';
|
||||
import log from './logger';
|
||||
import B from 'bluebird';
|
||||
import sharp from 'sharp';
|
||||
import {requireSharp} from './image-util';
|
||||
import {Writable} from 'stream';
|
||||
import {requirePackage} from './node';
|
||||
import axios from 'axios';
|
||||
@@ -77,7 +77,7 @@ class MJpegStream extends Writable {
|
||||
}
|
||||
|
||||
try {
|
||||
return await sharp(lastChunk).png().toBuffer();
|
||||
return await requireSharp()(lastChunk).png().toBuffer();
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/support",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.3",
|
||||
"description": "Support libs used across appium packages",
|
||||
"keywords": [
|
||||
"automation",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [3.0.17](https://github.com/appium/appium/compare/@appium/test-support@3.0.16...@appium/test-support@3.0.17) (2023-06-14)
|
||||
|
||||
**Note:** Version bump only for package @appium/test-support
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.0.16](https://github.com/appium/appium/compare/@appium/test-support@3.0.15...@appium/test-support@3.0.16) (2023-06-14)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/test-support",
|
||||
"version": "3.0.16",
|
||||
"version": "3.0.17",
|
||||
"description": "A collection of test utilities used across Appium packages",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -45,7 +45,7 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^4.0.2",
|
||||
"@appium/support": "^4.0.3",
|
||||
"@colors/colors": "1.5.0",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
|
||||
Reference in New Issue
Block a user