From 8f3d9277ac7509b84da0cad0e8179dcc52e7ce96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 29 Jun 2021 18:39:43 +0200 Subject: [PATCH] Merging master into develop --- .github/workflows/push-to-npm.yml | 8 +- CHANGELOG.md | 12 + docs/maps/api-reference.md | 2 +- front/package.json | 1 + .../CustomCharacterScene.svelte | 12 +- .../Entity/PlayerTexturesLoadingManager.ts | 116 +- front/src/Phaser/Game/GameScene.ts | 1006 ++++++++++------- front/src/Phaser/Login/CustomizeScene.ts | 167 +-- front/src/Stores/CustomCharacterStore.ts | 4 +- front/webpack.config.ts | 201 ++-- maps/tests/Metadata/cowebsiteAllowApi.html | 3 +- maps/tests/Metadata/cowebsiteAllowApi.js | 2 +- maps/tests/index.html | 8 + yarn.lock | 6 +- 14 files changed, 876 insertions(+), 672 deletions(-) diff --git a/.github/workflows/push-to-npm.yml b/.github/workflows/push-to-npm.yml index 798e2530..3b90e846 100644 --- a/.github/workflows/push-to-npm.yml +++ b/.github/workflows/push-to-npm.yml @@ -13,10 +13,6 @@ jobs: node-version: '14.x' registry-url: 'https://registry.npmjs.org' - - name: Edit tsconfig.json to add declarations - run: "sed -i 's/\"declaration\": false/\"declaration\": true/g' tsconfig.json" - working-directory: "front" - - name: Replace version number run: 'sed -i "s#VERSION_PLACEHOLDER#${GITHUB_REF/refs\/tags\//}#g" package.json' working-directory: "front/packages/iframe-api-typings" @@ -47,9 +43,9 @@ jobs: working-directory: "front" - name: "Build" - run: yarn run build + run: yarn run build-typings env: - API_URL: "localhost:8080" + PUSHER_URL: "//localhost:8080" working-directory: "front" # We build the front to generate the typings of iframe_api, then we copy those typings in a separate package. diff --git a/CHANGELOG.md b/CHANGELOG.md index 41f72510..fe8ef7dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,18 @@ - Use `WA.room.getCurrentRoom(): Promise` to get the ID, JSON map file, url of the map of the current room and the layer where the current player started - Use `WA.ui.registerMenuCommand(): void` to add a custom menu +## Version 1.4.3 - 1.4.4 - 1.4.5 + +## Bugfixes + +- Fixing the generation of @workadventure/iframe-api-typings + +## Version 1.4.2 + +## Updates + +- A script in an iframe opened by another script can use the IFrame API. + ## Version 1.4.1 ### Bugfixes diff --git a/docs/maps/api-reference.md b/docs/maps/api-reference.md index 30a11b2a..8c8205d8 100644 --- a/docs/maps/api-reference.md +++ b/docs/maps/api-reference.md @@ -9,4 +9,4 @@ - [Sound functions](api-sound.md) - [Controls functions](api-controls.md) -- [List of deprecated functions](api-deprecated.md) \ No newline at end of file +- [List of deprecated functions](api-deprecated.md) diff --git a/front/package.json b/front/package.json index ee031668..20c6b073 100644 --- a/front/package.json +++ b/front/package.json @@ -60,6 +60,7 @@ "templater": "cross-env ./templater.sh", "serve": "cross-env TS_NODE_PROJECT=\"tsconfig-for-webpack.json\" webpack serve --open", "build": "cross-env TS_NODE_PROJECT=\"tsconfig-for-webpack.json\" NODE_ENV=production webpack", + "build-typings": "cross-env TS_NODE_PROJECT=\"tsconfig-for-webpack.json\" NODE_ENV=production NODE_ENV=production BUILD_TYPINGS=1 webpack", "test": "TS_NODE_PROJECT=\"tsconfig-for-jasmine.json\" ts-node node_modules/jasmine/bin/jasmine --config=jasmine.json", "lint": "node_modules/.bin/eslint src/ . --ext .ts", "fix": "node_modules/.bin/eslint --fix src/ . --ext .ts", diff --git a/front/src/Components/CustomCharacterScene/CustomCharacterScene.svelte b/front/src/Components/CustomCharacterScene/CustomCharacterScene.svelte index 1807f15d..684975bb 100644 --- a/front/src/Components/CustomCharacterScene/CustomCharacterScene.svelte +++ b/front/src/Components/CustomCharacterScene/CustomCharacterScene.svelte @@ -1,11 +1,11 @@ +

Website opened by script.

- \ No newline at end of file + diff --git a/maps/tests/Metadata/cowebsiteAllowApi.js b/maps/tests/Metadata/cowebsiteAllowApi.js index 4dac8ed2..56c7b767 100644 --- a/maps/tests/Metadata/cowebsiteAllowApi.js +++ b/maps/tests/Metadata/cowebsiteAllowApi.js @@ -1 +1 @@ -WA.nav.openCoWebSite("cowebsiteAllowApi.html", true, ""); \ No newline at end of file +WA.nav.openCoWebSite("cowebsiteAllowApi.html", true, ""); diff --git a/maps/tests/index.html b/maps/tests/index.html index 93e4fd58..bf1a056f 100644 --- a/maps/tests/index.html +++ b/maps/tests/index.html @@ -106,6 +106,14 @@ Test the HelpCameraSettingScene + + + Success Failure Pending + + + Test a iframe opened by a script can use Iframe API + + Success Failure Pending diff --git a/yarn.lock b/yarn.lock index 166b84c7..b9698f61 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,6 @@ # yarn lockfile v1 -husky@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/husky/-/husky-6.0.0.tgz#810f11869adf51604c32ea577edbc377d7f9319e" +"husky@^6.0.0": + "resolved" "https://registry.npmjs.org/husky/-/husky-6.0.0.tgz" + "version" "6.0.0"