Repository navigation
Conversation
Rewrites flb in TypeScript (commander) for the Registry Service /v1 API, still published as @fleetbase/cli with the flb binary. - Config in ~/.fleetbase/config.json (mode 600, atomic writes), reading the phase-0 keys (host, registry, tokens by host, defaultOrganization) and adding per-host token metadata and instance tokens. FLB_TOKEN for CI. - login (password or --token), logout, whoami, register, verify, token create|list|revoke. No token is printed without --show-token and output is redacted centrally. - init from fleetbase/starter-extension with package names, PHP namespace, route and an extension.json with compat ranges; bump keeps extension.json, package.json and composer.json on one version. - build: npm pack engine, Composer api archive, optional prebuilt dist via ember-core build-engine-release; .fleetbase/release.json. - publish creates the listing if needed, uploads, streams checks by polling the release; release list|status|submit|withdraw|yank. - search, info, instance code|register|status|updates|list|forget. - install|update|uninstall run php artisan registry:* locally or in a docker compose service and follow the job with registry:job. - doctor. - install-fleetbase moves to packages/installer (@fleetbase/installer); flb install-fleetbase prints the npx command. - Vitest unit tests and test/e2e/run.sh against the service, run in CI against fleetbase/registry@v2.
- flb listing list|show|update|categories: PATCH the catalog listing from flags or --file, and show what a first release still needs. - flb instance register --path|--docker mints a code and pipes it to php artisan registry:register --code-stdin on the instance, so the instance token stays in its encrypted settings. Without a target, or with --store-token, the CLI exchanges the code as before. - The artisan runner can write stdin; doctor reports registry:register. - The e2e uses flb listing instead of curl, and its stub artisan really exchanges the piped code with the service.
- Replace the SemVer regex (exponential backtracking on long numeric prerelease identifiers) with isSemver(), a strict check on semver.parse's canonical form; versions over 256 characters are rejected as npm does. - Escape backslashes as well as single quotes when the scaffold writes the extension name and description into JS and PHP string literals.
…egex CodeQL js/redos pointed at COMPOSER_NAME, not the SemVer regex. Rewrite Composer's vendor/package rule so each separator is required between alphanumeric runs. Same language (checked exhaustively against the old pattern for every string up to 8 characters over [a0_.-/]), linear time.
D17 from the registry end-to-end walk. `flb instance register` on an instance that is already registered created a second instance on the service. - --path/--docker: registry:register sends the instance's current token (registry-bridge #44/#46), and the CLI now prints 'Re-registered …' with a note that installs and licence seats are kept when the summary says rotated. - --store-token: the config entry for the same --path or --host sends its token as previous_token; entries now remember --host. The service also matches the same host in the same organization (registry 68331fe). README documents it.
`flb publish` can publish without a stored secret: in a job with `id-token: write` it requests the GitHub OIDC token (audience: the registry's host name, FLB_OIDC_AUDIENCE overrides), exchanges it with POST /v1/auth/oidc/github for a short-lived flbt_ token scoped to the extension (named by its npm package, else composer), and uses that token for the listing lookup, upload and checks. - Token order for publish: FLB_TOKEN, then the exchange when ACTIONS_ID_TOKEN_REQUEST_URL/TOKEN are set (or --oidc), then the stored login; --no-oidc skips it. Other commands are unchanged. - The exchange runs after the build and again when the token is within two minutes of expiry (RegistryClient gains a tokenProvider), so long check runs outlive the ~15 minute token. - Actionable errors: missing OIDC variables or a refused GitHub request point at `permissions: id-token: write`; 401 names the audience; 403 names the repository, workflow file and ref to configure in Studio → Access. A GitHub Actions job with no token at all gets the same hint. - Trusted publishing never creates a listing or adds a package to one. - flbt_ tokens are service tokens (not legacy) and are redacted in output, as are JWTs. Neither token is printed or written to disk. action/: a composite action (fleetbase/fleetbase-cli/action@v2) that sets up Node, installs @fleetbase/cli (or builds it from the action's checkout with cli-version: source), runs `flb publish --json` and exposes release-id, version, status, channel and extension, with a job summary. action/examples/publish-on-tag.yml publishes on tag push. README documents the setup.
Trusted publishing: GitHub Actions OIDC exchange and composite action
CLI v2: TypeScript rewrite against the Registry Service API
The scaffold defaulted to console >=0.7.0 <0.8.0 and core-api ^1.6, so a fresh extension was incompatible with every Laravel 12 instance (console 0.8.x, core-api 2.x) that registry v2 serves.
fix(init): default compat to console 0.8+ and core-api 2.x
Ports #11 (written against the 0.0.x install-fleetbase) into @fleetbase/installer: SOCKETCLUSTER_AUTH_KEY (64 hex characters, kept on re-runs when 32+), SOCKETCLUSTER_AUTH_ENABLED=false, SOCKETCLUSTER_AUTH_MODE=log and SOCKETCLUSTER_ORIGIN (the console origin) go to the root .env that Compose reads, existing values and other lines are kept, and the file is mode 600. The helper throws instead of exiting so it is unit-tested.
docs(init): describe the new compat defaults
feat(installer): provision the socket auth key in the project .env
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.
Roll-up for the Fleetbase Extensions Registry re-architecture, CLI side. Every CLI PR for this project merges into
release/v2.0.0. This PR merges intomainonly when the whole project is complete (registry, registry-bridge, fleetbase-cli, registry-infra); deployments and the npm publish happen after that. Do not merge piecemeal.What's in it
CLI v2: TypeScript rewrite against the Registry Service API #13: CLI v2, a TypeScript rewrite against the Registry Service API (
/v1). Same package (@fleetbase/cli) and the sameflbbinary. Covers:init,build,bump,publishand the release lifecycle;install,updateanduninstallthrough registry-bridge's queued installer;doctor.install-fleetbasemoves tonpx @fleetbase/installer(packages/installer).Trusted publishing: GitHub Actions OIDC exchange and composite action #14: trusted publishing from GitHub Actions (OIDC exchange) and the composite action
fleetbase/fleetbase-cli/action@v2.fix(init): default compat to console 0.8+ and core-api 2.x #15:
flb initdefaultscompatto console>=0.8.0 <0.10.0and core-api^2.0.Release notes and breaking changes are in
RELEASE.md(currentlyv2.0.0-beta.0).Open into this branch
@fleetbase/installerprovisions the socket auth key (port of feat(socket-auth): generate the socket auth key on install #11).Related
flb inittemplate, moved to Laravel 12 and core-api 2.0.main(feat(socket-auth): generate the socket auth key on install #11, Phase 0: config file, --host option, auth and scaffold fixes #12):packages/installerby feat(installer): provision the socket auth key in the project .env #18.Before merging
package.jsonandRELEASE.mdfrom2.0.0-beta.0to2.0.0.npm run test:e2eagainst the released Registry Service.