Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export FakeAgoraRTC #3

Merged
merged 11 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;