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

@mortaelth/argo-ts

v0.1.3

Published

A cdk8s-based ArgoCD Config Management Plugin framework with self-deploying component hierarchy

Readme

argo-ts

A cdk8s-based ArgoCD Config Management Plugin framework that provides a self-deploying component hierarchy for Kubernetes infrastructure.

What is ArgoTS?

ArgoTS lets you define your Kubernetes infrastructure as a tree of TypeScript classes. Each class extending ArgoBootstrapApp automatically generates ArgoCD Application CRs for its children, creating a recursive self-deploying tree. ArgoCD then manages each component independently.

Key features:

  • Self-deploying hierarchy -- Define a root builder and leaf components; ArgoCD Application manifests are generated automatically
  • Component filtering -- Build individual components via ARGOCD_ENV_component environment variable
  • SOPS secrets -- Decrypt, cache, and optionally obfuscate SOPS-encrypted JSON secrets
  • General K8s utilities -- Resource conversion, memory ratio calculation, deep merge with null removal

Quick Start

npm install argo-ts
# peer dependencies
npm install cdk8s constructs @kubernetes-models/argo-cd

Minimal Example

import { App } from "cdk8s";
import { ArgoBootstrapApp, ArgoBootstrapAppProps, SynthesisFileManager, ComponentOutputManager } from "argo-ts";
import { Construct } from "constructs";

// A leaf component that creates Kubernetes resources
class MyApp extends ArgoBootstrapApp {
    protected build(): void {
        // Define your K8s resources here using cdk8s
    }
}

// A builder that composes leaf components into a tree
class RootBuilder extends ArgoBootstrapApp {
    protected build(): void {
        new MyApp(this, "my-app", {
            gitConfig: this.gitConfig,
            namespace: "my-namespace",
        }, {});
    }
}

// Entry point
const app = new App({ outdir: "dist" });
new RootBuilder(app, "root", {
    gitConfig: {
        gitRepoUrl: "https://github.com/your-org/your-infra.git",
        path: ".",
    },
    project: "default",
}, {});

app.synth();
SynthesisFileManager.renameSynthFiles(app);
ComponentOutputManager.printComponentToStdout("root");

ArgoCD CMP Plugin Setup

ArgoTS works as an ArgoCD Config Management Plugin. The plugin name is argo-ts -- configure your ArgoCD sidecar container to match:

apiVersion: v1
kind: ConfigMap
metadata:
  name: cmp-plugin
data:
  plugin.yaml: |
    apiVersion: argoproj.io/v1alpha1
    kind: ConfigManagementPlugin
    metadata:
      name: argo-ts
    spec:
      generate:
        command: [sh, -c, "node index.js"]

Use the provided Dockerfile as the sidecar image (Alpine + Node + Helm + SOPS + cdk8s-cli).

API Reference

ArgoBootstrapApp

Abstract base class. Extend it to define components:

| Prop | Type | Default | Description | |---|---|---|---| | gitConfig | GitConfig | required | Git repo URL, path, and revision | | project | string | "default" | ArgoCD project name (inherited down the tree) | | autoSyncEnabled | boolean | true | Enable ArgoCD auto-sync (inherited down the tree) | | namespace | string | "default" | Target Kubernetes namespace | | argoAppSpec | DeepOptional<IApplication["spec"]> | -- | Override any ArgoCD Application spec fields | | additionalSources | IApplication["spec"]["sources"] | -- | Additional sources for multi-source Applications |

SOPS Secrets

import { readSopsFile, loadAndMergeSecrets, clearSecretsCache } from "argo-ts";

// Read a single encrypted file
const secrets = readSopsFile<MySecrets>("path/to/secrets.enc.json");

// Merge global + local secrets
const merged = loadAndMergeSecrets<MySecrets>("global.enc.json", "local.enc.json");

// Options: disable obfuscation or base64 decoding
const raw = readSopsFile<MySecrets>("secrets.enc.json", { obfuscate: false, decode: false });

Regenerating ArgoCD Types

To update the bundled ArgoCD CRD types for a specific version:

./scripts/import-argocd-types.sh v2.13.3

This downloads CRDs from the ArgoCD GitHub repository and generates TypeScript types using cdk8s import.

License

Apache 2.0