@scandipwa/magento-scripts 2.4.5-alpha.0 → 2.4.5
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.
|
@@ -25,32 +25,39 @@ if [ -z "$CHANGED_FILES" ]; then
|
|
|
25
25
|
exit 0
|
|
26
26
|
fi
|
|
27
27
|
|
|
28
|
+
# Extract the first directory name from changed composer files
|
|
29
|
+
CHANGED_DIR=$(basename "$(git rev-parse --show-toplevel)")
|
|
30
|
+
|
|
31
|
+
# Get branch names from refs
|
|
32
|
+
OLD_BRANCH=$(git name-rev --name-only "$OLD_REF" 2>/dev/null | sed 's/^remotes\///' || echo "$OLD_REF")
|
|
33
|
+
NEW_BRANCH=$(git name-rev --name-only "$NEW_REF" 2>/dev/null | sed 's/^remotes\///' || echo "$NEW_REF")
|
|
34
|
+
|
|
28
35
|
MESSAGE_TITLE="Composer dependencies changed"
|
|
29
|
-
MESSAGE_BODY="
|
|
36
|
+
MESSAGE_BODY="Changes detected in: $CHANGED_DIR\nBranch: $OLD_BRANCH → $NEW_BRANCH\n\nPlease run composer install or npm run start"
|
|
30
37
|
|
|
31
38
|
# Cross-platform desktop notification with multiple fallbacks
|
|
32
39
|
send_notification() {
|
|
33
40
|
local title="$1"
|
|
34
41
|
local body="$2"
|
|
35
|
-
|
|
42
|
+
|
|
36
43
|
# Try Linux notify-send first
|
|
37
44
|
if command -v notify-send >/dev/null 2>&1; then
|
|
38
45
|
notify-send -u normal -t 8000 "$title" "$body"
|
|
39
46
|
return 0
|
|
40
47
|
fi
|
|
41
|
-
|
|
48
|
+
|
|
42
49
|
# Try macOS terminal-notifier
|
|
43
50
|
if command -v terminal-notifier >/dev/null 2>&1; then
|
|
44
51
|
terminal-notifier -title "$title" -message "$body" -timeout 8
|
|
45
52
|
return 0
|
|
46
53
|
fi
|
|
47
|
-
|
|
54
|
+
|
|
48
55
|
# Try macOS osascript (AppleScript) as fallback
|
|
49
56
|
if command -v osascript >/dev/null 2>&1; then
|
|
50
57
|
osascript -e "display notification \"$body\" with title \"$title\""
|
|
51
58
|
return 0
|
|
52
59
|
fi
|
|
53
|
-
|
|
60
|
+
|
|
54
61
|
# Final fallback to stdout
|
|
55
62
|
echo "$title"
|
|
56
63
|
echo "$body"
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Scripts and configuration used by CMA.",
|
|
4
4
|
"homepage": "https://docs.create-magento-app.com/",
|
|
5
5
|
"repository": "github:scandipwa/create-magento-app",
|
|
6
|
-
"version": "2.4.5
|
|
6
|
+
"version": "2.4.5",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"types": "./typings/index.d.ts",
|
|
9
9
|
"license": "OSL-3.0",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"@types/node": "^20.14.11",
|
|
60
60
|
"@types/yargs": "^17.0.32"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "1251d345bd3105a6ce83dd6041c05dad345ba9b7"
|
|
63
63
|
}
|