Skip to content

Commit a5370ca

Browse files
committed
fix(build): don't show Enterprise Cloud in the documentation URLs now we're using the Enterprise Cloud schema
1 parent 945d8c3 commit a5370ca

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

scripts/update-endpoints/fetch-json.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ const QUERY = `
3333

3434
main();
3535

36+
const removeEnterpriseCloudFromDocumentationUrl = (endpoint) => ({
37+
...endpoint,
38+
documentationUrl: endpoint.documentationUrl.replace(
39+
"/enterprise-cloud@latest/",
40+
""
41+
),
42+
});
43+
3644
async function main() {
3745
const {
3846
data: { endpoints },
@@ -43,8 +51,11 @@ async function main() {
4351

4452
writeFileSync(
4553
path.resolve(__dirname, "generated", "endpoints.json"),
46-
prettier.format(JSON.stringify(endpoints), {
47-
parser: "json",
48-
})
54+
prettier.format(
55+
JSON.stringify(endpoints.map(removeEnterpriseCloudFromDocumentationUrl)),
56+
{
57+
parser: "json",
58+
}
59+
)
4960
);
5061
}

0 commit comments

Comments
 (0)