@capawesome/cli 4.10.0 → 4.11.0

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,18 @@
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.11.0](https://github.com/capawesome-team/cli/compare/v4.10.0...v4.11.0) (2026-06-02)
6
+
7
+
8
+ ### Features
9
+
10
+ * **apps:** derive platform from app type for single-platform apps ([#165](https://github.com/capawesome-team/cli/issues/165)) ([c14efd6](https://github.com/capawesome-team/cli/commit/c14efd607190c7dc8dbc6f2550fde20bd90faeb4))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * hash and sign buffers in chunks to avoid `RangeError: data is too long` ([#164](https://github.com/capawesome-team/cli/issues/164)) ([7c37bcf](https://github.com/capawesome-team/cli/commit/7c37bcfd3bd6d286acdc0674082aea35ec45115b))
16
+
5
17
  ## [4.10.0](https://github.com/capawesome-team/cli/compare/v4.9.3...v4.10.0) (2026-05-18)
6
18
 
7
19
 
@@ -3,6 +3,7 @@ import appBuildSourcesService from '../../../services/app-build-sources.js';
3
3
  import appBuildsService from '../../../services/app-builds.js';
4
4
  import appCertificatesService from '../../../services/app-certificates.js';
5
5
  import appEnvironmentsService from '../../../services/app-environments.js';
6
+ import appsService from '../../../services/apps.js';
6
7
  import { parseKeyValuePairs } from '../../../utils/app-environments.js';
7
8
  import { withAuth } from '../../../utils/auth.js';
8
9
  import { createBufferFromPath } from '../../../utils/buffer.js';
@@ -147,6 +148,13 @@ export default defineCommand({
147
148
  const organizationId = await promptOrganizationSelection({ allowCreate: true });
148
149
  appId = await promptAppSelection(organizationId, { allowCreate: true });
149
150
  }
151
+ // Derive platform from app type for single-platform apps
152
+ if (!platform) {
153
+ const app = await appsService.findOne({ appId });
154
+ if (app.type === 'android' || app.type === 'ios') {
155
+ platform = app.type;
156
+ }
157
+ }
150
158
  // Prompt for platform if not provided
151
159
  if (!platform) {
152
160
  if (!isInteractive()) {
@@ -1,5 +1,6 @@
1
1
  import appCertificatesService from '../../../services/app-certificates.js';
2
2
  import appProvisioningProfilesService from '../../../services/app-provisioning-profiles.js';
3
+ import appsService from '../../../services/apps.js';
3
4
  import { withAuth } from '../../../utils/auth.js';
4
5
  import { isInteractive } from '../../../utils/environment.js';
5
6
  import { isReadable } from '../../../utils/file.js';
@@ -55,6 +56,13 @@ export default defineCommand({
55
56
  process.exit(1);
56
57
  }
57
58
  }
59
+ // Derive platform from app type for single-platform apps
60
+ if (!platform) {
61
+ const app = await appsService.findOne({ appId });
62
+ if (app.type === 'android' || app.type === 'ios') {
63
+ platform = app.type;
64
+ }
65
+ }
58
66
  // 3. Select platform
59
67
  if (!platform) {
60
68
  if (!isInteractive()) {
@@ -1,6 +1,7 @@
1
1
  import appAppleApiKeysService from '../../../services/app-apple-api-keys.js';
2
2
  import appDestinationsService from '../../../services/app-destinations.js';
3
3
  import appGoogleServiceAccountKeysService from '../../../services/app-google-service-account-keys.js';
4
+ import appsService from '../../../services/apps.js';
4
5
  import { withAuth } from '../../../utils/auth.js';
5
6
  import { isInteractive } from '../../../utils/environment.js';
6
7
  import { isReadable } from '../../../utils/file.js';
@@ -57,6 +58,13 @@ export default defineCommand({
57
58
  process.exit(1);
58
59
  }
59
60
  }
61
+ // Derive platform from app type for single-platform apps
62
+ if (!platform) {
63
+ const app = await appsService.findOne({ appId });
64
+ if (app.type === 'android' || app.type === 'ios') {
65
+ platform = app.type;
66
+ }
67
+ }
60
68
  // 3. Select platform
61
69
  if (!platform) {
62
70
  if (!isInteractive()) {
@@ -1,4 +1,9 @@
1
+ const CHUNK_SIZE = 64 * 1024 * 1024;
1
2
  export const createHash = async (data) => {
2
3
  const crypto = await import('crypto');
3
- return crypto.createHash('sha256').update(data).digest('hex');
4
+ const hash = crypto.createHash('sha256');
5
+ for (let offset = 0; offset < data.length; offset += CHUNK_SIZE) {
6
+ hash.update(data.subarray(offset, offset + CHUNK_SIZE));
7
+ }
8
+ return hash.digest('hex');
4
9
  };
@@ -1,8 +1,11 @@
1
+ const CHUNK_SIZE = 64 * 1024 * 1024;
1
2
  export const createSignature = async (privateKey, data) => {
2
3
  const crypto = await import('crypto');
3
4
  const privateKeyObject = crypto.createPrivateKey(privateKey);
4
5
  const sign = crypto.createSign('sha256');
5
- sign.update(data);
6
+ for (let offset = 0; offset < data.length; offset += CHUNK_SIZE) {
7
+ sign.update(data.subarray(offset, offset + CHUNK_SIZE));
8
+ }
6
9
  sign.end();
7
10
  return sign.sign(privateKeyObject).toString('base64');
8
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capawesome/cli",
3
- "version": "4.10.0",
3
+ "version": "4.11.0",
4
4
  "description": "The Capawesome Cloud Command Line Interface (CLI) to manage Live Updates and more.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -78,14 +78,14 @@
78
78
  "@types/mime": "3.0.4",
79
79
  "@types/node": "24.2.1",
80
80
  "@types/semver": "7.5.8",
81
- "@vitest/ui": "3.2.4",
81
+ "@vitest/ui": "4.1.7",
82
82
  "commit-and-tag-version": "12.6.1",
83
83
  "nock": "14.0.10",
84
84
  "prettier": "3.3.3",
85
85
  "rimraf": "6.0.1",
86
86
  "tsc-alias": "1.8.16",
87
87
  "typescript": "5.6.3",
88
- "vitest": "3.2.4"
88
+ "vitest": "4.1.7"
89
89
  },
90
90
  "prettier": "@ionic/prettier-config"
91
91
  }