@cloudcommerce/cli 2.25.8 → 2.26.0
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/ci/bunny-config-base.sh +92 -53
- package/ci/bunny-setup.sh +2 -1
- package/package.json +3 -3
package/ci/bunny-config-base.sh
CHANGED
|
@@ -15,6 +15,7 @@ fi
|
|
|
15
15
|
|
|
16
16
|
project_id=$1
|
|
17
17
|
domain=$2
|
|
18
|
+
swr_origin_url=$3
|
|
18
19
|
|
|
19
20
|
response=$(curl --silent --request GET \
|
|
20
21
|
--url https://api.bunny.net/pullzone \
|
|
@@ -169,68 +170,127 @@ configure_edge_rule '
|
|
|
169
170
|
]
|
|
170
171
|
}
|
|
171
172
|
],
|
|
172
|
-
"Description": "
|
|
173
|
+
"Description": "Privates bypass CDN cache",
|
|
173
174
|
"Enabled": true
|
|
174
175
|
}
|
|
175
176
|
'
|
|
176
177
|
|
|
177
|
-
|
|
178
|
+
if [ -n "$swr_origin_url" ]; then
|
|
179
|
+
configure_edge_rule '
|
|
178
180
|
{
|
|
179
|
-
"ActionType":
|
|
181
|
+
"ActionType": 2,
|
|
182
|
+
"ActionParameter1": "'$swr_origin_url'",
|
|
183
|
+
"ActionParameter2": "",
|
|
180
184
|
"TriggerMatchingType": 1,
|
|
181
|
-
"ActionParameter1": "600",
|
|
182
185
|
"Triggers": [
|
|
183
186
|
{
|
|
184
187
|
"Type": 0,
|
|
185
|
-
"PatternMatchingType": 0,
|
|
186
188
|
"PatternMatches": [
|
|
187
|
-
"
|
|
188
|
-
"
|
|
189
|
-
"*/
|
|
190
|
-
"
|
|
191
|
-
"
|
|
192
|
-
]
|
|
189
|
+
"*/_astro/*",
|
|
190
|
+
"*/img/*",
|
|
191
|
+
"*/assets/*",
|
|
192
|
+
"*/_api/*",
|
|
193
|
+
"*/admin/*"
|
|
194
|
+
],
|
|
195
|
+
"PatternMatchingType": 2,
|
|
196
|
+
"Parameter1": ""
|
|
193
197
|
},
|
|
194
198
|
{
|
|
195
|
-
"Type":
|
|
196
|
-
"PatternMatchingType": 0,
|
|
199
|
+
"Type": 0,
|
|
197
200
|
"PatternMatches": [
|
|
198
|
-
"
|
|
199
|
-
"
|
|
200
|
-
]
|
|
201
|
+
"*/_image",
|
|
202
|
+
"*/_analytics"
|
|
203
|
+
],
|
|
204
|
+
"PatternMatchingType": 2,
|
|
205
|
+
"Parameter1": ""
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"Type": 3,
|
|
209
|
+
"PatternMatches": [
|
|
210
|
+
"webp",
|
|
211
|
+
"png",
|
|
212
|
+
"jpg",
|
|
213
|
+
"woff2",
|
|
214
|
+
"mp4"
|
|
215
|
+
],
|
|
216
|
+
"PatternMatchingType": 2,
|
|
217
|
+
"Parameter1": ""
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"Type": 3,
|
|
221
|
+
"PatternMatches": [
|
|
222
|
+
"js",
|
|
223
|
+
"css"
|
|
224
|
+
],
|
|
225
|
+
"PatternMatchingType": 2,
|
|
226
|
+
"Parameter1": ""
|
|
201
227
|
}
|
|
202
228
|
],
|
|
203
|
-
"Description": "
|
|
229
|
+
"Description": "Persistent SWR proxy",
|
|
204
230
|
"Enabled": true
|
|
205
231
|
}
|
|
206
232
|
'
|
|
233
|
+
fi
|
|
207
234
|
|
|
208
235
|
configure_edge_rule '
|
|
209
236
|
{
|
|
210
237
|
"ActionType": 15,
|
|
211
|
-
"TriggerMatchingType":
|
|
238
|
+
"TriggerMatchingType": 1,
|
|
212
239
|
"Triggers": [
|
|
213
240
|
{
|
|
214
241
|
"Type": 0,
|
|
215
|
-
"PatternMatchingType": 0,
|
|
216
242
|
"PatternMatches": [
|
|
217
|
-
"*/
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
"*/.*"
|
|
222
|
-
]
|
|
243
|
+
"*/_astro/*"
|
|
244
|
+
],
|
|
245
|
+
"PatternMatchingType": 2,
|
|
246
|
+
"Parameter1": ""
|
|
223
247
|
},
|
|
248
|
+
{
|
|
249
|
+
"Type": 3,
|
|
250
|
+
"PatternMatches": [
|
|
251
|
+
"webp",
|
|
252
|
+
"png",
|
|
253
|
+
"jpg",
|
|
254
|
+
"woff2",
|
|
255
|
+
"mp4"
|
|
256
|
+
],
|
|
257
|
+
"PatternMatchingType": 2,
|
|
258
|
+
"Parameter1": ""
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
"Description": "SSR bypass perma-cache",
|
|
262
|
+
"Enabled": true
|
|
263
|
+
}
|
|
264
|
+
'
|
|
265
|
+
|
|
266
|
+
configure_edge_rule '
|
|
267
|
+
{
|
|
268
|
+
"ActionType": 3,
|
|
269
|
+
"ActionParameter1": "240",
|
|
270
|
+
"TriggerMatchingType": 1,
|
|
271
|
+
"Triggers": [
|
|
224
272
|
{
|
|
225
273
|
"Type": 0,
|
|
226
|
-
"PatternMatchingType": 0,
|
|
227
274
|
"PatternMatches": [
|
|
228
|
-
"
|
|
229
|
-
|
|
230
|
-
|
|
275
|
+
"*/_astro/*"
|
|
276
|
+
],
|
|
277
|
+
"PatternMatchingType": 2,
|
|
278
|
+
"Parameter1": ""
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"Type": 3,
|
|
282
|
+
"PatternMatches": [
|
|
283
|
+
"webp",
|
|
284
|
+
"png",
|
|
285
|
+
"jpg",
|
|
286
|
+
"woff2",
|
|
287
|
+
"mp4"
|
|
288
|
+
],
|
|
289
|
+
"PatternMatchingType": 2,
|
|
290
|
+
"Parameter1": ""
|
|
231
291
|
}
|
|
232
292
|
],
|
|
233
|
-
"Description": "
|
|
293
|
+
"Description": "Reset SSR CDN cache",
|
|
234
294
|
"Enabled": true
|
|
235
295
|
}
|
|
236
296
|
'
|
|
@@ -240,6 +300,7 @@ configure_edge_rule '
|
|
|
240
300
|
"ActionType": 16,
|
|
241
301
|
"ActionParameter1": "120",
|
|
242
302
|
"ActionParameter2": null,
|
|
303
|
+
"TriggerMatchingType": 1,
|
|
243
304
|
"Triggers": [
|
|
244
305
|
{
|
|
245
306
|
"Type": 0,
|
|
@@ -262,8 +323,7 @@ configure_edge_rule '
|
|
|
262
323
|
"Parameter1": ""
|
|
263
324
|
}
|
|
264
325
|
],
|
|
265
|
-
"
|
|
266
|
-
"Description": "SSR browser cache",
|
|
326
|
+
"Description": "Reset SSR browser cache",
|
|
267
327
|
"Enabled": true
|
|
268
328
|
}
|
|
269
329
|
'
|
|
@@ -333,24 +393,3 @@ configure_edge_rule '
|
|
|
333
393
|
"Enabled": true
|
|
334
394
|
}
|
|
335
395
|
'
|
|
336
|
-
|
|
337
|
-
configure_edge_rule '
|
|
338
|
-
{
|
|
339
|
-
"ActionType": 5,
|
|
340
|
-
"ActionParameter1": "Content-Type",
|
|
341
|
-
"ActionParameter2": "text/html",
|
|
342
|
-
"Triggers": [
|
|
343
|
-
{
|
|
344
|
-
"Type": 2,
|
|
345
|
-
"PatternMatchingType": 0,
|
|
346
|
-
"PatternMatches": [
|
|
347
|
-
"application/octet-stream"
|
|
348
|
-
],
|
|
349
|
-
"Parameter1": "Content-Type"
|
|
350
|
-
}
|
|
351
|
-
],
|
|
352
|
-
"TriggerMatchingType": 1,
|
|
353
|
-
"Description": "Force mime text/html",
|
|
354
|
-
"Enabled": true
|
|
355
|
-
}
|
|
356
|
-
'
|
package/ci/bunny-setup.sh
CHANGED
|
@@ -11,6 +11,7 @@ fi
|
|
|
11
11
|
|
|
12
12
|
project_id=$1
|
|
13
13
|
domain=$2
|
|
14
|
+
swr_origin_url=$3
|
|
14
15
|
|
|
15
16
|
storage_list=$(curl --silent --request GET \
|
|
16
17
|
--url https://api.bunny.net/storagezone \
|
|
@@ -99,5 +100,5 @@ if [ -n "$domain" ]; then
|
|
|
99
100
|
printf "\n\n> Added hostname \"$domain\" to pull zone"
|
|
100
101
|
|
|
101
102
|
script_dir=$(dirname $0)
|
|
102
|
-
bash $script_dir/bunny-config-base.sh $project_id $domain
|
|
103
|
+
bash $script_dir/bunny-config-base.sh $project_id $domain $swr_origin_url
|
|
103
104
|
fi
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.26.0",
|
|
5
5
|
"description": "e-com.plus Cloud Commerce CLI tools",
|
|
6
6
|
"bin": {
|
|
7
7
|
"cloudcommerce": "./bin/run.mjs"
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@fastify/deepmerge": "^2.0.0",
|
|
34
34
|
"dotenv": "^16.4.5",
|
|
35
|
-
"libsodium-wrappers": "^0.7.
|
|
35
|
+
"libsodium-wrappers": "^0.7.15",
|
|
36
36
|
"md5": "^2.3.0",
|
|
37
37
|
"typescript": "~5.5.4",
|
|
38
38
|
"zx": "^8.1.4",
|
|
39
|
-
"@cloudcommerce/api": "2.
|
|
39
|
+
"@cloudcommerce/api": "2.26.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "bash ../../scripts/build-lib.sh"
|