@capawesome/cli 4.16.0 → 4.16.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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [4.16.1](https://github.com/capawesome-team/cli/compare/v4.16.0...v4.16.1) (2026-07-12)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * rename share JSON output to `appBuildShare` with `webUrl` ([#183](https://github.com/capawesome-team/cli/issues/183)) ([32d8bd8](https://github.com/capawesome-team/cli/commit/32d8bd8460c40cd78d3417849007e8394ead35fd))
11
+
5
12
  ## [4.16.0](https://github.com/capawesome-team/cli/compare/v4.15.0...v4.16.0) (2026-07-12)
6
13
 
7
14
 
@@ -418,7 +418,7 @@ export default defineCommand({
418
418
  });
419
419
  }
420
420
  // Create a public share link if requested
421
- let share;
421
+ let appBuildShare;
422
422
  if (options.share) {
423
423
  const expiresAt = options.shareExpiresInDays !== undefined
424
424
  ? new Date(Date.now() + options.shareExpiresInDays * 24 * 60 * 60 * 1000).toISOString()
@@ -430,15 +430,15 @@ export default defineCommand({
430
430
  expiresAt,
431
431
  });
432
432
  const shareUrls = await getAppBuildShareUrls(createdShare.id);
433
- share = {
433
+ appBuildShare = {
434
434
  id: createdShare.id,
435
- url: shareUrls.url,
436
435
  qrCodeUrl: shareUrls.qrCodeUrl,
436
+ webUrl: shareUrls.webUrl,
437
437
  expiresAt: createdShare.expiresAt,
438
438
  };
439
439
  if (!json) {
440
440
  consola.success('Build shared successfully.');
441
- consola.info(`Share URL: ${shareUrls.url}`);
441
+ consola.info(`Share URL: ${shareUrls.webUrl}`);
442
442
  }
443
443
  }
444
444
  // Create deployment if channel or destination is set
@@ -450,7 +450,7 @@ export default defineCommand({
450
450
  console.log(JSON.stringify({
451
451
  id: response.id,
452
452
  numberAsString: response.numberAsString,
453
- ...(share ? { share } : {}),
453
+ ...(appBuildShare ? { appBuildShare } : {}),
454
454
  }, null, 2));
455
455
  }
456
456
  }
@@ -69,12 +69,12 @@ describe('apps-builds-create', () => {
69
69
  expect(buildScope.isDone()).toBe(true);
70
70
  expect(findScope.isDone()).toBe(true);
71
71
  expect(shareScope.isDone()).toBe(true);
72
- const url = `${DEFAULT_CONSOLE_BASE_URL}/app-build-shares/${shareId}`;
73
- const qrCodeUrl = `${DEFAULT_API_BASE_URL}/v1/qrcodes?content=${encodeURIComponent(url)}&format=png`;
72
+ const webUrl = `${DEFAULT_CONSOLE_BASE_URL}/app-build-shares/${shareId}`;
73
+ const qrCodeUrl = `${DEFAULT_API_BASE_URL}/v1/qrcodes?content=${encodeURIComponent(webUrl)}&format=png`;
74
74
  expect(console.log).toHaveBeenCalledWith(JSON.stringify({
75
75
  id: buildId,
76
76
  numberAsString: '42',
77
- share: { id: shareId, url, qrCodeUrl, expiresAt: null },
77
+ appBuildShare: { id: shareId, qrCodeUrl, webUrl, expiresAt: null },
78
78
  }, null, 2));
79
79
  });
80
80
  it('should reject --share combined with --detached', async () => {
@@ -89,13 +89,13 @@ export default defineCommand({
89
89
  ? new Date(Date.now() + expiresInDays * 24 * 60 * 60 * 1000).toISOString()
90
90
  : undefined;
91
91
  const share = await appBuildsService.createShare({ appId, appBuildId: buildId, description, expiresAt });
92
- const { url, qrCodeUrl } = await getAppBuildShareUrls(share.id);
92
+ const { qrCodeUrl, webUrl } = await getAppBuildShareUrls(share.id);
93
93
  if (json) {
94
- console.log(JSON.stringify({ id: share.id, url, qrCodeUrl, expiresAt: share.expiresAt }, null, 2));
94
+ console.log(JSON.stringify({ id: share.id, qrCodeUrl, webUrl, expiresAt: share.expiresAt }, null, 2));
95
95
  }
96
96
  else {
97
97
  consola.success('Build shared successfully.');
98
- consola.info(`Share URL: ${url}`);
98
+ consola.info(`Share URL: ${webUrl}`);
99
99
  consola.info(`QR Code URL: ${qrCodeUrl}`);
100
100
  if (share.expiresAt) {
101
101
  consola.info(`Expires At: ${share.expiresAt}`);
@@ -58,9 +58,9 @@ describe('apps-builds-share', () => {
58
58
  await shareCommand.action(options, undefined);
59
59
  expect(buildScope.isDone()).toBe(true);
60
60
  expect(shareScope.isDone()).toBe(true);
61
- const url = `${DEFAULT_CONSOLE_BASE_URL}/app-build-shares/${shareId}`;
62
- const qrCodeUrl = `${DEFAULT_API_BASE_URL}/v1/qrcodes?content=${encodeURIComponent(url)}&format=png`;
63
- expect(console.log).toHaveBeenCalledWith(JSON.stringify({ id: shareId, url, qrCodeUrl, expiresAt: null }, null, 2));
61
+ const webUrl = `${DEFAULT_CONSOLE_BASE_URL}/app-build-shares/${shareId}`;
62
+ const qrCodeUrl = `${DEFAULT_API_BASE_URL}/v1/qrcodes?content=${encodeURIComponent(webUrl)}&format=png`;
63
+ expect(console.log).toHaveBeenCalledWith(JSON.stringify({ id: shareId, qrCodeUrl, webUrl, expiresAt: null }, null, 2));
64
64
  expect(mockConsola.success).not.toHaveBeenCalled();
65
65
  });
66
66
  it('should compute expiresAt from expiresInDays', async () => {
@@ -5,7 +5,7 @@ import configService from '../services/config.js';
5
5
  export const getAppBuildShareUrls = async (shareId) => {
6
6
  const consoleBaseUrl = await configService.getValueForKey('CONSOLE_BASE_URL');
7
7
  const apiBaseUrl = await configService.getValueForKey('API_BASE_URL');
8
- const url = `${consoleBaseUrl}/app-build-shares/${shareId}`;
9
- const qrCodeUrl = `${apiBaseUrl}/v1/qrcodes?content=${encodeURIComponent(url)}&format=png`;
10
- return { url, qrCodeUrl };
8
+ const webUrl = `${consoleBaseUrl}/app-build-shares/${shareId}`;
9
+ const qrCodeUrl = `${apiBaseUrl}/v1/qrcodes?content=${encodeURIComponent(webUrl)}&format=png`;
10
+ return { qrCodeUrl, webUrl };
11
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capawesome/cli",
3
- "version": "4.16.0",
3
+ "version": "4.16.1",
4
4
  "description": "The Capawesome Cloud Command Line Interface (CLI) to manage Live Updates and more.",
5
5
  "type": "module",
6
6
  "scripts": {