-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More configuration options for paratimes #1441
Conversation
Deployed to Cloudflare Pages
|
1d2f7a7
to
b372e50
Compare
b372e50
to
a95185d
Compare
d265ec3
to
9e54fc2
Compare
Here is an example of using some of these features: b3f4ce9#diff-c3095d5010e65c52737a98a5d618ea24049ebe90c8470752426081d70ed6e012. (The resulting behavior can be seen at #1355) |
Since there are multiple, loosely connected things, I suggest reviewing commit by commit. |
01e6a93
to
fbe90b4
Compare
[Network.testnet]: {}, | ||
} | ||
|
||
export const specialScopePaths: Partial<Record<Network, Partial<Record<Layer, [string, string]>>>> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk how to clarify the structure better. Maybe:
export const specialScopePaths: Partial<Record<Network, Partial<Record<Layer, [string, string]>>>> = { | |
export const specialScopePaths: Partial<Record<Network, Partial<Record<Layer, [/** renamed network */ string, /** renamed layer */ string]>>>> = { |
or
export const specialScopePaths: Partial<Record<Network, Partial<Record<Layer, [string, string]>>>> = { | |
export const specialScopePaths: Partial<Record<`${Network}/${Layer}`, `${string}/${string}`>> = { | |
'testnet/pontusx': 'pontusx/test', | |
} |
Normally, the name of a scope is derived by concatenating the name of the layer (i.e. "Sapphire") and the name of the network (i.e. "Testnet") ==> "Sapphire Testnet" However, in some specific cases, we might want to have something different. This can be achieved by this override function.
fbe90b4
to
669e4ec
Compare
Normally the "sapphire" paratime on the "testnet" network will be available via "testnet/sapphire". This commit adds a config option to override the paths for specific paratimes with any two-word constant. (So that we can use "magic/kingdom" instead of "testnet/sapphire", if we want to.)
This is mostly useful if we want to restrict a deployment to display only a few layers.
Up to now, this function has returned all the themes, for all networks. Now it will only return one theme, for the requested network.
669e4ec
to
04a6871
Compare
This PR adds support for: