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

@jesse-ska-9/api-annotations

v0.1.0

Published

Publish-tier annotation scheme for SKA API surface elements (TS-036 upstream half — SPECKIT-SKA-API-002)

Readme

@jesse-ska-9/api-annotations

Publish-tier annotation scheme for SKA API surface elements. Implements the upstream half of TS-036 per SPECKIT-SKA-API-002.

The package provides:

  • @PublishTier(value) — TypeScript decorator applied at the route handler, DTO class, or class field level. Argument is a string-literal type constrained to 'public' | 'partner' | 'internal'; any other value fails TypeScript compilation.
  • PublishTierValue — the literal union type itself, exported for downstream type narrowing.
  • getPublishTier(target, propertyKey?) — metadata extraction helper that returns the tier value or undefined for unannotated elements (fail-closed inputs to the SPECKIT-SKA-API-002 §6 default behavior).

Mental model

The decorator is a classification stamp at the point of declaration. Analogous to how every document in a classified environment carries its classification level at the top of the page (UNCLASSIFIED / CONFIDENTIAL / SECRET), every SKA API surface element carries its tier at the site of declaration. A page without a stamp is treated as internal by default (SPECKIT §6 fail-closed); the sanitizer never emits an unstamped element to a lower-classification audience.

Usage

import 'reflect-metadata';
import { PublishTier } from '@jesse-ska-9/api-annotations';

@Controller('/v3/atoms')
export class AtomsController {
  @Post()
  @PublishTier('partner')
  createAtom(@Body() dto: CreateAtomDto): AtomResource {
    // ...
  }

  @Get(':id')
  @PublishTier('public')
  getAtom(@Param('id') id: string): AtomResource {
    // ...
  }

  @Delete(':id')
  // no @PublishTier → sanitizer treats as 'internal'
  deleteAtom(@Param('id') id: string): void {
    // ...
  }
}

@PublishTier('public')
export class AtomResource {
  id: string;

  @PublishTier('partner')   // property-level override
  partnerOnlyField: string;
}

Reading the metadata downstream (e.g., from a @nestjs/swagger extension):

import { getPublishTier } from '@jesse-ska-9/api-annotations';

// Class-level:
const classTier = getPublishTier(AtomResource);                // 'public'

// Method-level:
const methodTier = getPublishTier(
  AtomsController.prototype,
  'createAtom',
);                                                              // 'partner'

// Property-level:
const propTier = getPublishTier(
  AtomResource.prototype,
  'partnerOnlyField',
);                                                              // 'partner'

getPublishTier returns undefined for unannotated elements. The sanitization pipeline (SPECKIT-SKA-DEV-001 §7) treats undefined as internal per the SPECKIT-SKA-API-002 §6 fail-closed default; this package does not apply the default itself — that decision lives in the emitter, not the metadata helper, so the helper preserves the distinction between "absent" and "explicitly internal" for audit purposes.

Required TypeScript config

Consumer projects MUST set the following in their tsconfig.json:

{
  "compilerOptions": {
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true
  }
}

These match ska-core-api's configuration per SPECKIT-SKA-API-002 §4 (NestJS as the decorator runtime). reflect-metadata MUST be imported once at application entry (typically main.ts).

Status

v0.1.0 — Phase 1 of SPECKIT-SKA-API-002 (decorator + types + metadata helper). Phase 2 (@nestjs/swagger extension that emits x-publishTier into the generated OpenAPI document) lives in ska-core-api and is gated behind this package's NPM publication.

Trade Secret Classification

This package is the upstream half of the publish-tier annotation + sanitization pipeline registered as TS-036. The combined annotation + sanitization + blacklist + fail-closed pipeline is the material trade secret; this package alone is one structural component of it. See LICENSE.md and the SPECKIT references above.


© 2023–2026 Jesse Garza. All rights reserved.