refactor(shared): drop private-repo access from the registry CLI - #583
Draft
MarioCadenas wants to merge 1 commit into
Draft
refactor(shared): drop private-repo access from the registry CLI#583MarioCadenas wants to merge 1 commit into
MarioCadenas wants to merge 1 commit into
Conversation
Once databricks/appkit-registry is public, the token/authenticated GitHub Contents API path is dead flexibility: items are fetchable from raw.githubusercontent.com with no auth. Remove it and fetch the public raw URL unconditionally. Removes `resolveToken`, `RegistryToken`, `TOKEN_ENV_VARS`, `registryAuthHeaders`, and the `*_API_*` URL constants; drops the `token` parameter from `resolveItems`/`fetchRegistryItem`/`fetchVerifiedNames` and the token-related branches, messages, and help text in add/list/info. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
Contributor
📦 Bundle size reportCompared against
|
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 1.1 MB (+67 B) | 410 KB (+75 B) |
| Type declarations | 424 KB | 152 KB (+4 B) |
| Source maps | 2.3 MB (+156 B) | 769 KB (+98 B) |
| Other | 11 KB | 3.7 KB |
| Total | 3.8 MB (+223 B) | 1.3 MB (+177 B) |
Per-entry composition (own code — deps external (as shipped))
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
. |
95 KB | 2.5 KB | 98 KB | external | 313 KB |
./beta |
92 KB (+27 B) | 457 B | 92 KB (+27 B) | external | 277 KB (+52 B) |
./testing |
17 KB | 0 B | 17 KB | external | 52 KB |
./tsdown |
520 B | 0 B | 520 B | external | 813 B |
./type-generator |
23 KB | 0 B | 23 KB | external | 65 KB |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
. |
index.js |
initial | 91 KB |
. |
utils.js |
initial | 4.0 KB |
. |
remote-tunnel-manager.js |
lazy | 2.5 KB |
./beta |
beta.js |
initial | 75 KB |
./beta |
stream-manager.js |
initial | 5.8 KB |
./beta |
wide-event-emitter.js |
initial | 3.2 KB |
./beta |
databricks.js |
initial | 3.2 KB |
./beta |
configuration.js |
initial | 2.3 KB |
./beta |
service-context.js |
initial | 1.3 KB |
./beta |
client.js |
initial | 434 B |
./beta |
client-options.js |
initial | 220 B |
./beta |
supervisor-api.js |
lazy | 192 B |
./beta |
databricks.js |
lazy | 142 B |
./beta |
index.js |
lazy | 123 B |
./testing |
index.js |
initial | 17 KB |
./tsdown |
index.js |
initial | 520 B |
./type-generator |
index.js |
initial | 23 KB |
@databricks/appkit-ui
npm tarball (packed): 350 KB — gzipped download (dist + bin; excludes release-only docs/NOTICE).
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 395 KB | 132 KB |
| Type declarations | 229 KB | 84 KB |
| Source maps | 766 KB | 253 KB |
| CSS | 16 KB | 3.2 KB |
| Total | 1.4 MB | 473 KB |
Per-entry composition (consumer bundle — deps bundled, peerDeps external)
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
./js |
5.3 KB | 49 KB | 55 KB | 208 KB | 14 KB |
./js/beta |
20 B | 0 B | 20 B | 0 B | 0 B |
./react |
432 KB | 49 KB | 481 KB | 1.3 MB | 177 KB |
./react/beta |
1.0 KB | 0 B | 1.0 KB | 0 B | 1.9 KB |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
./js |
index.js |
initial | 5.2 KB |
./js |
chunk |
initial | 120 B |
./js |
apache-arrow |
lazy | 49 KB |
./js/beta |
beta.js |
initial | 20 B |
./react |
index.js |
initial | 430 KB |
./react |
tslib |
initial | 2.1 KB |
./react |
apache-arrow |
lazy | 49 KB |
./react/beta |
beta.js |
initial | 1.0 KB |
Contributor
🤖 AppKit PR bot🔬 Run evalsStart an eval for this PR from the evals-monitor app: Go to Evals Monitor → 📦 Try this PR's app templateScaffolds a new app from this PR's SDK build. Run it in any folder (requires the GitHub CLI — gh run download 34590630018 -R databricks/appkit -n appkit-template-0.74.0-pr.4971f6b-refactor-registry-public-only-583 -D appkit-pr-583 \
&& unzip -o "appkit-pr-583/appkit-template-0.74.0-pr.4971f6b-refactor-registry-public-only-583.zip" -d "appkit-pr-583" \
&& databricks apps init --template "appkit-pr-583"The template pins |
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.
Warning
DRAFT — do not merge until
databricks/appkit-registryis public. While the repo is private, the tokenless public-raw path this PR leaves in place cannot read it, so merging early breaksappkit add/list/search/infofor everyone. Merge the day the registry flips public.What
Removes all private-repo access logic from the registry CLI. Once
databricks/appkit-registryis public, the authenticated GitHub Contents API path is dead flexibility — items are fetchable fromraw.githubusercontent.comwith no auth. The CLI now always uses the public raw URL.Removed:
resolveToken,RegistryToken,TOKEN_ENV_VARS(thegh auth token/APPKIT_REGISTRY_TOKEN/GITHUB_TOKEN/GH_TOKENresolution)registryAuthHeaders, and theREGISTRY_ITEM_API_TEMPLATE/REGISTRY_INDEX_API_URL/GH_CONTENTS_APIconstantstokenparameter fromresolveItems,fetchRegistryItem,fetchVerifiedNames(private)log line, the 401/403 handling, and the "set a token" hints/help text inadd/list/infoNet −121 lines (32 insertions, 153 deletions).
Why a draft, not "keep token optional"
The CLI already falls back to the public raw URL when no token is present, so functionally nothing requires this change once public. But leaving the token path in means: a stale/expired
ghtoken would 401 the API path where the raw path would have worked, plus the misleading(private)messaging and a needlessgh/env dependency. Deleting it is the clean end-state. Staged as a draft so it lands atomically with the visibility flip.Verification
pnpm --filter=shared typecheck: cleanresolveItemstests updated to drop the token argoxlint,oxfmt --check,pnpm knip: cleanpnpm --filter=shared build:package+appkit add --helpsmoke: cleanNotes for reviewers
APPKIT_REGISTRY_TOKENenv override entirely. If we ever want a private mirror/staging registry, we'd re-introduce an optional token. Flagging in case anyone wants it kept as an opt-in.add.ts, but different regions).This pull request and its description were written by Isaac.