Comparing version 0.7.3 to 0.7.4
{ | ||
"name": "ajv-cmd", | ||
"version": "0.7.3", | ||
"version": "0.7.4", | ||
"description": "Deref, Validate, Transpile, and Test JSON-Schema (.json) files using ajv", | ||
@@ -115,3 +115,3 @@ "type": "module", | ||
"esbuild": "^0.24.0", | ||
"sast-json-schema": "0.0.0-alpha.0" | ||
"sast-json-schema": "^0.0.0-alpha.0" | ||
}, | ||
@@ -118,0 +118,0 @@ "funding": { |
13
sast.js
@@ -0,12 +1,5 @@ | ||
import { createRequire } from 'node:module' | ||
import Ajv from 'ajv/dist/2020.js' | ||
//import sastSchema from 'sast-json-schema/index.json' with { type: 'json' } | ||
// const sastSchema = await import('sast-json-schema/index.json', { | ||
// assert: { | ||
// type: 'json' | ||
// } | ||
// }) | ||
import { readFileSync } from 'node:fs' | ||
const __dirname = import.meta.dirname | ||
const defaultOptions = { | ||
@@ -17,4 +10,4 @@ strictTypes: false, | ||
const sastSchema = JSON.parse( | ||
readFileSync(__dirname + '/node_modules/sast-json-schema/index.json') | ||
const sastSchema = createRequire(import.meta.url)( | ||
'./node_modules/sast-json-schema/index.json' | ||
) | ||
@@ -21,0 +14,0 @@ export const sast = (schema, options = {}) => { |
Sorry, the diff of this file is not supported yet
130934
3743
+ Addedsast-json-schema@0.0.0-alpha.4(transitive)
- Removedsast-json-schema@0.0.0-alpha.0(transitive)