diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index baea925..b0e59a1 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -34,4 +34,4 @@ jobs: if: always() # Also generate the report if tests are failing uses: davelosert/vitest-coverage-report-action@v1.4.0 with: - working-directory: "./src" + working-directory: "./" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1791869..c92f7ed 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -59,4 +59,4 @@ jobs: - name: Release and Publish run: | - pnpm release ${{ steps.package-info.outputs.version }} --ci --npm.publish=${{ inputs.publish-npm }} --github.update --github.assets=agora-rtc-sdk-ng-fake.zip + pnpm release ${{ steps.package-info.outputs.version }} --ci --npm.publish=${{ inputs.publish-npm }} --github.update --github.assets=dist/agora-rtc-sdk-ng-fake.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f98eef..20dfecd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # agora-rtc-sdk-ng-fake +- Update publish.yml (17e89f9) +- chore: release 1.0.0 (fbe4d07) +- Update publish.yml (934af34) +- chore: release 1.0.0 (a98db50) +- chore: ci (86eb463) + +* Update publish.yml (934af34) +* chore: release 1.0.0 (a98db50) +* chore: ci (86eb463) + +- chore: ci (86eb463) + +## 1.0.0 (2023-10-13) + +### Features + +- add default export ([2298832](https://github.com/AgoraIO-Extensions/agora-rtc-sdk-ng-fake/commit/22988323b5701fb288d4bbc719fc74937ac2619e)) +- export FakeAgoraRTC ([8ab4dd6](https://github.com/AgoraIO-Extensions/agora-rtc-sdk-ng-fake/commit/8ab4dd60e975cda60c43af4bd749127f897e61ca)) +- fake-agora-rtc ([9375445](https://github.com/AgoraIO-Extensions/agora-rtc-sdk-ng-fake/commit/9375445974e8ca824c3467306f9f24206fc91e95)) + +### Documentation + +- update readme ([c25fea2](https://github.com/AgoraIO-Extensions/agora-rtc-sdk-ng-fake/commit/c25fea253fc71712bbe84f1443e008b0ddfc08ba)) +- update readme ([4379382](https://github.com/AgoraIO-Extensions/agora-rtc-sdk-ng-fake/commit/4379382632853a9660d46a662bf1bb18c568cb62)) + +* feat: export FakeAgoraRTC (8ab4dd6) +* docs: update readme (c25fea2) + ## 1.0.0 (2023-09-05) ### Features diff --git a/package.json b/package.json index 5055333..0d47353 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ }, "main": "src/index.ts", "scripts": { + "start": "tsup src/index.ts --watch", "prepare": "husky install", "build": "tsup", "test": "vitest --coverage", diff --git a/src/index.ts b/src/index.ts index 4d06b9a..061b936 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,4 @@ +import { FakeRTCClient } from "./client"; import { createFakeAgoraRTC } from "./top"; import { FakeCameraVideoTrack, FakeMicrophoneAudioTrack } from "./tracks"; @@ -6,10 +7,21 @@ export * from "./eventemitter"; export * from "./client"; export * from "./version"; -export default createFakeAgoraRTC({ +const FakeAgoraRTC = createFakeAgoraRTC({ setAppType(): void { // }, createMicrophoneAudioTrack: async () => FakeMicrophoneAudioTrack.create(), createCameraVideoTrack: async () => FakeCameraVideoTrack.create(), + createClient: () => FakeRTCClient.create(), }); + +export function getFakeAgoraRTC() { + return FakeAgoraRTC; +} + +export const FakeAgoraRTCWrapper = { + getFakeAgoraRTC: getFakeAgoraRTC, +}; + +export default FakeAgoraRTC;