gomarketme-react-native 1.0.4 → 1.0.6
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/package.json +6 -17
- package/src/{index.tsx → index.ts} +1 -1
- package/tsconfig.json +4 -8
- package/.editorconfig +0 -15
- package/.gitattributes +0 -3
- package/.github/actions/setup/action.yml +0 -27
- package/.github/workflows/ci.yml +0 -157
- package/.nvmrc +0 -1
- package/.watchmanconfig +0 -1
- package/.yarn/releases/yarn-4.3.1-git.20240705.hash-35167b2.cjs +0 -894
- package/.yarnrc.yml +0 -5
- package/dist/index.d.ts +0 -29
- package/dist/index.js +0 -509
- package/lefthook.yml +0 -35
package/package.json
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gomarketme-react-native",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Affiliate Marketing for React Native-Based iOS and Android Apps.",
|
|
5
|
-
"main": "
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"build": "tsc",
|
|
9
|
-
"prepublishOnly": "yarn build",
|
|
10
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
|
-
},
|
|
5
|
+
"main": "index.js",
|
|
12
6
|
"homepage": "https://gomarketme.co",
|
|
13
7
|
"keywords": [
|
|
14
8
|
"react-native",
|
|
@@ -22,19 +16,14 @@
|
|
|
22
16
|
"author": "GoMarketMe",
|
|
23
17
|
"license": "MIT",
|
|
24
18
|
"dependencies": {
|
|
25
|
-
"@react-native-async-storage/async-storage": "^
|
|
19
|
+
"@react-native-async-storage/async-storage": "^2.0.0",
|
|
26
20
|
"axios": "^1.7.7",
|
|
21
|
+
"react-native": "^0.76.1",
|
|
27
22
|
"react-native-device-info": "^14.0.0",
|
|
28
|
-
"react-native-iap": "^
|
|
23
|
+
"react-native-iap": "^12.15.6",
|
|
29
24
|
"react-native-localize": "^3.2.1"
|
|
30
25
|
},
|
|
31
26
|
"devDependencies": {
|
|
32
|
-
"
|
|
33
|
-
"@types/react-native": "^0.64.12",
|
|
34
|
-
"typescript": "^4.9.5"
|
|
35
|
-
},
|
|
36
|
-
"peerDependencies": {
|
|
37
|
-
"react": "*",
|
|
38
|
-
"react-native": "*"
|
|
27
|
+
"typescript": "^5.6.3"
|
|
39
28
|
}
|
|
40
29
|
}
|
|
@@ -170,7 +170,7 @@ class GoMarketMe {
|
|
|
170
170
|
|
|
171
171
|
private async fetchPurchaseProducts(productIds: string[], apiKey: string): Promise<void> {
|
|
172
172
|
try {
|
|
173
|
-
const products = await InAppPurchase.getProducts(productIds);
|
|
173
|
+
const products = await InAppPurchase.getProducts({skus: productIds});
|
|
174
174
|
if (products.length > 0) {
|
|
175
175
|
for (const product of products) {
|
|
176
176
|
await this.sendEventToServer(JSON.stringify(this.serializeProductDetails(product)), 'product', apiKey);
|
package/tsconfig.json
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
3
|
+
"target": "es5",
|
|
4
4
|
"module": "commonjs",
|
|
5
5
|
"lib": ["es6", "dom"],
|
|
6
|
-
"allowJs": true,
|
|
7
6
|
"jsx": "react",
|
|
8
|
-
"declaration": true,
|
|
9
7
|
"strict": true,
|
|
10
8
|
"esModuleInterop": true,
|
|
11
9
|
"skipLibCheck": true,
|
|
12
10
|
"forceConsistentCasingInFileNames": true,
|
|
13
|
-
"
|
|
14
|
-
"outDir": "./dist",
|
|
15
|
-
"rootDir": "./src"
|
|
11
|
+
"outDir": "./dist"
|
|
16
12
|
},
|
|
17
|
-
"include": ["src
|
|
18
|
-
"exclude": ["node_modules", "
|
|
13
|
+
"include": ["src/**/*"],
|
|
14
|
+
"exclude": ["node_modules", "**/*.spec.ts"]
|
|
19
15
|
}
|
package/.editorconfig
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# EditorConfig helps developers define and maintain consistent
|
|
2
|
-
# coding styles between different editors and IDEs
|
|
3
|
-
# editorconfig.org
|
|
4
|
-
|
|
5
|
-
root = true
|
|
6
|
-
|
|
7
|
-
[*]
|
|
8
|
-
|
|
9
|
-
indent_style = space
|
|
10
|
-
indent_size = 2
|
|
11
|
-
|
|
12
|
-
end_of_line = lf
|
|
13
|
-
charset = utf-8
|
|
14
|
-
trim_trailing_whitespace = true
|
|
15
|
-
insert_final_newline = true
|
package/.gitattributes
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
name: Setup
|
|
2
|
-
description: Setup Node.js and install dependencies
|
|
3
|
-
|
|
4
|
-
runs:
|
|
5
|
-
using: composite
|
|
6
|
-
steps:
|
|
7
|
-
- name: Setup Node.js
|
|
8
|
-
uses: actions/setup-node@v3
|
|
9
|
-
with:
|
|
10
|
-
node-version-file: .nvmrc
|
|
11
|
-
|
|
12
|
-
- name: Cache dependencies
|
|
13
|
-
id: yarn-cache
|
|
14
|
-
uses: actions/cache@v3
|
|
15
|
-
with:
|
|
16
|
-
path: |
|
|
17
|
-
**/node_modules
|
|
18
|
-
.yarn/install-state.gz
|
|
19
|
-
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
|
|
20
|
-
restore-keys: |
|
|
21
|
-
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
|
|
22
|
-
${{ runner.os }}-yarn-
|
|
23
|
-
|
|
24
|
-
- name: Install dependencies
|
|
25
|
-
if: steps.yarn-cache.outputs.cache-hit != 'true'
|
|
26
|
-
run: yarn install --immutable
|
|
27
|
-
shell: bash
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- main
|
|
6
|
-
pull_request:
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
merge_group:
|
|
10
|
-
types:
|
|
11
|
-
- checks_requested
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
lint:
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
steps:
|
|
17
|
-
- name: Checkout
|
|
18
|
-
uses: actions/checkout@v3
|
|
19
|
-
|
|
20
|
-
- name: Setup
|
|
21
|
-
uses: ./.github/actions/setup
|
|
22
|
-
|
|
23
|
-
- name: Lint files
|
|
24
|
-
run: yarn lint
|
|
25
|
-
|
|
26
|
-
- name: Typecheck files
|
|
27
|
-
run: yarn typecheck
|
|
28
|
-
|
|
29
|
-
test:
|
|
30
|
-
runs-on: ubuntu-latest
|
|
31
|
-
steps:
|
|
32
|
-
- name: Checkout
|
|
33
|
-
uses: actions/checkout@v3
|
|
34
|
-
|
|
35
|
-
- name: Setup
|
|
36
|
-
uses: ./.github/actions/setup
|
|
37
|
-
|
|
38
|
-
- name: Run unit tests
|
|
39
|
-
run: yarn test --maxWorkers=2 --coverage
|
|
40
|
-
|
|
41
|
-
build-library:
|
|
42
|
-
runs-on: ubuntu-latest
|
|
43
|
-
steps:
|
|
44
|
-
- name: Checkout
|
|
45
|
-
uses: actions/checkout@v3
|
|
46
|
-
|
|
47
|
-
- name: Setup
|
|
48
|
-
uses: ./.github/actions/setup
|
|
49
|
-
|
|
50
|
-
- name: Build package
|
|
51
|
-
run: yarn prepare
|
|
52
|
-
|
|
53
|
-
build-android:
|
|
54
|
-
runs-on: ubuntu-latest
|
|
55
|
-
env:
|
|
56
|
-
TURBO_CACHE_DIR: .turbo/android
|
|
57
|
-
steps:
|
|
58
|
-
- name: Checkout
|
|
59
|
-
uses: actions/checkout@v3
|
|
60
|
-
|
|
61
|
-
- name: Setup
|
|
62
|
-
uses: ./.github/actions/setup
|
|
63
|
-
|
|
64
|
-
- name: Cache turborepo for Android
|
|
65
|
-
uses: actions/cache@v3
|
|
66
|
-
with:
|
|
67
|
-
path: ${{ env.TURBO_CACHE_DIR }}
|
|
68
|
-
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
|
|
69
|
-
restore-keys: |
|
|
70
|
-
${{ runner.os }}-turborepo-android-
|
|
71
|
-
|
|
72
|
-
- name: Check turborepo cache for Android
|
|
73
|
-
run: |
|
|
74
|
-
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
|
|
75
|
-
|
|
76
|
-
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
|
|
77
|
-
echo "turbo_cache_hit=1" >> $GITHUB_ENV
|
|
78
|
-
fi
|
|
79
|
-
|
|
80
|
-
- name: Install JDK
|
|
81
|
-
if: env.turbo_cache_hit != 1
|
|
82
|
-
uses: actions/setup-java@v3
|
|
83
|
-
with:
|
|
84
|
-
distribution: 'zulu'
|
|
85
|
-
java-version: '17'
|
|
86
|
-
|
|
87
|
-
- name: Finalize Android SDK
|
|
88
|
-
if: env.turbo_cache_hit != 1
|
|
89
|
-
run: |
|
|
90
|
-
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
|
|
91
|
-
|
|
92
|
-
- name: Cache Gradle
|
|
93
|
-
if: env.turbo_cache_hit != 1
|
|
94
|
-
uses: actions/cache@v3
|
|
95
|
-
with:
|
|
96
|
-
path: |
|
|
97
|
-
~/.gradle/wrapper
|
|
98
|
-
~/.gradle/caches
|
|
99
|
-
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
|
|
100
|
-
restore-keys: |
|
|
101
|
-
${{ runner.os }}-gradle-
|
|
102
|
-
|
|
103
|
-
- name: Build example for Android
|
|
104
|
-
env:
|
|
105
|
-
JAVA_OPTS: "-XX:MaxHeapSize=6g"
|
|
106
|
-
run: |
|
|
107
|
-
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
|
|
108
|
-
|
|
109
|
-
build-ios:
|
|
110
|
-
runs-on: macos-14
|
|
111
|
-
env:
|
|
112
|
-
TURBO_CACHE_DIR: .turbo/ios
|
|
113
|
-
steps:
|
|
114
|
-
- name: Checkout
|
|
115
|
-
uses: actions/checkout@v3
|
|
116
|
-
|
|
117
|
-
- name: Setup
|
|
118
|
-
uses: ./.github/actions/setup
|
|
119
|
-
|
|
120
|
-
- name: Cache turborepo for iOS
|
|
121
|
-
uses: actions/cache@v3
|
|
122
|
-
with:
|
|
123
|
-
path: ${{ env.TURBO_CACHE_DIR }}
|
|
124
|
-
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
|
|
125
|
-
restore-keys: |
|
|
126
|
-
${{ runner.os }}-turborepo-ios-
|
|
127
|
-
|
|
128
|
-
- name: Check turborepo cache for iOS
|
|
129
|
-
run: |
|
|
130
|
-
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
|
|
131
|
-
|
|
132
|
-
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
|
|
133
|
-
echo "turbo_cache_hit=1" >> $GITHUB_ENV
|
|
134
|
-
fi
|
|
135
|
-
|
|
136
|
-
- name: Cache cocoapods
|
|
137
|
-
if: env.turbo_cache_hit != 1
|
|
138
|
-
id: cocoapods-cache
|
|
139
|
-
uses: actions/cache@v3
|
|
140
|
-
with:
|
|
141
|
-
path: |
|
|
142
|
-
**/ios/Pods
|
|
143
|
-
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
|
|
144
|
-
restore-keys: |
|
|
145
|
-
${{ runner.os }}-cocoapods-
|
|
146
|
-
|
|
147
|
-
- name: Install cocoapods
|
|
148
|
-
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
|
|
149
|
-
run: |
|
|
150
|
-
cd example/ios
|
|
151
|
-
pod install
|
|
152
|
-
env:
|
|
153
|
-
NO_FLIPPER: 1
|
|
154
|
-
|
|
155
|
-
- name: Build example for iOS
|
|
156
|
-
run: |
|
|
157
|
-
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
v18
|
package/.watchmanconfig
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|