Docs/Getting Started

Installation

Package managers

npm
npm install @ambersecurityinc/notifly
pnpm
pnpm add @ambersecurityinc/notifly
yarn
yarn add @ambersecurityinc/notifly
bun
bun add @ambersecurityinc/notifly

Runtime requirements

notifly uses only the Web APIfetch, URL, and Promise. There are no Node.js built-ins (http, net, fs, etc.). This means it works in any environment that supports the Web API:

RuntimeMinimum versionNotes
Node.js18.0.0Native fetch available since Node 18
BunAnyFull Web API support
DenoAnyFull Web API support. Use npm: specifier
Cloudflare WorkersAnySee the CF Workers guide

TypeScript

notifly is written in TypeScript. Types are included in the package — no @types/* package needed.

types
import type {
  NotiflyMessage,
  NotiflyResult,
  NotiflyOptions,
  ServiceConfig,
  ServiceDefinition,
  ParseError,
  ServiceError,
} from '@ambersecurityinc/notifly';

ESM and CJS

The package ships both ESM (.js) and CommonJS (.cjs) builds with matching type declarations. Your bundler or runtime picks the correct format automatically via the exports field in package.json.

import styles
// ESM (default — recommended)
import { notify } from '@ambersecurityinc/notifly';

// CommonJS
const { notify } = require('@ambersecurityinc/notifly');

Builder sub-export

The headless URL builder is exported from a separate entry point to keep bundle sizes small when you only need the builder (e.g. in a config UI):

builder import
import {
  getServiceSchemas,
  validateFields,
  buildUrl,
  smartParse,
} from '@ambersecurityinc/notifly/builder';

Bundle size

The main notify entry point is small — each service adapter is tree-shakeable. The builder sub-export is independent and can be included in UI bundles without pulling in the network dispatch code.

Tip: If you're using Cloudflare Workers, check theCloudflare Workers guide for an examplewrangler.toml setup and environment variable handling.

← PreviousQuick StartNext →API Reference