customerio-gist-web 3.15.2 → 3.15.4
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/.github/workflows/release.yml +37 -1
- package/README.md +1 -9
- package/package.json +1 -2
|
@@ -13,6 +13,8 @@ jobs:
|
|
|
13
13
|
AWS_ACCESS_KEY_ID: ${{ secrets.GIST_WEB_AWS_KEY_ID }}
|
|
14
14
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.GIST_WEB_AWS_SECRET_ACCESS_KEY }}
|
|
15
15
|
AWS_BUCKET: 'gist-code'
|
|
16
|
+
CLOUDFLARE_ACCESS_TOKEN: ${{ secrets.CLOUDFLARE_ACCESS_TOKEN }}
|
|
17
|
+
CLOUDFLARE_ZONE_ID: 3310bc68d22035edbc12d5d4a4fd278c
|
|
16
18
|
steps:
|
|
17
19
|
- uses: actions/checkout@v3
|
|
18
20
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
@@ -45,4 +47,38 @@ jobs:
|
|
|
45
47
|
- name: Publish to NPM
|
|
46
48
|
uses: JS-DevTools/npm-publish@9ff4ebfbe48473265867fb9608c047e7995edfa3 # v3.1.1
|
|
47
49
|
with:
|
|
48
|
-
token: ${{ secrets.NPM_TOKEN }}
|
|
50
|
+
token: ${{ secrets.NPM_TOKEN }}
|
|
51
|
+
- name: Update Cloudflare rules
|
|
52
|
+
shell: bash
|
|
53
|
+
run: |
|
|
54
|
+
# Page rules to update
|
|
55
|
+
RULE_IDS=("dc150d61da87159be0d27ed58202902d","b32d2e6078f38cb799418a89e48f63ea")
|
|
56
|
+
|
|
57
|
+
for RULE_ID in "${RULE_IDS[@]}"; do
|
|
58
|
+
echo "Fetching rule $RULE_ID..."
|
|
59
|
+
|
|
60
|
+
RESPONSE=$(curl -s -X GET "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE_ID/pagerules/$RULE_ID" \
|
|
61
|
+
-H "Authorization: Bearer $CLOUDFLARE_ACCESS_TOKEN" \
|
|
62
|
+
-H "Content-Type: application/json")
|
|
63
|
+
|
|
64
|
+
SUCCESS=$(echo "$RESPONSE" | jq -r '.success')
|
|
65
|
+
if [[ "$SUCCESS" != "true" ]]; then
|
|
66
|
+
echo "❌ Failed to fetch rule $RULE_ID"
|
|
67
|
+
echo "$RESPONSE" | jq
|
|
68
|
+
exit 1
|
|
69
|
+
fi
|
|
70
|
+
|
|
71
|
+
RULE_BODY=$(echo "$RESPONSE" | jq '.result')
|
|
72
|
+
|
|
73
|
+
echo "Modifying rule for version $RELEASE_VERSION..."
|
|
74
|
+
UPDATED_RULE=$(echo "$RULE_BODY" | jq \
|
|
75
|
+
--arg version "$RELEASE_VERSION" \
|
|
76
|
+
'(.actions[] | select(.id == "forwarding_url") | .value.url) = "https://code.gist.build/web/" + $version + "/gist.min.js"')
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
echo "Sending updated rule back to Cloudflare..."
|
|
80
|
+
curl -s -X PUT "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE_ID/pagerules/$RULE_ID" \
|
|
81
|
+
-H "Authorization: Bearer $CLOUDFLARE_ACCESS_TOKEN" \
|
|
82
|
+
-H "Content-Type: application/json" \
|
|
83
|
+
--data "$UPDATED_RULE"
|
|
84
|
+
done
|
package/README.md
CHANGED
|
@@ -26,12 +26,4 @@
|
|
|
26
26
|
|
|
27
27
|
- Merge PR into master
|
|
28
28
|
- Head over to the repo's hotfix release [action page](https://github.com/customerio/gist-web/actions/workflows/release_hotfix.yml).
|
|
29
|
-
- Select **Run Workflow**
|
|
30
|
-
|
|
31
|
-
### Update Cloudflare
|
|
32
|
-
|
|
33
|
-
The above processes push the changes to NPM and GitHub. However, customers using our Track SDK fetch the latest version automatically; we accomplish this by routing through Cloudflare page rules.
|
|
34
|
-
|
|
35
|
-
- Head over to [Cloudflare](https://dash.cloudflare.com/) Page Rules section for the `gist.build` domain.
|
|
36
|
-
- Update `https://code.gist.build/web/latest/gist.min.js` for latest version
|
|
37
|
-
- Update `https://code.gist.build/web/beta/gist.min.js` for beta testing
|
|
29
|
+
- Select **Run Workflow**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "customerio-gist-web",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.4",
|
|
4
4
|
"description": "Build beautiful in-app flows with no code and deliver them instantly to your app. http://customer.io",
|
|
5
5
|
"private": false,
|
|
6
6
|
"scripts": {
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
"webpack-cli": "^5.1.4"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"axios": "^0.28.1",
|
|
30
29
|
"uuid": "^8.3.2"
|
|
31
30
|
},
|
|
32
31
|
"repository": {
|