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

steampipes

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

steampipes - npm Package Compare versions

Comparing version 3.4.0 to 3.5.0

lib/_html-parser.js

23

lib/experiments/frameworkless-pipelines.js

@@ -1,7 +0,13 @@

// Generated by CoffeeScript 2.5.0
(function() {
//###########################################################################################################
/*
also see [Breaking Chains with Pipelines in Modern
JavaScript](https://www.wix.engineering/post/breaking-chains-with-pipelines-in-modern-javascript)
*/
'use strict';
/* TAINT can't return multiple values */
var $next, $show, $upper_case, CND, FS, OS, PATH, SP, alert, badge, d, debug, echo, help, info, isa, jr, log, rpr, test, type_of, urge, validate, warn, whisper;
var $, $async, $drain, $next, $show, $upper_case, $watch, CND, FS, OS, PATH, SP, alert, badge, d, debug, echo, help, info, isa, jr, log, rpr, test, type_of, urge, validate, warn, whisper;
//###########################################################################################################
CND = require('cnd');

@@ -11,3 +17,3 @@

badge = 'STEAMPIPES/TESTS/WYE2';
badge = 'STEAMPIPES/FRAMEWORKLESS-PIPELINES';

@@ -44,7 +50,4 @@ log = CND.get_logger('plain', badge);

// { $
// $async
// $drain
// $watch
// $show } = SP.export()
({$, $async, $drain, $watch, $show} = SP.export());
({d} = CND);

@@ -156,3 +159,1 @@

}).call(this);
//# sourceMappingURL=frameworkless-pipelines.js.map

@@ -1,2 +0,1 @@

// Generated by CoffeeScript 2.5.0
(function() {

@@ -48,2 +47,3 @@ 'use strict';

this.settings = settings;
this.HTML = require('./_html-parser');
}

@@ -89,3 +89,1 @@

}).call(this);
//# sourceMappingURL=main.js.map

@@ -1,5 +0,4 @@

