Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aml-org/amf-custom-validator

Package Overview
Dependencies
Maintainers
11
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aml-org/amf-custom-validator - npm Package Compare versions

Comparing version 0.1.0-SNAPSHOT.0 to 0.1.0-SNAPSHOT.4

cli.js

8

index.js
require(__dirname + "/lib/wasm_exec");
const fs = require("fs");
const pako = require("pako");
const wasm_gz = fs.readFileSync(__dirname + "/lib/main.wasm.gz")
const wasm = pako.ungzip(wasm_gz)
let wasm_gz
let wasm

@@ -23,2 +23,6 @@ let INIT = false

} else {
if(!wasm_gz || !wasm) {
wasm_gz = fs.readFileSync(__dirname + "/lib/main.wasm.gz")
wasm = pako.ungzip(wasm_gz)
}
if (WebAssembly) {

@@ -25,0 +29,0 @@ WebAssembly.instantiate(wasm, go.importObject).then((result) => {

@@ -0,1 +1,6 @@

// wasm_exec.js obtained from https://github.com/golang/go/blob/758ac371ab930734053ed226ac62681e62ab8eea/misc/wasm/wasm_exec.js
// Log with custom changes (we should keep track if we diverge from original content):
// -
// ---------------------------------------------------
// Copyright 2018 The Go Authors. All rights reserved.

@@ -14,2 +19,3 @@ // Use of this source code is governed by a BSD-style

// - Parcel
// - Webpack

@@ -32,3 +38,3 @@ if (typeof global !== "undefined") {

const fs = require("fs");
if (Object.keys(fs) !== 0) {
if (typeof fs === "object" && fs !== null && Object.keys(fs).length !== 0) {
global.fs = fs;

@@ -561,2 +567,3 @@ }

if (
typeof module !== "undefined" &&
global.require &&

@@ -591,2 +598,2 @@ global.require.main === module &&

}
})();
})();
{
"name": "@aml-org/amf-custom-validator",
"version": "0.1.0-SNAPSHOT.0",
"version": "0.1.0-SNAPSHOT.4",
"description": "AMF validator backed by OPA Rego",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -18,3 +18,3 @@ const fs = require("fs");

let report = JSON.parse(r)
assert.ok(report["http://www.w3.org/ns/shacl#conforms"] === false)
assert.ok(report["conforms"] === false)
validator.validate(profile, data, false, (r,err) => {

@@ -25,3 +25,3 @@ if (err) {

let report = JSON.parse(r)
assert.ok(report["http://www.w3.org/ns/shacl#conforms"] === false)
assert.ok(report["conforms"] === false)
validator.exit();

@@ -28,0 +28,0 @@ done();

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc