@react-native-firebase/app-distribution 25.0.1 → 26.0.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/RNFBAppDistribution.podspec +7 -6
  3. package/android/build.gradle +19 -0
  4. package/android/src/main/java/io/invertase/firebase/appdistribution/{ReactNativeFirebaseAppDistributionModule.java → NativeRNFBTurboAppDistribution.java} +14 -17
  5. package/android/src/main/java/io/invertase/firebase/appdistribution/ReactNativeFirebaseAppDistributionPackage.java +1 -1
  6. package/android/src/main/java/io/invertase/firebase/appdistribution/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboAppDistributionSpec.java +50 -0
  7. package/android/src/main/java/io/invertase/firebase/appdistribution/generated/jni/CMakeLists.txt +36 -0
  8. package/android/src/main/java/io/invertase/firebase/appdistribution/generated/jni/RNFBAppDistributionTurboModules-generated.cpp +50 -0
  9. package/android/src/main/java/io/invertase/firebase/appdistribution/generated/jni/RNFBAppDistributionTurboModules.h +31 -0
  10. package/android/src/main/java/io/invertase/firebase/appdistribution/generated/jni/react/renderer/components/RNFBAppDistributionTurboModules/RNFBAppDistributionTurboModulesJSI-generated.cpp +44 -0
  11. package/android/src/main/java/io/invertase/firebase/appdistribution/generated/jni/react/renderer/components/RNFBAppDistributionTurboModules/RNFBAppDistributionTurboModulesJSI.h +166 -0
  12. package/app.plugin.js +1 -1
  13. package/dist/module/index.js +63 -3
  14. package/dist/module/index.js.map +1 -1
  15. package/dist/module/version.js +1 -1
  16. package/dist/typescript/lib/index.d.ts +12 -4
  17. package/dist/typescript/lib/index.d.ts.map +1 -1
  18. package/dist/typescript/lib/types/internal.d.ts +5 -8
  19. package/dist/typescript/lib/types/internal.d.ts.map +1 -1
  20. package/dist/typescript/lib/version.d.ts +1 -1
  21. package/ios/RNFBAppDistribution/RNFBAppDistributionModule.h +2 -3
  22. package/ios/RNFBAppDistribution/{RNFBAppDistributionModule.m → RNFBAppDistributionModule.mm} +12 -20
  23. package/ios/RNFBAppDistribution.xcodeproj/project.pbxproj +8 -8
  24. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  25. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  26. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  27. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  28. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  29. package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
  30. package/ios/generated/RNFBAppDistributionTurboModules/RNFBAppDistributionTurboModules-generated.mm +60 -0
  31. package/ios/generated/RNFBAppDistributionTurboModules/RNFBAppDistributionTurboModules.h +69 -0
  32. package/ios/generated/RNFBAppDistributionTurboModulesJSI-generated.cpp +44 -0
  33. package/ios/generated/RNFBAppDistributionTurboModulesJSI.h +166 -0
  34. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  35. package/lib/index.ts +93 -5
  36. package/lib/types/internal.ts +5 -10
  37. package/lib/version.ts +1 -1
  38. package/package.json +30 -5
  39. package/plugin/build/app.plugin.d.ts +2 -0
  40. package/plugin/build/app.plugin.js +6 -0
  41. package/plugin/src/app.plugin.ts +3 -0
  42. package/plugin/tsconfig.tsbuildinfo +1 -1
  43. package/react-native.config.js +10 -0
  44. package/specs/NativeRNFBTurboAppDistribution.ts +19 -0
  45. package/dist/module/modular.js +0 -43
  46. package/dist/module/modular.js.map +0 -1
  47. package/dist/module/namespaced.js +0 -73
  48. package/dist/module/namespaced.js.map +0 -1
  49. package/dist/module/types/namespaced.js +0 -10
  50. package/dist/module/types/namespaced.js.map +0 -1
  51. package/dist/typescript/lib/modular.d.ts +0 -9
  52. package/dist/typescript/lib/modular.d.ts.map +0 -1
  53. package/dist/typescript/lib/namespaced.d.ts +0 -7
  54. package/dist/typescript/lib/namespaced.d.ts.map +0 -1
  55. package/dist/typescript/lib/types/namespaced.d.ts +0 -55
  56. package/dist/typescript/lib/types/namespaced.d.ts.map +0 -1
  57. package/lib/modular.ts +0 -54
  58. package/lib/namespaced.ts +0 -103
  59. package/lib/types/namespaced.ts +0 -64
