doc-detective 2.19.1-dev.0 → 3.0.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/.github/FUNDING.yml +14 -14
- package/.github/dependabot.yml +11 -11
- package/.github/workflows/electron-publish.yml +17 -17
- package/.github/workflows/npm-publish.yml +57 -57
- package/.github/workflows/npm-test.yaml +50 -50
- package/CONTRIBUTIONS.md +27 -27
- package/LICENSE +661 -21
- package/README.md +108 -124
- package/dev/dev.spec.json +62 -62
- package/dev/index.js +5 -5
- package/package.json +44 -46
- package/samples/.doc-detective.json +83 -83
- package/samples/doc-content-detect.md +10 -10
- package/samples/doc-content-inline-tests.md +27 -27
- package/samples/docker-hello.spec.json +14 -14
- package/samples/http.spec.json +26 -26
- package/samples/kitten-search-inline.md +15 -15
- package/samples/kitten-search.spec.json +28 -28
- package/samples/tests.spec.json +70 -70
- package/samples/variables.env +4 -4
- package/src/checkDependencies.js +84 -84
- package/src/index.js +49 -79
- package/src/utils.js +471 -251
- package/test/artifacts/cleanup.spec.json +18 -18
- package/test/artifacts/config.json +44 -44
- package/test/artifacts/doc-content.md +15 -15
- package/test/artifacts/env +2 -2
- package/test/artifacts/httpRequest.spec.json +55 -55
- package/test/artifacts/runShell.spec.json +29 -29
- package/test/artifacts/setup.spec.json +18 -18
- package/test/artifacts/test.spec.json +60 -60
- package/test/runTests.test.js +22 -22
- package/test/test-config.json +12 -12
- package/test/test-results.json +124 -124
- package/test/utils.test.js +170 -210
- package/test/runCoverage.test.js +0 -20
package/.github/FUNDING.yml
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# These are supported funding model platforms
|
|
2
|
-
|
|
3
|
-
github: [doc-detective] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
|
4
|
-
patreon: # Replace with a single Patreon username
|
|
5
|
-
open_collective: doc-detective # Replace with a single Open Collective username
|
|
6
|
-
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
-
liberapay: # Replace with a single Liberapay username
|
|
10
|
-
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
-
otechie: # Replace with a single Otechie username
|
|
12
|
-
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
13
|
-
polar: # Replace with a single Polar username
|
|
14
|
-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [doc-detective] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: doc-detective # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
13
|
+
polar: # Replace with a single Polar username
|
|
14
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
package/.github/dependabot.yml
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
-
# package ecosystems to update and where the package manifests are located.
|
|
3
|
-
# Please see the documentation for all configuration options:
|
|
4
|
-
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
-
|
|
6
|
-
version: 2
|
|
7
|
-
updates:
|
|
8
|
-
- package-ecosystem: "npm" # See documentation for possible values
|
|
9
|
-
directory: "/" # Location of package manifests
|
|
10
|
-
schedule:
|
|
11
|
-
interval: "weekly"
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "npm" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
name: Build and publish Electron bundles
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
# push:
|
|
5
|
-
# branches:
|
|
6
|
-
# - main
|
|
7
|
-
workflow_dispatch:
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
runs-on: macos-latest
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v3
|
|
14
|
-
- uses: actions/setup-node@v3
|
|
15
|
-
- run: cd frontend && npm i
|
|
16
|
-
- run: cd ../electron && npm i
|
|
17
|
-
- run: npm run publish
|
|
1
|
+
name: Build and publish Electron bundles
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# push:
|
|
5
|
+
# branches:
|
|
6
|
+
# - main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: macos-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v3
|
|
14
|
+
- uses: actions/setup-node@v3
|
|
15
|
+
- run: cd frontend && npm i
|
|
16
|
+
- run: cd ../electron && npm i
|
|
17
|
+
- run: npm run publish
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
-
|
|
4
|
-
name: Publish NPM package
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
release:
|
|
8
|
-
types: [created]
|
|
9
|
-
workflow_dispatch:
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
build:
|
|
13
|
-
runs-on: ${{ matrix.os }}
|
|
14
|
-
strategy:
|
|
15
|
-
matrix:
|
|
16
|
-
os:
|
|
17
|
-
- ubuntu-latest
|
|
18
|
-
- windows-latest
|
|
19
|
-
- macos-latest
|
|
20
|
-
node:
|
|
21
|
-
- 18
|
|
22
|
-
- 20
|
|
23
|
-
- 22
|
|
24
|
-
steps:
|
|
25
|
-
- uses: actions/checkout@v4
|
|
26
|
-
- uses: actions/setup-node@v4
|
|
27
|
-
with:
|
|
28
|
-
node-version: ${{ matrix.node }}
|
|
29
|
-
- run: npm ci
|
|
30
|
-
- run: npm test
|
|
31
|
-
|
|
32
|
-
publish-npm:
|
|
33
|
-
needs: build
|
|
34
|
-
runs-on: ubuntu-latest
|
|
35
|
-
steps:
|
|
36
|
-
- uses: actions/checkout@v4
|
|
37
|
-
- uses: actions/setup-node@v4
|
|
38
|
-
with:
|
|
39
|
-
registry-url: https://registry.npmjs.org/
|
|
40
|
-
- run: npm ci
|
|
41
|
-
- run: npm publish
|
|
42
|
-
env:
|
|
43
|
-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
44
|
-
|
|
45
|
-
# Test downstream consumers of the package
|
|
46
|
-
test-github-action:
|
|
47
|
-
name: Test GitHub Action
|
|
48
|
-
needs: publish-npm
|
|
49
|
-
runs-on: ubuntu-latest
|
|
50
|
-
steps:
|
|
51
|
-
- uses: actions/checkout@v4
|
|
52
|
-
- uses: doc-detective/github-action@latest
|
|
53
|
-
id: dd
|
|
54
|
-
with:
|
|
55
|
-
config: ./test/artifacts/config.json
|
|
56
|
-
input: ./test/artifacts/doc-content.md
|
|
57
|
-
exit_on_fail: "true"
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Publish NPM package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [created]
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ${{ matrix.os }}
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
os:
|
|
17
|
+
- ubuntu-latest
|
|
18
|
+
- windows-latest
|
|
19
|
+
- macos-latest
|
|
20
|
+
node:
|
|
21
|
+
- 18
|
|
22
|
+
- 20
|
|
23
|
+
- 22
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- uses: actions/setup-node@v4
|
|
27
|
+
with:
|
|
28
|
+
node-version: ${{ matrix.node }}
|
|
29
|
+
- run: npm ci
|
|
30
|
+
- run: npm test
|
|
31
|
+
|
|
32
|
+
publish-npm:
|
|
33
|
+
needs: build
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
- uses: actions/setup-node@v4
|
|
38
|
+
with:
|
|
39
|
+
registry-url: https://registry.npmjs.org/
|
|
40
|
+
- run: npm ci
|
|
41
|
+
- run: npm publish
|
|
42
|
+
env:
|
|
43
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
44
|
+
|
|
45
|
+
# Test downstream consumers of the package
|
|
46
|
+
test-github-action:
|
|
47
|
+
name: Test GitHub Action
|
|
48
|
+
needs: publish-npm
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v4
|
|
52
|
+
- uses: doc-detective/github-action@latest
|
|
53
|
+
id: dd
|
|
54
|
+
with:
|
|
55
|
+
config: ./test/artifacts/config.json
|
|
56
|
+
input: ./test/artifacts/doc-content.md
|
|
57
|
+
exit_on_fail: "true"
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
-
|
|
4
|
-
name: Run tests
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- main
|
|
10
|
-
pull_request:
|
|
11
|
-
types:
|
|
12
|
-
- opened
|
|
13
|
-
- reopened
|
|
14
|
-
- synchronize
|
|
15
|
-
workflow_dispatch:
|
|
16
|
-
|
|
17
|
-
jobs:
|
|
18
|
-
build:
|
|
19
|
-
runs-on: ${{ matrix.os }}
|
|
20
|
-
timeout-minutes: 10
|
|
21
|
-
strategy:
|
|
22
|
-
matrix:
|
|
23
|
-
os:
|
|
24
|
-
- ubuntu-latest
|
|
25
|
-
- windows-latest
|
|
26
|
-
- macos-latest
|
|
27
|
-
node:
|
|
28
|
-
- 18
|
|
29
|
-
- 20
|
|
30
|
-
- 22
|
|
31
|
-
steps:
|
|
32
|
-
- uses: actions/checkout@v4
|
|
33
|
-
|
|
34
|
-
- uses: actions/setup-node@v4
|
|
35
|
-
with:
|
|
36
|
-
node-version: ${{ matrix.node }}
|
|
37
|
-
|
|
38
|
-
- name: Cache node_modules
|
|
39
|
-
uses: actions/cache@v4
|
|
40
|
-
with:
|
|
41
|
-
# Cache key uses the contents of `package-lock.json` to identify unique cache
|
|
42
|
-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
43
|
-
restore-keys: |
|
|
44
|
-
${{ runner.OS }}-node-
|
|
45
|
-
path: |
|
|
46
|
-
node_modules
|
|
47
|
-
|
|
48
|
-
- run: npm ci
|
|
49
|
-
|
|
50
|
-
- run: npm test
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Run tests
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
pull_request:
|
|
11
|
+
types:
|
|
12
|
+
- opened
|
|
13
|
+
- reopened
|
|
14
|
+
- synchronize
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
runs-on: ${{ matrix.os }}
|
|
20
|
+
timeout-minutes: 10
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
os:
|
|
24
|
+
- ubuntu-latest
|
|
25
|
+
- windows-latest
|
|
26
|
+
- macos-latest
|
|
27
|
+
node:
|
|
28
|
+
- 18
|
|
29
|
+
- 20
|
|
30
|
+
- 22
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
|
|
34
|
+
- uses: actions/setup-node@v4
|
|
35
|
+
with:
|
|
36
|
+
node-version: ${{ matrix.node }}
|
|
37
|
+
|
|
38
|
+
- name: Cache node_modules
|
|
39
|
+
uses: actions/cache@v4
|
|
40
|
+
with:
|
|
41
|
+
# Cache key uses the contents of `package-lock.json` to identify unique cache
|
|
42
|
+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
43
|
+
restore-keys: |
|
|
44
|
+
${{ runner.OS }}-node-
|
|
45
|
+
path: |
|
|
46
|
+
node_modules
|
|
47
|
+
|
|
48
|
+
- run: npm ci
|
|
49
|
+
|
|
50
|
+
- run: npm test
|
package/CONTRIBUTIONS.md
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
# How to contribute
|
|
2
|
-
|
|
3
|
-
`doc-detective` welcomes contributions of all sorts (as do all Doc Detective projects). If you can't contribute code, you can still help by reporting issues, suggesting new features, improving the documentation, or sponsoring the project. Please follow the guidelines below.
|
|
4
|
-
|
|
5
|
-
## Reporting issues
|
|
6
|
-
|
|
7
|
-
If you find a bug, report it on the [GitHub issue tracker](https://github.com/doc-detective/doc-detective/issues).
|
|
8
|
-
|
|
9
|
-
## Contributing code
|
|
10
|
-
|
|
11
|
-
To contribute code,
|
|
12
|
-
|
|
13
|
-
1. Fork the project.
|
|
14
|
-
2. Create a new branch.
|
|
15
|
-
3. Make your changes.
|
|
16
|
-
4. Submit a pull request to the `rc` (release candidate) branch.
|
|
17
|
-
5. Wait for your pull request to be reviewed.
|
|
18
|
-
6. Make any necessary changes to your pull request.
|
|
19
|
-
7. Your pull request will be merged once it has been reviewed and approved.
|
|
20
|
-
|
|
21
|
-
## License
|
|
22
|
-
|
|
23
|
-
By contributing to `doc-detective`, you agree that your contributions will be licensed under the [MIT license](https://github.com/doc-detective/doc-detective/blob/main/LICENCE).
|
|
24
|
-
|
|
25
|
-
## Thank you
|
|
26
|
-
|
|
27
|
-
Thank you for your contributions! We appreciate your help in making the project better.
|
|
1
|
+
# How to contribute
|
|
2
|
+
|
|
3
|
+
`doc-detective` welcomes contributions of all sorts (as do all Doc Detective projects). If you can't contribute code, you can still help by reporting issues, suggesting new features, improving the documentation, or sponsoring the project. Please follow the guidelines below.
|
|
4
|
+
|
|
5
|
+
## Reporting issues
|
|
6
|
+
|
|
7
|
+
If you find a bug, report it on the [GitHub issue tracker](https://github.com/doc-detective/doc-detective/issues).
|
|
8
|
+
|
|
9
|
+
## Contributing code
|
|
10
|
+
|
|
11
|
+
To contribute code,
|
|
12
|
+
|
|
13
|
+
1. Fork the project.
|
|
14
|
+
2. Create a new branch.
|
|
15
|
+
3. Make your changes.
|
|
16
|
+
4. Submit a pull request to the `rc` (release candidate) branch.
|
|
17
|
+
5. Wait for your pull request to be reviewed.
|
|
18
|
+
6. Make any necessary changes to your pull request.
|
|
19
|
+
7. Your pull request will be merged once it has been reviewed and approved.
|
|
20
|
+
|
|
21
|
+
## License
|
|
22
|
+
|
|
23
|
+
By contributing to `doc-detective`, you agree that your contributions will be licensed under the [MIT license](https://github.com/doc-detective/doc-detective/blob/main/LICENCE).
|
|
24
|
+
|
|
25
|
+
## Thank you
|
|
26
|
+
|
|
27
|
+
Thank you for your contributions! We appreciate your help in making the project better.
|