Gathering detailed insights and metrics for goldwasher-schedule
Gathering detailed insights and metrics for goldwasher-schedule
Gathering detailed insights and metrics for goldwasher-schedule
Gathering detailed insights and metrics for goldwasher-schedule
npm install goldwasher-schedule
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
43 Commits
2 Watching
2 Branches
1 Contributors
Updated on 29 May 2015
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
2
Compared to previous week
Last month
-9.4%
29
Compared to previous month
Last year
53.6%
559
Compared to previous year
Plugin for goldwasher, using node-schedule to schedule goldwasher-needle requests at time intervals. Requires goldwasher to work.
npm install goldwasher-schedule
1var goldwasher = require('goldwasher-schedule'); 2var gs = goldwasher(targets, options); 3gs.on('result', function(results) { 4 console.log(results); 5}); 6gs.start(); 7gs.stop();
The first parameter required by the setup function is an array of targets. An example:
1[ 2 { 3 url: 'https://github.com', 4 rule: { second: [15, 35, 55] }, 5 goldwasher: { 6 selector: 'h1' 7 } 8 } 9]
url
is the only required parameter.
rule
is the schedule rule for node-schedule. In this case, 3 times a minute when second equals any of the three values (defaults to second: 1
, e.g. once a minute).
goldwasher
is an object of custom goldwasher options for this target.
Additionally, all other options used by goldwasher-needle can be passed along, such as needle
, goldwasherNeedle
and retry
. Have a look at their respective doc pages for goldwasher, needle and retry for options available.
If no other options than url
are set in the target, the defaults provided by the options parameter, explained below, will be used.
Options can be optionally passed in as the second parameter. It can contain the default values for targets. For instance:
1var options = { 2 rule: { second: 10 }, 3 goldwasher: { 4 selector: 'h1' 5 }, 6 needle: { 7 follow_max: 20 8 }, 9 retry: { 10 retries: 3 11 } 12}
These options will be applied to all targets that do not explicitly define them themselves. Note that if no rule is provided, it defaults to second: 1
, e.g. once a minute.
This module is an event emitter, that will emit events on start, stop, run, end and results. The results event will emit:
results
- the results from goldwasher.options
- the options (and target) the results have been collected with.response
- the response from goldwasher-needle.body
- the raw body from goldwasher-needle.1var gs = require('goldwasher-schedule'); 2 3// declare google.com a target 4var targets = [ 5 { 6 url: 'https://google.com' 7 } 8]; 9 10// set up the schedule 11gs(targets).start(); 12 13// receive the results 14gs.on('result', function(results) { 15 console.log(results); 16});
1var goldwasher = require('goldwasher-schedule'); 2 3// first will use default options below, second has custom options 4var targets = [ 5 { 6 url: 'https://google.com' 7 }, 8 { 9 url: 'https://github.com', 10 rule: { second: [15, 35, 55] }, 11 goldwasher: { 12 selector: 'h1' 13 } 14 } 15]; 16 17// default options 18var options = { 19 rule: { second: [1, 10, 20, 30, 40, 50] } 20}; 21 22// set up the schedule 23var gs = goldwasher(targets, options); 24 25// receive the results 26gs.on('result', function(results) { 27 console.log(results); 28}); 29 30// start the schedule 31gs.start(); 32 33// stop the schedule after 60 seconds 34setTimeout(function() { 35 gs.stop(); 36}, 60000);
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More