@@ -15,26 +15,22 @@ const debug = _debug('cs:sandbox:packager');
1515
1616const VERSION = 1 ;
1717
18- const BUCKET_URL =
19- process . env . NODE_ENV === 'production' || process . env . NODE_ENV === 'test'
20- ? 'https://dev- packager-packages.codesandbox.io'
21- : 'https://d1jyvh0kxilfa7.cloudfront.net' ;
22-
23- const NEW_PACKAGER_URL =
24- 'https://aiwi8rnkp5.execute-api.eu-west-1.amazonaws.com/prod/packages' ;
25-
26- const PACKAGER_URL =
27- process . env . NODE_ENV === 'production' || process . env . NODE_ENV === 'test'
28- ? 'https://xi5p9f7czk.execute-api.eu-west-1.amazonaws.com/dev/packages'
29- : 'https://drq28qbjmc.execute-api.eu-west-1.amazonaws.com/prod/packages' ;
18+ // eslint-disable-next-line
19+ const DEV_URLS = {
20+ packager :
21+ 'https://xi5p9f7czk.execute-api.eu-west-1.amazonaws.com/dev/packages' ,
22+ bucket : 'https://dev-packager-packages.codesandbox.io' ,
23+ } ;
24+ // eslint-disable-next-line
25+ const PROD_URLS = {
26+ packager :
27+ 'https://aiwi8rnkp5.execute-api.eu-west-1.amazonaws.com/prod/packages/' ,
28+ bucket : 'https://prod-packager-packages.codesandbox.io' ,
29+ } ;
3030
31- function warmupPackager ( url : string , method = 'GET' ) {
32- fetch ( url , {
33- method,
34- } )
35- . then ( ( ) => { } )
36- . catch ( ( ) => { } ) ;
37- }
31+ const URLS = PROD_URLS ;
32+ const BUCKET_URL = URLS . bucket ;
33+ const PACKAGER_URL = URLS . packager ;
3834
3935function callApi ( url : string , method = 'GET' ) {
4036 return fetch ( url , {
@@ -131,7 +127,6 @@ async function getDependencies(
131127 showFullScreen : showLoadingFullScreen ,
132128 } ) ;
133129
134- warmupPackager ( `${ NEW_PACKAGER_URL } /${ dependencyUrl } ` , 'POST' ) ;
135130 try {
136131 const bucketManifest = await callApi (
137132 `${ BUCKET_URL } /${ bucketDependencyUrl } `
0 commit comments