doc-detective-common 1.9.0 → 1.10.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/workflows/npm-publish.yml +0 -1
- package/.github/workflows/npm-test.yml +0 -1
- package/package.json +1 -1
- package/src/schemas/dereferenceSchemas.js +11 -0
- package/src/schemas/index.js +2 -28
- package/src/schemas/output_schemas/spec_v2.schema.json +3 -0
- package/src/schemas/output_schemas/test_v2.schema.json +3 -0
- package/src/schemas/output_schemas/typeKeys_v2.schema.json +3 -0
- package/src/schemas/schemas.json +4197 -0
- package/src/schemas/src_schemas/typeKeys_v2.schema.json +3 -0
package/package.json
CHANGED
|
@@ -61,6 +61,17 @@ async function dereferenceSchemas() {
|
|
|
61
61
|
// Write to file
|
|
62
62
|
fs.writeFileSync(`${outputDir}/${file}`, JSON.stringify(schema, null, 2));
|
|
63
63
|
}
|
|
64
|
+
// Build final schemas.json file
|
|
65
|
+
const schemas = {};
|
|
66
|
+
files.forEach(async (file) => {
|
|
67
|
+
const key = file.replace(".schema.json", "");
|
|
68
|
+
// Load schema from file
|
|
69
|
+
let schema = require(`${outputDir}/${file}`);
|
|
70
|
+
// Load into `schema` object
|
|
71
|
+
schemas[key] = schema;
|
|
72
|
+
});
|
|
73
|
+
fs.writeFileSync(`${__dirname}/schemas.json`, JSON.stringify(schemas,null,2));
|
|
74
|
+
|
|
64
75
|
// Clean up build dir
|
|
65
76
|
// fs.rm(buildDir, { recursive: true }, (err) => {
|
|
66
77
|
// if (err) throw err;
|
package/src/schemas/index.js
CHANGED
|
@@ -1,32 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
const schemas = {};
|
|
3
|
-
// Read files from schema directory
|
|
4
|
-
path = `${__dirname}/output_schemas`;
|
|
5
|
-
var files = [
|
|
6
|
-
"checkLink_v2.schema.json",
|
|
7
|
-
"config_v2.schema.json",
|
|
8
|
-
"context_v2.schema.json",
|
|
9
|
-
"find_v2.schema.json",
|
|
10
|
-
"goTo_v2.schema.json",
|
|
11
|
-
"httpRequest_v2.schema.json",
|
|
12
|
-
"runShell_v2.schema.json",
|
|
13
|
-
"saveScreenshot_v2.schema.json",
|
|
14
|
-
"setVariables_v2.schema.json",
|
|
15
|
-
"spec_v2.schema.json",
|
|
16
|
-
"test_v2.schema.json",
|
|
17
|
-
"typeKeys_v2.schema.json",
|
|
18
|
-
"wait_v2.schema.json",
|
|
19
|
-
];
|
|
20
|
-
// Loop through all schema files
|
|
21
|
-
files.forEach(async (file) => {
|
|
22
|
-
const key = file.replace(".schema.json", "");
|
|
23
|
-
// Load schema from file
|
|
24
|
-
let schema = require(`${path}/${file}`);
|
|
25
|
-
// Load into `schema` object
|
|
26
|
-
schemas[key] = schema;
|
|
27
|
-
});
|
|
1
|
+
const schemas = require("./schemas.json");
|
|
28
2
|
|
|
29
3
|
// Exports
|
|
30
4
|
exports.schemas = schemas;
|
|
31
5
|
|
|
32
|
-
|
|
6
|
+
console.log(schemas);
|