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

@zalando/roadblock

Package Overview
Dependencies
Maintainers
9
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zalando/roadblock - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

24

cli.js

@@ -16,3 +16,3 @@ #!/usr/bin/env node

if (localConfigExist) {
console.log(' ✅ roadblock.json found - starting roadblock...');
console.log(' ✅ roadblock.json found - starting roadblock...');
const localConfig = require(localConfigPath);

@@ -26,3 +26,7 @@ const config = { ...util.defaultConfig, ...localConfig };

if (keyval.length > 1) {
dottie.set(config, keyval[0], JSON.parse(keyval[1]));
var val = keyval[1];
if (val.indexOf('[') == 0 || val.indexOf('{') == 0) {
val = JSON.parse(val);
}
dottie.set(config, keyval[0], val);
}

@@ -38,3 +42,3 @@ }

async function setup() {
console.log(' ℹ️ Creating roadblock.json configuration file');
console.log(' ℹ️ Creating roadblock.json configuration file');
var json = JSON.stringify(util.minimalConfig, null, 4);

@@ -44,3 +48,3 @@ fs.writeFileSync(localConfigPath, json, 'utf8');

console.log(
' ✅ Default config created - update the configuration and re-run the roadblock command'
' ✅ Default config created - update the configuration and re-run the roadblock command'
);

@@ -57,3 +61,3 @@ return true;

var externalClients = util.getClients().map(x => require(x));
context.client = Client(
context.client = await Client(
context.github,

@@ -70,3 +74,3 @@ context.database,

if (pre_funcs.length > 0) {
console.log(` ℹ️ Running ${pre_funcs.length} pre-processing tasks`);
console.log(` ℹ️ Running ${pre_funcs.length} pre-processing tasks`);

@@ -84,3 +88,3 @@ for (const task of pre_funcs) {

console.log(
` ℹ️ Running ${org_funcs.length} organisation tasks on ${
` ℹ️ Running ${org_funcs.length} organisation tasks on ${
orgs.length

@@ -107,3 +111,3 @@ } imported github organisations`

console.log(
` ℹ️ Running ${repo_funcs.length} repository tasks on ${
` ℹ️ Running ${repo_funcs.length} repository tasks on ${
repositories.length

@@ -139,3 +143,3 @@ } imported github repositories`

if (post_funcs.length > 0) {
console.log(` ℹ️ Running ${post_funcs.length} post-processing tasks`);
console.log(` ℹ️ Running ${post_funcs.length} post-processing tasks`);
for (const task of post_funcs) {

@@ -146,5 +150,5 @@ await task(context, config);

console.log(` ℹ️ Roadblock processing complete`);
console.log(` ℹ️ Roadblock processing complete`);
}
init();

@@ -10,2 +10,7 @@ const Base = require('./base.js');

this.schema = {
id: {
type: Sequelize.BIGINT,
primaryKey: true,
autoIncrement: true
},
date: Sequelize.DATE

@@ -12,0 +17,0 @@ };

@@ -16,3 +16,8 @@ // Classes for handling each type of data from github

module.exports = function(github, database, reset = false, externalTypes = []) {
module.exports = async function(
github,
database,
reset = false,
externalTypes = []
) {
var s = {};

@@ -93,4 +98,4 @@

database.sync({ force: reset });
await database.sync({ force: reset });
return s;
};
{
"name": "@zalando/roadblock",
"version": "1.0.1",
"version": "1.0.2",
"description": "node.js app to collect github data",

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

module.exports = async function(context, config) {
console.log(' 💾 Exporting statistics as json to /data');
console.log(' 💾 Exporting statistics as json to /data');

@@ -4,0 +4,0 @@ // Finally when everything has been saved to the Database,

module.exports = async function(context) {
var months = await context.client.Calendar.getAll(2014);
await context.client.Calendar.bulkCreate(months);
console.log(` ⬇️ Calendar Database data stored`);
console.log(` ⬇️ Calendar Database data stored`);
return;
};
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