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

@fastyoke/sdk

v0.3.0

Published

Public SDK for FastYoke extensions — typed API clients, React primitives, and the extension loader contract.

Readme

@fastyoke/sdk

Typed clients, React primitives, and the extension loader contract for building FastYoke extensions.

Pre-1.0, expect breakage. This package is still stabilising — every minor version may change the wire shape or API surface. Pin an exact version in your extension's package.json and bump deliberately.

Install

npm install @fastyoke/sdk
# peer deps — bring your own React
npm install react react-dom

What this package gives you

  • Typed API clients for schemas, jobs, entities, pages, files, and extensions. Each method is typed end-to-end against the FastYoke REST API.
  • React context (<FastYokeProvider>, useFastYoke()) — host-supplied in your extension; you just consume.
  • Extension primitives (ExtensionBlockProps, ExtensionPageProps, ExtensionManifest types) — the prop contract your component must satisfy.
  • Zod schemas that mirror the Rust DTOs. Useful when you want to validate data from other sources or build test fixtures.

Minimum viable extension

// src/index.tsx
import { useFastYoke, type ExtensionBlockProps } from '@fastyoke/sdk';
import { useEffect, useState } from 'react';

export function MyWidget({ config, record }: ExtensionBlockProps) {
  const { entities } = useFastYoke();
  const [loaded, setLoaded] = useState<unknown>(null);

  useEffect(() => {
    if (!record?.id) return;
    void entities
      .get('my_entity', String(record.id))
      .then(setLoaded);
  }, [record?.id, entities]);

  return <pre>{JSON.stringify(loaded, null, 2)}</pre>;
}
// manifest.json
{
  "id": "example.my-widget",
  "version": "1.0.0",
  "components": [
    { "name": "MyWidget", "block_type": "custom:my_widget" }
  ],
  "pages": [],
  "required_scopes": ["data:read"]
}

Build your extension

The SDK must be marked external in your bundler so the host serves one shared SDK instance across all extensions. React family the same — the host's import map resolves react, react/jsx-runtime, react-dom, and react-dom/client to the same URLs every extension loads from.

esbuild

esbuild src/index.tsx \
  --bundle --format=esm --target=es2020 \
  --jsx=automatic \
  --outfile=dist/bundle.mjs \
  --external:react --external:react/jsx-runtime --external:@fastyoke/sdk

vite (library mode)

// vite.config.ts
export default {
  build: {
    lib: {
      entry: 'src/index.tsx',
      formats: ['es'],
      fileName: () => 'bundle.mjs',
    },
    rollupOptions: {
      external: ['react', 'react/jsx-runtime', 'react-dom', '@fastyoke/sdk'],
    },
  },
};

webpack

// webpack.config.js
module.exports = {
  experiments: { outputModule: true },
  output: { module: true, library: { type: 'module' } },
  externalsType: 'module',
  externals: {
    react: 'react',
    'react/jsx-runtime': 'react/jsx-runtime',
    'react-dom': 'react-dom',
    '@fastyoke/sdk': '@fastyoke/sdk',
  },
};

Install the bundle in a tenant

  1. Sign in to the FastYoke admin as an admin-role user.
  2. Navigate to Admin → Extensions.
  3. Click Install extension.
  4. Pick your manifest.json and compiled bundle.mjs.
  5. Review the requested scopes and confirm.

The bundle is virus-scanned, SHA-256'd, and persisted in a single transaction that deactivates any prior active version. It's available to the tenant immediately on the next page load.

Scope enforcement

Every mutating backend handler calls require_scope("family:action"). When your extension's JWT is missing the requested scope, the call returns 403 Forbidden. Declare every scope your extension needs in manifest.required_scopes.

The vocabulary is deliberately small:

| Scope | Covers | |---|---| | data:read | List/get entity records | | data:write | Create/patch entity records | | workflow:read | List/get schemas and jobs, read job history | | workflow:execute | Create jobs, fire transitions | | workflow:admin | Create schemas, admin-cancel jobs | | files:read | Download file blobs | | files:write | Upload/delete file blobs | | admin:* | Wildcard. Avoid unless you genuinely need admin-level breadth. |

An extension running with ["data:read", "workflow:execute"] can list entities and fire transitions; uploading a file or editing a schema is refused.

Versioning and stability

This package follows SemVer from 1.0 onward. Anything 0.x.y is experimental — minor versions may rename types, move exports, or change method signatures. When 1.0 ships, breaking changes require a major bump and a deprecation cycle.

See CHANGELOG.md for what changed in each release.

Pin exact versions during the 0.x window:

{
  "devDependencies": {
    "@fastyoke/sdk": "0.1.0"
  }
}

Getting help

License

MIT