@capacitor/cli 7.6.5 → 7.6.7

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
@@ -502,7 +502,7 @@ export interface CapacitorConfig {
502
502
  * Configure the local scheme on Android.
503
503
  *
504
504
  * Custom schemes on Android are unable to change the URL path as of Webview 117. Changing this value from anything other than `http` or `https` can result in your
505
- * application unable to resolve routing. If you must change this for some reason, consider using a hash-based url strategy, but there are no guarentees that this
505
+ * application unable to resolve routing. If you must change this for some reason, consider using a hash-based url strategy, but there are no guarantees that this
506
506
  * will continue to work long term as allowing non-standard schemes to modify query parameters and url fragments is only allowed for compatibility reasons.
507
507
  * https://ionic.io/blog/capacitor-android-customscheme-issue-with-chrome-117
508
508
  *
@@ -4,6 +4,7 @@ exports.installCocoaPodsPlugins = exports.updateIOS = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const fs_extra_1 = require("fs-extra");
6
6
  const path_1 = require("path");
7
+ const semver_1 = require("semver");
7
8
  const colors_1 = tslib_1.__importDefault(require("../colors"));
8
9
  const common_1 = require("../common");
9
10
  const cordova_1 = require("../cordova");
@@ -44,6 +45,22 @@ async function updatePluginFiles(config, plugins, deployment) {
44
45
  if ((await config.ios.packageManager) === 'SPM') {
45
46
  await generateCordovaPackageFiles(cordovaPlugins, config);
46
47
  const validSPMPackages = await (0, spm_1.checkPluginsForPackageSwift)(config, plugins);
48
+ await Promise.all(validSPMPackages.map(async (plugin) => {
49
+ var _a;
50
+ const iosPlatformVersion = await (0, common_1.getCapacitorPackageVersion)(config, config.ios.name);
51
+ const packageSwiftPath = (0, path_1.join)(plugin.rootPath, 'Package.swift');
52
+ let content = await (0, fs_extra_1.readFile)(packageSwiftPath, { encoding: 'utf-8' });
53
+ const regex = new RegExp('url:\\s*"https://github.com/ionic-team/capacitor-swift-pm\\.git",\\s*from:\\s*"([^"]+)"');
54
+ const version = (_a = content.match(regex)) === null || _a === void 0 ? void 0 : _a[1];
55
+ const majorCapVersion = (0, semver_1.major)(iosPlatformVersion);
56
+ if (version && (0, semver_1.major)(version) != majorCapVersion) {
57
+ const preCapVersion = (0, semver_1.prerelease)(iosPlatformVersion);
58
+ const forceVersion = preCapVersion ? iosPlatformVersion : `${majorCapVersion}.0.0`;
59
+ content = (0, migrate_1.setAllStringIn)(content, `url: "https://github.com/ionic-team/capacitor-swift-pm.git",`, `)`, ` from: "${forceVersion}"`);
60
+ await (0, fs_extra_1.writeFile)(packageSwiftPath, content);
61
+ log_1.logger.warn(`${plugin.id} is built for Capacitor ${(0, semver_1.major)(version)}, it might cause issues`);
62
+ }
63
+ }));
47
64
  await (0, spm_1.generatePackageFile)(config, validSPMPackages.concat(cordovaPlugins));
48
65
  }
49
66
  else {
package/dist/tasks/run.js CHANGED
@@ -85,6 +85,9 @@ async function runCommand(config, selectedPlatformName, options) {
85
85
  }
86
86
  }
87
87
  catch (e) {
88
+ if (options.liveReload) {
89
+ await livereload_1.CapLiveReloadHelper.revertCapConfigForLiveReload();
90
+ }
88
91
  if (!(0, errors_1.isFatal)(e)) {
89
92
  (0, errors_1.fatal)((_c = e.stack) !== null && _c !== void 0 ? _c : e);
90
93
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/cli",
3
- "version": "7.6.5",
3
+ "version": "7.6.7",
4
4
  "description": "Capacitor: Cross-platform apps with JavaScript and the web",
5
5
  "homepage": "https://capacitorjs.com",
6
6
  "author": "Ionic Team <hi@ionic.io> (https://ionic.io)",