@react-native-firebase/remote-config 24.1.0 → 25.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.
- package/CHANGELOG.md +33 -0
- package/android/src/reactnative/java/io/invertase/firebase/config/ReactNativeFirebaseConfigModule.java +11 -5
- package/dist/module/RemoteConfigValue.js +53 -0
- package/dist/module/RemoteConfigValue.js.map +1 -0
- package/dist/module/index.js +27 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/modular.js +155 -0
- package/dist/module/modular.js.map +1 -0
- package/dist/module/namespaced.js +400 -0
- package/dist/module/namespaced.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/{lib → dist/module}/polyfills.js +26 -11
- package/dist/module/polyfills.js.map +1 -0
- package/dist/module/polyfills.web.js +3 -0
- package/dist/module/polyfills.web.js.map +1 -0
- package/{lib → dist/module}/statics.js +5 -3
- package/dist/module/statics.js.map +1 -0
- package/dist/module/types/internal.js +4 -0
- package/dist/module/types/internal.js.map +1 -0
- package/dist/module/types/namespaced.js +24 -0
- package/dist/module/types/namespaced.js.map +1 -0
- package/dist/module/types/remote-config.js +4 -0
- package/dist/module/types/remote-config.js.map +1 -0
- package/dist/module/version.js +5 -0
- package/dist/module/version.js.map +1 -0
- package/dist/module/web/RNFBConfigModule.android.js +6 -0
- package/dist/module/web/RNFBConfigModule.android.js.map +1 -0
- package/dist/module/web/RNFBConfigModule.ios.js +6 -0
- package/dist/module/web/RNFBConfigModule.ios.js.map +1 -0
- package/{lib → dist/module}/web/RNFBConfigModule.js +69 -77
- package/dist/module/web/RNFBConfigModule.js.map +1 -0
- package/dist/typescript/lib/RemoteConfigValue.d.ts +16 -0
- package/dist/typescript/lib/RemoteConfigValue.d.ts.map +1 -0
- package/dist/typescript/lib/index.d.ts +6 -0
- package/dist/typescript/lib/index.d.ts.map +1 -0
- package/dist/typescript/lib/modular.d.ts +76 -0
- package/dist/typescript/lib/modular.d.ts.map +1 -0
- package/dist/typescript/lib/namespaced.d.ts +11 -0
- package/dist/typescript/lib/namespaced.d.ts.map +1 -0
- package/dist/typescript/lib/polyfills.d.ts +2 -0
- package/dist/typescript/lib/polyfills.d.ts.map +1 -0
- package/dist/typescript/lib/polyfills.web.d.ts +1 -0
- package/dist/typescript/lib/polyfills.web.d.ts.map +1 -0
- package/dist/typescript/lib/statics.d.ts +12 -0
- package/dist/typescript/lib/statics.d.ts.map +1 -0
- package/dist/typescript/lib/types/internal.d.ts +94 -0
- package/dist/typescript/lib/types/internal.d.ts.map +1 -0
- package/dist/typescript/lib/types/namespaced.d.ts +124 -0
- package/dist/typescript/lib/types/namespaced.d.ts.map +1 -0
- package/dist/typescript/lib/types/remote-config.d.ts +37 -0
- package/dist/typescript/lib/types/remote-config.d.ts.map +1 -0
- package/dist/typescript/lib/version.d.ts +2 -0
- package/dist/typescript/lib/version.d.ts.map +1 -0
- package/dist/typescript/lib/web/RNFBConfigModule.android.d.ts +3 -0
- package/dist/typescript/lib/web/RNFBConfigModule.android.d.ts.map +1 -0
- package/dist/typescript/lib/web/RNFBConfigModule.d.ts +17 -0
- package/dist/typescript/lib/web/RNFBConfigModule.d.ts.map +1 -0
- package/dist/typescript/lib/web/RNFBConfigModule.ios.d.ts +3 -0
- package/dist/typescript/lib/web/RNFBConfigModule.ios.d.ts.map +1 -0
- package/dist/typescript/package.json +1 -0
- package/ios/RNFBConfig/RNFBConfigModule.m +10 -4
- package/lib/RemoteConfigValue.ts +66 -0
- package/lib/index.ts +25 -0
- package/lib/modular.ts +197 -0
- package/lib/namespaced.ts +552 -0
- package/lib/polyfills.ts +54 -0
- package/lib/statics.ts +27 -0
- package/lib/types/internal.ts +165 -0
- package/lib/types/namespaced.ts +163 -0
- package/lib/types/remote-config.ts +63 -0
- package/lib/version.ts +2 -0
- package/lib/web/RNFBConfigModule.android.ts +4 -0
- package/lib/web/RNFBConfigModule.ios.ts +4 -0
- package/lib/web/RNFBConfigModule.ts +254 -0
- package/package.json +42 -9
- package/tsconfig.json +21 -0
- package/typedoc.json +2 -3
- package/lib/RemoteConfigValue.js +0 -51
- package/lib/index.d.ts +0 -659
- package/lib/index.js +0 -400
- package/lib/modular/index.d.ts +0 -265
- package/lib/modular/index.js +0 -289
- package/lib/version.js +0 -2
- package/lib/web/RNFBConfigModule.android.js +0 -2
- package/lib/web/RNFBConfigModule.ios.js +0 -2
- /package/lib/{polyfills.web.js → polyfills.web.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-firebase/remote-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
|
5
5
|
"description": "React Native Firebase - React Native Firebase provides native integration with Remote Config, allowing you to change the appearance and/or functionality of your app without requiring an app update.",
|
|
6
|
-
"main": "
|
|
7
|
-
"types": "lib/index.d.ts",
|
|
6
|
+
"main": "./dist/module/index.js",
|
|
7
|
+
"types": "./dist/typescript/lib/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build": "genversion --semi lib/version.
|
|
9
|
+
"build": "genversion --esm --semi lib/version.ts",
|
|
10
10
|
"build:clean": "rimraf android/build && rimraf ios/build",
|
|
11
|
-
"
|
|
11
|
+
"compile": "bob build",
|
|
12
|
+
"prepare": "yarn run build && yarn compile"
|
|
12
13
|
},
|
|
13
14
|
"repository": {
|
|
14
15
|
"type": "git",
|
|
@@ -24,8 +25,8 @@
|
|
|
24
25
|
"remote-config"
|
|
25
26
|
],
|
|
26
27
|
"peerDependencies": {
|
|
27
|
-
"@react-native-firebase/analytics": "
|
|
28
|
-
"@react-native-firebase/app": "
|
|
28
|
+
"@react-native-firebase/analytics": "25.0.0",
|
|
29
|
+
"@react-native-firebase/app": "25.0.0"
|
|
29
30
|
},
|
|
30
31
|
"publishConfig": {
|
|
31
32
|
"access": "public",
|
|
@@ -37,7 +38,39 @@
|
|
|
37
38
|
"web-streams-polyfill": "^4.2.0"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"@types/text-encoding": "^0.0.40"
|
|
41
|
+
"@types/text-encoding": "^0.0.40",
|
|
42
|
+
"react-native-builder-bob": "^0.41.0",
|
|
43
|
+
"typescript": "^6.0.3"
|
|
41
44
|
},
|
|
42
|
-
"
|
|
45
|
+
"exports": {
|
|
46
|
+
".": {
|
|
47
|
+
"source": "./lib/index.ts",
|
|
48
|
+
"types": "./dist/typescript/lib/index.d.ts",
|
|
49
|
+
"default": "./dist/module/index.js"
|
|
50
|
+
},
|
|
51
|
+
"./package.json": "./package.json"
|
|
52
|
+
},
|
|
53
|
+
"react-native-builder-bob": {
|
|
54
|
+
"source": "lib",
|
|
55
|
+
"output": "dist",
|
|
56
|
+
"targets": [
|
|
57
|
+
[
|
|
58
|
+
"module",
|
|
59
|
+
{
|
|
60
|
+
"esm": true
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
[
|
|
64
|
+
"typescript",
|
|
65
|
+
{
|
|
66
|
+
"tsc": "../../node_modules/.bin/tsc"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"eslintIgnore": [
|
|
72
|
+
"node_modules/",
|
|
73
|
+
"dist/"
|
|
74
|
+
],
|
|
75
|
+
"gitHead": "eac5bf5f3c80b158bf85b33789e4b64bfd16bbe1"
|
|
43
76
|
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.packages.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"rootDir": ".",
|
|
5
|
+
"paths": {
|
|
6
|
+
"@react-native-firebase/app/dist/module/common/*": ["../app/dist/typescript/lib/common/*"],
|
|
7
|
+
"@react-native-firebase/app/dist/module/common": ["../app/dist/typescript/lib/common"],
|
|
8
|
+
"@react-native-firebase/app/dist/module/internal/web/*": [
|
|
9
|
+
"../app/dist/typescript/lib/internal/web/*"
|
|
10
|
+
],
|
|
11
|
+
"@react-native-firebase/app/dist/module/internal/*": [
|
|
12
|
+
"../app/dist/typescript/lib/internal/*"
|
|
13
|
+
],
|
|
14
|
+
"@react-native-firebase/app/dist/module/internal": ["../app/dist/typescript/lib/internal"],
|
|
15
|
+
"@react-native-firebase/app": ["../app/dist/typescript/lib"]
|
|
16
|
+
},
|
|
17
|
+
"types": ["react-native", "node"]
|
|
18
|
+
},
|
|
19
|
+
"include": ["lib/**/*.ts"],
|
|
20
|
+
"exclude": ["node_modules", "dist", "__tests__", "**/*.test.ts"]
|
|
21
|
+
}
|
package/typedoc.json
CHANGED
package/lib/RemoteConfigValue.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// as per firebase web sdk specification
|
|
2
|
-
const BOOL_VALUES = ['1', 'true', 't', 'yes', 'y', 'on'];
|
|
3
|
-
|
|
4
|
-
export default class ConfigValue {
|
|
5
|
-
constructor({ value, source }) {
|
|
6
|
-
this._value = value;
|
|
7
|
-
this._source = source;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
get value() {
|
|
11
|
-
// eslint-disable-next-line no-console
|
|
12
|
-
console.warn(
|
|
13
|
-
'firebase.remoteConfig().getValue(*).value has been removed. Please use one of the alternative methods such as firebase.remoteConfig().getValue(*).asString()',
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
get source() {
|
|
18
|
-
// eslint-disable-next-line no-console
|
|
19
|
-
console.warn(
|
|
20
|
-
'firebase.remoteConfig().getValue(*).source has been removed. Please use firebase.remoteConfig().getValue(*).getSource()',
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
asBoolean() {
|
|
25
|
-
if (this._source === 'static') {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
return BOOL_VALUES.includes(this._value.toLowerCase());
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
asNumber() {
|
|
32
|
-
if (this._source === 'static') {
|
|
33
|
-
return 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
let num = Number(this._value);
|
|
37
|
-
|
|
38
|
-
if (isNaN(num)) {
|
|
39
|
-
num = 0;
|
|
40
|
-
}
|
|
41
|
-
return num;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
asString() {
|
|
45
|
-
return this._value;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
getSource() {
|
|
49
|
-
return this._source;
|
|
50
|
-
}
|
|
51
|
-
}
|