It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
52%
Published
5 months ago (1.0.0)
Takopack Runtime
This module provides a lightweight runtime for executing unpacked .takopack
archives. It exposes a TakoPack class which loads extension code and attaches
a takos API instance to globalThis so that extension scripts can access the
Takos APIs.
import { TakoPack } from "@takopack/runtime"; const runtime = new TakoPack([ { manifest, server }, ], { fetch: customFetch, kv: { read: myRead }, events: { publish: myPublish, publishToClient: myPublishClient, }, }); await runtime.init(); const result = await runtime.callServer(manifest.identifier, "hello", [ "world", ]);
The assets.write API accepts an optional { cacheTTL } option following the
specification in docs/takopack/main.md.
The implementation is intentionally minimal and focuses on server-side
execution. The takos object exposes stub implementations of the APIs described
in docs/takopack/main.md.
Add Package
deno add jsr:@takopack/runtime
Import symbol
import * as runtime from "@takopack/runtime";
Import directly with a jsr specifier
import * as runtime from "jsr:@takopack/runtime";
Add Package
pnpm i jsr:@takopack/runtime
pnpm dlx jsr add @takopack/runtime
Import symbol
import * as runtime from "@takopack/runtime";
Add Package
yarn add jsr:@takopack/runtime
yarn dlx jsr add @takopack/runtime
Import symbol
import * as runtime from "@takopack/runtime";
Add Package
vlt install jsr:@takopack/runtime
Import symbol
import * as runtime from "@takopack/runtime";
Add Package
npx jsr add @takopack/runtime
Import symbol
import * as runtime from "@takopack/runtime";
Add Package
bunx jsr add @takopack/runtime
Import symbol
import * as runtime from "@takopack/runtime";