@capacitor/cli 3.2.1 → 3.2.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/CHANGELOG.md +42 -0
- 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-template.tar.gz +0 -0
- package/dist/android/update.js +1 -0
- package/dist/cordova.js +11 -2
- package/dist/ios/update.js +10 -38
- package/dist/tasks/add.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,48 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.2.5](https://github.com/ionic-team/capacitor/compare/3.2.4...3.2.5) (2021-10-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **cli:** create only static pod if needed ([#5099](https://github.com/ionic-team/capacitor/issues/5099)) ([8304744](https://github.com/ionic-team/capacitor/commit/83047445562a52cc927c7c77d55b48288cfc1fcc))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [3.2.4](https://github.com/ionic-team/capacitor/compare/3.2.3...3.2.4) (2021-09-27)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **cli:** await sync on add to avoid telemetry hang ([833bc20](https://github.com/ionic-team/capacitor/commit/833bc20525a2558e03cd0e56c6765ce6828cdfac))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [3.2.3](https://github.com/ionic-team/capacitor/compare/3.2.2...3.2.3) (2021-09-15)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* Add SalesforceMobileSDK-CordovaPlugin to iOS incompatible list ([#5031](https://github.com/ionic-team/capacitor/issues/5031)) ([6f3f79f](https://github.com/ionic-team/capacitor/commit/6f3f79f412b77b0c90988226ec5ade5d0198c706))
|
|
34
|
+
* Define cordovaConfig gradle variable ([#5024](https://github.com/ionic-team/capacitor/issues/5024)) ([55c217e](https://github.com/ionic-team/capacitor/commit/55c217e6898d0270c23c3a7158a5102e9b84ff40))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## [3.2.2](https://github.com/ionic-team/capacitor/compare/3.2.1...3.2.2) (2021-09-02)
|
|
41
|
+
|
|
42
|
+
**Note:** Version bump only for package @capacitor/cli
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
6
48
|
## [3.2.1](https://github.com/ionic-team/capacitor/compare/3.2.0...3.2.1) (2021-09-01)
|
|
7
49
|
|
|
8
50
|
**Note:** Version bump only for package @capacitor/cli
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/android/update.js
CHANGED
|
@@ -201,6 +201,7 @@ ext {
|
|
|
201
201
|
cdvMinSdkVersion = project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : ${config.android.minVersion}
|
|
202
202
|
// Plugin gradle extensions can append to this to have code run at the end.
|
|
203
203
|
cdvPluginPostBuildExtras = []
|
|
204
|
+
cordovaConfig = [:]
|
|
204
205
|
}`;
|
|
205
206
|
await utils_fs_1.writeFile(path_1.join(config.android.cordovaPluginsDirAbs, 'cordova.variables.gradle'), cordovaVariables);
|
|
206
207
|
}
|
package/dist/cordova.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.writeCordovaAndroidManifest = exports.getCordovaPreferences = exports.getIncompatibleCordovaPlugins = exports.checkPluginDependencies = exports.logCordovaManualSteps = exports.getCordovaPlugins = exports.handleCordovaPluginsJS = exports.autoGenerateConfig = exports.removePluginFiles = exports.createEmptyCordovaJS = exports.copyCordovaJS = exports.copyPluginsJS = exports.generateCordovaPluginsJSFile = void 0;
|
|
3
|
+
exports.writeCordovaAndroidManifest = exports.getCordovaPreferences = exports.needsStaticPod = exports.getIncompatibleCordovaPlugins = exports.checkPluginDependencies = exports.logCordovaManualSteps = exports.getCordovaPlugins = exports.handleCordovaPluginsJS = exports.autoGenerateConfig = exports.removePluginFiles = exports.createEmptyCordovaJS = exports.copyCordovaJS = exports.copyPluginsJS = exports.generateCordovaPluginsJSFile = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const utils_fs_1 = require("@ionic/utils-fs");
|
|
6
6
|
const path_1 = require("path");
|
|
@@ -368,7 +368,7 @@ function getIncompatibleCordovaPlugins(platform) {
|
|
|
368
368
|
'cordova-support-google-services',
|
|
369
369
|
];
|
|
370
370
|
if (platform === 'ios') {
|
|
371
|
-
pluginList.push('cordova-plugin-statusbar', '@ionic-enterprise/statusbar');
|
|
371
|
+
pluginList.push('cordova-plugin-statusbar', '@ionic-enterprise/statusbar', 'SalesforceMobileSDK-CordovaPlugin');
|
|
372
372
|
}
|
|
373
373
|
if (platform === 'android') {
|
|
374
374
|
pluginList.push('cordova-plugin-compat');
|
|
@@ -376,6 +376,15 @@ function getIncompatibleCordovaPlugins(platform) {
|
|
|
376
376
|
return pluginList;
|
|
377
377
|
}
|
|
378
378
|
exports.getIncompatibleCordovaPlugins = getIncompatibleCordovaPlugins;
|
|
379
|
+
function needsStaticPod(plugin) {
|
|
380
|
+
const pluginList = [
|
|
381
|
+
'phonegap-plugin-push',
|
|
382
|
+
'@havesource/cordova-plugin-push',
|
|
383
|
+
'cordova-plugin-firebasex',
|
|
384
|
+
];
|
|
385
|
+
return pluginList.includes(plugin.id);
|
|
386
|
+
}
|
|
387
|
+
exports.needsStaticPod = needsStaticPod;
|
|
379
388
|
async function getCordovaPreferences(config) {
|
|
380
389
|
var _a, _b, _c, _d, _e;
|
|
381
390
|
const configXml = path_1.join(config.app.rootDir, 'config.xml');
|
package/dist/ios/update.js
CHANGED
|
@@ -103,19 +103,14 @@ async function generatePodFile(config, plugins) {
|
|
|
103
103
|
});
|
|
104
104
|
});
|
|
105
105
|
});
|
|
106
|
-
const
|
|
107
|
-
|
|
106
|
+
const staticPlugins = cordovaPlugins.filter(cordova_1.needsStaticPod);
|
|
107
|
+
const noStaticPlugins = cordovaPlugins.filter(el => !staticPlugins.includes(el));
|
|
108
|
+
if (noStaticPlugins.length > 0) {
|
|
108
109
|
pods.push(` pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'\n`);
|
|
109
110
|
}
|
|
110
|
-
|
|
111
|
-
const podSwiftPlugins = podPlugins.filter(filterSwift);
|
|
112
|
-
const podObjCPlugins = podPlugins.filter(el => !podSwiftPlugins.includes(el));
|
|
113
|
-
if (podObjCPlugins.length > 0) {
|
|
111
|
+
if (staticPlugins.length > 0) {
|
|
114
112
|
pods.push(` pod 'CordovaPluginsStatic', :path => '../capacitor-cordova-ios-plugins'\n`);
|
|
115
113
|
}
|
|
116
|
-
if (podSwiftPlugins.length > 0) {
|
|
117
|
-
pods.push(` pod 'CordovaPluginsStaticSwift', :path => '../capacitor-cordova-ios-plugins'\n`);
|
|
118
|
-
}
|
|
119
114
|
const resourcesPlugins = cordovaPlugins.filter(filterResources);
|
|
120
115
|
if (resourcesPlugins.length > 0) {
|
|
121
116
|
pods.push(` pod 'CordovaPluginsResources', :path => '../capacitor-cordova-ios-plugins'\n`);
|
|
@@ -140,15 +135,12 @@ function isFramework(framework) {
|
|
|
140
135
|
return framework.$.src.split('.').pop().includes('framework');
|
|
141
136
|
}
|
|
142
137
|
async function generateCordovaPodspecs(cordovaPlugins, config) {
|
|
143
|
-
const
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
generateCordovaPodspec(noPodPlugins, config, false, false);
|
|
148
|
-
generateCordovaPodspec(podObjCPlugins, config, true, false);
|
|
149
|
-
generateCordovaPodspec(podSwiftPlugins, config, true, true);
|
|
138
|
+
const staticPlugins = cordovaPlugins.filter(cordova_1.needsStaticPod);
|
|
139
|
+
const noStaticPlugins = cordovaPlugins.filter(el => !staticPlugins.includes(el));
|
|
140
|
+
generateCordovaPodspec(noStaticPlugins, config, false);
|
|
141
|
+
generateCordovaPodspec(staticPlugins, config, true);
|
|
150
142
|
}
|
|
151
|
-
async function generateCordovaPodspec(cordovaPlugins, config, isStatic
|
|
143
|
+
async function generateCordovaPodspec(cordovaPlugins, config, isStatic) {
|
|
152
144
|
const weakFrameworks = [];
|
|
153
145
|
const linkedFrameworks = [];
|
|
154
146
|
const customFrameworks = [];
|
|
@@ -164,10 +156,6 @@ async function generateCordovaPodspec(cordovaPlugins, config, isStatic, isSwift)
|
|
|
164
156
|
frameworkDeps.push('s.static_framework = true');
|
|
165
157
|
sourcesFolderName += 'static';
|
|
166
158
|
}
|
|
167
|
-
if (isSwift) {
|
|
168
|
-
name += 'Swift';
|
|
169
|
-
sourcesFolderName += 'swift';
|
|
170
|
-
}
|
|
171
159
|
cordovaPlugins.map((plugin) => {
|
|
172
160
|
const frameworks = plugin_1.getPlatformElement(plugin, platform, 'framework');
|
|
173
161
|
frameworks.map((framework) => {
|
|
@@ -302,14 +290,9 @@ async function copyPluginsNativeFiles(config, cordovaPlugins) {
|
|
|
302
290
|
const headerFiles = plugin_1.getPlatformElement(p, platform, 'header-file');
|
|
303
291
|
const codeFiles = sourceFiles.concat(headerFiles);
|
|
304
292
|
const frameworks = plugin_1.getPlatformElement(p, platform, 'framework');
|
|
305
|
-
const podFrameworks = frameworks.filter((framework) => framework.$.type && framework.$.type === 'podspec');
|
|
306
|
-
const podspecs = plugin_1.getPlatformElement(p, platform, 'podspec');
|
|
307
293
|
let sourcesFolderName = 'sources';
|
|
308
|
-
if (
|
|
294
|
+
if (cordova_1.needsStaticPod(p)) {
|
|
309
295
|
sourcesFolderName += 'static';
|
|
310
|
-
if (filterSwift(p)) {
|
|
311
|
-
sourcesFolderName += 'swift';
|
|
312
|
-
}
|
|
313
296
|
}
|
|
314
297
|
const sourcesFolder = path_1.join(config.ios.cordovaPluginsDirAbs, sourcesFolderName, p.name);
|
|
315
298
|
for (const codeFile of codeFiles) {
|
|
@@ -368,17 +351,6 @@ async function removePluginsNativeFiles(config) {
|
|
|
368
351
|
await utils_fs_1.remove(config.ios.cordovaPluginsDirAbs);
|
|
369
352
|
await template_1.extractTemplate(config.cli.assets.ios.cordovaPluginsTemplateArchiveAbs, config.ios.cordovaPluginsDirAbs);
|
|
370
353
|
}
|
|
371
|
-
function filterNoPods(plugin) {
|
|
372
|
-
const frameworks = plugin_1.getPlatformElement(plugin, platform, 'framework');
|
|
373
|
-
const podFrameworks = frameworks.filter((framework) => framework.$.type && framework.$.type === 'podspec');
|
|
374
|
-
const podspecs = plugin_1.getPlatformElement(plugin, platform, 'podspec');
|
|
375
|
-
return podFrameworks.length === 0 && podspecs.length === 0;
|
|
376
|
-
}
|
|
377
|
-
function filterSwift(plugin) {
|
|
378
|
-
const sourceFiles = plugin_1.getPlatformElement(plugin, platform, 'source-file');
|
|
379
|
-
const swiftFiles = sourceFiles.filter((sf) => sf.$.src && sf.$.src.split('.').pop() === 'swift');
|
|
380
|
-
return swiftFiles.length > 0;
|
|
381
|
-
}
|
|
382
354
|
function filterResources(plugin) {
|
|
383
355
|
const resources = plugin_1.getPlatformElement(plugin, platform, 'resource-file');
|
|
384
356
|
return resources.length > 0;
|
package/dist/tasks/add.js
CHANGED
|
@@ -55,7 +55,7 @@ async function addCommand(config, selectedPlatformName) {
|
|
|
55
55
|
await doAdd(config, platformName);
|
|
56
56
|
await editPlatforms(config, platformName);
|
|
57
57
|
if (await utils_fs_1.pathExists(config.app.webDirAbs)) {
|
|
58
|
-
sync_1.sync(config, platformName, false);
|
|
58
|
+
await sync_1.sync(config, platformName, false);
|
|
59
59
|
}
|
|
60
60
|
else {
|
|
61
61
|
log_1.logger.warn(`${colors_1.default.success(colors_1.default.strong('sync'))} could not run--missing ${colors_1.default.strong(config.app.webDir)} directory.`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/cli",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.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)",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"debug": "^4.2.0",
|
|
53
53
|
"env-paths": "^2.2.0",
|
|
54
54
|
"kleur": "^4.1.1",
|
|
55
|
-
"native-run": "^1.
|
|
56
|
-
"open": "^7.
|
|
55
|
+
"native-run": "^1.5.0",
|
|
56
|
+
"open": "^7.4.2",
|
|
57
57
|
"plist": "^3.0.2",
|
|
58
58
|
"prompts": "^2.3.2",
|
|
59
59
|
"semver": "^7.3.2",
|
|
60
|
-
"tar": "^6.
|
|
60
|
+
"tar": "^6.1.11",
|
|
61
61
|
"tslib": "^2.1.0",
|
|
62
62
|
"xml2js": "^0.4.23"
|
|
63
63
|
},
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "cc2960572ad70a0272c3ea1c44dbee14acf6e2ec"
|
|
89
89
|
}
|