@leverege/build-tools 2.21.9-nick.1 → 2.21.9-nick.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env.temp ADDED
@@ -0,0 +1,18 @@
1
+ THEFT_RECOVERY_URL='theft.recovermycar.com'
2
+ MAPBOX_APIKEY=pk.eyJ1IjoibGV2ZXJlZ2UiLCJhIjoiY2p1Y3E0cWpkMG15azQzbnFzaDY2dmhiMSJ9.7N25h5jsjO2Aq_YmiLrAJw
3
+ APPEARANCE_PROJECT_ID=7b2GTbmsZj3f5VdFpjGM8O
4
+ INTERCOM_APP_ID='ec0qbuwi'
5
+ LOCATOR_ALIAS_KEY='serialNumber'
6
+ RECOVR_BILLING_MODULE='recovrBilling'
7
+ IMAGINE_HOST=https://leverege-sandbox-imagine-api.leverege.com
8
+ RECOVR_HOST=https://dev-recovr-notify.leverege.com
9
+ # RECOVR_HOST=http://localhost:8296
10
+ SYSTEM_ID=0UTmPFvRHXYLMlT4Kl2z1K
11
+ PROJECT_ID=08HBeHEYGxu5Bg4TCCnAAV
12
+ VEHICLE_NETWORK_ID='dev-dealership-vehicles'
13
+ CONSUMER_VEHICLE_NETWORK_ID='dev-customer-vehicles'
14
+ LOCATOR_NETWORK_ID='dev-recovr-tracker'
15
+ BEACON_NETWORK_ID='dev-dealership-beacons'
16
+ SALE_LOCATION_PARENT_PATH=sales
17
+ CONSUMER_LOCATION_ID=1KceIcZlVWrOBvCzsEXYud
18
+ IS_DEV=true
package/.firebaserc CHANGED
@@ -1,47 +1,40 @@
1
1
  {
2
2
  "projects": {
3
3
  "default": "leverege-sandbox",
4
- "dev-keys": "leverege-dev-nick",
5
- "prd-indoor-zoning" : "prd-indoor-zoning"
4
+ "stg-recovr-auto": "stg-recovr-auto",
5
+ "prd-recovr-auto":"prd-recovr-auto"
6
6
  },
7
7
  "targets": {
8
8
  "leverege-sandbox": {
9
9
  "hosting": {
10
- "dev-izg": [
11
- "dev-izg"
10
+ "recovr": [
11
+ "dev"
12
12
  ],
13
- "dev-olive-indoor-zoning": [
14
- "dev-olive-indoor-zoning"
13
+ "dev-obd-recovr": [
14
+ "dev-obd"
15
15
  ]
16
16
  }
17
17
  },
18
- "leverege-dev-nick": {
18
+ "stg-recovr-auto": {
19
19
  "hosting": {
20
- "dev-keys": [
21
- "dev-keys"
20
+ "stg-recovr": [
21
+ "stg"
22
+ ],
23
+ "stg-obd-recovr": [
24
+ "stg-obd"
22
25
  ]
23
26
  }
24
27
  },
25
- "prd-indoor-zoning": {
28
+ "prd-recovr-auto": {
26
29
  "hosting": {
27
- "prd-indoor-zoning-ui": [
28
- "prd-indoor-zoning-ui"
29
- ],
30
- "prd-olive-indoor-zoning-ui": [
31
- "prd-olive-indoor-zoning-ui"
30
+ "recovr-auto": [
31
+ "prd"
32
32
  ],
33
- "prd-keys": [
34
- "prd-keys"
33
+ "prd-obd-recovr":[
34
+ "prd-obd"
35
35
  ]
36
36
  },
37
37
  "production": true
38
- },
39
- "stg-indoor-zoning-pen-test": {
40
- "hosting": {
41
- "stg-indoor-zoning-ui": [
42
- "stg-indoor-zoning-ui"
43
- ]
44
- }
45
38
  }
46
39
  }
47
40
  }
package/.firebasercizg ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "projects": {
3
+ "default": "leverege-sandbox",
4
+ "dev-keys": "leverege-dev-nick",
5
+ "prd-indoor-zoning" : "prd-indoor-zoning"
6
+ },
7
+ "targets": {
8
+ "leverege-sandbox": {
9
+ "hosting": {
10
+ "dev-izg": [
11
+ "dev-izg"
12
+ ],
13
+ "dev-olive-indoor-zoning": [
14
+ "dev-olive-indoor-zoning"
15
+ ]
16
+ }
17
+ },
18
+ "leverege-dev-nick": {
19
+ "hosting": {
20
+ "dev-keys": [
21
+ "dev-keys"
22
+ ]
23
+ }
24
+ },
25
+ "prd-indoor-zoning": {
26
+ "hosting": {
27
+ "prd-indoor-zoning-ui222": [
28
+ "prd-indoor-zoning-ui"
29
+ ],
30
+ "prd-olive-indoor-zoning-ui222": [
31
+ "prd-olive-indoor-zoning-ui"
32
+ ],
33
+ "prd-keys222": [
34
+ "prd-keys"
35
+ ]
36
+ },
37
+ "production": true
38
+ },
39
+ "stg-indoor-zoning-pen-test": {
40
+ "hosting": {
41
+ "stg-indoor-zoning-ui": [
42
+ "stg-indoor-zoning-ui"
43
+ ]
44
+ }
45
+ }
46
+ }
47
+ }
@@ -31,6 +31,7 @@ if (_zx.argv._.length === 1) {
31
31
  CHANNEL.expiration = _zx.argv.channelExpiration ?? '7d';
32
32
  }
33
33
  }
34
+ const INTERACTIVE_MODE = !TARGET;
34
35
  let exited = false;
35
36
  const SECRETS_DIR = 'secrets';
36
37
  const EXIT_EVENTS = ['SIGINT', 'exit', 'uncaughException', 'unhandledRejection'];
@@ -72,7 +73,7 @@ const targets = Object.entries(firebasercContent.targets).reduce((prev, [project
72
73
  });
73
74
  return prev;
74
75
  }, {});
75
- if (!TARGET) {
76
+ if (INTERACTIVE_MODE) {
76
77
  const {
77
78
  targetEnv
78
79
  } = await prompt([{
@@ -83,7 +84,7 @@ if (!TARGET) {
83
84
  const productionLabel = t.production ? _ansiColors.default.bold.red('--PRODUCTION--') : '';
84
85
  return {
85
86
  message: `${_ansiColors.default.bold.cyan('Site: ')}${t.siteId.padEnd(maxPadding)} ${_ansiColors.default.bold.green('Project: ')}${t.projectId} ${productionLabel}`,
86
- value: t.siteId
87
+ value: t.alias
87
88
  };
88
89
  })
89
90
  }]);
@@ -94,7 +95,7 @@ if (!TARGET) {
94
95
  } = await prompt([{
95
96
  type: 'confirm',
96
97
  name: 'confirmProductionDeploy',
97
- message: `${_ansiColors.default.bold.red('WARNING: ')} This is a ${_ansiColors.default.bold.yellow('PRODUCTION')} deployment target. Are you sure you want to proceed?`
98
+ message: `${_ansiColors.default.bold.red('WARNING: ')} This is a ${_ansiColors.default.bold.yellow('PRODUCTION')} environment. Are you sure you want to deploy here?`
98
99
  }]);
99
100
  if (!confirmProductionDeploy) {
100
101
  console.log('Cancelling deployment...');
@@ -155,6 +156,26 @@ if (aliasFileExists) {
155
156
  encoding: 'utf-8'
156
157
  }));
157
158
  }
159
+ if (INTERACTIVE_MODE) {
160
+ console.log(`\n\n\n${_ansiColors.default.bold.green('====== Deployment Summary ======')}`);
161
+ console.log(`${_ansiColors.default.blue('Firebase project:')} ${TARGET.projectId} ${TARGET.production ? _ansiColors.default.yellow('--PRODUCTION--') : ''}`);
162
+ console.log(`${_ansiColors.default.blue('Site ID:')} ${TARGET.siteId}`);
163
+ console.log(`${_ansiColors.default.blue('Channel Name:')} ${CHANNEL?.name ?? _ansiColors.default.italic.gray('(none)')}`);
164
+ console.log(`${_ansiColors.default.blue('Channel Expiration date:')} ${CHANNEL?.name ? CHANNEL.expiration ?? _ansiColors.default.italic.gray('(none)') : _ansiColors.default.italic.gray('(n/a)')}`);
165
+ console.log(`${_ansiColors.default.blue('Shared .env file:')} ${sharedFileExists ? `${SECRETS_DIR}/shared.env` : _ansiColors.default.italic.gray('(none)')}`);
166
+ console.log(`${_ansiColors.default.blue('Additional .env overrides:')} ${aliasFileExists ? `${SECRETS_DIR}/${TARGET.alias}.env` : `${SECRETS_DIR}/${TARGET.siteId}.env`}`);
167
+ const {
168
+ confirmSelections
169
+ } = await prompt([{
170
+ type: 'confirm',
171
+ name: 'confirmSelections',
172
+ message: 'Proceed with this deployment?'
173
+ }]);
174
+ if (!confirmSelections) {
175
+ console.log('Cancelling deployment...');
176
+ process.exit();
177
+ }
178
+ }
158
179
  const envFileContent = (await Promise.all(exec)).join('\n');
159
180
  EXIT_EVENTS.forEach(event => {
160
181
  process.on(event, () => {
@@ -166,7 +187,7 @@ EXIT_EVENTS.forEach(event => {
166
187
  });
167
188
  await _zx.fs.writeFile(_zx.path.join(process.cwd(), '.env.temp'), envFileContent);
168
189
  try {
169
- const deployType = CHANNEL ? `hosting:channel:deploy ${CHANNEL.name} --expires ${CHANNEL.expiration}` : 'deploy';
190
+ const deployType = CHANNEL ? `hosting:channel:deploy ${CHANNEL.name} ${CHANNEL.expiration ? `--expires ${CHANNEL.expiration}` : ''}` : 'deploy';
170
191
  await (0, _zx.$)`npm run clean && DOTENV_CONFIG_PATH=${_zx.path.join(process.cwd(), '.env.temp')} npm run build && firebase use ${TARGET.projectId} && firebase ${deployType} --only hosting:${TARGET.siteId}`;
171
192
  } catch (err) {
172
193
  console.error(err);
@@ -31,6 +31,7 @@ if (_zx.argv._.length === 1) {
31
31
  CHANNEL.expiration = _zx.argv.channelExpiration ?? '7d';
32
32
  }
33
33
  }
34
+ const INTERACTIVE_MODE = !TARGET;
34
35
  let exited = false;
35
36
  const SECRETS_DIR = 'secrets';
36
37
  const EXIT_EVENTS = ['SIGINT', 'exit', 'uncaughException', 'unhandledRejection'];
@@ -72,7 +73,7 @@ const targets = Object.entries(firebasercContent.targets).reduce((prev, [project
72
73
  });
73
74
  return prev;
74
75
  }, {});
75
- if (!TARGET) {
76
+ if (INTERACTIVE_MODE) {
76
77
  const {
77
78
  targetEnv
78
79
  } = await prompt([{
@@ -83,7 +84,7 @@ if (!TARGET) {
83
84
  const productionLabel = t.production ? _ansiColors.default.bold.red('--PRODUCTION--') : '';
84
85
  return {
85
86
  message: `${_ansiColors.default.bold.cyan('Site: ')}${t.siteId.padEnd(maxPadding)} ${_ansiColors.default.bold.green('Project: ')}${t.projectId} ${productionLabel}`,
86
- value: t.siteId
87
+ value: t.alias
87
88
  };
88
89
  })
89
90
  }]);
@@ -94,7 +95,7 @@ if (!TARGET) {
94
95
  } = await prompt([{
95
96
  type: 'confirm',
96
97
  name: 'confirmProductionDeploy',
97
- message: `${_ansiColors.default.bold.red('WARNING: ')} This is a ${_ansiColors.default.bold.yellow('PRODUCTION')} deployment target. Are you sure you want to proceed?`
98
+ message: `${_ansiColors.default.bold.red('WARNING: ')} This is a ${_ansiColors.default.bold.yellow('PRODUCTION')} environment. Are you sure you want to deploy here?`
98
99
  }]);
99
100
  if (!confirmProductionDeploy) {
100
101
  console.log('Cancelling deployment...');
@@ -155,6 +156,26 @@ if (aliasFileExists) {
155
156
  encoding: 'utf-8'
156
157
  }));
157
158
  }
159
+ if (INTERACTIVE_MODE) {
160
+ console.log(`\n\n\n${_ansiColors.default.bold.green('====== Deployment Summary ======')}`);
161
+ console.log(`${_ansiColors.default.blue('Firebase project:')} ${TARGET.projectId} ${TARGET.production ? _ansiColors.default.yellow('--PRODUCTION--') : ''}`);
162
+ console.log(`${_ansiColors.default.blue('Site ID:')} ${TARGET.siteId}`);
163
+ console.log(`${_ansiColors.default.blue('Channel Name:')} ${CHANNEL?.name ?? _ansiColors.default.italic.gray('(none)')}`);
164
+ console.log(`${_ansiColors.default.blue('Channel Expiration date:')} ${CHANNEL?.name ? CHANNEL.expiration ?? _ansiColors.default.italic.gray('(none)') : _ansiColors.default.italic.gray('(n/a)')}`);
165
+ console.log(`${_ansiColors.default.blue('Shared .env file:')} ${sharedFileExists ? `${SECRETS_DIR}/shared.env` : _ansiColors.default.italic.gray('(none)')}`);
166
+ console.log(`${_ansiColors.default.blue('Additional .env overrides:')} ${aliasFileExists ? `${SECRETS_DIR}/${TARGET.alias}.env` : `${SECRETS_DIR}/${TARGET.siteId}.env`}`);
167
+ const {
168
+ confirmSelections
169
+ } = await prompt([{
170
+ type: 'confirm',
171
+ name: 'confirmSelections',
172
+ message: 'Proceed with this deployment?'
173
+ }]);
174
+ if (!confirmSelections) {
175
+ console.log('Cancelling deployment...');
176
+ process.exit();
177
+ }
178
+ }
158
179
  const envFileContent = (await Promise.all(exec)).join('\n');
159
180
  EXIT_EVENTS.forEach(event => {
160
181
  process.on(event, () => {
@@ -166,7 +187,7 @@ EXIT_EVENTS.forEach(event => {
166
187
  });
167
188
  await _zx.fs.writeFile(_zx.path.join(process.cwd(), '.env.temp'), envFileContent);
168
189
  try {
169
- const deployType = CHANNEL ? `hosting:channel:deploy ${CHANNEL.name} --expires ${CHANNEL.expiration}` : 'deploy';
190
+ const deployType = CHANNEL ? `hosting:channel:deploy ${CHANNEL.name} ${CHANNEL.expiration ? `--expires ${CHANNEL.expiration}` : ''}` : 'deploy';
170
191
  await (0, _zx.$)`npm run clean && DOTENV_CONFIG_PATH=${_zx.path.join(process.cwd(), '.env.temp')} npm run build && firebase use ${TARGET.projectId} && firebase ${deployType} --only hosting:${TARGET.siteId}`;
171
192
  } catch (err) {
172
193
  console.error(err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.21.9-nick.1",
3
+ "version": "2.21.9-nick.2",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -0,0 +1,13 @@
1
+ IMAGINE_HOST=https://leverege-sandbox-imagine-api.leverege.com
2
+ RECOVR_HOST=https://dev-recovr-notify.leverege.com
3
+ # RECOVR_HOST=http://localhost:8296
4
+ SYSTEM_ID=0UTmPFvRHXYLMlT4Kl2z1K
5
+ PROJECT_ID=08HBeHEYGxu5Bg4TCCnAAV
6
+ VEHICLE_NETWORK_ID='dev-dealership-vehicles'
7
+ CONSUMER_VEHICLE_NETWORK_ID='dev-customer-vehicles'
8
+ LOCATOR_NETWORK_ID='dev-recovr-tracker'
9
+ BEACON_NETWORK_ID='dev-dealership-beacons'
10
+ SALE_LOCATION_PARENT_PATH=sales
11
+ CONSUMER_LOCATION_ID=1KceIcZlVWrOBvCzsEXYud
12
+ userManagementUiName='obd'
13
+ IS_DEV=true
@@ -0,0 +1,12 @@
1
+ IMAGINE_HOST=https://leverege-sandbox-imagine-api.leverege.com
2
+ RECOVR_HOST=https://dev-recovr-notify.leverege.com
3
+ # RECOVR_HOST=http://localhost:8296
4
+ SYSTEM_ID=0UTmPFvRHXYLMlT4Kl2z1K
5
+ PROJECT_ID=08HBeHEYGxu5Bg4TCCnAAV
6
+ VEHICLE_NETWORK_ID='dev-dealership-vehicles'
7
+ CONSUMER_VEHICLE_NETWORK_ID='dev-customer-vehicles'
8
+ LOCATOR_NETWORK_ID='dev-recovr-tracker'
9
+ BEACON_NETWORK_ID='dev-dealership-beacons'
10
+ SALE_LOCATION_PARENT_PATH=sales
11
+ CONSUMER_LOCATION_ID=1KceIcZlVWrOBvCzsEXYud
12
+ IS_DEV=true
@@ -0,0 +1,12 @@
1
+ IMAGINE_HOST=https://prd-recovr-auto-imagine-api.leverege.com
2
+ RECOVR_HOST=https://recovr-auto-notify.leverege.com
3
+ SYSTEM_ID=2ExK7rl76meCVCCctjOJEY
4
+ PROJECT_ID=1Je8Y7dNlfthv7ixV8oEfZ
5
+ VEHICLE_NETWORK_ID='prd-auto-vehicles'
6
+ CONSUMER_VEHICLE_NETWORK_ID='prd-customer-vehicles'
7
+ BEACON_NETWORK_ID='prd-auto-beacons'
8
+ GOOGLE_ANALYTICS_TRACKER_ID='G-LBTT0JT9V6'
9
+ SALE_LOCATION_PARENT_PATH=location
10
+ CONSUMER_LOCATION_ID=26OsDlsRqBTIOxMjyHg9S5
11
+ userManagementUiName='obd'
12
+ IS_DEV=true
@@ -0,0 +1,10 @@
1
+ IMAGINE_HOST=https://prd-recovr-auto-imagine-api.leverege.com
2
+ RECOVR_HOST=https://recovr-auto-notify.leverege.com
3
+ SYSTEM_ID=2ExK7rl76meCVCCctjOJEY
4
+ PROJECT_ID=1Je8Y7dNlfthv7ixV8oEfZ
5
+ VEHICLE_NETWORK_ID='prd-auto-vehicles'
6
+ CONSUMER_VEHICLE_NETWORK_ID='prd-customer-vehicles'
7
+ BEACON_NETWORK_ID='prd-auto-beacons'
8
+ GOOGLE_ANALYTICS_TRACKER_ID='G-LBTT0JT9V6'
9
+ SALE_LOCATION_PARENT_PATH=location
10
+ CONSUMER_LOCATION_ID=26OsDlsRqBTIOxMjyHg9S5
@@ -0,0 +1,6 @@
1
+ THEFT_RECOVERY_URL='theft.recovermycar.com'
2
+ MAPBOX_APIKEY=pk.eyJ1IjoibGV2ZXJlZ2UiLCJhIjoiY2p1Y3E0cWpkMG15azQzbnFzaDY2dmhiMSJ9.7N25h5jsjO2Aq_YmiLrAJw
3
+ APPEARANCE_PROJECT_ID=7b2GTbmsZj3f5VdFpjGM8O
4
+ INTERCOM_APP_ID='ec0qbuwi'
5
+ LOCATOR_ALIAS_KEY='serialNumber'
6
+ RECOVR_BILLING_MODULE='recovrBilling'
@@ -0,0 +1,10 @@
1
+ IMAGINE_HOST=https://stg-recovr-auto-imagine-api.leverege.com
2
+ # RECOVR_HOST=http://localhost:8296
3
+ SYSTEM_ID=6CxONnaSOnbGFBS5gLnZWl
4
+ PROJECT_ID=3vo2u8m9GEXPaQgMnJ45rh
5
+ VEHICLE_NETWORK_ID='stg-auto-vehicles'
6
+ CONSUMER_VEHICLE_NETWORK_ID='stg-customer-vehicles'
7
+ BEACON_NETWORK_ID='stg-auto-beacons'
8
+ CONSUMER_LOCATION_ID=1SRDkIuPWDpiAy4dsuy0JT
9
+ userManagementUiName='obd'
10
+ IS_DEV=false
@@ -0,0 +1,9 @@
1
+ IMAGINE_HOST=https://stg-recovr-auto-imagine-api.leverege.com
2
+ # RECOVR_HOST=http://localhost:8296
3
+ SYSTEM_ID=6CxONnaSOnbGFBS5gLnZWl
4
+ PROJECT_ID=3vo2u8m9GEXPaQgMnJ45rh
5
+ VEHICLE_NETWORK_ID='stg-auto-vehicles'
6
+ CONSUMER_VEHICLE_NETWORK_ID='stg-customer-vehicles'
7
+ BEACON_NETWORK_ID='stg-auto-beacons'
8
+ CONSUMER_LOCATION_ID=1SRDkIuPWDpiAy4dsuy0JT
9
+ IS_DEV=false
@@ -22,7 +22,7 @@ if ( argv._.length === 1 ) {
22
22
  TARGET = argv._[0]
23
23
  } else {
24
24
  TARGET = argv.target
25
-
25
+
26
26
  if ( argv.channelName ) {
27
27
  CHANNEL = {}
28
28
  CHANNEL.name = argv.channelName
@@ -30,6 +30,8 @@ if ( argv._.length === 1 ) {
30
30
  }
31
31
  }
32
32
 
33
+ const INTERACTIVE_MODE = !TARGET
34
+
33
35
  let exited = false
34
36
 
35
37
  const SECRETS_DIR = 'secrets'
@@ -89,14 +91,14 @@ const targets = Object
89
91
  return prev
90
92
  }, {} )
91
93
 
92
- if ( !TARGET ) {
94
+ if ( INTERACTIVE_MODE ) {
93
95
  const { targetEnv } = await prompt( [ {
94
96
  type : 'select',
95
97
  name : 'targetEnv',
96
98
  message : 'To which environment would you like to deploy?',
97
99
  choices : Object.values( targets ).map( ( t ) => {
98
100
  const productionLabel = t.production ? colors.bold.red( '--PRODUCTION--' ) : ''
99
- return { message : `${colors.bold.cyan( 'Site: ' )}${t.siteId.padEnd( maxPadding )} ${colors.bold.green( 'Project: ' )}${t.projectId} ${productionLabel}`, value : t.siteId }
101
+ return { message : `${colors.bold.cyan( 'Site: ' )}${t.siteId.padEnd( maxPadding )} ${colors.bold.green( 'Project: ' )}${t.projectId} ${productionLabel}`, value : t.alias }
100
102
  } )
101
103
  } ] )
102
104
 
@@ -106,7 +108,7 @@ if ( !TARGET ) {
106
108
  const { confirmProductionDeploy } = await prompt( [ {
107
109
  type : 'confirm',
108
110
  name : 'confirmProductionDeploy',
109
- message : `${colors.bold.red( 'WARNING: ' )} This is a ${colors.bold.yellow( 'PRODUCTION' )} deployment target. Are you sure you want to proceed?`
111
+ message : `${colors.bold.red( 'WARNING: ' )} This is a ${colors.bold.yellow( 'PRODUCTION' )} environment. Are you sure you want to deploy here?`
110
112
  } ] )
111
113
  if ( !confirmProductionDeploy ) {
112
114
  console.log( 'Cancelling deployment...' )
@@ -135,7 +137,7 @@ if ( !TARGET ) {
135
137
 
136
138
  CHANNEL = { name : channelName, expiration : channelExpiration }
137
139
  }
138
-
140
+
139
141
  } else {
140
142
  TARGET = targets[TARGET]
141
143
  }
@@ -168,6 +170,26 @@ if ( aliasFileExists ) {
168
170
  exec.push( fs.readFile( path.join( process.cwd(), SECRETS_DIR, `${TARGET.siteId}.env` ), { encoding : 'utf-8' } ) )
169
171
  }
170
172
 
173
+ if ( INTERACTIVE_MODE ) {
174
+ console.log( `\n\n\n${colors.bold.green( '====== Deployment Summary ======' )}` )
175
+ console.log( `${colors.blue( 'Firebase project:' )} ${TARGET.projectId} ${TARGET.production ? colors.yellow( '--PRODUCTION--' ) : ''}` )
176
+ console.log( `${colors.blue( 'Site ID:' )} ${TARGET.siteId}` )
177
+ console.log( `${colors.blue( 'Channel Name:' )} ${CHANNEL?.name ?? colors.italic.gray( '(none)' )}` )
178
+ console.log( `${colors.blue( 'Channel Expiration date:' )} ${CHANNEL?.name ? CHANNEL.expiration ?? colors.italic.gray( '(none)' ) : colors.italic.gray( '(n/a)' )}` )
179
+ console.log( `${colors.blue( 'Shared .env file:' )} ${sharedFileExists ? `${SECRETS_DIR}/shared.env` : colors.italic.gray( '(none)' )}` )
180
+ console.log( `${colors.blue( 'Additional .env overrides:' )} ${aliasFileExists ? `${SECRETS_DIR}/${TARGET.alias}.env` : `${SECRETS_DIR}/${TARGET.siteId}.env`}` )
181
+
182
+ const { confirmSelections } = await prompt( [ {
183
+ type : 'confirm',
184
+ name : 'confirmSelections',
185
+ message : 'Proceed with this deployment?'
186
+ } ] )
187
+
188
+ if ( !confirmSelections ) {
189
+ console.log( 'Cancelling deployment...' )
190
+ process.exit()
191
+ }
192
+ }
171
193
  const envFileContent = ( await Promise.all( exec ) ).join( '\n' )
172
194
 
173
195
  EXIT_EVENTS
@@ -183,7 +205,7 @@ EXIT_EVENTS
183
205
  await fs.writeFile( path.join( process.cwd(), '.env.temp' ), envFileContent )
184
206
 
185
207
  try {
186
- const deployType = CHANNEL ? `hosting:channel:deploy ${CHANNEL.name} --expires ${CHANNEL.expiration}` : 'deploy'
208
+ const deployType = CHANNEL ? `hosting:channel:deploy ${CHANNEL.name} ${CHANNEL.expiration ? `--expires ${CHANNEL.expiration}` : ''}` : 'deploy'
187
209
  await $`npm run clean && DOTENV_CONFIG_PATH=${path.join( process.cwd(), '.env.temp' )} npm run build && firebase use ${TARGET.projectId} && firebase ${deployType} --only hosting:${TARGET.siteId}`
188
210
  } catch ( err ) {
189
211
  console.error( err )