@capacitor/cli 7.4.5 → 7.5.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.
- 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/config.js +15 -7
- package/dist/index.js +10 -0
- package/dist/ios/build.js +1 -3
- package/dist/ios/common.js +12 -1
- package/dist/ios/doctor.js +1 -1
- package/dist/ios/open.js +1 -2
- package/dist/ios/run.js +2 -3
- package/dist/ios/update.js +9 -15
- package/dist/tasks/add.js +3 -3
- package/dist/tasks/migrate-spm.js +7 -2
- package/dist/tasks/migrate.js +1 -2
- package/dist/tasks/sync.js +1 -1
- package/dist/tasks/update.js +27 -2
- package/dist/util/spm.js +14 -16
- package/dist/util/template.js +2 -3
- package/package.json +2 -3
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/config.js
CHANGED
|
@@ -232,7 +232,8 @@ async function loadIOSConfig(rootDir, extConfig) {
|
|
|
232
232
|
const nativeXcodeProjDir = `${nativeProjectDir}/App.xcodeproj`;
|
|
233
233
|
const nativeXcodeProjDirAbs = (0, path_1.resolve)(platformDirAbs, nativeXcodeProjDir);
|
|
234
234
|
const nativeXcodeWorkspaceDirAbs = (0, promise_1.lazy)(() => determineXcodeWorkspaceDirAbs(nativeProjectDirAbs));
|
|
235
|
-
const podPath = (0, promise_1.lazy)(() =>
|
|
235
|
+
const podPath = (0, promise_1.lazy)(() => determineCocoapodPath());
|
|
236
|
+
const packageManager = (0, promise_1.lazy)(() => determinePackageManager(rootDir, platformDirAbs, nativeProjectDirAbs));
|
|
236
237
|
const webDirAbs = (0, promise_1.lazy)(() => determineIOSWebDirAbs(nativeProjectDirAbs, nativeTargetDirAbs, nativeXcodeProjDirAbs));
|
|
237
238
|
const cordovaPluginsDir = 'capacitor-cordova-ios-plugins';
|
|
238
239
|
const buildOptions = {
|
|
@@ -260,6 +261,7 @@ async function loadIOSConfig(rootDir, extConfig) {
|
|
|
260
261
|
webDir: (0, promise_1.lazy)(async () => (0, path_1.relative)(platformDirAbs, await webDirAbs)),
|
|
261
262
|
webDirAbs,
|
|
262
263
|
podPath,
|
|
264
|
+
packageManager,
|
|
263
265
|
buildOptions,
|
|
264
266
|
};
|
|
265
267
|
}
|
|
@@ -339,10 +341,16 @@ async function determineAndroidStudioPath(os) {
|
|
|
339
341
|
}
|
|
340
342
|
return '';
|
|
341
343
|
}
|
|
342
|
-
async function
|
|
344
|
+
async function determineCocoapodPath() {
|
|
343
345
|
if (process.env.CAPACITOR_COCOAPODS_PATH) {
|
|
344
346
|
return process.env.CAPACITOR_COCOAPODS_PATH;
|
|
345
347
|
}
|
|
348
|
+
return 'pod';
|
|
349
|
+
}
|
|
350
|
+
async function determinePackageManager(rootDir, platformDir, nativeProjectDirAbs) {
|
|
351
|
+
if ((0, fs_extra_1.existsSync)((0, path_1.resolve)(nativeProjectDirAbs, 'CapApp-SPM'))) {
|
|
352
|
+
return 'SPM';
|
|
353
|
+
}
|
|
346
354
|
let gemfilePath = '';
|
|
347
355
|
if (await (0, fs_extra_1.pathExists)((0, path_1.resolve)(rootDir, 'Gemfile'))) {
|
|
348
356
|
gemfilePath = (0, path_1.resolve)(rootDir, 'Gemfile');
|
|
@@ -369,18 +377,18 @@ async function determineGemfileOrCocoapodPath(rootDir, platformDir, nativeProjec
|
|
|
369
377
|
try {
|
|
370
378
|
const gemfileText = (await (0, fs_extra_1.readFile)(gemfilePath)).toString();
|
|
371
379
|
if (!gemfileText) {
|
|
372
|
-
return '
|
|
380
|
+
return 'Cocoapods';
|
|
373
381
|
}
|
|
374
382
|
const cocoapodsInGemfile = new RegExp(/gem\s+['"]cocoapods/).test(gemfileText);
|
|
375
|
-
if (cocoapodsInGemfile) {
|
|
376
|
-
return '
|
|
383
|
+
if (cocoapodsInGemfile && (await (0, subprocess_1.isInstalled)('bundle'))) {
|
|
384
|
+
return 'bundler';
|
|
377
385
|
}
|
|
378
386
|
else {
|
|
379
|
-
return '
|
|
387
|
+
return 'Cocoapods';
|
|
380
388
|
}
|
|
381
389
|
}
|
|
382
390
|
catch {
|
|
383
|
-
return '
|
|
391
|
+
return 'Cocoapods';
|
|
384
392
|
}
|
|
385
393
|
}
|
|
386
394
|
function formatConfigTS(extConfig) {
|
package/dist/index.js
CHANGED
|
@@ -27,6 +27,15 @@ async function run() {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
exports.run = run;
|
|
30
|
+
async function getPackageManager(config, packageManager) {
|
|
31
|
+
if (packageManager === 'SPM') {
|
|
32
|
+
return 'SPM';
|
|
33
|
+
}
|
|
34
|
+
if ((await config.ios.packageManager) === 'bundler') {
|
|
35
|
+
return 'bundler';
|
|
36
|
+
}
|
|
37
|
+
return 'Cocoapods';
|
|
38
|
+
}
|
|
30
39
|
function runProgram(config) {
|
|
31
40
|
commander_1.program.version(config.cli.package.version);
|
|
32
41
|
commander_1.program
|
|
@@ -179,6 +188,7 @@ function runProgram(config) {
|
|
|
179
188
|
.action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { packagemanager }) => {
|
|
180
189
|
const { addCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/add')));
|
|
181
190
|
const configWritable = config;
|
|
191
|
+
configWritable.ios.packageManager = getPackageManager(config, packagemanager === null || packagemanager === void 0 ? void 0 : packagemanager.toLowerCase());
|
|
182
192
|
if (packagemanager === 'SPM') {
|
|
183
193
|
configWritable.cli.assets.ios.platformTemplateArchive = 'ios-spm-template.tar.gz';
|
|
184
194
|
configWritable.cli.assets.ios.platformTemplateArchiveAbs = (0, path_1.resolve)(configWritable.cli.assetsDirAbs, configWritable.cli.assets.ios.platformTemplateArchive);
|
package/dist/ios/build.js
CHANGED
|
@@ -7,15 +7,13 @@ const rimraf_1 = require("rimraf");
|
|
|
7
7
|
const common_1 = require("../common");
|
|
8
8
|
const definitions_1 = require("../definitions");
|
|
9
9
|
const log_1 = require("../log");
|
|
10
|
-
const spm_1 = require("../util/spm");
|
|
11
10
|
const subprocess_1 = require("../util/subprocess");
|
|
12
11
|
async function buildiOS(config, buildOptions) {
|
|
13
12
|
var _a, _b, _c, _d;
|
|
14
13
|
const theScheme = (_a = buildOptions.scheme) !== null && _a !== void 0 ? _a : 'App';
|
|
15
|
-
const packageManager = await (0, spm_1.checkPackageManager)(config);
|
|
16
14
|
let typeOfBuild;
|
|
17
15
|
let projectName;
|
|
18
|
-
if (packageManager
|
|
16
|
+
if ((await config.ios.packageManager) !== 'SPM') {
|
|
19
17
|
typeOfBuild = '-workspace';
|
|
20
18
|
projectName = (0, path_1.basename)(await config.ios.nativeXcodeWorkspaceDirAbs);
|
|
21
19
|
}
|
package/dist/ios/common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getMajoriOSVersion = exports.editProjectSettingsIOS = exports.resolvePlugin = exports.getIOSPlugins = exports.checkCocoaPods = exports.checkBundler = exports.checkIOSPackage = void 0;
|
|
3
|
+
exports.getMajoriOSVersion = exports.editProjectSettingsIOS = exports.resolvePlugin = exports.getIOSPlugins = exports.checkCocoaPods = exports.checkBundler = exports.getCommonChecks = exports.checkIOSPackage = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const child_process_1 = require("child_process");
|
|
6
6
|
const fs_extra_1 = require("fs-extra");
|
|
@@ -24,6 +24,17 @@ function execBundler() {
|
|
|
24
24
|
return -1;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
async function getCommonChecks(config) {
|
|
28
|
+
const checks = [];
|
|
29
|
+
if ((await config.ios.packageManager) === 'bundler') {
|
|
30
|
+
checks.push(() => checkBundler(config));
|
|
31
|
+
}
|
|
32
|
+
else if ((await config.ios.packageManager) === 'Cocoapods') {
|
|
33
|
+
checks.push(() => checkCocoaPods(config));
|
|
34
|
+
}
|
|
35
|
+
return checks;
|
|
36
|
+
}
|
|
37
|
+
exports.getCommonChecks = getCommonChecks;
|
|
27
38
|
async function checkBundler(config) {
|
|
28
39
|
if (config.cli.os === "mac" /* OS.Mac */) {
|
|
29
40
|
let bundlerResult = execBundler();
|
package/dist/ios/doctor.js
CHANGED
|
@@ -20,7 +20,7 @@ async function doctorIOS(config) {
|
|
|
20
20
|
// check online datebase of common errors
|
|
21
21
|
// check if www folder is empty (index.html does not exist)
|
|
22
22
|
try {
|
|
23
|
-
await (0, common_1.check)([() => (0,
|
|
23
|
+
await (0, common_1.check)([() => (0, common_1.checkWebDir)(config), checkXcode, ...(await (0, common_2.getCommonChecks)(config))]);
|
|
24
24
|
(0, log_1.logSuccess)('iOS looking great! 👌');
|
|
25
25
|
}
|
|
26
26
|
catch (e) {
|
package/dist/ios/open.js
CHANGED
|
@@ -4,9 +4,8 @@ exports.openIOS = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const open_1 = tslib_1.__importDefault(require("open"));
|
|
6
6
|
const common_1 = require("../common");
|
|
7
|
-
const spm_1 = require("../util/spm");
|
|
8
7
|
async function openIOS(config) {
|
|
9
|
-
if ((await
|
|
8
|
+
if ((await config.ios.packageManager) == 'SPM') {
|
|
10
9
|
await (0, open_1.default)(config.ios.nativeXcodeProjDirAbs, { wait: false });
|
|
11
10
|
}
|
|
12
11
|
else {
|
package/dist/ios/run.js
CHANGED
|
@@ -7,7 +7,6 @@ const path_1 = require("path");
|
|
|
7
7
|
const colors_1 = tslib_1.__importDefault(require("../colors"));
|
|
8
8
|
const common_1 = require("../common");
|
|
9
9
|
const native_run_1 = require("../util/native-run");
|
|
10
|
-
const spm_1 = require("../util/spm");
|
|
11
10
|
const subprocess_1 = require("../util/subprocess");
|
|
12
11
|
const debug = (0, debug_1.default)('capacitor:ios:run');
|
|
13
12
|
async function runIOS(config, { target: selectedTarget, scheme: selectedScheme, configuration: selectedConfiguration }) {
|
|
@@ -15,10 +14,10 @@ async function runIOS(config, { target: selectedTarget, scheme: selectedScheme,
|
|
|
15
14
|
const runScheme = selectedScheme || config.ios.scheme;
|
|
16
15
|
const configuration = selectedConfiguration || 'Debug';
|
|
17
16
|
const derivedDataPath = (0, path_1.resolve)(config.ios.platformDirAbs, 'DerivedData', target.id);
|
|
18
|
-
const packageManager = await
|
|
17
|
+
const packageManager = await config.ios.packageManager;
|
|
19
18
|
let typeOfBuild;
|
|
20
19
|
let projectName;
|
|
21
|
-
if (packageManager
|
|
20
|
+
if (packageManager !== 'SPM') {
|
|
22
21
|
typeOfBuild = '-workspace';
|
|
23
22
|
projectName = (0, path_1.basename)(await config.ios.nativeXcodeWorkspaceDirAbs);
|
|
24
23
|
}
|
package/dist/ios/update.js
CHANGED
|
@@ -40,7 +40,7 @@ async function updatePluginFiles(config, plugins, deployment) {
|
|
|
40
40
|
}
|
|
41
41
|
await (0, cordova_1.handleCordovaPluginsJS)(cordovaPlugins, config, platform);
|
|
42
42
|
await (0, cordova_1.checkPluginDependencies)(plugins, platform, (_a = config.app.extConfig.cordova) === null || _a === void 0 ? void 0 : _a.failOnUninstalledPlugins);
|
|
43
|
-
if ((await
|
|
43
|
+
if ((await config.ios.packageManager) === 'SPM') {
|
|
44
44
|
await generateCordovaPackageFiles(cordovaPlugins, config);
|
|
45
45
|
const validSPMPackages = await (0, spm_1.checkPluginsForPackageSwift)(config, plugins);
|
|
46
46
|
await (0, spm_1.generatePackageFile)(config, validSPMPackages.concat(cordovaPlugins));
|
|
@@ -110,22 +110,16 @@ async function updatePodfile(config, plugins, deployment) {
|
|
|
110
110
|
podfileContent = podfileContent.replace(/(require_relative)[\s\S]+?(@capacitor\/ios\/scripts\/pods_helpers')/, `require_relative '${relativeCapacitoriOSPath}/scripts/pods_helpers'`);
|
|
111
111
|
await (0, fs_extra_1.writeFile)(podfilePath, podfileContent, { encoding: 'utf-8' });
|
|
112
112
|
const podPath = await config.ios.podPath;
|
|
113
|
-
const useBundler =
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
cwd: config.ios.nativeProjectDirAbs,
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
await (0, subprocess_1.runCommand)(podPath, ['install', ...(deployment ? ['--deployment'] : [])], {
|
|
123
|
-
cwd: config.ios.nativeProjectDirAbs,
|
|
124
|
-
});
|
|
125
|
-
}
|
|
113
|
+
const useBundler = (await config.ios.packageManager) === 'bundler';
|
|
114
|
+
if (useBundler) {
|
|
115
|
+
await (0, subprocess_1.runCommand)('bundle', ['exec', 'pod', 'install', ...(deployment ? ['--deployment'] : [])], {
|
|
116
|
+
cwd: config.ios.nativeProjectDirAbs,
|
|
117
|
+
});
|
|
126
118
|
}
|
|
127
119
|
else {
|
|
128
|
-
|
|
120
|
+
await (0, subprocess_1.runCommand)(podPath, ['install', ...(deployment ? ['--deployment'] : [])], {
|
|
121
|
+
cwd: config.ios.nativeProjectDirAbs,
|
|
122
|
+
});
|
|
129
123
|
}
|
|
130
124
|
const isXcodebuildAvailable = await (0, subprocess_1.isInstalled)('xcodebuild');
|
|
131
125
|
if (isXcodebuildAvailable) {
|
package/dist/tasks/add.js
CHANGED
|
@@ -47,7 +47,7 @@ async function addCommand(config, selectedPlatformName) {
|
|
|
47
47
|
`${colors_1.default.strong('WARNING')}: Your native project will be completely removed.`);
|
|
48
48
|
}
|
|
49
49
|
try {
|
|
50
|
-
await (0, common_2.check)([() => (0, common_2.checkPackage)(), () => (0, common_2.checkAppConfig)(config), ...
|
|
50
|
+
await (0, common_2.check)([() => (0, common_2.checkPackage)(), () => (0, common_2.checkAppConfig)(config), ...(await getAddChecks(config, platformName))]);
|
|
51
51
|
await doAdd(config, platformName);
|
|
52
52
|
await editPlatforms(config, platformName);
|
|
53
53
|
if (await (0, fs_extra_1.pathExists)(config.app.webDirAbs)) {
|
|
@@ -76,9 +76,9 @@ function printNextSteps(platformName) {
|
|
|
76
76
|
(0, log_1.logSuccess)(`${colors_1.default.strong(platformName)} platform added!`);
|
|
77
77
|
log_1.output.write(`Follow the Developer Workflow guide to get building:\n${colors_1.default.strong(`https://capacitorjs.com/docs/basics/workflow`)}\n`);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
async function getAddChecks(config, platformName) {
|
|
80
80
|
if (platformName === config.ios.name) {
|
|
81
|
-
return [() => (0, common_3.checkIOSPackage)(config), (
|
|
81
|
+
return [() => (0, common_3.checkIOSPackage)(config), ...(await (0, common_3.getCommonChecks)(config))];
|
|
82
82
|
}
|
|
83
83
|
else if (platformName === config.android.name) {
|
|
84
84
|
return [() => (0, common_1.checkAndroidPackage)(config)];
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.migrateToSPM = void 0;
|
|
4
|
+
const common_1 = require("../common");
|
|
4
5
|
const errors_1 = require("../errors");
|
|
6
|
+
const common_2 = require("../ios/common");
|
|
5
7
|
const log_1 = require("../log");
|
|
6
8
|
const spm_1 = require("../util/spm");
|
|
7
9
|
const update_1 = require("./update");
|
|
8
10
|
async function migrateToSPM(config) {
|
|
9
|
-
if ((await
|
|
11
|
+
if ((await config.ios.packageManager) == 'SPM') {
|
|
10
12
|
(0, errors_1.fatal)('Capacitor project is already using SPM, exiting.');
|
|
11
13
|
}
|
|
14
|
+
await (0, common_1.check)(await (0, common_2.getCommonChecks)(config));
|
|
12
15
|
await (0, spm_1.extractSPMPackageDirectory)(config);
|
|
13
16
|
await (0, spm_1.runCocoapodsDeintegrate)(config);
|
|
14
17
|
await (0, spm_1.removeCocoapodsFiles)(config);
|
|
15
18
|
await (0, spm_1.addInfoPlistDebugIfNeeded)(config);
|
|
16
|
-
|
|
19
|
+
const configWritable = config;
|
|
20
|
+
configWritable.ios.packageManager = Promise.resolve('SPM');
|
|
21
|
+
await (0, update_1.update)(configWritable, 'ios', false);
|
|
17
22
|
log_1.logger.info('To complete migration follow the manual steps at https://capacitorjs.com/docs/ios/spm#using-our-migration-tool');
|
|
18
23
|
}
|
|
19
24
|
exports.migrateToSPM = migrateToSPM;
|
package/dist/tasks/migrate.js
CHANGED
|
@@ -15,7 +15,6 @@ const log_1 = require("../log");
|
|
|
15
15
|
const plugin_1 = require("../plugin");
|
|
16
16
|
const fs_1 = require("../util/fs");
|
|
17
17
|
const node_1 = require("../util/node");
|
|
18
|
-
const spm_1 = require("../util/spm");
|
|
19
18
|
const subprocess_1 = require("../util/subprocess");
|
|
20
19
|
const template_1 = require("../util/template");
|
|
21
20
|
// eslint-disable-next-line prefer-const
|
|
@@ -128,7 +127,7 @@ async function migrateCommand(config, noprompt, packagemanager) {
|
|
|
128
127
|
await (0, common_2.runTask)(`Migrating deployment target to ${iOSVersion}.0.`, () => {
|
|
129
128
|
return updateFile(config, (0, path_1.join)(config.ios.nativeXcodeProjDirAbs, 'project.pbxproj'), 'IPHONEOS_DEPLOYMENT_TARGET = ', ';', `${iOSVersion}.0`);
|
|
130
129
|
});
|
|
131
|
-
if ((await
|
|
130
|
+
if ((await config.ios.packageManager) !== 'SPM') {
|
|
132
131
|
// Update Podfile
|
|
133
132
|
await (0, common_2.runTask)(`Migrating Podfile to ${iOSVersion}.0.`, () => {
|
|
134
133
|
return updateFile(config, (0, path_1.join)(config.ios.nativeProjectDirAbs, 'Podfile'), `platform :ios, '`, `'`, `${iOSVersion}.0`);
|
package/dist/tasks/sync.js
CHANGED
|
@@ -25,7 +25,7 @@ async function syncCommand(config, selectedPlatformName, deployment, inline = fa
|
|
|
25
25
|
const then = +new Date();
|
|
26
26
|
const platforms = await (0, common_1.selectPlatforms)(config, selectedPlatformName);
|
|
27
27
|
try {
|
|
28
|
-
await (0, common_1.check)([() => (0, common_1.checkPackage)(), () => (0, common_1.checkWebDir)(config), ...(0, update_1.
|
|
28
|
+
await (0, common_1.check)([() => (0, common_1.checkPackage)(), () => (0, common_1.checkWebDir)(config), ...(await (0, update_1.addUpdateChecks)(config, platforms))]);
|
|
29
29
|
await (0, promise_1.allSerial)(platforms.map((platformName) => () => sync(config, platformName, deployment, inline)));
|
|
30
30
|
const now = +new Date();
|
|
31
31
|
const diff = (now - then) / 1000;
|
package/dist/tasks/update.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.update = exports.updateChecks = exports.updateCommand = void 0;
|
|
3
|
+
exports.update = exports.updateChecks = exports.addUpdateChecks = exports.updateCommand = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const update_1 = require("../android/update");
|
|
6
6
|
const colors_1 = tslib_1.__importDefault(require("../colors"));
|
|
@@ -25,7 +25,7 @@ async function updateCommand(config, selectedPlatformName, deployment) {
|
|
|
25
25
|
const then = +new Date();
|
|
26
26
|
const platforms = await (0, common_1.selectPlatforms)(config, selectedPlatformName);
|
|
27
27
|
try {
|
|
28
|
-
await (0, common_1.check)([() => (0, common_1.checkPackage)(), ...
|
|
28
|
+
await (0, common_1.check)([() => (0, common_1.checkPackage)(), ...(await addUpdateChecks(config, platforms))]);
|
|
29
29
|
await (0, promise_1.allSerial)(platforms.map((platformName) => async () => await update(config, platformName, deployment)));
|
|
30
30
|
const now = +new Date();
|
|
31
31
|
const diff = (now - then) / 1000;
|
|
@@ -40,6 +40,31 @@ async function updateCommand(config, selectedPlatformName, deployment) {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
exports.updateCommand = updateCommand;
|
|
43
|
+
async function addUpdateChecks(config, platforms) {
|
|
44
|
+
let checks = [];
|
|
45
|
+
for (const platformName of platforms) {
|
|
46
|
+
if (platformName === config.ios.name) {
|
|
47
|
+
checks = await (0, common_2.getCommonChecks)(config);
|
|
48
|
+
}
|
|
49
|
+
else if (platformName === config.android.name) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
else if (platformName === config.web.name) {
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
throw `Platform ${platformName} is not valid.`;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return checks;
|
|
60
|
+
}
|
|
61
|
+
exports.addUpdateChecks = addUpdateChecks;
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated use addUpdateChecks
|
|
64
|
+
* @param config
|
|
65
|
+
* @param platforms
|
|
66
|
+
* @returns
|
|
67
|
+
*/
|
|
43
68
|
function updateChecks(config, platforms) {
|
|
44
69
|
const checks = [];
|
|
45
70
|
for (const platformName of platforms) {
|
package/dist/util/spm.js
CHANGED
|
@@ -12,6 +12,11 @@ const common_2 = require("../ios/common");
|
|
|
12
12
|
const log_1 = require("../log");
|
|
13
13
|
const plugin_1 = require("../plugin");
|
|
14
14
|
const subprocess_1 = require("../util/subprocess");
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated use config.ios.packageManager
|
|
17
|
+
* @param config
|
|
18
|
+
* @returns 'Cocoapods' | 'SPM'
|
|
19
|
+
*/
|
|
15
20
|
async function checkPackageManager(config) {
|
|
16
21
|
const iosDirectory = config.ios.nativeProjectDirAbs;
|
|
17
22
|
if ((0, fs_extra_1.existsSync)((0, path_1.resolve)(iosDirectory, 'CapApp-SPM'))) {
|
|
@@ -128,25 +133,18 @@ exports.generatePackageText = generatePackageText;
|
|
|
128
133
|
async function runCocoapodsDeintegrate(config) {
|
|
129
134
|
const podPath = await config.ios.podPath;
|
|
130
135
|
const projectFileName = config.ios.nativeXcodeProjDirAbs;
|
|
131
|
-
const useBundler =
|
|
132
|
-
const podCommandExists = await (0, subprocess_1.isInstalled)('pod');
|
|
133
|
-
if (useBundler)
|
|
134
|
-
log_1.logger.info('Found bundler, using it to run CocoaPods.');
|
|
136
|
+
const useBundler = (await config.ios.packageManager) === 'bundler';
|
|
135
137
|
log_1.logger.info('Running pod deintegrate on project ' + projectFileName);
|
|
136
|
-
if (useBundler
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
await (0, subprocess_1.runCommand)(podPath, ['deintegrate', projectFileName], {
|
|
144
|
-
cwd: config.ios.nativeProjectDirAbs,
|
|
145
|
-
});
|
|
146
|
-
}
|
|
138
|
+
if (useBundler) {
|
|
139
|
+
log_1.logger.info('Found bundler, using it to run CocoaPods.');
|
|
140
|
+
await (0, subprocess_1.runCommand)('bundle', ['exec', 'pod', 'deintegrate', projectFileName], {
|
|
141
|
+
cwd: config.ios.nativeProjectDirAbs,
|
|
142
|
+
});
|
|
147
143
|
}
|
|
148
144
|
else {
|
|
149
|
-
|
|
145
|
+
await (0, subprocess_1.runCommand)(podPath, ['deintegrate', projectFileName], {
|
|
146
|
+
cwd: config.ios.nativeProjectDirAbs,
|
|
147
|
+
});
|
|
150
148
|
}
|
|
151
149
|
}
|
|
152
150
|
exports.runCocoapodsDeintegrate = runCocoapodsDeintegrate;
|
package/dist/util/template.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.extractTemplate = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const fs_extra_1 = require("fs-extra");
|
|
6
|
-
const tar_1 =
|
|
5
|
+
const tar_1 = require("tar");
|
|
7
6
|
async function extractTemplate(src, dir) {
|
|
8
7
|
await (0, fs_extra_1.mkdirp)(dir);
|
|
9
|
-
await tar_1.
|
|
8
|
+
await (0, tar_1.extract)({ file: src, cwd: dir });
|
|
10
9
|
}
|
|
11
10
|
exports.extractTemplate = extractTemplate;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/cli",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.5.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)",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"prompts": "^2.4.2",
|
|
59
59
|
"rimraf": "^6.0.1",
|
|
60
60
|
"semver": "^7.6.3",
|
|
61
|
-
"tar": "^
|
|
61
|
+
"tar": "^7.5.3",
|
|
62
62
|
"tslib": "^2.8.1",
|
|
63
63
|
"xml2js": "^0.6.2"
|
|
64
64
|
},
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
"@types/plist": "^3.0.5",
|
|
70
70
|
"@types/prompts": "^2.4.9",
|
|
71
71
|
"@types/semver": "^7.5.8",
|
|
72
|
-
"@types/tar": "^6.1.1",
|
|
73
72
|
"@types/tmp": "^0.2.6",
|
|
74
73
|
"@types/xml2js": "0.4.5",
|
|
75
74
|
"jest": "^29.7.0",
|