New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ember-cli-deploy-webhooks

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-deploy-webhooks - npm Package Compare versions

Comparing version 0.4.2 to 1.0.0-beta.1

.template-lintrc.js

1

config/environment.js

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

/*jshint node:true*/
'use strict';

@@ -3,0 +2,0 @@

@@ -1,8 +0,6 @@

var RSVP = require('rsvp');
var CoreObject = require('core-object');
var request = require('request');
var merge = require('lodash/object/merge');
const RSVP = require('rsvp');
const CoreObject = require('core-object');
const request = require('request');
const merge = require('lodash/object/merge');
var post = RSVP.denodeify(request.post);
function optsValid(opts) {

@@ -13,3 +11,3 @@ return opts.url && opts.headers && opts.method && opts.body;

module.exports = CoreObject.extend({
init: function(options) {
init(options) {
this._plugin = options.plugin;

@@ -20,3 +18,3 @@

_defaults: function() {
_defaults() {
return {

@@ -26,12 +24,11 @@ method: 'POST',

json: true
}
};
},
send: function(serviceKey, opts) {
var opts = opts || {};
var plugin = this._plugin;
var makeRequest = RSVP.denodeify(this._client);
var critical = (('critical' in opts) ? delete opts.critical : false);
send(serviceKey, opts = {}) {
let plugin = this._plugin;
let makeRequest = RSVP.denodeify(this._client);
let critical = (('critical' in opts) ? delete opts.critical : false);
var requestOpts = merge(this._defaults(), opts);
let requestOpts = merge(this._defaults(), opts);

@@ -41,3 +38,3 @@ if (optsValid(requestOpts)) {

.then(function(response) {
var body = '';
let body = '';

@@ -52,10 +49,10 @@ if (response && response.body) {

if (critical && !(300 > response.statusCode && response.statusCode >= 200)) {
if (critical && !(response.statusCode < 300 && response.statusCode >= 200)) {
return RSVP.reject(response.statusCode);
}
plugin.log(serviceKey + ' => ' + body);
}.bind(this))
plugin.log(`${serviceKey} => ${body}`);
})
.catch(function(error) {
var errorMessage = serviceKey + ' => ' + error;
let errorMessage = `${serviceKey} => ${error}`;

@@ -68,3 +65,3 @@ if (critical) {

} else {
var warningMessage = 'No request issued! Request options invalid! You have to specify `url`, `headers`, `method` and `body`.';
let warningMessage = 'No request issued! Request options invalid! You have to specify `url`, `headers`, `method` and `body`.';

@@ -74,3 +71,3 @@ if (critical) {

}
plugin.log(serviceKey+' => '+warningMessage, { color: 'yellow', verbose: true });
plugin.log(`${serviceKey} => ${warningMessage}`, { color: 'yellow', verbose: true });
return RSVP.resolve();

@@ -77,0 +74,0 @@ }

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

var CoreObject = require('core-object');
var merge = require('lodash/object/merge');
var mapValues = require('lodash/object/mapValues');
var pick = require('lodash/object/pick');
const CoreObject = require('core-object');
const merge = require('lodash/object/merge');
const mapValues = require('lodash/object/mapValues');
const pick = require('lodash/object/pick');
module.exports = CoreObject.extend({
init: function(options) {
init(options) {
this.serviceOptions = merge(options.defaults, options.user, options.hook || {});
},
buildServiceCall: function(context) {
var opts = mapValues(this.serviceOptions, function(value) {
buildServiceCall(context) {
let opts = mapValues(this.serviceOptions, function(value) {
return typeof value === 'function' ? value.bind(this.serviceOptions)(context) : value;

@@ -14,0 +14,0 @@ }.bind(this));

{
"name": "ember-cli-deploy-webhooks",
"version": "0.4.2",
"version": "1.0.0-beta.1",
"description": "Ember CLI Deploy plugin for calling webhooks during deployments",
"keywords": [
"ember-addon",
"ember-cli-deploy-plugin"
],
"repository": "https://github.com/simplabs/ember-cli-deploy-webhooks",
"license": "MIT",
"author": "simplabs GmbH",
"directories": {

@@ -11,43 +18,10 @@ "doc": "doc",

"build": "ember build",
"start": "ember server",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"start": "ember serve",
"test": "node tests/runner.js"
},
"repository": "https://github.com/simplabs/ember-cli-deploy-webhooks",
"engines": {
"node": ">= 0.10.0"
},
"author": "simplabs GmbH",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.2.0",
"chai": "^3.3.0",
"chai-as-promised": "^5.1.0",
"ember-cli": "1.13.13",
"ember-cli-app-version": "^1.0.0",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "^1.1.0",
"ember-cli-htmlbars": "^1.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-ic-ajax": "0.2.4",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-qunit": "^1.0.4",
"ember-cli-release": "0.2.8",
"ember-cli-sri": "^1.2.0",
"ember-cli-uglify": "^1.2.0",
"ember-data": "1.13.15",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^1.0.4",
"ember-disable-prototype-extensions": "^1.0.0",
"ember-try": "~0.0.8",
"glob": "^5.0.15",
"mocha": "^2.3.3",
"nock": "^2.15.0"
},
"keywords": [
"ember-addon",
"ember-cli-deploy-plugin"
],
"dependencies": {
"core-object": "^1.1.0",
"ember-cli-babel": "^5.1.5",
"ember-cli-babel": "^6.16.0",
"ember-cli-deploy-plugin": "0.2.0",

@@ -58,2 +32,39 @@ "lodash": "^3.10.1",

},
"devDependencies": {
"@ember/optional-features": "^0.6.3",
"broccoli-asset-rev": "^2.7.0",
"chai": "^3.5.0",
"chai-as-promised": "^5.1.0",
"ember-ajax": "^3.1.0",
"ember-cli": "~3.4.3",
"ember-cli-dependency-checker": "^3.0.0",
"ember-cli-eslint": "^4.2.3",
"ember-cli-htmlbars": "^3.0.0",
"ember-cli-htmlbars-inline-precompile": "^1.0.3",
"ember-cli-inject-live-reload": "^1.8.2",
"ember-cli-qunit": "^4.3.2",
"ember-cli-sri": "^2.1.1",
"ember-cli-template-lint": "^1.0.0-beta.1",
"ember-cli-uglify": "^2.1.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.1.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-resolver": "^5.0.1",
"ember-source": "~3.4.0",
"ember-source-channel-url": "^1.1.0",
"ember-try": "^1.0.0",
"eslint-config-simplabs": "^0.4.0",
"eslint-plugin-ember": "^3.6.2",
"eslint-plugin-mocha": "^4.11.0",
"eslint-plugin-node": "^7.0.1",
"glob": "^5.0.15",
"loader.js": "^4.7.0",
"mocha": "^2.3.3",
"nock": "^2.15.0",
"qunit-dom": "^0.7.1"
},
"engines": {
"node": "6.* || 8.* || >= 10.*"
},
"ember-addon": {

@@ -60,0 +71,0 @@ "configPath": "tests/dummy/config"

@@ -40,3 +40,3 @@ # ember-cli-deploy-webhooks [![Build Status](https://travis-ci.org/simplabs/ember-cli-deploy-webhooks.svg)](https://travis-ci.org/simplabs/ember-cli-deploy-webhooks)

};
}
},
didActivate: true

@@ -85,3 +85,3 @@ }

###services
### services

@@ -98,2 +98,3 @@ An object that identifies all webhooks you want to notify. You will put a key for every service you want to call on deploy here.

- `auth` used for http-authentication
- `critical` if true, webhook failures will abort deploy

@@ -240,3 +241,3 @@ `auth` should be a hash containing values:

####bugsnag
#### bugsnag

@@ -286,3 +287,3 @@ To configure bugsnag you need to at least provide an `apiKey` and specify

####slack
#### slack

@@ -368,3 +369,3 @@ *Example:*

###httpClient
### httpClient

@@ -371,0 +372,0 @@ The underlying http-library used to send requests to the specified services. This allows users to customize the library that's used for http requests which is useful in tests but might be useful to some users as well. By default the plugin uses [request](https://github.com/request/request).

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