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

@attlaz/project-base

v1.3.1

Published

Runtime for writing and running Attlaz flows in a Node/TypeScript project: discovers @Flow handlers, runs the requested one, and reports the result back to Attlaz.

Downloads

978

Readme

Attlaz Javascript/Node Base Project

Attlaz is a cloud-based iPaas (Integration Platform as a Service), automation and data management platform.

Latest Stable Version

@attlaz/project-base

Runtime for writing and running Attlaz flows in a Node/TypeScript project. You write flow handler classes; the package discovers them, runs the requested one, and reports the result back to Attlaz.

Install

npm install @attlaz/project-base attlaz-client
npm install -D typescript

Your flow code imports models/types (StorageItem, StorageType, …) from attlaz-client, so declare it alongside @attlaz/project-base — npm dedupes the two to a single shared copy. Add zod (npm install zod) only if you use argument validation, and @types/node (dev) if your flows use Node APIs.

Set up your project

package.json — add the build script (and "type": "module"):

{
  "type": "module",
  "scripts": { "build": "attlaz-project-base generate && tsc" }
}

tsconfig.json — ESM output with decorators enabled:

{
  "compilerOptions": {
    "module": "NodeNext",
    "moduleResolution": "NodeNext",
    "target": "ESNext",
    "rootDir": "./src",
    "outDir": "./dist",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "strict": true
  },
  "include": ["src/**/*.ts"]
}

.gitignore — the generated manifest is a build artifact:

src/flows.generated.ts

Write a flow

Decorate a class with @Flow. It can live anywhere under src/:

// src/GenerateInvoice.ts
import {Flow, FlowContext} from '@attlaz/project-base';
import {z} from 'zod'; // optional

@Flow({
    flowId: '26RrQfqi1qRltZ8vAq3F6nJcwOL',         // your Attlaz flow id
    arguments: z.object({clientName: z.string()}), // optional
})
export class GenerateInvoice {
    public async run(args: { clientName: string }, ctx: FlowContext): Promise<unknown> {
        ctx.logger.info(`Generating invoice for ${args.clientName}`);
        const sheetId = ctx.config.require('invoice_sheet_id'); // project config, from env
        // use ctx.client (an authenticated @attlaz/client) to do the work
        return {invoiceId: 123};
    }
}

ctx provides:

  • client — an authenticated @attlaz/client instance.
  • logger — level-aware logging to the flow run log: ctx.logger.info('msg', { context }) plus debug / notice / warning / error / critical / alert / emergency. The optional context object is attached to the entry. (Locally, or if the log stream can't be resolved, logs fall back to stdout.)
  • config — project configuration, backed by environment variables: ctx.config.require('key') (throws if unset), ctx.config.get('key'), plus getNumber / getBoolean. A local .env is loaded automatically for development; in production the worker injects the values.
  • request — flow id, run id, project environment, and logStreamId.

The value you return becomes the flow run result. Omit arguments to receive the raw arguments object (and skip the zod dependency entirely). Arguments are read from the flow run itself, so large argument sets are handled transparently.

Build

npm run build

This scans your @Flow classes into a manifest and compiles everything to dist/.

Run

On Attlaz, assign the Attlaz Node project run strategy to your code source and deploy — the worker runs your flows. To run one locally (with api_endpoint, api_token, … set in the environment, as the worker provides them):

node node_modules/@attlaz/project-base/dist/bin/cli.js flow:run <flowId> --arguments=<base64-json>