Update capacitor version
This commit is contained in:
parent
91155bce0a
commit
f3b3a86b32
610 changed files with 28718 additions and 7101 deletions
16
@capacitor/cli/dist/plugin.js
vendored
16
@capacitor/cli/dist/plugin.js
vendored
|
|
@ -2,7 +2,7 @@
|
|||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getAllElements = exports.getFilePath = exports.getAssets = exports.getJSModules = exports.getPluginType = exports.getPlatformElement = exports.getPluginPlatform = exports.printPlugins = exports.fixName = exports.getDependencies = exports.resolvePlugin = exports.getPlugins = exports.getIncludedPluginPackages = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const utils_fs_1 = require("@ionic/utils-fs");
|
||||
const fs_extra_1 = require("fs-extra");
|
||||
const path_1 = require("path");
|
||||
const colors_1 = tslib_1.__importDefault(require("./colors"));
|
||||
const errors_1 = require("./errors");
|
||||
|
|
@ -31,11 +31,10 @@ async function resolvePlugin(config, name) {
|
|||
try {
|
||||
const packagePath = (0, node_1.resolveNode)(config.app.rootDir, name, 'package.json');
|
||||
if (!packagePath) {
|
||||
(0, errors_1.fatal)(`Unable to find ${colors_1.default.strong(`node_modules/${name}`)}.\n` +
|
||||
`Are you sure ${colors_1.default.strong(name)} is installed?`);
|
||||
(0, errors_1.fatal)(`Unable to find ${colors_1.default.strong(`node_modules/${name}`)}.\n` + `Are you sure ${colors_1.default.strong(name)} is installed?`);
|
||||
}
|
||||
const rootPath = (0, path_1.dirname)(packagePath);
|
||||
const meta = await (0, utils_fs_1.readJSON)(packagePath);
|
||||
const meta = await (0, fs_extra_1.readJSON)(packagePath);
|
||||
if (!meta) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -79,7 +78,7 @@ function fixName(name) {
|
|||
.replace(/\//g, '_')
|
||||
.replace(/-/g, '_')
|
||||
.replace(/@/g, '')
|
||||
.replace(/_\w/g, m => m[1].toUpperCase());
|
||||
.replace(/_\w/g, (m) => m[1].toUpperCase());
|
||||
return name.charAt(0).toUpperCase() + name.slice(1);
|
||||
}
|
||||
exports.fixName = fixName;
|
||||
|
|
@ -100,7 +99,7 @@ function printPlugins(plugins, platform, type = 'capacitor') {
|
|||
msg = `Found ${plugins.length} Capacitor plugin${plural} for ${colors_1.default.strong(platform)}:\n`;
|
||||
break;
|
||||
}
|
||||
msg += plugins.map(p => `${p.id}${colors_1.default.weak(`@${p.version}`)}`).join('\n');
|
||||
msg += plugins.map((p) => `${p.id}${colors_1.default.weak(`@${p.version}`)}`).join('\n');
|
||||
log_1.logger.info(msg);
|
||||
}
|
||||
exports.printPlugins = printPlugins;
|
||||
|
|
@ -155,10 +154,7 @@ function getFilePath(config, plugin, path) {
|
|||
if (path.startsWith('node_modules')) {
|
||||
let pathSegments = path.split('/').slice(1);
|
||||
if (pathSegments[0].startsWith('@')) {
|
||||
pathSegments = [
|
||||
pathSegments[0] + '/' + pathSegments[1],
|
||||
...pathSegments.slice(2),
|
||||
];
|
||||
pathSegments = [pathSegments[0] + '/' + pathSegments[1], ...pathSegments.slice(2)];
|
||||
}
|
||||
const filePath = (0, node_1.resolveNode)(config.app.rootDir, ...pathSegments);
|
||||
if (!filePath) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue