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

slack-block-builder

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slack-block-builder - npm Package Compare versions

Comparing version 1.7.2 to 1.8.0

4

CHANGELOG.md
# Change Log
## v1.8.0 – 2020-11-25
* Add `fallback` to `Attachment` object.
## v1.7.2 – 2020-11-09

@@ -4,0 +8,0 @@

2

package.json
{
"name": "slack-block-builder",
"version": "1.7.2",
"version": "1.8.0",
"description": "Maintainable code for interactive Slack messages, modals and home tabs. A must-have for the Slack Block Kit framework.",

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

@@ -11,2 +11,3 @@ const { Bit } = require('./base');

this.color = params.color;
this.fallback = params.fallback;
this.blocks = params.blocks;

@@ -23,2 +24,3 @@

this.props.color = params.color;
this.props.fallback = params.fallback;

@@ -42,2 +44,15 @@ this.finalizeConstruction();

/**
* Sets the plain text summary of the attachment used in clients that don't show formatted text (eg. IRC, mobile notifications).
*
* {@link https://api.slack.com/reference/messaging/attachments|View in Slack API Documentation}
*
* @param {string} string
* @return {this} The instance on which the method is called
*/
fallback(string) {
return this.set(string, props.fallback);
}
/**
* Adds Blocks to the Attachment object

@@ -44,0 +59,0 @@ *

@@ -13,2 +13,3 @@ declare module 'slack-block-builder' {

color?: string;
fallback?: string;
}

@@ -18,2 +19,3 @@

color(color: string): this;
fallback(fallback: string): this;
blocks(...blocks: Array<Block.Block | Block.Block[]>): this;

@@ -20,0 +22,0 @@ }

@@ -62,2 +62,3 @@ module.exports = {

color: 'color',
fallback: 'fallback',
attachments: 'attachments',

@@ -64,0 +65,0 @@ dispatchAction: 'dispatch_action',

@@ -66,2 +66,3 @@ module.exports = {

color: 'color',
fallback: 'fallback',
attachments: 'attachments',

@@ -68,0 +69,0 @@ dispatchAction: 'dispatchAction',

@@ -48,3 +48,3 @@ const { ValidationHelper } = require('../helpers');

/**
* @protected
* @private
*/

@@ -64,3 +64,3 @@

/**
* @protected
* @private
*/

@@ -67,0 +67,0 @@

@@ -66,2 +66,3 @@ const types = require('./type-validators');

color: types.isString,
fallback: types.isString,
attachments: types.areAttachments,

@@ -68,0 +69,0 @@ dispatchAction: types.isBool,

@@ -112,4 +112,4 @@ const Validator = require('../lib/validator');

condition: (value) => new RegExp('([0-2][0-9]:[0-9][0-9])').test(value),
message: 'String in the \'HH:mm\' format, where \'HH\' is the 24-hour format of an hour, and \'mm\' is minutes with leading zero'
message: 'String in the \'HH:mm\' format, where \'HH\' is the 24-hour format of an hour, and \'mm\' is minutes with leading zero',
}),
};
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