Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"prettier-plugin-svelte": "3.5.2",
"prettier-plugin-tailwindcss": "0.8.0",
"svelte-eslint-parser": "1.6.1",
"wrangler": "4.90.1"
"wrangler": "4.93.0"
},
"overrides": {
"@iconify/tools": "5.0.11",
Expand Down
71 changes: 62 additions & 9 deletions worker-configuration.d.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
/* eslint-disable */
// Generated by Wrangler by running `wrangler types` (hash: c7746b7b9512a492050296060eeb0a4b)
// Runtime types generated with workerd@1.20260508.1 2025-10-17 nodejs_compat
// Generated by Wrangler by running `wrangler types` (hash: ad94e3d4f0b09e36a00ce199c5a61442)
// Runtime types generated with workerd@1.20260518.1 2025-10-17 nodejs_compat
interface __BaseEnv_Env {
WEBSITE_CACHE: KVNamespace;
ASSETS: Fetcher;
}
declare namespace Cloudflare {
interface GlobalProps {
mainModule: typeof import("./src/worker");
}
interface Env {
WEBSITE_CACHE: KVNamespace;
ASSETS: Fetcher;
}
interface Env extends __BaseEnv_Env {}
}
interface Env extends Cloudflare.Env {}
interface Env extends __BaseEnv_Env {}

// Begin runtime types
/*! *****************************************************************************
Expand Down Expand Up @@ -10129,12 +10130,17 @@ interface ArtifactsTokenListResult {
/** Total number of tokens for the repository. */
total: number;
}
/** Handle for a single repository. Returned by Artifacts.get(). */
/**
* Handle for a single repository. Returned by Artifacts.get().
*
* Methods may throw `ArtifactsError` with code `INTERNAL_ERROR` if an unexpected service error occurs.
*/
interface ArtifactsRepo extends ArtifactsRepoInfo {
/**
* Create an access token for this repo.
* @param scope Token scope: "write" (default) or "read".
* @param ttl Time-to-live in seconds (default 86400, min 60, max 31536000).
* @throws {ArtifactsError} with code `INVALID_TTL` if ttl is out of range.
*/
createToken(scope?: 'write' | 'read', ttl?: number): Promise<ArtifactsCreateTokenResult>;
/** List tokens for this repo (metadata only, no plaintext). */
Expand All @@ -10143,27 +10149,59 @@ interface ArtifactsRepo extends ArtifactsRepoInfo {
* Revoke a token by plaintext or ID.
* @param tokenOrId Plaintext token or token ID.
* @returns true if revoked, false if not found.
* @throws {ArtifactsError} with code `INVALID_INPUT` if tokenOrId is empty.
*/
revokeToken(tokenOrId: string): Promise<boolean>;
// ── Fork ──
/**
* Fork this repo to a new repo.
* @param name Target repository name.
* @param opts Optional: description, readOnly flag, defaultBranchOnly (default true).
* @throws {ArtifactsError} with code `INVALID_REPO_NAME` if name is invalid.
* @throws {ArtifactsError} with code `ALREADY_EXISTS` if the target repo already exists.
* @throws {ArtifactsError} with code `FORK_IN_PROGRESS` if a fork is already running.
*/
fork(name: string, opts?: {
description?: string;
readOnly?: boolean;
defaultBranchOnly?: boolean;
}): Promise<ArtifactsCreateRepoResult>;
}
/** Artifacts binding — namespace-level operations. */
// ── Error types ──────────────────────────────────────────────────────────────
/**
* Error codes returned by Artifacts binding operations.
*
* Each code maps to a numeric code available on `ArtifactsError.numericCode`.
*/
type ArtifactsErrorCode = 'ALREADY_EXISTS' | 'NOT_FOUND' | 'IMPORT_IN_PROGRESS' | 'FORK_IN_PROGRESS' | 'INVALID_INPUT' | 'INVALID_REPO_NAME' | 'INVALID_TTL' | 'INVALID_URL' | 'REMOTE_AUTH_REQUIRED' | 'UPSTREAM_UNAVAILABLE' | 'MEMORY_LIMIT' | 'INTERNAL_ERROR';
/**
* Error thrown by Artifacts binding operations.
*
* Uses a string `.code` discriminator following the Cloudflare platform
* convention (StreamError, ImagesError, etc.). The `.numericCode` matches
* the REST API `errors[].code` values.
*/
interface ArtifactsError extends Error {
readonly name: 'ArtifactsError';
/** String error code for programmatic matching. */
readonly code: ArtifactsErrorCode;
/** Numeric error code matching the REST API. */
readonly numericCode: number;
}
// ── Binding ──────────────────────────────────────────────────────────────────
/**
* Artifacts binding — namespace-level operations.
*
* Methods may throw `ArtifactsError` with code `INTERNAL_ERROR` if an unexpected service error occurs.
*/
interface Artifacts {
/**
* Create a new repository with an initial access token.
* @param name Repository name (alphanumeric, dots, hyphens, underscores).
* @param opts Optional: readOnly flag, description, default branch name.
* @returns Repo metadata with initial token.
* @throws {ArtifactsError} with code `INVALID_REPO_NAME` if name is invalid.
* @throws {ArtifactsError} with code `ALREADY_EXISTS` if the repo already exists.
*/
create(name: string, opts?: {
readOnly?: boolean;
Expand All @@ -10174,12 +10212,23 @@ interface Artifacts {
* Get a handle to an existing repository.
* @param name Repository name.
* @returns Repo handle.
* @throws {ArtifactsError} with code `NOT_FOUND` if the repo does not exist.
* @throws {ArtifactsError} with code `IMPORT_IN_PROGRESS` if the repo is still importing.
* @throws {ArtifactsError} with code `FORK_IN_PROGRESS` if the repo is still forking.
*/
get(name: string): Promise<ArtifactsRepo>;
/**
* Import a repository from an external git remote.
* @param params Source URL and optional branch/depth, plus target name and options.
* @returns Repo metadata with initial token.
* @throws {ArtifactsError} with code `INVALID_REPO_NAME` if the target name is invalid.
* @throws {ArtifactsError} with code `INVALID_INPUT` if the source URL is not valid HTTPS.
* @throws {ArtifactsError} with code `INVALID_URL` if the source URL does not point to a git repository.
* @throws {ArtifactsError} with code `REMOTE_AUTH_REQUIRED` if the remote requires authentication.
* @throws {ArtifactsError} with code `NOT_FOUND` if the remote repository does not exist.
* @throws {ArtifactsError} with code `UPSTREAM_UNAVAILABLE` if the remote cannot be reached.
* @throws {ArtifactsError} with code `MEMORY_LIMIT` if the import exceeds service memory limits.
* @throws {ArtifactsError} with code `ALREADY_EXISTS` if the target repo already exists.
*/
import(params: {
source: {
Expand Down Expand Up @@ -10207,6 +10256,7 @@ interface Artifacts {
* Delete a repository and all associated tokens.
* @param name Repository name.
* @returns true if deleted, false if not found.
* @throws {ArtifactsError} with code `INVALID_REPO_NAME` if name is invalid.
*/
delete(name: string): Promise<boolean>;
}
Expand Down Expand Up @@ -13144,6 +13194,9 @@ declare namespace TailStream {
// 1. This is an Onset event
// 2. We are not inheriting any SpanContext. (e.g. this is a cross-account service binding or a new top-level invocation)
readonly spanId?: string;
// W3C trace flags from an upstream traceparent. Absent when no upstream
// sampling decision was made.
readonly traceFlags?: number;
}
interface TailEvent<Event extends EventType> {
// invocation id of the currently invoked worker stage.
Expand Down
Loading