// Generated by CoffeeScript 2.5.0
(function() {
//###########################################################################################################
var $, $async, $show, $watch, CND, FS, OS, PATH, SP, alert, badge, debug, defer, echo, help, info, inspect, jr, log, probes_and_matchers, read, rpr, test, urge, warn, whisper, xrpr;
var CND, FS, OS, PATH, alert, badge, debug, defer, echo, help, info, inspect, isa, jr, log, probes_and_matchers, read, rpr, show, test, type_of, types, urge, validate, warn, whisper, xrpr;

@@ -40,5 +39,11 @@ CND = require('cnd');

//...........................................................................................................
SP = require('../..');
// SP = require '../..'
// { $
// $async
// $watch
// $show } = SP.export()
//...........................................................................................................
types = require('../types');
({$, $async, $watch, $show} = SP.export());
({isa, validate, type_of} = types);

@@ -68,60 +73,514 @@ //...........................................................................................................

//-----------------------------------------------------------------------------------------------------------
probes_and_matchers = [["<!DOCTYPE html>"], ["<title>MKTS</title>"], ["<document/>"], ["<foo bar baz=42>"], ["something"], ["<br/>"], ["else"], ["</thing>"], ["</foo>"], ["</document>"], ["<title>MKTS</title>"], ["<p foo bar=42>omg</p>"], ["<document/><foo bar baz=42>something<br/>else</thing></foo>"], ["<!DOCTYPE html><html lang=en><head><title>x</title></head><p data-x='<'>helo</p></html>"], ["<p foo bar=42><em>Yaffir stood high</em></p>"], ["<p foo bar=42><em><xxxxxxxxxxxxxxxxxxx>Yaffir stood high</p>"], ["<p föö bär=42><em>Yaffir stood high</p>"], ["<document 文=zh/><foo bar baz=42>something<br/>else</thing></foo>"], ["<p foo bar=<>yeah</p>"], ["<p foo bar='<'>yeah</p>"], ["<p foo bar='&lt;'>yeah</p>"], ["<<<<<"], ["𦇻𦑛𦖵𦩮𦫦𧞈"]];
probes_and_matchers = [
[
"<!DOCTYPE html>",
[
{
"data": {
"html": true
},
"$key": "<!DOCTYPE"
}
],
null
],
[
"<title>MKTS</title>",
[
{
"$key": "<title"
},
{
"text": "MKTS",
"$key": "^text"
},
{
"$key": ">title"
}
],
null
],
[
"<document/>",
[
{
"$key": "<document"
},
{
"$key": ">document"
}
],
null
],
[
"<foo bar baz=42>",
[
{
"data": {
"bar": true,
"baz": "42"
},
"$key": "<foo"
}
],
null
],
[
"<br/>",
[
{
"$key": "<br"
},
{
"$key": ">br"
}
],
null
],
[
"</thing>",
[
{
"$key": ">thing"
}
],
null
],
[
"</foo>",
[
{
"$key": ">foo"
}
],
null
],
[
"</document>",
[
{
"$key": ">document"
}
],
null
],
[
"<title>MKTS</title>",
[
{
"$key": "<title"
},
{
"text": "MKTS",
"$key": "^text"
},
{
"$key": ">title"
}
],
null
],
[
"<p foo bar=42>omg</p>",
[
{
"data": {
"foo": true,
"bar": "42"
},
"$key": "<p"
},
{
"text": "omg",
"$key": "^text"
},
{
"$key": ">p"
}
],
null
],
[
"<document/><foo bar baz=42>something<br/>else</thing></foo>",
[
{
"$key": "<document"
},
{
"$key": ">document"
},
{
"data": {
"bar": true,
"baz": "42"
},
"$key": "<foo"
},
{
"text": "something",
"$key": "^text"
},
{
"$key": "<br"
},
{
"$key": ">br"
},
{
"text": "else",
"$key": "^text"
},
{
"$key": ">thing"
},
{
"$key": ">foo"
}
],
null
],
[
"<!DOCTYPE html><html lang=en><head><title>x</title></head><p data-x='<'>helo</p></html>",
[
{
"data": {
"html": true
},
"$key": "<!DOCTYPE"
},
{
"data": {
"lang": "en"
},
"$key": "<html"
},
{
"$key": "<head"
},
{
"$key": "<title"
},
{
"text": "x",
"$key": "^text"
},
{
"$key": ">title"
},
{
"$key": ">head"
},
{
"data": {
"data-x": "<"
},
"$key": "<p"
},
{
"text": "helo",
"$key": "^text"
},
{
"$key": ">p"
},
{
"$key": ">html"
}
],
null
],
[
"<p foo bar=42><em>Yaffir stood high</em></p>",
[
{
"data": {
"foo": true,
"bar": "42"
},
"$key": "<p"
},
{
"$key": "<em"
},
{
"text": "Yaffir stood high",
"$key": "^text"
},
{
"$key": ">em"
},
{
"$key": ">p"
}
],
null
],
[
"<p foo bar=42><em><xxxxxxxxxxxxxxxxxxx>Yaffir stood high</p>",
[
{
"data": {
"foo": true,
"bar": "42"
},
"$key": "<p"
},
{
"$key": "<em"
},
{
"$key": "<xxxxxxxxxxxxxxxxxxx"
},
{
"text": "Yaffir stood high",
"$key": "^text"
},
{
"$key": ">p"
}
],
null
],
[
"<p föö bär=42><em>Yaffir stood high</p>",
[
{
"data": {
"föö": true,
"bär": "42"
},
"$key": "<p"
},
{
"$key": "<em"
},
{
"text": "Yaffir stood high",
"$key": "^text"
},
{
"$key": ">p"
}
],
null
],
[
"<document 文=zh/><foo bar baz=42>something<br/>else</thing></foo>",
[
{
"data": {
"文": "zh"
},
"$key": "<document"
},
{
"$key": ">document"
},
{
"data": {
"bar": true,
"baz": "42"
},
"$key": "<foo"
},
{
"text": "something",
"$key": "^text"
},
{
"$key": "<br"
},
{
"$key": ">br"
},
{
"text": "else",
"$key": "^text"
},
{
"$key": ">thing"
},
{
"$key": ">foo"
}
],
null
],
[
"<p foo bar=<>yeah</p>",
[
{
"data": {
"foo": true,
"bar": "<"
},
"$key": "<p"
},
{
"text": "yeah",
"$key": "^text"
},
{
"$key": ">p"
}
],
null
],
[
"<p foo bar='<'>yeah</p>",
[
{
"data": {
"foo": true,
"bar": "<"
},
"$key": "<p"
},
{
"text": "yeah",
"$key": "^text"
},
{
"$key": ">p"
}
],
null
],
[
"<p foo bar='&lt;'>yeah</p>",
[
{
"data": {
"foo": true,
"bar": "&lt;"
},
"$key": "<p"
},
{
"text": "yeah",
"$key": "^text"
},
{
"$key": ">p"
}
],
null
],
[
"<<<<<",
[
{
"text": "<<<<",
"$key": "^text"
}
],
null
],
[
"something",
[
{
"text": "something",
"$key": "^text"
}
],
null
],
[
"else",
[
{
"text": "else",
"$key": "^text"
}
],
null
],
[
"<p>dangling",
[
{
"$key": "<p"
},
{
"text": "dangling",
"$key": "^text"
}
],
null
],
[
"𦇻𦑛𦖵𦩮𦫦𧞈",
[
{
"text": "𦇻𦑛𦖵𦩮𦫦𧞈",
"$key": "^text"
}
],
null
]
];
//-----------------------------------------------------------------------------------------------------------
this["_parse html to list"] = async function(T, done) {
var PARSER, error, i, len, matcher, probe;
PARSER = require('../html-parser');
show = function(html, datoms) {
var d, i, len;
help(CND.red(html));
for (i = 0, len = datoms.length; i < len; i++) {
d = datoms[i];
if (d.text != null) {
info(d.$key, CND.white(jr(d.text)));
} else {
if (d.data != null) {
info(d.$key, CND.yellow(jr(d.data)));
} else {
info(d.$key); // and ( Object.keys d.data ).length > 0
}
}
}
return null;
};
//-----------------------------------------------------------------------------------------------------------
this["parse html to list (onepiece)"] = async function(T, done) {
var SP, error, i, len, matcher, parse, probe;
SP = require('../..');
T.eq(type_of(SP.HTML.new_onepiece_parser), 'function');
parse = SP.HTML.new_onepiece_parser();
//.........................................................................................................
for (i = 0, len = probes_and_matchers.length; i < len; i++) {
[probe, matcher, error] = probes_and_matchers[i];
matcher = null;
await T.perform(probe, matcher, error, function() {
return new Promise(function(resolve, reject) {
var R, d, j, len1, parse, ref;
R = null;
help(CND.red(html));
parse = PARSER.new_parse_method();
ref = parse(html);
for (j = 0, len1 = ref.length; j < len1; j++) {
d = ref[j];
if (d.text != null) {
info(d.$key, CND.white(jr(d.text)));
} else {
if (d.data != null) {
info(d.$key, CND.yellow(jr(d.data)));
} else {
info(d.$key); // and ( Object.keys d.data ).length > 0
}
}
}
// R = []
// source = probe
// #.....................................................................................................
// pipeline_A = []
// pipeline_A.push source
// pipeline_A.push SP.$watch ( d ) -> info xrpr d
// pipeline_A.push SP.$collect { collector: R, }
// length_of_A = pipeline_A.length
// duct_A = SP.pull pipeline_A...
// T.eq duct_A.transforms.length, length_of_A
// T.eq duct_A.type, 'source'
resolve(R);
var html, result;
html = probe;
result = parse(html);
// show html, result
resolve(result);
return null;
});
});
//.........................................................................................................
done();
}
//.........................................................................................................
done();
return null;
};
// R = []
// source = probe
// #.....................................................................................................
// pipeline_A = []
// pipeline_A.push source
// pipeline_A.push SP.$watch ( d ) -> info xrpr d
// pipeline_A.push SP.$collect { collector: R, }
// length_of_A = pipeline_A.length
// duct_A = SP.pull pipeline_A...
// T.eq duct_A.transforms.length, length_of_A
// T.eq duct_A.type, 'source'
//###########################################################################################################
if (module.parent == null) {
// test @, 'timeout': 30000
test(this["parse html to list"]);
test(this["parse html to list (onepiece)"]);
}
}).call(this);
//# sourceMappingURL=html-parser.js.map
{
"name": "steampipes",
"version": "3.4.0",
"version": "3.5.0",
"description": "Fast, simple data pipelines",

@@ -5,0 +5,0 @@ "main": "lib/main.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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