Update capacitor version
This commit is contained in:
parent
91155bce0a
commit
f3b3a86b32
610 changed files with 28718 additions and 7101 deletions
61
@capacitor/cli/dist/index.js
vendored
61
@capacitor/cli/dist/index.js
vendored
|
|
@ -12,7 +12,7 @@ const log_1 = require("./log");
|
|||
const telemetry_1 = require("./telemetry");
|
||||
const cli_1 = require("./util/cli");
|
||||
const emoji_1 = require("./util/emoji");
|
||||
process.on('unhandledRejection', error => {
|
||||
process.on('unhandledRejection', (error) => {
|
||||
console.error(colors_1.default.failure('[fatal]'), error);
|
||||
});
|
||||
process.on('message', ipc_1.receive);
|
||||
|
|
@ -48,9 +48,10 @@ function runProgram(config) {
|
|||
.command('init [appName] [appId]')
|
||||
.description(`Initialize Capacitor configuration`)
|
||||
.option('--web-dir <value>', 'Optional: Directory of your projects built web assets')
|
||||
.action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (appName, appId, { webDir }) => {
|
||||
.option('--skip-appid-validation', 'Optional: Skip validating the app ID for iOS and Android compatibility')
|
||||
.action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (appName, appId, { webDir, skipAppidValidation }) => {
|
||||
const { initCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/init')));
|
||||
await initCommand(config, appName, appId, webDir);
|
||||
await initCommand(config, appName, appId, webDir, skipAppidValidation);
|
||||
})));
|
||||
commander_1.program
|
||||
.command('serve', { hidden: true })
|
||||
|
|
@ -65,7 +66,6 @@ function runProgram(config) {
|
|||
.option('--deployment', 'Optional: if provided, pod install will use --deployment option')
|
||||
.option('--inline', 'Optional: if true, all source maps will be inlined for easier debugging on mobile devices', false)
|
||||
.action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { deployment, inline }) => {
|
||||
(0, config_1.checkExternalConfig)(config.app);
|
||||
const { syncCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/sync')));
|
||||
await syncCommand(config, platform, deployment, inline);
|
||||
})));
|
||||
|
|
@ -74,7 +74,6 @@ function runProgram(config) {
|
|||
.description(`updates the native plugins and dependencies based on ${colors_1.default.strong('package.json')}`)
|
||||
.option('--deployment', 'Optional: if provided, pod install will use --deployment option')
|
||||
.action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { deployment }) => {
|
||||
(0, config_1.checkExternalConfig)(config.app);
|
||||
const { updateCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/update')));
|
||||
await updateCommand(config, platform, deployment);
|
||||
})));
|
||||
|
|
@ -83,7 +82,6 @@ function runProgram(config) {
|
|||
.description('copies the web app build into the native app')
|
||||
.option('--inline', 'Optional: if true, all source maps will be inlined for easier debugging on mobile devices', false)
|
||||
.action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { inline }) => {
|
||||
(0, config_1.checkExternalConfig)(config.app);
|
||||
const { copyCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/copy')));
|
||||
await copyCommand(config, platform, inline);
|
||||
})));
|
||||
|
|
@ -97,9 +95,28 @@ function runProgram(config) {
|
|||
.option('--keystorealias <keystoreAlias>', 'Key Alias in the keystore')
|
||||
.option('--configuration <name>', 'Configuration name of the iOS Scheme')
|
||||
.option('--keystorealiaspass <keystoreAliasPass>', 'Password for the Key Alias')
|
||||
.addOption(new commander_1.Option('--androidreleasetype <androidreleasetype>', 'Android release type; APK or AAB').choices(['AAB', 'APK']))
|
||||
.addOption(new commander_1.Option('--signing-type <signingtype>', 'Program used to sign apps (default: jarsigner)').choices(['apksigner', 'jarsigner']))
|
||||
.action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { scheme, flavor, keystorepath, keystorepass, keystorealias, keystorealiaspass, androidreleasetype, signingType, configuration, }) => {
|
||||
.addOption(new commander_1.Option('--androidreleasetype <androidreleasetype>', 'Android release type; APK or AAB').choices([
|
||||
'AAB',
|
||||
'APK',
|
||||
]))
|
||||
.addOption(new commander_1.Option('--signing-type <signingtype>', 'Program used to sign apps (default: jarsigner)').choices([
|
||||
'apksigner',
|
||||
'jarsigner',
|
||||
]))
|
||||
.addOption(new commander_1.Option('--xcode-team-id <xcodeTeamID>', 'The Developer team to use for building and exporting the archive'))
|
||||
.addOption(new commander_1.Option('--xcode-export-method <xcodeExportMethod>', 'Describes how xcodebuild should export the archive (default: app-store-connect)').choices([
|
||||
'app-store-connect',
|
||||
'release-testing',
|
||||
'enterprise',
|
||||
'debugging',
|
||||
'developer-id',
|
||||
'mac-application',
|
||||
'validation',
|
||||
]))
|
||||
.addOption(new commander_1.Option('--xcode-signing-style <xcodeSigningStyle>', 'The iOS signing style to use when building the app for distribution (default: automatic)').choices(['automatic', 'manual']))
|
||||
.addOption(new commander_1.Option('--xcode-signing-certificate <xcodeSigningCertificate>', 'A certificate name, SHA-1 hash, or automatic selector to use for signing for iOS builds'))
|
||||
.addOption(new commander_1.Option('--xcode-provisioning-profile <xcodeProvisioningProfile>', 'A provisioning profile name or UUID for iOS builds'))
|
||||
.action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { scheme, flavor, keystorepath, keystorepass, keystorealias, keystorealiaspass, androidreleasetype, signingType, configuration, xcodeTeamId, xcodeExportMethod, xcodeSigningStyle, xcodeSigningCertificate, xcodeProvisioningProfile, }) => {
|
||||
const { buildCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/build')));
|
||||
await buildCommand(config, platform, {
|
||||
scheme,
|
||||
|
|
@ -111,6 +128,11 @@ function runProgram(config) {
|
|||
androidreleasetype,
|
||||
signingtype: signingType,
|
||||
configuration,
|
||||
xcodeTeamId,
|
||||
xcodeExportMethod,
|
||||
xcodeSigningType: xcodeSigningStyle,
|
||||
xcodeSigningCertificate,
|
||||
xcodeProvisioningProfile,
|
||||
});
|
||||
})));
|
||||
commander_1.program
|
||||
|
|
@ -119,8 +141,7 @@ function runProgram(config) {
|
|||
.option('--scheme <schemeName>', 'set the scheme of the iOS project')
|
||||
.option('--flavor <flavorName>', 'set the flavor of the Android project (flavor dimensions not yet supported)')
|
||||
.option('--list', 'list targets, then quit')
|
||||
// TODO: remove once --json is a hidden option (https://github.com/tj/commander.js/issues/1106)
|
||||
.allowUnknownOption(true)
|
||||
.addOption(new commander_1.Option('--json').hideHelp())
|
||||
.option('--target <id>', 'use a specific target')
|
||||
.option('--no-sync', `do not run ${colors_1.default.input('sync')}`)
|
||||
.option('--forwardPorts <port:port>', 'Automatically run "adb reverse" for better live-reloading support')
|
||||
|
|
@ -128,12 +149,13 @@ function runProgram(config) {
|
|||
.option('--host <host>', 'Host used for live reload')
|
||||
.option('--port <port>', 'Port used for live reload')
|
||||
.option('--configuration <name>', 'Configuration name of the iOS Scheme')
|
||||
.action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { scheme, flavor, list, target, sync, forwardPorts, liveReload, host, port, configuration, }) => {
|
||||
.action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { scheme, flavor, list, json, target, sync, forwardPorts, liveReload, host, port, configuration }) => {
|
||||
const { runCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/run')));
|
||||
await runCommand(config, platform, {
|
||||
scheme,
|
||||
flavor,
|
||||
list,
|
||||
json,
|
||||
target,
|
||||
sync,
|
||||
forwardPorts,
|
||||
|
|
@ -153,14 +175,12 @@ function runProgram(config) {
|
|||
commander_1.program
|
||||
.command('add [platform]')
|
||||
.description('add a native platform project')
|
||||
.option('--packagemanager <packageManager>', 'The package manager to use for dependency installs (Cocoapods, SPM **experimental**)')
|
||||
.option('--packagemanager <packageManager>', 'The package manager to use for dependency installs (CocoaPods or SPM)')
|
||||
.action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform, { packagemanager }) => {
|
||||
(0, config_1.checkExternalConfig)(config.app);
|
||||
const { addCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/add')));
|
||||
const configWritable = config;
|
||||
if (packagemanager === 'SPM') {
|
||||
configWritable.cli.assets.ios.platformTemplateArchive =
|
||||
'ios-spm-template.tar.gz';
|
||||
configWritable.cli.assets.ios.platformTemplateArchive = 'ios-spm-template.tar.gz';
|
||||
configWritable.cli.assets.ios.platformTemplateArchiveAbs = (0, path_1.resolve)(configWritable.cli.assetsDirAbs, configWritable.cli.assets.ios.platformTemplateArchive);
|
||||
}
|
||||
await addCommand(configWritable, platform);
|
||||
|
|
@ -169,7 +189,6 @@ function runProgram(config) {
|
|||
.command('ls [platform]')
|
||||
.description('list installed Cordova and Capacitor plugins')
|
||||
.action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform) => {
|
||||
(0, config_1.checkExternalConfig)(config.app);
|
||||
const { listCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/list')));
|
||||
await listCommand(config, platform);
|
||||
})));
|
||||
|
|
@ -177,7 +196,6 @@ function runProgram(config) {
|
|||
.command('doctor [platform]')
|
||||
.description('checks the current setup for common errors')
|
||||
.action((0, cli_1.wrapAction)((0, telemetry_1.telemetryAction)(config, async (platform) => {
|
||||
(0, config_1.checkExternalConfig)(config.app);
|
||||
const { doctorCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/doctor')));
|
||||
await doctorCommand(config, platform);
|
||||
})));
|
||||
|
|
@ -210,6 +228,13 @@ function runProgram(config) {
|
|||
const { migrateCommand } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/migrate')));
|
||||
await migrateCommand(config, noprompt, packagemanager);
|
||||
}));
|
||||
commander_1.program
|
||||
.command('spm-migration-assistant')
|
||||
.description('Remove Cocoapods from project and switch to Swift Package Manager')
|
||||
.action((0, cli_1.wrapAction)(async () => {
|
||||
const { migrateToSPM } = await Promise.resolve().then(() => tslib_1.__importStar(require('./tasks/migrate-spm')));
|
||||
await migrateToSPM(config);
|
||||
}));
|
||||
commander_1.program.arguments('[command]').action((0, cli_1.wrapAction)(async (cmd) => {
|
||||
if (typeof cmd === 'undefined') {
|
||||
log_1.output.write(`\n ${(0, emoji_1.emoji)('⚡️', '--')} ${colors_1.default.strong('Capacitor - Cross-Platform apps with JavaScript and the Web')} ${(0, emoji_1.emoji)('⚡️', '--')}\n\n`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue