Skip to content

Commit

Permalink
Rename exported Embed to ReplayWebPage, and export `EmbedReplayEv…
Browse files Browse the repository at this point in the history
…ent` type (#384)

Closes #376
  • Loading branch information
emma-sg authored Dec 23, 2024
1 parent ce8230d commit c2ebbed
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/buildapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}

- name: Update Ruffle
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn run update-ruffle

- name: Run Build
Expand Down
18 changes: 11 additions & 7 deletions ruffle/download-latest-ruffle.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)

RUFFLE_DIR=$SCRIPT_DIR

SELFHOST_URL=$(curl "https://api.github.com/repos/ruffle-rs/ruffle/releases" | jq -r '.[0].assets[] | select(.name | contains("selfhosted")) | .browser_download_url')
if [ -z "$GH_TOKEN" ]; then
SELFHOST_URL=$(curl -s "https://api.github.com/repos/ruffle-rs/ruffle/releases" | jq -r '.[0].assets[] | select(.name | contains("selfhosted")) | .browser_download_url')
else
SELFHOST_URL=$(curl -s --header "Authorization: Bearer $GH_TOKEN" "https://api.github.com/repos/ruffle-rs/ruffle/releases" | jq -r '.[0].assets[] | select(.name | contains("selfhosted")) | .browser_download_url')
fi

echo "$SELFHOST_URL"

curl -L -o $RUFFLE_DIR/ruffle.zip "$SELFHOST_URL"
curl -L -o "$RUFFLE_DIR/ruffle.zip" "$SELFHOST_URL"

rm $RUFFLE_DIR/*.js $RUFFLE_DIR/*.wasm
rm "$RUFFLE_DIR/*.js" "$RUFFLE_DIR/*.wasm"

cd $RUFFLE_DIR
unzip $RUFFLE_DIR/ruffle.zip *.js *.wasm
cd "$RUFFLE_DIR" || exit 1
unzip "$RUFFLE_DIR/ruffle.zip" "*.js" "*.wasm"

rm $RUFFLE_DIR/ruffle.zip
rm "$RUFFLE_DIR/ruffle.zip"
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@ export {
Replay,
Sorter,
URLResources,
/**
* @deprecated use {@linkcode ReplayWebPage}
*/
Embed,
Embed as ReplayWebPage,
SWManager,
};

export type { ItemType, URLResource } from "./types";

export type { EmbedReplayEvent } from "./item";

export * from "./misc";

0 comments on commit c2ebbed

Please sign in to comment.