Skip to content

Commit 08ee1cd

Browse files
committed
Add postinstall and postupdate scripts to fetch regions.json
1 parent 0839d33 commit 08ee1cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040
"pretest": "rimraf coverage && npm run lint",
4141
"precommit": "npm run lint",
4242
"prepush": "npm run test:unit",
43-
"husky-check": "npx husky && chmod +x .husky/pre-commit"
43+
"husky-check": "npx husky && chmod +x .husky/pre-commit",
44+
"postinstall": "curl -s --max-time 30 --fail https://artifacts.contentstack.com/regions.json -o lib/assets/regions.json || echo 'Warning: Failed to download regions.json, using existing file if available'",
45+
"postupdate": "curl -s --max-time 30 --fail https://artifacts.contentstack.com/regions.json -o lib/assets/regions.json || echo 'Warning: Failed to download regions.json, using existing file if available'"
4446
},
4547
"repository": {
4648
"type": "git",

0 commit comments

Comments
 (0)