@capacitor-plus/cli 8.3.10 → 8.3.12

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.
Binary file
Binary file
Binary file
@@ -30,7 +30,7 @@ async function runAndroid(config, { target: selectedTarget, targetName: selected
30
30
  }
31
31
  }
32
32
  const pathToApk = `${config.android.platformDirAbs}/${config.android.appDir}/build/outputs/apk${runFlavor !== '' ? '/' + runFlavor : ''}/debug`;
33
- const apkName = (0, common_1.parseApkNameFromFlavor)(runFlavor);
33
+ const apkName = await (0, common_1.parseApkNameFromFlavor)(runFlavor, pathToApk);
34
34
  const apkPath = (0, path_1.resolve)(pathToApk, apkName);
35
35
  const nativeRunArgs = ['android', '--app', apkPath, '--target', target.id];
36
36
  if (selectedPorts) {
package/dist/common.js CHANGED
@@ -438,7 +438,17 @@ async function checkJDKMajorVersion() {
438
438
  }
439
439
  }
440
440
  exports.checkJDKMajorVersion = checkJDKMajorVersion;
441
- function parseApkNameFromFlavor(flavor) {
441
+ async function parseApkNameFromFlavor(flavor, pathToApk) {
442
+ var _a, _b;
443
+ if (!flavor) {
444
+ const metadataPath = (0, path_1.join)(pathToApk, 'output-metadata.json');
445
+ if (await (0, fs_extra_1.pathExists)(metadataPath)) {
446
+ const metadataContent = await (0, fs_extra_1.readJSON)(metadataPath);
447
+ const outputFile = (_b = (_a = metadataContent === null || metadataContent === void 0 ? void 0 : metadataContent.elements) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.outputFile;
448
+ if (outputFile)
449
+ return outputFile;
450
+ }
451
+ }
442
452
  let convertedName = flavor.replace(/([A-Z])/g, '-$1').toLowerCase();
443
453
  if (convertedName.startsWith('-'))
444
454
  convertedName = convertedName.replace('-', '');
package/dist/config.js CHANGED
@@ -180,7 +180,7 @@ async function loadAndroidConfig(rootDir, extConfig, cliConfig) {
180
180
  if ((_d = extConfig.android) === null || _d === void 0 ? void 0 : _d.flavor) {
181
181
  apkPath = `${apkPath}/${(_e = extConfig.android) === null || _e === void 0 ? void 0 : _e.flavor}`;
182
182
  }
183
- const apkName = (0, common_1.parseApkNameFromFlavor)(flavor);
183
+ const apkName = await (0, common_1.parseApkNameFromFlavor)(flavor, `${platformDirAbs}/${apkPath}debug`);
184
184
  const buildOutputDir = `${apkPath}/debug`;
185
185
  const cordovaPluginsDir = 'capacitor-cordova-android-plugins';
186
186
  const studioPath = (0, promise_1.lazy)(() => determineAndroidStudioPath(cliConfig.os));
@@ -55,9 +55,9 @@ async function updatePluginFiles(config, plugins, deployment) {
55
55
  (0, plugin_1.printPlugins)(incompatibleCordovaPlugins, platform, 'incompatible');
56
56
  }
57
57
  async function generateCordovaPackageFiles(cordovaPlugins, config) {
58
- cordovaPlugins.map((plugin) => {
59
- generateCordovaPackageFile(plugin, config);
60
- });
58
+ await Promise.all(cordovaPlugins.map((plugin) => {
59
+ return generateCordovaPackageFile(plugin, config);
60
+ }));
61
61
  }
62
62
  async function generateCordovaPackageFile(p, config) {
63
63
  var _a;
@@ -356,8 +356,8 @@ function isFramework(framework) {
356
356
  async function generateCordovaPodspecs(cordovaPlugins, config) {
357
357
  const staticPlugins = cordovaPlugins.filter((p) => (0, cordova_1.needsStaticPod)(p));
358
358
  const noStaticPlugins = cordovaPlugins.filter((el) => !staticPlugins.includes(el));
359
- generateCordovaPodspec(noStaticPlugins, config, false);
360
- generateCordovaPodspec(staticPlugins, config, true);
359
+ await generateCordovaPodspec(noStaticPlugins, config, false);
360
+ await generateCordovaPodspec(staticPlugins, config, true);
361
361
  }
362
362
  async function generateCordovaPodspec(cordovaPlugins, config, isStatic) {
363
363
  const weakFrameworks = [];
@@ -508,7 +508,7 @@ async function copyPluginsNativeFiles(config, cordovaPlugins) {
508
508
  const isSPM = (await config.ios.packageManager) === 'SPM';
509
509
  for (const p of cordovaPlugins) {
510
510
  const platformTag = (0, plugin_1.getPluginPlatform)(p, platform);
511
- if ((_a = platformTag.$) === null || _a === void 0 ? void 0 : _a.package) {
511
+ if (isSPM && ((_a = platformTag.$) === null || _a === void 0 ? void 0 : _a.package)) {
512
512
  continue;
513
513
  }
514
514
  const sourceFiles = (0, plugin_1.getPlatformElement)(p, platform, 'source-file');
package/dist/util/spm.js CHANGED
@@ -86,7 +86,7 @@ exports.removeCocoapodsFiles = removeCocoapodsFiles;
86
86
  async function generatePackageText(config, plugins) {
87
87
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
88
88
  const iosPlatformVersion = await (0, common_1.getCapacitorPackageVersion)(config, config.ios.name);
89
- const iosVersion = (0, common_2.getMajoriOSVersion)(config);
89
+ const iosVersion = (0, common_2.getMajorMinoriOSVersion)(config);
90
90
  const packageTraits = (_d = (_c = (_b = (_a = config.app.extConfig.experimental) === null || _a === void 0 ? void 0 : _a.ios) === null || _b === void 0 ? void 0 : _b.spm) === null || _c === void 0 ? void 0 : _c.packageTraits) !== null && _d !== void 0 ? _d : {};
91
91
  const swiftToolsVersion = (_h = (_g = (_f = (_e = config.app.extConfig.experimental) === null || _e === void 0 ? void 0 : _e.ios) === null || _f === void 0 ? void 0 : _f.spm) === null || _g === void 0 ? void 0 : _g.swiftToolsVersion) !== null && _h !== void 0 ? _h : '5.9';
92
92
  let packageSwiftText = `// swift-tools-version: ${swiftToolsVersion}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor-plus/cli",
3
- "version": "8.3.10",
3
+ "version": "8.3.12",
4
4
  "description": "Capacitor+: Enhanced Capacitor with automated upstream sync - Cross-platform apps with JavaScript and the web",
5
5
  "homepage": "https://capgo.app/docs/plugins/capacitor-plus/",
6
6
  "author": "Capgo Team <support@capgo.app> (https://capgo.app)",