@capacitor/cli 9.0.1-nightly-20261204T150816.0 → 9.1.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.
Binary file
Binary file
Binary file
@@ -31,7 +31,7 @@ async function updateIOS(config, deployment) {
31
31
  }
32
32
  exports.updateIOS = updateIOS;
33
33
  async function updatePluginFiles(config, plugins, deployment) {
34
- var _a;
34
+ var _a, _b, _c, _d, _e;
35
35
  await (0, cordova_ios_1.removePluginsNativeFiles)(config);
36
36
  const cordovaPlugins = plugins.filter((p) => (0, plugin_1.getPluginType)(p, platform) === 1 /* PluginType.Cordova */);
37
37
  const enableCordova = cordovaPlugins.length > 0 || config.app.forceCordova;
@@ -55,7 +55,9 @@ async function updatePluginFiles(config, plugins, deployment) {
55
55
  const iosPlatformVersion = await (0, common_1.getCapacitorPackageVersion)(config, config.ios.name);
56
56
  const majorCapVersion = (0, semver_1.major)(iosPlatformVersion);
57
57
  const capacitorPackagePath = await (0, capacitor_package_1.resolveCapacitorPackagePath)(config);
58
+ const packageOptions = (_e = (_d = (_c = (_b = config.app.extConfig.experimental) === null || _b === void 0 ? void 0 : _b.ios) === null || _c === void 0 ? void 0 : _c.spm) === null || _d === void 0 ? void 0 : _d.packageOptions) !== null && _e !== void 0 ? _e : {};
58
59
  await Promise.all(validSPMPackages.map(async (plugin) => {
60
+ var _a;
59
61
  const packageSwiftPath = (0, path_1.join)(plugin.rootPath, 'Package.swift');
60
62
  const content = await (0, fs_extra_1.readFile)(packageSwiftPath, { encoding: 'utf-8' });
61
63
  const version = (0, capacitor_package_1.findCapacitorDependencyVersion)(content);
@@ -64,7 +66,12 @@ async function updatePluginFiles(config, plugins, deployment) {
64
66
  }
65
67
  // The plugin has to resolve to the same package identity as the app, or SPM ends up with
66
68
  // two packages that both vend a Capacitor product.
67
- let rewritten = (0, capacitor_package_1.rewriteCapacitorDependency)(content, capacitorPackagePath, plugin.rootPath);
69
+ // With `symlink: true` the app package reaches the plugin through a symlink, and SwiftPM
70
+ // resolves the plugin's relative paths from the symlink's location without following it.
71
+ const fromDir = ((_a = packageOptions[plugin.id]) === null || _a === void 0 ? void 0 : _a.symlink)
72
+ ? (0, path_1.join)(config.ios.nativeProjectDirAbs, 'CapApp-SPM', 'symlinks', plugin.name)
73
+ : plugin.rootPath;
74
+ let rewritten = (0, capacitor_package_1.rewriteCapacitorDependency)(content, capacitorPackagePath, fromDir);
68
75
  rewritten = (0, capacitor_package_1.patchPackageSwiftDeploymentTarget)(rewritten, config.ios.minVersion).content;
69
76
  if (rewritten !== content) {
70
77
  await (0, fs_extra_1.writeFile)(packageSwiftPath, rewritten);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/cli",
3
- "version": "9.0.1-nightly-20261204T150816.0",
3
+ "version": "9.1.0",
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)",