Skip to content

Commit 34b07ad

Browse files
authored
chore(appflow): remove appflow from @ionic/cli (#4777)
BREAKING CHANGE: The `package` commands and the `deploy build` command have been removed. Developers should migrate to the Ionic Cloud CLI instead. - Using `deploy build`? Migrate to ionic-cloud build web and if you used the -channel option, also use ionic-cloud deploy web. - Using `package` commands? Migrate to ionic-cloud build and ionic-cloud deploy. See https://ionic.io/docs/appflow/cli/overview for more information on the Ionic Cloud CLI.
1 parent 225d546 commit 34b07ad

File tree

11 files changed

+44
-1139
lines changed

11 files changed

+44
-1139
lines changed

packages/@ionic/cli/src/commands/deploy/build.ts

Lines changed: 0 additions & 278 deletions
This file was deleted.

packages/@ionic/cli/src/commands/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ export class IonicNamespace extends Namespace {
4444
['config', async () => { const { ConfigNamespace } = await import('./config/index'); return new ConfigNamespace(this); }],
4545
['cordova', async () => { const { CordovaNamespace } = await import('./cordova/index'); return new CordovaNamespace(this); }],
4646
['capacitor', async () => { const { CapacitorNamespace } = await import('./capacitor/index'); return new CapacitorNamespace(this); }],
47-
['deploy', async () => { const { DeployNamespace } = await import('./deploy/index'); return new DeployNamespace(this); }],
47+
['live-update', async () => { const { LiveUpdatesNamespace } = await import('./live-update/index'); return new LiveUpdatesNamespace(this); }],
4848
['git', async () => { const { GitNamespace } = await import('./git/index'); return new GitNamespace(this); }],
49-
['package', async () => { const { PackageNamespace } = await import('./package/index'); return new PackageNamespace(this); }],
5049
['ssl', async () => { const { SSLNamespace } = await import('./ssl/index'); return new SSLNamespace(this); }],
5150
['ssh', async () => { const { SSHNamespace } = await import('./ssh/index'); return new SSHNamespace(this); }],
5251
['monitoring', async () => { const { MonitoringNamespace } = await import('./monitoring/index'); return new MonitoringNamespace(this); }],

packages/@ionic/cli/src/commands/deploy/add.ts renamed to packages/@ionic/cli/src/commands/live-update/add.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ import { CommandInstanceInfo, CommandLineInputs, CommandLineOptions, CommandMeta
44
import { input } from '../../lib/color';
55
import { runCommand } from '../../lib/executor';
66

7-
import { DeployConfCommand } from './core';
7+
import { LiveUpdatesConfCommand } from './core';
88

9-
export class AddCommand extends DeployConfCommand {
9+
export class AddCommand extends LiveUpdatesConfCommand {
1010
async getMetadata(): Promise<CommandMetadata> {
1111

1212
return {
1313
name: 'add',
1414
type: 'project',
1515
groups: [MetadataGroup.PAID],
16-
summary: 'Adds Appflow Deploy to the project',
16+
summary: 'Adds Ionic Live Updates plugin to the project',
1717
description: `
18-
This command adds the Appflow Deploy plugin (${input('cordova-plugin-ionic')}) for both Capacitor and Cordova projects.
18+
This command adds the Ionic Live Updates plugin (${input('cordova-plugin-ionic')}) for both Capacitor and Cordova projects.
1919
2020
For Capacitor projects it runs all the steps necessary to install the plugin, sync with the native projects and add the configuration to the proper iOS and Android configuration files.
2121
@@ -74,7 +74,7 @@ For Cordova projects it just takes care of running the proper Cordova CLI comman
7474
};
7575
}
7676

77-
protected buildCordovaDeployOptions(options: CommandLineOptions): string[] {
77+
protected buildCordovaLiveUpdateOptions(options: CommandLineOptions): string[] {
7878
const optionsToCordova = {
7979
'app-id': 'APP_ID',
8080
'channel-name': 'CHANNEL_NAME',
@@ -101,12 +101,12 @@ For Cordova projects it just takes care of running the proper Cordova CLI comman
101101

102102
async addPlugin(options: CommandLineOptions, runinfo: CommandInstanceInfo, integration?: string) {
103103
if (integration === 'cordova') {
104-
let deployCommand = ['cordova', 'plugin', 'add', 'cordova-plugin-ionic'];
105-
const userOptions = this.buildCordovaDeployOptions(options);
104+
let addPluginCommand = ['cordova', 'plugin', 'add', 'cordova-plugin-ionic'];
105+
const userOptions = this.buildCordovaLiveUpdateOptions(options);
106106
if (userOptions) {
107-
deployCommand = deployCommand.concat(userOptions);
107+
addPluginCommand = addPluginCommand.concat(userOptions);
108108
}
109-
await runCommand(runinfo, deployCommand);
109+
await runCommand(runinfo, addPluginCommand);
110110
}
111111
if (integration === 'capacitor') {
112112
const { pkgManagerArgs } = await import('../../lib/utils/npm');
@@ -124,7 +124,7 @@ For Cordova projects it just takes care of running the proper Cordova CLI comman
124124
const integration = await this.getAppIntegration();
125125

126126
// check if it is already installed
127-
const alreadyAdded = await this.checkDeployInstalled();
127+
const alreadyAdded = await this.checkLiveUpdatesInstalled();
128128
if (!alreadyAdded) {
129129
await this.addPlugin(options, runinfo, integration);
130130
} else {
@@ -133,7 +133,7 @@ For Cordova projects it just takes care of running the proper Cordova CLI comman
133133

134134
if (integration === 'capacitor') {
135135
// generate the manifest
136-
await runCommand(runinfo, ['deploy', 'manifest']);
136+
await runCommand(runinfo, ['live-update', 'manifest']);
137137
// run capacitor sync
138138
await runCommand(runinfo, ['capacitor', 'sync']);
139139
// update the ios project if present
@@ -142,7 +142,7 @@ For Cordova projects it just takes care of running the proper Cordova CLI comman
142142
await this.addConfToAndroidString(options);
143143
}
144144

145-
this.env.log.ok(`Appflow Deploy plugin added to the project!\n`);
145+
this.env.log.ok(`Ionic Live Updates plugin added to the project!\n`);
146146
}
147147

148148
}

0 commit comments

Comments
 (0)