@capacitor-plus/cli 8.0.2 → 8.0.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.
Binary file
Binary file
Binary file
@@ -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
- const capacitorAndroidPackagePath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor-plus/android', 'package.json');
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, 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?`);
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-plus/${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
- const packagePath = (0, node_1.resolveNode)(config.app.rootDir, `@capacitor-plus/${name}`, 'package.json');
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-plus/${name}.\n` +
200
- `Are you sure ${colors_1.default.strong(`@capacitor-plus/${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('@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}`)}`);
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
- const core = (0, node_1.resolveNode)(config.app.rootDir, `@capacitor-plus/${platform}`, 'package.json');
386
- if (core) {
387
- return (0, path_1.dirname)(core);
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) {
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
- const cordovaPath = (0, node_1.resolveNode)(config.app.rootDir, '@capacitor-plus/core', 'cordova.js');
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, 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?`);
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
  }
@@ -138,10 +138,14 @@ 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-plus/ios', 'package.json');
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, 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?`);
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
  }
@@ -21,17 +21,25 @@ 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
25
  (0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor-plus/cli', 'version']),
26
26
  (0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor-plus/core', 'version']),
27
27
  (0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor-plus/android', 'version']),
28
28
  (0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor-plus/ios', 'version']),
29
+ (0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/cli', 'version']),
30
+ (0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/core', 'version']),
31
+ (0, subprocess_1.getCommandOutput)('npm', ['info', '@capacitor/android', 'version']),
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` +
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
+ ` @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` +
39
+ ` @capacitor/cli: ${colors_1.default.weak(cliVersion !== null && cliVersion !== void 0 ? cliVersion : 'unknown')}\n` +
40
+ ` @capacitor/core: ${colors_1.default.weak(coreVersion !== null && coreVersion !== void 0 ? coreVersion : 'unknown')}\n` +
41
+ ` @capacitor/android: ${colors_1.default.weak(androidVersion !== null && androidVersion !== void 0 ? androidVersion : 'unknown')}\n` +
42
+ ` @capacitor/ios: ${colors_1.default.weak(iosVersion !== null && iosVersion !== void 0 ? iosVersion : 'unknown')}\n\n` +
35
43
  `${colors_1.default.strong('Installed Dependencies:')}\n\n`);
36
44
  await printInstalledPackages(config);
37
45
  log_1.output.write('\n');
@@ -43,6 +51,10 @@ async function printInstalledPackages(config) {
43
51
  '@capacitor-plus/core',
44
52
  '@capacitor-plus/android',
45
53
  '@capacitor-plus/ios',
54
+ '@capacitor/cli',
55
+ '@capacitor/core',
56
+ '@capacitor/android',
57
+ '@capacitor/ios',
46
58
  ];
47
59
  await Promise.all(packageNames.map(async (packageName) => {
48
60
  const packagePath = (0, node_1.resolveNode)(config.app.rootDir, packageName, 'package.json');
@@ -17,7 +17,16 @@ 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-plus/core', '@capacitor-plus/cli', '@capacitor-plus/ios', '@capacitor-plus/android'];
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 = [
22
31
  '@capacitor-plus/action-sheet',
23
32
  '@capacitor-plus/app',
@@ -44,6 +53,31 @@ const plugins = [
44
53
  '@capacitor-plus/status-bar',
45
54
  '@capacitor-plus/text-zoom',
46
55
  '@capacitor-plus/toast',
56
+ '@capacitor/action-sheet',
57
+ '@capacitor/app',
58
+ '@capacitor/app-launcher',
59
+ '@capacitor/browser',
60
+ '@capacitor/camera',
61
+ '@capacitor/clipboard',
62
+ '@capacitor/device',
63
+ '@capacitor/dialog',
64
+ '@capacitor/filesystem',
65
+ '@capacitor/geolocation',
66
+ '@capacitor/google-maps',
67
+ '@capacitor/haptics',
68
+ '@capacitor/keyboard',
69
+ '@capacitor/local-notifications',
70
+ '@capacitor/motion',
71
+ '@capacitor/network',
72
+ '@capacitor/preferences',
73
+ '@capacitor/push-notifications',
74
+ '@capacitor/screen-orientation',
75
+ '@capacitor/screen-reader',
76
+ '@capacitor/share',
77
+ '@capacitor/splash-screen',
78
+ '@capacitor/status-bar',
79
+ '@capacitor/text-zoom',
80
+ '@capacitor/toast',
47
81
  ];
48
82
  const coreVersion = '^8.0.0';
49
83
  const pluginVersion = '^8.0.0';
@@ -120,7 +154,8 @@ async function migrateCommand(config, noprompt, packagemanager) {
120
154
  installFailed = true;
121
155
  }
122
156
  // Update iOS Projects
123
- if (allDependencies['@capacitor-plus/ios'] && (0, fs_extra_1.existsSync)(config.ios.platformDirAbs)) {
157
+ if ((allDependencies['@capacitor-plus/ios'] || allDependencies['@capacitor/ios']) &&
158
+ (0, fs_extra_1.existsSync)(config.ios.platformDirAbs)) {
124
159
  const currentiOSVersion = (0, common_2.getMajoriOSVersion)(config);
125
160
  if (parseInt(currentiOSVersion) < parseInt(iOSVersion)) {
126
161
  // ios template changes
@@ -146,7 +181,8 @@ async function migrateCommand(config, noprompt, packagemanager) {
146
181
  else {
147
182
  log_1.logger.warn('Skipped Running cap sync.');
148
183
  }
149
- if (allDependencies['@capacitor-plus/android'] && (0, fs_extra_1.existsSync)(config.android.platformDirAbs)) {
184
+ if ((allDependencies['@capacitor-plus/android'] || allDependencies['@capacitor/android']) &&
185
+ (0, fs_extra_1.existsSync)(config.android.platformDirAbs)) {
150
186
  // AndroidManifest.xml add "density"
151
187
  await (0, common_1.runTask)(`Migrating AndroidManifest.xml by adding density to Activity configChanges.`, () => {
152
188
  return updateAndroidManifest((0, path_1.join)(config.android.srcMainDirAbs, 'AndroidManifest.xml'));
@@ -291,6 +327,7 @@ async function installLatestLibs(dependencyManager, runInstall, config) {
291
327
  });
292
328
  if (runInstall) {
293
329
  rimraf_1.rimraf.sync((0, path_1.join)(config.app.rootDir, 'node_modules/@capacitor-plus/!(cli)'));
330
+ rimraf_1.rimraf.sync((0, path_1.join)(config.app.rootDir, 'node_modules/@capacitor/!(cli)'));
294
331
  await (0, subprocess_1.runCommand)(dependencyManager, ['install']);
295
332
  if (dependencyManager == 'yarn') {
296
333
  await (0, subprocess_1.runCommand)(dependencyManager, ['upgrade']);
@@ -315,6 +352,16 @@ async function writeBreakingChanges() {
315
352
  '@capacitor-plus/screen-orientation',
316
353
  '@capacitor-plus/splash-screen',
317
354
  '@capacitor-plus/status-bar',
355
+ '@capacitor/action-sheet',
356
+ '@capacitor/barcode-scanner',
357
+ '@capacitor/browser',
358
+ '@capacitor/camera',
359
+ '@capacitor/geolocation',
360
+ '@capacitor/google-maps',
361
+ '@capacitor/push-notifications',
362
+ '@capacitor/screen-orientation',
363
+ '@capacitor/splash-screen',
364
+ '@capacitor/status-bar',
318
365
  ];
319
366
  const broken = [];
320
367
  for (const lib of breaking) {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@capacitor-plus/cli",
3
- "version": "8.0.2",
3
+ "version": "8.0.5",
4
4
  "description": "Capacitor+: Enhanced Capacitor with automated upstream sync - Cross-platform apps with JavaScript and the web",
5
- "homepage": "https://github.com/Cap-go/capacitor-plus",
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": {
@@ -52,7 +52,7 @@
52
52
  "env-paths": "^2.2.0",
53
53
  "fs-extra": "^11.2.0",
54
54
  "kleur": "^4.1.5",
55
- "native-run": "^2.0.1",
55
+ "native-run": "^2.0.2",
56
56
  "open": "^8.4.0",
57
57
  "plist": "^3.1.0",
58
58
  "prompts": "^2.4.2",