@capacitor-plus/cli 8.0.0-beta.0 → 8.0.4
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/README.md +40 -34
- 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 +7 -3
- package/dist/common.js +22 -10
- package/dist/config.js +1 -1
- package/dist/cordova.js +7 -3
- package/dist/declarations.d.ts +9 -3
- package/dist/ios/common.js +27 -1
- package/dist/ios/update.js +7 -3
- package/dist/tasks/create.js +1 -1
- package/dist/tasks/doctor.js +19 -2
- package/dist/tasks/migrate.js +53 -5
- package/dist/tasks/new-plugin.js +1 -1
- package/dist/telemetry.js +4 -4
- package/dist/util/spm.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,45 +1,63 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @capacitor-plus/cli
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The command-line interface for Capacitor+.
|
|
4
|
+
|
|
5
|
+
## What is Capacitor+?
|
|
6
|
+
|
|
7
|
+
**Capacitor+** is an automated fork of [Capacitor](https://github.com/ionic-team/capacitor) maintained by [Capgo](https://capgo.app). It provides the same functionality as `@capacitor/cli` with these benefits:
|
|
8
|
+
|
|
9
|
+
- **Faster Updates**: Get upstream fixes as soon as they pass CI, not months later
|
|
10
|
+
- **Community PRs Merged**: Valuable PRs stuck in the upstream queue are merged here
|
|
11
|
+
- **Security Reviewed**: Every change is analyzed by Claude Code for vulnerabilities
|
|
12
|
+
- **Drop-in Replacement**: Same commands, just a different package scope
|
|
4
13
|
|
|
5
14
|
## Installation
|
|
6
15
|
|
|
7
16
|
### Project Installation (Recommended)
|
|
8
17
|
|
|
9
|
-
Install the CLI locally in your project:
|
|
10
|
-
|
|
11
18
|
```bash
|
|
12
|
-
npm install @capacitor/cli --save-dev
|
|
19
|
+
npm install @capacitor-plus/cli --save-dev
|
|
13
20
|
```
|
|
14
21
|
|
|
15
22
|
### Global Installation
|
|
16
23
|
|
|
17
|
-
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g @capacitor-plus/cli
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
The CLI can be used through the `capacitor` or `cap` command. When installed locally, use it through `npx`:
|
|
18
31
|
|
|
19
32
|
```bash
|
|
20
|
-
|
|
33
|
+
npx cap init # Initialize a new Capacitor project
|
|
34
|
+
npx cap add android # Add Android platform
|
|
35
|
+
npx cap add ios # Add iOS platform
|
|
36
|
+
npx cap sync # Sync web code to native projects
|
|
37
|
+
npx cap build # Build native projects
|
|
38
|
+
npx cap run # Run on a device or emulator
|
|
21
39
|
```
|
|
22
40
|
|
|
23
|
-
|
|
41
|
+
For detailed information, consult the [Getting Started guide](https://capacitorjs.com/docs/getting-started).
|
|
24
42
|
|
|
25
|
-
|
|
43
|
+
## Why Use This Instead of @capacitor/cli?
|
|
26
44
|
|
|
27
|
-
|
|
45
|
+
The official Capacitor release cycle can leave bug fixes and improvements waiting for months. Capacitor+ automatically syncs with upstream daily, runs full CI, and publishes verified releases immediately.
|
|
28
46
|
|
|
29
|
-
|
|
30
|
-
- `cap add`: Add a native platform (ios, android)
|
|
31
|
-
- `cap sync`: Sync your web code to your native projects
|
|
47
|
+
**Have a PR stuck in the Capacitor repo?** Open an issue linking to it, and we'll merge it here so you can use your fix today.
|
|
32
48
|
|
|
33
|
-
|
|
49
|
+
## Compatibility
|
|
50
|
+
|
|
51
|
+
This package maintains API compatibility with `@capacitor/cli`. All commands work identically to the official CLI.
|
|
34
52
|
|
|
35
53
|
## Local Development
|
|
36
54
|
|
|
37
|
-
If you're contributing to
|
|
55
|
+
If you're contributing to Capacitor+ CLI or testing local changes:
|
|
38
56
|
|
|
39
57
|
1. Clone and setup:
|
|
40
58
|
|
|
41
59
|
```bash
|
|
42
|
-
git clone https://github.com/
|
|
60
|
+
git clone https://github.com/Cap-go/capacitor-plus.git
|
|
43
61
|
cd cli
|
|
44
62
|
npm install
|
|
45
63
|
```
|
|
@@ -61,24 +79,12 @@ If you're contributing to the Capacitor CLI or testing local changes:
|
|
|
61
79
|
- Use `capacitor` or `cap` commands to test your changes
|
|
62
80
|
- Run `npm test` to execute the test suite
|
|
63
81
|
|
|
64
|
-
##
|
|
65
|
-
|
|
66
|
-
### Using VS Code Launch Configurations
|
|
67
|
-
|
|
68
|
-
The CLI includes VS Code launch configurations for debugging. To debug a CLI command:
|
|
69
|
-
|
|
70
|
-
1. Open the project in VS Code
|
|
71
|
-
2. Right now we don't have debugging working in the ts files, so select one of the .js files inside of /dist/\*\*.js
|
|
72
|
-
3. Place a breakpoint
|
|
73
|
-
4. Press F5 or go to Run > Start Debugging
|
|
74
|
-
5. Select a launch config and run filling out the path you want to run the cli in, and the command that you want run.
|
|
75
|
-
|
|
76
|
-
You can add more configurations by copying and modifying the existing ones in `.vscode/launch.json`.
|
|
77
|
-
|
|
78
|
-
## Contributing
|
|
82
|
+
## Links
|
|
79
83
|
|
|
80
|
-
|
|
84
|
+
- [Main Repository](https://github.com/Cap-go/capacitor-plus)
|
|
85
|
+
- [Capacitor Documentation](https://capacitorjs.com/docs)
|
|
86
|
+
- [Capgo](https://capgo.app)
|
|
81
87
|
|
|
82
|
-
|
|
88
|
+
## License
|
|
83
89
|
|
|
84
|
-
- [
|
|
90
|
+
MIT - See [LICENSE](../LICENSE)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/android/update.js
CHANGED
|
@@ -91,10 +91,14 @@ async function findAndroidPluginClassesInPlugin(plugin) {
|
|
|
91
91
|
return entries.filter((entry) => !!entry);
|
|
92
92
|
}
|
|
93
93
|
async function installGradlePlugins(config, capacitorPlugins, cordovaPlugins) {
|
|
94
|
-
|
|
94
|
+
// Try @capacitor-plus/android first, then fall back to @capacitor/android
|
|
95
|
+
let capacitorAndroidPackagePath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor-plus/android', 'package.json');
|
|
95
96
|
if (!capacitorAndroidPackagePath) {
|
|
96
|
-
(0,
|
|
97
|
-
|
|
97
|
+
capacitorAndroidPackagePath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor/android', 'package.json');
|
|
98
|
+
}
|
|
99
|
+
if (!capacitorAndroidPackagePath) {
|
|
100
|
+
(0, errors_1.fatal)(`Unable to find ${colors_1.default.strong('node_modules/@capacitor-plus/android')} or ${colors_1.default.strong('node_modules/@capacitor/android')}.\n` +
|
|
101
|
+
`Are you sure ${colors_1.default.strong('@capacitor-plus/android')} or ${colors_1.default.strong('@capacitor/android')} is installed?`);
|
|
98
102
|
}
|
|
99
103
|
const capacitorAndroidPath = (0, path_1.resolve)((0, path_1.dirname)(capacitorAndroidPackagePath), 'capacitor');
|
|
100
104
|
const settingsPath = config.android.platformDirAbs;
|
package/dist/common.js
CHANGED
|
@@ -59,7 +59,7 @@ async function checkCapacitorPlatform(config, platform) {
|
|
|
59
59
|
const pkg = await getCapacitorPackage(config, platform);
|
|
60
60
|
if (!pkg) {
|
|
61
61
|
return (`Could not find the ${colors_1.default.input(platform)} platform.\n` +
|
|
62
|
-
`You must install it in your project first, e.g. w/ ${colors_1.default.input(`npm install @capacitor/${platform}`)}`);
|
|
62
|
+
`You must install it in your project first, e.g. w/ ${colors_1.default.input(`npm install @capacitor-plus/${platform}`)} or ${colors_1.default.input(`npm install @capacitor/${platform}`)}`);
|
|
63
63
|
}
|
|
64
64
|
return null;
|
|
65
65
|
}
|
|
@@ -186,7 +186,11 @@ async function runTask(title, fn) {
|
|
|
186
186
|
}
|
|
187
187
|
exports.runTask = runTask;
|
|
188
188
|
async function getCapacitorPackage(config, name) {
|
|
189
|
-
|
|
189
|
+
// Try @capacitor-plus first, then fall back to @capacitor
|
|
190
|
+
let packagePath = (0, node_1.resolveNode)(config.app.rootDir, `@capacitor-plus/${name}`, 'package.json');
|
|
191
|
+
if (!packagePath) {
|
|
192
|
+
packagePath = (0, node_1.resolveNode)(config.app.rootDir, `@capacitor/${name}`, 'package.json');
|
|
193
|
+
}
|
|
190
194
|
if (!packagePath) {
|
|
191
195
|
return null;
|
|
192
196
|
}
|
|
@@ -196,8 +200,8 @@ exports.getCapacitorPackage = getCapacitorPackage;
|
|
|
196
200
|
async function requireCapacitorPackage(config, name) {
|
|
197
201
|
const pkg = await getCapacitorPackage(config, name);
|
|
198
202
|
if (!pkg) {
|
|
199
|
-
(0, errors_1.fatal)(`Unable to find node_modules/@capacitor/${name}.\n` +
|
|
200
|
-
`Are you sure ${colors_1.default.strong(`@capacitor/${name}`)} is installed?`);
|
|
203
|
+
(0, errors_1.fatal)(`Unable to find node_modules/@capacitor-plus/${name} or node_modules/@capacitor/${name}.\n` +
|
|
204
|
+
`Are you sure ${colors_1.default.strong(`@capacitor-plus/${name}`)} or ${colors_1.default.strong(`@capacitor/${name}`)} is installed?`);
|
|
201
205
|
}
|
|
202
206
|
return pkg;
|
|
203
207
|
}
|
|
@@ -375,16 +379,22 @@ async function checkPlatformVersions(config, platform) {
|
|
|
375
379
|
const coreVersion = await getCoreVersion(config);
|
|
376
380
|
const platformVersion = await getCapacitorPackageVersion(config, platform);
|
|
377
381
|
if (semver.diff(coreVersion, platformVersion) === 'minor' || semver.diff(coreVersion, platformVersion) === 'major') {
|
|
378
|
-
log_1.logger.warn(`${colors_1.default.strong('
|
|
379
|
-
`Consider updating to a matching version
|
|
382
|
+
log_1.logger.warn(`${colors_1.default.strong('core')}${colors_1.default.weak(`@${coreVersion}`)} version doesn't match ${colors_1.default.strong(`${platform}`)}${colors_1.default.weak(`@${platformVersion}`)} version.\n` +
|
|
383
|
+
`Consider updating to a matching version.`);
|
|
380
384
|
}
|
|
381
385
|
}
|
|
382
386
|
exports.checkPlatformVersions = checkPlatformVersions;
|
|
383
387
|
function resolvePlatform(config, platform) {
|
|
384
388
|
if (platform[0] !== '@') {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
389
|
+
// Try @capacitor-plus first
|
|
390
|
+
const capacitorPlus = (0, node_1.resolveNode)(config.app.rootDir, `@capacitor-plus/${platform}`, 'package.json');
|
|
391
|
+
if (capacitorPlus) {
|
|
392
|
+
return (0, path_1.dirname)(capacitorPlus);
|
|
393
|
+
}
|
|
394
|
+
// Fall back to official @capacitor
|
|
395
|
+
const capacitor = (0, node_1.resolveNode)(config.app.rootDir, `@capacitor/${platform}`, 'package.json');
|
|
396
|
+
if (capacitor) {
|
|
397
|
+
return (0, path_1.dirname)(capacitor);
|
|
388
398
|
}
|
|
389
399
|
const community = (0, node_1.resolveNode)(config.app.rootDir, `@capacitor-community/${platform}`, 'package.json');
|
|
390
400
|
if (community) {
|
|
@@ -429,7 +439,9 @@ async function checkJDKMajorVersion() {
|
|
|
429
439
|
}
|
|
430
440
|
exports.checkJDKMajorVersion = checkJDKMajorVersion;
|
|
431
441
|
function parseApkNameFromFlavor(flavor) {
|
|
432
|
-
|
|
442
|
+
let convertedName = flavor.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
443
|
+
if (convertedName.startsWith('-'))
|
|
444
|
+
convertedName = convertedName.replace('-', '');
|
|
433
445
|
return `app-${convertedName ? `${convertedName}-` : ''}debug.apk`;
|
|
434
446
|
}
|
|
435
447
|
exports.parseApkNameFromFlavor = parseApkNameFromFlavor;
|
package/dist/config.js
CHANGED
|
@@ -396,7 +396,7 @@ async function determineGemfileOrCocoapodPath(rootDir, platformDir, nativeProjec
|
|
|
396
396
|
}
|
|
397
397
|
function formatConfigTS(extConfig) {
|
|
398
398
|
// TODO: <reference> tags
|
|
399
|
-
return `import type { CapacitorConfig } from '@capacitor/cli';
|
|
399
|
+
return `import type { CapacitorConfig } from '@capacitor-plus/cli';
|
|
400
400
|
|
|
401
401
|
const config: CapacitorConfig = ${(0, js_1.formatJSObject)(extConfig)};
|
|
402
402
|
|
package/dist/cordova.js
CHANGED
|
@@ -125,10 +125,14 @@ async function copyPluginsJS(config, cordovaPlugins, platform) {
|
|
|
125
125
|
}
|
|
126
126
|
exports.copyPluginsJS = copyPluginsJS;
|
|
127
127
|
async function copyCordovaJS(config, platform) {
|
|
128
|
-
|
|
128
|
+
// Try @capacitor-plus/core first, then fall back to @capacitor/core
|
|
129
|
+
let cordovaPath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor-plus/core', 'cordova.js');
|
|
129
130
|
if (!cordovaPath) {
|
|
130
|
-
(0,
|
|
131
|
-
|
|
131
|
+
cordovaPath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor/core', 'cordova.js');
|
|
132
|
+
}
|
|
133
|
+
if (!cordovaPath) {
|
|
134
|
+
(0, errors_1.fatal)(`Unable to find ${colors_1.default.strong('node_modules/@capacitor-plus/core/cordova.js')} or ${colors_1.default.strong('node_modules/@capacitor/core/cordova.js')}.\n` +
|
|
135
|
+
`Are you sure ${colors_1.default.strong('@capacitor-plus/core')} or ${colors_1.default.strong('@capacitor/core')} is installed?`);
|
|
132
136
|
}
|
|
133
137
|
return (0, fs_extra_1.copy)(cordovaPath, (0, path_1.join)(await getWebDir(config, platform), 'cordova.js'));
|
|
134
138
|
}
|
package/dist/declarations.d.ts
CHANGED
|
@@ -642,11 +642,17 @@ export interface PluginsConfig {
|
|
|
642
642
|
*/
|
|
643
643
|
SystemBars?: {
|
|
644
644
|
/**
|
|
645
|
-
*
|
|
645
|
+
* Specifies how to handle problematic insets on Android.
|
|
646
646
|
*
|
|
647
|
-
*
|
|
647
|
+
* This option is only supported on Android.
|
|
648
|
+
*
|
|
649
|
+
* `css` = Injects CSS variables (`--safe-area-inset-*`) containing correct safe area inset values into the webview.
|
|
650
|
+
*
|
|
651
|
+
* `disable` = Disable all inset handling.
|
|
652
|
+
*
|
|
653
|
+
* @default "css"
|
|
648
654
|
*/
|
|
649
|
-
|
|
655
|
+
insetsHandling?: 'css' | 'disable';
|
|
650
656
|
/**
|
|
651
657
|
* The style of the text and icons of the system bars.
|
|
652
658
|
*
|
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.getMajorMinoriOSVersion = exports.getMajoriOSVersion = exports.editProjectSettingsIOS = exports.resolvePlugin = exports.getIOSPlugins = exports.checkCocoaPods = exports.checkBundler = 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");
|
|
@@ -103,3 +103,29 @@ function getMajoriOSVersion(config) {
|
|
|
103
103
|
return iosVersion;
|
|
104
104
|
}
|
|
105
105
|
exports.getMajoriOSVersion = getMajoriOSVersion;
|
|
106
|
+
function getMajorMinoriOSVersion(config) {
|
|
107
|
+
const pbx = (0, fs_extra_1.readFileSync)((0, path_1.join)(config.ios.nativeXcodeProjDirAbs, 'project.pbxproj'), 'utf-8');
|
|
108
|
+
const searchString = 'IPHONEOS_DEPLOYMENT_TARGET = ';
|
|
109
|
+
const startIndex = pbx.indexOf(searchString);
|
|
110
|
+
if (startIndex === -1) {
|
|
111
|
+
return '';
|
|
112
|
+
}
|
|
113
|
+
const valueStart = startIndex + searchString.length;
|
|
114
|
+
// Extract until semicolon or newline (typical end of value in pbxproj)
|
|
115
|
+
const endIndex = pbx.indexOf(';', valueStart);
|
|
116
|
+
const newlineIndex = pbx.indexOf('\n', valueStart);
|
|
117
|
+
const actualEnd = endIndex !== -1 && newlineIndex !== -1
|
|
118
|
+
? Math.min(endIndex, newlineIndex)
|
|
119
|
+
: endIndex !== -1
|
|
120
|
+
? endIndex
|
|
121
|
+
: newlineIndex !== -1
|
|
122
|
+
? newlineIndex
|
|
123
|
+
: pbx.length;
|
|
124
|
+
let iosVersion = pbx.substring(valueStart, actualEnd).trim();
|
|
125
|
+
// Remove trailing .0 if present
|
|
126
|
+
if (iosVersion.endsWith('.0')) {
|
|
127
|
+
iosVersion = iosVersion.slice(0, -2);
|
|
128
|
+
}
|
|
129
|
+
return iosVersion;
|
|
130
|
+
}
|
|
131
|
+
exports.getMajorMinoriOSVersion = getMajorMinoriOSVersion;
|
package/dist/ios/update.js
CHANGED
|
@@ -138,10 +138,14 @@ async function updatePodfile(config, plugins, deployment) {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
async function getRelativeCapacitoriOSPath(config) {
|
|
141
|
-
|
|
141
|
+
// Try @capacitor-plus/ios first, then fall back to @capacitor/ios
|
|
142
|
+
let capacitoriOSPath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor-plus/ios', 'package.json');
|
|
142
143
|
if (!capacitoriOSPath) {
|
|
143
|
-
(0,
|
|
144
|
-
|
|
144
|
+
capacitoriOSPath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor/ios', 'package.json');
|
|
145
|
+
}
|
|
146
|
+
if (!capacitoriOSPath) {
|
|
147
|
+
(0, errors_1.fatal)(`Unable to find ${colors_1.default.strong('node_modules/@capacitor-plus/ios')} or ${colors_1.default.strong('node_modules/@capacitor/ios')}.\n` +
|
|
148
|
+
`Are you sure ${colors_1.default.strong('@capacitor-plus/ios')} or ${colors_1.default.strong('@capacitor/ios')} is installed?`);
|
|
145
149
|
}
|
|
146
150
|
return (0, fs_1.convertToUnixPath)((0, path_1.relative)(config.ios.nativeProjectDirAbs, await (0, fs_extra_1.realpath)((0, path_1.dirname)(capacitoriOSPath))));
|
|
147
151
|
}
|
package/dist/tasks/create.js
CHANGED
|
@@ -5,6 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const colors_1 = tslib_1.__importDefault(require("../colors"));
|
|
6
6
|
const errors_1 = require("../errors");
|
|
7
7
|
async function createCommand() {
|
|
8
|
-
(0, errors_1.fatal)(`The create command has been removed.\n` + `Use ${colors_1.default.input('npm init @capacitor/app')}`);
|
|
8
|
+
(0, errors_1.fatal)(`The create command has been removed.\n` + `Use ${colors_1.default.input('npm init @capacitor-plus/app')}`);
|
|
9
9
|
}
|
|
10
10
|
exports.createCommand = createCommand;
|
package/dist/tasks/doctor.js
CHANGED
|
@@ -21,13 +21,21 @@ async function doctorCommand(config, selectedPlatformName) {
|
|
|
21
21
|
}
|
|
22
22
|
exports.doctorCommand = doctorCommand;
|
|
23
23
|
async function doctorCore(config) {
|
|
24
|
-
const [cliVersion, coreVersion, androidVersion, iosVersion] = await Promise.all([
|
|
24
|
+
const [cliVersionPlus, coreVersionPlus, androidVersionPlus, iosVersionPlus, cliVersion, coreVersion, androidVersion, iosVersion,] = await Promise.all([
|
|
25
|
+
(0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor-plus/cli', 'version']),
|
|
26
|
+
(0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor-plus/core', 'version']),
|
|
27
|
+
(0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor-plus/android', 'version']),
|
|
28
|
+
(0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor-plus/ios', 'version']),
|
|
25
29
|
(0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/cli', 'version']),
|
|
26
30
|
(0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/core', 'version']),
|
|
27
31
|
(0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/android', 'version']),
|
|
28
32
|
(0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/ios', 'version']),
|
|
29
33
|
]);
|
|
30
34
|
log_1.output.write(`${colors_1.default.strong('Latest Dependencies:')}\n\n` +
|
|
35
|
+
` @capacitor-plus/cli: ${colors_1.default.weak(cliVersionPlus !== null && cliVersionPlus !== void 0 ? cliVersionPlus : 'unknown')}\n` +
|
|
36
|
+
` @capacitor-plus/core: ${colors_1.default.weak(coreVersionPlus !== null && coreVersionPlus !== void 0 ? coreVersionPlus : 'unknown')}\n` +
|
|
37
|
+
` @capacitor-plus/android: ${colors_1.default.weak(androidVersionPlus !== null && androidVersionPlus !== void 0 ? androidVersionPlus : 'unknown')}\n` +
|
|
38
|
+
` @capacitor-plus/ios: ${colors_1.default.weak(iosVersionPlus !== null && iosVersionPlus !== void 0 ? iosVersionPlus : 'unknown')}\n\n` +
|
|
31
39
|
` @capacitor/cli: ${colors_1.default.weak(cliVersion !== null && cliVersion !== void 0 ? cliVersion : 'unknown')}\n` +
|
|
32
40
|
` @capacitor/core: ${colors_1.default.weak(coreVersion !== null && coreVersion !== void 0 ? coreVersion : 'unknown')}\n` +
|
|
33
41
|
` @capacitor/android: ${colors_1.default.weak(androidVersion !== null && androidVersion !== void 0 ? androidVersion : 'unknown')}\n` +
|
|
@@ -38,7 +46,16 @@ async function doctorCore(config) {
|
|
|
38
46
|
}
|
|
39
47
|
exports.doctorCore = doctorCore;
|
|
40
48
|
async function printInstalledPackages(config) {
|
|
41
|
-
const packageNames = [
|
|
49
|
+
const packageNames = [
|
|
50
|
+
'@capacitor-plus/cli',
|
|
51
|
+
'@capacitor-plus/core',
|
|
52
|
+
'@capacitor-plus/android',
|
|
53
|
+
'@capacitor-plus/ios',
|
|
54
|
+
'@capacitor/cli',
|
|
55
|
+
'@capacitor/core',
|
|
56
|
+
'@capacitor/android',
|
|
57
|
+
'@capacitor/ios',
|
|
58
|
+
];
|
|
42
59
|
await Promise.all(packageNames.map(async (packageName) => {
|
|
43
60
|
const packagePath = (0, node_1.resolveNode)(config.app.rootDir, packageName, 'package.json');
|
|
44
61
|
await printPackageVersion(packageName, packagePath);
|
package/dist/tasks/migrate.js
CHANGED
|
@@ -17,8 +17,42 @@ const subprocess_1 = require("../util/subprocess");
|
|
|
17
17
|
const template_1 = require("../util/template");
|
|
18
18
|
// eslint-disable-next-line prefer-const
|
|
19
19
|
let allDependencies = {};
|
|
20
|
-
const libs = [
|
|
20
|
+
const libs = [
|
|
21
|
+
'@capacitor-plus/core',
|
|
22
|
+
'@capacitor-plus/cli',
|
|
23
|
+
'@capacitor-plus/ios',
|
|
24
|
+
'@capacitor-plus/android',
|
|
25
|
+
'@capacitor/core',
|
|
26
|
+
'@capacitor/cli',
|
|
27
|
+
'@capacitor/ios',
|
|
28
|
+
'@capacitor/android',
|
|
29
|
+
];
|
|
21
30
|
const plugins = [
|
|
31
|
+
'@capacitor-plus/action-sheet',
|
|
32
|
+
'@capacitor-plus/app',
|
|
33
|
+
'@capacitor-plus/app-launcher',
|
|
34
|
+
'@capacitor-plus/browser',
|
|
35
|
+
'@capacitor-plus/camera',
|
|
36
|
+
'@capacitor-plus/clipboard',
|
|
37
|
+
'@capacitor-plus/device',
|
|
38
|
+
'@capacitor-plus/dialog',
|
|
39
|
+
'@capacitor-plus/filesystem',
|
|
40
|
+
'@capacitor-plus/geolocation',
|
|
41
|
+
'@capacitor-plus/google-maps',
|
|
42
|
+
'@capacitor-plus/haptics',
|
|
43
|
+
'@capacitor-plus/keyboard',
|
|
44
|
+
'@capacitor-plus/local-notifications',
|
|
45
|
+
'@capacitor-plus/motion',
|
|
46
|
+
'@capacitor-plus/network',
|
|
47
|
+
'@capacitor-plus/preferences',
|
|
48
|
+
'@capacitor-plus/push-notifications',
|
|
49
|
+
'@capacitor-plus/screen-orientation',
|
|
50
|
+
'@capacitor-plus/screen-reader',
|
|
51
|
+
'@capacitor-plus/share',
|
|
52
|
+
'@capacitor-plus/splash-screen',
|
|
53
|
+
'@capacitor-plus/status-bar',
|
|
54
|
+
'@capacitor-plus/text-zoom',
|
|
55
|
+
'@capacitor-plus/toast',
|
|
22
56
|
'@capacitor/action-sheet',
|
|
23
57
|
'@capacitor/app',
|
|
24
58
|
'@capacitor/app-launcher',
|
|
@@ -29,6 +63,7 @@ const plugins = [
|
|
|
29
63
|
'@capacitor/dialog',
|
|
30
64
|
'@capacitor/filesystem',
|
|
31
65
|
'@capacitor/geolocation',
|
|
66
|
+
'@capacitor/google-maps',
|
|
32
67
|
'@capacitor/haptics',
|
|
33
68
|
'@capacitor/keyboard',
|
|
34
69
|
'@capacitor/local-notifications',
|
|
@@ -36,8 +71,8 @@ const plugins = [
|
|
|
36
71
|
'@capacitor/network',
|
|
37
72
|
'@capacitor/preferences',
|
|
38
73
|
'@capacitor/push-notifications',
|
|
39
|
-
'@capacitor/screen-reader',
|
|
40
74
|
'@capacitor/screen-orientation',
|
|
75
|
+
'@capacitor/screen-reader',
|
|
41
76
|
'@capacitor/share',
|
|
42
77
|
'@capacitor/splash-screen',
|
|
43
78
|
'@capacitor/status-bar',
|
|
@@ -119,7 +154,8 @@ async function migrateCommand(config, noprompt, packagemanager) {
|
|
|
119
154
|
installFailed = true;
|
|
120
155
|
}
|
|
121
156
|
// Update iOS Projects
|
|
122
|
-
if (allDependencies['@capacitor/ios']
|
|
157
|
+
if ((allDependencies['@capacitor-plus/ios'] || allDependencies['@capacitor/ios']) &&
|
|
158
|
+
(0, fs_extra_1.existsSync)(config.ios.platformDirAbs)) {
|
|
123
159
|
const currentiOSVersion = (0, common_2.getMajoriOSVersion)(config);
|
|
124
160
|
if (parseInt(currentiOSVersion) < parseInt(iOSVersion)) {
|
|
125
161
|
// ios template changes
|
|
@@ -145,7 +181,8 @@ async function migrateCommand(config, noprompt, packagemanager) {
|
|
|
145
181
|
else {
|
|
146
182
|
log_1.logger.warn('Skipped Running cap sync.');
|
|
147
183
|
}
|
|
148
|
-
if (allDependencies['@capacitor/android']
|
|
184
|
+
if ((allDependencies['@capacitor-plus/android'] || allDependencies['@capacitor/android']) &&
|
|
185
|
+
(0, fs_extra_1.existsSync)(config.android.platformDirAbs)) {
|
|
149
186
|
// AndroidManifest.xml add "density"
|
|
150
187
|
await (0, common_1.runTask)(`Migrating AndroidManifest.xml by adding density to Activity configChanges.`, () => {
|
|
151
188
|
return updateAndroidManifest((0, path_1.join)(config.android.srcMainDirAbs, 'AndroidManifest.xml'));
|
|
@@ -289,6 +326,7 @@ async function installLatestLibs(dependencyManager, runInstall, config) {
|
|
|
289
326
|
encoding: 'utf-8',
|
|
290
327
|
});
|
|
291
328
|
if (runInstall) {
|
|
329
|
+
rimraf_1.rimraf.sync((0, path_1.join)(config.app.rootDir, 'node_modules/@capacitor-plus/!(cli)'));
|
|
292
330
|
rimraf_1.rimraf.sync((0, path_1.join)(config.app.rootDir, 'node_modules/@capacitor/!(cli)'));
|
|
293
331
|
await (0, subprocess_1.runCommand)(dependencyManager, ['install']);
|
|
294
332
|
if (dependencyManager == 'yarn') {
|
|
@@ -299,11 +337,21 @@ async function installLatestLibs(dependencyManager, runInstall, config) {
|
|
|
299
337
|
}
|
|
300
338
|
}
|
|
301
339
|
else {
|
|
302
|
-
log_1.logger.info(`Please run an install command with your package manager of choice. (ex: yarn
|
|
340
|
+
log_1.logger.info(`Please run an install command with your package manager of choice. (ex: yarn add)`);
|
|
303
341
|
}
|
|
304
342
|
}
|
|
305
343
|
async function writeBreakingChanges() {
|
|
306
344
|
const breaking = [
|
|
345
|
+
'@capacitor-plus/action-sheet',
|
|
346
|
+
'@capacitor-plus/barcode-scanner',
|
|
347
|
+
'@capacitor-plus/browser',
|
|
348
|
+
'@capacitor-plus/camera',
|
|
349
|
+
'@capacitor-plus/geolocation',
|
|
350
|
+
'@capacitor-plus/google-maps',
|
|
351
|
+
'@capacitor-plus/push-notifications',
|
|
352
|
+
'@capacitor-plus/screen-orientation',
|
|
353
|
+
'@capacitor-plus/splash-screen',
|
|
354
|
+
'@capacitor-plus/status-bar',
|
|
307
355
|
'@capacitor/action-sheet',
|
|
308
356
|
'@capacitor/barcode-scanner',
|
|
309
357
|
'@capacitor/browser',
|
package/dist/tasks/new-plugin.js
CHANGED
|
@@ -5,6 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const colors_1 = tslib_1.__importDefault(require("../colors"));
|
|
6
6
|
const errors_1 = require("../errors");
|
|
7
7
|
async function newPluginCommand() {
|
|
8
|
-
(0, errors_1.fatal)(`The plugin:generate command has been removed.\n` + `Use ${colors_1.default.input('npm init @capacitor/plugin')}`);
|
|
8
|
+
(0, errors_1.fatal)(`The plugin:generate command has been removed.\n` + `Use ${colors_1.default.input('npm init @capacitor-plus/plugin')}`);
|
|
9
9
|
}
|
|
10
10
|
exports.newPluginCommand = newPluginCommand;
|
package/dist/telemetry.js
CHANGED
|
@@ -35,11 +35,11 @@ function telemetryAction(config, action) {
|
|
|
35
35
|
...config.app.package.devDependencies,
|
|
36
36
|
...config.app.package.dependencies,
|
|
37
37
|
});
|
|
38
|
-
// Only collect packages in the capacitor org:
|
|
39
|
-
// https://www.npmjs.com/org/capacitor
|
|
40
|
-
const capacitorPackages = packages.filter(([k]) => k.startsWith('@capacitor/'));
|
|
38
|
+
// Only collect packages in the capacitor-plus org:
|
|
39
|
+
// https://www.npmjs.com/org/capacitor-plus
|
|
40
|
+
const capacitorPackages = packages.filter(([k]) => k.startsWith('@capacitor-plus/'));
|
|
41
41
|
const versions = capacitorPackages.map(([k, v]) => [
|
|
42
|
-
`${k.replace(/^@capacitor\//, '').replace(/-/g, '_')}_version`,
|
|
42
|
+
`${k.replace(/^@capacitor-plus\//, '').replace(/-/g, '_')}_version`,
|
|
43
43
|
v,
|
|
44
44
|
]);
|
|
45
45
|
const data = {
|
package/dist/util/spm.js
CHANGED
|
@@ -81,14 +81,14 @@ exports.removeCocoapodsFiles = removeCocoapodsFiles;
|
|
|
81
81
|
async function generatePackageText(config, plugins) {
|
|
82
82
|
var _a, _b, _c;
|
|
83
83
|
const iosPlatformVersion = await (0, common_1.getCapacitorPackageVersion)(config, config.ios.name);
|
|
84
|
-
const iosVersion = (0, common_2.
|
|
84
|
+
const iosVersion = (0, common_2.getMajorMinoriOSVersion)(config);
|
|
85
85
|
let packageSwiftText = `// swift-tools-version: 5.9
|
|
86
86
|
import PackageDescription
|
|
87
87
|
|
|
88
88
|
// DO NOT MODIFY THIS FILE - managed by Capacitor CLI commands
|
|
89
89
|
let package = Package(
|
|
90
90
|
name: "CapApp-SPM",
|
|
91
|
-
platforms: [.iOS(.v${iosVersion})],
|
|
91
|
+
platforms: [.iOS(${iosVersion.includes('.') ? `"${iosVersion}"` : `.v${iosVersion}`})],
|
|
92
92
|
products: [
|
|
93
93
|
.library(
|
|
94
94
|
name: "CapApp-SPM",
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor-plus/cli",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.4",
|
|
4
4
|
"description": "Capacitor+: Enhanced Capacitor with automated upstream sync - Cross-platform apps with JavaScript and the web",
|
|
5
|
-
"homepage": "https://
|
|
5
|
+
"homepage": "https://capgo.app/docs/plugins/capacitor-plus/",
|
|
6
6
|
"author": "Capgo Team <support@capgo.app> (https://capgo.app)",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|