cordova-plugin-insider 3.0.0 → 3.0.1
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 +2 -2
- package/plugin.xml +1 -1
- package/src/android/build-extras.gradle +2 -2
- package/www/Constants.js +1 -1
- package/.git-hooks/README.md +0 -36
- package/.git-hooks/commit-msg +0 -83
- package/github_release.sh +0 -114
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cordova-plugin-insider",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "A plugin that you can use Insider SDK with Cordova and Ionic",
|
|
5
5
|
"cordova_name": "Insider Cordova Plugin",
|
|
6
6
|
"cordova": {
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
"@babel/preset-env": "^7.27.2"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"babel": "^
|
|
31
|
+
"babel": "^6.23.0"
|
|
32
32
|
}
|
|
33
33
|
}
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="cordova-plugin-insider" version="3.0.
|
|
2
|
+
<plugin id="cordova-plugin-insider" version="3.0.1" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
3
|
<name>Insider</name>
|
|
4
4
|
<description>Insider Cordova Plugin</description>
|
|
5
5
|
<keywords>insider,cordova,cordova-ios,cordova-android</keywords>
|
|
@@ -31,7 +31,7 @@ dependencies {
|
|
|
31
31
|
implementation 'com.google.firebase:firebase-messaging:24.0.0'
|
|
32
32
|
implementation 'com.google.android.play:review:2.0.1'
|
|
33
33
|
|
|
34
|
-
implementation 'com.huawei.hms:push:6.
|
|
34
|
+
implementation 'com.huawei.hms:push:6.13.0.300'
|
|
35
35
|
implementation 'com.huawei.hms:ads-identifier:3.4.62.300'
|
|
36
|
-
implementation 'com.huawei.hms:location:6.
|
|
36
|
+
implementation 'com.huawei.hms:location:6.16.0.302'
|
|
37
37
|
}
|
package/www/Constants.js
CHANGED
package/.git-hooks/README.md
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Git Hooks
|
|
2
|
-
|
|
3
|
-
## 📌 Purpose
|
|
4
|
-
This directory uses Git hooks to enforce standards and automate tasks during the development workflow.
|
|
5
|
-
The main example included is a **`commit-msg`** hook that enforces [Conventional Commits v1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) rules with additional project-specific logic.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 📂 Hooks Included
|
|
10
|
-
|
|
11
|
-
### 1. `commit-msg`
|
|
12
|
-
Ensures commit messages follow the Conventional Commits specification, with custom rules:
|
|
13
|
-
|
|
14
|
-
- **Bypasses**:
|
|
15
|
-
- `Merge branch ...` commits (merge commits)
|
|
16
|
-
- `pick ...`, `reword ...`, `edit ...`, `squash ...`, `fixup ...`, `exec ...` messages (interactive rebase auto-generated commits)
|
|
17
|
-
- **JIRA Reference**:
|
|
18
|
-
- If the branch name contains a JIRA ID in the form `MOB-1234`, it will automatically append
|
|
19
|
-
`#Ref: MOB-1234` to the end of the commit message (if not already present).
|
|
20
|
-
- **Optional Description**:
|
|
21
|
-
- `<type>[<scope>][!]: <description>` — the description can be empty.
|
|
22
|
-
- **Header length**:
|
|
23
|
-
- Max 120 characters (hard limit)
|
|
24
|
-
- Warning if over 50 or 72 characters.
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## 🔧 Installation
|
|
29
|
-
|
|
30
|
-
### 1. Copy Hooks to `.git/hooks/`
|
|
31
|
-
|
|
32
|
-
Run the following commands under project's directory:
|
|
33
|
-
```bash
|
|
34
|
-
cp .git-hooks/commit-msg .git/hooks/commit-msg
|
|
35
|
-
chmod +x .git/hooks/commit-msg
|
|
36
|
-
```
|
package/.git-hooks/commit-msg
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
COMMIT_MSG_FILE="$1"
|
|
4
|
-
COMMIT_MSG_FIRST_LINE=$(head -n1 "$COMMIT_MSG_FILE")
|
|
5
|
-
|
|
6
|
-
# 1. Skip "Merge branch ..." commits
|
|
7
|
-
if echo "$COMMIT_MSG_FIRST_LINE" | grep -qE "^Merge branch "; then
|
|
8
|
-
exit 0
|
|
9
|
-
fi
|
|
10
|
-
|
|
11
|
-
# 2. Skip interactive rebase auto-commits
|
|
12
|
-
if echo "$COMMIT_MSG_FIRST_LINE" | grep -qE "^(pick|reword|edit|squash|fixup|exec) "; then
|
|
13
|
-
exit 0
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
# Allowed Conventional Commit types (v1.0.0 + release)
|
|
17
|
-
ALLOWED_TYPES="feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert|release"
|
|
18
|
-
|
|
19
|
-
# Regex – type(scope)!?: description (description required)
|
|
20
|
-
FIRST_LINE_REGEX="^(${ALLOWED_TYPES})(\([^\)]+\))?(!)?: [^ ].+$"
|
|
21
|
-
|
|
22
|
-
error() {
|
|
23
|
-
echo "⛔ Error: $1"
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
warn() {
|
|
27
|
-
echo "⚠️ Warning: $1"
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
# 3. Validate header format
|
|
31
|
-
if ! echo "$COMMIT_MSG_FIRST_LINE" | grep -qE "${FIRST_LINE_REGEX}"; then
|
|
32
|
-
error "Commit mesajı başlığı Conventional Commits v1.0.0 formatına uymuyor."
|
|
33
|
-
echo "Mevcut mesaj: \"$COMMIT_MSG_FIRST_LINE\""
|
|
34
|
-
echo ""
|
|
35
|
-
echo "Beklenen format: <tip>[<scope>][!]: <açıklama>"
|
|
36
|
-
echo "Geçerli tipler: ${ALLOWED_TYPES}"
|
|
37
|
-
exit 1
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
# 4. Header length check (max 120 chars)
|
|
41
|
-
HEADER_LENGTH=${#COMMIT_MSG_FIRST_LINE}
|
|
42
|
-
if [ "$HEADER_LENGTH" -gt 120 ]; then
|
|
43
|
-
error "İlk satır 120 karakteri aşıyor. (Mevcut uzunluk: $HEADER_LENGTH)"
|
|
44
|
-
exit 1
|
|
45
|
-
elif [ "$HEADER_LENGTH" -gt 72 ]; then
|
|
46
|
-
warn "İlk satır 72 karakterden uzun. (Mevcut uzunluk: $HEADER_LENGTH)"
|
|
47
|
-
fi
|
|
48
|
-
|
|
49
|
-
# 5. Body check (optional)
|
|
50
|
-
LINE_NO=0
|
|
51
|
-
while IFS= read -r line; do
|
|
52
|
-
LINE_NO=$((LINE_NO + 1))
|
|
53
|
-
# Second line should be empty if body exists
|
|
54
|
-
if [ "$LINE_NO" -eq 2 ] && [ -n "$line" ]; then
|
|
55
|
-
warn "İkinci satır boş olmalı (body varsa)."
|
|
56
|
-
fi
|
|
57
|
-
done < "$COMMIT_MSG_FILE"
|
|
58
|
-
|
|
59
|
-
# 6. BREAKING CHANGE footer check
|
|
60
|
-
if grep -qE '^BREAKING CHANGE: ' "$COMMIT_MSG_FILE"; then
|
|
61
|
-
if ! grep -qE '^BREAKING CHANGE: .{1,}' "$COMMIT_MSG_FILE"; then
|
|
62
|
-
error "BREAKING CHANGE açıklaması boş olamaz."
|
|
63
|
-
exit 1
|
|
64
|
-
fi
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
|
-
# 7. Append JIRA ID from branch name
|
|
68
|
-
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
|
|
69
|
-
JIRA_ID=$(echo "$BRANCH_NAME" | grep -oE 'MOB-[0-9]+')
|
|
70
|
-
|
|
71
|
-
if [ -n "$JIRA_ID" ]; then
|
|
72
|
-
if ! grep -q "$JIRA_ID" "$COMMIT_MSG_FILE"; then
|
|
73
|
-
{
|
|
74
|
-
echo ""
|
|
75
|
-
echo "#Ref: $JIRA_ID"
|
|
76
|
-
} >> "$COMMIT_MSG_FILE"
|
|
77
|
-
echo "ℹ️ Task ID referans olarak eklendi: $JIRA_ID"
|
|
78
|
-
fi
|
|
79
|
-
fi
|
|
80
|
-
|
|
81
|
-
echo "✅ Commit mesajı Conventional Commits v1.0.0 kurallarına uygun."
|
|
82
|
-
exit 0
|
|
83
|
-
|
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}"
|