Dev Console Aliases - #3841
Draft
jameszhang244 wants to merge 20 commits into
Draft
Conversation
Contributor
size-limit report 📦
|
Contributor
Storybook PreviewBuilt from commit |
jameszhang244
force-pushed
the
jzhang/dev-console-aliases
branch
from
August 17, 2026 21:08
eddc41b to
4036f75
Compare
jameszhang244
force-pushed
the
jzhang/dev-console-aliases
branch
from
August 17, 2026 21:36
1f2c995 to
892007b
Compare
jameszhang244
force-pushed
the
jzhang/dev-console-aliases
branch
from
August 19, 2026 16:18
7b37e6a to
163d1ab
Compare
jameszhang244
force-pushed
the
jzhang/dev-console-aliases
branch
from
August 20, 2026 20:12
e5da7bc to
21fb8e7
Compare
jameszhang244
force-pushed
the
jzhang/dev-console-aliases
branch
from
August 25, 2026 17:10
91de652 to
a35139b
Compare
added 14 commits
August 25, 2026 13:11
jameszhang244
force-pushed
the
jzhang/dev-console-aliases
branch
from
August 25, 2026 17:11
a35139b to
8d16795
Compare
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
Adds
@osdk/aliases, a new package holding the alias runtime, and a browser-safe entry point so Developer Console apps can read installer-supplied configuration.Why
Custom aliases let an app author declare env-var-style config that a Marketplace installer fills in at install time. Two problems with hosting that in
@osdk/functions:@osdk/functionspeer-depends on@osdk/client, so a browser app reading a JSON file inherited a client version floor. This failednpm installin a Developer Console app's build withERESOLVE.@osdk/aliaseshas no dependencies on@osdk/clientor@osdk/functions, so neither problem can recur by construction.Public API
Aliases.load()may be called once inmain.tsxfor application-wide loading or only where aliases are needed. Repeated and concurrent calls share the cached load and return the same reader. Once loaded,custom()is a synchronous lookup. The reader shape also leaves room for additional alias namespaces later.Node code (Functions) keeps using the filesystem runtime, unchanged:
Entry points:
../experimental./nodeThe browser API sits behind
experimentalso the import path states its stability at every call site, matching@osdk/client,@osdk/react, and@osdk/react-components.Resolution behavior
Aliases.load()fetches and caches aliases before returning a synchronous reader. Loading is explicit because browsers cannot perform a synchronous network read. Applications decide where to handle the initial loading and any error; a future React hook can wrap the same API without changing the underlying behavior.Two files can supply values:
.palantir/deployment.config.jsonpublic/resources.jsonCallers do not choose between them. The deployment config is tried first. The declaration file is used only when the deployment config appears absent: a 404 or a 200 containing an HTML document, as single-page-app hosts may rewrite unknown paths to
index.html. Any other failure throws instead of silently substituting the author's defaults for the installer's values.Compatibility
@osdk/functionsre-exports the Node runtime through a local facade atsrc/aliases/index.ts, so its publicAliasesnamespace is unchanged. The facade uses explicit named re-exports to accommodate API Extractor.etc/functions.report.api.mdis updated to reflect that the namespace members now resolve from@osdk/aliases/node.Testing
transpileTypesis listed separately becausetypecheckruns with--emitDeclarationOnly falseand does not exercise--isolatedDeclarations; declaration-emit errors can therefore pass typecheck and still fail the build.The browser tests cover successful loading and lookup, concurrent and repeated loads, cache reset and retry, missing aliases, malformed responses, value validation, deployment/default fallback behavior, inherited JavaScript property names, and the experimental export boundary.
Verified end to end against a Foundry stack:
public/resources.json, deployed the site, packaged it as a Marketplace product, and installed it with overrides. The running site reads the installer's values rather than the declared defaults.Packaging an application with no aliases is covered by unit tests but has not yet been verified end to end.