@mondaydotcomorg/z2h-cli 0.21.0 → 0.21.1
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/dist/commands/deploy.d.ts +1 -0
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +1 -1
- package/dist/esm/commands/deploy.d.ts +1 -0
- package/dist/esm/commands/deploy.d.ts.map +1 -1
- package/dist/esm/commands/deploy.mjs +1 -1
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/util/broker/app.d.ts +1 -0
- package/dist/esm/util/broker/app.d.ts.map +1 -1
- package/dist/esm/util/broker/app.mjs +7 -7
- package/dist/index.js +1 -0
- package/dist/util/broker/app.d.ts +1 -0
- package/dist/util/broker/app.d.ts.map +1 -1
- package/dist/util/broker/app.js +7 -7
- package/package.json +1 -1
- package/src/commands/deploy.ts +2 -1
- package/src/index.ts +2 -0
- package/src/util/broker/app.ts +10 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,KAAK,UAAU,EAA2C,MAAM,4BAA4B,CAAC;AAUtG,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,KAAK,UAAU,EAA2C,MAAM,4BAA4B,CAAC;AAUtG,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAWD,wBAAsB,aAAa,CAAC,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB3E"}
|
package/dist/commands/deploy.js
CHANGED
|
@@ -162,7 +162,7 @@ async function deployLive({ paths, consumerName, appName, token, opts }) {
|
|
|
162
162
|
}
|
|
163
163
|
util_logger.info(`uploading build → s3://${constants.BUCKET_WRITE_NAME}/${keyPrefix}/`);
|
|
164
164
|
await util_s3_upload.uploadDir(paths.shadowBuild, keyPrefix);
|
|
165
|
-
await util_broker_app.registerOrUpdateApp({ appName, token, nextVersion, entry, gitRemote });
|
|
165
|
+
await util_broker_app.registerOrUpdateApp({ appName, token, nextVersion, entry, gitRemote, description: opts.description });
|
|
166
166
|
}
|
|
167
167
|
finally {
|
|
168
168
|
await releaseLockBestEffort(appName, token);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,KAAK,UAAU,EAA2C,MAAM,4BAA4B,CAAC;AAUtG,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,KAAK,UAAU,EAA2C,MAAM,4BAA4B,CAAC;AAUtG,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAWD,wBAAsB,aAAa,CAAC,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB3E"}
|
|
@@ -156,7 +156,7 @@ async function deployLive({ paths, consumerName, appName, token, opts }) {
|
|
|
156
156
|
}
|
|
157
157
|
info(`uploading build → s3://${BUCKET_WRITE_NAME}/${keyPrefix}/`);
|
|
158
158
|
await uploadDir(paths.shadowBuild, keyPrefix);
|
|
159
|
-
await registerOrUpdateApp({ appName, token, nextVersion, entry, gitRemote });
|
|
159
|
+
await registerOrUpdateApp({ appName, token, nextVersion, entry, gitRemote, description: opts.description });
|
|
160
160
|
}
|
|
161
161
|
finally {
|
|
162
162
|
await releaseLockBestEffort(appName, token);
|
package/dist/esm/index.mjs
CHANGED
|
@@ -97,6 +97,7 @@ async function main() {
|
|
|
97
97
|
.option('--open', 'open the resulting app/preview URL in the browser on success')
|
|
98
98
|
.option('--remote <type>', 'First deploy only: source control remote to initialise — s3 (shared storage) or github (your repo). Error if the app already has a git remote.')
|
|
99
99
|
.option('--repo-url <url>', 'First deploy only: GitHub repo URL — required when --remote=github. Error if the app already has a git remote.')
|
|
100
|
+
.option('--description <text>', 'short (<=200 char) description of the app')
|
|
100
101
|
.action(async (opts) => {
|
|
101
102
|
try {
|
|
102
103
|
await trackDuration(opts.preview ? 'z2h_app_preview_success' : 'z2h_app_deploy_success', () => deployCommand({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../src/util/broker/app.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAsBvE;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../src/util/broker/app.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAsBvE;AA0CD,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAWtF"}
|
|
@@ -28,11 +28,11 @@ async function fetchApp(appName) {
|
|
|
28
28
|
}
|
|
29
29
|
return res.json();
|
|
30
30
|
}
|
|
31
|
-
async function registerApp(appName, token, version, entry, visibility, gitRemote) {
|
|
31
|
+
async function registerApp(appName, token, version, entry, visibility, gitRemote, description) {
|
|
32
32
|
const res = await fetch(`${brokerBaseUrl()}/z2h-cli/apps/register`, {
|
|
33
33
|
method: 'POST',
|
|
34
34
|
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json', ...routingHeaders() },
|
|
35
|
-
body: JSON.stringify({ appName, version, entry, visibility, gitRemote }),
|
|
35
|
+
body: JSON.stringify({ appName, version, entry, visibility, gitRemote, description }),
|
|
36
36
|
});
|
|
37
37
|
if (!res.ok) {
|
|
38
38
|
const text = await res.text();
|
|
@@ -40,11 +40,11 @@ async function registerApp(appName, token, version, entry, visibility, gitRemote
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
/** Releases a new version onto an app that already exists. */
|
|
43
|
-
async function updateApp(appName, token, version, entry, gitRemote) {
|
|
43
|
+
async function updateApp(appName, token, version, entry, gitRemote, description) {
|
|
44
44
|
const res = await fetch(`${brokerBaseUrl()}/z2h-cli/apps/update`, {
|
|
45
45
|
method: 'POST',
|
|
46
46
|
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json', ...routingHeaders() },
|
|
47
|
-
body: JSON.stringify({ appName, version, entry, gitRemote }),
|
|
47
|
+
body: JSON.stringify({ appName, version, entry, gitRemote, description }),
|
|
48
48
|
});
|
|
49
49
|
if (!res.ok) {
|
|
50
50
|
const text = await res.text();
|
|
@@ -58,15 +58,15 @@ async function updateApp(appName, token, version, entry, gitRemote) {
|
|
|
58
58
|
* deploy and preview so this branching logic lives in exactly one place.
|
|
59
59
|
*/
|
|
60
60
|
async function registerOrUpdateApp(opts) {
|
|
61
|
-
const { appName, token, nextVersion, entry, gitRemote } = opts;
|
|
61
|
+
const { appName, token, nextVersion, entry, gitRemote, description } = opts;
|
|
62
62
|
if (nextVersion === 1) {
|
|
63
63
|
const visibility = await resolveAppVisibility(appName);
|
|
64
64
|
info(`registering "${appName}" → v${nextVersion} (${visibility})`);
|
|
65
|
-
await registerApp(appName, token, nextVersion, entry, visibility, gitRemote);
|
|
65
|
+
await registerApp(appName, token, nextVersion, entry, visibility, gitRemote, description);
|
|
66
66
|
}
|
|
67
67
|
else {
|
|
68
68
|
info(`updating "${appName}" → v${nextVersion}`);
|
|
69
|
-
await updateApp(appName, token, nextVersion, entry, gitRemote);
|
|
69
|
+
await updateApp(appName, token, nextVersion, entry, gitRemote, description);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
package/dist/index.js
CHANGED
|
@@ -103,6 +103,7 @@ async function main() {
|
|
|
103
103
|
.option('--open', 'open the resulting app/preview URL in the browser on success')
|
|
104
104
|
.option('--remote <type>', 'First deploy only: source control remote to initialise — s3 (shared storage) or github (your repo). Error if the app already has a git remote.')
|
|
105
105
|
.option('--repo-url <url>', 'First deploy only: GitHub repo URL — required when --remote=github. Error if the app already has a git remote.')
|
|
106
|
+
.option('--description <text>', 'short (<=200 char) description of the app')
|
|
106
107
|
.action(async (opts) => {
|
|
107
108
|
try {
|
|
108
109
|
await util_tracker.trackDuration(opts.preview ? 'z2h_app_preview_success' : 'z2h_app_deploy_success', () => commands_deploy.deployCommand({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/util/broker/app.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAsBvE;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/util/broker/app.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAsBvE;AA0CD,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAWtF"}
|
package/dist/util/broker/app.js
CHANGED
|
@@ -30,11 +30,11 @@ async function fetchApp(appName) {
|
|
|
30
30
|
}
|
|
31
31
|
return res.json();
|
|
32
32
|
}
|
|
33
|
-
async function registerApp(appName, token, version, entry, visibility, gitRemote) {
|
|
33
|
+
async function registerApp(appName, token, version, entry, visibility, gitRemote, description) {
|
|
34
34
|
const res = await fetch(`${constants.brokerBaseUrl()}/z2h-cli/apps/register`, {
|
|
35
35
|
method: 'POST',
|
|
36
36
|
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json', ...constants.routingHeaders() },
|
|
37
|
-
body: JSON.stringify({ appName, version, entry, visibility, gitRemote }),
|
|
37
|
+
body: JSON.stringify({ appName, version, entry, visibility, gitRemote, description }),
|
|
38
38
|
});
|
|
39
39
|
if (!res.ok) {
|
|
40
40
|
const text = await res.text();
|
|
@@ -42,11 +42,11 @@ async function registerApp(appName, token, version, entry, visibility, gitRemote
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
/** Releases a new version onto an app that already exists. */
|
|
45
|
-
async function updateApp(appName, token, version, entry, gitRemote) {
|
|
45
|
+
async function updateApp(appName, token, version, entry, gitRemote, description) {
|
|
46
46
|
const res = await fetch(`${constants.brokerBaseUrl()}/z2h-cli/apps/update`, {
|
|
47
47
|
method: 'POST',
|
|
48
48
|
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json', ...constants.routingHeaders() },
|
|
49
|
-
body: JSON.stringify({ appName, version, entry, gitRemote }),
|
|
49
|
+
body: JSON.stringify({ appName, version, entry, gitRemote, description }),
|
|
50
50
|
});
|
|
51
51
|
if (!res.ok) {
|
|
52
52
|
const text = await res.text();
|
|
@@ -60,15 +60,15 @@ async function updateApp(appName, token, version, entry, gitRemote) {
|
|
|
60
60
|
* deploy and preview so this branching logic lives in exactly one place.
|
|
61
61
|
*/
|
|
62
62
|
async function registerOrUpdateApp(opts) {
|
|
63
|
-
const { appName, token, nextVersion, entry, gitRemote } = opts;
|
|
63
|
+
const { appName, token, nextVersion, entry, gitRemote, description } = opts;
|
|
64
64
|
if (nextVersion === 1) {
|
|
65
65
|
const visibility = await util_promptVisibility.resolveAppVisibility(appName);
|
|
66
66
|
util_logger.info(`registering "${appName}" → v${nextVersion} (${visibility})`);
|
|
67
|
-
await registerApp(appName, token, nextVersion, entry, visibility, gitRemote);
|
|
67
|
+
await registerApp(appName, token, nextVersion, entry, visibility, gitRemote, description);
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
70
70
|
util_logger.info(`updating "${appName}" → v${nextVersion}`);
|
|
71
|
-
await updateApp(appName, token, nextVersion, entry, gitRemote);
|
|
71
|
+
await updateApp(appName, token, nextVersion, entry, gitRemote, description);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
package/package.json
CHANGED
package/src/commands/deploy.ts
CHANGED
|
@@ -37,6 +37,7 @@ export interface DeployOptions {
|
|
|
37
37
|
// With --preview: update an existing preview instead of minting a new one.
|
|
38
38
|
previewId?: string;
|
|
39
39
|
open?: boolean;
|
|
40
|
+
description?: string;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
interface DeployContext {
|
|
@@ -219,7 +220,7 @@ async function deployLive({ paths, consumerName, appName, token, opts }: DeployC
|
|
|
219
220
|
info(`uploading build → s3://${BUCKET_WRITE_NAME}/${keyPrefix}/`);
|
|
220
221
|
await uploadDir(paths.shadowBuild, keyPrefix);
|
|
221
222
|
|
|
222
|
-
await registerOrUpdateApp({ appName, token, nextVersion, entry, gitRemote });
|
|
223
|
+
await registerOrUpdateApp({ appName, token, nextVersion, entry, gitRemote, description: opts.description });
|
|
223
224
|
} finally {
|
|
224
225
|
await releaseLockBestEffort(appName, token);
|
|
225
226
|
}
|
package/src/index.ts
CHANGED
|
@@ -115,6 +115,7 @@ async function main(): Promise<void> {
|
|
|
115
115
|
'--repo-url <url>',
|
|
116
116
|
'First deploy only: GitHub repo URL — required when --remote=github. Error if the app already has a git remote.'
|
|
117
117
|
)
|
|
118
|
+
.option('--description <text>', 'short (<=200 char) description of the app')
|
|
118
119
|
.action(
|
|
119
120
|
async (opts: {
|
|
120
121
|
dryRun?: boolean;
|
|
@@ -122,6 +123,7 @@ async function main(): Promise<void> {
|
|
|
122
123
|
open?: boolean;
|
|
123
124
|
remote?: string;
|
|
124
125
|
repoUrl?: string;
|
|
126
|
+
description?: string;
|
|
125
127
|
}) => {
|
|
126
128
|
try {
|
|
127
129
|
await trackDuration(
|
package/src/util/broker/app.ts
CHANGED
|
@@ -47,12 +47,13 @@ async function registerApp(
|
|
|
47
47
|
version: number,
|
|
48
48
|
entry: ManifestEntry,
|
|
49
49
|
visibility: 'public' | 'private',
|
|
50
|
-
gitRemote: string
|
|
50
|
+
gitRemote: string,
|
|
51
|
+
description?: string
|
|
51
52
|
): Promise<void> {
|
|
52
53
|
const res = await fetch(`${brokerBaseUrl()}/z2h-cli/apps/register`, {
|
|
53
54
|
method: 'POST',
|
|
54
55
|
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json', ...routingHeaders() },
|
|
55
|
-
body: JSON.stringify({ appName, version, entry, visibility, gitRemote }),
|
|
56
|
+
body: JSON.stringify({ appName, version, entry, visibility, gitRemote, description }),
|
|
56
57
|
});
|
|
57
58
|
if (!res.ok) {
|
|
58
59
|
const text = await res.text();
|
|
@@ -66,12 +67,13 @@ async function updateApp(
|
|
|
66
67
|
token: string,
|
|
67
68
|
version: number,
|
|
68
69
|
entry: ManifestEntry,
|
|
69
|
-
gitRemote: string
|
|
70
|
+
gitRemote: string,
|
|
71
|
+
description?: string
|
|
70
72
|
): Promise<void> {
|
|
71
73
|
const res = await fetch(`${brokerBaseUrl()}/z2h-cli/apps/update`, {
|
|
72
74
|
method: 'POST',
|
|
73
75
|
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json', ...routingHeaders() },
|
|
74
|
-
body: JSON.stringify({ appName, version, entry, gitRemote }),
|
|
76
|
+
body: JSON.stringify({ appName, version, entry, gitRemote, description }),
|
|
75
77
|
});
|
|
76
78
|
if (!res.ok) {
|
|
77
79
|
const text = await res.text();
|
|
@@ -85,6 +87,7 @@ export interface RegisterOrUpdateOptions {
|
|
|
85
87
|
nextVersion: number;
|
|
86
88
|
entry: ManifestEntry;
|
|
87
89
|
gitRemote: string;
|
|
90
|
+
description?: string;
|
|
88
91
|
}
|
|
89
92
|
|
|
90
93
|
/**
|
|
@@ -94,14 +97,14 @@ export interface RegisterOrUpdateOptions {
|
|
|
94
97
|
* deploy and preview so this branching logic lives in exactly one place.
|
|
95
98
|
*/
|
|
96
99
|
export async function registerOrUpdateApp(opts: RegisterOrUpdateOptions): Promise<void> {
|
|
97
|
-
const { appName, token, nextVersion, entry, gitRemote } = opts;
|
|
100
|
+
const { appName, token, nextVersion, entry, gitRemote, description } = opts;
|
|
98
101
|
|
|
99
102
|
if (nextVersion === 1) {
|
|
100
103
|
const visibility = await resolveAppVisibility(appName);
|
|
101
104
|
info(`registering "${appName}" → v${nextVersion} (${visibility})`);
|
|
102
|
-
await registerApp(appName, token, nextVersion, entry, visibility, gitRemote);
|
|
105
|
+
await registerApp(appName, token, nextVersion, entry, visibility, gitRemote, description);
|
|
103
106
|
} else {
|
|
104
107
|
info(`updating "${appName}" → v${nextVersion}`);
|
|
105
|
-
await updateApp(appName, token, nextVersion, entry, gitRemote);
|
|
108
|
+
await updateApp(appName, token, nextVersion, entry, gitRemote, description);
|
|
106
109
|
}
|
|
107
110
|
}
|