react-native-purchases-store-galaxy 10.3.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/LICENSE +1 -0
- package/README.md +14 -0
- package/android/build.gradle +76 -0
- package/android/gradle.properties +3 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/java/com/revenuecat/purchases/react/storegalaxy/RevenueCatStoreGalaxyPackage.java +26 -0
- package/lib/commonjs/index.js +12 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -0
- package/lib/typescript/src/index.d.ts +14 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +120 -0
- package/src/index.ts +18 -0
package/LICENSE
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
MIT
|
package/README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# React Native Purchases Store Galaxy
|
|
2
|
+
|
|
3
|
+
Galaxy Store add-on for `react-native-purchases`.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import Purchases from "react-native-purchases";
|
|
7
|
+
import { GALAXY_BILLING_MODE } from "react-native-purchases-store-galaxy";
|
|
8
|
+
|
|
9
|
+
Purchases.configure({
|
|
10
|
+
apiKey: "galx_XYZ",
|
|
11
|
+
store: "GALAXY",
|
|
12
|
+
galaxyBillingMode: GALAXY_BILLING_MODE.TEST,
|
|
13
|
+
});
|
|
14
|
+
```
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
buildscript {
|
|
2
|
+
repositories {
|
|
3
|
+
google()
|
|
4
|
+
mavenCentral()
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
dependencies {
|
|
8
|
+
classpath "com.android.tools.build:gradle:8.13.2"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
def isNewArchitectureEnabled() {
|
|
13
|
+
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
apply plugin: "com.android.library"
|
|
17
|
+
|
|
18
|
+
if (isNewArchitectureEnabled()) {
|
|
19
|
+
apply plugin: "com.facebook.react"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
def getExtOrIntegerDefault(name) {
|
|
23
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["PurchasesStoreGalaxy_" + name]).toInteger()
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
def supportsNamespace() {
|
|
27
|
+
def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
|
|
28
|
+
def major = parsed[0].toInteger()
|
|
29
|
+
def minor = parsed[1].toInteger()
|
|
30
|
+
|
|
31
|
+
// Namespace support was added in 7.3.0
|
|
32
|
+
return (major == 7 && minor >= 3) || major >= 8
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
android {
|
|
36
|
+
if (supportsNamespace()) {
|
|
37
|
+
namespace "com.revenuecat.purchases.react.storegalaxy"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
|
|
41
|
+
|
|
42
|
+
defaultConfig {
|
|
43
|
+
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
|
|
44
|
+
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
|
|
45
|
+
versionCode 1
|
|
46
|
+
versionName '10.3.0'
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
buildTypes {
|
|
50
|
+
release {
|
|
51
|
+
minifyEnabled false
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
lintOptions {
|
|
56
|
+
disable "GradleCompatible"
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
compileOptions {
|
|
60
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
61
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
repositories {
|
|
66
|
+
mavenCentral()
|
|
67
|
+
google()
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
dependencies {
|
|
71
|
+
// For < 0.71, this will be from the local maven repo
|
|
72
|
+
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
73
|
+
//noinspection GradleDynamicVersion
|
|
74
|
+
implementation "com.facebook.react:react-native:+"
|
|
75
|
+
implementation 'com.revenuecat.purchases:purchases-hybrid-common-store-galaxy:18.14.1'
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
package com.revenuecat.purchases.react.storegalaxy;
|
|
2
|
+
|
|
3
|
+
import androidx.annotation.NonNull;
|
|
4
|
+
|
|
5
|
+
import com.facebook.react.ReactPackage;
|
|
6
|
+
import com.facebook.react.bridge.NativeModule;
|
|
7
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
8
|
+
import com.facebook.react.uimanager.ViewManager;
|
|
9
|
+
|
|
10
|
+
import java.util.Collections;
|
|
11
|
+
import java.util.List;
|
|
12
|
+
|
|
13
|
+
public class RevenueCatStoreGalaxyPackage implements ReactPackage {
|
|
14
|
+
|
|
15
|
+
@NonNull
|
|
16
|
+
@Override
|
|
17
|
+
public List<NativeModule> createNativeModules(@NonNull ReactApplicationContext reactContext) {
|
|
18
|
+
return Collections.emptyList();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@NonNull
|
|
22
|
+
@Override
|
|
23
|
+
public List<ViewManager> createViewManagers(@NonNull ReactApplicationContext reactContext) {
|
|
24
|
+
return Collections.emptyList();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GALAXY_BILLING_MODE = void 0;
|
|
7
|
+
const GALAXY_BILLING_MODE = exports.GALAXY_BILLING_MODE = {
|
|
8
|
+
PRODUCTION: "PRODUCTION",
|
|
9
|
+
TEST: "TEST",
|
|
10
|
+
ALWAYS_FAIL: "ALWAYS_FAIL"
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GALAXY_BILLING_MODE","exports","PRODUCTION","TEST","ALWAYS_FAIL"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;AAEO,MAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EACjCE,UAAU,EAAE,YAAY;EACxBC,IAAI,EAAE,MAAM;EACZC,WAAW,EAAE;AACf,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GALAXY_BILLING_MODE","PRODUCTION","TEST","ALWAYS_FAIL"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAEA,OAAO,MAAMA,mBAAmB,GAAG;EACjCC,UAAU,EAAE,YAAY;EACxBC,IAAI,EAAE,MAAM;EACZC,WAAW,EAAE;AACf,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const GALAXY_BILLING_MODE: {
|
|
2
|
+
readonly PRODUCTION: "PRODUCTION";
|
|
3
|
+
readonly TEST: "TEST";
|
|
4
|
+
readonly ALWAYS_FAIL: "ALWAYS_FAIL";
|
|
5
|
+
};
|
|
6
|
+
export type GalaxyBillingMode = (typeof GALAXY_BILLING_MODE)[keyof typeof GALAXY_BILLING_MODE];
|
|
7
|
+
declare module "react-native-purchases" {
|
|
8
|
+
interface ConfigurationsByStore {
|
|
9
|
+
GALAXY: {
|
|
10
|
+
galaxyBillingMode?: GalaxyBillingMode;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE,OAAO,QAAQ,wBAAwB,CAAC;IACtC,UAAU,qBAAqB;QAC7B,MAAM,EAAE;YACN,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;SACvC,CAAC;KACH;CACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-native-purchases-store-galaxy",
|
|
3
|
+
"title": "React Native Purchases Store Galaxy",
|
|
4
|
+
"version": "10.3.0",
|
|
5
|
+
"description": "Galaxy Store add-on for React Native Purchases.",
|
|
6
|
+
"main": "lib/commonjs/index",
|
|
7
|
+
"module": "lib/module/index",
|
|
8
|
+
"types": "lib/typescript/src/index.d.ts",
|
|
9
|
+
"react-native": "src/index",
|
|
10
|
+
"source": "src/index",
|
|
11
|
+
"files": [
|
|
12
|
+
"src",
|
|
13
|
+
"lib",
|
|
14
|
+
"android",
|
|
15
|
+
"!android/build",
|
|
16
|
+
"!android/gradle",
|
|
17
|
+
"!android/gradlew",
|
|
18
|
+
"!android/gradlew.bat",
|
|
19
|
+
"!android/local.properties",
|
|
20
|
+
"!**/__tests__",
|
|
21
|
+
"!**/__fixtures__",
|
|
22
|
+
"!**/__mocks__",
|
|
23
|
+
"!**/.*"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"test": "jest",
|
|
27
|
+
"typecheck": "tsc --noEmit",
|
|
28
|
+
"tslint": "tslint -c tslint.json 'src/*.ts'",
|
|
29
|
+
"prepare": "bob build",
|
|
30
|
+
"apitest": "echo \"Running react-native-purchases-store-galaxy API type checks\" && tsc --project apitesters/tsconfig.json"
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/revenuecat/react-native-purchases.git",
|
|
35
|
+
"baseUrl": "https://github.com/revenuecat/react-native-purchases"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"react-native",
|
|
39
|
+
"in-app purchase",
|
|
40
|
+
"subscriptions",
|
|
41
|
+
"iap",
|
|
42
|
+
"Android",
|
|
43
|
+
"Galaxy"
|
|
44
|
+
],
|
|
45
|
+
"author": "RevenueCat, Inc.",
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"readmeFilename": "README.md",
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/jest": "^29.5.12",
|
|
50
|
+
"@types/react": "^18.2.44",
|
|
51
|
+
"@types/react-dom": "~18.2.0",
|
|
52
|
+
"babel-plugin-react-native-web": "^0.20.0",
|
|
53
|
+
"jest": "^29.7.0",
|
|
54
|
+
"jest-react-native": "^18.0.0",
|
|
55
|
+
"prettier": "^2.0.5",
|
|
56
|
+
"react": "18.2.0",
|
|
57
|
+
"react-native": "0.78.0",
|
|
58
|
+
"react-native-builder-bob": "^0.20.0",
|
|
59
|
+
"ts-jest": "^29.1.2",
|
|
60
|
+
"tslint": "^5.20.0",
|
|
61
|
+
"tslint-config-prettier": "^1.18.0",
|
|
62
|
+
"typescript": "^5.2.2"
|
|
63
|
+
},
|
|
64
|
+
"resolutions": {
|
|
65
|
+
"@types/react": "^18.2.44",
|
|
66
|
+
"@types/react-dom": "18.2.0"
|
|
67
|
+
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"react": "*",
|
|
70
|
+
"react-native": ">= 0.73.0",
|
|
71
|
+
"react-native-purchases": "10.3.0",
|
|
72
|
+
"react-native-web": "*"
|
|
73
|
+
},
|
|
74
|
+
"peerDependenciesMeta": {
|
|
75
|
+
"react-native-web": {
|
|
76
|
+
"optional": true
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"packageManager": "yarn@3.6.1",
|
|
80
|
+
"jest": {
|
|
81
|
+
"preset": "ts-jest",
|
|
82
|
+
"testEnvironment": "node",
|
|
83
|
+
"modulePathIgnorePatterns": [
|
|
84
|
+
"<rootDir>/lib/"
|
|
85
|
+
],
|
|
86
|
+
"moduleFileExtensions": [
|
|
87
|
+
"ts",
|
|
88
|
+
"tsx",
|
|
89
|
+
"js"
|
|
90
|
+
],
|
|
91
|
+
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
|
|
92
|
+
"testPathIgnorePatterns": [
|
|
93
|
+
"\\.snap$",
|
|
94
|
+
"<rootDir>/node_modules/"
|
|
95
|
+
],
|
|
96
|
+
"cacheDirectory": ".jest/cache",
|
|
97
|
+
"globals": {
|
|
98
|
+
"ts-jest": {
|
|
99
|
+
"tsconfig": "tsconfig.test.json"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"react-native-builder-bob": {
|
|
104
|
+
"source": "src",
|
|
105
|
+
"output": "lib",
|
|
106
|
+
"targets": [
|
|
107
|
+
"commonjs",
|
|
108
|
+
"module",
|
|
109
|
+
[
|
|
110
|
+
"typescript",
|
|
111
|
+
{
|
|
112
|
+
"project": "tsconfig.build.json"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"dependencies": {
|
|
118
|
+
"@revenuecat/purchases-typescript-internal": "18.14.1"
|
|
119
|
+
}
|
|
120
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type {} from "react-native-purchases";
|
|
2
|
+
|
|
3
|
+
export const GALAXY_BILLING_MODE = {
|
|
4
|
+
PRODUCTION: "PRODUCTION",
|
|
5
|
+
TEST: "TEST",
|
|
6
|
+
ALWAYS_FAIL: "ALWAYS_FAIL",
|
|
7
|
+
} as const;
|
|
8
|
+
|
|
9
|
+
export type GalaxyBillingMode =
|
|
10
|
+
(typeof GALAXY_BILLING_MODE)[keyof typeof GALAXY_BILLING_MODE];
|
|
11
|
+
|
|
12
|
+
declare module "react-native-purchases" {
|
|
13
|
+
interface ConfigurationsByStore {
|
|
14
|
+
GALAXY: {
|
|
15
|
+
galaxyBillingMode?: GalaxyBillingMode;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|