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

ap3

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ap3 - npm Package Compare versions

Comparing version 0.2.16 to 0.2.17

21

lib/index.js

@@ -79,2 +79,3 @@ var request = require("request");

if (hosts) {
self._registrations = {};
self.logger.info("Registering plugin...");

@@ -92,5 +93,5 @@ process.once("SIGINT", function () {

self.on("remote_plugin_installed", function (key, settings) {
if (host.url === settings.baseUrl) {
self.logger.info("Registered with " + host.url + ".");
host.key = settings.clientKey;
if (stripCredentials(host) === settings.baseUrl) {
self.logger.info("Registered with " + settings.baseUrl + ".");
self._registrations[host] = settings.clientKey;
// @todo unsubscribe this webhook listener

@@ -137,4 +138,4 @@ }

var self = this;
var hosts = this.config.hosts();
if (hosts) {
if (self._registrations) {
var hosts = _.keys(self._registrations);
self.logger.info("Deregistering plugin...");

@@ -147,3 +148,5 @@ return Q.allResolved(hosts.map(_.bind(deregister, self))).then(

// @todo is there an uninstall webhook we can listen for for parity with register?
self.logger.info("Deregistered with host " + host.url + ".");
var bareHost = stripCredentials(host);
delete self._registrations[bareHost];
self.logger.info("Deregistered with host " + bareHost + ".");
}

@@ -204,2 +207,8 @@ });

function stripCredentials(url) {
url = urls.parse(url);
delete url.auth;
return urls.format(url);
}
module.exports = function (app, logger) {

@@ -206,0 +215,0 @@ if (!logger) logger = Logger();

@@ -42,3 +42,3 @@ var _ = require("underscore");

var row = result.rows[0];
if (row.hash) {
if (row && row.hash) {
var hs = row.hash;

@@ -45,0 +45,0 @@ hstore.parse(hs, dfd.resolve);

{
"name": "ap3",
"version": "0.2.16",
"version": "0.2.17",
"description": "Helper package for Atlassian Plugins 3 add-ons running on Express",

@@ -5,0 +5,0 @@ "dependencies": {

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