@mondaydotcomorg/z2h-cli 0.11.1 → 0.11.3

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.
@@ -132,7 +132,7 @@ async function deployCommand(opts = {}) {
132
132
  }
133
133
  else {
134
134
  util_logger.info(`releasing "${appName}" → v${nextVersion}`);
135
- await updateApp(appName, token, nextVersion, entry);
135
+ await updateApp(appName, token, nextVersion, entry, gitRemote);
136
136
  }
137
137
  }
138
138
  finally {
@@ -181,11 +181,11 @@ async function acquireDeployLock(appName, token) {
181
181
  }
182
182
  util_logger.info(`deploy lock acquired for ${appName}`);
183
183
  }
184
- async function updateApp(appName, token, version, entry) {
184
+ async function updateApp(appName, token, version, entry, gitRemote) {
185
185
  const res = await fetch(`${constants.brokerBaseUrl()}/z2h-cli/apps/update`, {
186
186
  method: 'POST',
187
187
  headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json', ...constants.routingHeaders() },
188
- body: JSON.stringify({ appName, version, entry }),
188
+ body: JSON.stringify({ appName, version, entry, gitRemote }),
189
189
  });
190
190
  if (!res.ok) {
191
191
  const text = await res.text();
@@ -125,7 +125,7 @@ async function deployCommand(opts = {}) {
125
125
  }
126
126
  else {
127
127
  info(`releasing "${appName}" → v${nextVersion}`);
128
- await updateApp(appName, token, nextVersion, entry);
128
+ await updateApp(appName, token, nextVersion, entry, gitRemote);
129
129
  }
130
130
  }
131
131
  finally {
@@ -174,11 +174,11 @@ async function acquireDeployLock(appName, token) {
174
174
  }
175
175
  info(`deploy lock acquired for ${appName}`);
176
176
  }
177
- async function updateApp(appName, token, version, entry) {
177
+ async function updateApp(appName, token, version, entry, gitRemote) {
178
178
  const res = await fetch(`${brokerBaseUrl()}/z2h-cli/apps/update`, {
179
179
  method: 'POST',
180
180
  headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json', ...routingHeaders() },
181
- body: JSON.stringify({ appName, version, entry }),
181
+ body: JSON.stringify({ appName, version, entry, gitRemote }),
182
182
  });
183
183
  if (!res.ok) {
184
184
  const text = await res.text();
@@ -31,7 +31,7 @@ function selfUpdate() {
31
31
  errorLog(`Z2H auto-update failed to start: ${err.message}`);
32
32
  }
33
33
  }
34
- const CONFLICTING_ENV_VARS = ['AWS_PROFILE'];
34
+ const CONFLICTING_ENV_VARS = ['AWS_PROFILE', 'AWS_CREDENTIAL_EXPIRATION'];
35
35
  function stripConflictingEnvVars() {
36
36
  for (const name of CONFLICTING_ENV_VARS) {
37
37
  delete process.env[name];
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ function selfUpdate() {
37
37
  util_logger.errorLog(`Z2H auto-update failed to start: ${err.message}`);
38
38
  }
39
39
  }
40
- const CONFLICTING_ENV_VARS = ['AWS_PROFILE'];
40
+ const CONFLICTING_ENV_VARS = ['AWS_PROFILE', 'AWS_CREDENTIAL_EXPIRATION'];
41
41
  function stripConflictingEnvVars() {
42
42
  for (const name of CONFLICTING_ENV_VARS) {
43
43
  delete process.env[name];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mondaydotcomorg/z2h-cli",
3
- "version": "0.11.1",
3
+ "version": "0.11.3",
4
4
  "bin": "./bin/z2h-cli.js",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -152,7 +152,7 @@ export async function deployCommand(opts: DeployOptions = {}): Promise<void> {
152
152
  await registerApp(appName, token, nextVersion, entry, visibility, gitRemote);
153
153
  } else {
154
154
  info(`releasing "${appName}" → v${nextVersion}`);
155
- await updateApp(appName, token, nextVersion, entry);
155
+ await updateApp(appName, token, nextVersion, entry, gitRemote);
156
156
  }
157
157
  } finally {
158
158
  await releaseLockBestEffort(appName, token);
@@ -211,11 +211,17 @@ async function acquireDeployLock(appName: string, token: string): Promise<void>
211
211
  info(`deploy lock acquired for ${appName}`);
212
212
  }
213
213
 
214
- async function updateApp(appName: string, token: string, version: number, entry: ManifestEntry): Promise<void> {
214
+ async function updateApp(
215
+ appName: string,
216
+ token: string,
217
+ version: number,
218
+ entry: ManifestEntry,
219
+ gitRemote: string
220
+ ): Promise<void> {
215
221
  const res = await fetch(`${brokerBaseUrl()}/z2h-cli/apps/update`, {
216
222
  method: 'POST',
217
223
  headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json', ...routingHeaders() },
218
- body: JSON.stringify({ appName, version, entry }),
224
+ body: JSON.stringify({ appName, version, entry, gitRemote }),
219
225
  });
220
226
  if (!res.ok) {
221
227
  const text = await res.text();
package/src/index.ts CHANGED
@@ -33,7 +33,7 @@ function selfUpdate(): void {
33
33
  }
34
34
  }
35
35
 
36
- const CONFLICTING_ENV_VARS = ['AWS_PROFILE'];
36
+ const CONFLICTING_ENV_VARS = ['AWS_PROFILE', 'AWS_CREDENTIAL_EXPIRATION'];
37
37
 
38
38
  function stripConflictingEnvVars(): void {
39
39
  for (const name of CONFLICTING_ENV_VARS) {