agora-appbuilder-core 2.2.0 → 2.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +7 -1
- package/package.json +4 -3
- package/template/Gulpfile.js +306 -87
- package/template/_gitignore +4 -1
- package/template/_package-lock.json +2297 -2533
- package/template/agora-rn-uikit/.git/HEAD +1 -1
- package/template/agora-rn-uikit/.git/config +3 -3
- package/template/agora-rn-uikit/.git/index +0 -0
- package/template/agora-rn-uikit/.git/logs/HEAD +2 -2
- package/template/agora-rn-uikit/.git/logs/refs/heads/master +1 -1
- package/template/agora-rn-uikit/.git/logs/refs/heads/release/fpe-1.0.0 +1 -0
- package/template/agora-rn-uikit/.git/logs/refs/remotes/origin/HEAD +1 -1
- package/template/agora-rn-uikit/.git/objects/pack/pack-f274a85fccfc9b5112d154bb3b6d34cb4b8dedde.idx +0 -0
- package/template/agora-rn-uikit/.git/objects/pack/{pack-0061d00cd98162a329a32b537488a35d0abeb069.pack → pack-f274a85fccfc9b5112d154bb3b6d34cb4b8dedde.pack} +0 -0
- package/template/agora-rn-uikit/.git/packed-refs +5 -1
- package/template/agora-rn-uikit/.git/refs/heads/release/fpe-1.0.0 +1 -0
- package/template/agora-rn-uikit/src/AgoraUIKit.tsx +23 -20
- package/template/agora-rn-uikit/src/Contexts/LocalUserContext.tsx +13 -8
- package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +25 -9
- package/template/agora-rn-uikit/src/Contexts/RenderContext.tsx +10 -0
- package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +11 -5
- package/template/agora-rn-uikit/src/Controls/BtnTemplate.tsx +6 -2
- package/template/agora-rn-uikit/src/Controls/ImageIcon.tsx +1 -1
- package/template/agora-rn-uikit/src/Controls/Local/EndCall.tsx +6 -2
- package/template/agora-rn-uikit/src/Controls/Local/LocalAudioMute.tsx +2 -2
- package/template/agora-rn-uikit/src/Controls/Local/LocalVideoMute.tsx +2 -2
- package/template/agora-rn-uikit/src/Controls/Local/SwitchCamera.tsx +6 -2
- package/template/agora-rn-uikit/src/Controls/LocalControls.tsx +11 -6
- package/template/agora-rn-uikit/src/Controls/Remote/RemoteAudioMute.tsx +10 -6
- package/template/agora-rn-uikit/src/Controls/Remote/RemoteSwap.tsx +7 -6
- package/template/agora-rn-uikit/src/Controls/Remote/RemoteVideoMute.tsx +6 -5
- package/template/agora-rn-uikit/src/Controls/RemoteControls.tsx +3 -3
- package/template/agora-rn-uikit/src/Reducer/LocalMuteAudio.ts +16 -13
- package/template/agora-rn-uikit/src/Reducer/LocalMuteVideo.ts +16 -13
- package/template/agora-rn-uikit/src/Reducer/RemoteAudioStateChanged.ts +13 -13
- package/template/agora-rn-uikit/src/Reducer/RemoteVideoStateChanged.ts +16 -13
- package/template/agora-rn-uikit/src/Reducer/UpdateDualStreamMode.ts +28 -31
- package/template/agora-rn-uikit/src/Reducer/UserJoined.ts +48 -35
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteAudio.ts +11 -13
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteVideo.ts +11 -13
- package/template/agora-rn-uikit/src/Reducer/UserOffline.ts +18 -15
- package/template/agora-rn-uikit/src/Rtc/Create.tsx +14 -2
- package/template/agora-rn-uikit/src/Rtc/Join.tsx +19 -3
- package/template/agora-rn-uikit/src/RtcConfigure.tsx +161 -44
- package/template/agora-rn-uikit/src/Utils/useLocalUid.ts +8 -0
- package/template/agora-rn-uikit/src/Views/MaxVideoView.native.tsx +8 -6
- package/template/agora-rn-uikit/src/Views/MaxVideoView.tsx +8 -6
- package/template/agora-rn-uikit/src/Views/MinVideoView.tsx +18 -9
- package/template/agora-rn-uikit/src/index.ts +12 -12
- package/template/babel.config.js +17 -1
- package/template/bridge/rtc/webNg/RtcEngine.ts +34 -28
- package/template/bridge/rtc/webNg/SurfaceView.tsx +3 -2
- package/template/bridge/rtc/webNg/Types.ts +14 -0
- package/template/bridge/rtc/webNg/index.ts +5 -2
- package/template/bridge/rtm/web/index.ts +13 -7
- package/template/electron-builder.js +3 -2
- package/template/esbuild.rsdk.go +226 -0
- package/template/{src/subComponents/LayoutEnum.tsx → esbuildConfigTransform.js} +1 -5
- package/template/fpe-api/components.ts +42 -0
- package/template/fpe-api/context.ts +45 -0
- package/template/fpe-api/fpeEvents.ts +9 -0
- package/template/fpe-api/index.ts +21 -0
- package/template/fpe-api/install.ts +128 -0
- package/template/fpe-api/typeDefinition.ts +143 -0
- package/template/fpe-api/useFpe.tsx +35 -0
- package/template/fpe-api/utils.ts +62 -0
- package/template/fpe-implementation/createHook.ts +33 -0
- package/template/fpe-implementation/dummyFpe.ts +17 -0
- package/template/fpe-implementation/index.ts +1 -0
- package/template/fpe-todo.txt +14 -0
- package/template/fpe.config.js +25 -0
- package/template/global.d.ts +4 -0
- package/template/index.rsdk.tsx +27 -0
- package/template/index.wsdk.tsx +27 -0
- package/template/package-lock.json +2297 -2533
- package/template/package.json +28 -12
- package/template/react-native-toast-message/src/index.js +9 -10
- package/template/react-native-toast-message/src/index.wsdk.js +419 -0
- package/template/src/App.tsx +97 -65
- package/template/src/AppWrapper.tsx +79 -0
- package/template/src/SDKAppWrapper.tsx +67 -0
- package/template/src/atoms/PrimaryButton.tsx +14 -8
- package/template/src/atoms/TextInput.tsx +13 -5
- package/template/src/components/Chat.tsx +171 -139
- package/template/src/components/ChatContext.ts +14 -22
- package/template/src/components/ColorConfigure.tsx +2 -2
- package/template/src/components/Controls.native.tsx +72 -62
- package/template/src/components/Controls.tsx +90 -69
- package/template/src/components/DeviceConfigure.tsx +1 -1
- package/template/src/components/DeviceContext.tsx +14 -7
- package/template/src/components/GraphQLProvider.tsx +9 -2
- package/template/src/components/GridVideo.tsx +20 -159
- package/template/src/components/HostControlView.tsx +54 -15
- package/template/src/components/Navbar.tsx +408 -157
- package/template/src/components/NetworkQualityContext.tsx +29 -22
- package/template/src/components/ParticipantsView.tsx +97 -119
- package/template/src/components/PinnedVideo.tsx +41 -188
- package/template/src/components/Precall.native.tsx +131 -97
- package/template/src/components/Precall.tsx +193 -158
- package/template/src/components/RTMConfigure.tsx +320 -398
- package/template/src/components/Router.sdk.ts +20 -0
- package/template/src/components/SessionContext.tsx +6 -3
- package/template/src/components/Settings.native.tsx +3 -0
- package/template/src/components/Settings.tsx +65 -31
- package/template/src/components/SettingsView.tsx +14 -8
- package/template/src/components/Share.tsx +188 -220
- package/template/src/components/StorageContext.tsx +5 -5
- package/template/src/components/StoreToken.tsx +5 -1
- package/template/src/components/chat-messages/useChatMessages.tsx +202 -0
- package/template/src/components/chat-notification/useChatNotification.tsx +78 -0
- package/template/src/components/chat-ui/useChatUIControl.tsx +66 -0
- package/template/src/components/common/Error.tsx +54 -0
- package/template/src/components/common/Logo.tsx +35 -0
- package/template/src/components/common/index.tsx +8 -0
- package/template/src/components/contexts/LiveStreamDataContext.tsx +79 -0
- package/template/src/components/contexts/ScreenShareContext.tsx +47 -0
- package/template/src/components/contexts/WhiteboardContext.tsx +59 -0
- package/template/src/components/dimension/DimensionContext.ts +27 -0
- package/template/src/components/dimension/DimensionProvider.tsx +34 -0
- package/template/src/components/livestream/LiveStreamContext.tsx +293 -272
- package/template/src/components/livestream/Types.ts +26 -7
- package/template/src/components/livestream/index.ts +13 -2
- package/template/src/components/livestream/views/LiveStreamControls.tsx +5 -1
- package/template/src/components/meeting-info/useMeetingInfo.tsx +63 -0
- package/template/src/components/meeting-info/useSetMeetingInfo.tsx +38 -0
- package/template/src/components/participants/AllAudienceParticipants.tsx +26 -21
- package/template/src/components/participants/AllHostParticipants.tsx +36 -53
- package/template/src/components/participants/MeParticipant.tsx +9 -10
- package/template/src/components/participants/ParticipantName.tsx +2 -1
- package/template/src/components/participants/RemoteParticipants.tsx +3 -3
- package/template/src/components/precall/LocalMute.native.tsx +91 -0
- package/template/src/components/precall/LocalMute.tsx +90 -0
- package/template/src/components/precall/VideoPreview.native.tsx +35 -0
- package/template/src/components/precall/VideoPreview.tsx +33 -0
- package/template/src/components/precall/index.tsx +28 -0
- package/template/src/components/precall/joinCallBtn.native.tsx +69 -0
- package/template/src/components/precall/joinCallBtn.tsx +91 -0
- package/template/src/components/precall/meetingTitle.tsx +26 -0
- package/template/src/components/precall/selectDevice.tsx +46 -0
- package/template/src/components/precall/textInput.tsx +43 -0
- package/template/src/components/precall/usePreCall.tsx +41 -0
- package/template/src/components/styles.ts +20 -3
- package/template/src/components/useShareLink.tsx +222 -0
- package/template/src/components/useWakeLock.tsx +3 -3
- package/template/src/custom-events/CustomEvents.ts +197 -0
- package/template/src/custom-events/index.tsx +4 -0
- package/template/src/custom-events/types.ts +51 -0
- package/template/src/language/default-labels/commonLabels.ts +21 -0
- package/template/src/language/default-labels/createScreenLabels.ts +22 -0
- package/template/src/language/default-labels/index.ts +38 -0
- package/template/src/language/default-labels/joinScreenLabels.ts +13 -0
- package/template/src/language/default-labels/precallScreenLabels.ts +33 -0
- package/template/src/language/default-labels/shareLinkScreenLabels.ts +44 -0
- package/template/src/language/default-labels/videoCallScreenLabels.ts +189 -0
- package/template/src/language/i18nTypes.ts +10 -0
- package/template/src/language/index.ts +18 -0
- package/template/src/language/useLanguage.tsx +92 -0
- package/template/src/pages/Authenticate.tsx +21 -15
- package/template/src/pages/Create.tsx +176 -159
- package/template/src/pages/Join.tsx +44 -32
- package/template/src/pages/VideoCall.tsx +134 -406
- package/template/src/pages/create/useCreate.tsx +37 -0
- package/template/src/pages/video-call/CustomLayout.ts +17 -0
- package/template/src/pages/video-call/CustomUserContextHolder.tsx +12 -0
- package/template/src/pages/video-call/DefaultLayouts.ts +65 -0
- package/template/src/pages/video-call/NameWithMicStatus.tsx +62 -0
- package/template/src/pages/video-call/RenderComponent.tsx +52 -0
- package/template/src/pages/video-call/VideoCallScreen.tsx +191 -0
- package/template/src/pages/video-call/VideoComponent.tsx +34 -0
- package/template/src/pages/video-call/VideoRenderer.tsx +86 -0
- package/template/src/pages/video-call/index.ts +20 -0
- package/template/src/rtm/RTMEngine.ts +58 -0
- package/template/src/rtm/utils.ts +28 -0
- package/template/src/rtm-events/EventUtils.ts +268 -0
- package/template/src/rtm-events/EventsQueue.ts +38 -0
- package/template/src/rtm-events/constants.ts +40 -0
- package/template/src/rtm-events/index.tsx +8 -0
- package/template/src/rtm-events/types.ts +7 -0
- package/template/src/subComponents/ChatBubble.tsx +18 -11
- package/template/src/subComponents/ChatContainer.tsx +78 -29
- package/template/src/subComponents/ChatInput.tsx +146 -70
- package/template/src/subComponents/CopyJoinInfo.tsx +52 -67
- package/template/src/subComponents/Error.tsx +35 -24
- package/template/src/subComponents/LanguageSelector.tsx +85 -0
- package/template/src/subComponents/LayoutIconDropdown.native.tsx +163 -0
- package/template/src/subComponents/LayoutIconDropdown.tsx +198 -0
- package/template/src/subComponents/LocalAudioMute.tsx +52 -30
- package/template/src/subComponents/LocalEndCall.tsx +52 -0
- package/template/src/subComponents/LocalSwitchCamera.tsx +61 -0
- package/template/src/subComponents/LocalVideoMute.tsx +48 -30
- package/template/src/subComponents/LogoutButton.tsx +20 -5
- package/template/src/subComponents/NetworkQualityPill.tsx +43 -13
- package/template/src/subComponents/OpenInNativeButton.tsx +3 -2
- package/template/src/subComponents/Recording.tsx +46 -138
- package/template/src/subComponents/RemoteAudioMute.tsx +30 -34
- package/template/src/subComponents/RemoteEndCall.tsx +18 -7
- package/template/src/subComponents/RemoteVideoMute.tsx +17 -9
- package/template/src/subComponents/ScreenShareNotice.tsx +40 -40
- package/template/src/subComponents/SelectDevice.tsx +88 -45
- package/template/src/subComponents/SelectOAuth.tsx +30 -6
- package/template/src/subComponents/SidePanelButtons.ts +39 -0
- package/template/src/subComponents/TextWithTooltip.native.tsx +2 -1
- package/template/src/subComponents/TextWithTooltip.tsx +15 -20
- package/template/src/subComponents/chat/ChatParticipants.tsx +31 -32
- package/template/src/subComponents/livestream/ApprovedLiveStreamControlsView.tsx +7 -3
- package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +32 -18
- package/template/src/subComponents/livestream/controls/LocalRaiseHand.tsx +22 -8
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamApprovedRequestRecall.tsx +12 -7
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestApprove.tsx +24 -27
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestReject.tsx +23 -26
- package/template/src/subComponents/livestream/index.ts +10 -2
- package/template/src/subComponents/recording/useRecording.tsx +209 -0
- package/template/src/subComponents/recording/useRecordingLayoutQuery.tsx +64 -0
- package/template/src/subComponents/screenshare/ScreenshareButton.native.tsx +18 -0
- package/template/src/subComponents/screenshare/ScreenshareButton.tsx +59 -31
- package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +57 -52
- package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +97 -138
- package/template/src/subComponents/screenshare/useScreenshare.tsx +29 -0
- package/template/src/subComponents/toastConfig.tsx +25 -20
- package/template/src/utils/IsAttendeeUser.ts +34 -0
- package/template/src/utils/SdkEvents.ts +68 -0
- package/template/src/utils/common.tsx +40 -0
- package/template/src/utils/eventEmitter.ts +29 -0
- package/template/src/utils/getMeetingInvite.ts +30 -0
- package/template/src/utils/index.tsx +11 -2
- package/template/src/utils/isAudioEnabled.ts +29 -0
- package/template/src/utils/isHostUser.ts +33 -0
- package/template/src/utils/isMobileOrTablet.native.ts +5 -0
- package/template/src/utils/{mobileWebTest.tsx → isMobileOrTablet.ts} +5 -2
- package/template/src/utils/isPSTNUser.ts +30 -0
- package/template/src/utils/isSDK.sdk.ts +5 -0
- package/template/src/utils/isSDK.ts +5 -0
- package/template/src/utils/isScreenShareUser.ts +31 -0
- package/template/src/utils/isVideoEnabled.ts +29 -0
- package/template/src/utils/useButtonTemplate.tsx +43 -0
- package/template/src/utils/useCreateMeeting.ts +74 -0
- package/template/src/utils/useGetLiveStreamingRequests.ts +24 -0
- package/template/src/utils/useGetMeetingPhrase.ts +68 -0
- package/template/src/utils/useGetName.ts +20 -0
- package/template/src/{subComponents/screenshare/ScreenshareContext.tsx → utils/useGroupMessages.ts} +10 -7
- package/template/src/utils/useJoinMeeting.ts +120 -0
- package/template/src/utils/useLayout.tsx +40 -0
- package/template/src/utils/useLiveStreamingUids.ts +26 -0
- package/template/src/utils/useMutePSTN.ts +43 -0
- package/template/src/utils/useMuteToggleLocal.ts +109 -0
- package/template/src/utils/useNavParams.ts +6 -0
- package/template/src/utils/useNavigateTo.ts +8 -0
- package/template/src/utils/usePrivateMessages.ts +33 -0
- package/template/src/utils/useRemoteEndCall.ts +27 -0
- package/template/src/utils/useRemoteMute.ts +64 -0
- package/template/src/utils/useSendControlMessage.ts +51 -0
- package/template/src/utils/useSendMessage.ts +40 -0
- package/template/src/utils/useSetName.ts +20 -0
- package/template/src/utils/useSetUnreadMessageCount.ts +43 -0
- package/template/src/utils/useSidePanel.tsx +41 -0
- package/template/src/utils/useString.ts +61 -0
- package/template/src/utils/useUnreadMessageCount.ts +50 -0
- package/template/src/utils/useUserList.ts +26 -0
- package/template/tsconfig.json +4 -4
- package/template/tsconfig_fpeApi.json +103 -0
- package/template/tsconfig_rsdk_index.json +105 -0
- package/template/tsconfig_wsdk_index.json +104 -0
- package/template/webpack.commons.js +40 -16
- package/template/webpack.main.config.js +2 -1
- package/template/webpack.renderer.config.js +1 -1
- package/template/webpack.rsdk.config.js +33 -0
- package/template/webpack.ts.config.js +89 -0
- package/template/webpack.web.config.js +8 -1
- package/template/webpack.wsdk.config.js +34 -0
- package/template/agora-rn-uikit/.git/logs/refs/heads/ab-dev-auto +0 -1
- package/template/agora-rn-uikit/.git/objects/pack/pack-0061d00cd98162a329a32b537488a35d0abeb069.idx +0 -0
- package/template/agora-rn-uikit/.git/refs/heads/ab-dev-auto +0 -1
- package/template/agora-rn-uikit/src/Contexts/MaxUidContext.tsx +0 -7
- package/template/agora-rn-uikit/src/Contexts/MinUidContext.tsx +0 -8
- package/template/src/components/participants/context/ParticipantContext.tsx +0 -97
- package/template/src/subComponents/ScreenshareButton.tsx +0 -257
- package/template/src/subComponents/SwitchCamera.tsx +0 -35
- package/template/src/utils/hasBrandLogo.tsx +0 -3
- package/template/src/utils/mobileWebTest.native.tsx +0 -5
- package/template/src/utils/shouldAuthenticate.tsx +0 -7
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
// --------------------------------------------------------
|
|
3
|
+
// Use with webpack loader
|
|
4
|
+
// "files":["./fpe-api/index.ts","./global.d.ts","./bridge/rtm/web/index.ts","./bridge/rtc/webNg/index.ts"],
|
|
5
|
+
// --------------------------------------------------------
|
|
6
|
+
// Use with typescript tsc command
|
|
7
|
+
"files":["./fpe-api/index.ts","./global.d.ts"],
|
|
8
|
+
// --------------------------------------------------------
|
|
9
|
+
"compilerOptions": {
|
|
10
|
+
/* Basic Options */
|
|
11
|
+
"target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
|
|
12
|
+
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
|
13
|
+
"lib": [
|
|
14
|
+
"esNext",
|
|
15
|
+
"DOM"
|
|
16
|
+
] /* Specify library files to be included in the compilation. */,
|
|
17
|
+
"typeRoots": ["./global.d.ts"],
|
|
18
|
+
"allowJs": true /* Allow javascript files to be compiled. */,
|
|
19
|
+
// "checkJs": true, /* Report errors in .js files. */
|
|
20
|
+
"jsx": "react-native" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
|
|
21
|
+
"declaration": true /* Generates corresponding '.d.ts' file. */,
|
|
22
|
+
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
|
23
|
+
// "noResolve": true,
|
|
24
|
+
// "outDir": "dist" /* Redirect output structure to the directory. */,
|
|
25
|
+
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
|
26
|
+
// "removeComments": true, /* Do not emit comments to output. */
|
|
27
|
+
"noEmit": false /* Do not emit outputs. */,
|
|
28
|
+
"noEmitOnError": false,
|
|
29
|
+
// "incremental": true, /* Enable incremental compilation */ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
|
30
|
+
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
|
31
|
+
//"isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */,
|
|
32
|
+
|
|
33
|
+
/* Strict Type-Checking Options */
|
|
34
|
+
//"strict": true /* Enable all strict type-checking options. */,
|
|
35
|
+
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
|
36
|
+
// "strictNullChecks": true, /* Enable strict null checks. */
|
|
37
|
+
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
|
38
|
+
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
|
39
|
+
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
|
40
|
+
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
|
41
|
+
|
|
42
|
+
/* Additional Checks */
|
|
43
|
+
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
|
44
|
+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
45
|
+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
46
|
+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
47
|
+
|
|
48
|
+
/* Module Resolution Options */
|
|
49
|
+
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
|
|
50
|
+
"baseUrl": "./" /* Base directory to resolve non-absolute module names. */,
|
|
51
|
+
"resolveJsonModule": true,
|
|
52
|
+
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
53
|
+
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
54
|
+
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
55
|
+
// "types": ["./node_modules/agora-react-native-rtm/lib/typescript/src/RtmEngine"], /* Type declaration files to be included in compilation. */
|
|
56
|
+
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
|
|
57
|
+
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
|
58
|
+
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
59
|
+
|
|
60
|
+
/* Source Map Options */
|
|
61
|
+
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
62
|
+
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
63
|
+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
64
|
+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
65
|
+
|
|
66
|
+
/* Experimental Options */
|
|
67
|
+
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
68
|
+
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
69
|
+
//
|
|
70
|
+
//
|
|
71
|
+
// --------------------------------------------------------
|
|
72
|
+
// ---------------------CONFIG CHANGES---------------------
|
|
73
|
+
// --------------------------------------------------------
|
|
74
|
+
// Use with webpack loader
|
|
75
|
+
// "isolatedModules": true,
|
|
76
|
+
// "emitDeclarationOnly": false
|
|
77
|
+
// --------------------------------------------------------
|
|
78
|
+
// Use with typescript tsc command
|
|
79
|
+
"isolatedModules": false,
|
|
80
|
+
"emitDeclarationOnly": true,
|
|
81
|
+
"skipLibCheck": true,
|
|
82
|
+
"paths": {
|
|
83
|
+
"agora-react-native-rtm": ["./bridge/rtm/web/index.ts"],
|
|
84
|
+
"react-native-agora": ["./bridge/rtc/webNg/index.ts"],
|
|
85
|
+
"react-native": ["react-native-web"],
|
|
86
|
+
"fpe-api": ["./fpe-api/index.ts"],
|
|
87
|
+
"fpe-api/install": ["./fpe-api/install.ts"],
|
|
88
|
+
"fpe-implementation": ["./fpe-implementation/index.ts"],
|
|
89
|
+
"./RtcContext": ["agora-rn-uikit/src/index"]
|
|
90
|
+
}
|
|
91
|
+
// --------------------------------------------------------
|
|
92
|
+
},
|
|
93
|
+
// "references": [{"path": "./fpe-api", "prepend": true}],
|
|
94
|
+
"exclude": [
|
|
95
|
+
//"node_modules",
|
|
96
|
+
"babel.config.js",
|
|
97
|
+
"metro.config.js",
|
|
98
|
+
"jest.config.js"
|
|
99
|
+
],
|
|
100
|
+
"include": [
|
|
101
|
+
"node_modules/agora"
|
|
102
|
+
]
|
|
103
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
// --------------------------------------------------------
|
|
3
|
+
// Use with webpack loader
|
|
4
|
+
// "files":["./fpe-api/index.ts","./global.d.ts","./bridge/rtm/web/index.ts","./bridge/rtc/webNg/index.ts"],
|
|
5
|
+
// --------------------------------------------------------
|
|
6
|
+
// Use with typescript tsc command
|
|
7
|
+
"files":["./src/SDKAppWrapper.tsx","./index.rsdk.tsx","./global.d.ts"],
|
|
8
|
+
// --------------------------------------------------------
|
|
9
|
+
"compilerOptions": {
|
|
10
|
+
/* Basic Options */
|
|
11
|
+
"target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
|
|
12
|
+
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
|
13
|
+
"lib": [
|
|
14
|
+
"esNext",
|
|
15
|
+
"DOM"
|
|
16
|
+
] /* Specify library files to be included in the compilation. */,
|
|
17
|
+
"typeRoots": ["./global.d.ts"],
|
|
18
|
+
"allowJs": true /* Allow javascript files to be compiled. */,
|
|
19
|
+
// "checkJs": true, /* Report errors in .js files. */
|
|
20
|
+
"jsx": "react-native" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
|
|
21
|
+
"declaration": true /* Generates corresponding '.d.ts' file. */,
|
|
22
|
+
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
|
23
|
+
// "noResolve": true,
|
|
24
|
+
// "outDir": "dist" /* Redirect output structure to the directory. */,
|
|
25
|
+
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
|
26
|
+
// "removeComments": true, /* Do not emit comments to output. */
|
|
27
|
+
"noEmit": false /* Do not emit outputs. */,
|
|
28
|
+
"noEmitOnError": false,
|
|
29
|
+
// "incremental": true, /* Enable incremental compilation */
|
|
30
|
+
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
|
31
|
+
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
|
32
|
+
//"isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */,
|
|
33
|
+
|
|
34
|
+
/* Strict Type-Checking Options */
|
|
35
|
+
//"strict": true /* Enable all strict type-checking options. */,
|
|
36
|
+
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
|
37
|
+
// "strictNullChecks": true, /* Enable strict null checks. */
|
|
38
|
+
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
|
39
|
+
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
|
40
|
+
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
|
41
|
+
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
|
42
|
+
|
|
43
|
+
/* Additional Checks */
|
|
44
|
+
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
|
45
|
+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
46
|
+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
47
|
+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
48
|
+
|
|
49
|
+
/* Module Resolution Options */
|
|
50
|
+
// "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
|
|
51
|
+
"noResolve": true /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
|
|
52
|
+
"baseUrl": "./" /* Base directory to resolve non-absolute module names. */,
|
|
53
|
+
"resolveJsonModule": true,
|
|
54
|
+
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
55
|
+
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
56
|
+
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
57
|
+
// "types": ["./node_modules/agora-react-native-rtm/lib/typescript/src/RtmEngine"], /* Type declaration files to be included in compilation. */
|
|
58
|
+
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
|
|
59
|
+
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
|
60
|
+
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
61
|
+
|
|
62
|
+
/* Source Map Options */
|
|
63
|
+
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
64
|
+
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
65
|
+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
66
|
+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
67
|
+
|
|
68
|
+
/* Experimental Options */
|
|
69
|
+
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
70
|
+
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
71
|
+
//
|
|
72
|
+
//
|
|
73
|
+
// --------------------------------------------------------
|
|
74
|
+
// ---------------------CONFIG CHANGES---------------------
|
|
75
|
+
// --------------------------------------------------------
|
|
76
|
+
// Use with webpack loader
|
|
77
|
+
// "isolatedModules": true,
|
|
78
|
+
// "emitDeclarationOnly": false
|
|
79
|
+
// --------------------------------------------------------
|
|
80
|
+
// Use with typescript tsc command
|
|
81
|
+
"isolatedModules": false,
|
|
82
|
+
"emitDeclarationOnly": true,
|
|
83
|
+
"skipLibCheck": true,
|
|
84
|
+
"paths": {
|
|
85
|
+
"agora-react-native-rtm": ["./bridge/rtm/web/index.ts"],
|
|
86
|
+
"react-native-agora": ["./bridge/rtc/webNg/index.ts"],
|
|
87
|
+
"react-native": ["react-native-web"],
|
|
88
|
+
"fpe-api": ["./fpe-api/index.ts"],
|
|
89
|
+
"fpe-api/install": ["./fpe-api/install.ts"],
|
|
90
|
+
"fpe-implementation": ["./fpe-implementation/index.ts"],
|
|
91
|
+
"./RtcContext": ["agora-rn-uikit/src/index"]
|
|
92
|
+
}
|
|
93
|
+
// --------------------------------------------------------
|
|
94
|
+
},
|
|
95
|
+
// "references": [{"path": "./fpe-api", "prepend": true}],
|
|
96
|
+
"exclude": [
|
|
97
|
+
//"node_modules",
|
|
98
|
+
"babel.config.js",
|
|
99
|
+
"metro.config.js",
|
|
100
|
+
"jest.config.js"
|
|
101
|
+
],
|
|
102
|
+
"include": [
|
|
103
|
+
"node_modules/agora"
|
|
104
|
+
]
|
|
105
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
// --------------------------------------------------------
|
|
3
|
+
// Use with webpack loader
|
|
4
|
+
// "files":["./fpe-api/index.ts","./global.d.ts","./bridge/rtm/web/index.ts","./bridge/rtc/webNg/index.ts"],
|
|
5
|
+
// --------------------------------------------------------
|
|
6
|
+
// Use with typescript tsc command
|
|
7
|
+
"files":["./src/SDKAppWrapper.tsx","./index.wsdk.tsx","./global.d.ts"],
|
|
8
|
+
// --------------------------------------------------------
|
|
9
|
+
"compilerOptions": {
|
|
10
|
+
/* Basic Options */
|
|
11
|
+
"target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
|
|
12
|
+
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
|
13
|
+
"lib": [
|
|
14
|
+
"esNext",
|
|
15
|
+
"DOM"
|
|
16
|
+
] /* Specify library files to be included in the compilation. */,
|
|
17
|
+
"typeRoots": ["./global.d.ts"],
|
|
18
|
+
"allowJs": true /* Allow javascript files to be compiled. */,
|
|
19
|
+
// "checkJs": true, /* Report errors in .js files. */
|
|
20
|
+
"jsx": "react-native" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
|
|
21
|
+
"declaration": true /* Generates corresponding '.d.ts' file. */,
|
|
22
|
+
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
|
23
|
+
// "noResolve": true,
|
|
24
|
+
// "outDir": "dist" /* Redirect output structure to the directory. */,
|
|
25
|
+
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
|
26
|
+
// "removeComments": true, /* Do not emit comments to output. */
|
|
27
|
+
"noEmit": false /* Do not emit outputs. */,
|
|
28
|
+
"noEmitOnError": false,
|
|
29
|
+
// "incremental": true, /* Enable incremental compilation */ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
|
30
|
+
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
|
31
|
+
//"isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */,
|
|
32
|
+
|
|
33
|
+
/* Strict Type-Checking Options */
|
|
34
|
+
//"strict": true /* Enable all strict type-checking options. */,
|
|
35
|
+
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
|
36
|
+
// "strictNullChecks": true, /* Enable strict null checks. */
|
|
37
|
+
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
|
38
|
+
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
|
39
|
+
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
|
40
|
+
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
|
41
|
+
|
|
42
|
+
/* Additional Checks */
|
|
43
|
+
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
|
44
|
+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
45
|
+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
46
|
+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
47
|
+
|
|
48
|
+
/* Module Resolution Options */
|
|
49
|
+
// "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
|
|
50
|
+
"noResolve": true /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
|
|
51
|
+
"baseUrl": "./" /* Base directory to resolve non-absolute module names. */,
|
|
52
|
+
"resolveJsonModule": true,
|
|
53
|
+
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
54
|
+
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
55
|
+
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
56
|
+
// "types": ["./node_modules/agora-react-native-rtm/lib/typescript/src/RtmEngine"], /* Type declaration files to be included in compilation. */
|
|
57
|
+
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
|
|
58
|
+
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
|
59
|
+
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
60
|
+
|
|
61
|
+
/* Source Map Options */
|
|
62
|
+
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
63
|
+
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
64
|
+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
65
|
+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
66
|
+
|
|
67
|
+
/* Experimental Options */
|
|
68
|
+
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
69
|
+
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
70
|
+
//
|
|
71
|
+
//
|
|
72
|
+
// --------------------------------------------------------
|
|
73
|
+
// ---------------------CONFIG CHANGES---------------------
|
|
74
|
+
// --------------------------------------------------------
|
|
75
|
+
// Use with webpack loader
|
|
76
|
+
// "isolatedModules": true,
|
|
77
|
+
// "emitDeclarationOnly": false
|
|
78
|
+
// --------------------------------------------------------
|
|
79
|
+
// Use with typescript tsc command
|
|
80
|
+
"isolatedModules": false,
|
|
81
|
+
"emitDeclarationOnly": true,
|
|
82
|
+
"skipLibCheck": true,
|
|
83
|
+
"paths": {
|
|
84
|
+
"agora-react-native-rtm": ["./bridge/rtm/web/index.ts"],
|
|
85
|
+
"react-native-agora": ["./bridge/rtc/webNg/index.ts"],
|
|
86
|
+
"react-native": ["react-native-web"],
|
|
87
|
+
"fpe-api": ["./fpe-api/index.ts"],
|
|
88
|
+
"fpe-api/install": ["./fpe-api/install.ts"],
|
|
89
|
+
"fpe-implementation": ["./fpe-implementation/index.ts"],
|
|
90
|
+
"./RtcContext": ["agora-rn-uikit/src/index"]
|
|
91
|
+
}
|
|
92
|
+
// --------------------------------------------------------
|
|
93
|
+
},
|
|
94
|
+
// "references": [{"path": "./fpe-api", "prepend": true}],
|
|
95
|
+
"exclude": [
|
|
96
|
+
//"node_modules",
|
|
97
|
+
"babel.config.js",
|
|
98
|
+
"metro.config.js",
|
|
99
|
+
"jest.config.js"
|
|
100
|
+
],
|
|
101
|
+
"include": [
|
|
102
|
+
"node_modules/agora"
|
|
103
|
+
]
|
|
104
|
+
}
|
|
@@ -1,35 +1,44 @@
|
|
|
1
1
|
/*
|
|
2
2
|
********************************************
|
|
3
3
|
Copyright © 2021 Agora Lab, Inc., all rights reserved.
|
|
4
|
-
AppBuilder and all associated components, source code, APIs, services, and
|
|
5
|
-
(the “Materials”) are owned by Agora Lab, Inc. and its licensors.
|
|
6
|
-
accessed, used, modified, or distributed for any
|
|
7
|
-
|
|
8
|
-
any
|
|
9
|
-
|
|
4
|
+
AppBuilder and all associated components, source code, APIs, services, and
|
|
5
|
+
documentation (the “Materials”) are owned by Agora Lab, Inc. and its licensors.
|
|
6
|
+
The Materials may not be accessed, used, modified, or distributed for any
|
|
7
|
+
purpose without a license from Agora Lab, Inc. Use without a license or in
|
|
8
|
+
violation of any license terms and conditions (including use for any purpose
|
|
9
|
+
competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
|
|
10
|
+
information visit https://appbuilder.agora.io.
|
|
10
11
|
*********************************************
|
|
11
12
|
*/
|
|
12
13
|
/**
|
|
13
|
-
* Common Webpack configuration to be used across web and electron's renderer
|
|
14
|
+
* Common Webpack configuration to be used across web and electron's renderer
|
|
15
|
+
* process
|
|
14
16
|
*/
|
|
15
|
-
|
|
16
17
|
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
|
17
18
|
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
18
19
|
const path = require('path');
|
|
19
20
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
20
21
|
const configVars = require('./configTransform');
|
|
22
|
+
const getFpePath = require('./fpe.config');
|
|
21
23
|
|
|
22
24
|
const isElectron = ['linux', 'windows', 'mac'].includes(process.env.TARGET);
|
|
25
|
+
const isReactSdk = process.env.TARGET === 'rsdk';
|
|
26
|
+
const isWebSdk = process.env.TARGET === 'wsdk';
|
|
27
|
+
const isSdk = isReactSdk || isWebSdk;
|
|
23
28
|
|
|
24
29
|
module.exports = {
|
|
25
30
|
// Adds React Refresh webpack plugin for webpack dev server hmr
|
|
26
31
|
plugins: [
|
|
27
32
|
// Using html webpack plugin to utilize our index.html
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
!isSdk &&
|
|
34
|
+
new HtmlWebpackPlugin({
|
|
35
|
+
title: configVars['$config.APP_NAME'],
|
|
36
|
+
template: isElectron
|
|
37
|
+
? 'electron/index.html'
|
|
38
|
+
: 'web/index.html',
|
|
39
|
+
}),
|
|
32
40
|
isDevelopment &&
|
|
41
|
+
!isSdk &&
|
|
33
42
|
new ReactRefreshWebpackPlugin({
|
|
34
43
|
overlay: false,
|
|
35
44
|
}),
|
|
@@ -39,10 +48,21 @@ module.exports = {
|
|
|
39
48
|
// Using react-native web to translate UI
|
|
40
49
|
'react-native$': 'react-native-web',
|
|
41
50
|
// Using rtm bridge to translate React Native RTM SDK calls to web SDK calls
|
|
42
|
-
'agora-react-native-rtm': path.join(
|
|
51
|
+
'agora-react-native-rtm$': path.join(
|
|
52
|
+
__dirname,
|
|
53
|
+
'bridge/rtm/web/index.ts',
|
|
54
|
+
),
|
|
43
55
|
// Using rtc bridge to translate React Native RTC SDK calls to web SDK calls for web and linux
|
|
44
56
|
// Using rtc bridge to translate React Native RTC SDK calls to electron SDK calls for windows and mac
|
|
45
57
|
'react-native-agora$': path.join(__dirname, 'bridge/rtc/webNg/index.ts'),
|
|
58
|
+
'fpe-api/install': path.join(__dirname, 'fpe-api/install.ts'),
|
|
59
|
+
'fpe-api': path.join(__dirname, 'fpe-api/index.ts'),
|
|
60
|
+
'fpe-implementation': path.join(__dirname, 'fpe-implementation/index.ts'),
|
|
61
|
+
'test-fpe': path.join(__dirname, getFpePath()),
|
|
62
|
+
'agora-react-native-rtm/lib/typescript/src': path.join(
|
|
63
|
+
__dirname,
|
|
64
|
+
'bridge/rtm/web/index.ts',
|
|
65
|
+
),
|
|
46
66
|
},
|
|
47
67
|
// Adds platform specific extensions and OS specific extensions
|
|
48
68
|
// .web.tsx works for web specific code
|
|
@@ -53,6 +73,10 @@ module.exports = {
|
|
|
53
73
|
`.${process.env.TARGET}.ts`,
|
|
54
74
|
isElectron && '.electron.tsx',
|
|
55
75
|
isElectron && '.electron.ts',
|
|
76
|
+
isSdk && '.sdk.ts',
|
|
77
|
+
isSdk && '.sdk.tsx',
|
|
78
|
+
isSdk && '.web.ts',
|
|
79
|
+
isSdk && '.web.tsx',
|
|
56
80
|
'.tsx',
|
|
57
81
|
'.ts',
|
|
58
82
|
'.jsx',
|
|
@@ -61,7 +85,7 @@ module.exports = {
|
|
|
61
85
|
].filter(Boolean),
|
|
62
86
|
},
|
|
63
87
|
// Enable source maps during development
|
|
64
|
-
devtool: isDevelopment ? 'cheap-module-
|
|
88
|
+
// devtool: isDevelopment ? 'eval-cheap-module-source-map' : undefined,
|
|
65
89
|
module: {
|
|
66
90
|
rules: [
|
|
67
91
|
{
|
|
@@ -89,14 +113,14 @@ module.exports = {
|
|
|
89
113
|
node: 'current',
|
|
90
114
|
},
|
|
91
115
|
},
|
|
92
|
-
]
|
|
116
|
+
],
|
|
93
117
|
],
|
|
94
118
|
plugins: [
|
|
95
119
|
// Adds support for class properties
|
|
96
120
|
['transform-define', configVars],
|
|
97
121
|
'@babel/plugin-proposal-optional-chaining',
|
|
98
122
|
'@babel/plugin-proposal-class-properties',
|
|
99
|
-
isDevelopment && require.resolve('react-refresh/babel'),
|
|
123
|
+
isDevelopment && !isSdk && require.resolve('react-refresh/babel'),
|
|
100
124
|
].filter(Boolean),
|
|
101
125
|
},
|
|
102
126
|
},
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
15
15
|
const path = require('path');
|
|
16
16
|
const webpack = require('webpack');
|
|
17
|
+
|
|
17
18
|
module.exports = {
|
|
18
19
|
// Main entry point for the web application
|
|
19
20
|
mode: isDevelopment ? 'development' : 'production',
|
|
@@ -26,7 +27,7 @@ module.exports = {
|
|
|
26
27
|
target: 'electron-main',
|
|
27
28
|
output: {
|
|
28
29
|
filename: 'index.js',
|
|
29
|
-
path: path.resolve(__dirname, '
|
|
30
|
+
path: path.resolve(__dirname, '../Builds/.electron'),
|
|
30
31
|
},
|
|
31
32
|
plugins: [
|
|
32
33
|
new webpack.DefinePlugin({
|
|
@@ -32,7 +32,7 @@ module.exports = merge(commons, {
|
|
|
32
32
|
// },
|
|
33
33
|
output: {
|
|
34
34
|
filename: '[name].bundle.js',
|
|
35
|
-
path: path.resolve(__dirname,
|
|
35
|
+
path: path.resolve(__dirname, `../Builds/.electron`),
|
|
36
36
|
},
|
|
37
37
|
plugins: [
|
|
38
38
|
isDevelopment && new webpack.HotModuleReplacementPlugin(), // to enable HMR for webpack-dev-server
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const commons = require('./webpack.commons');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const {merge} = require('webpack-merge');
|
|
4
|
+
|
|
5
|
+
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
6
|
+
|
|
7
|
+
module.exports = merge(commons, {
|
|
8
|
+
// Enable optimizations in production
|
|
9
|
+
mode: isDevelopment ? 'development' : 'production',
|
|
10
|
+
// externals: [
|
|
11
|
+
// nodeExternals({allowlist: [/agora.*/, /fpe.*/]}),
|
|
12
|
+
// ],
|
|
13
|
+
externals: {
|
|
14
|
+
react: 'react',
|
|
15
|
+
'react-dom': 'react-dom',
|
|
16
|
+
'react-router': 'react-router',
|
|
17
|
+
'react-router-dom': 'react-router-dom',
|
|
18
|
+
'@apollo/client': '@apollo/client',
|
|
19
|
+
},
|
|
20
|
+
// Main entry point for the web application
|
|
21
|
+
entry: {
|
|
22
|
+
main: './index.rsdk.tsx',
|
|
23
|
+
},
|
|
24
|
+
target: 'node',
|
|
25
|
+
output: {
|
|
26
|
+
path: path.resolve(__dirname, `../Builds/react-sdk`),
|
|
27
|
+
filename: 'index.js',
|
|
28
|
+
library:{
|
|
29
|
+
type: 'commonjs2',
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
// watch: isDevelopment
|
|
33
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*
|
|
2
|
+
********************************************
|
|
3
|
+
Copyright © 2021 Agora Lab, Inc., all rights reserved.
|
|
4
|
+
AppBuilder and all associated components, source code, APIs, services, and documentation
|
|
5
|
+
(the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
|
|
6
|
+
accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
|
|
7
|
+
Use without a license or in violation of any license terms and conditions (including use for
|
|
8
|
+
any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
|
|
9
|
+
information visit https://appbuilder.agora.io.
|
|
10
|
+
*********************************************
|
|
11
|
+
*/
|
|
12
|
+
const commons = require('./webpack.commons');
|
|
13
|
+
const {merge} = require('webpack-merge');
|
|
14
|
+
const path = require('path');
|
|
15
|
+
const configVars = require('./configTransform');
|
|
16
|
+
|
|
17
|
+
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
18
|
+
|
|
19
|
+
module.exports = merge(commons, {
|
|
20
|
+
// Enable optimizations in production
|
|
21
|
+
mode: isDevelopment ? 'development' : 'production',
|
|
22
|
+
// Main entry point for the web application
|
|
23
|
+
module:{
|
|
24
|
+
rules:[
|
|
25
|
+
{
|
|
26
|
+
test: /\.tsx?$/,
|
|
27
|
+
loader: 'ts-loader',
|
|
28
|
+
// loader: 'ts-loader',
|
|
29
|
+
exclude: /node_modules|\.d\.ts$/,
|
|
30
|
+
options: {
|
|
31
|
+
configFile: 'tsconfig.json',
|
|
32
|
+
ignoreDiagnostics: [2339,2554,2539,1005]
|
|
33
|
+
// ignoreDiagnostics: [2554,2539,2339,2551,2769,2305,2614,2322,2362,2369,2698]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
// Use babel to transpile all js, ts, jsx and tsx files
|
|
38
|
+
test: /\.[jt]sx?$/,
|
|
39
|
+
exclude: /node_modules/, // don't transpile the files under node_modules
|
|
40
|
+
use: {
|
|
41
|
+
loader: 'babel-loader',
|
|
42
|
+
options: {
|
|
43
|
+
cacheDirectory: true, // enables caching in babel
|
|
44
|
+
configFile: false,
|
|
45
|
+
presets: [
|
|
46
|
+
'@babel/preset-react', // transforms tsx into normal ts
|
|
47
|
+
[
|
|
48
|
+
'@babel/preset-typescript', // transforms ts into js
|
|
49
|
+
{
|
|
50
|
+
allExtensions: true,
|
|
51
|
+
isTSX: true,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
[
|
|
55
|
+
'@babel/preset-env', // smartly transforms js into es5-es6
|
|
56
|
+
{
|
|
57
|
+
targets: {
|
|
58
|
+
node: 'current',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
],
|
|
63
|
+
plugins: [
|
|
64
|
+
// Adds support for class properties
|
|
65
|
+
['transform-define', configVars],
|
|
66
|
+
'@babel/plugin-proposal-optional-chaining',
|
|
67
|
+
'@babel/plugin-proposal-class-properties',
|
|
68
|
+
isDevelopment && !isSdk && require.resolve('react-refresh/babel'),
|
|
69
|
+
].filter(Boolean),
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
test: /\.(png|jpe?g|gif)$/i,
|
|
75
|
+
use: [
|
|
76
|
+
{
|
|
77
|
+
loader: 'file-loader',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
entry: {
|
|
84
|
+
main: './fpe-api/index.ts',
|
|
85
|
+
},
|
|
86
|
+
output: {
|
|
87
|
+
path: path.resolve(__dirname, `../Builds/ts`),
|
|
88
|
+
},
|
|
89
|
+
});
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
const commons = require('./webpack.commons');
|
|
13
13
|
const {merge} = require('webpack-merge');
|
|
14
|
+
const path = require('path');
|
|
14
15
|
|
|
15
16
|
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
16
17
|
|
|
@@ -21,10 +22,16 @@ module.exports = merge(commons, {
|
|
|
21
22
|
entry: {
|
|
22
23
|
main: './index.web.js',
|
|
23
24
|
},
|
|
25
|
+
output: {
|
|
26
|
+
path: path.resolve(__dirname, `../Builds/web`),
|
|
27
|
+
},
|
|
24
28
|
// Webpack dev server config
|
|
25
29
|
devServer: {
|
|
26
30
|
port: 9000,
|
|
27
31
|
historyApiFallback: true, // Support for react-router
|
|
28
|
-
|
|
32
|
+
static: './', // same as contentBase from webpack v4 config
|
|
33
|
+
client:{
|
|
34
|
+
overlay: false
|
|
35
|
+
}
|
|
29
36
|
},
|
|
30
37
|
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const commons = require('./webpack.commons');
|
|
2
|
+
const {merge} = require('webpack-merge');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
6
|
+
|
|
7
|
+
const libraryTargets = ['commonjs2', 'var','umd2'];
|
|
8
|
+
|
|
9
|
+
const baseConfig = {
|
|
10
|
+
// Enable optimizations in production
|
|
11
|
+
mode: isDevelopment ? 'development' : 'production',
|
|
12
|
+
// Main entry point for the web application
|
|
13
|
+
entry: {
|
|
14
|
+
main: './index.wsdk.tsx',
|
|
15
|
+
},
|
|
16
|
+
output: {
|
|
17
|
+
path: path.resolve(__dirname, `../Builds/web-sdk`),
|
|
18
|
+
filename: 'app-builder-web-sdk.js',
|
|
19
|
+
library: {
|
|
20
|
+
name: 'AgoraAppBuilder',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
watch: isDevelopment
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const mappedConfigs = libraryTargets.map((target, _) => {
|
|
27
|
+
let newConfig = baseConfig;
|
|
28
|
+
newConfig.output.library.type = target;
|
|
29
|
+
newConfig.output.filename = `app-builder-web-sdk.${target}.js`;
|
|
30
|
+
newConfig = merge(commons, newConfig);
|
|
31
|
+
return newConfig;
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
module.exports = mappedConfigs;
|