@capawesome/cli 4.0.2 → 4.0.4-dev.12d1452.1770832184
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,20 @@
|
|
|
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.0.4](https://github.com/capawesome-team/cli/compare/v4.0.3...v4.0.4) (2026-02-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **apps:deployments:create:** prevent waiting for deployment on web platform ([acb7a1f](https://github.com/capawesome-team/cli/commit/acb7a1f83774a922c05ae655a75d0854da67af81))
|
|
11
|
+
|
|
12
|
+
## [4.0.3](https://github.com/capawesome-team/cli/compare/v4.0.2...v4.0.3) (2026-02-05)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **deps:** npm audit fix ([f962f1d](https://github.com/capawesome-team/cli/commit/f962f1d1853932b987a61f26c89b3f18d7ae121a))
|
|
18
|
+
|
|
5
19
|
## [4.0.2](https://github.com/capawesome-team/cli/compare/v4.0.1...v4.0.2) (2026-02-03)
|
|
6
20
|
|
|
7
21
|
## [4.0.1](https://github.com/capawesome-team/cli/compare/v4.0.0...v4.0.1) (2026-01-27)
|
|
@@ -192,7 +192,7 @@ export default defineCommand({
|
|
|
192
192
|
consola.info(`Deployment URL: ${DEFAULT_CONSOLE_BASE_URL}/apps/${appId}/deployments/${response.id}`);
|
|
193
193
|
consola.success('Deployment created successfully.');
|
|
194
194
|
// Wait for deployment job to complete by default, unless --detached flag is set
|
|
195
|
-
const shouldWait = !options.detached;
|
|
195
|
+
const shouldWait = !options.detached && build.platform !== 'web';
|
|
196
196
|
if (shouldWait) {
|
|
197
197
|
let lastPrintedLogNumber = 0;
|
|
198
198
|
let isWaitingForStart = true;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import appBuildsService from '../../../services/app-builds.js';
|
|
2
|
+
import authorizationService from '../../../services/authorization-service.js';
|
|
3
|
+
import { isInteractive } from '../../../utils/environment.js';
|
|
4
|
+
import { defineCommand, defineOptions } from '@robingenz/zli';
|
|
5
|
+
import consola from 'consola';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
export default defineCommand({
|
|
8
|
+
description: 'Set native version constraints on a web build.',
|
|
9
|
+
options: defineOptions(z.object({
|
|
10
|
+
appId: z
|
|
11
|
+
.string({
|
|
12
|
+
message: 'App ID must be a UUID.',
|
|
13
|
+
})
|
|
14
|
+
.uuid({
|
|
15
|
+
message: 'App ID must be a UUID.',
|
|
16
|
+
})
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('The app ID of the build.'),
|
|
19
|
+
buildId: z
|
|
20
|
+
.string({
|
|
21
|
+
message: 'Build ID must be a UUID.',
|
|
22
|
+
})
|
|
23
|
+
.uuid({
|
|
24
|
+
message: 'Build ID must be a UUID.',
|
|
25
|
+
})
|
|
26
|
+
.optional()
|
|
27
|
+
.describe('The build ID to update.'),
|
|
28
|
+
androidEq: z.coerce
|
|
29
|
+
.string()
|
|
30
|
+
.optional()
|
|
31
|
+
.describe('The exact Android version code (`versionCode`) that the build supports.'),
|
|
32
|
+
androidMax: z.coerce
|
|
33
|
+
.string()
|
|
34
|
+
.optional()
|
|
35
|
+
.describe('The maximum Android version code (`versionCode`) that the build supports.'),
|
|
36
|
+
androidMin: z.coerce
|
|
37
|
+
.string()
|
|
38
|
+
.optional()
|
|
39
|
+
.describe('The minimum Android version code (`versionCode`) that the build supports.'),
|
|
40
|
+
iosEq: z
|
|
41
|
+
.string()
|
|
42
|
+
.optional()
|
|
43
|
+
.describe('The exact iOS bundle version (`CFBundleVersion`) that the build supports.'),
|
|
44
|
+
iosMax: z
|
|
45
|
+
.string()
|
|
46
|
+
.optional()
|
|
47
|
+
.describe('The maximum iOS bundle version (`CFBundleVersion`) that the build supports.'),
|
|
48
|
+
iosMin: z
|
|
49
|
+
.string()
|
|
50
|
+
.optional()
|
|
51
|
+
.describe('The minimum iOS bundle version (`CFBundleVersion`) that the build supports.'),
|
|
52
|
+
})),
|
|
53
|
+
action: async (options) => {
|
|
54
|
+
const { appId, buildId, androidEq, androidMax, androidMin, iosEq, iosMax, iosMin } = options;
|
|
55
|
+
if (!authorizationService.hasAuthorizationToken()) {
|
|
56
|
+
consola.error('You must be logged in to run this command. Please run the `login` command first.');
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
if (!appId) {
|
|
60
|
+
if (!isInteractive()) {
|
|
61
|
+
consola.error('You must provide an app ID when running in non-interactive environment.');
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
consola.error('You must provide an app ID with the `--app-id` flag.');
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
67
|
+
if (!buildId) {
|
|
68
|
+
if (!isInteractive()) {
|
|
69
|
+
consola.error('You must provide a build ID when running in non-interactive environment.');
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
consola.error('You must provide a build ID with the `--build-id` flag.');
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
consola.start('Setting native version constraints...');
|
|
76
|
+
await appBuildsService.update({
|
|
77
|
+
appId,
|
|
78
|
+
appBuildId: buildId,
|
|
79
|
+
eqAndroidAppVersionCode: androidEq,
|
|
80
|
+
maxAndroidAppVersionCode: androidMax,
|
|
81
|
+
minAndroidAppVersionCode: androidMin,
|
|
82
|
+
eqIosAppVersionCode: iosEq,
|
|
83
|
+
maxIosAppVersionCode: iosMax,
|
|
84
|
+
minIosAppVersionCode: iosMin,
|
|
85
|
+
});
|
|
86
|
+
consola.success('Native version constraints set successfully.');
|
|
87
|
+
},
|
|
88
|
+
});
|
package/dist/index.js
CHANGED
|
@@ -52,6 +52,7 @@ const config = defineConfig({
|
|
|
52
52
|
'apps:liveupdates:rollout': await import('./commands/apps/liveupdates/rollout.js').then((mod) => mod.default),
|
|
53
53
|
'apps:liveupdates:upload': await import('./commands/apps/liveupdates/upload.js').then((mod) => mod.default),
|
|
54
54
|
'apps:liveupdates:register': await import('./commands/apps/liveupdates/register.js').then((mod) => mod.default),
|
|
55
|
+
'apps:liveupdates:setnativeversions': await import('./commands/apps/liveupdates/set-native-versions.js').then((mod) => mod.default),
|
|
55
56
|
'apps:liveupdates:generatemanifest': await import('./commands/apps/liveupdates/generate-manifest.js').then((mod) => mod.default),
|
|
56
57
|
'manifests:generate': await import('./commands/manifests/generate.js').then((mod) => mod.default),
|
|
57
58
|
'organizations:create': await import('./commands/organizations/create.js').then((mod) => mod.default),
|
|
@@ -44,6 +44,15 @@ class AppBuildsServiceImpl {
|
|
|
44
44
|
});
|
|
45
45
|
return response.data;
|
|
46
46
|
}
|
|
47
|
+
async update(dto) {
|
|
48
|
+
const { appId, appBuildId, ...bodyData } = dto;
|
|
49
|
+
const response = await this.httpClient.patch(`/v1/apps/${appId}/builds/${appBuildId}`, bodyData, {
|
|
50
|
+
headers: {
|
|
51
|
+
Authorization: `Bearer ${authorizationService.getCurrentAuthorizationToken()}`,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
return response.data;
|
|
55
|
+
}
|
|
47
56
|
async downloadArtifact(dto) {
|
|
48
57
|
const { appId, appBuildId, artifactId } = dto;
|
|
49
58
|
const response = await this.httpClient.get(`/v1/apps/${appId}/builds/${appBuildId}/artifacts/${artifactId}/download`, {
|