12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154 |
- import { _getProvider, getApp, _registerComponent, registerVersion } from '@firebase/app';
- import { Component } from '@firebase/component';
- import { ErrorFactory, FirebaseError } from '@firebase/util';
- import { openDB } from 'idb';
-
- const name = "@firebase/installations";
- const version = "0.6.1";
-
-
- const PENDING_TIMEOUT_MS = 10000;
- const PACKAGE_VERSION = `w:${version}`;
- const INTERNAL_AUTH_VERSION = 'FIS_v2';
- const INSTALLATIONS_API_URL = 'https://firebaseinstallations.googleapis.com/v1';
- const TOKEN_EXPIRATION_BUFFER = 60 * 60 * 1000;
- const SERVICE = 'installations';
- const SERVICE_NAME = 'Installations';
-
-
- const ERROR_DESCRIPTION_MAP = {
- ["missing-app-config-values" ]: 'Missing App configuration value: "{$valueName}"',
- ["not-registered" ]: 'Firebase Installation is not registered.',
- ["installation-not-found" ]: 'Firebase Installation not found.',
- ["request-failed" ]: '{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',
- ["app-offline" ]: 'Could not process request. Application offline.',
- ["delete-pending-registration" ]: "Can't delete installation while there is a pending registration request."
- };
- const ERROR_FACTORY = new ErrorFactory(SERVICE, SERVICE_NAME, ERROR_DESCRIPTION_MAP);
-
- function isServerError(error) {
- return (error instanceof FirebaseError &&
- error.code.includes("request-failed" ));
- }
-
-
- function getInstallationsEndpoint({ projectId }) {
- return `${INSTALLATIONS_API_URL}/projects/${projectId}/installations`;
- }
- function extractAuthTokenInfoFromResponse(response) {
- return {
- token: response.token,
- requestStatus: 2 ,
- expiresIn: getExpiresInFromResponseExpiresIn(response.expiresIn),
- creationTime: Date.now()
- };
- }
- async function getErrorFromResponse(requestName, response) {
- const responseJson = await response.json();
- const errorData = responseJson.error;
- return ERROR_FACTORY.create("request-failed" , {
- requestName,
- serverCode: errorData.code,
- serverMessage: errorData.message,
- serverStatus: errorData.status
- });
- }
- function getHeaders({ apiKey }) {
- return new Headers({
- 'Content-Type': 'application/json',
- Accept: 'application/json',
- 'x-goog-api-key': apiKey
- });
- }
- function getHeadersWithAuth(appConfig, { refreshToken }) {
- const headers = getHeaders(appConfig);
- headers.append('Authorization', getAuthorizationHeader(refreshToken));
- return headers;
- }
-
- async function retryIfServerError(fn) {
- const result = await fn();
- if (result.status >= 500 && result.status < 600) {
-
- return fn();
- }
- return result;
- }
- function getExpiresInFromResponseExpiresIn(responseExpiresIn) {
-
- return Number(responseExpiresIn.replace('s', '000'));
- }
- function getAuthorizationHeader(refreshToken) {
- return `${INTERNAL_AUTH_VERSION} ${refreshToken}`;
- }
-
-
- async function createInstallationRequest({ appConfig, heartbeatServiceProvider }, { fid }) {
- const endpoint = getInstallationsEndpoint(appConfig);
- const headers = getHeaders(appConfig);
-
- const heartbeatService = heartbeatServiceProvider.getImmediate({
- optional: true
- });
- if (heartbeatService) {
- const heartbeatsHeader = await heartbeatService.getHeartbeatsHeader();
- if (heartbeatsHeader) {
- headers.append('x-firebase-client', heartbeatsHeader);
- }
- }
- const body = {
- fid,
- authVersion: INTERNAL_AUTH_VERSION,
- appId: appConfig.appId,
- sdkVersion: PACKAGE_VERSION
- };
- const request = {
- method: 'POST',
- headers,
- body: JSON.stringify(body)
- };
- const response = await retryIfServerError(() => fetch(endpoint, request));
- if (response.ok) {
- const responseValue = await response.json();
- const registeredInstallationEntry = {
- fid: responseValue.fid || fid,
- registrationStatus: 2 ,
- refreshToken: responseValue.refreshToken,
- authToken: extractAuthTokenInfoFromResponse(responseValue.authToken)
- };
- return registeredInstallationEntry;
- }
- else {
- throw await getErrorFromResponse('Create Installation', response);
- }
- }
-
-
-
- function sleep(ms) {
- return new Promise(resolve => {
- setTimeout(resolve, ms);
- });
- }
-
-
- function bufferToBase64UrlSafe(array) {
- const b64 = btoa(String.fromCharCode(...array));
- return b64.replace(/\+/g, '-').replace(/\//g, '_');
- }
-
-
- const VALID_FID_PATTERN = /^[cdef][\w-]{21}$/;
- const INVALID_FID = '';
-
- function generateFid() {
- try {
-
-
- const fidByteArray = new Uint8Array(17);
- const crypto = self.crypto || self.msCrypto;
- crypto.getRandomValues(fidByteArray);
-
- fidByteArray[0] = 0b01110000 + (fidByteArray[0] % 0b00010000);
- const fid = encode(fidByteArray);
- return VALID_FID_PATTERN.test(fid) ? fid : INVALID_FID;
- }
- catch (_a) {
-
- return INVALID_FID;
- }
- }
-
- function encode(fidByteArray) {
- const b64String = bufferToBase64UrlSafe(fidByteArray);
-
-
- return b64String.substr(0, 22);
- }
-
-
-
- function getKey(appConfig) {
- return `${appConfig.appName}!${appConfig.appId}`;
- }
-
-
- const fidChangeCallbacks = new Map();
-
- function fidChanged(appConfig, fid) {
- const key = getKey(appConfig);
- callFidChangeCallbacks(key, fid);
- broadcastFidChange(key, fid);
- }
- function addCallback(appConfig, callback) {
-
-
- getBroadcastChannel();
- const key = getKey(appConfig);
- let callbackSet = fidChangeCallbacks.get(key);
- if (!callbackSet) {
- callbackSet = new Set();
- fidChangeCallbacks.set(key, callbackSet);
- }
- callbackSet.add(callback);
- }
- function removeCallback(appConfig, callback) {
- const key = getKey(appConfig);
- const callbackSet = fidChangeCallbacks.get(key);
- if (!callbackSet) {
- return;
- }
- callbackSet.delete(callback);
- if (callbackSet.size === 0) {
- fidChangeCallbacks.delete(key);
- }
-
- closeBroadcastChannel();
- }
- function callFidChangeCallbacks(key, fid) {
- const callbacks = fidChangeCallbacks.get(key);
- if (!callbacks) {
- return;
- }
- for (const callback of callbacks) {
- callback(fid);
- }
- }
- function broadcastFidChange(key, fid) {
- const channel = getBroadcastChannel();
- if (channel) {
- channel.postMessage({ key, fid });
- }
- closeBroadcastChannel();
- }
- let broadcastChannel = null;
-
- function getBroadcastChannel() {
- if (!broadcastChannel && 'BroadcastChannel' in self) {
- broadcastChannel = new BroadcastChannel('[Firebase] FID Change');
- broadcastChannel.onmessage = e => {
- callFidChangeCallbacks(e.data.key, e.data.fid);
- };
- }
- return broadcastChannel;
- }
- function closeBroadcastChannel() {
- if (fidChangeCallbacks.size === 0 && broadcastChannel) {
- broadcastChannel.close();
- broadcastChannel = null;
- }
- }
-
-
- const DATABASE_NAME = 'firebase-installations-database';
- const DATABASE_VERSION = 1;
- const OBJECT_STORE_NAME = 'firebase-installations-store';
- let dbPromise = null;
- function getDbPromise() {
- if (!dbPromise) {
- dbPromise = openDB(DATABASE_NAME, DATABASE_VERSION, {
- upgrade: (db, oldVersion) => {
-
-
-
-
-
- switch (oldVersion) {
- case 0:
- db.createObjectStore(OBJECT_STORE_NAME);
- }
- }
- });
- }
- return dbPromise;
- }
-
- async function set(appConfig, value) {
- const key = getKey(appConfig);
- const db = await getDbPromise();
- const tx = db.transaction(OBJECT_STORE_NAME, 'readwrite');
- const objectStore = tx.objectStore(OBJECT_STORE_NAME);
- const oldValue = (await objectStore.get(key));
- await objectStore.put(value, key);
- await tx.done;
- if (!oldValue || oldValue.fid !== value.fid) {
- fidChanged(appConfig, value.fid);
- }
- return value;
- }
-
- async function remove(appConfig) {
- const key = getKey(appConfig);
- const db = await getDbPromise();
- const tx = db.transaction(OBJECT_STORE_NAME, 'readwrite');
- await tx.objectStore(OBJECT_STORE_NAME).delete(key);
- await tx.done;
- }
-
- async function update(appConfig, updateFn) {
- const key = getKey(appConfig);
- const db = await getDbPromise();
- const tx = db.transaction(OBJECT_STORE_NAME, 'readwrite');
- const store = tx.objectStore(OBJECT_STORE_NAME);
- const oldValue = (await store.get(key));
- const newValue = updateFn(oldValue);
- if (newValue === undefined) {
- await store.delete(key);
- }
- else {
- await store.put(newValue, key);
- }
- await tx.done;
- if (newValue && (!oldValue || oldValue.fid !== newValue.fid)) {
- fidChanged(appConfig, newValue.fid);
- }
- return newValue;
- }
-
-
-
- async function getInstallationEntry(installations) {
- let registrationPromise;
- const installationEntry = await update(installations.appConfig, oldEntry => {
- const installationEntry = updateOrCreateInstallationEntry(oldEntry);
- const entryWithPromise = triggerRegistrationIfNecessary(installations, installationEntry);
- registrationPromise = entryWithPromise.registrationPromise;
- return entryWithPromise.installationEntry;
- });
- if (installationEntry.fid === INVALID_FID) {
-
- return { installationEntry: await registrationPromise };
- }
- return {
- installationEntry,
- registrationPromise
- };
- }
-
- function updateOrCreateInstallationEntry(oldEntry) {
- const entry = oldEntry || {
- fid: generateFid(),
- registrationStatus: 0
- };
- return clearTimedOutRequest(entry);
- }
-
- function triggerRegistrationIfNecessary(installations, installationEntry) {
- if (installationEntry.registrationStatus === 0 ) {
- if (!navigator.onLine) {
-
- const registrationPromiseWithError = Promise.reject(ERROR_FACTORY.create("app-offline" ));
- return {
- installationEntry,
- registrationPromise: registrationPromiseWithError
- };
- }
-
- const inProgressEntry = {
- fid: installationEntry.fid,
- registrationStatus: 1 ,
- registrationTime: Date.now()
- };
- const registrationPromise = registerInstallation(installations, inProgressEntry);
- return { installationEntry: inProgressEntry, registrationPromise };
- }
- else if (installationEntry.registrationStatus === 1 ) {
- return {
- installationEntry,
- registrationPromise: waitUntilFidRegistration(installations)
- };
- }
- else {
- return { installationEntry };
- }
- }
-
- async function registerInstallation(installations, installationEntry) {
- try {
- const registeredInstallationEntry = await createInstallationRequest(installations, installationEntry);
- return set(installations.appConfig, registeredInstallationEntry);
- }
- catch (e) {
- if (isServerError(e) && e.customData.serverCode === 409) {
-
-
- await remove(installations.appConfig);
- }
- else {
-
- await set(installations.appConfig, {
- fid: installationEntry.fid,
- registrationStatus: 0
- });
- }
- throw e;
- }
- }
-
- async function waitUntilFidRegistration(installations) {
-
-
-
- let entry = await updateInstallationRequest(installations.appConfig);
- while (entry.registrationStatus === 1 ) {
-
- await sleep(100);
- entry = await updateInstallationRequest(installations.appConfig);
- }
- if (entry.registrationStatus === 0 ) {
-
- const { installationEntry, registrationPromise } = await getInstallationEntry(installations);
- if (registrationPromise) {
- return registrationPromise;
- }
- else {
-
- return installationEntry;
- }
- }
- return entry;
- }
-
- function updateInstallationRequest(appConfig) {
- return update(appConfig, oldEntry => {
- if (!oldEntry) {
- throw ERROR_FACTORY.create("installation-not-found" );
- }
- return clearTimedOutRequest(oldEntry);
- });
- }
- function clearTimedOutRequest(entry) {
- if (hasInstallationRequestTimedOut(entry)) {
- return {
- fid: entry.fid,
- registrationStatus: 0
- };
- }
- return entry;
- }
- function hasInstallationRequestTimedOut(installationEntry) {
- return (installationEntry.registrationStatus === 1 &&
- installationEntry.registrationTime + PENDING_TIMEOUT_MS < Date.now());
- }
-
-
- async function generateAuthTokenRequest({ appConfig, heartbeatServiceProvider }, installationEntry) {
- const endpoint = getGenerateAuthTokenEndpoint(appConfig, installationEntry);
- const headers = getHeadersWithAuth(appConfig, installationEntry);
-
- const heartbeatService = heartbeatServiceProvider.getImmediate({
- optional: true
- });
- if (heartbeatService) {
- const heartbeatsHeader = await heartbeatService.getHeartbeatsHeader();
- if (heartbeatsHeader) {
- headers.append('x-firebase-client', heartbeatsHeader);
- }
- }
- const body = {
- installation: {
- sdkVersion: PACKAGE_VERSION,
- appId: appConfig.appId
- }
- };
- const request = {
- method: 'POST',
- headers,
- body: JSON.stringify(body)
- };
- const response = await retryIfServerError(() => fetch(endpoint, request));
- if (response.ok) {
- const responseValue = await response.json();
- const completedAuthToken = extractAuthTokenInfoFromResponse(responseValue);
- return completedAuthToken;
- }
- else {
- throw await getErrorFromResponse('Generate Auth Token', response);
- }
- }
- function getGenerateAuthTokenEndpoint(appConfig, { fid }) {
- return `${getInstallationsEndpoint(appConfig)}/${fid}/authTokens:generate`;
- }
-
-
-
- async function refreshAuthToken(installations, forceRefresh = false) {
- let tokenPromise;
- const entry = await update(installations.appConfig, oldEntry => {
- if (!isEntryRegistered(oldEntry)) {
- throw ERROR_FACTORY.create("not-registered" );
- }
- const oldAuthToken = oldEntry.authToken;
- if (!forceRefresh && isAuthTokenValid(oldAuthToken)) {
-
- return oldEntry;
- }
- else if (oldAuthToken.requestStatus === 1 ) {
-
- tokenPromise = waitUntilAuthTokenRequest(installations, forceRefresh);
- return oldEntry;
- }
- else {
-
- if (!navigator.onLine) {
- throw ERROR_FACTORY.create("app-offline" );
- }
- const inProgressEntry = makeAuthTokenRequestInProgressEntry(oldEntry);
- tokenPromise = fetchAuthTokenFromServer(installations, inProgressEntry);
- return inProgressEntry;
- }
- });
- const authToken = tokenPromise
- ? await tokenPromise
- : entry.authToken;
- return authToken;
- }
-
- async function waitUntilAuthTokenRequest(installations, forceRefresh) {
-
-
-
- let entry = await updateAuthTokenRequest(installations.appConfig);
- while (entry.authToken.requestStatus === 1 ) {
-
- await sleep(100);
- entry = await updateAuthTokenRequest(installations.appConfig);
- }
- const authToken = entry.authToken;
- if (authToken.requestStatus === 0 ) {
-
- return refreshAuthToken(installations, forceRefresh);
- }
- else {
- return authToken;
- }
- }
-
- function updateAuthTokenRequest(appConfig) {
- return update(appConfig, oldEntry => {
- if (!isEntryRegistered(oldEntry)) {
- throw ERROR_FACTORY.create("not-registered" );
- }
- const oldAuthToken = oldEntry.authToken;
- if (hasAuthTokenRequestTimedOut(oldAuthToken)) {
- return Object.assign(Object.assign({}, oldEntry), { authToken: { requestStatus: 0 } });
- }
- return oldEntry;
- });
- }
- async function fetchAuthTokenFromServer(installations, installationEntry) {
- try {
- const authToken = await generateAuthTokenRequest(installations, installationEntry);
- const updatedInstallationEntry = Object.assign(Object.assign({}, installationEntry), { authToken });
- await set(installations.appConfig, updatedInstallationEntry);
- return authToken;
- }
- catch (e) {
- if (isServerError(e) &&
- (e.customData.serverCode === 401 || e.customData.serverCode === 404)) {
-
-
- await remove(installations.appConfig);
- }
- else {
- const updatedInstallationEntry = Object.assign(Object.assign({}, installationEntry), { authToken: { requestStatus: 0 } });
- await set(installations.appConfig, updatedInstallationEntry);
- }
- throw e;
- }
- }
- function isEntryRegistered(installationEntry) {
- return (installationEntry !== undefined &&
- installationEntry.registrationStatus === 2 );
- }
- function isAuthTokenValid(authToken) {
- return (authToken.requestStatus === 2 &&
- !isAuthTokenExpired(authToken));
- }
- function isAuthTokenExpired(authToken) {
- const now = Date.now();
- return (now < authToken.creationTime ||
- authToken.creationTime + authToken.expiresIn < now + TOKEN_EXPIRATION_BUFFER);
- }
-
- function makeAuthTokenRequestInProgressEntry(oldEntry) {
- const inProgressAuthToken = {
- requestStatus: 1 ,
- requestTime: Date.now()
- };
- return Object.assign(Object.assign({}, oldEntry), { authToken: inProgressAuthToken });
- }
- function hasAuthTokenRequestTimedOut(authToken) {
- return (authToken.requestStatus === 1 &&
- authToken.requestTime + PENDING_TIMEOUT_MS < Date.now());
- }
-
-
-
- async function getId(installations) {
- const installationsImpl = installations;
- const { installationEntry, registrationPromise } = await getInstallationEntry(installationsImpl);
- if (registrationPromise) {
- registrationPromise.catch(console.error);
- }
- else {
-
-
- refreshAuthToken(installationsImpl).catch(console.error);
- }
- return installationEntry.fid;
- }
-
-
-
- async function getToken(installations, forceRefresh = false) {
- const installationsImpl = installations;
- await completeInstallationRegistration(installationsImpl);
-
-
- const authToken = await refreshAuthToken(installationsImpl, forceRefresh);
- return authToken.token;
- }
- async function completeInstallationRegistration(installations) {
- const { registrationPromise } = await getInstallationEntry(installations);
- if (registrationPromise) {
-
- await registrationPromise;
- }
- }
-
-
- async function deleteInstallationRequest(appConfig, installationEntry) {
- const endpoint = getDeleteEndpoint(appConfig, installationEntry);
- const headers = getHeadersWithAuth(appConfig, installationEntry);
- const request = {
- method: 'DELETE',
- headers
- };
- const response = await retryIfServerError(() => fetch(endpoint, request));
- if (!response.ok) {
- throw await getErrorFromResponse('Delete Installation', response);
- }
- }
- function getDeleteEndpoint(appConfig, { fid }) {
- return `${getInstallationsEndpoint(appConfig)}/${fid}`;
- }
-
-
-
- async function deleteInstallations(installations) {
- const { appConfig } = installations;
- const entry = await update(appConfig, oldEntry => {
- if (oldEntry && oldEntry.registrationStatus === 0 ) {
-
- return undefined;
- }
- return oldEntry;
- });
- if (entry) {
- if (entry.registrationStatus === 1 ) {
-
- throw ERROR_FACTORY.create("delete-pending-registration" );
- }
- else if (entry.registrationStatus === 2 ) {
- if (!navigator.onLine) {
- throw ERROR_FACTORY.create("app-offline" );
- }
- else {
- await deleteInstallationRequest(appConfig, entry);
- await remove(appConfig);
- }
- }
- }
- }
-
-
-
- function onIdChange(installations, callback) {
- const { appConfig } = installations;
- addCallback(appConfig, callback);
- return () => {
- removeCallback(appConfig, callback);
- };
- }
-
-
-
- function getInstallations(app = getApp()) {
- const installationsImpl = _getProvider(app, 'installations').getImmediate();
- return installationsImpl;
- }
-
-
- function extractAppConfig(app) {
- if (!app || !app.options) {
- throw getMissingValueError('App Configuration');
- }
- if (!app.name) {
- throw getMissingValueError('App Name');
- }
-
- const configKeys = [
- 'projectId',
- 'apiKey',
- 'appId'
- ];
- for (const keyName of configKeys) {
- if (!app.options[keyName]) {
- throw getMissingValueError(keyName);
- }
- }
- return {
- appName: app.name,
- projectId: app.options.projectId,
- apiKey: app.options.apiKey,
- appId: app.options.appId
- };
- }
- function getMissingValueError(valueName) {
- return ERROR_FACTORY.create("missing-app-config-values" , {
- valueName
- });
- }
-
-
- const INSTALLATIONS_NAME = 'installations';
- const INSTALLATIONS_NAME_INTERNAL = 'installations-internal';
- const publicFactory = (container) => {
- const app = container.getProvider('app').getImmediate();
-
- const appConfig = extractAppConfig(app);
- const heartbeatServiceProvider = _getProvider(app, 'heartbeat');
- const installationsImpl = {
- app,
- appConfig,
- heartbeatServiceProvider,
- _delete: () => Promise.resolve()
- };
- return installationsImpl;
- };
- const internalFactory = (container) => {
- const app = container.getProvider('app').getImmediate();
-
- const installations = _getProvider(app, INSTALLATIONS_NAME).getImmediate();
- const installationsInternal = {
- getId: () => getId(installations),
- getToken: (forceRefresh) => getToken(installations, forceRefresh)
- };
- return installationsInternal;
- };
- function registerInstallations() {
- _registerComponent(new Component(INSTALLATIONS_NAME, publicFactory, "PUBLIC" ));
- _registerComponent(new Component(INSTALLATIONS_NAME_INTERNAL, internalFactory, "PRIVATE" ));
- }
-
-
- registerInstallations();
- registerVersion(name, version);
-
- registerVersion(name, version, 'esm2017');
-
- export { deleteInstallations, getId, getInstallations, getToken, onIdChange };
|