doc-detective 3.0.4 → 3.0.6
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/.github/workflows/npm-publish.yml +18 -1
- package/CONTRIBUTIONS.md +1 -1
- package/package.json +4 -4
- package/src/utils.js +5 -4
|
@@ -17,7 +17,7 @@ jobs:
|
|
|
17
17
|
- ubuntu-latest
|
|
18
18
|
- windows-latest
|
|
19
19
|
- macos-latest
|
|
20
|
-
node:
|
|
20
|
+
node:
|
|
21
21
|
- 18
|
|
22
22
|
- 20
|
|
23
23
|
- 22
|
|
@@ -55,3 +55,20 @@ jobs:
|
|
|
55
55
|
config: ./test/artifacts/config.json
|
|
56
56
|
input: ./test/artifacts/doc-content.md
|
|
57
57
|
exit_on_fail: "true"
|
|
58
|
+
|
|
59
|
+
build-docker-image:
|
|
60
|
+
name: Build Docker Image
|
|
61
|
+
needs: publish-npm
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@v4
|
|
65
|
+
|
|
66
|
+
- name: Get package version
|
|
67
|
+
run: echo "VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV
|
|
68
|
+
|
|
69
|
+
- name: Trigger GitHub Action in docker-image repo
|
|
70
|
+
run: |
|
|
71
|
+
curl -X POST -H "Authorization: token ${{ secrets.DOCKER_IMAGE_REPO_PAT }}" \
|
|
72
|
+
-H "Accept: application/vnd.github.everest-preview+json" \
|
|
73
|
+
"https://api.github.com/repos/doc-detective/docker-image/dispatches" \
|
|
74
|
+
-d '{ "event_type": "build-push", "client_payload": { "version": "${{ env.VERSION }}", "additional_info": "triggered from npm-publish workflow" } }'
|
package/CONTRIBUTIONS.md
CHANGED
|
@@ -20,7 +20,7 @@ To contribute code,
|
|
|
20
20
|
|
|
21
21
|
## License
|
|
22
22
|
|
|
23
|
-
By contributing to `doc-detective`, you agree that your contributions will be licensed under the [
|
|
23
|
+
By contributing to `doc-detective`, you agree that your contributions will be licensed under the [AGPL license](https://github.com/doc-detective/doc-detective/blob/main/LICENCE).
|
|
24
24
|
|
|
25
25
|
## Thank you
|
|
26
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doc-detective",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"description": "Treat doc content as testable assertions to validate doc accuracy and product UX.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"doc-detective": "src/index.js"
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"homepage": "https://github.com/doc-detective/doc-detective#readme",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
36
|
-
"doc-detective-common": "^3.0.
|
|
37
|
-
"doc-detective-core": "^3.0.
|
|
36
|
+
"doc-detective-common": "^3.0.6",
|
|
37
|
+
"doc-detective-core": "^3.0.7",
|
|
38
38
|
"yargs": "^17.7.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"chai": "^5.2.0",
|
|
42
|
-
"mocha": "^11.
|
|
42
|
+
"mocha": "^11.5.0"
|
|
43
43
|
}
|
|
44
44
|
}
|
package/src/utils.js
CHANGED
|
@@ -69,12 +69,10 @@ async function setConfig({ configPath, args }) {
|
|
|
69
69
|
});
|
|
70
70
|
if (!validation.valid) {
|
|
71
71
|
// Output validation errors
|
|
72
|
-
console.error("Invalid config.");
|
|
73
|
-
validation.errors.forEach((error) => {
|
|
74
|
-
console.error(error);
|
|
75
|
-
});
|
|
72
|
+
console.error("Invalid config.", validation.errors);
|
|
76
73
|
process.exit(1);
|
|
77
74
|
}
|
|
75
|
+
|
|
78
76
|
// Accept coerced and defaulted values
|
|
79
77
|
config = validation.object;
|
|
80
78
|
// Set default values
|
|
@@ -91,6 +89,9 @@ async function setConfig({ configPath, args }) {
|
|
|
91
89
|
telemetry: config.telemetry || { send: true },
|
|
92
90
|
};
|
|
93
91
|
// Override config values
|
|
92
|
+
if (configPath) {
|
|
93
|
+
config.configPath = configPath;
|
|
94
|
+
}
|
|
94
95
|
if (args.input) {
|
|
95
96
|
// If input includes commas, split it into an array
|
|
96
97
|
args.input = args.input.split(",").map((item) => item.trim());
|