Auto-generate Stellar contract reference from contract source#48
Conversation
|
@heymide Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Done, Close: #48 |
|
Heads up: I retargeted this from |
Oh, Okay |
|
Now conflicts in git fetch origin
git rebase origin/develop
# in package.json, keep both sets of additions
git push --force-with-leaseThe auto-gen script and contracts/stellar.mdx update land clean. |
|
Clean merge after long delay. 480-line generate-stellar-reference.ts + contracts/stellar.mdx integration + deps. Thanks @heymide. |
- #48 (auto-generated Stellar reference PR) accidentally rewrote the root package.json and dropped the snippet-check scripts and their deps introduced by #47. Merge both PRs' fields: - check:snippets / check:stellar-testnet (from #47) - generate:stellar-reference / mint:* (from #48) and restore @wraith-protocol/sdk, @stellar/stellar-sdk, @solana/web3.js + tsx / typescript / @types/node. - Add pnpm-lock.yaml so `--frozen-lockfile` works. - .github/workflows/snippets.yml: switch from `npm ci` (which looked for package-lock.json and failed since we're a pnpm repo) to `pnpm install --frozen-lockfile`. - Content fixes flushed out by rerunning the snippet checker locally: - guides/stellar-payment-links.mdx: two React component fences were tagged ```typescript instead of ```tsx. - reference/stellar-react-hooks.mdx: three "Return Type" fences are documentation-only object-shape blocks (not compilable statements); mark them ```typescript no-check. - api-reference/types.mdx, architecture/tee.mdx, architecture/chain-connectors.mdx, guides/spectre-stellar-cookbook.mdx, guides/stellar-wallet-integration.mdx, guides/stellar-federation.mdx, reference/docs/architecture.md, reference/docs/chain-connectors.md: retag ```typescript fences containing JSX as ```tsx. Local `pnpm run check:snippets` now reports "Snippet check passed" over 454 code fences (438 compiled + 16 no-check skips).
Close: #25
Changed:
Added package.json with scripts for:npm run generate:stellar-reference
npm run check:stellar-reference
Mintlify validate/link checks
Added generated-reference markers to contracts/stellar.mdx.
Tightened scripts/generate-stellar-reference.ts so it:runs cleanly as ESM under Node 24
skips check mode gracefully when bindings are absent
handles BOM-prefixed JSON files
parses multi-field event types correctly
Verified:
npm run check:stellar-reference passes in this checkout by skipping because no Stellar bindings/config are present.
Ran an end-to-end temporary fixture with fake bindings; generation and --check both passed.