Skip to content

Commit c2ebbed

Browse files
authored
Rename exported Embed to ReplayWebPage, and export EmbedReplayEvent type (#384)
Closes #376
1 parent ce8230d commit c2ebbed

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

.github/workflows/buildapp.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
3535

3636
- name: Update Ruffle
37+
env:
38+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3739
run: yarn run update-ruffle
3840

3941
- name: Run Build

ruffle/download-latest-ruffle.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
#!/bin/bash
2-
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
2+
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
33

44
RUFFLE_DIR=$SCRIPT_DIR
55

6-
SELFHOST_URL=$(curl "https://api.github.com/repos/ruffle-rs/ruffle/releases" | jq -r '.[0].assets[] | select(.name | contains("selfhosted")) | .browser_download_url')
6+
if [ -z "$GH_TOKEN" ]; then
7+
SELFHOST_URL=$(curl -s "https://api.github.com/repos/ruffle-rs/ruffle/releases" | jq -r '.[0].assets[] | select(.name | contains("selfhosted")) | .browser_download_url')
8+
else
9+
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')
10+
fi
711

812
echo "$SELFHOST_URL"
913

10-
curl -L -o $RUFFLE_DIR/ruffle.zip "$SELFHOST_URL"
14+
curl -L -o "$RUFFLE_DIR/ruffle.zip" "$SELFHOST_URL"
1115

12-
rm $RUFFLE_DIR/*.js $RUFFLE_DIR/*.wasm
16+
rm "$RUFFLE_DIR/*.js" "$RUFFLE_DIR/*.wasm"
1317

14-
cd $RUFFLE_DIR
15-
unzip $RUFFLE_DIR/ruffle.zip *.js *.wasm
18+
cd "$RUFFLE_DIR" || exit 1
19+
unzip "$RUFFLE_DIR/ruffle.zip" "*.js" "*.wasm"
1620

17-
rm $RUFFLE_DIR/ruffle.zip
21+
rm "$RUFFLE_DIR/ruffle.zip"

src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,16 @@ export {
4141
Replay,
4242
Sorter,
4343
URLResources,
44+
/**
45+
* @deprecated use {@linkcode ReplayWebPage}
46+
*/
4447
Embed,
48+
Embed as ReplayWebPage,
4549
SWManager,
4650
};
4751

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

54+
export type { EmbedReplayEvent } from "./item";
55+
5056
export * from "./misc";

0 commit comments

Comments
 (0)