@@ -4,11 +4,17 @@ const cleanDeep = require('clean-deep')
44const rimraf = promisify ( require ( 'rimraf' ) )
55const tempy = require ( 'tempy' )
66
7+ const {
8+ DEFAULT_DEPLOY_TIMEOUT ,
9+ DEFAULT_CONCURRENT_HASH ,
10+ DEFAULT_CONCURRENT_UPLOAD ,
11+ DEFAULT_SYNC_LIMIT ,
12+ DEFAULT_MAX_RETRY ,
13+ } = require ( './constants' )
714const hashFiles = require ( './hash_files' )
815const hashFns = require ( './hash_fns' )
916const uploadFiles = require ( './upload_files' )
10- const { waitForDiff } = require ( './util' )
11- const { waitForDeploy, getUploadList, defaultFilter } = require ( './util' )
17+ const { waitForDiff, waitForDeploy, getUploadList, defaultFilter } = require ( './util' )
1218
1319const deploySite = async ( api , siteId , dir , opts ) => {
1420 opts = {
@@ -18,17 +24,12 @@ const deploySite = async (api, siteId, dir, opts) => {
1824 // API calls this the 'title'
1925 message : undefined ,
2026 tmpDir : tempy . directory ( ) ,
21- // local deploy timeout: 20 mins
22- deployTimeout : 1.2e6 ,
23- // concurrent file hash calls
24- concurrentHash : 100 ,
25- // Number of concurrent uploads
26- concurrentUpload : 5 ,
27+ deployTimeout : DEFAULT_DEPLOY_TIMEOUT ,
28+ concurrentHash : DEFAULT_CONCURRENT_HASH ,
29+ concurrentUpload : DEFAULT_CONCURRENT_UPLOAD ,
2730 filter : defaultFilter ,
28- // number of files
29- syncFileLimit : 100 ,
30- // number of times to retry an upload
31- maxRetry : 5 ,
31+ syncFileLimit : DEFAULT_SYNC_LIMIT ,
32+ maxRetry : DEFAULT_MAX_RETRY ,
3233 statusCb : ( ) => {
3334 /* default to noop */
3435 // statusObj: {
0 commit comments