The frontend component of PuffPastry, meant to interface with the backend, which in turn interfaces with the smart contract.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

21 wiersze
433 B

  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. OPENAPI_URL="${OPENAPI_URL:-http://127.0.0.1:7300/openapi.json}"
  4. SPEC_FILE="openapi.fetched.json"
  5. OUTPUT_DIR="src/generated/typescript"
  6. cleanup() {
  7. rm -f "$SPEC_FILE"
  8. }
  9. trap cleanup EXIT
  10. curl --fail --silent --show-error \
  11. --header "Accept: application/json" \
  12. "$OPENAPI_URL" \
  13. --output "$SPEC_FILE"
  14. npx openapi-typescript-codegen \
  15. --input "$SPEC_FILE" \
  16. --output "$OUTPUT_DIR"