The frontend component of PuffPastry, meant to interface with the backend, which in turn interfaces with the smart contract.
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
123456789101112131415161718192021
  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"