@capacitor-plus/cli 8.0.0-beta.0 → 8.0.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/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 +3 -3
- package/dist/common.js +10 -8
- package/dist/config.js +1 -1
- package/dist/cordova.js +3 -3
- package/dist/declarations.d.ts +9 -3
- package/dist/ios/common.js +27 -1
- package/dist/ios/update.js +3 -3
- package/dist/tasks/create.js +1 -1
- package/dist/tasks/doctor.js +14 -9
- package/dist/tasks/migrate.js +40 -39
- package/dist/tasks/new-plugin.js +1 -1
- package/dist/telemetry.js +4 -4
- package/dist/util/spm.js +2 -2
- package/package.json +1 -1
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,10 @@ async function findAndroidPluginClassesInPlugin(plugin) {
|
|
|
91
91
|
return entries.filter((entry) => !!entry);
|
|
92
92
|
}
|
|
93
93
|
async function installGradlePlugins(config, capacitorPlugins, cordovaPlugins) {
|
|
94
|
-
const capacitorAndroidPackagePath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor/android', 'package.json');
|
|
94
|
+
const capacitorAndroidPackagePath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor-plus/android', 'package.json');
|
|
95
95
|
if (!capacitorAndroidPackagePath) {
|
|
96
|
-
(0, errors_1.fatal)(`Unable to find ${colors_1.default.strong('node_modules/@capacitor/android')}.\n` +
|
|
97
|
-
`Are you sure ${colors_1.default.strong('@capacitor/android')} is installed?`);
|
|
96
|
+
(0, errors_1.fatal)(`Unable to find ${colors_1.default.strong('node_modules/@capacitor-plus/android')}.\n` +
|
|
97
|
+
`Are you sure ${colors_1.default.strong('@capacitor-plus/android')} is installed?`);
|
|
98
98
|
}
|
|
99
99
|
const capacitorAndroidPath = (0, path_1.resolve)((0, path_1.dirname)(capacitorAndroidPackagePath), 'capacitor');
|
|
100
100
|
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}`)}`);
|
|
63
63
|
}
|
|
64
64
|
return null;
|
|
65
65
|
}
|
|
@@ -186,7 +186,7 @@ async function runTask(title, fn) {
|
|
|
186
186
|
}
|
|
187
187
|
exports.runTask = runTask;
|
|
188
188
|
async function getCapacitorPackage(config, name) {
|
|
189
|
-
const packagePath = (0, node_1.resolveNode)(config.app.rootDir, `@capacitor/${name}`, 'package.json');
|
|
189
|
+
const packagePath = (0, node_1.resolveNode)(config.app.rootDir, `@capacitor-plus/${name}`, 'package.json');
|
|
190
190
|
if (!packagePath) {
|
|
191
191
|
return null;
|
|
192
192
|
}
|
|
@@ -196,8 +196,8 @@ exports.getCapacitorPackage = getCapacitorPackage;
|
|
|
196
196
|
async function requireCapacitorPackage(config, name) {
|
|
197
197
|
const pkg = await getCapacitorPackage(config, name);
|
|
198
198
|
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?`);
|
|
199
|
+
(0, errors_1.fatal)(`Unable to find node_modules/@capacitor-plus/${name}.\n` +
|
|
200
|
+
`Are you sure ${colors_1.default.strong(`@capacitor-plus/${name}`)} is installed?`);
|
|
201
201
|
}
|
|
202
202
|
return pkg;
|
|
203
203
|
}
|
|
@@ -375,14 +375,14 @@ async function checkPlatformVersions(config, platform) {
|
|
|
375
375
|
const coreVersion = await getCoreVersion(config);
|
|
376
376
|
const platformVersion = await getCapacitorPackageVersion(config, platform);
|
|
377
377
|
if (semver.diff(coreVersion, platformVersion) === 'minor' || semver.diff(coreVersion, platformVersion) === 'major') {
|
|
378
|
-
log_1.logger.warn(`${colors_1.default.strong('@capacitor/core')}${colors_1.default.weak(`@${coreVersion}`)} version doesn't match ${colors_1.default.strong(`@capacitor/${platform}`)}${colors_1.default.weak(`@${platformVersion}`)} version.\n` +
|
|
379
|
-
`Consider updating to a matching version, e.g. w/ ${colors_1.default.input(`npm install @capacitor/core@${platformVersion}`)}`);
|
|
378
|
+
log_1.logger.warn(`${colors_1.default.strong('@capacitor-plus/core')}${colors_1.default.weak(`@${coreVersion}`)} version doesn't match ${colors_1.default.strong(`@capacitor-plus/${platform}`)}${colors_1.default.weak(`@${platformVersion}`)} version.\n` +
|
|
379
|
+
`Consider updating to a matching version, e.g. w/ ${colors_1.default.input(`npm install @capacitor-plus/core@${platformVersion}`)}`);
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
exports.checkPlatformVersions = checkPlatformVersions;
|
|
383
383
|
function resolvePlatform(config, platform) {
|
|
384
384
|
if (platform[0] !== '@') {
|
|
385
|
-
const core = (0, node_1.resolveNode)(config.app.rootDir, `@capacitor/${platform}`, 'package.json');
|
|
385
|
+
const core = (0, node_1.resolveNode)(config.app.rootDir, `@capacitor-plus/${platform}`, 'package.json');
|
|
386
386
|
if (core) {
|
|
387
387
|
return (0, path_1.dirname)(core);
|
|
388
388
|
}
|
|
@@ -429,7 +429,9 @@ async function checkJDKMajorVersion() {
|
|
|
429
429
|
}
|
|
430
430
|
exports.checkJDKMajorVersion = checkJDKMajorVersion;
|
|
431
431
|
function parseApkNameFromFlavor(flavor) {
|
|
432
|
-
|
|
432
|
+
let convertedName = flavor.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
433
|
+
if (convertedName.startsWith('-'))
|
|
434
|
+
convertedName = convertedName.replace('-', '');
|
|
433
435
|
return `app-${convertedName ? `${convertedName}-` : ''}debug.apk`;
|
|
434
436
|
}
|
|
435
437
|
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,10 @@ async function copyPluginsJS(config, cordovaPlugins, platform) {
|
|
|
125
125
|
}
|
|
126
126
|
exports.copyPluginsJS = copyPluginsJS;
|
|
127
127
|
async function copyCordovaJS(config, platform) {
|
|
128
|
-
const cordovaPath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor/core', 'cordova.js');
|
|
128
|
+
const cordovaPath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor-plus/core', 'cordova.js');
|
|
129
129
|
if (!cordovaPath) {
|
|
130
|
-
(0, errors_1.fatal)(`Unable to find ${colors_1.default.strong('node_modules/@capacitor/core/cordova.js')}.\n` +
|
|
131
|
-
`Are you sure ${colors_1.default.strong('@capacitor/core')} is installed?`);
|
|
130
|
+
(0, errors_1.fatal)(`Unable to find ${colors_1.default.strong('node_modules/@capacitor-plus/core/cordova.js')}.\n` +
|
|
131
|
+
`Are you sure ${colors_1.default.strong('@capacitor-plus/core')} is installed?`);
|
|
132
132
|
}
|
|
133
133
|
return (0, fs_extra_1.copy)(cordovaPath, (0, path_1.join)(await getWebDir(config, platform), 'cordova.js'));
|
|
134
134
|
}
|
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,10 @@ async function updatePodfile(config, plugins, deployment) {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
async function getRelativeCapacitoriOSPath(config) {
|
|
141
|
-
const capacitoriOSPath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor/ios', 'package.json');
|
|
141
|
+
const capacitoriOSPath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor-plus/ios', 'package.json');
|
|
142
142
|
if (!capacitoriOSPath) {
|
|
143
|
-
(0, errors_1.fatal)(`Unable to find ${colors_1.default.strong('node_modules/@capacitor/ios')}.\n` +
|
|
144
|
-
`Are you sure ${colors_1.default.strong('@capacitor/ios')} is installed?`);
|
|
143
|
+
(0, errors_1.fatal)(`Unable to find ${colors_1.default.strong('node_modules/@capacitor-plus/ios')}.\n` +
|
|
144
|
+
`Are you sure ${colors_1.default.strong('@capacitor-plus/ios')} is installed?`);
|
|
145
145
|
}
|
|
146
146
|
return (0, fs_1.convertToUnixPath)((0, path_1.relative)(config.ios.nativeProjectDirAbs, await (0, fs_extra_1.realpath)((0, path_1.dirname)(capacitoriOSPath))));
|
|
147
147
|
}
|
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
|
@@ -22,23 +22,28 @@ async function doctorCommand(config, selectedPlatformName) {
|
|
|
22
22
|
exports.doctorCommand = doctorCommand;
|
|
23
23
|
async function doctorCore(config) {
|
|
24
24
|
const [cliVersion, coreVersion, androidVersion, iosVersion] = await Promise.all([
|
|
25
|
-
(0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/cli', 'version']),
|
|
26
|
-
(0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/core', 'version']),
|
|
27
|
-
(0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/android', 'version']),
|
|
28
|
-
(0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/ios', 'version']),
|
|
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']),
|
|
29
29
|
]);
|
|
30
30
|
log_1.output.write(`${colors_1.default.strong('Latest Dependencies:')}\n\n` +
|
|
31
|
-
` @capacitor/cli: ${colors_1.default.weak(cliVersion !== null && cliVersion !== void 0 ? cliVersion : 'unknown')}\n` +
|
|
32
|
-
` @capacitor/core: ${colors_1.default.weak(coreVersion !== null && coreVersion !== void 0 ? coreVersion : 'unknown')}\n` +
|
|
33
|
-
` @capacitor/android: ${colors_1.default.weak(androidVersion !== null && androidVersion !== void 0 ? androidVersion : 'unknown')}\n` +
|
|
34
|
-
` @capacitor/ios: ${colors_1.default.weak(iosVersion !== null && iosVersion !== void 0 ? iosVersion : 'unknown')}\n\n` +
|
|
31
|
+
` @capacitor-plus/cli: ${colors_1.default.weak(cliVersion !== null && cliVersion !== void 0 ? cliVersion : 'unknown')}\n` +
|
|
32
|
+
` @capacitor-plus/core: ${colors_1.default.weak(coreVersion !== null && coreVersion !== void 0 ? coreVersion : 'unknown')}\n` +
|
|
33
|
+
` @capacitor-plus/android: ${colors_1.default.weak(androidVersion !== null && androidVersion !== void 0 ? androidVersion : 'unknown')}\n` +
|
|
34
|
+
` @capacitor-plus/ios: ${colors_1.default.weak(iosVersion !== null && iosVersion !== void 0 ? iosVersion : 'unknown')}\n\n` +
|
|
35
35
|
`${colors_1.default.strong('Installed Dependencies:')}\n\n`);
|
|
36
36
|
await printInstalledPackages(config);
|
|
37
37
|
log_1.output.write('\n');
|
|
38
38
|
}
|
|
39
39
|
exports.doctorCore = doctorCore;
|
|
40
40
|
async function printInstalledPackages(config) {
|
|
41
|
-
const packageNames = [
|
|
41
|
+
const packageNames = [
|
|
42
|
+
'@capacitor-plus/cli',
|
|
43
|
+
'@capacitor-plus/core',
|
|
44
|
+
'@capacitor-plus/android',
|
|
45
|
+
'@capacitor-plus/ios',
|
|
46
|
+
];
|
|
42
47
|
await Promise.all(packageNames.map(async (packageName) => {
|
|
43
48
|
const packagePath = (0, node_1.resolveNode)(config.app.rootDir, packageName, 'package.json');
|
|
44
49
|
await printPackageVersion(packageName, packagePath);
|
package/dist/tasks/migrate.js
CHANGED
|
@@ -17,32 +17,33 @@ 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 = ['@capacitor/core', '@capacitor/cli', '@capacitor/ios', '@capacitor/android'];
|
|
20
|
+
const libs = ['@capacitor-plus/core', '@capacitor-plus/cli', '@capacitor-plus/ios', '@capacitor-plus/android'];
|
|
21
21
|
const plugins = [
|
|
22
|
-
'@capacitor/action-sheet',
|
|
23
|
-
'@capacitor/app',
|
|
24
|
-
'@capacitor/app-launcher',
|
|
25
|
-
'@capacitor/browser',
|
|
26
|
-
'@capacitor/camera',
|
|
27
|
-
'@capacitor/clipboard',
|
|
28
|
-
'@capacitor/device',
|
|
29
|
-
'@capacitor/dialog',
|
|
30
|
-
'@capacitor/filesystem',
|
|
31
|
-
'@capacitor/geolocation',
|
|
32
|
-
'@capacitor/
|
|
33
|
-
'@capacitor/
|
|
34
|
-
'@capacitor/
|
|
35
|
-
'@capacitor/
|
|
36
|
-
'@capacitor/
|
|
37
|
-
'@capacitor/
|
|
38
|
-
'@capacitor/
|
|
39
|
-
'@capacitor/
|
|
40
|
-
'@capacitor/screen-orientation',
|
|
41
|
-
'@capacitor/
|
|
42
|
-
'@capacitor/
|
|
43
|
-
'@capacitor/
|
|
44
|
-
'@capacitor/
|
|
45
|
-
'@capacitor/
|
|
22
|
+
'@capacitor-plus/action-sheet',
|
|
23
|
+
'@capacitor-plus/app',
|
|
24
|
+
'@capacitor-plus/app-launcher',
|
|
25
|
+
'@capacitor-plus/browser',
|
|
26
|
+
'@capacitor-plus/camera',
|
|
27
|
+
'@capacitor-plus/clipboard',
|
|
28
|
+
'@capacitor-plus/device',
|
|
29
|
+
'@capacitor-plus/dialog',
|
|
30
|
+
'@capacitor-plus/filesystem',
|
|
31
|
+
'@capacitor-plus/geolocation',
|
|
32
|
+
'@capacitor-plus/google-maps',
|
|
33
|
+
'@capacitor-plus/haptics',
|
|
34
|
+
'@capacitor-plus/keyboard',
|
|
35
|
+
'@capacitor-plus/local-notifications',
|
|
36
|
+
'@capacitor-plus/motion',
|
|
37
|
+
'@capacitor-plus/network',
|
|
38
|
+
'@capacitor-plus/preferences',
|
|
39
|
+
'@capacitor-plus/push-notifications',
|
|
40
|
+
'@capacitor-plus/screen-orientation',
|
|
41
|
+
'@capacitor-plus/screen-reader',
|
|
42
|
+
'@capacitor-plus/share',
|
|
43
|
+
'@capacitor-plus/splash-screen',
|
|
44
|
+
'@capacitor-plus/status-bar',
|
|
45
|
+
'@capacitor-plus/text-zoom',
|
|
46
|
+
'@capacitor-plus/toast',
|
|
46
47
|
];
|
|
47
48
|
const coreVersion = '^8.0.0';
|
|
48
49
|
const pluginVersion = '^8.0.0';
|
|
@@ -119,7 +120,7 @@ async function migrateCommand(config, noprompt, packagemanager) {
|
|
|
119
120
|
installFailed = true;
|
|
120
121
|
}
|
|
121
122
|
// Update iOS Projects
|
|
122
|
-
if (allDependencies['@capacitor/ios'] && (0, fs_extra_1.existsSync)(config.ios.platformDirAbs)) {
|
|
123
|
+
if (allDependencies['@capacitor-plus/ios'] && (0, fs_extra_1.existsSync)(config.ios.platformDirAbs)) {
|
|
123
124
|
const currentiOSVersion = (0, common_2.getMajoriOSVersion)(config);
|
|
124
125
|
if (parseInt(currentiOSVersion) < parseInt(iOSVersion)) {
|
|
125
126
|
// ios template changes
|
|
@@ -145,7 +146,7 @@ async function migrateCommand(config, noprompt, packagemanager) {
|
|
|
145
146
|
else {
|
|
146
147
|
log_1.logger.warn('Skipped Running cap sync.');
|
|
147
148
|
}
|
|
148
|
-
if (allDependencies['@capacitor/android'] && (0, fs_extra_1.existsSync)(config.android.platformDirAbs)) {
|
|
149
|
+
if (allDependencies['@capacitor-plus/android'] && (0, fs_extra_1.existsSync)(config.android.platformDirAbs)) {
|
|
149
150
|
// AndroidManifest.xml add "density"
|
|
150
151
|
await (0, common_1.runTask)(`Migrating AndroidManifest.xml by adding density to Activity configChanges.`, () => {
|
|
151
152
|
return updateAndroidManifest((0, path_1.join)(config.android.srcMainDirAbs, 'AndroidManifest.xml'));
|
|
@@ -289,7 +290,7 @@ async function installLatestLibs(dependencyManager, runInstall, config) {
|
|
|
289
290
|
encoding: 'utf-8',
|
|
290
291
|
});
|
|
291
292
|
if (runInstall) {
|
|
292
|
-
rimraf_1.rimraf.sync((0, path_1.join)(config.app.rootDir, 'node_modules/@capacitor/!(cli)'));
|
|
293
|
+
rimraf_1.rimraf.sync((0, path_1.join)(config.app.rootDir, 'node_modules/@capacitor-plus/!(cli)'));
|
|
293
294
|
await (0, subprocess_1.runCommand)(dependencyManager, ['install']);
|
|
294
295
|
if (dependencyManager == 'yarn') {
|
|
295
296
|
await (0, subprocess_1.runCommand)(dependencyManager, ['upgrade']);
|
|
@@ -299,21 +300,21 @@ async function installLatestLibs(dependencyManager, runInstall, config) {
|
|
|
299
300
|
}
|
|
300
301
|
}
|
|
301
302
|
else {
|
|
302
|
-
log_1.logger.info(`Please run an install command with your package manager of choice. (ex: yarn
|
|
303
|
+
log_1.logger.info(`Please run an install command with your package manager of choice. (ex: yarn add)`);
|
|
303
304
|
}
|
|
304
305
|
}
|
|
305
306
|
async function writeBreakingChanges() {
|
|
306
307
|
const breaking = [
|
|
307
|
-
'@capacitor/action-sheet',
|
|
308
|
-
'@capacitor/barcode-scanner',
|
|
309
|
-
'@capacitor/browser',
|
|
310
|
-
'@capacitor/camera',
|
|
311
|
-
'@capacitor/geolocation',
|
|
312
|
-
'@capacitor/google-maps',
|
|
313
|
-
'@capacitor/push-notifications',
|
|
314
|
-
'@capacitor/screen-orientation',
|
|
315
|
-
'@capacitor/splash-screen',
|
|
316
|
-
'@capacitor/status-bar',
|
|
308
|
+
'@capacitor-plus/action-sheet',
|
|
309
|
+
'@capacitor-plus/barcode-scanner',
|
|
310
|
+
'@capacitor-plus/browser',
|
|
311
|
+
'@capacitor-plus/camera',
|
|
312
|
+
'@capacitor-plus/geolocation',
|
|
313
|
+
'@capacitor-plus/google-maps',
|
|
314
|
+
'@capacitor-plus/push-notifications',
|
|
315
|
+
'@capacitor-plus/screen-orientation',
|
|
316
|
+
'@capacitor-plus/splash-screen',
|
|
317
|
+
'@capacitor-plus/status-bar',
|
|
317
318
|
];
|
|
318
319
|
const broken = [];
|
|
319
320
|
for (const lib of breaking) {
|
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor-plus/cli",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"description": "Capacitor+: Enhanced Capacitor with automated upstream sync - Cross-platform apps with JavaScript and the web",
|
|
5
5
|
"homepage": "https://github.com/Cap-go/capacitor-plus",
|
|
6
6
|
"author": "Capgo Team <support@capgo.app> (https://capgo.app)",
|