Skip to content

Commit aaba046

Browse files
authored
Merge branch 'main' into add_sui_to_x_chain_docs
2 parents bffddd3 + e3a5b8d commit aaba046

File tree

84 files changed

+5294
-5614
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+5294
-5614
lines changed

.github/workflows/test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Run tests
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- "**"
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
env:
19+
CI_RUN: true
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: ./.github/actions/prepare-runner
23+
- run: cp .env.example .env
24+
- run: pnpm build
25+
- run: pnpm test

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pnpm 10.11.0
1+
pnpm 10.30.3

.vscode/extensions.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
{
2-
"recommendations": [
3-
"astro-build.astro-vscode",
4-
"dbaeumer.vscode-eslint",
5-
"esbenp.prettier-vscode"
6-
],
2+
"recommendations": ["astro-build.astro-vscode", "biomejs.biome", "esbenp.prettier-vscode"],
73
"unwantedRecommendations": []
84
}

.vscode/settings.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
{
2-
"eslint.useFlatConfig": true,
3-
"eslint.validate": ["javascript", "typescript", "html", "markdown", "astro"],
2+
"editor.defaultFormatter": "biomejs.biome",
3+
"editor.formatOnSave": true,
44
"editor.codeActionsOnSave": {
5-
"source.fixAll": "explicit"
5+
"source.fixAll": "explicit",
6+
"source.organizeImports.biome": "explicit"
7+
},
8+
"[astro]": {
9+
"editor.defaultFormatter": "astro-build.astro-vscode"
10+
},
11+
"[markdown]": {
12+
"editor.defaultFormatter": "esbenp.prettier-vscode"
13+
},
14+
"[mdx]": {
15+
"editor.defaultFormatter": "esbenp.prettier-vscode"
616
}
717
}

astro.config.mjs

Lines changed: 54 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
// @ts-check
2-
import { fileURLToPath } from "url";
3-
import { defineConfig, envField } from "astro/config";
4-
import starlight from "@astrojs/starlight";
5-
import tailwindcss from "@tailwindcss/vite";
6-
import starlightLinksValidator from "starlight-links-validator";
7-
import starlightOpenAPI from "starlight-openapi";
8-
import starlightDocSearch from "@astrojs/starlight-docsearch";
9-
import mermaid from "astro-mermaid";
102

11-
import vercel from "@astrojs/vercel";
12-
import remarkMath from "remark-math";
13-
import rehypeKatex from "rehype-katex";
14-
import rehypeRaw from "rehype-raw";
15-
import sitemap from "@astrojs/sitemap";
16-
import partytown from "@astrojs/partytown";
3+
import { fileURLToPath } from "node:url";
174
import node from "@astrojs/node";
5+
import partytown from "@astrojs/partytown";
186
import react from "@astrojs/react";
19-
import starlightLlmsTxt from "starlight-llms-txt";
7+
import sitemap from "@astrojs/sitemap";
8+
import starlight from "@astrojs/starlight";
9+
import starlightDocSearch from "@astrojs/starlight-docsearch";
10+
import vercel from "@astrojs/vercel";
11+
import tailwindcss from "@tailwindcss/vite";
12+
import { defineConfig, envField, fontProviders } from "astro/config";
2013
import favicons from "astro-favicons";
2114
import icon from "astro-icon";
15+
import mermaid from "astro-mermaid";
16+
import rehypeKatex from "rehype-katex";
17+
import rehypeRaw from "rehype-raw";
18+
import remarkMath from "remark-math";
2219
import starlightImageZoom from "starlight-image-zoom";
20+
import starlightLinksValidator from "starlight-links-validator";
21+
import starlightLlmsTxt from "starlight-llms-txt";
22+
import starlightOpenAPI from "starlight-openapi";
2323
import { sidebar } from "./astro.sidebar.ts";
24-
import { ENV } from "./src/lib/env";
25-
import { ogImagesIntegration } from "./src/integrations/ogImages";
26-
import { SUPPORTED_LANGUAGES, SITE_TITLES } from "./src/config/i18n";
27-
import { firebaseIntegration } from "./src/integrations/firebase";
28-
import { remarkClientOnly } from "./src/plugins";
29-
import { devServerFileWatcher } from "./src/integrations/dev-server-file-watcher";
30-
import onDemandDirective from "./src/integrations/client-on-demand/register.js";
3124
import { cspConfig } from "./src/config/csp";
25+
import { SITE_TITLES, SUPPORTED_LANGUAGES } from "./src/config/i18n";
26+
import onDemandDirective from "./src/integrations/client-on-demand/register.js";
27+
import { devServerFileWatcher } from "./src/integrations/dev-server-file-watcher";
28+
import { firebaseIntegration } from "./src/integrations/firebase";
3229
import { monacoEditorIntegration } from "./src/integrations/monacoEditor";
30+
import { ogImagesIntegration } from "./src/integrations/ogImages";
31+
import { ENV } from "./src/lib/env";
32+
import { remarkClientOnly } from "./src/plugins";
3333

