@capawesome/cli 1.5.0 → 1.6.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,21 @@
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
+ ## [1.6.1](https://github.com/capawesome-team/cli/compare/v1.6.0...v1.6.1) (2025-03-16)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **apps:bundles:create:** validate zip file if url is passed ([bd1c4c7](https://github.com/capawesome-team/cli/commit/bd1c4c7463ed3a1611ec6da1b2e87eccb0665fed))
11
+ * improve error handling ([949e358](https://github.com/capawesome-team/cli/commit/949e35826d3e75d5077b55966cff75ccd15a54d7))
12
+
13
+ ## [1.6.0](https://github.com/capawesome-team/cli/compare/v1.5.0...v1.6.0) (2025-03-03)
14
+
15
+
16
+ ### Features
17
+
18
+ * add git integration ([#34](https://github.com/capawesome-team/cli/issues/34)) ([7ca323a](https://github.com/capawesome-team/cli/commit/7ca323a030e9c70866c2cf1c34c69ef9dc0129e0))
19
+
5
20
  ## [1.5.0](https://github.com/capawesome-team/cli/compare/v1.4.1...v1.5.0) (2025-02-21)
6
21
 
7
22
 
@@ -52,6 +52,18 @@ exports.default = (0, citty_1.defineCommand)({
52
52
  type: 'string',
53
53
  description: 'Channel to associate the bundle with.',
54
54
  },
55
+ commitMessage: {
56
+ type: 'string',
57
+ description: 'The commit message related to the bundle.',
58
+ },
59
+ commitRef: {
60
+ type: 'string',
61
+ description: 'The commit ref related to the bundle.',
62
+ },
63
+ commitSha: {
64
+ type: 'string',
65
+ description: 'The commit sha related to the bundle.',
66
+ },
55
67
  customProperty: {
56
68
  type: 'string',
57
69
  description: 'A custom property to assign to the bundle. Must be in the format `key=value`. Can be specified multiple times.',
@@ -105,6 +117,9 @@ exports.default = (0, citty_1.defineCommand)({
105
117
  let privateKey = ctx.args.privateKey;
106
118
  let rolloutAsString = ctx.args.rollout === undefined ? undefined : ctx.args.rollout + ''; // Convert to string
107
119
  let url = ctx.args.url;
120
+ let commitMessage = ctx.args.commitMessage;
121
+ let commitRef = ctx.args.commitRef;
122
+ let commitSha = ctx.args.commitSha;
108
123
  // Validate the expiration days
109
124
  let expiresAt;
110
125
  if (expiresInDays) {
@@ -215,6 +230,11 @@ exports.default = (0, citty_1.defineCommand)({
215
230
  let checksum;
216
231
  let signature;
217
232
  if (path && url) {
233
+ // Create the file buffer
234
+ if (!zip_1.default.isZipped(path)) {
235
+ consola_1.default.error('The path must be a zip file when providing a URL.');
236
+ process.exit(1);
237
+ }
218
238
  const fileBuffer = yield (0, buffer_1.createBufferFromPath)(path);
219
239
  // Generate checksum
220
240
  checksum = yield (0, hash_1.createHash)(fileBuffer);
@@ -228,6 +248,9 @@ exports.default = (0, citty_1.defineCommand)({
228
248
  artifactType,
229
249
  channelName,
230
250
  checksum,
251
+ gitCommitMessage: commitMessage,
252
+ gitCommitRef: commitRef,
253
+ gitCommitSha: commitSha,
231
254
  customProperties: parseCustomProperties(customProperty),
232
255
  expiresAt: expiresAt,
233
256
  url,
package/dist/index.js CHANGED
@@ -83,5 +83,6 @@ const captureException = (error) => __awaiter(void 0, void 0, void 0, function*
83
83
  yield captureException(error).catch(() => {
84
84
  // No op
85
85
  });
86
+ console.error(error);
86
87
  process.exit(1);
87
88
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capawesome/cli",
3
- "version": "1.5.0",
3
+ "version": "1.6.1",
4
4
  "description": "The Capawesome Cloud Command Line Interface (CLI) to manage Live Updates and more.",
5
5
  "scripts": {
6
6
  "build": "patch-package && rimraf ./dist && tsc",