mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-01 15:37:32 +08:00
79f39a8c23
Adds client/packages/README.md covering what lives there, the bar for adding new packages, and common ops (pnpm --filter, postinstall, the dev-mode source alias). Cross-links from client/README.md so the main client docs point at it.
2.1 KiB
2.1 KiB
client/packages/
Workspace packages consumed by the main client as workspace:* deps. The main client (client/package.json, client/src/) is the workspace root.
| Package | Published | Purpose |
|---|---|---|
api-client/ |
Yes (@galaxyproject/galaxy-api-client) |
OpenAPI schema types, typed fetch client, error utilities. |
Criteria for adding a package
A package boundary has real cost. Adding one needs:
- Zero Galaxy-specific coupling (no stores, session, routing, auth).
- No existing npm substitute (don't republish
@vueuse/coreorlodashequivalents). - Either a real external consumer or a real internal architectural case -- a migration target, an enforced dependency-direction boundary. See the decomposition issue (#13336) before extracting.
How it works
client/pnpm-workspace.yamldeclarespackages/*as members; singleclient/pnpm-lock.yaml.- A
postinstallonclient/package.jsonbuilds each workspace package sodist/is present forvue-tscand productionvite build. client/vite.config.mjshas a conditionalresolve.aliasthat maps@galaxyproject/*imports directly to package source duringvite serve-- edits HMR without a rebuild. Production builds usedist/.
Published vs internal
Published packages have a Galaxy-release-tied version and ship via publish_artifacts.yaml. Internal packages ("private": true) exist for the architectural boundary only; flip to published by removing "private": true and adding a publish step.
Common ops (from client/)
pnpm install # workspace + postinstall builds
pnpm --filter @galaxyproject/galaxy-api-client test # scoped command
pnpm --filter @galaxyproject/galaxy-api-client run build
make update-client-api-schema # from galaxy root