@@ -1,55 +0,0 @@
1
- import type { ReactNativeFirebase } from '@react-native-firebase/app';
2
- /**
3
- * @deprecated Use the exported types directly instead.
4
- * FirebaseAppDistributionTypes namespace is kept for backwards compatibility.
5
- */
6
- export declare namespace FirebaseAppDistributionTypes {
7
- /**
8
- * @deprecated Use the exported `AppDistributionRelease` type instead.
9
- */
10
- interface AppDistributionRelease {
11
- /** @deprecated Use the exported `AppDistributionRelease` type instead. */
12
- displayVersion: string;
13
- /** @deprecated Use the exported `AppDistributionRelease` type instead. */
14
- buildVersion: string;
15
- /** @deprecated Use the exported `AppDistributionRelease` type instead. */
16
- releaseNotes: string | null;
17
- /** @deprecated Use the exported `AppDistributionRelease` type instead. */
18
- downloadURL: string;
19
- /** @deprecated Use the exported `AppDistributionRelease` type instead. */
20
- isExpired: boolean;
21
- }
22
- /**
23
- * @deprecated Use the default export statics instead.
24
- */
25
- interface Statics {
26
- /** @deprecated Use the default export statics instead. */
27
- SDK_VERSION: string;
28
- }
29
- /**
30
- * @deprecated Use the exported `AppDistribution` type instead.
31
- */
32
- interface Module extends ReactNativeFirebase.FirebaseModule {
33
- /** @deprecated Use the exported `AppDistribution` type instead. */
34
- app: ReactNativeFirebase.FirebaseApp;
35
- /** @deprecated Use the exported `AppDistribution` type instead. */
36
- isTesterSignedIn(): Promise<boolean>;
37
- /** @deprecated Use the exported `AppDistribution` type instead. */
38
- signInTester(): Promise<void>;
39
- /** @deprecated Use the exported `AppDistribution` type instead. */
40
- checkForUpdate(): Promise<AppDistributionRelease>;
41
- /** @deprecated Use the exported `AppDistribution` type instead. */
42
- signOutTester(): Promise<void>;
43
- }
44
- }
45
- declare module '@react-native-firebase/app' {
46
- namespace ReactNativeFirebase {
47
- interface Module {
48
- appDistribution: FirebaseModuleWithStaticsAndApp<FirebaseAppDistributionTypes.Module, FirebaseAppDistributionTypes.Statics>;
49
- }
50
- interface FirebaseApp {
51
- appDistribution(): FirebaseAppDistributionTypes.Module;
52
- }
53
- }
54
- }
55
- //# sourceMappingURL=namespaced.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"namespaced.d.ts","sourceRoot":"","sources":["../../../../lib/types/namespaced.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE;;;GAGG;AAEH,yBAAiB,4BAA4B,CAAC;IAC5C;;OAEG;IACH,UAAiB,sBAAsB;QACrC,0EAA0E;QAC1E,cAAc,EAAE,MAAM,CAAC;QACvB,0EAA0E;QAC1E,YAAY,EAAE,MAAM,CAAC;QACrB,0EAA0E;QAC1E,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,0EAA0E;QAC1E,WAAW,EAAE,MAAM,CAAC;QACpB,0EAA0E;QAC1E,SAAS,EAAE,OAAO,CAAC;KACpB;IAED;;OAEG;IACH,UAAiB,OAAO;QACtB,0DAA0D;QAC1D,WAAW,EAAE,MAAM,CAAC;KACrB;IAED;;OAEG;IACH,UAAiB,MAAO,SAAQ,mBAAmB,CAAC,cAAc;QAChE,mEAAmE;QACnE,GAAG,EAAE,mBAAmB,CAAC,WAAW,CAAC;QACrC,mEAAmE;QACnE,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;QACrC,mEAAmE;QACnE,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;QAC9B,mEAAmE;QACnE,cAAc,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAAC;QAClD,mEAAmE;QACnE,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;KAChC;CACF;AAED,OAAO,QAAQ,4BAA4B,CAAC;IAC1C,UAAU,mBAAmB,CAAC;QAC5B,UAAU,MAAM;YACd,eAAe,EAAE,+BAA+B,CAC9C,4BAA4B,CAAC,MAAM,EACnC,4BAA4B,CAAC,OAAO,CACrC,CAAC;SACH;QAED,UAAU,WAAW;YACnB,eAAe,IAAI,4BAA4B,CAAC,MAAM,CAAC;SACxD;KACF;CACF"}
package/lib/modular.ts DELETED
@@ -1,54 +0,0 @@
1
- /*
2
- * Copyright (c) 2016-present Invertase Limited & Contributors
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this library except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- *
16
- */
17
-
18
- import { getApp } from '@react-native-firebase/app';
19
- import type { ReactNativeFirebase } from '@react-native-firebase/app';
20
- import { MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/dist/module/common';
21
- import type { AppDistribution, AppDistributionRelease } from './types/app-distribution';
22
- import type { AppDistributionWithDeprecationArg } from './types/internal';
23
-
24
- export type FirebaseAppDistribution = AppDistribution;
25
-
26
- function ap(appDistribution: FirebaseAppDistribution): AppDistributionWithDeprecationArg {
27
- return appDistribution as AppDistributionWithDeprecationArg;
28
- }
29
-
30
- export function getAppDistribution(app?: ReactNativeFirebase.FirebaseApp): FirebaseAppDistribution {
31
- if (app) {
32
- return getApp(app.name).appDistribution();
33
- }
34
-
35
- return getApp().appDistribution();
36
- }
37
-
38
- export function isTesterSignedIn(appDistribution: FirebaseAppDistribution): Promise<boolean> {
39
- return ap(appDistribution).isTesterSignedIn.call(appDistribution, MODULAR_DEPRECATION_ARG);
40
- }
41
-
42
- export function signInTester(appDistribution: FirebaseAppDistribution): Promise<void> {
43
- return ap(appDistribution).signInTester.call(appDistribution, MODULAR_DEPRECATION_ARG);
44
- }
45
-
46
- export function checkForUpdate(
47
- appDistribution: FirebaseAppDistribution,
48
- ): Promise<AppDistributionRelease> {
49
- return ap(appDistribution).checkForUpdate.call(appDistribution, MODULAR_DEPRECATION_ARG);
50
- }
51
-
52
- export function signOutTester(appDistribution: FirebaseAppDistribution): Promise<void> {
53
- return ap(appDistribution).signOutTester.call(appDistribution, MODULAR_DEPRECATION_ARG);
54
- }
package/lib/namespaced.ts DELETED
@@ -1,103 +0,0 @@
1
- /*
2
- * Copyright (c) 2016-present Invertase Limited & Contributors
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this library except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- *
16
- */
17
-
18
- import type { ReactNativeFirebase } from '@react-native-firebase/app';
19
- import { isIOS } from '@react-native-firebase/app/dist/module/common';
20
- import {
21
- createModuleNamespace,
22
- FirebaseModule,
23
- getFirebaseRoot,
24
- } from '@react-native-firebase/app/dist/module/internal';
25
- import { Platform } from 'react-native';
26
- import type { AppDistributionRelease } from './types/app-distribution';
27
- import type { FirebaseAppDistributionTypes } from './types/namespaced';
28
- import { version } from './version';
29
-
30
- const statics = {};
31
-
32
- const namespace = 'appDistribution';
33
-
34
- const nativeModuleName = 'RNFBAppDistributionModule';
35
-
36
- function rejectUnsupportedPlatform<T>(): Promise<T> {
37
- return Promise.reject(
38
- new Error(`App Distribution is not supported on the ${Platform.OS} platform.`),
39
- );
40
- }
41
-
42
- class FirebaseAppDistributionModule extends FirebaseModule<typeof nativeModuleName> {
43
- isTesterSignedIn(): Promise<boolean> {
44
- if (isIOS) {
45
- return this.native.isTesterSignedIn();
46
- }
47
-
48
- return rejectUnsupportedPlatform();
49
- }
50
-
51
- signInTester(): Promise<void> {
52
- if (isIOS) {
53
- return this.native.signInTester();
54
- }
55
-
56
- return rejectUnsupportedPlatform();
57
- }
58
-
59
- checkForUpdate(): Promise<AppDistributionRelease> {
60
- if (isIOS) {
61
- return this.native.checkForUpdate();
62
- }
63
-
64
- return rejectUnsupportedPlatform();
65
- }
66
-
67
- signOutTester(): Promise<void> {
68
- if (isIOS) {
69
- return this.native.signOutTester();
70
- }
71
-
72
- return rejectUnsupportedPlatform();
73
- }
74
- }
75
-
76
- export const SDK_VERSION = version;
77
-
78
- const appDistributionNamespace = createModuleNamespace({
79
- statics,
80
- version,
81
- namespace,
82
- nativeModuleName,
83
- nativeEvents: false,
84
- hasMultiAppSupport: false,
85
- hasCustomUrlOrRegionSupport: false,
86
- ModuleClass: FirebaseAppDistributionModule,
87
- }) as unknown as ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<
88
- FirebaseAppDistributionTypes.Module,
89
- FirebaseAppDistributionTypes.Statics
90
- >;
91
-
92
- export default appDistributionNamespace;
93
-
94
- // import appDistribution, { firebase } from '@react-native-firebase/app-distribution';
95
- // appDistribution().X(...);
96
- // firebase.appDistribution().X(...);
97
- export const firebase =
98
- getFirebaseRoot() as unknown as ReactNativeFirebase.FirebaseNamespacedExport<
99
- 'appDistribution',
100
- FirebaseAppDistributionTypes.Module,
101
- FirebaseAppDistributionTypes.Statics,
102
- false
103
- >;
@@ -1,64 +0,0 @@
1
- import type { ReactNativeFirebase } from '@react-native-firebase/app';
2
-
3
- /**
4
- * @deprecated Use the exported types directly instead.
5
- * FirebaseAppDistributionTypes namespace is kept for backwards compatibility.
6
- */
7
- /* eslint-disable @typescript-eslint/no-namespace */
8
- export namespace FirebaseAppDistributionTypes {
9
- /**
10
- * @deprecated Use the exported `AppDistributionRelease` type instead.
11
- */
12
- export interface AppDistributionRelease {
13
- /** @deprecated Use the exported `AppDistributionRelease` type instead. */
14
- displayVersion: string;
15
- /** @deprecated Use the exported `AppDistributionRelease` type instead. */
16
- buildVersion: string;
17
- /** @deprecated Use the exported `AppDistributionRelease` type instead. */
18
- releaseNotes: string | null;
19
- /** @deprecated Use the exported `AppDistributionRelease` type instead. */
20
- downloadURL: string;
21
- /** @deprecated Use the exported `AppDistributionRelease` type instead. */
22
- isExpired: boolean;
23
- }
24
-
25
- /**
26
- * @deprecated Use the default export statics instead.
27
- */
28
- export interface Statics {
29
- /** @deprecated Use the default export statics instead. */
30
- SDK_VERSION: string;
31
- }
32
-
33
- /**
34
- * @deprecated Use the exported `AppDistribution` type instead.
35
- */
36
- export interface Module extends ReactNativeFirebase.FirebaseModule {
37
- /** @deprecated Use the exported `AppDistribution` type instead. */
38
- app: ReactNativeFirebase.FirebaseApp;
39
- /** @deprecated Use the exported `AppDistribution` type instead. */
40
- isTesterSignedIn(): Promise<boolean>;
41
- /** @deprecated Use the exported `AppDistribution` type instead. */
42
- signInTester(): Promise<void>;
43
- /** @deprecated Use the exported `AppDistribution` type instead. */
44
- checkForUpdate(): Promise<AppDistributionRelease>;
45
- /** @deprecated Use the exported `AppDistribution` type instead. */
46
- signOutTester(): Promise<void>;
47
- }
48
- }
49
-
50
- declare module '@react-native-firebase/app' {
51
- namespace ReactNativeFirebase {
52
- interface Module {
53
- appDistribution: FirebaseModuleWithStaticsAndApp<
54
- FirebaseAppDistributionTypes.Module,
55
- FirebaseAppDistributionTypes.Statics
56
- >;
57
- }
58
-
59
- interface FirebaseApp {
60
- appDistribution(): FirebaseAppDistributionTypes.Module;
61
- }
62
- }
63
- }
64
- /* eslint-enable @typescript-eslint/no-namespace */