3434
const ALGOLIA_APP_ID = ENV.ALGOLIA_APP_ID;
3535
const ALGOLIA_SEARCH_API_KEY = ENV.ALGOLIA_SEARCH_API_KEY;
@@ -152,7 +152,19 @@ export default defineConfig({
152152
}),
153153
starlightLlmsTxt({
154154
rawContent: true,
155-
promote: ["index*", "get-started"],
155+
promote: [
156+
"index*",
157+
"get-started",
158+
"network/glossary",
159+
"build/smart-contracts*",
160+
"network/blockchain*",
161+
"build/sdks*",
162+
"build/apis*",
163+
"build/cli*",
164+
"build/indexer*",
165+
"build/guides*",
166+
"build/ai*",
167+
],
156168
demote: ["404"],
157169
exclude: ["404"],
158170
}),
@@ -327,26 +339,28 @@ export default defineConfig({
327339
csp: cspConfig,
328340
fonts: [
329341
{
330-
provider: "local",
342+
provider: fontProviders.local(),
331343
name: "Atkinson Hyperlegible Next",
332344
cssVariable: "--font-atkinson-hyperlegible-next",
333345
optimizedFallbacks: false,
334-
variants: [
335-
{
336-
weight: "200 800",
337-
style: "normal",
338-
src: ["./src/assets/fonts/AtkinsonHyperlegibleNext-VariableFont_wght.woff2"],
339-
variationSettings: "normal",
340-
display: "swap",
341-
},
342-
{
343-
weight: "200 800",
344-
style: "italic",
345-
src: ["./src/assets/fonts/AtkinsonHyperlegibleNext-Italic-VariableFont_wght.woff2"],
346-
variationSettings: "normal",
347-
display: "swap",
348-
},
349-
],
346+
options: {
347+
variants: [
348+
{
349+
weight: "200 800",
350+
style: "normal",
351+
src: ["./src/assets/fonts/AtkinsonHyperlegibleNext-VariableFont_wght.woff2"],
352+
variationSettings: "normal",
353+
display: "swap",
354+
},
355+
{
356+
weight: "200 800",
357+
style: "italic",
358+
src: ["./src/assets/fonts/AtkinsonHyperlegibleNext-Italic-VariableFont_wght.woff2"],
359+
variationSettings: "normal",
360+
display: "swap",
361+
},
362+
],
363+
},
350364
},
351365
],
352366
},

astro.sidebar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,13 +810,13 @@ export const sidebar = [
810810
"network/glossary",
811811
"build/external-resources",
812812
"build/indexer/indexer-api/indexer-reference",
813-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
814813
...(openAPISidebarGroups as never[]),
815814
],
816815
}),
817816

