cloudworker

package
v0.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

internal/publish/cloudworker

worker.js is the orch-cloud Worker that orch cloud setup deploys. It is a build artefact, never edited here.

  • Source: https://github.com/hectorcanaimero/orch-cloud, commit 3bb572c ("fix: the Worker would not start — a named export workerd read as an entrypoint").
  • Contract: API 1 (docs/CLOUD.md), the version internal/publish's client speaks.
  • Size / sha256: 14,254 bytes, 35248672dd1317ee4d51153ff88c78febb5f7fe35b28553f9190025f7597211f.

Regenerating

From a checkout of orch-cloud at the commit you want to ship:

npm ci
npx wrangler@4.131.1 deploy --dry-run --outdir dist
cp dist/index.js <orch>/internal/publish/cloudworker/worker.js

Do not copy index.js.map. Update the commit, size and sha256 above in the same PR, and bump WranglerVersion in cloudworker.go only together with a look at the deploy output orch cloud setup parses (internal/publish/cloudsetup.go).

TestScriptCarriesTheContractRoutes fails on an empty file or a bundle that no longer serves the contract's routes; it does not prove the bundle matches the commit above — that is what the sha256 here is for.

Documentation

Overview

Package cloudworker embeds the orch-cloud Worker that `orch cloud setup` deploys, so an operator needs Node.js for wrangler but not a checkout of the orch-cloud repository — and so the Worker a binary deploys always speaks the contract version that binary's client speaks.

worker.js is a build artefact of github.com/hectorcanaimero/orch-cloud, never edited here; README.md names the commit and the command that produced it.

Index

Constants

View Source
const CompatibilityDate = "2026-08-22"

CompatibilityDate is the Worker's compatibility date, the same as the orch-cloud repository's wrangler.jsonc.

View Source
const DefaultName = "orch-cloud"

DefaultName is the Worker name when --name is not given.

View Source
const WranglerVersion = "4.131.1"

WranglerVersion is the wrangler every `orch cloud setup` call runs (`npx --yes wrangler@<this>`). Pinned: a wrangler release that changes the deploy output or the login flow must not change what setup parses on the operator's machine without a PR that looks at it.

Variables

View Source
var Script []byte

Script is the bundled Worker, byte for byte as wrangler built it.

Functions

func Config

func Config(name string) ([]byte, error)

Config is the wrangler.jsonc deployed next to Script. It has no KV namespace id on purpose: wrangler provisions the namespace on the first deploy and reuses it afterwards, so a fresh machine has nothing to copy from the Cloudflare dashboard.

func ValidName

func ValidName(name string) error

ValidName reports whether name is a Worker name setup accepts: lowercase letters, digits and dashes, starting with a letter or digit, at most 63 characters — the part that becomes <name>.<subdomain>.workers.dev.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL