From ffa5a0f9040ef00aa817c9324d68307d093b72e3 Mon Sep 17 00:00:00 2001 From: Mika Ruch Date: Tue, 8 Nov 2022 15:50:33 +0100 Subject: [PATCH 1/2] include --inline option for sync and copy --- packages/@ionic/cli/src/commands/capacitor/copy.ts | 12 ++++++++++++ packages/@ionic/cli/src/commands/capacitor/sync.ts | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/packages/@ionic/cli/src/commands/capacitor/copy.ts b/packages/@ionic/cli/src/commands/capacitor/copy.ts index b6440bba32..d4e87177a3 100644 --- a/packages/@ionic/cli/src/commands/capacitor/copy.ts +++ b/packages/@ionic/cli/src/commands/capacitor/copy.ts @@ -4,6 +4,7 @@ import { CommandInstanceInfo, CommandLineInputs, CommandLineOptions, CommandMeta import { input } from '../../lib/color'; import { CapacitorCommand } from './base'; +import * as semver from "semver"; export class CopyCommand extends CapacitorCommand implements CommandPreRun { async getMetadata(): Promise { @@ -14,6 +15,12 @@ export class CopyCommand extends CapacitorCommand implements CommandPreRun { type: Boolean, default: true, }, + { + name: 'inline', + summary: 'Use inline source maps (only available on capacitor 4.2.0)', + type: Boolean, + default: true + } ]; const runner = this.project && await this.project.getBuildRunner(); @@ -59,6 +66,11 @@ ${input('ionic capacitor copy')} will do the following: const args = ['copy']; + const capVersion = await this.getCapacitorVersion(); + if(semver.gte(capVersion, "4.2.0") && options.inline) { + args.push("--inline") + } + if (platform) { args.push(platform); } diff --git a/packages/@ionic/cli/src/commands/capacitor/sync.ts b/packages/@ionic/cli/src/commands/capacitor/sync.ts index 166956044b..10c937543f 100644 --- a/packages/@ionic/cli/src/commands/capacitor/sync.ts +++ b/packages/@ionic/cli/src/commands/capacitor/sync.ts @@ -6,6 +6,7 @@ import { FatalException } from '../../lib/errors'; import { Hook, HookDeps } from '../../lib/hooks'; import { CapacitorCommand } from './base'; +import * as semver from 'semver'; export class SyncCommand extends CapacitorCommand implements CommandPreRun { async getMetadata(): Promise { @@ -16,6 +17,12 @@ export class SyncCommand extends CapacitorCommand implements CommandPreRun { type: Boolean, default: true, }, + { + name: 'inline', + summary: 'Use inline source maps (only available on capacitor 4.1.0)', + type: Boolean, + default: true + } ]; const runner = this.project && await this.project.getBuildRunner(); @@ -67,6 +74,11 @@ ${input('ionic capacitor sync')} will do the following: const args = ['sync']; + const capVersion = await this.getCapacitorVersion(); + if(semver.gte(capVersion, "4.1.0") && options.inline) { + args.push("--inline") + } + if (platform) { args.push(platform); } From c581ddac1f3531ac58d0a8883f804fbb4d450a40 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 13 Jan 2023 18:14:47 +0100 Subject: [PATCH 2/2] make inline not default and update summary --- packages/@ionic/cli/src/commands/capacitor/copy.ts | 4 ++-- packages/@ionic/cli/src/commands/capacitor/sync.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/@ionic/cli/src/commands/capacitor/copy.ts b/packages/@ionic/cli/src/commands/capacitor/copy.ts index d4e87177a3..b9af544437 100644 --- a/packages/@ionic/cli/src/commands/capacitor/copy.ts +++ b/packages/@ionic/cli/src/commands/capacitor/copy.ts @@ -17,9 +17,9 @@ export class CopyCommand extends CapacitorCommand implements CommandPreRun { }, { name: 'inline', - summary: 'Use inline source maps (only available on capacitor 4.2.0)', + summary: 'Use inline source maps (only available on capacitor 4.2.0+)', type: Boolean, - default: true + default: false } ]; diff --git a/packages/@ionic/cli/src/commands/capacitor/sync.ts b/packages/@ionic/cli/src/commands/capacitor/sync.ts index 10c937543f..8f78b1db5d 100644 --- a/packages/@ionic/cli/src/commands/capacitor/sync.ts +++ b/packages/@ionic/cli/src/commands/capacitor/sync.ts @@ -19,9 +19,9 @@ export class SyncCommand extends CapacitorCommand implements CommandPreRun { }, { name: 'inline', - summary: 'Use inline source maps (only available on capacitor 4.1.0)', + summary: 'Use inline source maps (only available on capacitor 4.1.0+)', type: Boolean, - default: true + default: false } ];