The frontend component of PuffPastry, meant to interface with the backend, which in turn interfaces with the smart contract.
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

21 linhas
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"