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

@skedulo/mex-fn-build

v0.0.2

Published

Bundler CLI for Skedulo MEX shared connected functions — bundles the backend entry and emits dist/info.json (libVersion + feature descriptors)

Readme

@skedulo/mex-fn-build

Bundler CLI for Skedulo MEX shared connected functions. A shared-function project depends on this as its single build devDependency and runs it via yarn bundle (which is just mex-fn-build). The same CLI runs locally and in the cloud builder, so a local bundle matches the cloud bundle exactly.

Commands

mex-fn-build (default, bundle)

Run from a shared-function project root, in strict order:

  1. Bundle src/index.backend.tsdist/index.backend.js with esbuild.
  2. Load the sharedFunctionFactory export from the freshly-built bundle.
  3. Read libVersion from the project's installed @skedulo/mex-service-libs.
  4. Derive feature descriptors via the project's describeSharedResources. Offline the resource thunk throws (no tenant token), so it falls back to an empty resource list + the real changeSets; the cloud builder re-derives and overwrites features.resources.
  5. Write dist/info.json = { libVersion, features }.

mex-fn-build serve [--port N]

Boots a local Koa dev server over the function's routes so a developer can exercise handlers before deploying. It rebuilds a non-minified dev bundle (dist/index.backend.dev.js, so the shipped dist/index.backend.js stays untouched), then wraps the bundle's handler dispatcher in Koa. Routes: POST /resource_fetch, /resource_descriptor, /changeset, /changeset_after.

Auth is per request via Authorization: Bearer <jwt> + Sked-Api-Server: <baseUrl> headers; for convenience these are injected from SKED_API_TOKEN / SKED_BASE_URL when a request omits them. Port defaults to 3000 (--port or PORT). koa / koa-bodyparser resolve from the project's SDK — no dependency is added.

Why it resolves the SDK from the project

The CLI declares no dependency on @skedulo/mex-service-libs. It resolves the SDK — both the libVersion and the derivation helpers — from the consuming project's node_modules (require.resolve(id, { paths: [projectRoot] })), the same discipline the cloud builder uses. If the CLI carried its own SDK copy, libVersion would reflect the CLI's pin instead of the version the function was authored against, silently mis-selecting the fetch/save invocation contract.

Usage

In a shared-function project:

// package.json
{
  "scripts": {
    "bundle": "mex-fn-build",
    "start": "mex-fn-build serve"
  },
  "devDependencies": { "@skedulo/mex-fn-build": "^0.0.1" }
}
yarn bundle          # -> dist/index.backend.js + dist/info.json
yarn start           # local dev server on :3000 (SKED_BASE_URL / SKED_API_TOKEN)

Local development of this package

Uses an isolated npm toolchain (independent of the repo's root Yarn project):

cd tools/mex-fn-build
npm install
npm run build        # tsc -> dist/cli.js