Repository navigation
refactor!: rename to cryptos-web as a monorepo - #152
Merged
Merged
Conversation
The repository is now CryptOS-PKI/cryptos-web, laid out as npm workspaces: - apps/console: the Fleet Manager UI, moved unchanged from the repo root (@cryptos-pki/console). - packages/ui: the UI kit, holding the design tokens (tokens.css, the light and dark palettes) moved out of the console's index.css, which now imports them. The built CSS is byte-identical. - packages/api-client: the TypeScript stubs for both APIs, generated with protoc-gen-es from cryptos-node/proto and cryptos-manager/proto at the commits pinned in proto-refs.env (npm run generate). They replace the hand-copied src/gen/fleet tree, and the node types move to cryptos.node.v1. Lint and formatting run across the repo from the root, and test and build run in every workspace. Web CI installs a checksum-pinned buf and fails when the generated stubs don't match the pinned protos. The packages/api-client import test checks a node and a fleet type resolve. BREAKING CHANGE: the console bundle builds to apps/console/dist, the package.json and lockfile at the root describe a workspace, and the stubs are imported from @cryptos-pki/api-client. Signed-off-by: Bugs5382 <Bugs5382@users.noreply.github.com>
Signed-off-by: Bugs5382 <Bugs5382@users.noreply.github.com>
Contributor
Author
|
Closing summary: the repo is renamed to cryptos-web and is now an npm workspaces monorepo, with apps/console (the unchanged console), packages/ui (the design tokens, and the built CSS is byte-identical) and packages/api-client (stubs built from the cryptos-node and cryptos-manager protos at pinned commits, replacing the hand-copied tree). Web CI checks the stubs match the pins. All checks are green. cryptos-manager#169 follows, for the image build. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The repository is now
CryptOS-PKI/cryptos-web(renamed on GitHub; the old URLs redirect), and it becomes an npm workspaces monorepo:apps/console: the Fleet Manager UI (@cryptos-pki/console), moved unchanged from the repo root (git mv, so history follows).packages/ui(@cryptos-pki/ui): the UI kit. It holds the design tokens (tokens.css, the light and dark palettes), which moved out of the console'sindex.css; the console now imports them. The built CSS is byte-identical tomain's, with the same asset hash.packages/api-client(@cryptos-pki/api-client): the TypeScript stubs for both APIs. protoc-gen-es (pinned as a devDependency) builds them fromcryptos-node/protoandcryptos-manager/proto, at the commits pinned inproto-refs.env(refactor!: rename to cryptos-node and own the node API protos cryptos-node#342 and refactor!: rename to cryptos-manager and own the fleet API protos cryptos-manager#168 merges). They replace the hand-copiedsrc/gen/fleettree. Imports become@cryptos-pki/api-client/cryptos/node/v1/...and.../cryptos/fleet/v1/.... Apart from thecryptos.v1tocryptos.node.v1package rename, the generated types match the old copy (one comment differs).npm testandnpm run buildrun in every workspace.npm run generateregenerates the stubs and needsbuf. Web CI installs a checksum-pinned buf and fails whenpackages/api-client/src/gendoesn't match the pinned protos.npm workspaces rather than pnpm, so the lockfile,
npm ciand the manager image build keep working with the tooling they already use.Follow-up: the manager's image build copies
web/package.jsonandweb/dist. A companion cryptos-manager PR points it at the workspace (apps/console/dist) and atCryptOS-PKI/cryptos-web, and lands right after this one.Breaking: the bundle builds to
apps/console/dist, and the stubs come from@cryptos-pki/api-client. Nothing is tagged yet.Refs CryptOS-PKI/cryptos-node#337
Verification
How this was verified
npm run lint,npm test(console: 91 files and 559 tests; api-client: 3 tests) andnpm run buildpass locally.task license(golic) reports nothing to change.packages/api-client/test/imports.test.tsfails with "Cannot find package" before the stubs exist, and passes once they're generated.