@appium/docutils 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base-mkdocs.yml +5 -1
- package/build/lib/builder/deploy.d.ts +5 -5
- package/build/lib/builder/deploy.d.ts.map +1 -1
- package/build/lib/builder/deploy.js +41 -41
- package/build/lib/builder/deploy.js.map +1 -1
- package/build/lib/builder/site.d.ts +5 -5
- package/build/lib/builder/site.d.ts.map +1 -1
- package/build/lib/builder/site.js +23 -23
- package/build/lib/builder/site.js.map +1 -1
- package/build/lib/cli/check.d.ts.map +1 -1
- package/build/lib/cli/check.js +10 -10
- package/build/lib/cli/check.js.map +1 -1
- package/build/lib/cli/index.d.ts +4 -0
- package/build/lib/cli/index.d.ts.map +1 -1
- package/build/lib/cli/index.js +4 -0
- package/build/lib/cli/index.js.map +1 -1
- package/build/lib/fs.d.ts.map +1 -1
- package/build/lib/fs.js.map +1 -1
- package/build/lib/init.d.ts +12 -12
- package/build/lib/init.d.ts.map +1 -1
- package/build/lib/init.js.map +1 -1
- package/build/lib/logger.d.ts +5 -0
- package/build/lib/logger.d.ts.map +1 -1
- package/build/lib/logger.js +5 -0
- package/build/lib/logger.js.map +1 -1
- package/build/lib/scaffold.d.ts +10 -10
- package/build/lib/scaffold.d.ts.map +1 -1
- package/build/lib/scaffold.js +10 -10
- package/build/lib/scaffold.js.map +1 -1
- package/build/lib/util.d.ts +1 -1
- package/build/lib/util.d.ts.map +1 -1
- package/build/lib/util.js.map +1 -1
- package/build/lib/validate.d.ts +42 -45
- package/build/lib/validate.d.ts.map +1 -1
- package/build/lib/validate.js +22 -22
- package/build/lib/validate.js.map +1 -1
- package/lib/builder/deploy.ts +120 -120
- package/lib/builder/site.ts +68 -68
- package/lib/cli/check.ts +13 -13
- package/lib/cli/index.ts +4 -0
- package/lib/fs.ts +2 -2
- package/lib/init.ts +54 -54
- package/lib/logger.ts +5 -0
- package/lib/scaffold.ts +94 -94
- package/lib/util.ts +2 -2
- package/lib/validate.ts +52 -53
- package/package.json +7 -7
- package/requirements.txt +1 -1
package/lib/validate.ts
CHANGED
|
@@ -41,6 +41,29 @@ const log = getLogger('validate');
|
|
|
41
41
|
*/
|
|
42
42
|
export type ValidationKind = typeof NAME_PYTHON | typeof NAME_MKDOCS;
|
|
43
43
|
|
|
44
|
+
export interface DocutilsValidatorOpts {
|
|
45
|
+
/**
|
|
46
|
+
* Current working directory
|
|
47
|
+
*/
|
|
48
|
+
cwd?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Path to `mkdocs.yml`
|
|
51
|
+
*/
|
|
52
|
+
mkdocsYml?: string;
|
|
53
|
+
/**
|
|
54
|
+
* If `true`, run Python validation
|
|
55
|
+
*/
|
|
56
|
+
python?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Path to `python` executable
|
|
59
|
+
*/
|
|
60
|
+
pythonPath?: string;
|
|
61
|
+
/**
|
|
62
|
+
* If `true`, run MkDocs validation
|
|
63
|
+
*/
|
|
64
|
+
mkdocs?: boolean;
|
|
65
|
+
}
|
|
66
|
+
|
|
44
67
|
/**
|
|
45
68
|
* This class is designed to run _all_ validation checks (as requested by the user), and emit events for
|
|
46
69
|
* each failure encountered.
|
|
@@ -51,6 +74,30 @@ export type ValidationKind = typeof NAME_PYTHON | typeof NAME_MKDOCS;
|
|
|
51
74
|
* @todo Use [`strict-event-emitter-types`](https://npm.im/strict-event-emitter-types)
|
|
52
75
|
*/
|
|
53
76
|
export class DocutilsValidator extends EventEmitter {
|
|
77
|
+
/**
|
|
78
|
+
* Emitted when validation begins with a list of validation kinds to be performed
|
|
79
|
+
* @event
|
|
80
|
+
*/
|
|
81
|
+
public static readonly BEGIN = 'begin';
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Emitted when validation ends with an error count
|
|
85
|
+
* @event
|
|
86
|
+
*/
|
|
87
|
+
public static readonly END = 'end';
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Emitted when a validation fails, with the associated {@linkcode DocutilsError}
|
|
91
|
+
* @event
|
|
92
|
+
*/
|
|
93
|
+
public static readonly FAILURE = 'fail';
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Emitted when a validation succeeds
|
|
97
|
+
* @event
|
|
98
|
+
*/
|
|
99
|
+
public static readonly SUCCESS = 'ok';
|
|
100
|
+
|
|
54
101
|
/**
|
|
55
102
|
* Current working directory. Defaults to `process.cwd()`
|
|
56
103
|
* @todo This cannot yet be overridden by user
|
|
@@ -82,30 +129,6 @@ export class DocutilsValidator extends EventEmitter {
|
|
|
82
129
|
*/
|
|
83
130
|
protected mkDocsYmlPath?: string;
|
|
84
131
|
|
|
85
|
-
/**
|
|
86
|
-
* Emitted when validation begins with a list of validation kinds to be performed
|
|
87
|
-
* @event
|
|
88
|
-
*/
|
|
89
|
-
public static readonly BEGIN = 'begin';
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Emitted when validation ends with an error count
|
|
93
|
-
* @event
|
|
94
|
-
*/
|
|
95
|
-
public static readonly END = 'end';
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Emitted when a validation fails, with the associated {@linkcode DocutilsError}
|
|
99
|
-
* @event
|
|
100
|
-
*/
|
|
101
|
-
public static readonly FAILURE = 'fail';
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Emitted when a validation succeeds
|
|
105
|
-
* @event
|
|
106
|
-
*/
|
|
107
|
-
public static readonly SUCCESS = 'ok';
|
|
108
|
-
|
|
109
132
|
private requirementsTxt: PipPackage[] | undefined;
|
|
110
133
|
|
|
111
134
|
/**
|
|
@@ -197,8 +220,11 @@ export class DocutilsValidator extends EventEmitter {
|
|
|
197
220
|
requiredPackages.push({name, version});
|
|
198
221
|
}
|
|
199
222
|
log.debug('Parsed %s: %O', NAME_REQUIREMENTS_TXT, requiredPackages);
|
|
200
|
-
} catch {
|
|
201
|
-
throw new DocutilsError(
|
|
223
|
+
} catch (e) {
|
|
224
|
+
throw new DocutilsError(
|
|
225
|
+
`Could not find ${REQUIREMENTS_TXT_PATH}. This is a bug`,
|
|
226
|
+
{cause: e}
|
|
227
|
+
);
|
|
202
228
|
}
|
|
203
229
|
|
|
204
230
|
return (this.requirementsTxt = requiredPackages);
|
|
@@ -392,30 +418,3 @@ export class DocutilsValidator extends EventEmitter {
|
|
|
392
418
|
this.ok('Python version OK');
|
|
393
419
|
}
|
|
394
420
|
}
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Options for {@linkcode DocutilsValidator} constructor
|
|
398
|
-
*/
|
|
399
|
-
|
|
400
|
-
export interface DocutilsValidatorOpts {
|
|
401
|
-
/**
|
|
402
|
-
* Current working directory
|
|
403
|
-
*/
|
|
404
|
-
cwd?: string;
|
|
405
|
-
/**
|
|
406
|
-
* Path to `mkdocs.yml`
|
|
407
|
-
*/
|
|
408
|
-
mkdocsYml?: string;
|
|
409
|
-
/**
|
|
410
|
-
* If `true`, run Python validation
|
|
411
|
-
*/
|
|
412
|
-
python?: boolean;
|
|
413
|
-
/**
|
|
414
|
-
* Path to `python` executable
|
|
415
|
-
*/
|
|
416
|
-
pythonPath?: string;
|
|
417
|
-
/**
|
|
418
|
-
* If `true`, run MkDocs validation
|
|
419
|
-
*/
|
|
420
|
-
mkdocs?: boolean;
|
|
421
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appium/docutils",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Documentation generation utilities for Appium and related projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -46,16 +46,16 @@
|
|
|
46
46
|
"start": "node ./build/lib/cli/index.js"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@appium/support": "7.
|
|
49
|
+
"@appium/support": "7.2.0",
|
|
50
50
|
"consola": "3.4.2",
|
|
51
|
-
"diff": "
|
|
51
|
+
"diff": "9.0.0",
|
|
52
52
|
"lilconfig": "3.1.3",
|
|
53
53
|
"lodash": "4.18.1",
|
|
54
54
|
"package-directory": "8.2.0",
|
|
55
55
|
"read-pkg": "10.1.0",
|
|
56
|
-
"teen_process": "4.1.
|
|
57
|
-
"type-fest": "5.
|
|
58
|
-
"yaml": "2.8.
|
|
56
|
+
"teen_process": "4.1.3",
|
|
57
|
+
"type-fest": "5.6.0",
|
|
58
|
+
"yaml": "2.8.4",
|
|
59
59
|
"yargs": "18.0.0",
|
|
60
60
|
"yargs-parser": "22.0.0"
|
|
61
61
|
},
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "915d767085c6b40ae90b7592d5130c76414ca3b5"
|
|
70
70
|
}
|
package/requirements.txt
CHANGED