File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
packages/app/src/sandbox/npm Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,25 @@ const VERSION = 1;
1818
1919const BUCKET_URL =
2020 process . env . NODE_ENV === 'production' || process . env . NODE_ENV === 'test'
21- ? 'https://prod-packager-packages.codesandbox.io '
21+ ? 'https://d1jyvh0kxilfa7.cloudfront.net '
2222 : 'https://dev-packager-packages.codesandbox.io' ;
2323
24+ const NEW_PACKAGER_URL =
25+ 'https://aiwi8rnkp5.execute-api.eu-west-1.amazonaws.com/prod/packages' ;
26+
2427const PACKAGER_URL =
2528 process . env . NODE_ENV === 'production' || process . env . NODE_ENV === 'test'
26- ? 'https://aiwi8rnkp5 .execute-api.eu-west-1.amazonaws.com/prod/packages'
29+ ? 'https://drq28qbjmc .execute-api.eu-west-1.amazonaws.com/prod/packages'
2730 : 'https://xi5p9f7czk.execute-api.eu-west-1.amazonaws.com/dev/packages' ;
2831
32+ function warmupPackager ( url : string , method = 'GET' ) {
33+ fetch ( url , {
34+ method,
35+ } )
36+ . then ( ( ) => { } )
37+ . catch ( ( ) => { } ) ;
38+ }
39+
2940function callApi ( url : string , method = 'GET' ) {
3041 return fetch ( url , {
3142 method,
@@ -111,6 +122,7 @@ async function getDependencies(dependencies: Object) {
111122 const bucketDependencyUrl = dependenciesToBucketPath ( absoluteDependencies ) ;
112123
113124 setScreen ( { type : 'loading' , text : 'Downloading Dependencies...' } ) ;
125+ warmupPackager ( `${ NEW_PACKAGER_URL } /${ dependencyUrl } ` , 'POST' ) ;
114126 try {
115127 const bucketManifest = await callApi (
116128 `${ BUCKET_URL } /${ bucketDependencyUrl } `
You can’t perform that action at this time.
0 commit comments