|
24 | 24 | "test": "npm run clear:reports && jest --ci --json --coverage --testLocationInResults --outputFile=./reports/report.json", |
25 | 25 | "test:badges": "npm run clear:badges && npm run test && jest-coverage-badges --input ./reports/coverage/coverage-summary.json --output ./badges", |
26 | 26 | "test:debug": "jest --watchAll --runInBand", |
27 | | - "prebuild": "rimraf dist && mkdir -p dist/lib && curl -s --max-time 30 --fail https://artifacts.contentstack.com/regions.json -o dist/lib/regions.json || echo 'Warning: Failed to download regions.json'", |
| 27 | + "prebuild": "rimraf dist && mkdir -p dist/lib && npm run download-regions", |
| 28 | + "download-regions": "curl -s --max-time 30 --fail https://artifacts.contentstack.com/regions.json -o dist/lib/regions.json || echo 'Warning: Failed to download regions.json'", |
28 | 29 | "build": "tsc && rollup -c", |
29 | 30 | "format": "prettier --write \"src/**/*.ts\"", |
30 | 31 | "prepare": "husky install && npm run build", |
31 | 32 | "prepublishOnly": "npm test", |
32 | 33 | "pre-commit": "husky install && husky && chmod +x .husky/pre-commit && ./.husky/pre-commit", |
33 | 34 | "version": "npm run format && git add -A src", |
34 | 35 | "postversion": "git push && git push --tags", |
35 | | - "postinstall": "curl -s --max-time 30 --fail https://artifacts.contentstack.com/regions.json -o dist/lib/regions.json || echo 'Warning: Failed to download regions.json, using existing file if available'", |
36 | | - "postupdate": "curl -s --max-time 30 --fail https://artifacts.contentstack.com/regions.json -o dist/lib/regions.json || echo 'Warning: Failed to download regions.json, using existing file if available'" |
| 36 | + "postinstall": "npm run download-regions", |
| 37 | + "postupdate": "npm run download-regions" |
37 | 38 | }, |
38 | 39 | "author": "Contentstack", |
39 | 40 | "license": "MIT", |
|
0 commit comments