npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@n04h/cdk-codepipeline-slack

v1.1.0-alpha.0

Published

Derivative of @cloudcomponents/cdk-codepipeline-slack

Readme

cdk-codepipeline-slack

npm version

AWS CodePipeline の承認アクションやパイプライン状態変更を Slack に通知する CDK Construct ライブラリ。

Derivative of @cloudcomponents/cdk-codepipeline-slack

Install

npm install @n04h/cdk-codepipeline-slack

Prerequisites

  • Slack Bot Token (xoxb-...)
  • Slack Signing Secret
  • 通知先の Slack チャンネル名 or チャンネルID

Slack App の作成方法については Slack API: Building apps を参照してください。

Usage

SlackApprovalAction

CodePipeline の手動承認ステージに Slack 連携を追加します。承認リクエストが Slack に通知され、Slack 上のボタンから承認/却下ができます。

import { SlackApprovalAction } from '@n04h/cdk-codepipeline-slack';

new Pipeline(this, 'Pipeline', {
  stages: [
    // ... source, build stages
    {
      stageName: 'Approve',
      actions: [
        new SlackApprovalAction({
          actionName: 'SlackApproval',
          slackBotToken: 'xoxb-your-bot-token',
          slackSigningSecret: 'your-signing-secret',
          slackChannel: 'deploy-notifications',
          slackBotName: 'DeployBot',
          slackBotIcon: ':rocket:',
          additionalInformation: 'Production deploy approval',
        }),
      ],
    },
  ],
});

SlackApprovalActionProps

| Prop | Type | Required | Description | | ----------------------- | ---------------- | -------- | -------------------------------------------------- | | actionName | string | Yes | CodePipeline アクション名 | | slackBotToken | string | Yes | Slack Bot Token | | slackSigningSecret | string | Yes | Slack Signing Secret | | slackChannel | string | No | 通知先チャンネル名(slackChannelId と排他) | | slackChannelId | string | No | 通知先チャンネルID(slackChannel と排他) | | slackChannelTypes | ChannelTypes[] | No | チャンネル種別。デフォルト: [ChannelTypes.PUBLIC] | | slackBotName | string | No | Bot の表示名 | | slackBotIcon | string | No | Bot のアイコン(emoji) | | additionalInformation | string | No | 承認リクエストの追加情報 | | externalEntityLink | string | No | 承認リクエストに付与する外部リンク |

SlackNotifier

CodePipeline のパイプライン/ステージの状態変更を Slack に通知します。

import { SlackNotifier } from '@n04h/cdk-codepipeline-slack';

const pipeline = new Pipeline(this, 'Pipeline', { /* ... */ });

new SlackNotifier(this, 'SlackNotifier', {
  pipeline,
  slackBotToken: 'xoxb-your-bot-token',
  slackSigningSecret: 'your-signing-secret',
  slackChannelId: 'C01234ABCDE',
  slackBotName: 'PipelineBot',
  stageNames: ['Deploy'], // 特定ステージのみ通知(省略で全ステージ)
});

SlackNotifierProps

| Prop | Type | Required | Description | | -------------------- | ---------------- | -------- | -------------------------------------------------- | | slackBotToken | string | Yes | Slack Bot Token | | slackSigningSecret | string | Yes | Slack Signing Secret | | slackChannel | string | No | 通知先チャンネル名(slackChannelId と排他) | | slackChannelId | string | No | 通知先チャンネルID(slackChannel と排他) | | slackChannelTypes | ChannelTypes[] | No | チャンネル種別。デフォルト: [ChannelTypes.PUBLIC] | | slackBotName | string | No | Bot の表示名 | | slackBotIcon | string | No | Bot のアイコン(emoji) | | pipeline | IPipeline | Yes | 通知対象のパイプライン | | stageNames | string[] | No | 通知対象のステージ名(省略で全ステージ) |

ChannelTypes

import { ChannelTypes } from '@n04h/cdk-codepipeline-slack';

// パブリックチャンネルのみ(デフォルト)
slackChannelTypes: [ChannelTypes.PUBLIC]

// パブリック + プライベート
slackChannelTypes: [ChannelTypes.PUBLIC, ChannelTypes.PRIVATE]

Architecture

SlackApprovalAction:
  CodePipeline Approval → SNS → Lambda (approval-requester) → Slack 通知
  Slack ボタン操作 → API Gateway → Lambda (approval-handler) → CodePipeline PutApprovalResult

SlackNotifier:
  CodePipeline 状態変更 → EventBridge Rule → Lambda (notifier) → Slack 通知

Development

# ビルド
npm run build

# テスト
npm test

# スナップショット更新
npm run test:updateSnapshot

How to Publish

# バージョン指定
npm version 1.1.0

# alphaバージョンの発行
npm version 1.1.0-alpha.0

# tagをpush
git push origin v1.1.0-alpha.0

# npmレジストリに公開
npm publish --access public