diff --git a/.github/scripts/compare-types/configs/installations.ts b/.github/scripts/compare-types/configs/installations.ts new file mode 100644 index 0000000000..0a438d6107 --- /dev/null +++ b/.github/scripts/compare-types/configs/installations.ts @@ -0,0 +1,19 @@ +/** + * Known differences between the firebase-js-sdk @firebase/installations public + * API and the @react-native-firebase/installations modular API. + * + * Each entry must have a `name` (the export name) and a `reason` explaining + * why the difference exists. Any difference NOT listed here will cause CI to + * fail so that new drift is caught and deliberately acknowledged. + */ + +import type { PackageConfig } from '../src/types'; + +const config: PackageConfig = { + nameMapping: {}, + missingInRN: [], + extraInRN: [], + differentShape: [], +}; + +export default config; diff --git a/.github/scripts/compare-types/src/registry.ts b/.github/scripts/compare-types/src/registry.ts index 851ed89851..97756f7930 100644 --- a/.github/scripts/compare-types/src/registry.ts +++ b/.github/scripts/compare-types/src/registry.ts @@ -18,6 +18,7 @@ import appCheckConfig from '../configs/app-check'; import firestoreConfig from '../configs/firestore'; import firestorePipelinesConfig from '../configs/firestore-pipelines'; import remoteConfigConfig from '../configs/remote-config'; +import installationsConfig from '../configs/installations'; const SCRIPT_DIR = path.resolve(__dirname, '..'); const REPO_ROOT = path.resolve(SCRIPT_DIR, '..', '..', '..'); @@ -196,6 +197,18 @@ export const packages: PackageEntry[] = [ ], config: appCheckConfig, }, + { + name: 'installations', + firebaseSdkTypesPaths: [ + path.join(SCRIPT_DIR, 'packages', 'installations', 'firebase-sdk.d.ts'), + ], + rnFirebaseModularFiles: [ + path.join(rnDist('installations'), 'types', 'installations.d.ts'), + path.join(rnDist('installations'), 'modular.d.ts'), + ], + rnFirebaseSupportFiles: [path.join(rnDist('installations'), 'types', 'internal.d.ts')], + config: installationsConfig, + }, { name: 'firestore', firebaseSdkTypesPaths: [requiredFirebaseTypes('firestore')], @@ -248,5 +261,3 @@ export const packages: PackageEntry[] = [ config: firestorePipelinesConfig, })), ]; - - diff --git a/packages/installations/__tests__/installations.test.ts b/packages/installations/__tests__/installations.test.ts index 8c76b1cd84..1a0f08203c 100644 --- a/packages/installations/__tests__/installations.test.ts +++ b/packages/installations/__tests__/installations.test.ts @@ -109,6 +109,7 @@ describe('installations()', function () { const installations = getInstallations(); installationsV9Deprecation( () => deleteInstallations(installations), + // @ts-expect-error Combines modular and namespace API () => installations.delete(), 'delete', ); @@ -118,6 +119,7 @@ describe('installations()', function () { const installations = getInstallations(); installationsV9Deprecation( () => getId(installations), + // @ts-expect-error Combines modular and namespace API () => installations.getId(), 'getId', ); @@ -127,6 +129,7 @@ describe('installations()', function () { const installations = getInstallations(); installationsV9Deprecation( () => getToken(installations), + // @ts-expect-error Combines modular and namespace API () => installations.getToken(), 'getToken', ); diff --git a/packages/installations/lib/index.d.ts b/packages/installations/lib/index.d.ts deleted file mode 100644 index 47b4434dc0..0000000000 --- a/packages/installations/lib/index.d.ts +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2016-present Invertase Limited & Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this library except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { ReactNativeFirebase } from '@react-native-firebase/app'; - -/** - * Firebase Installations package for React Native. - * - * #### Example 1 - * - * Access the firebase export from the `installations` package: - * - * ```js - * import { firebase } from '@react-native-firebase/installations'; - * - * // firebase.installations().X - * ``` - * - * #### Example 2 - * - * Using the default export from the `installations` package: - * - * ```js - * import installations from '@react-native-firebase/installations'; - * - * // installations().X - * ``` - * - * #### Example 3 - * - * Using the default export from the `app` package: - * - * ```js - * import firebase from '@react-native-firebase/app'; - * import '@react-native-firebase/installations'; - * - * // firebase.installations().X - * ``` - * - * @firebase installations - */ -export namespace FirebaseInstallationsTypes { - import FirebaseModule = ReactNativeFirebase.FirebaseModule; - - export interface Statics { - SDK_VERSION: string; - } - - /** - * The Firebase Installations service is available for the default app or a given app. - * - * #### Example 1 - * - * Get the installations instance for the **default app**: - * - * ```js - * const installationsForDefaultApp = firebase.installations(); - * ``` - * - * #### Example 2 - * - * Get the installations instance for a **secondary app**: - *˚ - * ```js - * const otherApp = firebase.app('otherApp'); - * const installationsForOtherApp = firebase.installations(otherApp); - * ``` - * - */ - export class Module extends FirebaseModule { - /** - * The current `FirebaseApp` instance for this Firebase service. - */ - app: ReactNativeFirebase.FirebaseApp; - - /** - * Creates a Firebase Installation if there isn't one for the app and - * returns the Installation ID. The installation ID is a globally unique, - * stable, URL-safe base64 string identifier that uniquely identifies the app instance. - * NOTE: If the application already has an existing FirebaseInstanceID then the InstanceID identifier will be used. - * - * @return Firebase Installation ID, this is an url-safe base64 string of a 128-bit integer. - */ - getId(): Promise; - - /** - * Retrieves (locally or from the server depending on forceRefresh value) a valid installation auth token. - * An existing token may be invalidated or expire, so it is recommended to fetch the installation auth token - * before any request to external servers (it will be refreshed automatically for firebase API calls). - * This method should be used with forceRefresh == YES when e.g. a request with the previously fetched - * installation auth token failed with “Not Authorized” error. - * - * @param forceRefresh Options to get an auth token either by force refreshing or not. - * @return Firebase Installation Authentication Token - */ - getToken(forceRefresh?: boolean): Promise; - - /** - * Deletes the Firebase Installation and all associated data from the Firebase backend. - * This call may cause Firebase Cloud Messaging, Firebase Remote Config, Firebase Predictions, - * or Firebase In-App Messaging to not function properly. Fetching a new installations ID should - * reset all the dependent services to a stable state again. A network connection is required - * for the method to succeed. If it fails, the existing installation data remains untouched. - */ - delete(): Promise; - - /** - * TODO implement id change listener for android. - * - * Sets a new callback that will get called when Installation ID changes. - * Returns an unsubscribe function that will remove the callback when called. - * Only the Android SDK supports sending ID change events. - * - * @android - */ - // onIdChange(callback: (installationId: string) => void): () => void; - } -} - -type InstallationsNamespace = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp< - FirebaseInstallationsTypes.Module, - FirebaseInstallationsTypes.Statics -> & { - firebase: ReactNativeFirebase.Module; - app(name?: string): ReactNativeFirebase.FirebaseApp; -}; - -declare const defaultExport: InstallationsNamespace; - -export const firebase: ReactNativeFirebase.Module & { - installations: typeof defaultExport; - app( - name?: string, - ): ReactNativeFirebase.FirebaseApp & { installations(): FirebaseInstallationsTypes.Module }; -}; - -export * from './modular'; - -export default defaultExport; - -/** - * Attach namespace to `firebase.` and `FirebaseApp.`. - */ -declare module '@react-native-firebase/app' { - namespace ReactNativeFirebase { - import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp; - - interface Module { - installations: FirebaseModuleWithStaticsAndApp< - FirebaseInstallationsTypes.Module, - FirebaseInstallationsTypes.Statics - >; - } - - interface FirebaseApp { - installations(): FirebaseInstallationsTypes.Module; - } - } -} diff --git a/packages/installations/lib/index.ts b/packages/installations/lib/index.ts new file mode 100644 index 0000000000..bc592b178f --- /dev/null +++ b/packages/installations/lib/index.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2016-present Invertase Limited & Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this library except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Export modular/public types. +export type * from './types/installations'; + +// Export modular API functions. +export * from './modular'; + +// Export namespaced API. +export type { FirebaseInstallationsTypes } from './types/namespaced'; +export * from './namespaced'; +export { default } from './namespaced'; diff --git a/packages/installations/lib/modular.ts b/packages/installations/lib/modular.ts new file mode 100644 index 0000000000..7b6247a592 --- /dev/null +++ b/packages/installations/lib/modular.ts @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2016-present Invertase Limited & Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this library except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import { getApp } from '@react-native-firebase/app'; +import type { FirebaseApp } from '@react-native-firebase/app'; +import { MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/dist/module/common'; +import type { + IdChangeCallbackFn, + IdChangeUnsubscribeFn, + Installations, +} from './types/installations'; +import type { InstallationsInternal } from './types/internal'; + +function withModularDeprecationArg(installations: Installations): InstallationsInternal { + return installations as InstallationsInternal; +} + +/** + * Returns an instance of Installations associated with the given FirebaseApp instance. + */ +export function getInstallations(app?: FirebaseApp): Installations { + if (app) { + return getApp(app.name).installations(); + } + return getApp().installations(); +} + +/** + * Deletes the Firebase Installation and all associated data. + */ +export function deleteInstallations(installations: Installations): Promise { + const internalInstallations = withModularDeprecationArg(installations); + return internalInstallations.delete.call(internalInstallations, MODULAR_DEPRECATION_ARG); +} + +/** + * Creates a Firebase Installation if there isn't one for the app and returns the Installation ID. + */ +export function getId(installations: Installations): Promise { + const internalInstallations = withModularDeprecationArg(installations); + return internalInstallations.getId.call(internalInstallations, MODULAR_DEPRECATION_ARG); +} + +/** + * Returns a Firebase Installations auth token, identifying the current Firebase Installation. + */ +export function getToken(installations: Installations, forceRefresh?: boolean): Promise { + const internalInstallations = withModularDeprecationArg(installations); + return internalInstallations.getToken.call( + internalInstallations, + forceRefresh, + MODULAR_DEPRECATION_ARG, + ); +} + +/** + * Throw an error since react-native-firebase does not support this method. + * + * Sets a new callback that will get called when Installation ID changes. Returns an unsubscribe function that will remove the callback when called. + */ +export function onIdChange( + _installations: Installations, + _callback: IdChangeCallbackFn, +): IdChangeUnsubscribeFn { + throw new Error('onIdChange() is unsupported by the React Native Firebase SDK.'); +} diff --git a/packages/installations/lib/modular/index.d.ts b/packages/installations/lib/modular/index.d.ts deleted file mode 100644 index 8e493590ac..0000000000 --- a/packages/installations/lib/modular/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { ReactNativeFirebase } from '@react-native-firebase/app'; -import { FirebaseInstallationsTypes } from '../index'; - -import FirebaseInstallations = FirebaseInstallationsTypes.Module; -/** - * Returns an instance of Installations associated with the given FirebaseApp instance. - */ -export declare function getInstallations( - app?: ReactNativeFirebase.FirebaseApp, -): FirebaseInstallations; - -/** - * Deletes the Firebase Installation and all associated data. - */ -export declare function deleteInstallations(installations?: FirebaseInstallations): Promise; - -/** - * Creates a Firebase Installation if there isn't one for the app and returns the Installation ID. - */ -export declare function getId(installations: FirebaseInstallations): Promise; - -/** - * Returns a Firebase Installations auth token, identifying the current Firebase Installation. - */ -export declare function getToken( - installations: FirebaseInstallations, - forceRefresh?: boolean, -): Promise; - -declare type IdChangeCallbackFn = (installationId: string) => void; -declare type IdChangeUnsubscribeFn = () => void; - -/** - * Throw an error since react-native-firebase does not support this method. - * - * Sets a new callback that will get called when Installation ID changes. Returns an unsubscribe function that will remove the callback when called. - */ -export declare function onIdChange( - installations: FirebaseInstallations, - callback: IdChangeCallbackFn, -): IdChangeUnsubscribeFn; diff --git a/packages/installations/lib/modular/index.js b/packages/installations/lib/modular/index.js deleted file mode 100644 index 85a7a279b8..0000000000 --- a/packages/installations/lib/modular/index.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2016-present Invertase Limited & Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this library except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { getApp } from '@react-native-firebase/app'; -import { MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/dist/module/common'; -/** - * @typedef {import('..').FirebaseInstallationsTypes.Module} FirebaseInstallation - */ - -export function getInstallations(app) { - if (app) { - return getApp(app.name).installations(); - } - return getApp().installations(); -} - -/** - * @param {FirebaseInstallation} installations - * @returns {Promise} - */ -export function deleteInstallations(installations) { - return installations.delete.call(installations, MODULAR_DEPRECATION_ARG); -} - -/** - * @param {FirebaseInstallation} installations - * @returns {Promise} - */ -export function getId(installations) { - return installations.getId.call(installations, MODULAR_DEPRECATION_ARG); -} - -/** - * @param {FirebaseInstallation} installations - * @param {boolean | undefined} forceRefresh - * @returns {Promise} - */ -export function getToken(installations, forceRefresh) { - return installations.getToken.call(installations, forceRefresh, MODULAR_DEPRECATION_ARG); -} - -/** - * @param {FirebaseInstallation} installations - * @param {(string) => void} callback - * @returns {() => void} - */ -export function onIdChange(_installations, _callback) { - throw new Error('onIdChange() is unsupported by the React Native Firebase SDK.'); -} diff --git a/packages/installations/lib/index.js b/packages/installations/lib/namespaced.ts similarity index 61% rename from packages/installations/lib/index.js rename to packages/installations/lib/namespaced.ts index 65deb37618..893e24ee78 100644 --- a/packages/installations/lib/index.js +++ b/packages/installations/lib/namespaced.ts @@ -21,21 +21,22 @@ import { FirebaseModule, getFirebaseRoot, } from '@react-native-firebase/app/dist/module/internal'; +import type { ReactNativeFirebase } from '@react-native-firebase/app'; -import version from './version'; +import { version } from './version'; +import type { FirebaseInstallationsTypes } from './types/namespaced'; const statics = {}; const namespace = 'installations'; - const nativeModuleName = 'RNFBInstallationsModule'; -class FirebaseInstallationsModule extends FirebaseModule { - getId() { +class FirebaseInstallationsModule extends FirebaseModule { + getId(): Promise { return this.native.getId(); } - getToken(forceRefresh) { + getToken(forceRefresh?: boolean): Promise { if (!forceRefresh) { return this.native.getToken(false); } else { @@ -43,11 +44,11 @@ class FirebaseInstallationsModule extends FirebaseModule { } } - delete() { + delete(): Promise { return this.native.delete(); } - onIdChange() { + onIdChange(): () => void { if (isIOS) { return () => {}; } @@ -62,7 +63,7 @@ export const SDK_VERSION = version; // import installations from '@react-native-firebase/installations'; // installations().X(...); -export default createModuleNamespace({ +const installationsNamespace = createModuleNamespace({ statics, version, namespace, @@ -73,9 +74,27 @@ export default createModuleNamespace({ ModuleClass: FirebaseInstallationsModule, }); +type InstallationsNamespace = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp< + FirebaseInstallationsTypes.Module, + FirebaseInstallationsTypes.Statics +> & { + installations: ReactNativeFirebase.FirebaseModuleWithStaticsAndApp< + FirebaseInstallationsTypes.Module, + FirebaseInstallationsTypes.Statics + >; + firebase: ReactNativeFirebase.Module; + app(name?: string): ReactNativeFirebase.FirebaseApp; +}; + +export default installationsNamespace as unknown as InstallationsNamespace; + // import installations, { firebase } from '@react-native-firebase/installations'; // installations().X(...); // firebase.installations().X(...); -export const firebase = getFirebaseRoot(); - -export * from './modular'; +export const firebase = + getFirebaseRoot() as unknown as ReactNativeFirebase.FirebaseNamespacedExport< + 'installations', + FirebaseInstallationsTypes.Module, + FirebaseInstallationsTypes.Statics, + false + >; diff --git a/packages/installations/lib/types/installations.ts b/packages/installations/lib/types/installations.ts new file mode 100644 index 0000000000..e1e0a14c71 --- /dev/null +++ b/packages/installations/lib/types/installations.ts @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2016-present Invertase Limited & Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this library except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import type { FirebaseApp } from '@react-native-firebase/app'; + +/** + * An user defined callback function that gets called when Installations ID changes. + */ +export type IdChangeCallbackFn = (installationId: string) => void; + +/** + * Unsubscribe a callback function previously added via {@link IdChangeCallbackFn}. + */ +export type IdChangeUnsubscribeFn = () => void; + +/** + * Firebase Installations service instance. + */ +export interface Installations { + /** + * The current `FirebaseApp` instance for this Firebase service. + */ + app: FirebaseApp; +} diff --git a/packages/installations/lib/types/internal.ts b/packages/installations/lib/types/internal.ts new file mode 100644 index 0000000000..2b0b4b36b6 --- /dev/null +++ b/packages/installations/lib/types/internal.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2016-present Invertase Limited & Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import type { Installations } from './installations'; + +/** Optional final argument passed by modular API wrappers (MODULAR_DEPRECATION_ARG). */ +export type InstallationsModularDeprecationArg = string; + +export interface InstallationsInternal extends Installations { + delete(deprecationArg?: InstallationsModularDeprecationArg): Promise; + getId(deprecationArg?: InstallationsModularDeprecationArg): Promise; + getToken( + forceRefresh?: boolean, + deprecationArg?: InstallationsModularDeprecationArg, + ): Promise; +} + +export interface RNFBInstallationsModule { + getId(): Promise; + getToken(forceRefresh: boolean): Promise; + delete(): Promise; +} + +declare module '@react-native-firebase/app/dist/module/internal/NativeModules' { + interface ReactNativeFirebaseNativeModules { + RNFBInstallationsModule: RNFBInstallationsModule; + } +} diff --git a/packages/installations/lib/types/namespaced.ts b/packages/installations/lib/types/namespaced.ts new file mode 100644 index 0000000000..83cc3a0820 --- /dev/null +++ b/packages/installations/lib/types/namespaced.ts @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2016-present Invertase Limited & Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this library except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import type { ReactNativeFirebase } from '@react-native-firebase/app'; + +/** + * Firebase Installations package for React Native. + * + * @firebase installations + */ +/** + * @deprecated Use the exported types directly instead. + * FirebaseInstallationsTypes namespace is kept for backwards compatibility. + */ +/* eslint-disable @typescript-eslint/no-namespace */ +export namespace FirebaseInstallationsTypes { + /** + * @deprecated Use the exported types directly instead. + */ + export interface Statics { + SDK_VERSION: string; + } + + /** + * The Firebase Installations service is available for the default app or a given app. + * + * @deprecated Use the exported types directly instead. FirebaseInstallationsTypes namespace is kept for backwards compatibility. + */ + export interface Module extends ReactNativeFirebase.FirebaseModule { + /** + * The current `FirebaseApp` instance for this Firebase service. + * + * @deprecated Use the exported types directly instead. + */ + app: ReactNativeFirebase.FirebaseApp; + + /** + * Creates a Firebase Installation if there isn't one for the app and returns the Installation ID. + * + * @deprecated Use `getId()` from the modular API instead. + */ + getId(): Promise; + + /** + * Retrieves a valid installation auth token. + * + * @deprecated Use `getToken()` from the modular API instead. + */ + getToken(forceRefresh?: boolean): Promise; + + /** + * Deletes the Firebase Installation and all associated data from the Firebase backend. + * + * @deprecated Use `deleteInstallations()` from the modular API instead. + */ + delete(): Promise; + } + + export type InstallationsNamespace = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp< + Module, + Statics + > & { + installations: ReactNativeFirebase.FirebaseModuleWithStaticsAndApp; + firebase: ReactNativeFirebase.Module; + app(name?: string): ReactNativeFirebase.FirebaseApp; + }; +} + +declare const defaultExport: FirebaseInstallationsTypes.InstallationsNamespace; + +export declare const firebase: ReactNativeFirebase.Module & { + installations: typeof defaultExport; + app( + name?: string, + ): ReactNativeFirebase.FirebaseApp & { installations(): FirebaseInstallationsTypes.Module }; +}; + +export default defaultExport; + +/** + * Attach namespace to `firebase.` and `FirebaseApp.`. + */ +declare module '@react-native-firebase/app' { + namespace ReactNativeFirebase { + import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp; + + interface Module { + installations: FirebaseModuleWithStaticsAndApp< + FirebaseInstallationsTypes.Module, + FirebaseInstallationsTypes.Statics + >; + } + + interface FirebaseApp { + installations(): FirebaseInstallationsTypes.Module; + } + } +} diff --git a/packages/installations/package.json b/packages/installations/package.json index de1373a88d..125db21776 100644 --- a/packages/installations/package.json +++ b/packages/installations/package.json @@ -3,12 +3,13 @@ "version": "24.0.0", "author": "Invertase (http://invertase.io)", "description": "React Native Firebase - Installations", - "main": "lib/index.js", - "types": "lib/index.d.ts", + "main": "./dist/module/index.js", + "types": "./dist/typescript/lib/index.d.ts", "scripts": { - "build": "genversion --semi lib/version.js", + "build": "genversion --esm --semi lib/version.ts", "build:clean": "rimraf android/build && rimraf ios/build", - "prepare": "yarn run build" + "compile": "bob build", + "prepare": "yarn run build && yarn compile" }, "repository": { "type": "git", @@ -27,5 +28,34 @@ "publishConfig": { "access": "public", "provenance": true + }, + "devDependencies": { + "react-native-builder-bob": "^0.40.13" + }, + "exports": { + ".": { + "source": "./lib/index.ts", + "types": "./dist/typescript/lib/index.d.ts", + "default": "./dist/module/index.js" + }, + "./package.json": "./package.json" + }, + "react-native-builder-bob": { + "source": "lib", + "output": "dist", + "targets": [ + [ + "module", + { + "esm": true + } + ], + [ + "typescript", + { + "tsc": "../../node_modules/.bin/tsc" + } + ] + ] } } diff --git a/packages/installations/tsconfig.json b/packages/installations/tsconfig.json new file mode 100644 index 0000000000..3dc86a647b --- /dev/null +++ b/packages/installations/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "../../tsconfig.packages.base.json", + "compilerOptions": { + "baseUrl": ".", + "rootDir": ".", + "paths": { + "@react-native-firebase/app/dist/module/common/*": ["../app/dist/typescript/lib/common/*"], + "@react-native-firebase/app/dist/module/common": ["../app/dist/typescript/lib/common"], + "@react-native-firebase/app/dist/module/internal/*": [ + "../app/dist/typescript/lib/internal/*" + ], + "@react-native-firebase/app/dist/module/internal": ["../app/dist/typescript/lib/internal"], + "@react-native-firebase/app/dist/module/internal/NativeModules": [ + "../app/dist/typescript/lib/internal/NativeModules" + ], + "@react-native-firebase/app": ["../app/dist/typescript/lib"] + } + }, + "include": ["lib/**/*.ts"], + "exclude": ["node_modules", "dist", "__tests__", "**/*.test.ts", "lib/**/*.d.ts"] +} diff --git a/packages/installations/type-test.ts b/packages/installations/type-test.ts index 3df090f8b3..943d4fa128 100644 --- a/packages/installations/type-test.ts +++ b/packages/installations/type-test.ts @@ -6,6 +6,12 @@ import installations, { getToken, onIdChange, } from '.'; +import type { + FirebaseInstallationsTypes, + IdChangeCallbackFn, + IdChangeUnsubscribeFn, + Installations, +} from '.'; console.log(installations().app); @@ -55,6 +61,8 @@ installationsInstance.delete().then(() => { // checks modular API functions const modularInstallations1 = getInstallations(); console.log(modularInstallations1.app.name); +const typedInstallations: Installations = modularInstallations1; +console.log(typedInstallations.app.name); const modularInstallations2 = getInstallations(firebase.app()); console.log(modularInstallations2.app.name); @@ -78,11 +86,21 @@ deleteInstallations(modularInstallations1).then(() => { console.log('Modular installation deleted'); }); +const namespacedInstallations: FirebaseInstallationsTypes.Module = installationsInstance; +namespacedInstallations.getId().then((id: string) => { + console.log(id); +}); + // Note: onIdChange throws an error in React Native Firebase try { - onIdChange(modularInstallations1, (id: string) => { + const onInstallationsIdChange: IdChangeCallbackFn = id => { console.log(id); - }); + }; + const unsubscribe: IdChangeUnsubscribeFn = onIdChange( + modularInstallations1, + onInstallationsIdChange, + ); + unsubscribe(); } catch (error) { console.log('Modular onIdChange not supported'); } diff --git a/packages/installations/typedoc.json b/packages/installations/typedoc.json index bf93ba7159..e83cc5c235 100644 --- a/packages/installations/typedoc.json +++ b/packages/installations/typedoc.json @@ -1,6 +1,5 @@ { "$schema": "https://typedoc.org/schema.json", - "entryPoints": ["lib/index.d.ts"], - "intentionallyNotExported": ["InstallationsNamespace"] - + "entryPoints": ["lib/modular.ts", "lib/types/installations.ts"], + "tsconfig": "tsconfig.json" } diff --git a/tsconfig.json b/tsconfig.json index a922dda15e..79d7dbc364 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,8 +17,6 @@ "packages/firestore/lib/modular/VectorValue.d.ts", "packages/in-app-messaging/lib/index.d.ts", "packages/in-app-messaging/lib/modular/index.d.ts", - "packages/installations/lib/index.d.ts", - "packages/installations/lib/modular/index.d.ts", "packages/ml/lib/index.d.ts", "packages/ml/lib/modular/index.d.ts", "packages/perf/lib/index.d.ts", @@ -69,7 +67,7 @@ ], "@react-native-firebase/firestore/pipelines": [ "./packages/firestore/dist/typescript/lib/pipelines/index.d.ts" - ], + ] } }, "exclude": ["node_modules", "**/*.spec.ts", "packages/**/dist"] diff --git a/yarn.lock b/yarn.lock index 4832e300ed..01892e8be7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1233,7 +1233,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-flow-strip-types@npm:^7.25.2, @babel/plugin-transform-flow-strip-types@npm:^7.27.1": +"@babel/plugin-transform-flow-strip-types@npm:^7.25.2, @babel/plugin-transform-flow-strip-types@npm:^7.26.5, @babel/plugin-transform-flow-strip-types@npm:^7.27.1": version: 7.27.1 resolution: "@babel/plugin-transform-flow-strip-types@npm:7.27.1" dependencies: @@ -1375,6 +1375,20 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-systemjs@npm:^7.29.4": + version: 7.29.4 + resolution: "@babel/plugin-transform-modules-systemjs@npm:7.29.4" + dependencies: + "@babel/helper-module-transforms": "npm:^7.28.6" + "@babel/helper-plugin-utils": "npm:^7.28.6" + "@babel/helper-validator-identifier": "npm:^7.28.5" + "@babel/traverse": "npm:^7.29.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/79269e6ec8ec831bb63bf1c7cc1a980e28da785e92b36d42612f0139e4044499b99aa109fca849e1a156c092aabf6c24d145f4cabf2ac9ea84ef468852fe4c03 + languageName: node + linkType: hard + "@babel/plugin-transform-modules-umd@npm:^7.27.1": version: 7.27.1 resolution: "@babel/plugin-transform-modules-umd@npm:7.27.1" @@ -1804,7 +1818,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-strict-mode@npm:^7.27.1": +"@babel/plugin-transform-strict-mode@npm:^7.24.7, @babel/plugin-transform-strict-mode@npm:^7.27.1": version: 7.27.1 resolution: "@babel/plugin-transform-strict-mode@npm:7.27.1" dependencies: @@ -1899,6 +1913,87 @@ __metadata: languageName: node linkType: hard +"@babel/preset-env@npm:^7.25.2": + version: 7.29.5 + resolution: "@babel/preset-env@npm:7.29.5" + dependencies: + "@babel/compat-data": "npm:^7.29.3" + "@babel/helper-compilation-targets": "npm:^7.28.6" + "@babel/helper-plugin-utils": "npm:^7.28.6" + "@babel/helper-validator-option": "npm:^7.27.1" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "npm:^7.28.5" + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "npm:^7.27.1" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.27.1" + "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array": "npm:^7.29.3" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.27.1" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "npm:^7.28.6" + "@babel/plugin-proposal-private-property-in-object": "npm:7.21.0-placeholder-for-preset-env.2" + "@babel/plugin-syntax-import-assertions": "npm:^7.28.6" + "@babel/plugin-syntax-import-attributes": "npm:^7.28.6" + "@babel/plugin-syntax-unicode-sets-regex": "npm:^7.18.6" + "@babel/plugin-transform-arrow-functions": "npm:^7.27.1" + "@babel/plugin-transform-async-generator-functions": "npm:^7.29.0" + "@babel/plugin-transform-async-to-generator": "npm:^7.28.6" + "@babel/plugin-transform-block-scoped-functions": "npm:^7.27.1" + "@babel/plugin-transform-block-scoping": "npm:^7.28.6" + "@babel/plugin-transform-class-properties": "npm:^7.28.6" + "@babel/plugin-transform-class-static-block": "npm:^7.28.6" + "@babel/plugin-transform-classes": "npm:^7.28.6" + "@babel/plugin-transform-computed-properties": "npm:^7.28.6" + "@babel/plugin-transform-destructuring": "npm:^7.28.5" + "@babel/plugin-transform-dotall-regex": "npm:^7.28.6" + "@babel/plugin-transform-duplicate-keys": "npm:^7.27.1" + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "npm:^7.29.0" + "@babel/plugin-transform-dynamic-import": "npm:^7.27.1" + "@babel/plugin-transform-explicit-resource-management": "npm:^7.28.6" + "@babel/plugin-transform-exponentiation-operator": "npm:^7.28.6" + "@babel/plugin-transform-export-namespace-from": "npm:^7.27.1" + "@babel/plugin-transform-for-of": "npm:^7.27.1" + "@babel/plugin-transform-function-name": "npm:^7.27.1" + "@babel/plugin-transform-json-strings": "npm:^7.28.6" + "@babel/plugin-transform-literals": "npm:^7.27.1" + "@babel/plugin-transform-logical-assignment-operators": "npm:^7.28.6" + "@babel/plugin-transform-member-expression-literals": "npm:^7.27.1" + "@babel/plugin-transform-modules-amd": "npm:^7.27.1" + "@babel/plugin-transform-modules-commonjs": "npm:^7.28.6" + "@babel/plugin-transform-modules-systemjs": "npm:^7.29.4" + "@babel/plugin-transform-modules-umd": "npm:^7.27.1" + "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.29.0" + "@babel/plugin-transform-new-target": "npm:^7.27.1" + "@babel/plugin-transform-nullish-coalescing-operator": "npm:^7.28.6" + "@babel/plugin-transform-numeric-separator": "npm:^7.28.6" + "@babel/plugin-transform-object-rest-spread": "npm:^7.28.6" + "@babel/plugin-transform-object-super": "npm:^7.27.1" + "@babel/plugin-transform-optional-catch-binding": "npm:^7.28.6" + "@babel/plugin-transform-optional-chaining": "npm:^7.28.6" + "@babel/plugin-transform-parameters": "npm:^7.27.7" + "@babel/plugin-transform-private-methods": "npm:^7.28.6" + "@babel/plugin-transform-private-property-in-object": "npm:^7.28.6" + "@babel/plugin-transform-property-literals": "npm:^7.27.1" + "@babel/plugin-transform-regenerator": "npm:^7.29.0" + "@babel/plugin-transform-regexp-modifiers": "npm:^7.28.6" + "@babel/plugin-transform-reserved-words": "npm:^7.27.1" + "@babel/plugin-transform-shorthand-properties": "npm:^7.27.1" + "@babel/plugin-transform-spread": "npm:^7.28.6" + "@babel/plugin-transform-sticky-regex": "npm:^7.27.1" + "@babel/plugin-transform-template-literals": "npm:^7.27.1" + "@babel/plugin-transform-typeof-symbol": "npm:^7.27.1" + "@babel/plugin-transform-unicode-escapes": "npm:^7.27.1" + "@babel/plugin-transform-unicode-property-regex": "npm:^7.28.6" + "@babel/plugin-transform-unicode-regex": "npm:^7.27.1" + "@babel/plugin-transform-unicode-sets-regex": "npm:^7.28.6" + "@babel/preset-modules": "npm:0.1.6-no-external-plugins" + babel-plugin-polyfill-corejs2: "npm:^0.4.15" + babel-plugin-polyfill-corejs3: "npm:^0.14.0" + babel-plugin-polyfill-regenerator: "npm:^0.6.6" + core-js-compat: "npm:^3.48.0" + semver: "npm:^6.3.1" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 10/2e54630764b6650d81df5ce5a47fa260acd3695dc95a6b989b713bf6c0713fb320e3ae3f76f0c636bfda058ee5c582a3de7f5d58d691c68ca566129c7d3d0f0a + languageName: node + linkType: hard + "@babel/preset-env@npm:^7.29.2, @babel/preset-env@npm:^7.29.3": version: 7.29.3 resolution: "@babel/preset-env@npm:7.29.3" @@ -2006,7 +2101,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-react@npm:^7.22.15, @babel/preset-react@npm:^7.28.5": +"@babel/preset-react@npm:^7.22.15, @babel/preset-react@npm:^7.24.7, @babel/preset-react@npm:^7.28.5": version: 7.28.5 resolution: "@babel/preset-react@npm:7.28.5" dependencies: @@ -6024,6 +6119,8 @@ __metadata: "@react-native-firebase/installations@npm:24.0.0, @react-native-firebase/installations@workspace:packages/installations": version: 0.0.0-use.local resolution: "@react-native-firebase/installations@workspace:packages/installations" + dependencies: + react-native-builder-bob: "npm:^0.40.13" peerDependencies: "@react-native-firebase/app": 24.0.0 languageName: unknown @@ -8139,7 +8236,7 @@ __metadata: languageName: node linkType: hard -"arktype@npm:^2.2.0": +"arktype@npm:^2.1.15, arktype@npm:^2.2.0": version: 2.2.0 resolution: "arktype@npm:2.2.0" dependencies: @@ -8204,6 +8301,13 @@ __metadata: languageName: node linkType: hard +"array-union@npm:^2.1.0": + version: 2.1.0 + resolution: "array-union@npm:2.1.0" + checksum: 10/5bee12395cba82da674931df6d0fea23c4aa4660cb3b338ced9f828782a65caa232573e6bf3968f23e0c5eb301764a382cef2f128b170a9dc59de0e36c39f98d + languageName: node + linkType: hard + "array.prototype.findlast@npm:^1.2.5": version: 1.2.5 resolution: "array.prototype.findlast@npm:1.2.5" @@ -8599,7 +8703,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-syntax-hermes-parser@npm:0.28.1": +"babel-plugin-syntax-hermes-parser@npm:0.28.1, babel-plugin-syntax-hermes-parser@npm:^0.28.0": version: 0.28.1 resolution: "babel-plugin-syntax-hermes-parser@npm:0.28.1" dependencies: @@ -9043,6 +9147,21 @@ __metadata: languageName: node linkType: hard +"browserslist@npm:^4.20.4, browserslist@npm:^4.28.1, browserslist@npm:^4.28.2": + version: 4.28.2 + resolution: "browserslist@npm:4.28.2" + dependencies: + baseline-browser-mapping: "npm:^2.10.12" + caniuse-lite: "npm:^1.0.30001782" + electron-to-chromium: "npm:^1.5.328" + node-releases: "npm:^2.0.36" + update-browserslist-db: "npm:^1.2.3" + bin: + browserslist: cli.js + checksum: 10/cff88386e5b5ba5614c9063bd32ef94865bba22b6a381844c7d09ea1eea62a2247e7106e516abdbfda6b75b9986044c991dfe45f92f10add5ad63dccc07589ec + languageName: node + linkType: hard + "browserslist@npm:^4.24.0, browserslist@npm:^4.25.0, browserslist@npm:^4.28.0": version: 4.28.1 resolution: "browserslist@npm:4.28.1" @@ -9058,21 +9177,6 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.28.1, browserslist@npm:^4.28.2": - version: 4.28.2 - resolution: "browserslist@npm:4.28.2" - dependencies: - baseline-browser-mapping: "npm:^2.10.12" - caniuse-lite: "npm:^1.0.30001782" - electron-to-chromium: "npm:^1.5.328" - node-releases: "npm:^2.0.36" - update-browserslist-db: "npm:^1.2.3" - bin: - browserslist: cli.js - checksum: 10/cff88386e5b5ba5614c9063bd32ef94865bba22b6a381844c7d09ea1eea62a2247e7106e516abdbfda6b75b9986044c991dfe45f92f10add5ad63dccc07589ec - languageName: node - linkType: hard - "bs-logger@npm:^0.2.6": version: 0.2.6 resolution: "bs-logger@npm:0.2.6" @@ -10763,6 +10867,13 @@ __metadata: languageName: node linkType: hard +"dedent@npm:^0.7.0": + version: 0.7.0 + resolution: "dedent@npm:0.7.0" + checksum: 10/87de191050d9a40dd70cad01159a0bcf05ecb59750951242070b6abf9569088684880d00ba92a955b4058804f16eeaf91d604f283929b4f614d181cd7ae633d2 + languageName: node + linkType: hard + "dedent@npm:^1.6.0": version: 1.7.0 resolution: "dedent@npm:1.7.0" @@ -10883,6 +10994,22 @@ __metadata: languageName: node linkType: hard +"del@npm:^6.1.1": + version: 6.1.1 + resolution: "del@npm:6.1.1" + dependencies: + globby: "npm:^11.0.1" + graceful-fs: "npm:^4.2.4" + is-glob: "npm:^4.0.1" + is-path-cwd: "npm:^2.2.0" + is-path-inside: "npm:^3.0.2" + p-map: "npm:^4.0.0" + rimraf: "npm:^3.0.2" + slash: "npm:^3.0.0" + checksum: 10/563288b73b8b19a7261c47fd21a330eeab6e2acd7c6208c49790dfd369127120dd7836cdf0c1eca216b77c94782a81507eac6b4734252d3bef2795cb366996b6 + languageName: node + linkType: hard + "del@npm:^8.0.1": version: 8.0.1 resolution: "del@npm:8.0.1" @@ -11123,6 +11250,15 @@ __metadata: languageName: node linkType: hard +"dir-glob@npm:^3.0.1": + version: 3.0.1 + resolution: "dir-glob@npm:3.0.1" + dependencies: + path-type: "npm:^4.0.0" + checksum: 10/fa05e18324510d7283f55862f3161c6759a3f2f8dbce491a2fc14c8324c498286c54282c1f0e933cb930da8419b30679389499b919122952a4f8592362ef4615 + languageName: node + linkType: hard + "discontinuous-range@npm:1.0.0": version: 1.0.0 resolution: "discontinuous-range@npm:1.0.0" @@ -12416,29 +12552,29 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.3.2": - version: 3.3.2 - resolution: "fast-glob@npm:3.3.2" +"fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.3": + version: 3.3.3 + resolution: "fast-glob@npm:3.3.3" dependencies: "@nodelib/fs.stat": "npm:^2.0.2" "@nodelib/fs.walk": "npm:^1.2.3" glob-parent: "npm:^5.1.2" merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.4" - checksum: 10/222512e9315a0efca1276af9adb2127f02105d7288fa746145bf45e2716383fb79eb983c89601a72a399a56b7c18d38ce70457c5466218c5f13fad957cee16df + micromatch: "npm:^4.0.8" + checksum: 10/dcc6432b269762dd47381d8b8358bf964d8f4f60286ac6aa41c01ade70bda459ff2001b516690b96d5365f68a49242966112b5d5cc9cd82395fa8f9d017c90ad languageName: node linkType: hard -"fast-glob@npm:^3.3.3": - version: 3.3.3 - resolution: "fast-glob@npm:3.3.3" +"fast-glob@npm:^3.3.2": + version: 3.3.2 + resolution: "fast-glob@npm:3.3.2" dependencies: "@nodelib/fs.stat": "npm:^2.0.2" "@nodelib/fs.walk": "npm:^1.2.3" glob-parent: "npm:^5.1.2" merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.8" - checksum: 10/dcc6432b269762dd47381d8b8358bf964d8f4f60286ac6aa41c01ade70bda459ff2001b516690b96d5365f68a49242966112b5d5cc9cd82395fa8f9d017c90ad + micromatch: "npm:^4.0.4" + checksum: 10/222512e9315a0efca1276af9adb2127f02105d7288fa746145bf45e2716383fb79eb983c89601a72a399a56b7c18d38ce70457c5466218c5f13fad957cee16df languageName: node linkType: hard @@ -13650,6 +13786,20 @@ __metadata: languageName: node linkType: hard +"globby@npm:^11.0.1": + version: 11.1.0 + resolution: "globby@npm:11.1.0" + dependencies: + array-union: "npm:^2.1.0" + dir-glob: "npm:^3.0.1" + fast-glob: "npm:^3.2.9" + ignore: "npm:^5.2.0" + merge2: "npm:^1.4.1" + slash: "npm:^3.0.0" + checksum: 10/288e95e310227bbe037076ea81b7c2598ccbc3122d87abc6dab39e1eec309aa14f0e366a98cdc45237ffcfcbad3db597778c0068217dcb1950fef6249104e1b1 + languageName: node + linkType: hard + "globby@npm:^14.0.2": version: 14.1.0 resolution: "globby@npm:14.1.0" @@ -14948,7 +15098,7 @@ __metadata: languageName: node linkType: hard -"is-git-dirty@npm:^2.0.2": +"is-git-dirty@npm:^2.0.1, is-git-dirty@npm:^2.0.2": version: 2.0.2 resolution: "is-git-dirty@npm:2.0.2" dependencies: @@ -15056,6 +15206,13 @@ __metadata: languageName: node linkType: hard +"is-path-cwd@npm:^2.2.0": + version: 2.2.0 + resolution: "is-path-cwd@npm:2.2.0" + checksum: 10/46a840921bb8cc0dc7b5b423a14220e7db338072a4495743a8230533ce78812dc152548c86f4b828411fe98c5451959f07cf841c6a19f611e46600bd699e8048 + languageName: node + linkType: hard + "is-path-cwd@npm:^3.0.0": version: 3.0.0 resolution: "is-path-cwd@npm:3.0.0" @@ -16433,7 +16590,7 @@ __metadata: languageName: node linkType: hard -"json5@npm:^2.2.2, json5@npm:^2.2.3": +"json5@npm:^2.2.1, json5@npm:^2.2.2, json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" bin: @@ -16617,7 +16774,7 @@ __metadata: languageName: node linkType: hard -"kleur@npm:^4.1.5": +"kleur@npm:^4.1.4, kleur@npm:^4.1.5": version: 4.1.5 resolution: "kleur@npm:4.1.5" checksum: 10/44d84cc4eedd4311099402ef6d4acd9b2d16e08e499d6ef3bb92389bd4692d7ef09e35248c26e27f98acac532122acb12a1bfee645994ae3af4f0a37996da7df @@ -17726,7 +17883,7 @@ __metadata: languageName: node linkType: hard -"merge2@npm:^1.3.0": +"merge2@npm:^1.3.0, merge2@npm:^1.4.1": version: 1.4.1 resolution: "merge2@npm:1.4.1" checksum: 10/7268db63ed5169466540b6fb947aec313200bcf6d40c5ab722c22e242f651994619bcd85601602972d3c85bd2cc45a358a4c61937e9f11a061919a1da569b0c2 @@ -20673,7 +20830,7 @@ __metadata: languageName: node linkType: hard -"p-map@npm:4.0.0": +"p-map@npm:4.0.0, p-map@npm:^4.0.0": version: 4.0.0 resolution: "p-map@npm:4.0.0" dependencies: @@ -21161,6 +21318,13 @@ __metadata: languageName: node linkType: hard +"path-type@npm:^4.0.0": + version: 4.0.0 + resolution: "path-type@npm:4.0.0" + checksum: 10/5b1e2daa247062061325b8fdbfd1fb56dde0a448fb1455453276ea18c60685bdad23a445dc148cf87bc216be1573357509b7d4060494a6fd768c7efad833ee45 + languageName: node + linkType: hard + "path-type@npm:^6.0.0": version: 6.0.0 resolution: "path-type@npm:6.0.0" @@ -21976,6 +22140,38 @@ __metadata: languageName: node linkType: hard +"react-native-builder-bob@npm:^0.40.13": + version: 0.40.18 + resolution: "react-native-builder-bob@npm:0.40.18" + dependencies: + "@babel/core": "npm:^7.25.2" + "@babel/plugin-transform-flow-strip-types": "npm:^7.26.5" + "@babel/plugin-transform-strict-mode": "npm:^7.24.7" + "@babel/preset-env": "npm:^7.25.2" + "@babel/preset-react": "npm:^7.24.7" + "@babel/preset-typescript": "npm:^7.24.7" + arktype: "npm:^2.1.15" + babel-plugin-syntax-hermes-parser: "npm:^0.28.0" + browserslist: "npm:^4.20.4" + cross-spawn: "npm:^7.0.3" + dedent: "npm:^0.7.0" + del: "npm:^6.1.1" + escape-string-regexp: "npm:^4.0.0" + fs-extra: "npm:^10.1.0" + glob: "npm:^10.5.0" + is-git-dirty: "npm:^2.0.1" + json5: "npm:^2.2.1" + kleur: "npm:^4.1.4" + prompts: "npm:^2.4.2" + react-native-monorepo-config: "npm:^0.3.3" + which: "npm:^2.0.2" + yargs: "npm:^17.5.1" + bin: + bob: bin/bob + checksum: 10/06eddba046a508dff0aa322c823fa57a280e2ed6a6f586de2114ebc11b6bb7863714eaaff8e93d681bb851fb4f9e792b102541211847f0e546f4e9546df6c3de + languageName: node + linkType: hard + "react-native-builder-bob@npm:^0.41.0": version: 0.41.0 resolution: "react-native-builder-bob@npm:0.41.0" @@ -26230,7 +26426,7 @@ __metadata: languageName: node linkType: hard -"which@npm:^2.0.1": +"which@npm:^2.0.1, which@npm:^2.0.2": version: 2.0.2 resolution: "which@npm:2.0.2" dependencies: @@ -26637,7 +26833,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:17.7.2, yargs@npm:^17.0.0, yargs@npm:^17.6.2, yargs@npm:^17.7.2": +"yargs@npm:17.7.2, yargs@npm:^17.0.0, yargs@npm:^17.5.1, yargs@npm:^17.6.2, yargs@npm:^17.7.2": version: 17.7.2 resolution: "yargs@npm:17.7.2" dependencies: