-
Notifications
You must be signed in to change notification settings - Fork 945
Fis modularization #3638
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
Fis modularization #3638
Conversation
💥 No ChangesetLatest commit: 19bab1c Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂 If these changes should be published to npm, you need to add a changeset. This PR includes no changesetsWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Click here to learn what changesets are, and how to add one. Click here if you're a maintainer who wants to add a changeset to this PR |
Binary Size ReportAffected SDKsNo changes between base commit (57739ae) and head commit (1bd1c08). Test Logs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The integration with app-exp looks pretty good. I didn't look into the implementation which, I assume, didn't change?
Can you please integrate with api-extractor, which generates api reports and documentation. You can look at functions-exp
. You want to copy this file, and add these scripts in the package.json
. Let me know if you need any help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems you haven't integrated with api-extractor. Let me know if you need help
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since installations is a dependency for other SDKs, we need to register another component for internal consumption. It should return an object with getId()
and getToken()
.
So in the function/config.ts
, you should register another component:
// define an internal API
interface InstallationsInternal {
getId: () => Promise<string>
getToken: (force?: boolean) => Promise<string>
}
// register an internal component
_registerComponent(new Component(
'installations-internal-exp',
container => {
const installations = container.getProvider('installation-exp').getImmediate();
const installationsInternalService: InstallationsInternal = {
// bind to the correct installations instance
getId: getId.bind(null, installations),
getToken: getToken.bind(null, installations)
};
return installationsService;
},
ComponentType.INTERNAL
)
);)
In FCM/Perf/RC, they will get the instance of the internal installations by:
const installations = _getProvider('installations-internal-exp').getImmediate();
installations.getId();
installations.getToken();
Does it make sense? Let me know if you want to chat offline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there was some confusion on public component vs internal component. I added some comments to hopefully clear things up.
packages-exp/installations-exp/src/interfaces/installation-internal.ts
Outdated
Show resolved
Hide resolved
…3733) * integrate api-extractor into installations-exp * add release tag to APIs * add _ prefix to the internal interface * update api report
Size Analysis ReportAffected Products
|
Type | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
size | ? | 8.90 kB | ? (?) |
size_with_ext_deps | ? | 17.3 kB | ? (?) |
Dependencies
Type | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
functions | ? | Click to show 52 depsbroadcastFidChange bufferToBase64UrlSafe callFidChangeCallbacks clearTimedOutRequest closeBroadcastChannel completeInstallationRegistration createInstallationRequest deleteInstallationRequest deleteInstallations encode extractAppConfig extractAuthTokenInfoFromResponse fetchAuthTokenFromServer fidChanged generateAuthTokenRequest generateFid getAuthorizationHeader getBroadcastChannel getDbPromise getDeleteEndpoint getErrorFromResponse getExpiresInFromResponseExpiresIn getGenerateAuthTokenEndpoint getHeaders getHeadersWithAuth getId getInstallationEntry getInstallationsEndpoint getKey getMissingValueError getToken hasAuthTokenRequestTimedOut hasInstallationRequestTimedOut isAuthTokenExpired isAuthTokenValid isEntryRegistered isServerError makeAuthTokenRequestInProgressEntry refreshAuthToken registerInstallation registerInstallations remove retryIfServerError set sleep triggerRegistrationIfNecessary update updateAuthTokenRequest updateInstallationRequest updateOrCreateInstallationEntry waitUntilAuthTokenRequest waitUntilFidRegistration |
? |
variables | ? | Click to show 23 depsDATABASE_NAME DATABASE_VERSION ERROR_DESCRIPTION_MAP ERROR_FACTORY INSTALLATIONS_API_URL INSTALLATIONS_NAME INSTALLATIONS_NAME_INTERNAL INTERNAL_AUTH_VERSION INVALID_FID OBJECT_STORE_NAME PACKAGE_VERSION PENDING_TIMEOUT_MS SERVICE SERVICE_NAME TOKEN_EXPIRATION_BUFFER VALID_FID_PATTERN broadcastChannel dbPromise fidChangeCallbacks internalFactory name publicFactory version |
? |
External Dependencies
Module | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
@firebase/util |
? | ErrorFactory FirebaseError |
? |
idb |
? | openDb |
? |
@firebase/app-exp |
? | _getProvider _registerComponent registerVersion |
? |
@firebase/component |
? | Component |
? |
getId
Size
Type | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
size | ? | 8.34 kB | ? (?) |
size_with_ext_deps | ? | 16.8 kB | ? (?) |
Dependencies
Type | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
functions | ? | Click to show 49 depsbroadcastFidChange bufferToBase64UrlSafe callFidChangeCallbacks clearTimedOutRequest closeBroadcastChannel completeInstallationRegistration createInstallationRequest encode extractAppConfig extractAuthTokenInfoFromResponse fetchAuthTokenFromServer fidChanged generateAuthTokenRequest generateFid getAuthorizationHeader getBroadcastChannel getDbPromise getErrorFromResponse getExpiresInFromResponseExpiresIn getGenerateAuthTokenEndpoint getHeaders getHeadersWithAuth getId getInstallationEntry getInstallationsEndpoint getKey getMissingValueError getToken hasAuthTokenRequestTimedOut hasInstallationRequestTimedOut isAuthTokenExpired isAuthTokenValid isEntryRegistered isServerError makeAuthTokenRequestInProgressEntry refreshAuthToken registerInstallation registerInstallations remove retryIfServerError set sleep triggerRegistrationIfNecessary update updateAuthTokenRequest updateInstallationRequest updateOrCreateInstallationEntry waitUntilAuthTokenRequest waitUntilFidRegistration |
? |
variables | ? | Click to show 23 depsDATABASE_NAME DATABASE_VERSION ERROR_DESCRIPTION_MAP ERROR_FACTORY INSTALLATIONS_API_URL INSTALLATIONS_NAME INSTALLATIONS_NAME_INTERNAL INTERNAL_AUTH_VERSION INVALID_FID OBJECT_STORE_NAME PACKAGE_VERSION PENDING_TIMEOUT_MS SERVICE SERVICE_NAME TOKEN_EXPIRATION_BUFFER VALID_FID_PATTERN broadcastChannel dbPromise fidChangeCallbacks internalFactory name publicFactory version |
? |
External Dependencies
Module | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
@firebase/util |
? | ErrorFactory FirebaseError |
? |
idb |
? | openDb |
? |
@firebase/app-exp |
? | _getProvider _registerComponent registerVersion |
? |
@firebase/component |
? | Component |
? |
getInstallations
Size
Type | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
size | ? | 8.43 kB | ? (?) |
size_with_ext_deps | ? | 16.9 kB | ? (?) |
Dependencies
Type | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
functions | ? | Click to show 50 depsbroadcastFidChange bufferToBase64UrlSafe callFidChangeCallbacks clearTimedOutRequest closeBroadcastChannel completeInstallationRegistration createInstallationRequest encode extractAppConfig extractAuthTokenInfoFromResponse fetchAuthTokenFromServer fidChanged generateAuthTokenRequest generateFid getAuthorizationHeader getBroadcastChannel getDbPromise getErrorFromResponse getExpiresInFromResponseExpiresIn getGenerateAuthTokenEndpoint getHeaders getHeadersWithAuth getId getInstallationEntry getInstallations getInstallationsEndpoint getKey getMissingValueError getToken hasAuthTokenRequestTimedOut hasInstallationRequestTimedOut isAuthTokenExpired isAuthTokenValid isEntryRegistered isServerError makeAuthTokenRequestInProgressEntry refreshAuthToken registerInstallation registerInstallations remove retryIfServerError set sleep triggerRegistrationIfNecessary update updateAuthTokenRequest updateInstallationRequest updateOrCreateInstallationEntry waitUntilAuthTokenRequest waitUntilFidRegistration |
? |
variables | ? | Click to show 23 depsDATABASE_NAME DATABASE_VERSION ERROR_DESCRIPTION_MAP ERROR_FACTORY INSTALLATIONS_API_URL INSTALLATIONS_NAME INSTALLATIONS_NAME_INTERNAL INTERNAL_AUTH_VERSION INVALID_FID OBJECT_STORE_NAME PACKAGE_VERSION PENDING_TIMEOUT_MS SERVICE SERVICE_NAME TOKEN_EXPIRATION_BUFFER VALID_FID_PATTERN broadcastChannel dbPromise fidChangeCallbacks internalFactory name publicFactory version |
? |
External Dependencies
Module | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
@firebase/util |
? | ErrorFactory FirebaseError |
? |
idb |
? | openDb |
? |
@firebase/app-exp |
? | _getProvider _registerComponent registerVersion |
? |
@firebase/component |
? | Component |
? |
getToken
Size
Type | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
size | ? | 8.35 kB | ? (?) |
size_with_ext_deps | ? | 16.8 kB | ? (?) |
Dependencies
Type | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
functions | ? | Click to show 49 depsbroadcastFidChange bufferToBase64UrlSafe callFidChangeCallbacks clearTimedOutRequest closeBroadcastChannel completeInstallationRegistration createInstallationRequest encode extractAppConfig extractAuthTokenInfoFromResponse fetchAuthTokenFromServer fidChanged generateAuthTokenRequest generateFid getAuthorizationHeader getBroadcastChannel getDbPromise getErrorFromResponse getExpiresInFromResponseExpiresIn getGenerateAuthTokenEndpoint getHeaders getHeadersWithAuth getId getInstallationEntry getInstallationsEndpoint getKey getMissingValueError getToken hasAuthTokenRequestTimedOut hasInstallationRequestTimedOut isAuthTokenExpired isAuthTokenValid isEntryRegistered isServerError makeAuthTokenRequestInProgressEntry refreshAuthToken registerInstallation registerInstallations remove retryIfServerError set sleep triggerRegistrationIfNecessary update updateAuthTokenRequest updateInstallationRequest updateOrCreateInstallationEntry waitUntilAuthTokenRequest waitUntilFidRegistration |
? |
variables | ? | Click to show 23 depsDATABASE_NAME DATABASE_VERSION ERROR_DESCRIPTION_MAP ERROR_FACTORY INSTALLATIONS_API_URL INSTALLATIONS_NAME INSTALLATIONS_NAME_INTERNAL INTERNAL_AUTH_VERSION INVALID_FID OBJECT_STORE_NAME PACKAGE_VERSION PENDING_TIMEOUT_MS SERVICE SERVICE_NAME TOKEN_EXPIRATION_BUFFER VALID_FID_PATTERN broadcastChannel dbPromise fidChangeCallbacks internalFactory name publicFactory version |
? |
External Dependencies
Module | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
@firebase/util |
? | ErrorFactory FirebaseError |
? |
idb |
? | openDb |
? |
@firebase/app-exp |
? | _getProvider _registerComponent registerVersion |
? |
@firebase/component |
? | Component |
? |
onIdChange
Size
Type | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
size | ? | 8.60 kB | ? (?) |
size_with_ext_deps | ? | 17.0 kB | ? (?) |
Dependencies
Type | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
functions | ? | Click to show 52 depsaddCallback broadcastFidChange bufferToBase64UrlSafe callFidChangeCallbacks clearTimedOutRequest closeBroadcastChannel completeInstallationRegistration createInstallationRequest encode extractAppConfig extractAuthTokenInfoFromResponse fetchAuthTokenFromServer fidChanged generateAuthTokenRequest generateFid getAuthorizationHeader getBroadcastChannel getDbPromise getErrorFromResponse getExpiresInFromResponseExpiresIn getGenerateAuthTokenEndpoint getHeaders getHeadersWithAuth getId getInstallationEntry getInstallationsEndpoint getKey getMissingValueError getToken hasAuthTokenRequestTimedOut hasInstallationRequestTimedOut isAuthTokenExpired isAuthTokenValid isEntryRegistered isServerError makeAuthTokenRequestInProgressEntry onIdChange refreshAuthToken registerInstallation registerInstallations remove removeCallback retryIfServerError set sleep triggerRegistrationIfNecessary update updateAuthTokenRequest updateInstallationRequest updateOrCreateInstallationEntry waitUntilAuthTokenRequest waitUntilFidRegistration |
? |
variables | ? | Click to show 23 depsDATABASE_NAME DATABASE_VERSION ERROR_DESCRIPTION_MAP ERROR_FACTORY INSTALLATIONS_API_URL INSTALLATIONS_NAME INSTALLATIONS_NAME_INTERNAL INTERNAL_AUTH_VERSION INVALID_FID OBJECT_STORE_NAME PACKAGE_VERSION PENDING_TIMEOUT_MS SERVICE SERVICE_NAME TOKEN_EXPIRATION_BUFFER VALID_FID_PATTERN broadcastChannel dbPromise fidChangeCallbacks internalFactory name publicFactory version |
? |
External Dependencies
Module | Base (1df547b) | Head (2601106) | Diff |
---|---|---|---|
@firebase/util |
? | ErrorFactory FirebaseError |
? |
idb |
? | openDb |
? |
@firebase/app-exp |
? | _getProvider _registerComponent registerVersion |
? |
@firebase/component |
? | Component |
? |
Test Logs
- Base (
1df547b2
): https://github.com/firebase/firebase-js-sdk/actions/runs/234793364 - Head (
26011067
): https://github.com/firebase/firebase-js-sdk/actions/runs/236904617
No description provided.