react-native-insider 7.0.2-nh → 7.0.3-nh

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/RNInsider.podspec CHANGED
@@ -9,12 +9,12 @@ Pod::Spec.new do |s|
9
9
  s.authors = package_json['author']
10
10
  s.license = 'MIT'
11
11
  s.platform = :ios, '12.0'
12
- s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/14.0.4/InsiderMobileIOSFramework.zip'}
12
+ s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/14.0.5/InsiderMobileIOSFramework.zip'}
13
13
  s.source_files = 'ios/RNInsider/*.{h,m}'
14
14
  s.requires_arc = true
15
15
  s.static_framework = true
16
16
  s.dependency 'React'
17
- s.dependency 'InsiderMobile', '14.0.4'
17
+ s.dependency 'InsiderMobile', '14.0.5'
18
18
  s.dependency 'InsiderGeofence', '1.2.3'
19
- s.dependency 'InsiderHybrid', '1.7.4'
19
+ s.dependency 'InsiderHybrid', '1.7.5'
20
20
  end
@@ -35,8 +35,8 @@ repositories {
35
35
 
36
36
  dependencies {
37
37
  implementation "com.facebook.react:react-native:${getVersionFromPartner('reactNativeVersion', '+')}"
38
- implementation ('com.useinsider:insider:15.1.1-nh')
39
- implementation ('com.useinsider:insiderhybrid:1.3.2')
38
+ implementation 'com.useinsider:insider:15.1.5-nh'
39
+ implementation 'com.useinsider:insiderhybrid:1.3.3'
40
40
 
41
41
  implementation 'androidx.security:security-crypto:1.1.0-alpha06'
42
42
  implementation 'androidx.legacy:legacy-support-v4:1.0.0'
@@ -383,7 +383,7 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
383
383
  @ReactMethod
384
384
  public void setCustomAttributeWithArray(String key, ReadableArray value) {
385
385
  try {
386
- Insider.Instance.getCurrentUser().setCustomAttributeWithArray(key, RNUtils.convertReadableArrayToArray(value));
386
+ Insider.Instance.getCurrentUser().setCustomAttributeWithArray(key, RNUtils.convertReadableArrayToStringArray(value));
387
387
  } catch (Exception e) {
388
388
  Insider.Instance.putException(e);
389
389
  }
@@ -557,7 +557,7 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
557
557
  @ReactMethod
558
558
  public void getSmartRecommendationWithProductIDs(ReadableArray productIDs, int recommendationID, String locale, String currency, final Callback callback) {
559
559
  try {
560
- String[] productIDsOptions = RNUtils.convertReadableArrayToArray(productIDs);
560
+ String[] productIDsOptions = RNUtils.convertReadableArrayToStringArray(productIDs);
561
561
 
562
562
  Insider.Instance.getSmartRecommendationWithProductIDs(productIDsOptions, recommendationID, locale, currency,
563
563
  new RecommendationEngine.SmartRecommendation() {
@@ -660,7 +660,7 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
660
660
  @ReactMethod
661
661
  public void visitListingPage(ReadableArray taxonomy) {
662
662
  try {
663
- String[] taxonomies = RNUtils.convertReadableArrayToArray(taxonomy);
663
+ String[] taxonomies = RNUtils.convertReadableArrayToStringArray(taxonomy);
664
664
  Insider.Instance.visitListingPage(taxonomies);
665
665
  } catch (Exception e) {
666
666
  Insider.Instance.putException(e);
@@ -20,6 +20,7 @@ import java.util.ArrayList;
20
20
  import java.util.Date;
21
21
  import java.util.HashMap;
22
22
  import java.util.Iterator;
23
+ import java.util.List;
23
24
  import java.util.Map;
24
25
 
25
26
  public class RNUtils {
@@ -113,7 +114,13 @@ public class RNUtils {
113
114
  map.put(key, convertReadableMapToMap(readableMap.getMap(key)));
114
115
  break;
115
116
  case Array:
116
- map.put(key, convertReadableArrayToArray(readableMap.getArray(key)));
117
+ ReadableArray array = readableMap.getArray(key);
118
+ if (isConvertibleToNumericArray(array)) {
119
+ map.put(key, convertReadableArrayToNumericArray(array));
120
+ }
121
+ else {
122
+ map.put(key, convertReadableArrayToStringArray(array));
123
+ }
117
124
  break;
118
125
  }
119
126
  }
@@ -123,19 +130,34 @@ public class RNUtils {
123
130
  return map;
124
131
  }
125
132
 
126
- public static String[] convertReadableArrayToArray(ReadableArray readableArray) {
127
- String[] array = new String[readableArray.size()];
133
+ public static String[] convertReadableArrayToStringArray(ReadableArray readableArray) {
134
+ ArrayList<String> arrayList = new ArrayList<>();
128
135
  try {
129
136
  for (int i = 0; i < readableArray.size(); i++) {
130
137
  ReadableType type = readableArray.getType(i);
131
138
  if (type == ReadableType.String) {
132
- array[i] = readableArray.getString(i);
139
+ arrayList.add(readableArray.getString(i));
133
140
  }
134
141
  }
135
142
  } catch (Exception e) {
136
143
  Insider.Instance.putException(e);
137
144
  }
138
- return array;
145
+ return arrayList.toArray(new String[0]);
146
+ }
147
+
148
+ public static Number[] convertReadableArrayToNumericArray(ReadableArray readableArray) {
149
+ ArrayList<Number> arrayList = new ArrayList<>();
150
+ try {
151
+ for (int i = 0; i < readableArray.size(); i++) {
152
+ ReadableType type = readableArray.getType(i);
153
+ if (type == ReadableType.Number) {
154
+ arrayList.add(readableArray.getDouble(i));
155
+ }
156
+ }
157
+ } catch (Exception e) {
158
+ Insider.Instance.putException(e);
159
+ }
160
+ return arrayList.toArray(new Number[0]);
139
161
  }
140
162
 
141
163
  public static HashMap<String, Object> fixIntegerAttributesInMap(HashMap<String, Object> map) {
@@ -153,4 +175,19 @@ public class RNUtils {
153
175
  }
154
176
  return map;
155
177
  }
178
+
179
+ private static boolean isConvertibleToNumericArray(ReadableArray readableArray) {
180
+ try {
181
+ for (int i = 0; i < readableArray.size(); i++) {
182
+ ReadableType type = readableArray.getType(i);
183
+ if (type != ReadableType.Number) {
184
+ return false;
185
+ }
186
+ }
187
+ } catch (Exception e) {
188
+ Insider.Instance.putException(e);
189
+ return false;
190
+ }
191
+ return true;
192
+ }
156
193
  }
@@ -0,0 +1,98 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ usage() {
5
+ cat <<EOF
6
+ Kullanım: $(basename "$0") -p <package> [opsiyonlar]
7
+
8
+ Zorunlu:
9
+ -p, --package Örn: /path/to/react-native-insider-7.0.2.tgz
10
+
11
+ Opsiyonel:
12
+ -t, --title <string> Release başlığı (yok ise version kullanılır)
13
+ --notes-file <path> Notları dosyadan al (--generate-notes devre dışı)
14
+ --no-notes Not ekleme veya oluşturma
15
+ --dry-run Komutları yazdır, çalıştırma
16
+
17
+ Örnekler:
18
+ $(basename "$0") -p /path/to/react-native-insider-7.0.2.tgz --dry-run
19
+ $(basename "$0") -p /path/to/react-native-insider-7.0.2.tgz --title "Release 4.0.2" --notes-file /path/to/CHANGELOG.md
20
+ EOF
21
+ }
22
+
23
+ LIBRARY_ZIP=""
24
+ DRY_RUN="false"
25
+ RELEASE_NOTES_FILE=""
26
+ RELEASE_NO_NOTES="false"
27
+ RELEASE_TITLE=""
28
+
29
+ # Check validity of arguments
30
+ while [[ $# -gt 0 ]]; do
31
+ case "$1" in
32
+ -p|--package) LIBRARY_ZIP="$2"; shift 2;;
33
+ -t|--title) RELEASE_TITLE="$2"; shift 2;;
34
+ --notes-file) RELEASE_NOTES_FILE="$2"; shift 2;;
35
+ --no-notes) RELEASE_NO_NOTES="true"; shift;;
36
+ --dry-run) DRY_RUN="true"; shift;;
37
+ -h|--help) usage; exit 0;;
38
+ *) echo "⛔ Error: Bilinmeyen argüman: $1"; usage; exit 1;;
39
+ esac
40
+ done
41
+
42
+ if [[ -z "${LIBRARY_ZIP}" ]]; then
43
+ echo "⛔ Error: --package zorunludur."
44
+ usage; exit 1
45
+ fi
46
+
47
+ # Dry run method
48
+ run() {
49
+ echo "+ $*"
50
+ if [[ "${DRY_RUN}" == "false" ]]; then
51
+ eval "$@"
52
+ fi
53
+ }
54
+
55
+ PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
56
+ PACKAGE_FILE_NAME="package.json"
57
+ CURRENT_VERSION_NUMBER="$(sed -nE 's/^[[:space:]]*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/p' "${PROJECT_ROOT}/${PACKAGE_FILE_NAME}" | head -n1)"
58
+
59
+ echo "ℹ️ (Github) Güncel versiyon: ${CURRENT_VERSION_NUMBER}"
60
+
61
+ if gh release view "${CURRENT_VERSION_NUMBER}" >/dev/null 2>&1; then
62
+ if [[ "${DRY_RUN}" == "false" ]]; then
63
+ echo "⛔ (Github) Error: Bu version halihazırda mevcut: ${CURRENT_VERSION_NUMBER}"
64
+ exit 1
65
+ else
66
+ echo "⚠️ (Github) Warning: Bu version halihazırda mevcut: ${CURRENT_VERSION_NUMBER} (dry-run modunda atlanıyor.)"
67
+ fi
68
+ fi
69
+
70
+ RELEASE_EXTRA_FLAGS=""
71
+
72
+ if [[ -z "${RELEASE_TITLE}" ]]; then
73
+ RELEASE_EXTRA_FLAGS+="--title \"${CURRENT_VERSION_NUMBER}\""
74
+ else
75
+ RELEASE_EXTRA_FLAGS+="--title \"${RELEASE_TITLE}\""
76
+ fi
77
+
78
+ if [[ "${RELEASE_NO_NOTES}" == "true" ]]; then
79
+ RELEASE_EXTRA_FLAGS+=" --notes \"\""
80
+ elif [[ -n "${RELEASE_NOTES_FILE}" ]]; then
81
+ if [[ ! -f "${RELEASE_NOTES_FILE}" ]]; then
82
+ echo "⛔ (Github) Error: Not dosyası bulunamadı: ${RELEASE_NOTES_FILE}"
83
+ exit 1
84
+ fi
85
+ RELEASE_EXTRA_FLAGS+=" --notes-file \"${RELEASE_NOTES_FILE}\""
86
+ else
87
+ RELEASE_EXTRA_FLAGS+=" --generate-notes"
88
+ fi
89
+
90
+ run "gh release create \"${CURRENT_VERSION_NUMBER}\" ${RELEASE_EXTRA_FLAGS}"
91
+
92
+ echo "📦 (Github) Sürüm pakedi yükleniyor: ${LIBRARY_ZIP}"
93
+ if [[ -f "${LIBRARY_ZIP}" ]]; then
94
+ run "gh release upload \"${CURRENT_VERSION_NUMBER}\" \"${LIBRARY_ZIP}\" --clobber"
95
+ else
96
+ echo "⚠️ (Github) Warning: Asset bulunamadı, atlanıyor: ${LIBRARY_ZIP}"
97
+ fi
98
+ echo "✅ (Github) Deployment tamamlandı: ${CURRENT_VERSION_NUMBER}"
@@ -0,0 +1,168 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ usage() {
5
+ cat <<EOF
6
+ Kullanım: $(basename "$0") -v <version> [opsiyonlar]
7
+
8
+ Zorunlu:
9
+ -v, --version <semver> Örn: 4.0.2 (release branch adı olabilir)
10
+
11
+ Opsiyonel:
12
+ -c, --commit (değişiklikler commit edilsin mi?)
13
+
14
+ Örnekler:
15
+ $(basename "$0") -v 4.0.2
16
+ $(basename "$0") --version 4.0.2 --commit
17
+ EOF
18
+ }
19
+
20
+ NEW_VERSION_NUMBER=""
21
+ COMMIT_CHANGES="false"
22
+ CHANGED_FILES=()
23
+
24
+ while [[ $# -gt 0 ]]; do
25
+ case "$1" in
26
+ -v|--version) NEW_VERSION_NUMBER="$2"; shift 2;;
27
+ -c|--commit) COMMIT_CHANGES="true"; shift;;
28
+ -h|--help) usage; exit 0;;
29
+ *) echo "⛔ Error: Bilinmeyen argüman: $1"; usage; exit 1;;
30
+ esac
31
+ done
32
+
33
+ if [[ -z "${NEW_VERSION_NUMBER}" ]]; then
34
+ echo "⛔ Error: --version zorunludur."
35
+ usage; exit 1
36
+ fi
37
+
38
+ PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
39
+
40
+ PACKAGE_FILE_NAME="package.json"
41
+ PACKAGE_LOCK_FILE_NAME="package-lock.json"
42
+
43
+ PODSPEC_FILE_NAME="RNInsider.podspec"
44
+ GRADLE_FILE_NAME="android/build.gradle"
45
+
46
+ echo "ℹ️ Versiyon güncelleme başlatıldı: ${PROJECT_ROOT}"
47
+ CURRENT_VERSION_NUMBER="$(sed -nE 's/^[[:space:]]*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/p' "${PROJECT_ROOT}/${PACKAGE_FILE_NAME}" | head -n1)"
48
+
49
+ echo "ℹ️ Güncel versiyon: ${CURRENT_VERSION_NUMBER}"
50
+ SED_EXPRESSION="s/(\"version\"[[:space:]]*:[[:space:]]*\")[^\"]+(\")/\1${NEW_VERSION_NUMBER}\2/"
51
+
52
+ if [[ "$OSTYPE" == darwin* ]]; then
53
+ sed -i '' -E "${SED_EXPRESSION}" "${PROJECT_ROOT}/${PACKAGE_FILE_NAME}"
54
+ else
55
+ sed -i -E "${SED_EXPRESSION}" "${PROJECT_ROOT}/${PACKAGE_FILE_NAME}"
56
+ fi
57
+
58
+ PACKAGE_LOCK="$(jq --arg v "${NEW_VERSION_NUMBER}" \
59
+ '.version=$v | if (.packages and .packages[""]) then .packages[""].version=$v else . end' \
60
+ "${PROJECT_ROOT}/${PACKAGE_LOCK_FILE_NAME}")"
61
+
62
+ echo "${PACKAGE_LOCK}" > "${PROJECT_ROOT}/${PACKAGE_LOCK_FILE_NAME}"
63
+
64
+ read_iOS_SDK_version_from_podspec() {
65
+ version=$(pod trunk info "${1}" 2>/dev/null \
66
+ | sed -nE 's/^[[:space:]]*-[[:space:]]*([^[:space:]]+)[[:space:]]*\(([^)]+)\).*/\2|\1/p' \
67
+ | awk -F'|' '$2 !~ /-/' \
68
+ | sort -t'|' -k1,1r \
69
+ | head -n1 \
70
+ | cut -d'|' -f2
71
+ )
72
+ echo "${version}"
73
+ }
74
+
75
+ apply_iOS_SDK_version_in_podspec() {
76
+ local podspec_path="${PROJECT_ROOT}/${PODSPEC_FILE_NAME}"
77
+ local module=$1
78
+ local new_version=$2
79
+ local expression="s/^([[:space:]]*s\.dependency[[:space:]]*['\"]${module}['\"][[:space:]]*,[[:space:]]*)(['\"])([^'\"#]+)(['\"][[:space:]]*(#.*)?)$/\1\2${new_version}\4/"
80
+ local source_expression="s|(s\.source[[:space:]]*=[[:space:]]*[^'\"]*['\"][^'\"]*/)[0-9]+\.[0-9]+\.[0-9]+(/[^'\"]*\.zip['\"])|\1${new_version}\2|"
81
+ if [[ "$OSTYPE" == darwin* ]]; then
82
+ sed -i '' -E "${expression}" "${podspec_path}"
83
+ if [[ "${module}" == "InsiderMobile" ]]; then
84
+ sed -i '' -E "${source_expression}" "${podspec_path}"
85
+ fi
86
+ else
87
+ sed -i -E "${expression}" "${podspec_path}"
88
+ if [[ "${module}" == "InsiderMobile" ]]; then
89
+ sed -i -E "${source_expression}" "${podspec_path}"
90
+ fi
91
+ fi
92
+ }
93
+
94
+ read_android_SDK_version_from_maven() {
95
+ local url="https://mobilesdk.useinsider.com/android/com/useinsider/${1}/maven-metadata.xml"
96
+ local xml="$(curl -fsSL "${url}")"
97
+ local version="$(echo "${xml}" \
98
+ | tr -d '\n' \
99
+ | sed -nE 's/.*<release>[[:space:]]*([^<[:space:]]+)[[:space:]]*<\/release>.*/\1/p' \
100
+ | head -1
101
+ )"
102
+ if [[ "${NEW_VERSION_NUMBER}" == *-nh ]]; then
103
+ if [[ "${version}" == *-nh ]]; then
104
+ echo "${version}"
105
+ else
106
+ local version_nh="${version}-nh"
107
+ if printf '%s' "${xml}" | grep -q "<version>${version_nh}</version>"; then
108
+ echo "${version_nh}"
109
+ else
110
+ echo "${version}"
111
+ fi
112
+ fi
113
+ else
114
+ echo "${version}"
115
+ fi
116
+ }
117
+
118
+ apply_android_SDK_version_in_maven() {
119
+ local gradle_path="${PROJECT_ROOT}/${GRADLE_FILE_NAME}"
120
+ local module=$1
121
+ local new_version=$2
122
+ local expression="s/^([[:space:]]*(implementation|api|compileOnly|runtimeOnly)[[:space:]]+['\"]com\.useinsider:${module}:)[^'\" ]+(['\"])/\1${new_version}\3/"
123
+ if [[ "$OSTYPE" == darwin* ]]; then
124
+ sed -i '' -E "${expression}" "${gradle_path}"
125
+ else
126
+ sed -i -E "${expression}" "${gradle_path}"
127
+ fi
128
+ }
129
+
130
+ IOS_FRAMEWORKS=("InsiderMobile" "InsiderGeofence" "InsiderHybrid")
131
+ for IOS_FRAMEWORK in "${IOS_FRAMEWORKS[@]}"; do
132
+ IOS_CURRENT_VERSION_NUMBER=$(read_iOS_SDK_version_from_podspec "${IOS_FRAMEWORK}")
133
+ apply_iOS_SDK_version_in_podspec "${IOS_FRAMEWORK}" "${IOS_CURRENT_VERSION_NUMBER}"
134
+ echo "✅ iOS (${IOS_FRAMEWORK}) versiyonu güncellendi: ${IOS_CURRENT_VERSION_NUMBER}"
135
+ done
136
+
137
+ ANDROID_LIBRARIES=("insider" "insiderhybrid")
138
+ for ANDROID_LIBRARY in "${ANDROID_LIBRARIES[@]}"; do
139
+ ANDROID_CURRENT_VERSION_NUMBER=$(read_android_SDK_version_from_maven "${ANDROID_LIBRARY}")
140
+ apply_android_SDK_version_in_maven "${ANDROID_LIBRARY}" "${ANDROID_CURRENT_VERSION_NUMBER}"
141
+ echo "✅ Android (${ANDROID_LIBRARY}) versiyonu güncellendi: ${ANDROID_CURRENT_VERSION_NUMBER}"
142
+ done
143
+
144
+ echo "✅ Yeni versiyona güncellendi: ${NEW_VERSION_NUMBER}"
145
+
146
+ CHANGED_FILES+=("${PROJECT_ROOT}/${PACKAGE_FILE_NAME}")
147
+ CHANGED_FILES+=("${PROJECT_ROOT}/${GRADLE_FILE_NAME}")
148
+ CHANGED_FILES+=("${PROJECT_ROOT}/${PODSPEC_FILE_NAME}")
149
+ CHANGED_FILES+=("${PROJECT_ROOT}/${PACKAGE_LOCK_FILE_NAME}")
150
+
151
+ if [[ "${COMMIT_CHANGES}" == "true" ]]; then
152
+ if git rev-parse --git-dir > /dev/null 2>&1; then
153
+ echo "ℹ️ Git commit hazırlanıyor..."
154
+ if [ ${#CHANGED_FILES[@]} -gt 0 ]; then
155
+ git add "${CHANGED_FILES[@]}"
156
+ if git diff --cached --quiet; then
157
+ echo "ℹ️ Commitlenecek değişiklik bulunamadı, işlem atlanıyor."
158
+ else
159
+ git commit -m "release: update version to ${NEW_VERSION_NUMBER}"
160
+ echo "✅ Git commit oluşturuldu."
161
+ fi
162
+ else
163
+ echo "ℹ️ Commitlenecek dosya bulunamadı, işlem atlanıyor."
164
+ fi
165
+ else
166
+ echo "⛔ Error: Git repo değil, commit atlanıyor."
167
+ fi
168
+ fi
package/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- declare module 'react-native-insider' {
2
- import RNInsiderProduct from '.src/InsiderProduct';
3
- import RNInsiderUser from './src/InsiderUser';
4
- import RNInsiderEvent from './src/InsiderEvent';
1
+ import type RNInsiderProduct from '.src/InsiderProduct';
2
+ import type RNInsiderEvent from './src/InsiderEvent';
3
+ import type RNInsiderUser from './src/InsiderUser';
5
4
 
5
+ declare module 'react-native-insider' {
6
6
  export default class RNInsider {
7
7
  static init(partnerName: string, appGroup: string, insiderCallback: Function): void;
8
8
  static initWithCustomEndpoint(partnerName: string, appGroup: string, endpoint: string, insiderCallback: Function): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-insider",
3
- "version": "7.0.2-nh",
3
+ "version": "7.0.3-nh",
4
4
  "description": "React Native Insider SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -6,7 +6,12 @@ declare class RNInsiderEvent {
6
6
  addParameterWithDouble(key: string, value: number): this;
7
7
  addParameterWithBoolean(key: string, value: boolean): this;
8
8
  addParameterWithDate(key: string, value: Date): this;
9
+ /**
10
+ * @deprecated Use `addParameterWithStringArray` instead.
11
+ */
9
12
  addParameterWithArray(key: string, value: Array<string>): this;
13
+ addParameterWithStringArray(key: string, value: Array<string>): this;
14
+ addParameterWithNumericArray(key: string, value: Array<number>): this;
10
15
 
11
16
  build(): void;
12
17
  }
@@ -102,6 +102,36 @@ export default class RNInsiderEvent {
102
102
  return this;
103
103
  }
104
104
 
105
+ addParameterWithStringArray(key, value) {
106
+ if (shouldNotProceed()) return this;
107
+ if (checkParameters([{ type: 'string', value: key }, { type: 'object', value }])) {
108
+ showParameterWarningLog("addParameterWithStringArray", [{ type: 'string', value: key }, { type: 'object', value }]);
109
+ return this;
110
+ }
111
+ try {
112
+ this.parameters[key] = value;
113
+ return this;
114
+ } catch (error) {
115
+ Insider.putErrorLog(generateJSONErrorString(error));
116
+ }
117
+ return this;
118
+ }
119
+
120
+ addParameterWithNumericArray(key, value) {
121
+ if (shouldNotProceed()) return this;
122
+ if (checkParameters([{ type: 'string', value: key }, { type: 'object', value }])) {
123
+ showParameterWarningLog("addParameterWithNumericArray", [{ type: 'string', value: key }, { type: 'object', value }]);
124
+ return this;
125
+ }
126
+ try {
127
+ this.parameters[key] = value;
128
+ return this;
129
+ } catch (error) {
130
+ Insider.putErrorLog(generateJSONErrorString(error));
131
+ }
132
+ return this;
133
+ }
134
+
105
135
  build() {
106
136
  if (shouldNotProceed()) return;
107
137
  try {
@@ -34,7 +34,12 @@ declare class RNInsiderProduct {
34
34
  setCustomAttributeWithBoolean(key: string, value: boolean): this;
35
35
  setCustomAttributeWithDouble(key: string, value: number): this;
36
36
  setCustomAttributeWithDate(key: string, value: Date): this;
37
+ /**
38
+ * @deprecated Use `setCustomAttributeWithStringArray` instead.
39
+ */
37
40
  setCustomAttributeWithArray(key: string, value: Array<string>): this;
41
+ setCustomAttributeWithStringArray(key: string, value: Array<string>): this;
42
+ setCustomAttributeWithNumericArray(key: string, value: Array<number>): this;
38
43
  }
39
44
 
40
45
  export default RNInsiderProduct;
@@ -413,4 +413,32 @@ export default class RNInsiderProduct {
413
413
  }
414
414
  return this;
415
415
  }
416
+
417
+ setCustomAttributeWithStringArray(key, value) {
418
+ if (shouldNotProceed()) return this;
419
+ if (checkParameters([{ type: 'string', value: key }, { type: 'object', value }])) {
420
+ showParameterWarningLog("setCustomAttributeWithStringArray", [{ type: 'string', value: key }, { type: 'object', value }]);
421
+ return this;
422
+ }
423
+ try {
424
+ this.productOptMap[key] = value;
425
+ } catch (error) {
426
+ Insider.putErrorLog(generateJSONErrorString(error));
427
+ }
428
+ return this;
429
+ }
430
+
431
+ setCustomAttributeWithNumericArray(key, value) {
432
+ if (shouldNotProceed()) return this;
433
+ if (checkParameters([{ type: 'string', value: key }, { type: 'object', value }])) {
434
+ showParameterWarningLog("setCustomAttributeWithNumericArray", [{ type: 'string', value: key }, { type: 'object', value }]);
435
+ return this;
436
+ }
437
+ try {
438
+ this.productOptMap[key] = value;
439
+ } catch (error) {
440
+ Insider.putErrorLog(generateJSONErrorString(error));
441
+ }
442
+ return this;
443
+ }
416
444
  }
package/github_release.sh DELETED
@@ -1,114 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- # Minimal GitHub Release Script
5
- # Gereksinim: gh (GitHub CLI) -> gh auth login
6
- # Bulunduğun branch'in HEAD'inden release oluşturur.
7
- # Tag = --version (örn: 1.2.3)
8
- # Notes = --generate-notes (varsayılan) | --notes-file | --no-notes
9
-
10
- VERSION=""
11
- ASSETS=()
12
- DRY_RUN="false"
13
- NOTES_FILE=""
14
- NO_NOTES="false"
15
- TITLE=""
16
- flags=""
17
-
18
- usage() {
19
- cat <<EOF
20
- Kullanım: $(basename "$0") -v <versiyon> [opsiyonlar]
21
-
22
- Zorunlu:
23
- -v, --version <semver> Örn: 1.2.3 (release tag adı)
24
-
25
- Opsiyonel:
26
- -a, --asset <path> Framework dosyası (tekrarlanabilir)
27
- -t, --title <string> Release başlığı (yok ise version kullanılır)
28
- --notes-file <path> Notları dosyadan al (--generate-notes devre dışı)
29
- --no-notes Not ekleme veya oluşturma
30
- --dry-run Komutları yazdır, çalıştırma
31
-
32
- Örnekler:
33
- $(basename "$0") -v 1.2.3
34
- $(basename "$0") -v 1.2.3 --title Title --notes-file CHANGELOG.md
35
- $(basename "$0") -v 1.2.3 --asset build/ios/InsiderMobile.xcframework.zip
36
- EOF
37
- }
38
-
39
- # Check validity of arguments
40
- while [[ $# -gt 0 ]]; do
41
- case "$1" in
42
- -v|--version) VERSION="$2"; shift 2;;
43
- -a|--asset) ASSETS+=("$2"); shift 2;;
44
- -t|--title) TITLE="$2"; shift 2;;
45
- --notes-file) NOTES_FILE="$2"; shift 2;;
46
- --no-notes) NO_NOTES="true"; shift;;
47
- --dry-run) DRY_RUN="true"; shift;;
48
- -h|--help) usage; exit 0;;
49
- *) echo "⛔ Error: Bilinmeyen argüman: $1"; usage; exit 1;;
50
- esac
51
- done
52
-
53
- if [[ -z "${VERSION}" ]]; then
54
- echo "⛔ Error: --version parametresi zorunludur. Örn: -v 1.2.3"
55
- usage
56
- exit 1
57
- fi
58
-
59
- if ! command -v gh >/dev/null 2>&1; then
60
- echo "⛔ Error: GitHub CLI (gh) bulunamadı."
61
- echo "ℹ️ Kurulum: https://cli.github.com ve 'gh auth login' komutunu çalıştırın."
62
- exit 1
63
- fi
64
-
65
- # Dry run method
66
- run() {
67
- echo "+ $*"
68
- if [[ "${DRY_RUN}" == "false" ]]; then
69
- eval "$@"
70
- fi
71
- }
72
-
73
- # Check if there exists a release with same version
74
- if gh release view "${VERSION}" >/dev/null 2>&1; then
75
- echo "⛔ Error: Bu tag için zaten bir release mevcut: ${VERSION}"
76
- exit 1
77
- fi
78
-
79
- # Assign title
80
- if [[ -z "${TITLE}" ]]; then
81
- flags+="--title \"${VERSION}\""
82
- else
83
- flags+="--title \"${TITLE}\""
84
- fi
85
-
86
- # Construct release flags
87
- if [[ "${NO_NOTES}" == "true" ]]; then
88
- flags+=" --notes \"\""
89
- elif [[ -n "${NOTES_FILE}" ]]; then
90
- if [[ ! -f "${NOTES_FILE}" ]]; then
91
- echo "⛔ Error: Not dosyası bulunamadı: ${NOTES_FILE}"
92
- exit 1
93
- fi
94
- flags+=" --notes-file \"${NOTES_FILE}\""
95
- else
96
- flags+=" --generate-notes"
97
- fi
98
-
99
- # Create the release on Github
100
- run "gh release create \"${VERSION}\" ${flags}"
101
-
102
- # Upload Framework file
103
- if [[ ${#ASSETS[@]} -gt 0 ]]; then
104
- echo "📦 Framework dosyası yükleniyor..."
105
- for a in "${ASSETS[@]}"; do
106
- if [[ -f "${a}" ]]; then
107
- run "gh release upload \"${VERSION}\" \"${a}\" --clobber"
108
- else
109
- echo "⚠️ Warning: Asset bulunamadı, atlanıyor: ${a}"
110
- fi
111
- done
112
- fi
113
-
114
- echo "✅ Sürüm oluşturuldu: ${VERSION}"