Skip to content

Commit

Permalink
Change root url and more (#30)
Browse files Browse the repository at this point in the history
* change root url to networks-registry.thegraph.com

* add exceptions to trailing slash lint rule

* bump up version

* add icons
  • Loading branch information
YaroShkvorets authored Dec 18, 2024
1 parent f21fc5c commit 0a992fd
Show file tree
Hide file tree
Showing 40 changed files with 54 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REGISTRY_ROOT_URL="https://registry.thegraph.com"
REGISTRY_ROOT_URL="https://networks-registry.thegraph.com"

# [optional] to query network subgraph for validation
THEGRAPH_STUDIO_KEY=<YOUR_STUDIO_KEY>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.6.15",
"version": "0.6.16",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.15",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistrySchema_v0_3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "https://thegraph.com/schemas/registry.schema.json",
"$id": "https://thegraph.com/schemas/networks-registry.schema.json",
"$schema": "http://json-schema.org/schema#",
"title": "The Graph networks registry schema",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistrySchema_v0_4.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "https://thegraph.com/schemas/registry.schema.json",
"$id": "https://thegraph.com/schemas/networks-registry.schema.json",
"$schema": "http://json-schema.org/schema#",
"title": "The Graph networks registry schema",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistrySchema_v0_5.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "https://thegraph.com/schemas/registry.schema.json",
"$id": "https://thegraph.com/schemas/networks-registry.schema.json",
"$schema": "http://json-schema.org/schema#",
"title": "The Graph networks registry schema",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistrySchema_v0_6.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "https://thegraph.com/schemas/registry.schema.json",
"$id": "https://thegraph.com/schemas/networks-registry.schema.json",
"$schema": "http://json-schema.org/schema#",
"title": "The Graph networks registry schema",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_4_2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_4.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_4.json",
"version": "0.4.2",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_4_3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_4.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_4.json",
"version": "0.4.3",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_4_x.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_4.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_4.json",
"version": "0.4.3",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_5_0.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_5.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_5.json",
"version": "0.5.0",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_5_1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_5.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_5.json",
"version": "0.5.1",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_5_2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_5.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_5.json",
"version": "0.5.2",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_5_3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_5.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_5.json",
"version": "0.5.3",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_5_x.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_5.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_5.json",
"version": "0.5.3",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_0.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.0",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.1",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_10.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.10",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_11.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.11",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_12.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.12",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_13.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.13",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_14.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.14",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_15.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.15",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.2",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.3",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_4.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.4",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_5.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.5",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_6.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.6",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_7.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.7",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_8.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.8",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_9.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.9",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_6_x.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.15",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
2 changes: 1 addition & 1 deletion public/TheGraphNetworksRegistry_v0_x_x.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"$schema": "https://networks-registry.thegraph.com/TheGraphNetworksRegistrySchema_v0_6.json",
"version": "0.6.15",
"title": "The Graph networks registry",
"description": "This registry was generated and validated. To add a chain, open a pull request: https://github.com/graphprotocol/networks-registry",
Expand Down
3 changes: 2 additions & 1 deletion registry/antelope/wax-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
"blockType": "sf.antelope.type.v1.Block",
"bufUrl": "https://buf.build/pinax/firehose-antelope",
"bytesEncoding": "hex"
}
},
"icon": { "web3Icons": { "name": "wax" } }
}
3 changes: 2 additions & 1 deletion registry/antelope/wax.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"blockType": "sf.antelope.type.v1.Block",
"bufUrl": "https://buf.build/pinax/firehose-antelope",
"bytesEncoding": "hex"
}
},
"icon": { "web3Icons": { "name": "wax" } }
}
7 changes: 5 additions & 2 deletions registry/eip155/lumia.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"graphNode": { "protocol": "ethereum" },
"explorerUrls": ["https://lens.lumia.org"],
"rpcUrls": ["https://mainnet-rpc.lumia.org"],
"apiUrls": [{ "url": "https://explorer.lumia.org/api", "kind": "etherscan" }],
"apiUrls": [
{ "url": "https://explorer.lumia.org/api/", "kind": "etherscan" }
],
"relations": [{ "kind": "l2Of", "network": "mainnet" }],
"services": { "subgraphs": ["https://api.studio.thegraph.com/deploy"] },
"networkType": "mainnet",
Expand All @@ -23,5 +25,6 @@
"evmExtendedModel": false,
"bufUrl": "https://buf.build/streamingfast/firehose-ethereum",
"bytesEncoding": "hex"
}
},
"icon": { "web3Icons": { "name": "lumia" } }
}
3 changes: 2 additions & 1 deletion registry/eip155/sonic.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
"evmExtendedModel": false,
"bufUrl": "https://buf.build/streamingfast/firehose-ethereum",
"bytesEncoding": "hex"
}
},
"icon": { "web3Icons": { "name": "sonic" } }
}
2 changes: 1 addition & 1 deletion schemas/registry.schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "https://thegraph.com/schemas/registry.schema.json",
"$id": "https://thegraph.com/schemas/networks-registry.schema.json",
"$schema": "http://json-schema.org/schema#",
"title": "The Graph networks registry schema",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import packageInfo from "../package.json";
import { getVersionFilenames } from "./utils/versions";

const REGISTRY_ROOT_URL =
process.env.REGISTRY_ROOT_URL ?? "https://registry.thegraph.com";
process.env.REGISTRY_ROOT_URL ?? "https://networks-registry.thegraph.com";

function generateMermaidGraph(networks: Network[]): string {
const relations = networks
Expand Down
8 changes: 8 additions & 0 deletions src/prettier/plugin-no-trailing-slash.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ module.exports = {
json: {
...require("prettier/parser-babel").parsers.json,
preprocess: (text) => {
// List of URLs that should keep their trailing slash
const exceptions = [
"https://explorer.lumia.org/api/",
];

const processValue = (value) => {
if (typeof value === "string" && (value.startsWith("http://") || value.startsWith("https://"))) {
if (exceptions.includes(value)) {
return value;
}
return value.replace(/\/+$/, "");
}
if (Array.isArray(value)) {
Expand Down

0 comments on commit 0a992fd

Please sign in to comment.