Initial commit: ERP system with advance verification fixes

This commit is contained in:
System Administrator
2026-03-25 23:55:36 +07:00
commit 563ca12d76
5920 changed files with 828689 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
"use strict"
const testSuitePaths = {
draft6: "spec/JSON-Schema-Test-Suite/tests/draft6/",
draft7: "spec/JSON-Schema-Test-Suite/tests/draft7/",
draft2019: "spec/JSON-Schema-Test-Suite/tests/draft2019-09/",
tests: "spec/tests/",
security: "spec/security/",
extras: "spec/extras/",
async: "spec/async/",
}
const glob = require("glob")
const fs = require("fs")
for (const suite in testSuitePaths) {
const p = testSuitePaths[suite]
const files = glob.sync(`${p}{**/,}*.json`)
if (files.length === 0) {
console.error(`Missing folder ${p}\nTry: git submodule update --init\n`)
process.exit(1)
}
const code = files
.map((f) => {
const name = f.replace(p, "").replace(/\.json$/, "")
const testPath = f.replace(/^spec/, "..")
return `\n {name: "${name}", test: require("${testPath}")},`
})
.reduce((list, f) => list + f)
fs.writeFileSync(`./spec/_json/${suite}.js`, `module.exports = [${code}\n]\n`)
}