Skip to content

Commit

Permalink
Merge pull request #3 from AgoraIO-Extensions/dev/export-FakeAgoraRTC
Browse files Browse the repository at this point in the history
export FakeAgoraRTC
  • Loading branch information
guoxianzhe authored Oct 13, 2023
2 parents c25fea2 + 76f89b9 commit fe5c5b7
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "./"
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"main": "src/index.ts",
"scripts": {
"start": "tsup src/index.ts --watch",
"prepare": "husky install",
"build": "tsup",
"test": "vitest --coverage",
Expand Down
14 changes: 13 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { FakeRTCClient } from "./client";
import { createFakeAgoraRTC } from "./top";
import { FakeCameraVideoTrack, FakeMicrophoneAudioTrack } from "./tracks";

Expand All @@ -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;

0 comments on commit fe5c5b7

Please sign in to comment.