From 9b8ce149e6e541e86c71404682c4fe057ae4f806 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 15:40:08 +0900 Subject: [PATCH 01/21] =?UTF-8?q?=E3=81=A8=E3=82=8A=E3=81=82=E3=81=88?= =?UTF-8?q?=E3=81=9A=E3=81=8A=E8=A9=A6=E3=81=97=E3=81=97=E3=81=A6=E3=81=BF?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-latest-sdk-e2e-test.yml | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/npm-latest-sdk-e2e-test.yml diff --git a/.github/workflows/npm-latest-sdk-e2e-test.yml b/.github/workflows/npm-latest-sdk-e2e-test.yml new file mode 100644 index 00000000..e40674df --- /dev/null +++ b/.github/workflows/npm-latest-sdk-e2e-test.yml @@ -0,0 +1,72 @@ +name: npm-latest-sdk-e2e-test + +on: + push: + branches: + - develop + - feature/* + paths-ignore: + - "**.md" + - "LICENSE" + - "NOTICE" + schedule: + # UTC 時間で毎日 2:00 (JST で 11:00) に実行、月曜日から金曜日 + - cron: "0 2 * * 1-5" + +jobs: + e2e-test: + timeout-minutes: 20 + runs-on: ubuntu-latest + strategy: + matrix: + # sdk_version: ["2024.1.2", "2023.2.0", "2023.1.0", "2022.3.2"] + sdk_version: ["2024.1.2"] + # node: ["18", "20", "22"] + node: ["18"] + # browser: ["chromium", "firefox", "webkit"] + browser: ["chromium"] + env: + VITE_SORA_SIGNALING_URL: ${{ secrets.TEST_SIGNALING_URL }} + VITE_SORA_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }} + VITE_ACCESS_TOKEN: ${{ secrets.TEST_SECRET_KEY }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + - uses: pnpm/action-setup@v4 + # sora-js-sdk を npm からインストールする + - run: pnpm --version + - run: pnpm install + - run: pnpm add -E sora-js-sdk@${{ matrix.sdk_version }} + + working-directory: ./examples + - run: pnpm run build + - run: pnpm exec playwright install ${{ matrix.browser }} --with-deps + - run: pnpm exec playwright test --project=${{ matrix.browser }} + env: + VITE_SORA_CHANNEL_ID_SUFFIX: _${{ matrix.node }} + # - uses: actions/upload-artifact@v4 + # if: always() + # with: + # name: playwright-report + # path: playwright-report/ + # retention-days: 30 + - name: Slack Notification + if: success() + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_CHANNEL: sora-js-sdk + SLACK_COLOR: good + SLACK_TITLE: Succeeded + SLACK_ICON_EMOJI: ":star-struck:" + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + - name: Slack Notification + if: failure() + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_CHANNEL: sora-js-sdk + SLACK_COLOR: danger + SLACK_TITLE: Failed + SLACK_ICON_EMOJI: ":japanese_ogre:" + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} From 11de634eef86955d8002757a44428622455f1174 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 16:59:43 +0900 Subject: [PATCH 02/21] =?UTF-8?q?=E3=81=8A=E8=A9=A6=E3=81=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-latest-sdk-e2e-test.yml | 3 ++- vite.config.mjs | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/npm-latest-sdk-e2e-test.yml b/.github/workflows/npm-latest-sdk-e2e-test.yml index e40674df..54b25ffe 100644 --- a/.github/workflows/npm-latest-sdk-e2e-test.yml +++ b/.github/workflows/npm-latest-sdk-e2e-test.yml @@ -29,6 +29,7 @@ jobs: VITE_SORA_SIGNALING_URL: ${{ secrets.TEST_SIGNALING_URL }} VITE_SORA_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }} VITE_ACCESS_TOKEN: ${{ secrets.TEST_SECRET_KEY }} + NPM_LATEST_SDK_E2E_TEST: true steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -41,7 +42,7 @@ jobs: - run: pnpm add -E sora-js-sdk@${{ matrix.sdk_version }} working-directory: ./examples - - run: pnpm run build + # pnpm run build しない - run: pnpm exec playwright install ${{ matrix.browser }} --with-deps - run: pnpm exec playwright test --project=${{ matrix.browser }} env: diff --git a/vite.config.mjs b/vite.config.mjs index 8f4fbea5..9e3ca397 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -6,9 +6,14 @@ import { defineConfig } from 'vite' export default defineConfig({ root: resolve(__dirname, 'examples'), resolve: { - alias: { - 'sora-js-sdk': resolve(__dirname, 'dist/sora.mjs'), - }, + // NPM_LATEST_SDK_E2E_TEST が true の時は alias を無効化する + // これは .github/workflows/npm-latest-sdk-e2e-test.yml で、 + // E2E テストで複数のバージョンの npm の sora-js-sdk をインストールして利用するため + alias: process.env.NPM_LATEST_SDK_E2E_TEST + ? {} + : { + 'sora-js-sdk': resolve(__dirname, 'dist/sora.mjs'), + }, }, build: { rollupOptions: { From aa592490466f052d43f9600452d1ae9eda713757 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:01:59 +0900 Subject: [PATCH 03/21] =?UTF-8?q?=E8=89=B2=E3=80=85=E5=90=8D=E5=89=8D?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{npm-latest-sdk-e2e-test.yml => npm-pkg-e2e-test.yml} | 6 +++--- vite.config.mjs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) rename .github/workflows/{npm-latest-sdk-e2e-test.yml => npm-pkg-e2e-test.yml} (96%) diff --git a/.github/workflows/npm-latest-sdk-e2e-test.yml b/.github/workflows/npm-pkg-e2e-test.yml similarity index 96% rename from .github/workflows/npm-latest-sdk-e2e-test.yml rename to .github/workflows/npm-pkg-e2e-test.yml index 54b25ffe..09866df5 100644 --- a/.github/workflows/npm-latest-sdk-e2e-test.yml +++ b/.github/workflows/npm-pkg-e2e-test.yml @@ -1,4 +1,4 @@ -name: npm-latest-sdk-e2e-test +name: npm-pkg-e2e-test on: push: @@ -14,7 +14,7 @@ on: - cron: "0 2 * * 1-5" jobs: - e2e-test: + npm-pkg-e2e-test: timeout-minutes: 20 runs-on: ubuntu-latest strategy: @@ -29,7 +29,7 @@ jobs: VITE_SORA_SIGNALING_URL: ${{ secrets.TEST_SIGNALING_URL }} VITE_SORA_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }} VITE_ACCESS_TOKEN: ${{ secrets.TEST_SECRET_KEY }} - NPM_LATEST_SDK_E2E_TEST: true + NPM_PKG_E2E_TEST: true steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 diff --git a/vite.config.mjs b/vite.config.mjs index 9e3ca397..cd8a77b0 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -6,10 +6,10 @@ import { defineConfig } from 'vite' export default defineConfig({ root: resolve(__dirname, 'examples'), resolve: { - // NPM_LATEST_SDK_E2E_TEST が true の時は alias を無効化する - // これは .github/workflows/npm-latest-sdk-e2e-test.yml で、 + // NPM_PKG_E2E_TEST が true の時は alias を無効化する + // これは .github/workflows/npm-pkg-e2e-test.yml で、 // E2E テストで複数のバージョンの npm の sora-js-sdk をインストールして利用するため - alias: process.env.NPM_LATEST_SDK_E2E_TEST + alias: process.env.NPM_PKG_E2E_TEST ? {} : { 'sora-js-sdk': resolve(__dirname, 'dist/sora.mjs'), From 023bb33e530fd371182723a20ba0887ad660b890 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:06:09 +0900 Subject: [PATCH 04/21] =?UTF-8?q?playwright=20=E5=81=B4=E3=81=A7=20version?= =?UTF-8?q?=20=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E4=BB=95?= =?UTF-8?q?=E7=B5=84=E3=81=BF=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/sendonly/index.html | 1 + examples/sendonly/main.mts | 6 ++++++ tests/sendonly_recvonly.spec.ts | 9 +++++++++ 3 files changed, 16 insertions(+) diff --git a/examples/sendonly/index.html b/examples/sendonly/index.html index f9c3ae60..883b7018 100644 --- a/examples/sendonly/index.html +++ b/examples/sendonly/index.html @@ -8,6 +8,7 @@

Sendonly test

+


diff --git a/examples/sendonly/main.mts b/examples/sendonly/main.mts index ff8d6eb8..f15c5362 100644 --- a/examples/sendonly/main.mts +++ b/examples/sendonly/main.mts @@ -17,6 +17,12 @@ document.addEventListener('DOMContentLoaded', async () => { ACCESS_TOKEN, ) + // SDK バージョンの表示 + const sdkVersionElement = document.querySelector('#sdk-version') + if (sdkVersionElement) { + sdkVersionElement.textContent = `${Sora.version()}` + } + document.querySelector('#connect')?.addEventListener('click', async () => { const stream = await navigator.mediaDevices.getUserMedia({ video: true, audio: true }) await client.connect(stream) diff --git a/tests/sendonly_recvonly.spec.ts b/tests/sendonly_recvonly.spec.ts index 8779dc13..c296db2a 100644 --- a/tests/sendonly_recvonly.spec.ts +++ b/tests/sendonly_recvonly.spec.ts @@ -9,6 +9,15 @@ test('sendonly/recvonly pages', async ({ browser }) => { await sendonly.goto('http://localhost:9000/sendonly/') await recvonly.goto('http://localhost:9000/recvonly/') + // SDK バージョンの表示 + await sendonly.waitForSelector('#sdk-version') + const sendonlySdkVersion = await sendonly.$eval('#sdk-version', (el) => el.textContent) + console.log(`sendonly sdkVersion=${sendonlySdkVersion}`) + + await recvonly.waitForSelector('#sdk-version') + const recvonlySdkVersion = await recvonly.$eval('#sdk-version', (el) => el.textContent) + console.log(`recvonly sdkVersion=${recvonlySdkVersion}`) + await sendonly.click('#connect') await recvonly.click('#connect') From 27cb52b4a1773391a87da484e76226e3a4c42086 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:09:19 +0900 Subject: [PATCH 05/21] =?UTF-8?q?2023.2.0=20=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-pkg-e2e-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-pkg-e2e-test.yml b/.github/workflows/npm-pkg-e2e-test.yml index 09866df5..f7301fc7 100644 --- a/.github/workflows/npm-pkg-e2e-test.yml +++ b/.github/workflows/npm-pkg-e2e-test.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: # sdk_version: ["2024.1.2", "2023.2.0", "2023.1.0", "2022.3.2"] - sdk_version: ["2024.1.2"] + sdk_version: ["2024.1.2", "2023.2.0"] # node: ["18", "20", "22"] node: ["18"] # browser: ["chromium", "firefox", "webkit"] From 53a0251c189356f3f87c80ef6a447e91599d1e26 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:12:42 +0900 Subject: [PATCH 06/21] =?UTF-8?q?=E3=81=8A=E8=A9=A6=E3=81=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-pkg-e2e-test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/npm-pkg-e2e-test.yml b/.github/workflows/npm-pkg-e2e-test.yml index f7301fc7..5efe7ce1 100644 --- a/.github/workflows/npm-pkg-e2e-test.yml +++ b/.github/workflows/npm-pkg-e2e-test.yml @@ -19,8 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - # sdk_version: ["2024.1.2", "2023.2.0", "2023.1.0", "2022.3.2"] - sdk_version: ["2024.1.2", "2023.2.0"] + sdk_version: ["2024.1.2", "2023.2.0", "2023.1.0", "2022.3.2"] # node: ["18", "20", "22"] node: ["18"] # browser: ["chromium", "firefox", "webkit"] From 031dd5ba0608c6ba30ce2e0220d93291fd780924 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:16:13 +0900 Subject: [PATCH 07/21] =?UTF-8?q?2022.1.0=20/=202021.2.3=20=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-pkg-e2e-test.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/npm-pkg-e2e-test.yml b/.github/workflows/npm-pkg-e2e-test.yml index 5efe7ce1..790330f6 100644 --- a/.github/workflows/npm-pkg-e2e-test.yml +++ b/.github/workflows/npm-pkg-e2e-test.yml @@ -19,7 +19,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - sdk_version: ["2024.1.2", "2023.2.0", "2023.1.0", "2022.3.2"] + sdk_version: [ + "2024.1.2", + "2023.2.0", + "2023.1.0", + "2022.3.2", + "2022.1.0", + "2021.2.3", + ] # node: ["18", "20", "22"] node: ["18"] # browser: ["chromium", "firefox", "webkit"] From 57f26cc3d61943afab5c22ea867d3fe254e140e9 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:20:29 +0900 Subject: [PATCH 08/21] =?UTF-8?q?github.run=5Fid=20=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E3=81=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e-test.yml | 2 +- .github/workflows/npm-pkg-e2e-test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 816e5ebf..a02668eb 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -39,7 +39,7 @@ jobs: - run: pnpm exec playwright install ${{ matrix.browser }} --with-deps - run: pnpm exec playwright test --project=${{ matrix.browser }} env: - VITE_SORA_CHANNEL_ID_SUFFIX: _${{ matrix.node }} + VITE_SORA_CHANNEL_ID_SUFFIX: _${{ github.run_id }} # - uses: actions/upload-artifact@v4 # if: always() # with: diff --git a/.github/workflows/npm-pkg-e2e-test.yml b/.github/workflows/npm-pkg-e2e-test.yml index 790330f6..5400ab3e 100644 --- a/.github/workflows/npm-pkg-e2e-test.yml +++ b/.github/workflows/npm-pkg-e2e-test.yml @@ -52,7 +52,7 @@ jobs: - run: pnpm exec playwright install ${{ matrix.browser }} --with-deps - run: pnpm exec playwright test --project=${{ matrix.browser }} env: - VITE_SORA_CHANNEL_ID_SUFFIX: _${{ matrix.node }} + VITE_SORA_CHANNEL_ID_SUFFIX: _${{ github.run_id }} # - uses: actions/upload-artifact@v4 # if: always() # with: From d7e2892f9e58613817dd06495229f0d3966d7f2c Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:32:25 +0900 Subject: [PATCH 09/21] =?UTF-8?q?uuid=20=E3=82=92=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/messaging/main.mts | 4 +- examples/package.json | 1 + examples/recvonly/main.mts | 4 +- examples/sendonly/main.mts | 4 +- examples/sendonly_audio/main.mts | 4 +- examples/sendrecv/main.mts | 4 +- examples/simulcast/main.mts | 4 +- examples/spotlight_recvonly/main.mts | 4 +- examples/spotlight_sendonly/main.mts | 4 +- examples/spotlight_sendrecv/main.mts | 4 +- examples/tsconfig.json | 2 +- pnpm-lock.yaml | 75 ++++++++++++++-------------- 12 files changed, 67 insertions(+), 47 deletions(-) diff --git a/examples/messaging/main.mts b/examples/messaging/main.mts index 0bc616c8..261cdbae 100644 --- a/examples/messaging/main.mts +++ b/examples/messaging/main.mts @@ -6,6 +6,8 @@ import Sora, { type DataChannelEvent, } from 'sora-js-sdk' +import { randomUUID } from 'node:crypto' + document.addEventListener('DOMContentLoaded', async () => { const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL const SORA_CHANNEL_ID_PREFIX = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || '' @@ -78,7 +80,7 @@ class SoraClient { accessToken: string, ) { this.sora = Sora.connection(signalingUrl, this.debug) - this.channelId = `${channelIdPrefix}messaging${channelIdSuffix}` + this.channelId = `${channelIdPrefix}messaging_${randomUUID()}_${channelIdSuffix}` this.metadata = { access_token: accessToken } this.options = { diff --git a/examples/package.json b/examples/package.json index 97f6e2a5..40bddeda 100644 --- a/examples/package.json +++ b/examples/package.json @@ -6,6 +6,7 @@ "check": "tsc --noEmit" }, "dependencies": { + "@types/node": "22.7.5", "sora-js-sdk": "workspace:*" } } diff --git a/examples/recvonly/main.mts b/examples/recvonly/main.mts index 4b58d7af..afb5d8cc 100644 --- a/examples/recvonly/main.mts +++ b/examples/recvonly/main.mts @@ -4,6 +4,8 @@ import Sora, { type ConnectionSubscriber, } from 'sora-js-sdk' +import { randomUUID } from 'node:crypto' + document.addEventListener('DOMContentLoaded', () => { // 環境変数の読み込み const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL @@ -78,7 +80,7 @@ class SoraClient { this.sora = Sora.connection(signaling_url, this.debug) // channel_id の生成 - this.channelId = `${channel_id_prefix}sendonly_recvonly${channel_id_suffix}` + this.channelId = `${channel_id_prefix}sendonly_recvonly${randomUUID()}_${channel_id_suffix}` // access_token を指定する metadata の生成 this.metadata = { access_token: access_token } diff --git a/examples/sendonly/main.mts b/examples/sendonly/main.mts index f15c5362..5f727984 100644 --- a/examples/sendonly/main.mts +++ b/examples/sendonly/main.mts @@ -4,6 +4,8 @@ import Sora, { type SoraConnection, } from 'sora-js-sdk' +import { randomUUID } from 'node:crypto' + document.addEventListener('DOMContentLoaded', async () => { const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL const SORA_CHANNEL_ID_PREFIX = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || '' @@ -77,7 +79,7 @@ class SoraClient { this.sora = Sora.connection(signaling_url, this.debug) // channel_id の生成 - this.channelId = `${channel_id_prefix}sendonly_recvonly${channel_id_suffix}` + this.channelId = `${channel_id_prefix}sendonly_${randomUUID()}_${channel_id_suffix}` // access_token を指定する metadata の生成 this.metadata = { access_token: access_token } diff --git a/examples/sendonly_audio/main.mts b/examples/sendonly_audio/main.mts index 48fec6cb..72149cd2 100644 --- a/examples/sendonly_audio/main.mts +++ b/examples/sendonly_audio/main.mts @@ -4,6 +4,8 @@ import Sora, { type SoraConnection, } from 'sora-js-sdk' +import { randomUUID } from 'node:crypto' + document.addEventListener('DOMContentLoaded', async () => { const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL const SORA_CHANNEL_ID_PREFIX = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || '' @@ -82,7 +84,7 @@ class SoraClient { this.sora = Sora.connection(signaling_url, this.debug) // channel_id の生成 - this.channelId = `${channel_id_prefix}sendonly_audio_codec${channel_id_suffix}` + this.channelId = `${channel_id_prefix}sendonly_audio_${randomUUID()}_${channel_id_suffix}` // access_token を指定する metadata の生成 this.metadata = { access_token: access_token } diff --git a/examples/sendrecv/main.mts b/examples/sendrecv/main.mts index 56007135..3c9db3b6 100644 --- a/examples/sendrecv/main.mts +++ b/examples/sendrecv/main.mts @@ -4,6 +4,8 @@ import Sora, { type ConnectionPublisher, } from 'sora-js-sdk' +import { randomUUID } from 'node:crypto' + document.addEventListener('DOMContentLoaded', async () => { const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL const SORA_CHANNEL_ID_PREFIX = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || '' @@ -69,7 +71,7 @@ class SoraClient { accessToken: string, ) { this.sora = Sora.connection(signalingUrl, this.debug) - this.channelId = `${channelIdPrefix}sendrecv${channelIdSuffix}` + this.channelId = `${channelIdPrefix}sendrecv_${randomUUID()}_${channelIdSuffix}` this.metadata = { access_token: accessToken } this.options = {} diff --git a/examples/simulcast/main.mts b/examples/simulcast/main.mts index cd697cd0..626da56e 100644 --- a/examples/simulcast/main.mts +++ b/examples/simulcast/main.mts @@ -6,6 +6,8 @@ import Sora, { type SimulcastRid, } from 'sora-js-sdk' +import { randomUUID } from 'node:crypto' + document.addEventListener('DOMContentLoaded', () => { const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL const SORA_CHANNEL_ID_PREFIX = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || '' @@ -110,7 +112,7 @@ class SimulcastSendonlySoraClient { channel_id_suffix: string, access_token: string, ) { - this.channelId = `${channel_id_prefix}simulcast${channel_id_suffix}` + this.channelId = `${channel_id_prefix}simulcast_${randomUUID()}_${channel_id_suffix}` this.sora = Sora.connection(signaling_url, this.debug) this.connection = this.sora.sendonly( diff --git a/examples/spotlight_recvonly/main.mts b/examples/spotlight_recvonly/main.mts index 7e00cf48..903f160e 100644 --- a/examples/spotlight_recvonly/main.mts +++ b/examples/spotlight_recvonly/main.mts @@ -4,6 +4,8 @@ import Sora, { type ConnectionSubscriber, } from 'sora-js-sdk' +import { randomUUID } from 'node:crypto' + document.addEventListener('DOMContentLoaded', () => { // 環境変数の読み込み const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL @@ -52,7 +54,7 @@ class SoraClient { } // channel_id の生成 - this.channelId = `${channel_id_prefix}spotlight_sendonly_recvonly${channel_id_suffix}` + this.channelId = `${channel_id_prefix}spotlight_recvonly_${randomUUID()}_${channel_id_suffix}` // access_token を指定する metadata の生成 this.metadata = { access_token: access_token } diff --git a/examples/spotlight_sendonly/main.mts b/examples/spotlight_sendonly/main.mts index bc80563c..b7b4920f 100644 --- a/examples/spotlight_sendonly/main.mts +++ b/examples/spotlight_sendonly/main.mts @@ -4,6 +4,8 @@ import Sora, { type SoraConnection, } from 'sora-js-sdk' +import { randomUUID } from 'node:crypto' + document.addEventListener('DOMContentLoaded', async () => { const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL const SORA_CHANNEL_ID_PREFIX = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || '' @@ -51,7 +53,7 @@ class SoraClient { } // channel_id の生成 - this.channelId = `${channel_id_prefix}spotlight_sendonly_recvonly${channel_id_suffix}` + this.channelId = `${channel_id_prefix}spotlight_sendonly_${randomUUID()}_${channel_id_suffix}` // access_token を指定する metadata の生成 this.metadata = { access_token: access_token } diff --git a/examples/spotlight_sendrecv/main.mts b/examples/spotlight_sendrecv/main.mts index e9ee49ca..89d7fbb4 100644 --- a/examples/spotlight_sendrecv/main.mts +++ b/examples/spotlight_sendrecv/main.mts @@ -4,6 +4,8 @@ import Sora, { type SignalingNotifyMessage, } from 'sora-js-sdk' +import { randomUUID } from 'node:crypto' + document.addEventListener('DOMContentLoaded', async () => { const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL const SORA_CHANNEL_ID_PREFIX = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || '' @@ -68,7 +70,7 @@ class SoraClient { this.label = label this.sora = Sora.connection(signalingUrl, this.debug) - this.channelId = `${channelIdPrefix}spotlight_sendrecv${channelIdSuffix}` + this.channelId = `${channelIdPrefix}spotlight_sendrecv_${randomUUID()}_${channelIdSuffix}` this.metadata = { access_token: accessToken } this.options = { audio: true, diff --git a/examples/tsconfig.json b/examples/tsconfig.json index 0d62bea8..b9f33ad9 100644 --- a/examples/tsconfig.json +++ b/examples/tsconfig.json @@ -13,7 +13,7 @@ "resolveJsonModule": true, "stripInternal": true, "newLine": "LF", - "types": [], + "types": ["node"], "lib": ["esnext", "dom", "dom.iterable", "scripthost"] }, "exclude": ["node_modules"] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a07556d6..2a2ba913 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,13 +22,16 @@ importers: version: 5.6.2 vite: specifier: 5.4.7 - version: 5.4.7(@types/node@22.5.5) + version: 5.4.7(@types/node@22.7.5) vitest: specifier: 2.1.1 - version: 2.1.1(@types/node@22.5.5)(jsdom@25.0.0) + version: 2.1.1(@types/node@22.7.5)(jsdom@25.0.0) examples: dependencies: + '@types/node': + specifier: 22.7.5 + version: 22.7.5 sora-js-sdk: specifier: workspace:* version: link:.. @@ -40,7 +43,7 @@ importers: version: 25.0.0 vite-plugin-dts: specifier: 4.2.1 - version: 4.2.1(@types/node@22.5.5)(rollup@4.22.2)(typescript@5.6.2)(vite@5.4.7(@types/node@22.5.5)) + version: 4.2.1(@types/node@22.7.5)(rollup@4.22.2)(typescript@5.6.2)(vite@5.4.7(@types/node@22.7.5)) packages: @@ -414,8 +417,8 @@ packages: '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} - '@types/node@22.5.5': - resolution: {integrity: sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==} + '@types/node@22.7.5': + resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} @@ -1294,23 +1297,23 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} - '@microsoft/api-extractor-model@7.29.6(@types/node@22.5.5)': + '@microsoft/api-extractor-model@7.29.6(@types/node@22.7.5)': dependencies: '@microsoft/tsdoc': 0.15.0 '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.7.0(@types/node@22.5.5) + '@rushstack/node-core-library': 5.7.0(@types/node@22.7.5) transitivePeerDependencies: - '@types/node' - '@microsoft/api-extractor@7.47.7(@types/node@22.5.5)': + '@microsoft/api-extractor@7.47.7(@types/node@22.7.5)': dependencies: - '@microsoft/api-extractor-model': 7.29.6(@types/node@22.5.5) + '@microsoft/api-extractor-model': 7.29.6(@types/node@22.7.5) '@microsoft/tsdoc': 0.15.0 '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.7.0(@types/node@22.5.5) + '@rushstack/node-core-library': 5.7.0(@types/node@22.7.5) '@rushstack/rig-package': 0.5.3 - '@rushstack/terminal': 0.14.0(@types/node@22.5.5) - '@rushstack/ts-command-line': 4.22.6(@types/node@22.5.5) + '@rushstack/terminal': 0.14.0(@types/node@22.7.5) + '@rushstack/ts-command-line': 4.22.6(@types/node@22.7.5) lodash: 4.17.21 minimatch: 3.0.8 resolve: 1.22.8 @@ -1389,7 +1392,7 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.22.2': optional: true - '@rushstack/node-core-library@5.7.0(@types/node@22.5.5)': + '@rushstack/node-core-library@5.7.0(@types/node@22.7.5)': dependencies: ajv: 8.13.0 ajv-draft-04: 1.0.0(ajv@8.13.0) @@ -1400,23 +1403,23 @@ snapshots: resolve: 1.22.8 semver: 7.5.4 optionalDependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.5 '@rushstack/rig-package@0.5.3': dependencies: resolve: 1.22.8 strip-json-comments: 3.1.1 - '@rushstack/terminal@0.14.0(@types/node@22.5.5)': + '@rushstack/terminal@0.14.0(@types/node@22.7.5)': dependencies: - '@rushstack/node-core-library': 5.7.0(@types/node@22.5.5) + '@rushstack/node-core-library': 5.7.0(@types/node@22.7.5) supports-color: 8.1.1 optionalDependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.5 - '@rushstack/ts-command-line@4.22.6(@types/node@22.5.5)': + '@rushstack/ts-command-line@4.22.6(@types/node@22.7.5)': dependencies: - '@rushstack/terminal': 0.14.0(@types/node@22.5.5) + '@rushstack/terminal': 0.14.0(@types/node@22.7.5) '@types/argparse': 1.0.38 argparse: 1.0.10 string-argv: 0.3.2 @@ -1464,10 +1467,9 @@ snapshots: dependencies: '@types/unist': 3.0.3 - '@types/node@22.5.5': + '@types/node@22.7.5': dependencies: undici-types: 6.19.8 - optional: true '@types/unist@3.0.3': {} @@ -1480,13 +1482,13 @@ snapshots: chai: 5.1.1 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.7(@types/node@22.5.5))': + '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.7(@types/node@22.7.5))': dependencies: '@vitest/spy': 2.1.1 estree-walker: 3.0.3 magic-string: 0.30.11 optionalDependencies: - vite: 5.4.7(@types/node@22.5.5) + vite: 5.4.7(@types/node@22.7.5) '@vitest/pretty-format@2.1.1': dependencies: @@ -2096,8 +2098,7 @@ snapshots: ufo@1.5.4: {} - undici-types@6.19.8: - optional: true + undici-types@6.19.8: {} unist-util-is@6.0.0: dependencies: @@ -2145,12 +2146,12 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.1(@types/node@22.5.5): + vite-node@2.1.1(@types/node@22.7.5): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 - vite: 5.4.7(@types/node@22.5.5) + vite: 5.4.7(@types/node@22.7.5) transitivePeerDependencies: - '@types/node' - less @@ -2162,9 +2163,9 @@ snapshots: - supports-color - terser - vite-plugin-dts@4.2.1(@types/node@22.5.5)(rollup@4.22.2)(typescript@5.6.2)(vite@5.4.7(@types/node@22.5.5)): + vite-plugin-dts@4.2.1(@types/node@22.7.5)(rollup@4.22.2)(typescript@5.6.2)(vite@5.4.7(@types/node@22.7.5)): dependencies: - '@microsoft/api-extractor': 7.47.7(@types/node@22.5.5) + '@microsoft/api-extractor': 7.47.7(@types/node@22.7.5) '@rollup/pluginutils': 5.1.0(rollup@4.22.2) '@volar/typescript': 2.4.5 '@vue/language-core': 2.1.6(typescript@5.6.2) @@ -2175,25 +2176,25 @@ snapshots: magic-string: 0.30.11 typescript: 5.6.2 optionalDependencies: - vite: 5.4.7(@types/node@22.5.5) + vite: 5.4.7(@types/node@22.7.5) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite@5.4.7(@types/node@22.5.5): + vite@5.4.7(@types/node@22.7.5): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.22.2 optionalDependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.5 fsevents: 2.3.3 - vitest@2.1.1(@types/node@22.5.5)(jsdom@25.0.0): + vitest@2.1.1(@types/node@22.7.5)(jsdom@25.0.0): dependencies: '@vitest/expect': 2.1.1 - '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.7(@types/node@22.5.5)) + '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.7(@types/node@22.7.5)) '@vitest/pretty-format': 2.1.1 '@vitest/runner': 2.1.1 '@vitest/snapshot': 2.1.1 @@ -2208,11 +2209,11 @@ snapshots: tinyexec: 0.3.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.7(@types/node@22.5.5) - vite-node: 2.1.1(@types/node@22.5.5) + vite: 5.4.7(@types/node@22.7.5) + vite-node: 2.1.1(@types/node@22.7.5) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.5 jsdom: 25.0.0 transitivePeerDependencies: - less From 7af2ac732c2e90b11defd6a03cf6e58a25642847 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:36:07 +0900 Subject: [PATCH 10/21] =?UTF-8?q?Revert=20"uuid=20=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=81=99=E3=82=8B"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit d7e2892f9e58613817dd06495229f0d3966d7f2c. --- examples/messaging/main.mts | 4 +- examples/package.json | 1 - examples/recvonly/main.mts | 4 +- examples/sendonly/main.mts | 4 +- examples/sendonly_audio/main.mts | 4 +- examples/sendrecv/main.mts | 4 +- examples/simulcast/main.mts | 4 +- examples/spotlight_recvonly/main.mts | 4 +- examples/spotlight_sendonly/main.mts | 4 +- examples/spotlight_sendrecv/main.mts | 4 +- examples/tsconfig.json | 2 +- pnpm-lock.yaml | 75 ++++++++++++++-------------- 12 files changed, 47 insertions(+), 67 deletions(-) diff --git a/examples/messaging/main.mts b/examples/messaging/main.mts index 261cdbae..0bc616c8 100644 --- a/examples/messaging/main.mts +++ b/examples/messaging/main.mts @@ -6,8 +6,6 @@ import Sora, { type DataChannelEvent, } from 'sora-js-sdk' -import { randomUUID } from 'node:crypto' - document.addEventListener('DOMContentLoaded', async () => { const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL const SORA_CHANNEL_ID_PREFIX = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || '' @@ -80,7 +78,7 @@ class SoraClient { accessToken: string, ) { this.sora = Sora.connection(signalingUrl, this.debug) - this.channelId = `${channelIdPrefix}messaging_${randomUUID()}_${channelIdSuffix}` + this.channelId = `${channelIdPrefix}messaging${channelIdSuffix}` this.metadata = { access_token: accessToken } this.options = { diff --git a/examples/package.json b/examples/package.json index 40bddeda..97f6e2a5 100644 --- a/examples/package.json +++ b/examples/package.json @@ -6,7 +6,6 @@ "check": "tsc --noEmit" }, "dependencies": { - "@types/node": "22.7.5", "sora-js-sdk": "workspace:*" } } diff --git a/examples/recvonly/main.mts b/examples/recvonly/main.mts index afb5d8cc..4b58d7af 100644 --- a/examples/recvonly/main.mts +++ b/examples/recvonly/main.mts @@ -4,8 +4,6 @@ import Sora, { type ConnectionSubscriber, } from 'sora-js-sdk' -import { randomUUID } from 'node:crypto' - document.addEventListener('DOMContentLoaded', () => { // 環境変数の読み込み const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL @@ -80,7 +78,7 @@ class SoraClient { this.sora = Sora.connection(signaling_url, this.debug) // channel_id の生成 - this.channelId = `${channel_id_prefix}sendonly_recvonly${randomUUID()}_${channel_id_suffix}` + this.channelId = `${channel_id_prefix}sendonly_recvonly${channel_id_suffix}` // access_token を指定する metadata の生成 this.metadata = { access_token: access_token } diff --git a/examples/sendonly/main.mts b/examples/sendonly/main.mts index 5f727984..f15c5362 100644 --- a/examples/sendonly/main.mts +++ b/examples/sendonly/main.mts @@ -4,8 +4,6 @@ import Sora, { type SoraConnection, } from 'sora-js-sdk' -import { randomUUID } from 'node:crypto' - document.addEventListener('DOMContentLoaded', async () => { const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL const SORA_CHANNEL_ID_PREFIX = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || '' @@ -79,7 +77,7 @@ class SoraClient { this.sora = Sora.connection(signaling_url, this.debug) // channel_id の生成 - this.channelId = `${channel_id_prefix}sendonly_${randomUUID()}_${channel_id_suffix}` + this.channelId = `${channel_id_prefix}sendonly_recvonly${channel_id_suffix}` // access_token を指定する metadata の生成 this.metadata = { access_token: access_token } diff --git a/examples/sendonly_audio/main.mts b/examples/sendonly_audio/main.mts index 72149cd2..48fec6cb 100644 --- a/examples/sendonly_audio/main.mts +++ b/examples/sendonly_audio/main.mts @@ -4,8 +4,6 @@ import Sora, { type SoraConnection, } from 'sora-js-sdk' -import { randomUUID } from 'node:crypto' - document.addEventListener('DOMContentLoaded', async () => { const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL const SORA_CHANNEL_ID_PREFIX = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || '' @@ -84,7 +82,7 @@ class SoraClient { this.sora = Sora.connection(signaling_url, this.debug) // channel_id の生成 - this.channelId = `${channel_id_prefix}sendonly_audio_${randomUUID()}_${channel_id_suffix}` + this.channelId = `${channel_id_prefix}sendonly_audio_codec${channel_id_suffix}` // access_token を指定する metadata の生成 this.metadata = { access_token: access_token } diff --git a/examples/sendrecv/main.mts b/examples/sendrecv/main.mts index 3c9db3b6..56007135 100644 --- a/examples/sendrecv/main.mts +++ b/examples/sendrecv/main.mts @@ -4,8 +4,6 @@ import Sora, { type ConnectionPublisher, } from 'sora-js-sdk' -import { randomUUID } from 'node:crypto' - document.addEventListener('DOMContentLoaded', async () => { const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL const SORA_CHANNEL_ID_PREFIX = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || '' @@ -71,7 +69,7 @@ class SoraClient { accessToken: string, ) { this.sora = Sora.connection(signalingUrl, this.debug) - this.channelId = `${channelIdPrefix}sendrecv_${randomUUID()}_${channelIdSuffix}` + this.channelId = `${channelIdPrefix}sendrecv${channelIdSuffix}` this.metadata = { access_token: accessToken } this.options = {} diff --git a/examples/simulcast/main.mts b/examples/simulcast/main.mts index 626da56e..cd697cd0 100644 --- a/examples/simulcast/main.mts +++ b/examples/simulcast/main.mts @@ -6,8 +6,6 @@ import Sora, { type SimulcastRid, } from 'sora-js-sdk' -import { randomUUID } from 'node:crypto' - document.addEventListener('DOMContentLoaded', () => { const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL const SORA_CHANNEL_ID_PREFIX = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || '' @@ -112,7 +110,7 @@ class SimulcastSendonlySoraClient { channel_id_suffix: string, access_token: string, ) { - this.channelId = `${channel_id_prefix}simulcast_${randomUUID()}_${channel_id_suffix}` + this.channelId = `${channel_id_prefix}simulcast${channel_id_suffix}` this.sora = Sora.connection(signaling_url, this.debug) this.connection = this.sora.sendonly( diff --git a/examples/spotlight_recvonly/main.mts b/examples/spotlight_recvonly/main.mts index 903f160e..7e00cf48 100644 --- a/examples/spotlight_recvonly/main.mts +++ b/examples/spotlight_recvonly/main.mts @@ -4,8 +4,6 @@ import Sora, { type ConnectionSubscriber, } from 'sora-js-sdk' -import { randomUUID } from 'node:crypto' - document.addEventListener('DOMContentLoaded', () => { // 環境変数の読み込み const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL @@ -54,7 +52,7 @@ class SoraClient { } // channel_id の生成 - this.channelId = `${channel_id_prefix}spotlight_recvonly_${randomUUID()}_${channel_id_suffix}` + this.channelId = `${channel_id_prefix}spotlight_sendonly_recvonly${channel_id_suffix}` // access_token を指定する metadata の生成 this.metadata = { access_token: access_token } diff --git a/examples/spotlight_sendonly/main.mts b/examples/spotlight_sendonly/main.mts index b7b4920f..bc80563c 100644 --- a/examples/spotlight_sendonly/main.mts +++ b/examples/spotlight_sendonly/main.mts @@ -4,8 +4,6 @@ import Sora, { type SoraConnection, } from 'sora-js-sdk' -import { randomUUID } from 'node:crypto' - document.addEventListener('DOMContentLoaded', async () => { const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL const SORA_CHANNEL_ID_PREFIX = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || '' @@ -53,7 +51,7 @@ class SoraClient { } // channel_id の生成 - this.channelId = `${channel_id_prefix}spotlight_sendonly_${randomUUID()}_${channel_id_suffix}` + this.channelId = `${channel_id_prefix}spotlight_sendonly_recvonly${channel_id_suffix}` // access_token を指定する metadata の生成 this.metadata = { access_token: access_token } diff --git a/examples/spotlight_sendrecv/main.mts b/examples/spotlight_sendrecv/main.mts index 89d7fbb4..e9ee49ca 100644 --- a/examples/spotlight_sendrecv/main.mts +++ b/examples/spotlight_sendrecv/main.mts @@ -4,8 +4,6 @@ import Sora, { type SignalingNotifyMessage, } from 'sora-js-sdk' -import { randomUUID } from 'node:crypto' - document.addEventListener('DOMContentLoaded', async () => { const SORA_SIGNALING_URL = import.meta.env.VITE_SORA_SIGNALING_URL const SORA_CHANNEL_ID_PREFIX = import.meta.env.VITE_SORA_CHANNEL_ID_PREFIX || '' @@ -70,7 +68,7 @@ class SoraClient { this.label = label this.sora = Sora.connection(signalingUrl, this.debug) - this.channelId = `${channelIdPrefix}spotlight_sendrecv_${randomUUID()}_${channelIdSuffix}` + this.channelId = `${channelIdPrefix}spotlight_sendrecv${channelIdSuffix}` this.metadata = { access_token: accessToken } this.options = { audio: true, diff --git a/examples/tsconfig.json b/examples/tsconfig.json index b9f33ad9..0d62bea8 100644 --- a/examples/tsconfig.json +++ b/examples/tsconfig.json @@ -13,7 +13,7 @@ "resolveJsonModule": true, "stripInternal": true, "newLine": "LF", - "types": ["node"], + "types": [], "lib": ["esnext", "dom", "dom.iterable", "scripthost"] }, "exclude": ["node_modules"] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2a2ba913..a07556d6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,16 +22,13 @@ importers: version: 5.6.2 vite: specifier: 5.4.7 - version: 5.4.7(@types/node@22.7.5) + version: 5.4.7(@types/node@22.5.5) vitest: specifier: 2.1.1 - version: 2.1.1(@types/node@22.7.5)(jsdom@25.0.0) + version: 2.1.1(@types/node@22.5.5)(jsdom@25.0.0) examples: dependencies: - '@types/node': - specifier: 22.7.5 - version: 22.7.5 sora-js-sdk: specifier: workspace:* version: link:.. @@ -43,7 +40,7 @@ importers: version: 25.0.0 vite-plugin-dts: specifier: 4.2.1 - version: 4.2.1(@types/node@22.7.5)(rollup@4.22.2)(typescript@5.6.2)(vite@5.4.7(@types/node@22.7.5)) + version: 4.2.1(@types/node@22.5.5)(rollup@4.22.2)(typescript@5.6.2)(vite@5.4.7(@types/node@22.5.5)) packages: @@ -417,8 +414,8 @@ packages: '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} - '@types/node@22.7.5': - resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} + '@types/node@22.5.5': + resolution: {integrity: sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==} '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} @@ -1297,23 +1294,23 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} - '@microsoft/api-extractor-model@7.29.6(@types/node@22.7.5)': + '@microsoft/api-extractor-model@7.29.6(@types/node@22.5.5)': dependencies: '@microsoft/tsdoc': 0.15.0 '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.7.0(@types/node@22.7.5) + '@rushstack/node-core-library': 5.7.0(@types/node@22.5.5) transitivePeerDependencies: - '@types/node' - '@microsoft/api-extractor@7.47.7(@types/node@22.7.5)': + '@microsoft/api-extractor@7.47.7(@types/node@22.5.5)': dependencies: - '@microsoft/api-extractor-model': 7.29.6(@types/node@22.7.5) + '@microsoft/api-extractor-model': 7.29.6(@types/node@22.5.5) '@microsoft/tsdoc': 0.15.0 '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.7.0(@types/node@22.7.5) + '@rushstack/node-core-library': 5.7.0(@types/node@22.5.5) '@rushstack/rig-package': 0.5.3 - '@rushstack/terminal': 0.14.0(@types/node@22.7.5) - '@rushstack/ts-command-line': 4.22.6(@types/node@22.7.5) + '@rushstack/terminal': 0.14.0(@types/node@22.5.5) + '@rushstack/ts-command-line': 4.22.6(@types/node@22.5.5) lodash: 4.17.21 minimatch: 3.0.8 resolve: 1.22.8 @@ -1392,7 +1389,7 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.22.2': optional: true - '@rushstack/node-core-library@5.7.0(@types/node@22.7.5)': + '@rushstack/node-core-library@5.7.0(@types/node@22.5.5)': dependencies: ajv: 8.13.0 ajv-draft-04: 1.0.0(ajv@8.13.0) @@ -1403,23 +1400,23 @@ snapshots: resolve: 1.22.8 semver: 7.5.4 optionalDependencies: - '@types/node': 22.7.5 + '@types/node': 22.5.5 '@rushstack/rig-package@0.5.3': dependencies: resolve: 1.22.8 strip-json-comments: 3.1.1 - '@rushstack/terminal@0.14.0(@types/node@22.7.5)': + '@rushstack/terminal@0.14.0(@types/node@22.5.5)': dependencies: - '@rushstack/node-core-library': 5.7.0(@types/node@22.7.5) + '@rushstack/node-core-library': 5.7.0(@types/node@22.5.5) supports-color: 8.1.1 optionalDependencies: - '@types/node': 22.7.5 + '@types/node': 22.5.5 - '@rushstack/ts-command-line@4.22.6(@types/node@22.7.5)': + '@rushstack/ts-command-line@4.22.6(@types/node@22.5.5)': dependencies: - '@rushstack/terminal': 0.14.0(@types/node@22.7.5) + '@rushstack/terminal': 0.14.0(@types/node@22.5.5) '@types/argparse': 1.0.38 argparse: 1.0.10 string-argv: 0.3.2 @@ -1467,9 +1464,10 @@ snapshots: dependencies: '@types/unist': 3.0.3 - '@types/node@22.7.5': + '@types/node@22.5.5': dependencies: undici-types: 6.19.8 + optional: true '@types/unist@3.0.3': {} @@ -1482,13 +1480,13 @@ snapshots: chai: 5.1.1 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.7(@types/node@22.7.5))': + '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.7(@types/node@22.5.5))': dependencies: '@vitest/spy': 2.1.1 estree-walker: 3.0.3 magic-string: 0.30.11 optionalDependencies: - vite: 5.4.7(@types/node@22.7.5) + vite: 5.4.7(@types/node@22.5.5) '@vitest/pretty-format@2.1.1': dependencies: @@ -2098,7 +2096,8 @@ snapshots: ufo@1.5.4: {} - undici-types@6.19.8: {} + undici-types@6.19.8: + optional: true unist-util-is@6.0.0: dependencies: @@ -2146,12 +2145,12 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.1(@types/node@22.7.5): + vite-node@2.1.1(@types/node@22.5.5): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 - vite: 5.4.7(@types/node@22.7.5) + vite: 5.4.7(@types/node@22.5.5) transitivePeerDependencies: - '@types/node' - less @@ -2163,9 +2162,9 @@ snapshots: - supports-color - terser - vite-plugin-dts@4.2.1(@types/node@22.7.5)(rollup@4.22.2)(typescript@5.6.2)(vite@5.4.7(@types/node@22.7.5)): + vite-plugin-dts@4.2.1(@types/node@22.5.5)(rollup@4.22.2)(typescript@5.6.2)(vite@5.4.7(@types/node@22.5.5)): dependencies: - '@microsoft/api-extractor': 7.47.7(@types/node@22.7.5) + '@microsoft/api-extractor': 7.47.7(@types/node@22.5.5) '@rollup/pluginutils': 5.1.0(rollup@4.22.2) '@volar/typescript': 2.4.5 '@vue/language-core': 2.1.6(typescript@5.6.2) @@ -2176,25 +2175,25 @@ snapshots: magic-string: 0.30.11 typescript: 5.6.2 optionalDependencies: - vite: 5.4.7(@types/node@22.7.5) + vite: 5.4.7(@types/node@22.5.5) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite@5.4.7(@types/node@22.7.5): + vite@5.4.7(@types/node@22.5.5): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.22.2 optionalDependencies: - '@types/node': 22.7.5 + '@types/node': 22.5.5 fsevents: 2.3.3 - vitest@2.1.1(@types/node@22.7.5)(jsdom@25.0.0): + vitest@2.1.1(@types/node@22.5.5)(jsdom@25.0.0): dependencies: '@vitest/expect': 2.1.1 - '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.7(@types/node@22.7.5)) + '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.7(@types/node@22.5.5)) '@vitest/pretty-format': 2.1.1 '@vitest/runner': 2.1.1 '@vitest/snapshot': 2.1.1 @@ -2209,11 +2208,11 @@ snapshots: tinyexec: 0.3.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.7(@types/node@22.7.5) - vite-node: 2.1.1(@types/node@22.7.5) + vite: 5.4.7(@types/node@22.5.5) + vite-node: 2.1.1(@types/node@22.5.5) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.7.5 + '@types/node': 22.5.5 jsdom: 25.0.0 transitivePeerDependencies: - less From e7e8019c0ba44f3a20c986a177e9d67eeac7470a Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:36:21 +0900 Subject: [PATCH 11/21] =?UTF-8?q?=E5=A4=B1=E6=95=97=E3=81=97=E3=81=A6?= =?UTF-8?q?=E3=82=82=E7=B6=99=E7=B6=9A=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-pkg-e2e-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/npm-pkg-e2e-test.yml b/.github/workflows/npm-pkg-e2e-test.yml index 5400ab3e..2a4b6e75 100644 --- a/.github/workflows/npm-pkg-e2e-test.yml +++ b/.github/workflows/npm-pkg-e2e-test.yml @@ -16,6 +16,7 @@ on: jobs: npm-pkg-e2e-test: timeout-minutes: 20 + continue-on-error: true runs-on: ubuntu-latest strategy: matrix: From 5fc08de43b1c0af121ad05b0386eef29eb763a24 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:41:53 +0900 Subject: [PATCH 12/21] =?UTF-8?q?channelIdSuffix=20=E3=81=8C=E3=81=A1?= =?UTF-8?q?=E3=82=83=E3=82=93=E3=81=A8=E5=85=A5=E3=81=A3=E3=81=A6=E3=82=8B?= =?UTF-8?q?=E3=81=8B=E7=A2=BA=E8=AA=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/messaging/main.mts | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/messaging/main.mts b/examples/messaging/main.mts index 0bc616c8..7543ee58 100644 --- a/examples/messaging/main.mts +++ b/examples/messaging/main.mts @@ -79,6 +79,7 @@ class SoraClient { ) { this.sora = Sora.connection(signalingUrl, this.debug) this.channelId = `${channelIdPrefix}messaging${channelIdSuffix}` + console.log(channelIdPrefix) this.metadata = { access_token: accessToken } this.options = { From fd48aa56cd6c0a503e431552be9a327eaaa4e120 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:44:16 +0900 Subject: [PATCH 13/21] =?UTF-8?q?=E3=81=93=E3=82=8C=E3=81=A7=E3=81=A9?= =?UTF-8?q?=E3=81=86=E3=81=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-pkg-e2e-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-pkg-e2e-test.yml b/.github/workflows/npm-pkg-e2e-test.yml index 2a4b6e75..0d221e74 100644 --- a/.github/workflows/npm-pkg-e2e-test.yml +++ b/.github/workflows/npm-pkg-e2e-test.yml @@ -53,7 +53,7 @@ jobs: - run: pnpm exec playwright install ${{ matrix.browser }} --with-deps - run: pnpm exec playwright test --project=${{ matrix.browser }} env: - VITE_SORA_CHANNEL_ID_SUFFIX: _${{ github.run_id }} + VITE_SORA_CHANNEL_ID_SUFFIX: _${{ matrix.node }}_${{ matrix.sdk_version }} # - uses: actions/upload-artifact@v4 # if: always() # with: From c22c127afde1d24f1e9bebc5bcba2fd7304689a8 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:47:23 +0900 Subject: [PATCH 14/21] =?UTF-8?q?schedule=20=E3=81=A0=E3=81=91=E3=81=AB?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-pkg-e2e-test.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/npm-pkg-e2e-test.yml b/.github/workflows/npm-pkg-e2e-test.yml index 0d221e74..0ab306f0 100644 --- a/.github/workflows/npm-pkg-e2e-test.yml +++ b/.github/workflows/npm-pkg-e2e-test.yml @@ -1,14 +1,14 @@ name: npm-pkg-e2e-test on: - push: - branches: - - develop - - feature/* - paths-ignore: - - "**.md" - - "LICENSE" - - "NOTICE" + # push: + # branches: + # - develop + # - feature/* + # paths-ignore: + # - "**.md" + # - "LICENSE" + # - "NOTICE" schedule: # UTC 時間で毎日 2:00 (JST で 11:00) に実行、月曜日から金曜日 - cron: "0 2 * * 1-5" From 179c0d8fb5a714feda0e41143df23aac99c893a6 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:48:05 +0900 Subject: [PATCH 15/21] =?UTF-8?q?workflow=5Fdispatch=20=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-pkg-e2e-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/npm-pkg-e2e-test.yml b/.github/workflows/npm-pkg-e2e-test.yml index 0ab306f0..31daf15d 100644 --- a/.github/workflows/npm-pkg-e2e-test.yml +++ b/.github/workflows/npm-pkg-e2e-test.yml @@ -1,6 +1,7 @@ name: npm-pkg-e2e-test on: + workflow_dispatch: # push: # branches: # - develop From b15cfa712a5d0ea73e6eceb34f237c2ed8dc0008 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:57:46 +0900 Subject: [PATCH 16/21] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E3=81=8C=E3=81=86?= =?UTF-8?q?=E3=81=96=E3=81=84=E3=81=AE=E3=81=A7=E6=B8=9B=E3=82=89=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-pkg-e2e-test.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/npm-pkg-e2e-test.yml b/.github/workflows/npm-pkg-e2e-test.yml index 31daf15d..dd583c95 100644 --- a/.github/workflows/npm-pkg-e2e-test.yml +++ b/.github/workflows/npm-pkg-e2e-test.yml @@ -61,6 +61,12 @@ jobs: # name: playwright-report # path: playwright-report/ # retention-days: 30 + + slack_notify_succeeded: + needs: [npm-pkg-e2e-test] + runs-on: ubuntu-latest + if: success() + steps: - name: Slack Notification if: success() uses: rtCamp/action-slack-notify@v2 @@ -70,6 +76,11 @@ jobs: SLACK_TITLE: Succeeded SLACK_ICON_EMOJI: ":star-struck:" SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + slack_notify_failed: + needs: [npm-pkg-e2e-test] + runs-on: ubuntu-latest + if: failure() + steps: - name: Slack Notification if: failure() uses: rtCamp/action-slack-notify@v2 From 88eb3117a7b9c9d53fd4dbabd20bec6a03907b22 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 17:59:33 +0900 Subject: [PATCH 17/21] =?UTF-8?q?=E3=81=8A=E8=A9=A6=E3=81=97=E5=AE=9F?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-pkg-e2e-test.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/npm-pkg-e2e-test.yml b/.github/workflows/npm-pkg-e2e-test.yml index dd583c95..d8091ea0 100644 --- a/.github/workflows/npm-pkg-e2e-test.yml +++ b/.github/workflows/npm-pkg-e2e-test.yml @@ -2,14 +2,14 @@ name: npm-pkg-e2e-test on: workflow_dispatch: - # push: - # branches: - # - develop - # - feature/* - # paths-ignore: - # - "**.md" - # - "LICENSE" - # - "NOTICE" + push: + branches: + - develop + - feature/* + paths-ignore: + - "**.md" + - "LICENSE" + - "NOTICE" schedule: # UTC 時間で毎日 2:00 (JST で 11:00) に実行、月曜日から金曜日 - cron: "0 2 * * 1-5" @@ -21,6 +21,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: + # メンテナンスはおてて sdk_version: [ "2024.1.2", "2023.2.0", @@ -29,8 +30,8 @@ jobs: "2022.1.0", "2021.2.3", ] - # node: ["18", "20", "22"] - node: ["18"] + node: ["18", "20", "22"] + # node: ["18"] # browser: ["chromium", "firefox", "webkit"] browser: ["chromium"] env: From d06efd9f5f7783715227846fe325ea225eb9974c Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 18:03:44 +0900 Subject: [PATCH 18/21] =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=82=A2=E3=82=A6=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-pkg-e2e-test.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/npm-pkg-e2e-test.yml b/.github/workflows/npm-pkg-e2e-test.yml index d8091ea0..c418ded0 100644 --- a/.github/workflows/npm-pkg-e2e-test.yml +++ b/.github/workflows/npm-pkg-e2e-test.yml @@ -2,14 +2,14 @@ name: npm-pkg-e2e-test on: workflow_dispatch: - push: - branches: - - develop - - feature/* - paths-ignore: - - "**.md" - - "LICENSE" - - "NOTICE" + # push: + # branches: + # - develop + # - feature/* + # paths-ignore: + # - "**.md" + # - "LICENSE" + # - "NOTICE" schedule: # UTC 時間で毎日 2:00 (JST で 11:00) に実行、月曜日から金曜日 - cron: "0 2 * * 1-5" From 1a98c3bd2f873685235257c9dc448baea94c40ed Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 18:04:44 +0900 Subject: [PATCH 19/21] =?UTF-8?q?e2e=20=E3=82=82=E3=81=A4=E3=81=84?= =?UTF-8?q?=E3=81=A7=E3=81=AB=E7=9B=B4=E3=81=97=E3=81=A6=E3=81=8A=E3=81=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e-test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index a02668eb..884d45e9 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -19,8 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - # node: ["18", "20", "22"] - node: ["22"] + node: ["18", "20", "22"] # browser: ["chromium", "firefox", "webkit"] browser: ["chromium"] env: @@ -39,7 +38,7 @@ jobs: - run: pnpm exec playwright install ${{ matrix.browser }} --with-deps - run: pnpm exec playwright test --project=${{ matrix.browser }} env: - VITE_SORA_CHANNEL_ID_SUFFIX: _${{ github.run_id }} + VITE_SORA_CHANNEL_ID_SUFFIX: _${{ matrix.node }} # - uses: actions/upload-artifact@v4 # if: always() # with: From 55d8cf986485c3f57665734ad58a602bc911eb18 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 18:05:57 +0900 Subject: [PATCH 20/21] =?UTF-8?q?=E5=A4=89=E6=9B=B4=E5=B1=A5=E6=AD=B4?= =?UTF-8?q?=E3=82=92=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index e77da4a5..8960ee15 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -35,6 +35,8 @@ ### misc +- [ADD] npm に登録されている stable SDK の E2E テストを追加する + - @voluntas - [FIX] RTCPeerConnection.close は Promise ではないので await しないようにする - @voluntas - [CHANGE] ビルドシステムを Vite に変更する From 970815e3ac0ab1e58d122cfd263040dc9ec6bf70 Mon Sep 17 00:00:00 2001 From: voluntas Date: Tue, 15 Oct 2024 18:06:39 +0900 Subject: [PATCH 21/21] =?UTF-8?q?e2e-test=20=E3=81=AE=20slack=20=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E3=82=82=E6=B8=9B=E3=82=89=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e-test.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 884d45e9..b4c85153 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -45,6 +45,12 @@ jobs: # name: playwright-report # path: playwright-report/ # retention-days: 30 + + slack_notify_succeeded: + needs: [e2e-test] + runs-on: ubuntu-latest + if: success() + steps: - name: Slack Notification if: success() uses: rtCamp/action-slack-notify@v2 @@ -54,6 +60,11 @@ jobs: SLACK_TITLE: Succeeded SLACK_ICON_EMOJI: ":star-struck:" SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + slack_notify_failed: + needs: [e2e-test] + runs-on: ubuntu-latest + if: failure() + steps: - name: Slack Notification if: failure() uses: rtCamp/action-slack-notify@v2