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 🙏

© 2025 – Pkg Stats / Ryan Hefner

cdk-gitlab-codepipeline

v1.3.5

Published

AWS CDK Custom CodePipeline Source Action for GitLab

Readme

AWS Pipeline Tools

Pull Request Checks Release

A collection of AWS CDK constructs and custom actions that extend AWS CodePipeline capabilities, primarily focused on GitLab integration.

Remarks

The library is still in early development and will change quite frequently. So be aware of bugs.

Features

  • GitLab Source Action for AWS CodePipeline
  • Multiple trigger strategies:
    • Webhook-based triggering for automatic pipeline execution
    • Manual triggering for controlled deployments
  • Secure OAuth token handling via AWS Secrets Manager
  • Configurable branch selection
  • Support for both GitLab Cloud and self-hosted instances

Installation

npm install aws-pipeline-tools
# or
pnpm add aws-pipeline-tools
# or
yarn add aws-pipeline-tools

Usage

Basic Example

import { GitLabSourceAction, GitlabTrigger } from 'cdk-gitlab-codepipeline';

// Create a GitLab source action with webhook trigger
new GitLabSourceAction(this, GitlabTrigger.WEBHOOK, {
	actionName: 'Source',
	output: sourceOutput,
	host: 'gitlab.com',
	projectPath: '/my-group/my-project',
	projectId: '12345', // Required for webhook trigger
	branch: 'main',
	oauthToken: secretsManager.Secret.fromSecretNameV2(this, 'GitLabToken', 'gitlab-token'),
});

// Create a GitLab source action without webhook (manual trigger)
new GitLabSourceAction(this, GitlabTrigger.NONE, {
	actionName: 'Source',
	output: sourceOutput,
	host: 'gitlab.com',
	projectPath: '/my-group/my-project',
	branch: 'main',
	oauthToken: secretsManager.Secret.fromSecretNameV2(this, 'GitLabToken', 'gitlab-token'),
});

Required Permissions

The GitLab OAuth token needs the following permissions:

  • Repository read access for cloning the code
  • Webhook management (if using webhook trigger)

Architecture

The integration works by:

  1. Creating a custom source action in AWS CodePipeline
  2. Using AWS CodeBuild to clone the GitLab repository
  3. Implementing Lambda functions to handle webhook events and job processing
  4. Managing pipeline artifacts in S3
  5. Using EventBridge for orchestration

API Reference

GitLabSourceAction

Main class for creating a GitLab source action in AWS CodePipeline.

Properties

| Property | Type | Required | Description | | ----------- | -------- | ---------------- | ------------------------------------------------ | | host | string | Yes | GitLab host (e.g., 'gitlab.com') | | projectPath | string | Yes | Path to GitLab project (e.g., '/group/project') | | branch | string | Yes | Branch to checkout | | oauthToken | ISecret | Yes | GitLab OAuth token stored in Secrets Manager | | output | Artifact | Yes | Output artifact for pipeline | | projectId | string | Only for webhook | GitLab project ID (required for webhook trigger) |

Development

# Install dependencies
pnpm install

# Run tests
pnpm test

# Build
pnpm build

# Format code
pnpm format

Release Process

This project uses release-please for version management and publishing. The release process is automated through GitHub Actions.

How it works

  1. Make changes and commit them using Conventional Commits format:

    • feat: add new feature (bumps minor version)
    • fix: resolve bug (bumps patch version)
    • feat!: or fix!: or refactor!: etc. (bumps major version)
    • chore: update dependencies (no version bump)
  2. Push changes to the main branch. Release-please will:

    • Create/update a release PR
    • Update CHANGELOG.md
    • Bump version in package.json
    • Create GitHub releases
  3. When the release PR is merged:

    • A new GitHub Release is created
    • The package is automatically published to npm

License

MIT License

Author

hassma