818817
group("ai", {
819818
items: [
819+
"build/ai",
820820
group("ai.group.aptos-mcp", {
821821
collapsed: true,
822822
items: ["build/ai/aptos-mcp", "build/ai/aptos-mcp/claude", "build/ai/aptos-mcp/cursor"],

biome.json

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.4.4/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": true,
10+
"includes": [
11+
"**/*.js",
12+
"**/*.cjs",
13+
"**/*.mjs",
14+
"**/*.jsx",
15+
"**/*.ts",
16+
"**/*.mts",
17+
"**/*.tsx",
18+
"**/*.json",
19+
"!**/.astro",
20+
"!**/.vercel",
21+
"!**/coverage",
22+
"!**/dist",
23+
"!**/node_modules",
24+
"!**/package-lock.json",
25+
"!**/pnpm-lock.yaml",
26+
"!**/public",
27+
"!**/scripts",
28+
"!**/nextra-migration",
29+
"!middleware.js",
30+
"!**/.tmp",
31+
"!aptos-spec.json",
32+
"!patches"
33+
]
34+
},
35+
"formatter": {
36+
"enabled": true,
37+
"formatWithErrors": false,
38+
"indentStyle": "space",
39+
"indentWidth": 2,
40+
"lineEnding": "lf",
41+
"lineWidth": 100,
42+
"attributePosition": "auto",
43+
"bracketSameLine": false,
44+
"bracketSpacing": true,
45+
"useEditorconfig": true
46+
},
47+
"linter": {
48+
"enabled": true,
49+
"rules": {
50+
"recommended": true,
51+
"correctness": {
52+
"noUnusedImports": "warn",
53+
"noUnusedVariables": "warn",
54+
"useExhaustiveDependencies": "warn",
55+
"noUndeclaredVariables": "off"
56+
},
57+
"style": {
58+
"useImportType": "error",
59+
"noNamespace": "error",
60+
"useShorthandFunctionType": "error",
61+
"noNonNullAssertion": "warn",
62+
"noParameterAssign": "error",
63+
"useConst": "error",
64+
"useExportType": "error",
65+
"useNumberNamespace": "error",
66+
"useTemplate": "error",
67+
"noUnusedTemplateLiteral": "error",
68+
"useNodeAssertStrict": "error"
69+
},
70+
"suspicious": {
71+
"noExplicitAny": "warn",
72+
"noDoubleEquals": "error",
73+
"noDuplicateObjectKeys": "error",
74+
"noRedeclare": "error",
75+
"noShadowRestrictedNames": "error",
76+
"useIsArray": "error",
77+
"noEmptyInterface": "error",
78+
"noExtraNonNullAssertion": "error",
79+
"noMisleadingInstantiator": "error",
80+
"noUnsafeDeclarationMerging": "error",
81+
"useNamespaceKeyword": "error",
82+
"useAwait": "off"
83+
},
84+
"complexity": {
85+
"noBannedTypes": "error",
86+
"noUselessTypeConstraint": "error",
87+
"noUselessThisAlias": "error",
88+
"noForEach": "off",
89+
"noStaticOnlyClass": "off"
90+
},
91+
"a11y": {
92+
"recommended": true,
93+
"noAutofocus": "warn"
94+
}
95+
}
96+
},
97+
"javascript": {
98+
"formatter": {
99+
"jsxQuoteStyle": "double",
100+
"quoteProperties": "asNeeded",
101+
"trailingCommas": "all",
102+
"semicolons": "always",
103+
"arrowParentheses": "always",
104+
"bracketSameLine": false,
105+
"quoteStyle": "double",
106+
"attributePosition": "auto",
107+
"bracketSpacing": true
108+
}
109+
},
110+
"html": {
111+
"formatter": {
112+
"indentScriptAndStyle": false,
113+
"selfCloseVoidElements": "always"
114+
}
115+
},
116+
"overrides": [
117+
{
118+
"includes": ["*.d.ts"],
119+
"linter": {
120+
"rules": {
121+
"style": {
122+
"noNamespace": "off"
123+
}
124+
}
125+
}
126+
},
127+
{
128+
"includes": ["vite.config.ts", "vitest.config.ts"],
129+
"linter": {
130+
"rules": {
131+
"correctness": {
132+
"noUnusedVariables": "off"
133+
}
134+
}
135+
}
136+
}
137+
],
138+
"assist": {
139+
"enabled": true,
140+
"actions": {
141+
"source": {
142+
"organizeImports": "on"
143+
}
144+
}
145+
}
146+
}

ec.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import-x/no-anonymous-default-export */
21
import { pluginCollapsibleSections } from "@expressive-code/plugin-collapsible-sections";
32

43
/** @type {import('@astrojs/starlight/expressive-code').StarlightExpressiveCodeOptions} */

0 commit comments

Comments
 (0)