@capawesome/cli 3.7.0-dev.3ddf02d.1764834835 → 3.7.0-dev.f4e106a.1764835462

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.
@@ -5,7 +5,7 @@ import appsService from '../../../services/apps.js';
5
5
  import authorizationService from '../../../services/authorization-service.js';
6
6
  import organizationsService from '../../../services/organizations.js';
7
7
  import { createBufferFromPath, createBufferFromReadStream, createBufferFromString, isPrivateKeyContent, } from '../../../utils/buffer.js';
8
- import { findCapacitorConfigPath, getLiveUpdateAppIdFromConfig, getWebDirFromConfig, } from '../../../utils/capacitor-config.js';
8
+ import { findCapacitorConfigPath, getCapawesomeCloudAppIdFromConfig, getWebDirFromConfig, } from '../../../utils/capacitor-config.js';
9
9
  import { fileExistsAtPath, getFilesInDirectoryAndSubdirectories, isDirectory } from '../../../utils/file.js';
10
10
  import { createHash } from '../../../utils/hash.js';
11
11
  import { generateManifestJson } from '../../../utils/manifest.js';
@@ -18,6 +18,7 @@ import { defineCommand, defineOptions } from '@robingenz/zli';
18
18
  import { exec } from 'child_process';
19
19
  import consola from 'consola';
20
20
  import { createReadStream } from 'fs';
21
+ import pathModule from 'path';
21
22
  import { hasTTY } from 'std-env';
22
23
  import { promisify } from 'util';
23
24
  import { z } from 'zod';
@@ -122,14 +123,15 @@ export default defineCommand({
122
123
  if (capacitorConfigPath) {
123
124
  const webDir = await getWebDirFromConfig(capacitorConfigPath);
124
125
  if (webDir) {
126
+ consola.info(`Auto-detected web asset directory "${webDir}" from Capacitor config.`);
125
127
  path = webDir;
126
128
  }
127
129
  else {
128
- consola.warn('No webDir found in Capacitor config.');
130
+ consola.warn('No web asset directory found in Capacitor config (`webDir`).');
129
131
  }
130
132
  }
131
133
  else {
132
- consola.warn('No Capacitor config found to auto-detect webDir.');
134
+ consola.warn('No Capacitor config found to auto-detect web asset directory.');
133
135
  }
134
136
  // If still no path, prompt the user
135
137
  if (!path) {
@@ -160,7 +162,7 @@ export default defineCommand({
160
162
  consola.warn('No build script found in package.json.');
161
163
  }
162
164
  else if (hasTTY) {
163
- const shouldBuild = await prompt('Do you want to rebuild your web assets before creating the bundle?', {
165
+ const shouldBuild = await prompt('Do you want to rebuild your web assets before proceeding?', {
164
166
  type: 'select',
165
167
  options: ['Yes', 'No'],
166
168
  });
@@ -233,16 +235,17 @@ export default defineCommand({
233
235
  // Try to auto-detect appId from Capacitor config
234
236
  const capacitorConfigPath = await findCapacitorConfigPath();
235
237
  if (capacitorConfigPath) {
236
- const configAppId = await getLiveUpdateAppIdFromConfig(capacitorConfigPath);
238
+ const configAppId = await getCapawesomeCloudAppIdFromConfig(capacitorConfigPath);
237
239
  if (configAppId) {
240
+ console.info(`Auto-detected Capawesome Cloud app ID "${configAppId}" from Capacitor config.`);
238
241
  appId = configAppId;
239
242
  }
240
243
  else {
241
- consola.warn('No LiveUpdate appId found in Capacitor config.');
244
+ consola.warn('No Capawesome Cloud app ID found in Capacitor config (`plugins.LiveUpdate.appId`).');
242
245
  }
243
246
  }
244
247
  else {
245
- consola.warn('No Capacitor config found to auto-detect appId.');
248
+ consola.warn('No Capacitor config found to auto-detect Capawesome Cloud app ID.');
246
249
  }
247
250
  // If still no appId, prompt the user
248
251
  if (!appId) {
@@ -329,7 +332,8 @@ export default defineCommand({
329
332
  const appName = app.name;
330
333
  // Final confirmation before creating bundle
331
334
  if (path && hasTTY) {
332
- const confirmed = await prompt(`Are you sure you want to create a bundle from path ${path} for app "${appName}"?`, {
335
+ const relativePath = pathModule.relative(process.cwd(), path);
336
+ const confirmed = await prompt(`Are you sure you want to create a bundle from path ${relativePath} for app "${appName}"?`, {
333
337
  type: 'confirm',
334
338
  });
335
339
  if (confirmed) {
@@ -78,7 +78,7 @@ export const getWebDirFromConfig = async (configPath) => {
78
78
  * @param configPath The path to the config file.
79
79
  * @returns The appId, or undefined if not found.
80
80
  */
81
- export const getLiveUpdateAppIdFromConfig = async (configPath) => {
81
+ export const getCapawesomeCloudAppIdFromConfig = async (configPath) => {
82
82
  const config = await readCapacitorConfig(configPath);
83
83
  return config?.plugins?.LiveUpdate?.appId;
84
84
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capawesome/cli",
3
- "version": "3.7.0-dev.3ddf02d.1764834835",
3
+ "version": "3.7.0-dev.f4e106a.1764835462",
4
4
  "description": "The Capawesome Cloud Command Line Interface (CLI) to manage Live Updates and more.",
5
5
  "type": "module",
6
6
  "scripts": {