@capacitor-plus/cli 8.6.1 → 8.6.2
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/assets/android-template.tar.gz +0 -0
- package/assets/capacitor-cordova-android-plugins.tar.gz +0 -0
- package/assets/capacitor-cordova-ios-plugins.tar.gz +0 -0
- package/assets/ios-pods-template.tar.gz +0 -0
- package/assets/ios-spm-template.tar.gz +0 -0
- package/dist/ios/update.js +33 -2
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/ios/update.js
CHANGED
|
@@ -45,6 +45,25 @@ async function updatePluginFiles(config, plugins, deployment) {
|
|
|
45
45
|
if ((await config.ios.packageManager) === 'SPM') {
|
|
46
46
|
await generateCordovaPackageFiles(cordovaPlugins, config);
|
|
47
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
|
+
if (!version || !(0, semver_1.valid)(version)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const majorCapVersion = (0, semver_1.major)(iosPlatformVersion);
|
|
59
|
+
if ((0, semver_1.major)(version) != majorCapVersion) {
|
|
60
|
+
const preCapVersion = (0, semver_1.prerelease)(iosPlatformVersion);
|
|
61
|
+
const forceVersion = preCapVersion ? iosPlatformVersion : `${majorCapVersion}.0.0`;
|
|
62
|
+
content = (0, migrate_1.setAllStringIn)(content, `url: "https://github.com/ionic-team/capacitor-swift-pm.git",`, `)`, ` from: "${forceVersion}"`);
|
|
63
|
+
await (0, fs_extra_1.writeFile)(packageSwiftPath, content);
|
|
64
|
+
log_1.logger.warn(`${plugin.id} is built for Capacitor ${(0, semver_1.major)(version)}, it might cause issues`);
|
|
65
|
+
}
|
|
66
|
+
}));
|
|
48
67
|
await (0, spm_1.generatePackageFile)(config, validSPMPackages.concat(cordovaPlugins));
|
|
49
68
|
if (validSPMPackages.length > 0) {
|
|
50
69
|
let platformVersion;
|
|
@@ -560,7 +579,11 @@ async function copyPluginsNativeFiles(config, cordovaPlugins) {
|
|
|
560
579
|
fileName = 'lib' + fileName;
|
|
561
580
|
}
|
|
562
581
|
let destFolder = sourcesFolderName;
|
|
563
|
-
if (!isSPM &&
|
|
582
|
+
if (!isSPM &&
|
|
583
|
+
fileExt !== 'a' &&
|
|
584
|
+
codeFile.$.framework !== 'true' &&
|
|
585
|
+
codeFile.$['compiler-flags'] &&
|
|
586
|
+
codeFile.$['compiler-flags'] === '-fno-objc-arc') {
|
|
564
587
|
destFolder = 'noarc';
|
|
565
588
|
}
|
|
566
589
|
const filePath = (0, plugin_1.getFilePath)(config, p, codeFile.$.src);
|
|
@@ -626,7 +649,15 @@ function filterResources(plugin) {
|
|
|
626
649
|
}
|
|
627
650
|
function filterARCFiles(plugin) {
|
|
628
651
|
const sources = (0, plugin_1.getPlatformElement)(plugin, platform, 'source-file');
|
|
629
|
-
const sourcesARC = sources.filter((sourceFile) =>
|
|
652
|
+
const sourcesARC = sources.filter((sourceFile) => {
|
|
653
|
+
var _a;
|
|
654
|
+
const src = (_a = sourceFile.$.src) !== null && _a !== void 0 ? _a : '';
|
|
655
|
+
const ext = src.split('.').pop();
|
|
656
|
+
return (ext !== 'a' &&
|
|
657
|
+
sourceFile.$.framework !== 'true' &&
|
|
658
|
+
sourceFile.$['compiler-flags'] &&
|
|
659
|
+
sourceFile.$['compiler-flags'] === '-fno-objc-arc');
|
|
660
|
+
});
|
|
630
661
|
return sourcesARC.length > 0;
|
|
631
662
|
}
|
|
632
663
|
function removeNoSystem(library, sourceFrameworks) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor-plus/cli",
|
|
3
|
-
"version": "8.6.
|
|
3
|
+
"version": "8.6.2",
|
|
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)",
|