Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.

Comments

Alpha#227

Merged
d-gubert merged 74 commits intobetafrom
alpha
Mar 13, 2020
Merged

Alpha#227
d-gubert merged 74 commits intobetafrom
alpha

Conversation

@d-gubert
Copy link
Member

Current changes:

  • External Components

shiqimei and others added 30 commits August 6, 2019 14:50
* Add interfaces IExternalComponent and IExternalComponentExtend

* Add externalComponents property for IConfigurationExtend

* export IExternalComponent

* Add interface IExternalComponentLocationOptions

* implement the interface IExternalComponentsExtend

* export ExternalComponentsExtend

* Add externalComponentManager for AppManager

* implement AppExternalComponentManager

* Implement IExternalComponentBridge

* Add getExternalComponentBridge method for AppBridges

* export AppExternalComponentManager

* Update getConfigurationExtend method for AppAccessorManager

* [TEST] Update appBridge and add externalComponentBridge

* Update related test scripts

* Remove IExternalComponentBridge interface

* AppExternalComponentManager maintains the list of all registered components itself

* Update test scripts

* Add webhooks interface for the external component

* Update the interface IExternalComponent

* Add description field to the interface IExternalComponent
* update IWebHooks interface

* Add util randomString

* add AppEmbeddedSDK

* move constants to src/client/constants directory

* separate initListener from call method
* rename initListener to init
* chore: change comment style to obtain VS Code Intellisense

* feat: add unregisterComponent method

We made follwing changes for the AppExternalComponentManager:
* add new private property - appTouchedComponents
* add new public method unregisterComponent
* add new public method getExternalComponent

* Add unregisterComponent in the lifecycle methods

We need to call unregisterComponent method to remove the corresponding external  components from the providedComponents when following AppManager's methods are called:
*  `unload` is called
* `disable` is called <-> Disable an app
*  `remove` is called <-> Uninstall an app
*  `updateAppsMarketplaceInfo` is called and validateLicense not pass
* `initializeApp` is called and validateLicense not pass
* `enableApp` is called but is not success

* Add new AppExternalComponentManager method purgeComponent

when remove an app from the system, we need delete its external component from both providedComponents map set and appTouchedCompoents map set.

* fix: new deployed app registers externalComponents automatically

since the new deployed app will try to register their externalComponent when the  `initializeApp` method of AppManager is called. This is not expected behavior. We introduce a new parameter `addToProvidedComponents` for the method `registerComponent` to handle the above problem. Without specifying `registerComponent` to true, the app only "declares" it touched the external component when it is initialized. Only if the `enableApp` method is called, the external component will truly added to providedComponents map set, which means we can access it in the `Game Center`.
@codecov
Copy link

codecov bot commented Feb 17, 2020

Codecov Report

Merging #227 into beta will increase coverage by 0.25%.
The diff coverage is 62.82%.

Impacted file tree graph

@@            Coverage Diff             @@
##             beta     #227      +/-   ##
==========================================
+ Coverage   53.81%   54.06%   +0.25%     
==========================================
  Files          70       72       +2     
  Lines        2568     2643      +75     
  Branches      380      391      +11     
==========================================
+ Hits         1382     1429      +47     
- Misses       1186     1214      +28
Impacted Files Coverage Δ
src/server/managers/AppSlashCommandManager.ts 99.38% <ø> (ø) ⬆️
src/server/managers/AppListenerManager.ts 4.29% <0%> (-0.28%) ⬇️
src/server/managers/AppAccessorManager.ts 100% <100%> (ø) ⬆️
src/server/accessors/ConfigurationExtend.ts 100% <100%> (ø) ⬆️
src/server/compiler/AppImplements.ts 100% <100%> (ø) ⬆️
src/server/AppManager.ts 14.67% <30%> (+0.39%) ⬆️
src/server/accessors/ExternalComponentsExtend.ts 50% <50%> (ø)
src/server/managers/AppExternalComponentManager.ts 97.43% <97.43%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0aec51d...2a499b7. Read the comment docs.

@d-gubert d-gubert closed this Feb 24, 2020
@d-gubert d-gubert reopened this Mar 13, 2020
@CLAassistant
Copy link

CLAassistant commented Mar 13, 2020

CLA assistant check
All committers have signed the CLA.

@d-gubert d-gubert marked this pull request as ready for review March 13, 2020 17:47
@d-gubert d-gubert merged commit f2df83a into beta Mar 13, 2020
@d-gubert d-gubert deleted the alpha branch April 21, 2020 18:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants