Skip to content

inngest@4.26.2

Choose a tag to compare

@inngest-release-bot inngest-release-bot released this 29 Oct 22:00
· 8 commits to main since this release
204e05e

Patch Changes

  • #1856 6193fc27 Thanks @jpwilliams! - Experimental: command shims for Sandboxes. tool.shim() makes a program on the command's PATH call a handler in your app first. The handler gets the command's sandbox, so it can do privileged work in your app and reply with the result, run the real program (as called, or with another argv, extra env or stdin), or refuse. Credentials never need to enter the sandbox:

    import { tool } from "inngest/experimental";
    
    await sandbox.$({
      shims: [
        tool.shim("terraform", ({ argv, run, refuse }) => {
          return argv[0] === "apply"
            ? refuse("apply goes through a pull request")
            : run();
        }),
        tool.shim.config({ REGION: "iad" }),
      ],
    }).sh`terraform plan && inngest-tool config REGION`;

    shims is accepted by commands.run() and # inngest and takes only tool.shim()values. Code in the sandbox reads settings withinngest-tool config NAMEand lists the shims withinngest-tool shims. Commands with tools or shims can now run longer than five minutes, exitCodesworks with them, and a timeout fails as asandbox_exec_timed_outerror. Shims use a small staticinngest-tool` binary that the SDK puts into the sandbox when it is missing.