@capacitor/cli 9.0.0-alpha.3 → 9.0.0-alpha.5
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/android/update.js +1 -1
- package/dist/config.js +1 -1
- package/dist/ios/update.js +18 -0
- package/dist/tasks/migrate.js +3 -3
- package/dist/util/cordova-ios.js +14 -2
- package/dist/util/spm.js +2 -2
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/android/update.js
CHANGED
|
@@ -209,7 +209,7 @@ async function handleCordovaPluginsGradle(config, cordovaPlugins) {
|
|
|
209
209
|
var _a, _b, _c;
|
|
210
210
|
const pluginsGradlePath = (0, path_1.join)(config.android.cordovaPluginsDirAbs, 'build.gradle');
|
|
211
211
|
const kotlinNeeded = await kotlinNeededCheck(config, cordovaPlugins);
|
|
212
|
-
const kotlinVersionString = (_c = (_b = (_a = config.app.extConfig.cordova) === null || _a === void 0 ? void 0 : _a.preferences) === null || _b === void 0 ? void 0 : _b.GradlePluginKotlinVersion) !== null && _c !== void 0 ? _c : '2.
|
|
212
|
+
const kotlinVersionString = (_c = (_b = (_a = config.app.extConfig.cordova) === null || _a === void 0 ? void 0 : _a.preferences) === null || _b === void 0 ? void 0 : _b.GradlePluginKotlinVersion) !== null && _c !== void 0 ? _c : '2.4.0';
|
|
213
213
|
const frameworksArray = [];
|
|
214
214
|
let prefsArray = [];
|
|
215
215
|
const applyArray = [];
|
package/dist/config.js
CHANGED
package/dist/ios/update.js
CHANGED
|
@@ -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");
|
|
@@ -11,6 +12,7 @@ const errors_1 = require("../errors");
|
|
|
11
12
|
const log_1 = require("../log");
|
|
12
13
|
const plugin_1 = require("../plugin");
|
|
13
14
|
const copy_1 = require("../tasks/copy");
|
|
15
|
+
const migrate_1 = require("../tasks/migrate");
|
|
14
16
|
const cordova_ios_1 = require("../util/cordova-ios");
|
|
15
17
|
const fs_1 = require("../util/fs");
|
|
16
18
|
const iosplugin_1 = require("../util/iosplugin");
|
|
@@ -47,6 +49,22 @@ async function updatePluginFiles(config, plugins, deployment) {
|
|
|
47
49
|
await (0, cordova_ios_1.generateCordovaPackageFiles)(cordovaPlugins, config);
|
|
48
50
|
}
|
|
49
51
|
const validSPMPackages = await (0, spm_1.checkPluginsForPackageSwift)(config, plugins);
|
|
52
|
+
await Promise.all(validSPMPackages.map(async (plugin) => {
|
|
53
|
+
var _a;
|
|
54
|
+
const iosPlatformVersion = await (0, common_1.getCapacitorPackageVersion)(config, config.ios.name);
|
|
55
|
+
const packageSwiftPath = (0, path_1.join)(plugin.rootPath, 'Package.swift');
|
|
56
|
+
let content = await (0, fs_extra_1.readFile)(packageSwiftPath, { encoding: 'utf-8' });
|
|
57
|
+
const regex = new RegExp('url:\\s*"https://github.com/ionic-team/capacitor-swift-pm\\.git",\\s*from:\\s*"([^"]+)"');
|
|
58
|
+
const version = (_a = content.match(regex)) === null || _a === void 0 ? void 0 : _a[1];
|
|
59
|
+
const majorCapVersion = (0, semver_1.major)(iosPlatformVersion);
|
|
60
|
+
if (version && (0, semver_1.major)(version) != majorCapVersion) {
|
|
61
|
+
const preCapVersion = (0, semver_1.prerelease)(iosPlatformVersion);
|
|
62
|
+
const forceVersion = preCapVersion ? iosPlatformVersion : `${majorCapVersion}.0.0`;
|
|
63
|
+
content = (0, migrate_1.setAllStringIn)(content, `url: "https://github.com/ionic-team/capacitor-swift-pm.git",`, `)`, ` from: "${forceVersion}"`);
|
|
64
|
+
await (0, fs_extra_1.writeFile)(packageSwiftPath, content);
|
|
65
|
+
log_1.logger.warn(`${plugin.id} is built for Capacitor ${(0, semver_1.major)(version)}, it might cause issues`);
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
50
68
|
await (0, spm_1.generatePackageFile)(config, validSPMPackages.concat(cordovaPlugins));
|
|
51
69
|
}
|
|
52
70
|
else {
|
package/dist/tasks/migrate.js
CHANGED
|
@@ -46,9 +46,9 @@ const plugins = [
|
|
|
46
46
|
];
|
|
47
47
|
const coreVersion = '^8.0.0';
|
|
48
48
|
const pluginVersion = '^8.0.0';
|
|
49
|
-
const gradleVersion = '
|
|
49
|
+
const gradleVersion = '9.5.1';
|
|
50
50
|
const iOSVersion = '16';
|
|
51
|
-
const kotlinVersion = '2.
|
|
51
|
+
const kotlinVersion = '2.4.0';
|
|
52
52
|
let installFailed = false;
|
|
53
53
|
async function migrateCommand(config, noprompt, packagemanager) {
|
|
54
54
|
if (config === null) {
|
|
@@ -74,7 +74,7 @@ async function migrateCommand(config, noprompt, packagemanager) {
|
|
|
74
74
|
log_1.logger.info(monorepoWarning);
|
|
75
75
|
const { migrateconfirm } = noprompt
|
|
76
76
|
? { migrateconfirm: 'y' }
|
|
77
|
-
: await (0, log_1.logPrompt)(`Capacitor 8 sets a deployment target of iOS ${iOSVersion} and Android
|
|
77
|
+
: await (0, log_1.logPrompt)(`Capacitor 8 sets a deployment target of iOS ${iOSVersion} and Android 17 (SDK 37). \n`, {
|
|
78
78
|
type: 'text',
|
|
79
79
|
name: 'migrateconfirm',
|
|
80
80
|
message: `Are you sure you want to migrate? (Y/n)`,
|
package/dist/util/cordova-ios.js
CHANGED
|
@@ -7,6 +7,7 @@ const common_1 = require("../common");
|
|
|
7
7
|
const cordova_1 = require("../cordova");
|
|
8
8
|
const common_2 = require("../ios/common");
|
|
9
9
|
const plugin_1 = require("../plugin");
|
|
10
|
+
const migrate_1 = require("../tasks/migrate");
|
|
10
11
|
const template_1 = require("../util/template");
|
|
11
12
|
const platform = 'ios';
|
|
12
13
|
async function generateCordovaPodspecs(cordovaPlugins, config) {
|
|
@@ -321,6 +322,7 @@ async function generateCordovaPackageFiles(cordovaPlugins, config) {
|
|
|
321
322
|
}
|
|
322
323
|
exports.generateCordovaPackageFiles = generateCordovaPackageFiles;
|
|
323
324
|
async function generateCordovaPackageFile(p, config) {
|
|
325
|
+
var _a;
|
|
324
326
|
const iosPlatformVersion = await (0, common_1.getCapacitorPackageVersion)(config, config.ios.name);
|
|
325
327
|
const iosVersion = (0, common_2.getMajoriOSVersion)(config);
|
|
326
328
|
const headerFiles = (0, plugin_1.getPlatformElement)(p, platform, 'header-file');
|
|
@@ -329,7 +331,16 @@ async function generateCordovaPackageFile(p, config) {
|
|
|
329
331
|
headersText = `,
|
|
330
332
|
publicHeadersPath: "."`;
|
|
331
333
|
}
|
|
332
|
-
const
|
|
334
|
+
const platformTag = (0, plugin_1.getPluginPlatform)(p, platform);
|
|
335
|
+
if ((_a = platformTag.$) === null || _a === void 0 ? void 0 : _a.package) {
|
|
336
|
+
const packageSwiftPath = (0, path_1.join)(p.rootPath, 'Package.swift');
|
|
337
|
+
let content = await (0, fs_extra_1.readFile)(packageSwiftPath, { encoding: 'utf-8' });
|
|
338
|
+
content = content.replace(`apache`, `ionic-team`).replaceAll(`cordova-ios`, `capacitor-swift-pm`);
|
|
339
|
+
content = (0, migrate_1.setAllStringIn)(content, `url: "https://github.com/ionic-team/capacitor-swift-pm.git",`, `)`, ` from: "${iosPlatformVersion}"`);
|
|
340
|
+
await (0, fs_extra_1.writeFile)(packageSwiftPath, content);
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
const content = `// swift-tools-version: 5.9
|
|
333
344
|
|
|
334
345
|
import PackageDescription
|
|
335
346
|
|
|
@@ -355,6 +366,7 @@ let package = Package(
|
|
|
355
366
|
)
|
|
356
367
|
]
|
|
357
368
|
)`;
|
|
358
|
-
|
|
369
|
+
await (0, fs_extra_1.writeFile)((0, path_1.join)(config.ios.cordovaPluginsDirAbs, 'sources', p.name, 'Package.swift'), content);
|
|
370
|
+
}
|
|
359
371
|
}
|
|
360
372
|
exports.generateCordovaPackageFile = generateCordovaPackageFile;
|
package/dist/util/spm.js
CHANGED
|
@@ -149,9 +149,9 @@ let package = Package(
|
|
|
149
149
|
.target(
|
|
150
150
|
name: "CapApp-SPM",
|
|
151
151
|
dependencies: [
|
|
152
|
-
.product(name: "Capacitor", package: "capacitor-swift-pm")
|
|
152
|
+
.product(name: "Capacitor", package: "capacitor-swift-pm")`;
|
|
153
153
|
if (enableCordova) {
|
|
154
|
-
packageSwiftText +=
|
|
154
|
+
packageSwiftText += `,\n .product(name: "Cordova", package: "capacitor-swift-pm")`;
|
|
155
155
|
}
|
|
156
156
|
for (const plugin of plugins) {
|
|
157
157
|
const aliases = Object.entries((_r = (_q = packageOptions[plugin.id]) === null || _q === void 0 ? void 0 : _q.moduleAliases) !== null && _r !== void 0 ? _r : {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/cli",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.5",
|
|
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)",
|