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

blaze_compiler

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blaze_compiler - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

package.json
{
"name": "blaze_compiler",
"version": "0.0.5",
"version": "0.0.6",
"description": "Transpiles extendable, schema orientated definitions into Firebase security rules",

@@ -5,0 +5,0 @@ "author": "Tom Larkworthy",

var fs = require('fs');
var Json = require('../../src/processors/Json');
function testParse(test) {
function testParseJson(test) {
var json = Json.parse(fs.readFileSync("test/json/parser_test.json", { encoding: 'utf8' }).toString());

@@ -15,4 +15,26 @@

}
exports.testParse = testParse;
exports.testParseJson = testParseJson;
function testParseYaml(test) {
var json = Json.parse_yaml(fs.readFileSync("test/json/complicated.yaml", { encoding: 'utf8' }).toString());
test.equal(json.start.row, 1);
test.equal(json.start.col, 1);
var patternProperties = json.getOrThrow("patternProperties", "");
test.equal(patternProperties.start.row, 151);
test.equal(patternProperties.start.col, 19);
var wildchild = patternProperties.getOrThrow("\\$.+", "");
test.equal(wildchild.start.row, 153);
test.equal(wildchild.start.col, 5);
var object = json.lookup(["patternProperties", "\\$.+"]).toJSON();
test.deepEqual(object, { '$ref': 'http://firebase.com/schema#' });
test.ok(true);
test.done();
}
exports.testParseYaml = testParseYaml;
function compareJSYamlWithCustomJSYaml(test) {

@@ -19,0 +41,0 @@ var jsyaml = Json.parse_yaml(fs.readFileSync("test/json/complicated.yaml", { encoding: 'utf8' }).toString());

@@ -6,3 +6,3 @@ /// <reference path="../../types/node.d.ts" />

export function testParse(test:nodeunit.Test): void {
export function testParseJson(test:nodeunit.Test): void {
var json: Json.JValue = Json.parse(fs.readFileSync("test/json/parser_test.json", {encoding: 'utf8'}).toString());

@@ -21,3 +21,27 @@

export function testParseYaml(test:nodeunit.Test): void {
var json: Json.JValue = Json.parse_yaml(fs.readFileSync("test/json/complicated.yaml", {encoding: 'utf8'}).toString());
//console.log(JSON.stringify(json, null, 4));
test.equal(json.start.row, 1);
test.equal(json.start.col, 1);
//its a little inconsistent where exactly it notes the beginning, but its essentially right
var patternProperties = json.getOrThrow("patternProperties", "");
test.equal(patternProperties.start.row, 151); //the object after the key position
test.equal(patternProperties.start.col, 19);
var wildchild = patternProperties.getOrThrow("\\$.+", "");
test.equal(wildchild.start.row, 153);
test.equal(wildchild.start.col, 5);
var object = json.lookup(["patternProperties", "\\$.+"]).toJSON();
test.deepEqual(object, { '$ref': 'http://firebase.com/schema#' });
test.ok(true);
test.done();
}
export function compareJSYamlWithCustomJSYaml(test:nodeunit.Test): void {

@@ -24,0 +48,0 @@ //reading the data using our custom js-yaml parser

Sorry, the diff of this file is not supported yet

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