Buckets:
| # @zuke/jsr | |
| Typed [JSR](https://jsr.io) CLI task wrappers for | |
| [Zuke](https://github.com/zuke-build/zuke#readme) builds — `publish`, `add`, and | |
| `remove`. | |
| ```ts | |
| import { JsrTasks } from "@zuke/jsr"; | |
| await JsrTasks.publish((s) => s.dryRun().allowSlowTypes()); | |
| await JsrTasks.add((s) => s.packages("@std/assert")); | |
| ``` | |
| <!-- ZUKE:API:START --> | |
| ## API | |
| <details> | |
| <summary>Full typed API — generated from <code>deno doc</code></summary> | |
| ````text | |
| `@zuke/jsr` — tools for the JSR (https://jsr.io) registry in Zuke builds: | |
| typed `JsrTasks` wrappers for the `jsr` CLI (publish, add, remove), plus | |
| read-only registry queries to check which versions are already published. | |
| ```ts | |
| import { isPublished, JsrTasks } from "@zuke/jsr"; | |
| if (!(await isPublished("@zuke/core", "0.13.0"))) { | |
| await JsrTasks.publish((s) => s.allowDirty()); | |
| } | |
| await JsrTasks.add((s) => s.packages("@std/assert")); | |
| ``` | |
| @module | |
| async function isPublished(pkg: string, version: string, options?: JsrRegistryOptions): Promise<boolean> | |
| Whether `pkg@version` (e.g. `@zuke/core`, `0.13.0`) is already on JSR. | |
| async function jsrVersions(pkg: string, options: JsrRegistryOptions): Promise<Set<string>> | |
| The set of published versions of `pkg` (a scoped name like `@zuke/core`). | |
| Resolves to an empty set if the package is not found on JSR. | |
| function publishedVersions(meta: unknown): Set<string> | |
| The set of version strings present in a JSR `meta.json` payload. Tolerant of | |
| malformed input: anything without a `versions` object yields an empty set. | |
| const JsrTasks: JsrTasksApi | |
| Typed task functions for the `jsr` CLI. | |
| class JsrAddSettings extends JsrSettings | |
| Settings for `jsr add` (install a JSR dependency). | |
| packages(...specs: string[]): this | |
| Package specs to add, e.g. `@std/assert` (required). | |
| dev(): this | |
| Add as a development dependency (`--save-dev`). | |
| override protected buildArgs(): string[] | |
| Assemble the `jsr add` argv. | |
| class JsrPublishSettings extends JsrSettings | |
| Settings for `jsr publish`. | |
| dryRun(): this | |
| Validate without publishing (`--dry-run`). | |
| allowSlowTypes(): this | |
| Permit slow types in the published package (`--allow-slow-types`). | |
| allowDirty(): this | |
| Publish even with an uncommitted working tree (`--allow-dirty`). | |
| noCheck(): this | |
| Skip type-checking before publishing (`--no-check`). | |
| provenance(): this | |
| Attach provenance attestation in CI (`--provenance`). | |
| token(value: string): this | |
| Authenticate with a token instead of the interactive flow (`--token`). | |
| Registered with the run's redactor, so every rendering of the command | |
| masks it — a dry-run echo, a failure message. That is as far as it goes: | |
| `jsr publish` accepts the token only as a flag, so the value still reaches | |
| the child's argv, where `ps` and `/proc/<pid>/cmdline` expose it to every | |
| other user on the host and to every process the build starts. There is no | |
| environment variable to move it to. | |
| On GitHub Actions, prefer OIDC and pass no token at all: the publish is | |
| authenticated by the workflow's identity, so there is no credential to | |
| expose. This is for the cases where that is not available. | |
| override protected buildArgs(): string[] | |
| Assemble the `jsr publish` argv. | |
| class JsrRemoveSettings extends JsrSettings | |
| Settings for `jsr remove`. | |
| packages(...names: string[]): this | |
| Package names to remove (required). | |
| override protected buildArgs(): string[] | |
| Assemble the `jsr remove` argv. | |
| abstract class JsrSettings extends ToolSettings | |
| Base for all `jsr` subcommand settings: the binary is `jsr`. | |
| override protected defaultTool(): string | |
| The tool binary is `jsr`. | |
| interface JsrRegistryOptions | |
| Options shared by the JSR registry helpers. | |
| fetch?: typeof fetch | |
| The `fetch` implementation to use. Defaults to the global `fetch`; override | |
| it to unit-test without network access. | |
| interface JsrTasksApi | |
| The shape of {@link JsrTasks}. | |
| publish(configure?: Configure<JsrPublishSettings>): Promise<CommandOutput> | |
| Publish the package: `jsr publish`. | |
| add(configure?: Configure<JsrAddSettings>): Promise<CommandOutput> | |
| Add a JSR dependency: `jsr add`. | |
| remove(configure?: Configure<JsrRemoveSettings>): Promise<CommandOutput> | |
| Remove a dependency: `jsr remove`. | |
| ```` | |
| </details> | |
| <!-- ZUKE:API:END --> | |
Xet Storage Details
- Size:
- 4.31 kB
- Xet hash:
- a7ff2524ddf285ee6bc7a1787c23c358b38370698db6b5ad42e5916b37c149da
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.