doc-detective 3.1.1 → 3.1.2-dev.2
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/auto-dev-release.yml +1 -1
- package/.github/workflows/update-core.yaml +1 -0
- package/package.json +6 -4
- package/reference.png +0 -0
- package/samples/http.spec.yaml +3 -3
- package/samples/local-gui.md +1 -1
- package/test/artifacts/httpRequest.spec.yaml +3 -3
- package/test/runTests.test.js +1 -1
- package/test/server/index.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doc-detective",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2-dev.2",
|
|
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,14 @@
|
|
|
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.1.
|
|
37
|
-
"doc-detective-core": "^3.1.
|
|
36
|
+
"doc-detective-common": "^3.1.2-dev.2",
|
|
37
|
+
"doc-detective-core": "^3.1.2-dev.3",
|
|
38
38
|
"yargs": "^17.7.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
+
"body-parser": "^2.2.0",
|
|
41
42
|
"chai": "^5.2.0",
|
|
42
|
-
"
|
|
43
|
+
"express": "^5.1.0",
|
|
44
|
+
"mocha": "^11.7.1"
|
|
43
45
|
}
|
|
44
46
|
}
|
package/reference.png
ADDED
|
Binary file
|
package/samples/http.spec.yaml
CHANGED
|
@@ -2,7 +2,7 @@ tests:
|
|
|
2
2
|
- steps:
|
|
3
3
|
- loadVariables: env
|
|
4
4
|
- httpRequest:
|
|
5
|
-
url: http://localhost:
|
|
5
|
+
url: http://localhost:8092/api/users
|
|
6
6
|
method: post
|
|
7
7
|
request:
|
|
8
8
|
body:
|
|
@@ -13,7 +13,7 @@ tests:
|
|
|
13
13
|
name: John Doe
|
|
14
14
|
job: Software Engineer
|
|
15
15
|
- httpRequest:
|
|
16
|
-
url: http://localhost:
|
|
16
|
+
url: http://localhost:8092/api/users
|
|
17
17
|
method: post
|
|
18
18
|
request:
|
|
19
19
|
body:
|
|
@@ -29,7 +29,7 @@ tests:
|
|
|
29
29
|
variables:
|
|
30
30
|
ID: $$response.body.data[0].id
|
|
31
31
|
- httpRequest:
|
|
32
|
-
url: http://localhost:
|
|
32
|
+
url: http://localhost:8092/api/$ID
|
|
33
33
|
method: get
|
|
34
34
|
timeout: 1000
|
|
35
35
|
savePath: response.json
|
package/samples/local-gui.md
CHANGED
|
@@ -2,7 +2,7 @@ tests:
|
|
|
2
2
|
- steps:
|
|
3
3
|
- loadVariables: env
|
|
4
4
|
- httpRequest:
|
|
5
|
-
url: http://localhost:
|
|
5
|
+
url: http://localhost:8092/api/users
|
|
6
6
|
method: post
|
|
7
7
|
request:
|
|
8
8
|
body:
|
|
@@ -13,7 +13,7 @@ tests:
|
|
|
13
13
|
name: John Doe
|
|
14
14
|
job: Software Engineer
|
|
15
15
|
- httpRequest:
|
|
16
|
-
url: http://localhost:
|
|
16
|
+
url: http://localhost:8092/api/users
|
|
17
17
|
method: post
|
|
18
18
|
request:
|
|
19
19
|
body:
|
|
@@ -29,7 +29,7 @@ tests:
|
|
|
29
29
|
variables:
|
|
30
30
|
ID: $$response.body.data[0].id
|
|
31
31
|
- httpRequest:
|
|
32
|
-
url: http://localhost:
|
|
32
|
+
url: http://localhost:8092/api/$ID
|
|
33
33
|
method: get
|
|
34
34
|
timeout: 1000
|
|
35
35
|
savePath: response.json
|
package/test/runTests.test.js
CHANGED
|
@@ -8,7 +8,7 @@ const outputFile = path.resolve(`${artifactPath}/testResults.json`);
|
|
|
8
8
|
|
|
9
9
|
// Create a server with custom options
|
|
10
10
|
const server = createServer({
|
|
11
|
-
port:
|
|
11
|
+
port: 8092,
|
|
12
12
|
staticDir: './test/server/public',
|
|
13
13
|
modifyResponse: (req, body) => {
|
|
14
14
|
// Optional modification of responses
|
package/test/server/index.js
CHANGED
|
@@ -6,14 +6,14 @@ const fs = require("fs");
|
|
|
6
6
|
/**
|
|
7
7
|
* Creates an echo server that can serve static content and echo back API requests
|
|
8
8
|
* @param {Object} options - Configuration options
|
|
9
|
-
* @param {number} [options.port=
|
|
9
|
+
* @param {number} [options.port=8092] - Port to run the server on
|
|
10
10
|
* @param {string} [options.staticDir="public"] - Directory to serve static files from
|
|
11
11
|
* @param {Function} [options.modifyResponse] - Function to modify responses before sending
|
|
12
12
|
* @returns {Object} Server object with start and stop methods
|
|
13
13
|
*/
|
|
14
14
|
function createServer(options = {}) {
|
|
15
15
|
const {
|
|
16
|
-
port =
|
|
16
|
+
port = 8092,
|
|
17
17
|
staticDir = "public",
|
|
18
18
|
modifyResponse = (req, body) => body,
|
|
19
19
|
} = options;
|
|
@@ -117,7 +117,7 @@ module.exports = { createServer };
|
|
|
117
117
|
// If this file is run directly, start a server
|
|
118
118
|
if (require.main === module) {
|
|
119
119
|
const server = createServer({
|
|
120
|
-
port: process.env.PORT ||
|
|
120
|
+
port: process.env.PORT || 8092,
|
|
121
121
|
staticDir:
|
|
122
122
|
process.env.STATIC_DIR ||
|
|
123
123
|
path.join(process.cwd(), "./test/server/public"),
|