Skip to content

Commit 16360af

Browse files
committed
feat: Ionic Appflow rebranding
1 parent 42f7b2b commit 16360af

24 files changed

Lines changed: 155 additions & 131 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The Ionic CLI is organized into a monorepo. Here are the packages:
4848

4949
* [`packages/ionic`](https://github.com/ionic-team/ionic-cli/tree/develop/packages/ionic): Ionic CLI executable and library.
5050
* [`packages/@ionic/cli-framework`](https://github.com/ionic-team/ionic-cli/tree/develop/packages/%40ionic/cli-framework): Framework for command-line programs.
51-
* [`packages/@ionic/discover`](https://github.com/ionic-team/ionic-cli/tree/develop/packages/%40ionic/discover): Service discovery library used for `ionic serve` with the [Ionic DevApp](https://ionicframework.com/docs/pro/devapp/).
51+
* [`packages/@ionic/discover`](https://github.com/ionic-team/ionic-cli/tree/develop/packages/%40ionic/discover): Service discovery library used for `ionic serve` with the [Ionic DevApp](https://ionicframework.com/docs/appflow/devapp/).
5252
* [`packages/@ionic/lab`](https://github.com/ionic-team/ionic-cli/tree/develop/packages/%40ionic/lab): Utility CLI for Ionic Lab, used by `ionic serve`.
5353

5454
##### Ionic 1

packages/ionic/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ Aside from a few edge cases listed below, upgrading to CLI 4 should be seamless.
239239

240240
#### :boom: Breaking Changes
241241

242-
* Support for legacy Ionic Cloud ended on January 31st, 2018. The `ionic upload` and `ionic package` commands have been removed from the CLI. Support for [Ionic Pro](https://ionicframework.com/pro/) will be a major focus for the CLI going forward. :ok_hand:
242+
* Support for legacy Ionic Cloud ended on January 31st, 2018. The `ionic upload` and `ionic package` commands have been removed from the CLI. Support for [Ionic Appflow](https://ionicframework.com/appflow/) will be a major focus for the CLI going forward. :ok_hand:
243243
* The `app_id` property in `ionic.config.json` has been renamed to `pro_id` and is now optional (see [#3038](https://github.com/ionic-team/ionic-cli/issues/3038)). The CLI automatically detects this and changes it, but this notice is here if your build scripts rely on the setting.
244244
* `ionic build` will no longer run `cordova prepare`. Instead, run `ionic cordova prepare <platform>`, which performs an Ionic build beforehand.
245245
* `ionic cordova prepare` will no longer run an Ionic build without a platform, e.g. `ionic cordova prepare ios` (see [#3653](https://github.com/ionic-team/ionic-cli/issues/3653))

packages/ionic/src/commands/config/base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ export abstract class BaseConfigCommand extends Command {
7575
}
7676

7777
try {
78-
// '12345e6' (a possible Pro ID) is interpreted as a number in scientific
79-
// notation during JSON.parse, so don't try
78+
// '12345e6' (a possible Appflow App ID) is interpreted as a number in
79+
// scientific notation during JSON.parse, so don't try
8080
if (!v.match(/^\d+e\d+$/)) {
8181
v = JSON.parse(v);
8282
}

packages/ionic/src/commands/config/get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ This command will sanitize config output for known sensitive fields (disabled wh
5858
groups: [OptionGroup.Advanced],
5959
},
6060
],
61-
exampleCommands: ['', 'pro_id', '--global user.email', '-g npmClient'],
61+
exampleCommands: ['', 'id', '--global user.email', '-g npmClient'],
6262
};
6363
}
6464

packages/ionic/src/commands/cordova/resources.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ This command uses Ionic servers, so we require you to be logged into your free I
7575
const isLoggedIn = this.env.session.isLoggedIn();
7676

7777
if (!isLoggedIn) {
78-
this.env.log.warn(`You need to be logged into your Ionic Pro account in order to run ${chalk.green(`ionic cordova resources`)}.\n`);
78+
this.env.log.warn(`You need to be logged into your Ionic account in order to run ${chalk.green(`ionic cordova resources`)}.\n`);
7979
await promptToLogin(this.env);
8080
}
8181
}

packages/ionic/src/commands/git/clone.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export class GitCloneCommand extends Command {
1313
summary: 'Clones an Ionic app git repository to your computer',
1414
inputs: [
1515
{
16-
name: 'pro-id',
17-
summary: 'The Pro ID of the Ionic app to clone',
16+
name: 'id',
17+
summary: 'The ID of the Ionic Appflow app to clone',
1818
validators: [validators.required],
1919
},
2020
{
@@ -27,10 +27,10 @@ export class GitCloneCommand extends Command {
2727
}
2828

2929
async run(inputs: CommandLineInputs, options: CommandLineOptions): Promise<void> {
30-
// let [ proId, destination ] = inputs;
30+
// let [ id, destination ] = inputs;
3131

3232
// const appLoader = new App(this.env.session.getUserToken(), this.env.client);
33-
// const app = await appLoader.load(proId);
33+
// const app = await appLoader.load(id);
3434
// const remote = await formatGitRepoUrl(this.env.config, app.id);
3535

3636
// if (!destination) {

packages/ionic/src/commands/git/remote.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ export class GitRemoteCommand extends Command {
99
return {
1010
name: 'remote',
1111
type: 'project',
12-
summary: 'Adds/updates the Ionic Pro git remote to your local Ionic app',
12+
summary: 'Adds/updates the Ionic Appflow git remote to your local Ionic app',
1313
description: `
14-
This command is used by ${chalk.green('ionic link')} when Ionic Pro is used as the git host.
14+
This command is used by ${chalk.green('ionic link')} when Ionic Appflow is used as the git host.
1515
1616
${chalk.green('ionic git remote')} will check the local repository for whether or not the git remote is properly set up. This command operates on the ${chalk.bold('ionic')} remote. For advanced configuration, see ${chalk.bold('Settings')} => ${chalk.bold('Git')} in the app settings of the Dashboard${chalk.cyan('[1]')}.
1717
@@ -29,9 +29,9 @@ ${chalk.cyan('[1]')}: ${chalk.bold('https://dashboard.ionicframework.com')}
2929
}
3030

3131
const token = this.env.session.getUserToken();
32-
const proId = await this.project.requireProId();
32+
const id = await this.project.requireAppflowId();
3333
const appClient = new AppClient(token, this.env);
34-
const app = await appClient.load(proId);
34+
const app = await appClient.load(id);
3535

3636
if (!app.repo_url) {
3737
throw new FatalException(`Missing ${chalk.bold('repo_url')} property in app.`);

packages/ionic/src/commands/help.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,13 @@ export class HelpCommand extends Command {
4545
);
4646
}
4747

48-
const isLoggedIn = this.env.session.isLoggedIn();
4948
const now = new Date();
50-
const prefix = isLoggedIn ? chalk.blue('PRO') + ' ' : '';
5149
const version = this.env.ctx.version;
5250
const suffix = now.getMonth() === 9 && now.getDate() === 31 ? ' 🎃' : '';
5351

5452
const formatterOptions = {
5553
inProject: this.project ? true : false,
56-
version: prefix + version + suffix,
54+
version: version + suffix,
5755
location,
5856
namespace: location.obj,
5957
};

packages/ionic/src/commands/link.ts

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,26 @@ export class LinkCommand extends Command implements CommandPreRun {
3131
return {
3232
name: 'link',
3333
type: 'project',
34-
summary: 'Connect local apps to Ionic Pro',
34+
summary: 'Connect local apps to Ionic Appflow',
3535
description: `
36-
Link apps on Ionic Pro to local Ionic projects with this command.
36+
Link apps on Ionic Appflow to local Ionic projects with this command.
3737
38-
If the ${chalk.green('pro-id')} argument is excluded, this command will prompt you to select an app from Ionic Pro.
38+
If the ${chalk.green('id')} argument is excluded, this command will prompt you to select an app from Ionic Appflow.
3939
40-
Ionic Pro uses a git-based workflow to manage app updates. During the linking process, select ${chalk.bold('GitHub')} (recommended) or ${chalk.bold('Ionic Pro')} as a git host. See our documentation${chalk.cyan('[1]')} for more information.
40+
Ionic Appflow uses a git-based workflow to manage app updates. During the linking process, select ${chalk.bold('GitHub')} (recommended) or ${chalk.bold('Ionic Appflow')} as a git host. See our documentation${chalk.cyan('[1]')} for more information.
4141
42-
Ultimately, this command sets the ${chalk.bold('pro_id')} property in ${chalk.bold(prettyPath(projectFile))}, which marks this app as linked.
42+
Ultimately, this command sets the ${chalk.bold('id')} property in ${chalk.bold(prettyPath(projectFile))}, which marks this app as linked.
4343
4444
If you are having issues linking, please get in touch with our Support${chalk.cyan('[2]')}.
4545
46-
${chalk.cyan('[1]')}: ${chalk.bold('https://ionicframework.com/docs/pro/basics/git')}
46+
${chalk.cyan('[1]')}: ${chalk.bold('https://ionicframework.com/docs/appflow/basics/git')}
4747
${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')}
4848
`,
4949
exampleCommands: ['', 'a1b2c3d4'],
5050
inputs: [
5151
{
52-
name: 'pro-id',
53-
summary: `The Ionic Pro ID of the app to link (e.g. ${chalk.green('a1b2c3d4')})`,
52+
name: 'id',
53+
summary: `The Ionic Appflow ID of the app to link (e.g. ${chalk.green('a1b2c3d4')})`,
5454
},
5555
],
5656
options: [
@@ -61,14 +61,14 @@ ${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')
6161
},
6262
{
6363
name: 'create',
64-
summary: 'Create a new app on Ionic Pro and link it with this local Ionic project',
64+
summary: 'Create a new app on Ionic Appflow and link it with this local Ionic project',
6565
type: Boolean,
6666
groups: [OptionGroup.Hidden],
6767
},
6868
{
6969
name: 'pro-id',
70-
summary: 'Specify an app ID from the Ionic Pro to link',
71-
groups: [OptionGroup.Hidden],
70+
summary: 'Specify an app ID from the Ionic Appflow to link',
71+
groups: [OptionGroup.Deprecated, OptionGroup.Hidden],
7272
spec: { value: 'id' },
7373
},
7474
],
@@ -79,13 +79,13 @@ ${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')
7979
const { create } = options;
8080

8181
if (inputs[0] && create) {
82-
throw new FatalException(`Sorry--cannot use both ${chalk.green('pro-id')} and ${chalk.green('--create')}. You must either link an existing app or create a new one.`);
82+
throw new FatalException(`Sorry--cannot use both ${chalk.green('id')} and ${chalk.green('--create')}. You must either link an existing app or create a new one.`);
8383
}
8484

85-
const proAppId = options['pro-id'] ? String(options['pro-id']) : undefined;
85+
const id = options['pro-id'] ? String(options['pro-id']) : undefined;
8686

87-
if (proAppId) {
88-
inputs[0] = proAppId;
87+
if (id) {
88+
inputs[0] = id;
8989
}
9090
}
9191

@@ -96,25 +96,25 @@ ${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')
9696
throw new FatalException(`Cannot run ${chalk.green('ionic link')} outside a project directory.`);
9797
}
9898

99-
let proId: string | undefined = inputs[0];
99+
let id: string | undefined = inputs[0];
100100
let { create } = options;
101101

102-
const proIdFromConfig = this.project.config.get('pro_id');
102+
const idFromConfig = this.project.config.get('id');
103103

104-
if (proIdFromConfig) {
105-
if (proId && proIdFromConfig === proId) {
106-
this.env.log.msg(`Already linked with app ${chalk.green(proId)}.`);
104+
if (idFromConfig) {
105+
if (id && idFromConfig === id) {
106+
this.env.log.msg(`Already linked with app ${chalk.green(id)}.`);
107107
return;
108108
}
109109

110-
const msg = proId ?
111-
`Are you sure you want to link it to ${chalk.green(proId)} instead?` :
110+
const msg = id ?
111+
`Are you sure you want to link it to ${chalk.green(id)} instead?` :
112112
`Would you like to run link again?`;
113113

114114
const confirm = await this.env.prompt({
115115
type: 'confirm',
116116
name: 'confirm',
117-
message: `Pro ID ${chalk.green(proIdFromConfig)} is already set up with this app. ${msg}`,
117+
message: `Appflow ID ${chalk.green(idFromConfig)} is already set up with this app. ${msg}`,
118118
});
119119

120120
if (!confirm) {
@@ -127,21 +127,21 @@ ${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')
127127
await promptToLogin(this.env);
128128
}
129129

130-
if (!proId && !create) {
130+
if (!id && !create) {
131131
const choices = [
132132
{
133-
name: `Link ${proIdFromConfig ? 'a different' : 'an existing'} app on Ionic Pro`,
133+
name: `Link ${idFromConfig ? 'a different' : 'an existing'} app on Ionic Appflow`,
134134
value: CHOICE_LINK_EXISTING_APP,
135135
},
136136
{
137-
name: 'Create a new app on Ionic Pro',
137+
name: 'Create a new app on Ionic Appflow',
138138
value: CHOICE_CREATE_NEW_APP,
139139
},
140140
];
141141

142-
if (proIdFromConfig) {
142+
if (idFromConfig) {
143143
choices.unshift({
144-
name: `Relink ${chalk.green(proIdFromConfig)}`,
144+
name: `Relink ${chalk.green(idFromConfig)}`,
145145
value: CHOICE_RELINK,
146146
});
147147
}
@@ -155,7 +155,7 @@ ${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')
155155

156156
if (result === CHOICE_CREATE_NEW_APP) {
157157
create = true;
158-
proId = undefined;
158+
id = undefined;
159159
} else if (result === CHOICE_LINK_EXISTING_APP) {
160160
const tasks = this.createTaskChain();
161161
tasks.next(`Looking up your apps`);
@@ -175,27 +175,27 @@ ${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')
175175
const confirm = await this.env.prompt({
176176
type: 'confirm',
177177
name: 'confirm',
178-
message: `No apps found. Would you like to create a new app on Ionic Pro?`,
178+
message: `No apps found. Would you like to create a new app on Ionic Appflow?`,
179179
});
180180

181181
if (!confirm) {
182182
throw new FatalException(`Cannot link without an app selected.`);
183183
}
184184

185185
create = true;
186-
proId = undefined;
186+
id = undefined;
187187
} else {
188188
const choice = await this.chooseApp(apps);
189189

190190
if (choice === CHOICE_NEVERMIND) {
191191
this.env.log.info('Not linking app.');
192-
proId = undefined;
192+
id = undefined;
193193
} else {
194-
proId = choice;
194+
id = choice;
195195
}
196196
}
197197
} else if (result === CHOICE_RELINK) {
198-
proId = proIdFromConfig;
198+
id = idFromConfig;
199199
}
200200
}
201201

@@ -211,9 +211,9 @@ ${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')
211211
});
212212
}
213213

214-
proId = await this.createApp({ name }, runinfo);
215-
} else if (proId) {
216-
const app = await this.lookUpApp(proId);
214+
id = await this.createApp({ name }, runinfo);
215+
} else if (id) {
216+
const app = await this.lookUpApp(id);
217217
await this.linkApp(app, runinfo);
218218
}
219219
}
@@ -230,12 +230,12 @@ ${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')
230230
return new UserClient(token, this.env);
231231
}
232232

233-
async lookUpApp(proId: string): Promise<App> {
233+
async lookUpApp(id: string): Promise<App> {
234234
const tasks = this.createTaskChain();
235-
tasks.next(`Looking up app ${chalk.green(proId)}`);
235+
tasks.next(`Looking up app ${chalk.green(id)}`);
236236

237237
const appClient = await this.getAppClient();
238-
const app = await appClient.load(proId); // Make sure the user has access to the app
238+
const app = await appClient.load(id); // Make sure the user has access to the app
239239

240240
tasks.end();
241241

@@ -260,9 +260,9 @@ ${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')
260260
this.env.log.nl();
261261

262262
this.env.log.info(
263-
`Ionic Pro uses a git-based workflow to manage app updates.\n` +
263+
`Ionic Appflow uses a git-based workflow to manage app updates.\n` +
264264
`You will be prompted to set up the git host and repository for this new app. See the docs${chalk.cyan('[1]')} for more information.\n\n` +
265-
`${chalk.cyan('[1]')}: ${chalk.bold('https://ionicframework.com/docs/pro/basics/git/')}`
265+
`${chalk.cyan('[1]')}: ${chalk.bold('https://ionicframework.com/docs/appflow/basics/git/')}`
266266
);
267267

268268
this.env.log.nl();
@@ -277,7 +277,7 @@ ${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')
277277
value: CHOICE_GITHUB,
278278
},
279279
{
280-
name: 'Ionic Pro',
280+
name: 'Ionic Appflow',
281281
value: CHOICE_IONIC,
282282
},
283283
// TODO: option to skip git setup for now
@@ -290,14 +290,14 @@ ${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')
290290
await runCommand(runinfo, ['ssh', 'setup']);
291291
}
292292

293-
await runCommand(runinfo, ['config', 'set', 'pro_id', `"${app.id}"`, '--json']);
293+
await runCommand(runinfo, ['config', 'set', 'id', `"${app.id}"`, '--json']);
294294
await runCommand(runinfo, ['git', 'remote']);
295295
} else {
296296
if (service === CHOICE_GITHUB) {
297297
githubUrl = await this.linkGithub(app);
298298
}
299299

300-
await runCommand(runinfo, ['config', 'set', 'pro_id', `"${app.id}"`, '--json']);
300+
await runCommand(runinfo, ['config', 'set', 'id', `"${app.id}"`, '--json']);
301301
}
302302

303303
this.env.log.ok(`Project linked with app ${chalk.green(app.id)}!`);
@@ -312,7 +312,7 @@ ${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')
312312

313313
if (githubUrl) {
314314
this.env.log.info(
315-
`You can now push to one of your branches on GitHub to trigger a build in Ionic Pro!\n` +
315+
`You can now push to one of your branches on GitHub to trigger a build in Ionic Appflow!\n` +
316316
`If you haven't added GitHub as your origin you can do so by running:\n\n` +
317317
`${chalk.green('git remote add origin ' + githubUrl)}\n\n` +
318318
`You can find additional links above to help if you're having issues.`
@@ -373,7 +373,7 @@ ${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')
373373
this.env.log.nl();
374374
this.env.log.info(
375375
`GitHub OAuth setup required.\n` +
376-
`To continue, we need you to authorize Ionic Pro with your GitHub account. ` +
376+
`To continue, we need you to authorize Ionic Appflow with your GitHub account. ` +
377377
`A browser will open and prompt you to complete the authorization request. ` +
378378
`When finished, please return to the CLI to continue linking your app.`
379379
);
@@ -533,7 +533,7 @@ ${chalk.cyan('[2]')}: ${chalk.bold('https://ionicframework.com/support/request')
533533

534534
async selectGithubBranches(repoId: number): Promise<string[]> {
535535
this.env.log.nl();
536-
this.env.log.info(chalk.bold(`By default Ionic Pro links only to the ${chalk.green('master')} branch.`));
536+
this.env.log.info(chalk.bold(`By default Ionic Appflow links only to the ${chalk.green('master')} branch.`));
537537
this.env.log.info(
538538
`${chalk.bold('If you\'d like to link to another branch or multiple branches you\'ll need to select each branch to connect to.')}\n` +
539539
`If you're not familiar with on working with branches in GitHub you can read about them here:\n\n` +

0 commit comments

Comments
 (0)