From ca1a001c664a616e443e3c44b1236864f92e6998 Mon Sep 17 00:00:00 2001 From: Lars Mikkelsen Date: Tue, 21 Jun 2022 11:03:49 -0400 Subject: [PATCH 01/49] chore(login): deprecate password-based auth (#4877) --- packages/@ionic/cli/src/commands/login.ts | 29 ++++++++++++----------- packages/@ionic/cli/src/index.ts | 7 ++++++ 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/packages/@ionic/cli/src/commands/login.ts b/packages/@ionic/cli/src/commands/login.ts index 0708211a15..9b9905a6e3 100644 --- a/packages/@ionic/cli/src/commands/login.ts +++ b/packages/@ionic/cli/src/commands/login.ts @@ -15,16 +15,12 @@ export class LoginCommand extends Command implements CommandPreRun { type: 'global', summary: 'Log in to Ionic', description: ` -Authenticate with Ionic and retrieve a user token, which is stored in the CLI config. The most secure way to log in is running ${input('ionic login')} without arguments, which will open a browser where you can submit your credentials. +Authenticate with Ionic and retrieve a user token, which is stored in the CLI config. Running ${input('ionic login')} will open a browser where you can submit your credentials. -If the ${input('IONIC_TOKEN')} environment variable is set, the CLI will automatically authenticate you. To retrieve your user token, first use ${input('ionic login ')} to log in, then use ${input('ionic config get -g tokens.user')} to print the token. (${strong('Note')}: Tokens retrieved from the browser login are short-lived and not recommended for use with ${input('IONIC_TOKEN')}.) - -${input('ionic login')} will also accept ${input('password')} through stdin, e.g.: ${input('echo "" | ionic login ')}. +If the ${input('IONIC_TOKEN')} environment variable is set, the CLI will automatically authenticate you. Use the Dashboard to generate a Personal Access Token. If you need to create an Ionic account, use ${input('ionic signup')} or the Ionic Website[^signup]. -You can reset your password in the Dashboard[^reset-password]. - If you are having issues logging in, please get in touch with our Support[^support-request]. `, footnotes: [ @@ -32,26 +28,21 @@ If you are having issues logging in, please get in touch with our Support[^suppo id: 'signup', url: 'https://ionicframework.com/signup', }, - { - id: 'reset-password', - url: 'https://dashboard.ionicframework.com/reset-password', - shortUrl: 'https://ion.link/reset-password', - }, { id: 'support-request', url: 'https://ion.link/support-request', }, ], - exampleCommands: ['', 'john@example.com', 'hello@example.com secret'], + exampleCommands: [''], inputs: [ { name: 'email', - summary: 'Your email address', + summary: 'Your email address (deprecated)', private: true, }, { name: 'password', - summary: 'Your password', + summary: 'Your password (deprecated)', private: true, }, ], @@ -74,6 +65,16 @@ If you are having issues logging in, please get in touch with our Support[^suppo this.env.log.nl(); } + if (!!inputs[0]) { + this.env.log.warn( + 'Authenticating using email and password is deprecated. ' + + (this.env.flags.interactive + ? `Please run ${input('ionic login')} without arguments to log in.` + : `Please generate a Personal Access Token and set the ${input('IONIC_TOKEN')} environment variable.`) + ); + this.env.log.nl(); + } + // ask for password only if the user specifies an email const validateEmail = !!inputs[0]; const askForPassword = inputs[0] && !inputs[1]; diff --git a/packages/@ionic/cli/src/index.ts b/packages/@ionic/cli/src/index.ts index 497535c0cb..92889b67be 100644 --- a/packages/@ionic/cli/src/index.ts +++ b/packages/@ionic/cli/src/index.ts @@ -83,6 +83,13 @@ async function authenticateFromEnvironment(ienv: IonicEnvironment) { if (ienv.config.get('user.email') !== email) { debug(`${strong('IONIC_EMAIL')} mismatch with current session--attempting login`); + ienv.log.warn( + 'Authenticating using email and password is deprecated. Please generate a Personal Access Token and set the ' + + strong('IONIC_TOKEN') + + ' environment variable.' + ); + ienv.log.nl(); + try { await ienv.session.login(email, password); } catch (e) { From 866d8fcaed86aebb61c01ac979a8d1e047557b11 Mon Sep 17 00:00:00 2001 From: Ionitron Date: Tue, 21 Jun 2022 19:10:14 +0000 Subject: [PATCH 02/49] chore(release): publish [skip ci] - @ionic/cli@6.20.1 - cli-scripts@2.1.55 --- packages/@ionic/cli/CHANGELOG.md | 8 ++++++++ packages/@ionic/cli/package.json | 2 +- packages/cli-scripts/CHANGELOG.md | 8 ++++++++ packages/cli-scripts/package.json | 4 ++-- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/@ionic/cli/CHANGELOG.md b/packages/@ionic/cli/CHANGELOG.md index b125199f6c..eaa10e11a6 100644 --- a/packages/@ionic/cli/CHANGELOG.md +++ b/packages/@ionic/cli/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.20.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.0...@ionic/cli@6.20.1) (2022-06-21) + +**Note:** Version bump only for package @ionic/cli + + + + + # [6.20.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.19.1...@ionic/cli@6.20.0) (2022-06-16) diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index 6c5d7c4571..417757e3ce 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/cli", - "version": "6.20.0", + "version": "6.20.1", "description": "A tool for creating and developing Ionic Framework mobile apps.", "homepage": "https://ionicframework.com", "author": "Ionic Team (https://ionicframework.com) ", diff --git a/packages/cli-scripts/CHANGELOG.md b/packages/cli-scripts/CHANGELOG.md index 21d91b8b40..1f634cfda0 100644 --- a/packages/cli-scripts/CHANGELOG.md +++ b/packages/cli-scripts/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.55](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.54...cli-scripts@2.1.55) (2022-06-21) + +**Note:** Version bump only for package cli-scripts + + + + + ## [2.1.54](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.53...cli-scripts@2.1.54) (2022-06-16) **Note:** Version bump only for package cli-scripts diff --git a/packages/cli-scripts/package.json b/packages/cli-scripts/package.json index 6e3525426c..6078eb5335 100644 --- a/packages/cli-scripts/package.json +++ b/packages/cli-scripts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "cli-scripts", - "version": "2.1.54", + "version": "2.1.55", "bin": { "ionic-cli-scripts": "./bin/ionic-cli-scripts" }, @@ -16,7 +16,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@ionic/cli": "6.20.0", + "@ionic/cli": "6.20.1", "@ionic/cli-framework": "5.1.3", "@ionic/utils-fs": "3.1.6", "ansi-styles": "^4.0.0", From cb0f91be222d7a44bd67097eb6fbee2c297d3175 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 8 Sep 2022 14:17:22 -0500 Subject: [PATCH 03/49] chore(): update @types/tar (#4906) --- packages/@ionic/cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index 417757e3ce..a17bbc839a 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -78,7 +78,7 @@ "@types/split2": "^2.1.6", "@types/superagent": "4.1.3", "@types/superagent-proxy": "^3.0.0", - "@types/tar": "^4.0.0", + "@types/tar": "^6.1.2", "jest": "^26.4.2", "jest-cli": "^26.0.1", "lint-staged": "^10.0.2", From f34da625eaa6248f623baed4fde120f3aa846d65 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 9 Sep 2022 08:30:38 -0500 Subject: [PATCH 04/49] chore(docs): deprecate ionic docs command (#4905) --- packages/@ionic/cli/src/commands/docs.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/@ionic/cli/src/commands/docs.ts b/packages/@ionic/cli/src/commands/docs.ts index 1425817fd9..65700ca986 100644 --- a/packages/@ionic/cli/src/commands/docs.ts +++ b/packages/@ionic/cli/src/commands/docs.ts @@ -31,6 +31,8 @@ export class DocsCommand extends Command { const homepage = 'https://ion.link/docs'; const url = this.project ? await this.project.getDocsUrl() : homepage; + this.env.log.warn(`The ${input('ionic docs')} command has been deprecated and will be removed in an upcoming major release of the Ionic CLI. Developers should bookmark ${url} in their browser for easy access.`); + try { const { req } = await createRequest('HEAD', url, this.env.config.getHTTPConfig()); await req; From ffd1960d28b0233f97b91b002d00c3ba1801bb8e Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 12 Sep 2022 12:03:18 -0500 Subject: [PATCH 05/49] chore(doctor): deprecate ionic doctor command (#4907) --- packages/@ionic/cli/src/commands/doctor/base.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/@ionic/cli/src/commands/doctor/base.ts b/packages/@ionic/cli/src/commands/doctor/base.ts index 980e0812c1..02525df9cc 100644 --- a/packages/@ionic/cli/src/commands/doctor/base.ts +++ b/packages/@ionic/cli/src/commands/doctor/base.ts @@ -30,6 +30,8 @@ export abstract class DoctorCommand extends Command { const tasks = this.createTaskChain(); const isLoggedIn = this.env.session.isLoggedIn(); + this.env.log.warn(`The ${input('ionic doctor')} command has been deprecated and will be removed in an upcoming major release of the Ionic CLI. Developers can safely remove any references to this command as many of the checks are no longer needed.`); + if (!isLoggedIn) { this.env.log.warn(`For best results, please make sure you're logged in to Ionic.\nSome issues can't be detected without authentication. Run:\n\n ${input('ionic login')}`); } From 0ab4881736f0d3b967d12802cb9cd01ba24d2088 Mon Sep 17 00:00:00 2001 From: Mike Summerfeldt <20338451+IT-MikeS@users.noreply.github.com> Date: Mon, 26 Sep 2022 10:59:57 -0400 Subject: [PATCH 06/49] fix(cli): capacitor config not being read from multi-project directories (#4909) * fix(cli): use exec to run cap command in right cwd * chore: fix deps causing build errors * chore: cleanup * chore: promise should reject from exec error --- .../cli/src/lib/integrations/capacitor/index.ts | 12 +++++++++++- packages/@ionic/lab/package.json | 5 +++-- packages/@ionic/v1-toolkit/package.json | 5 +++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts b/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts index d6c22d3e82..92e4043bed 100644 --- a/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts +++ b/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts @@ -1,3 +1,4 @@ +import { exec, ExecOptions } from 'child_process'; import { parseArgs } from '@ionic/cli-framework'; import { mkdirp, pathExists } from '@ionic/utils-fs'; import { prettyPath } from '@ionic/utils-terminal'; @@ -190,7 +191,16 @@ export class Integration extends BaseIntegration { debug('Getting config with Capacitor CLI: %O', args); - const output = await this.e.shell.cmdinfo('capacitor', args, { cwd: this.root }); + const output = await ((cmd: string, opts: ExecOptions): Promise => { + return new Promise((resolve, reject) => { + exec(cmd, opts, (error, stdout, stderr) => { + if (error) { + reject(); + } + resolve(stdout); + }) + }) + })(`capacitor ${args.join(' ')}`, { cwd: this.root }); if (!output) { debug('Could not get config from Capacitor CLI (probably old version)'); diff --git a/packages/@ionic/lab/package.json b/packages/@ionic/lab/package.json index ca4acb5674..5462600f96 100644 --- a/packages/@ionic/lab/package.json +++ b/packages/@ionic/lab/package.json @@ -44,13 +44,14 @@ "@ionic/cli-framework": "5.1.3", "@ionic/utils-fs": "3.1.6", "chalk": "^4.0.0", - "express": "^4.16.2", + "express": "4.16.2", "tslib": "^2.0.1" }, "devDependencies": { "@ionic-internal/ionic-ds": "^2.1.0", "@stencil/core": "~1.8.5", - "@types/express": "^4.11.0", + "@types/express": "4.11.0", + "@types/express-serve-static-core": "4.11.0", "@types/node": "~10.17.13", "lint-staged": "^10.0.2", "rimraf": "^3.0.0", diff --git a/packages/@ionic/v1-toolkit/package.json b/packages/@ionic/v1-toolkit/package.json index 2087899fdf..862f0adfd2 100644 --- a/packages/@ionic/v1-toolkit/package.json +++ b/packages/@ionic/v1-toolkit/package.json @@ -42,7 +42,7 @@ "chalk": "^4.0.0", "chokidar": "^3.0.1", "debug": "^4.0.0", - "express": "^4.16.2", + "express": "4.16.2", "gulp": "^4.0.2", "http-proxy-middleware": "^0.20.0", "tiny-lr": "^1.1.0", @@ -51,7 +51,8 @@ }, "devDependencies": { "@types/debug": "^4.1.1", - "@types/express": "^4.11.0", + "@types/express": "4.11.0", + "@types/express-serve-static-core": "4.11.0", "@types/gulp": "^4.0.6", "@types/http-proxy-middleware": "^0.19.0", "@types/jest": "^26.0.10", From faaf6c6a79f8c6394f40a5610fbcf5ae98b8344b Mon Sep 17 00:00:00 2001 From: Ionitron Date: Thu, 29 Sep 2022 15:44:34 +0000 Subject: [PATCH 07/49] chore(release): publish [skip ci] - @ionic/cli@6.20.2 - @ionic/lab@3.2.14 - @ionic/v1-toolkit@3.2.19 - cli-scripts@2.1.56 --- packages/@ionic/cli/CHANGELOG.md | 11 +++++++++++ packages/@ionic/cli/package.json | 2 +- packages/@ionic/lab/CHANGELOG.md | 11 +++++++++++ packages/@ionic/lab/package.json | 2 +- packages/@ionic/v1-toolkit/CHANGELOG.md | 11 +++++++++++ packages/@ionic/v1-toolkit/package.json | 2 +- packages/cli-scripts/CHANGELOG.md | 8 ++++++++ packages/cli-scripts/package.json | 4 ++-- 8 files changed, 46 insertions(+), 5 deletions(-) diff --git a/packages/@ionic/cli/CHANGELOG.md b/packages/@ionic/cli/CHANGELOG.md index eaa10e11a6..7cd438e312 100644 --- a/packages/@ionic/cli/CHANGELOG.md +++ b/packages/@ionic/cli/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.20.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.1...@ionic/cli@6.20.2) (2022-09-29) + + +### Bug Fixes + +* **cli:** capacitor config not being read from multi-project directories ([#4909](https://github.com/ionic-team/ionic-cli/issues/4909)) ([0ab4881](https://github.com/ionic-team/ionic-cli/commit/0ab4881736f0d3b967d12802cb9cd01ba24d2088)) + + + + + ## [6.20.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.0...@ionic/cli@6.20.1) (2022-06-21) **Note:** Version bump only for package @ionic/cli diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index a17bbc839a..43b35ea908 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/cli", - "version": "6.20.1", + "version": "6.20.2", "description": "A tool for creating and developing Ionic Framework mobile apps.", "homepage": "https://ionicframework.com", "author": "Ionic Team (https://ionicframework.com) ", diff --git a/packages/@ionic/lab/CHANGELOG.md b/packages/@ionic/lab/CHANGELOG.md index 36530cb3be..a9727c00be 100644 --- a/packages/@ionic/lab/CHANGELOG.md +++ b/packages/@ionic/lab/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.2.14](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.13...@ionic/lab@3.2.14) (2022-09-29) + + +### Bug Fixes + +* **cli:** capacitor config not being read from multi-project directories ([#4909](https://github.com/ionic-team/ionic-cli/issues/4909)) ([0ab4881](https://github.com/ionic-team/ionic-cli/commit/0ab4881736f0d3b967d12802cb9cd01ba24d2088)) + + + + + ## [3.2.13](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.12...@ionic/lab@3.2.13) (2022-06-16) **Note:** Version bump only for package @ionic/lab diff --git a/packages/@ionic/lab/package.json b/packages/@ionic/lab/package.json index 5462600f96..dd2566b763 100644 --- a/packages/@ionic/lab/package.json +++ b/packages/@ionic/lab/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/lab", - "version": "3.2.13", + "version": "3.2.14", "description": "Ionic Lab utility for developing Ionic apps, used by Ionic CLI", "bin": { "ionic-lab": "./bin/ionic-lab" diff --git a/packages/@ionic/v1-toolkit/CHANGELOG.md b/packages/@ionic/v1-toolkit/CHANGELOG.md index c63a1d60cf..1a246b6268 100644 --- a/packages/@ionic/v1-toolkit/CHANGELOG.md +++ b/packages/@ionic/v1-toolkit/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.2.19](https://github.com/ionic-team/ionic-cli/compare/@ionic/v1-toolkit@3.2.18...@ionic/v1-toolkit@3.2.19) (2022-09-29) + + +### Bug Fixes + +* **cli:** capacitor config not being read from multi-project directories ([#4909](https://github.com/ionic-team/ionic-cli/issues/4909)) ([0ab4881](https://github.com/ionic-team/ionic-cli/commit/0ab4881736f0d3b967d12802cb9cd01ba24d2088)) + + + + + ## [3.2.18](https://github.com/ionic-team/ionic-cli/compare/@ionic/v1-toolkit@3.2.17...@ionic/v1-toolkit@3.2.18) (2022-06-16) **Note:** Version bump only for package @ionic/v1-toolkit diff --git a/packages/@ionic/v1-toolkit/package.json b/packages/@ionic/v1-toolkit/package.json index 862f0adfd2..d2dece5c11 100644 --- a/packages/@ionic/v1-toolkit/package.json +++ b/packages/@ionic/v1-toolkit/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/v1-toolkit", - "version": "3.2.18", + "version": "3.2.19", "description": "Utility CLI for Ionic 1.x apps, used by Ionic CLI", "bin": { "ionic-v1": "./bin/ionic-v1" diff --git a/packages/cli-scripts/CHANGELOG.md b/packages/cli-scripts/CHANGELOG.md index 1f634cfda0..43951395fc 100644 --- a/packages/cli-scripts/CHANGELOG.md +++ b/packages/cli-scripts/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.56](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.55...cli-scripts@2.1.56) (2022-09-29) + +**Note:** Version bump only for package cli-scripts + + + + + ## [2.1.55](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.54...cli-scripts@2.1.55) (2022-06-21) **Note:** Version bump only for package cli-scripts diff --git a/packages/cli-scripts/package.json b/packages/cli-scripts/package.json index 6078eb5335..88e0868983 100644 --- a/packages/cli-scripts/package.json +++ b/packages/cli-scripts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "cli-scripts", - "version": "2.1.55", + "version": "2.1.56", "bin": { "ionic-cli-scripts": "./bin/ionic-cli-scripts" }, @@ -16,7 +16,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@ionic/cli": "6.20.1", + "@ionic/cli": "6.20.2", "@ionic/cli-framework": "5.1.3", "@ionic/utils-fs": "3.1.6", "ansi-styles": "^4.0.0", From 27b958bdf22c37f962d705a1b8ba1fee78b59c42 Mon Sep 17 00:00:00 2001 From: Mike Summerfeldt <20338451+IT-MikeS@users.noreply.github.com> Date: Thu, 6 Oct 2022 04:35:58 -0400 Subject: [PATCH 08/49] fix(cli): capacitor commands not working (#4918) --- .../cli/src/lib/integrations/capacitor/index.ts | 12 +----------- packages/@ionic/lab/package.json | 6 +++--- packages/@ionic/v1-toolkit/package.json | 6 +++--- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts b/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts index 92e4043bed..d6c22d3e82 100644 --- a/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts +++ b/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts @@ -1,4 +1,3 @@ -import { exec, ExecOptions } from 'child_process'; import { parseArgs } from '@ionic/cli-framework'; import { mkdirp, pathExists } from '@ionic/utils-fs'; import { prettyPath } from '@ionic/utils-terminal'; @@ -191,16 +190,7 @@ export class Integration extends BaseIntegration { debug('Getting config with Capacitor CLI: %O', args); - const output = await ((cmd: string, opts: ExecOptions): Promise => { - return new Promise((resolve, reject) => { - exec(cmd, opts, (error, stdout, stderr) => { - if (error) { - reject(); - } - resolve(stdout); - }) - }) - })(`capacitor ${args.join(' ')}`, { cwd: this.root }); + const output = await this.e.shell.cmdinfo('capacitor', args, { cwd: this.root }); if (!output) { debug('Could not get config from Capacitor CLI (probably old version)'); diff --git a/packages/@ionic/lab/package.json b/packages/@ionic/lab/package.json index dd2566b763..ddf21c719d 100644 --- a/packages/@ionic/lab/package.json +++ b/packages/@ionic/lab/package.json @@ -44,14 +44,14 @@ "@ionic/cli-framework": "5.1.3", "@ionic/utils-fs": "3.1.6", "chalk": "^4.0.0", - "express": "4.16.2", + "express": "^4.16.2", "tslib": "^2.0.1" }, "devDependencies": { "@ionic-internal/ionic-ds": "^2.1.0", "@stencil/core": "~1.8.5", - "@types/express": "4.11.0", - "@types/express-serve-static-core": "4.11.0", + "@types/express": "4.17.13", + "@types/express-serve-static-core": "4.17.28", "@types/node": "~10.17.13", "lint-staged": "^10.0.2", "rimraf": "^3.0.0", diff --git a/packages/@ionic/v1-toolkit/package.json b/packages/@ionic/v1-toolkit/package.json index d2dece5c11..c2bdbfa636 100644 --- a/packages/@ionic/v1-toolkit/package.json +++ b/packages/@ionic/v1-toolkit/package.json @@ -42,7 +42,7 @@ "chalk": "^4.0.0", "chokidar": "^3.0.1", "debug": "^4.0.0", - "express": "4.16.2", + "express": "^4.16.2", "gulp": "^4.0.2", "http-proxy-middleware": "^0.20.0", "tiny-lr": "^1.1.0", @@ -51,8 +51,8 @@ }, "devDependencies": { "@types/debug": "^4.1.1", - "@types/express": "4.11.0", - "@types/express-serve-static-core": "4.11.0", + "@types/express": "4.17.13", + "@types/express-serve-static-core": "4.17.28", "@types/gulp": "^4.0.6", "@types/http-proxy-middleware": "^0.19.0", "@types/jest": "^26.0.10", From 9badbe7f30687d6416dc40f139912e0ba4563493 Mon Sep 17 00:00:00 2001 From: Ionitron Date: Thu, 6 Oct 2022 08:39:19 +0000 Subject: [PATCH 09/49] chore(release): publish [skip ci] - @ionic/cli@6.20.3 - @ionic/lab@3.2.15 - @ionic/v1-toolkit@3.2.20 - cli-scripts@2.1.57 --- packages/@ionic/cli/CHANGELOG.md | 11 +++++++++++ packages/@ionic/cli/package.json | 2 +- packages/@ionic/lab/CHANGELOG.md | 11 +++++++++++ packages/@ionic/lab/package.json | 2 +- packages/@ionic/v1-toolkit/CHANGELOG.md | 11 +++++++++++ packages/@ionic/v1-toolkit/package.json | 2 +- packages/cli-scripts/CHANGELOG.md | 8 ++++++++ packages/cli-scripts/package.json | 4 ++-- 8 files changed, 46 insertions(+), 5 deletions(-) diff --git a/packages/@ionic/cli/CHANGELOG.md b/packages/@ionic/cli/CHANGELOG.md index 7cd438e312..78e402c8c3 100644 --- a/packages/@ionic/cli/CHANGELOG.md +++ b/packages/@ionic/cli/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.20.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.2...@ionic/cli@6.20.3) (2022-10-06) + + +### Bug Fixes + +* **cli:** capacitor commands not working ([#4918](https://github.com/ionic-team/ionic-cli/issues/4918)) ([27b958b](https://github.com/ionic-team/ionic-cli/commit/27b958bdf22c37f962d705a1b8ba1fee78b59c42)) + + + + + ## [6.20.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.1...@ionic/cli@6.20.2) (2022-09-29) diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index 43b35ea908..b2dbe3429f 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/cli", - "version": "6.20.2", + "version": "6.20.3", "description": "A tool for creating and developing Ionic Framework mobile apps.", "homepage": "https://ionicframework.com", "author": "Ionic Team (https://ionicframework.com) ", diff --git a/packages/@ionic/lab/CHANGELOG.md b/packages/@ionic/lab/CHANGELOG.md index a9727c00be..e4f55793ea 100644 --- a/packages/@ionic/lab/CHANGELOG.md +++ b/packages/@ionic/lab/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.2.15](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.14...@ionic/lab@3.2.15) (2022-10-06) + + +### Bug Fixes + +* **cli:** capacitor commands not working ([#4918](https://github.com/ionic-team/ionic-cli/issues/4918)) ([27b958b](https://github.com/ionic-team/ionic-cli/commit/27b958bdf22c37f962d705a1b8ba1fee78b59c42)) + + + + + ## [3.2.14](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.13...@ionic/lab@3.2.14) (2022-09-29) diff --git a/packages/@ionic/lab/package.json b/packages/@ionic/lab/package.json index ddf21c719d..52830fc72b 100644 --- a/packages/@ionic/lab/package.json +++ b/packages/@ionic/lab/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/lab", - "version": "3.2.14", + "version": "3.2.15", "description": "Ionic Lab utility for developing Ionic apps, used by Ionic CLI", "bin": { "ionic-lab": "./bin/ionic-lab" diff --git a/packages/@ionic/v1-toolkit/CHANGELOG.md b/packages/@ionic/v1-toolkit/CHANGELOG.md index 1a246b6268..7d64a34b9c 100644 --- a/packages/@ionic/v1-toolkit/CHANGELOG.md +++ b/packages/@ionic/v1-toolkit/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.2.20](https://github.com/ionic-team/ionic-cli/compare/@ionic/v1-toolkit@3.2.19...@ionic/v1-toolkit@3.2.20) (2022-10-06) + + +### Bug Fixes + +* **cli:** capacitor commands not working ([#4918](https://github.com/ionic-team/ionic-cli/issues/4918)) ([27b958b](https://github.com/ionic-team/ionic-cli/commit/27b958bdf22c37f962d705a1b8ba1fee78b59c42)) + + + + + ## [3.2.19](https://github.com/ionic-team/ionic-cli/compare/@ionic/v1-toolkit@3.2.18...@ionic/v1-toolkit@3.2.19) (2022-09-29) diff --git a/packages/@ionic/v1-toolkit/package.json b/packages/@ionic/v1-toolkit/package.json index c2bdbfa636..c1950ca5ee 100644 --- a/packages/@ionic/v1-toolkit/package.json +++ b/packages/@ionic/v1-toolkit/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/v1-toolkit", - "version": "3.2.19", + "version": "3.2.20", "description": "Utility CLI for Ionic 1.x apps, used by Ionic CLI", "bin": { "ionic-v1": "./bin/ionic-v1" diff --git a/packages/cli-scripts/CHANGELOG.md b/packages/cli-scripts/CHANGELOG.md index 43951395fc..11c418b1a0 100644 --- a/packages/cli-scripts/CHANGELOG.md +++ b/packages/cli-scripts/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.57](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.56...cli-scripts@2.1.57) (2022-10-06) + +**Note:** Version bump only for package cli-scripts + + + + + ## [2.1.56](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.55...cli-scripts@2.1.56) (2022-09-29) **Note:** Version bump only for package cli-scripts diff --git a/packages/cli-scripts/package.json b/packages/cli-scripts/package.json index 88e0868983..d5966e8720 100644 --- a/packages/cli-scripts/package.json +++ b/packages/cli-scripts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "cli-scripts", - "version": "2.1.56", + "version": "2.1.57", "bin": { "ionic-cli-scripts": "./bin/ionic-cli-scripts" }, @@ -16,7 +16,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@ionic/cli": "6.20.2", + "@ionic/cli": "6.20.3", "@ionic/cli-framework": "5.1.3", "@ionic/utils-fs": "3.1.6", "ansi-styles": "^4.0.0", From 7ec24c04043b760ff9940d24c9ac281dce3aa21f Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Tue, 15 Nov 2022 16:12:43 +0100 Subject: [PATCH 10/49] fix(capacitor): Error if no emulators or devices are found on run (#4931) --- .../@ionic/cli/src/commands/capacitor/run.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/@ionic/cli/src/commands/capacitor/run.ts b/packages/@ionic/cli/src/commands/capacitor/run.ts index a28301dd1e..aa926b7d6c 100644 --- a/packages/@ionic/cli/src/commands/capacitor/run.ts +++ b/packages/@ionic/cli/src/commands/capacitor/run.ts @@ -205,12 +205,16 @@ For Android and iOS, you can setup Remote Debugging on your device with browser ); } } else { - options['target'] = await this.env.prompt({ - type: 'list', - name: 'target', - message: 'Which device would you like to target?', - choices: targets.map(t => ({ name: `${t.name} (${t.id})`, value: t.id })), - }); + if (targets.length > 0) { + options['target'] = await this.env.prompt({ + type: 'list', + name: 'target', + message: 'Which device would you like to target?', + choices: targets.map(t => ({ name: `${t.name} (${t.id})`, value: t.id })), + }); + } else { + throw new FatalException(`No devices or emulators found`); + } if (!inputs[0]) { throw new FatalException(`The ${input('platform')} argument is required.`); From d3fa32248c4d764f36e9755d1dcc6ff99c60efa2 Mon Sep 17 00:00:00 2001 From: Ionitron Date: Tue, 15 Nov 2022 15:27:53 +0000 Subject: [PATCH 11/49] chore(release): publish [skip ci] - @ionic/cli@6.20.4 - cli-scripts@2.1.58 --- packages/@ionic/cli/CHANGELOG.md | 11 +++++++++++ packages/@ionic/cli/package.json | 2 +- packages/cli-scripts/CHANGELOG.md | 8 ++++++++ packages/cli-scripts/package.json | 4 ++-- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/packages/@ionic/cli/CHANGELOG.md b/packages/@ionic/cli/CHANGELOG.md index 78e402c8c3..63cfc88f0a 100644 --- a/packages/@ionic/cli/CHANGELOG.md +++ b/packages/@ionic/cli/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.20.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.3...@ionic/cli@6.20.4) (2022-11-15) + + +### Bug Fixes + +* **capacitor:** Error if no emulators or devices are found on run ([#4931](https://github.com/ionic-team/ionic-cli/issues/4931)) ([7ec24c0](https://github.com/ionic-team/ionic-cli/commit/7ec24c04043b760ff9940d24c9ac281dce3aa21f)) + + + + + ## [6.20.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.2...@ionic/cli@6.20.3) (2022-10-06) diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index b2dbe3429f..b4ef12ebac 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/cli", - "version": "6.20.3", + "version": "6.20.4", "description": "A tool for creating and developing Ionic Framework mobile apps.", "homepage": "https://ionicframework.com", "author": "Ionic Team (https://ionicframework.com) ", diff --git a/packages/cli-scripts/CHANGELOG.md b/packages/cli-scripts/CHANGELOG.md index 11c418b1a0..c8cca9de23 100644 --- a/packages/cli-scripts/CHANGELOG.md +++ b/packages/cli-scripts/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.58](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.57...cli-scripts@2.1.58) (2022-11-15) + +**Note:** Version bump only for package cli-scripts + + + + + ## [2.1.57](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.56...cli-scripts@2.1.57) (2022-10-06) **Note:** Version bump only for package cli-scripts diff --git a/packages/cli-scripts/package.json b/packages/cli-scripts/package.json index d5966e8720..73035ad3f8 100644 --- a/packages/cli-scripts/package.json +++ b/packages/cli-scripts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "cli-scripts", - "version": "2.1.57", + "version": "2.1.58", "bin": { "ionic-cli-scripts": "./bin/ionic-cli-scripts" }, @@ -16,7 +16,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@ionic/cli": "6.20.3", + "@ionic/cli": "6.20.4", "@ionic/cli-framework": "5.1.3", "@ionic/utils-fs": "3.1.6", "ansi-styles": "^4.0.0", From 8f67ccf849b62714bc3218bb0ab644396c42e1d6 Mon Sep 17 00:00:00 2001 From: Sean Perkins Date: Tue, 6 Dec 2022 16:24:04 -0500 Subject: [PATCH 12/49] chore(serve): deprecate ionic lab (#4930) --- packages/@ionic/cli/src/commands/serve.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/@ionic/cli/src/commands/serve.ts b/packages/@ionic/cli/src/commands/serve.ts index 284cf494cd..8f87209e70 100644 --- a/packages/@ionic/cli/src/commands/serve.ts +++ b/packages/@ionic/cli/src/commands/serve.ts @@ -100,6 +100,10 @@ Try the ${input('--lab')} option to see multiple platforms at once.`; options['lab'] = true; } + if (options['lab']) { + this.env.log.warn(`The ${input('--lab')} option has been deprecated and will be removed in an upcoming major release of the Ionic CLI. Please visit ${strong('https://ionicframework.com/docs/developing/previewing')} for alternatives to Ionic Lab.`); + } + if (options['nolivereload']) { this.env.log.warn(`The ${input('--nolivereload')} option has been deprecated. Please use ${input('--no-livereload')}.`); options['livereload'] = false; From ff1c93635a74fc26e57319123118eaf3ce6d9958 Mon Sep 17 00:00:00 2001 From: Mike Hartington Date: Wed, 7 Dec 2022 11:34:42 -0500 Subject: [PATCH 13/49] feat(): remove ionic-angular project type BREAKING CHANGE: Integration with V3 (aka ionic-angular) project has been removed. Please update to modern Ionic projects. --- .../project/ionic-angular/__tests__/build.ts | 38 --- .../project/ionic-angular/__tests__/index.ts | 34 --- .../project/ionic-angular/__tests__/serve.ts | 71 ----- .../src/lib/project/ionic-angular/ailments.ts | 272 ------------------ .../lib/project/ionic-angular/app-scripts.ts | 63 ---- .../src/lib/project/ionic-angular/build.ts | 130 --------- .../src/lib/project/ionic-angular/generate.ts | 175 ----------- .../src/lib/project/ionic-angular/index.ts | 89 ------ .../src/lib/project/ionic-angular/serve.ts | 212 -------------- 9 files changed, 1084 deletions(-) delete mode 100644 packages/@ionic/cli/src/lib/project/ionic-angular/__tests__/build.ts delete mode 100644 packages/@ionic/cli/src/lib/project/ionic-angular/__tests__/index.ts delete mode 100644 packages/@ionic/cli/src/lib/project/ionic-angular/__tests__/serve.ts delete mode 100644 packages/@ionic/cli/src/lib/project/ionic-angular/ailments.ts delete mode 100644 packages/@ionic/cli/src/lib/project/ionic-angular/app-scripts.ts delete mode 100644 packages/@ionic/cli/src/lib/project/ionic-angular/build.ts delete mode 100644 packages/@ionic/cli/src/lib/project/ionic-angular/generate.ts delete mode 100644 packages/@ionic/cli/src/lib/project/ionic-angular/index.ts delete mode 100644 packages/@ionic/cli/src/lib/project/ionic-angular/serve.ts diff --git a/packages/@ionic/cli/src/lib/project/ionic-angular/__tests__/build.ts b/packages/@ionic/cli/src/lib/project/ionic-angular/__tests__/build.ts deleted file mode 100644 index e254a7b6ad..0000000000 --- a/packages/@ionic/cli/src/lib/project/ionic-angular/__tests__/build.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { IonicAngularBuildCLI } from '../build'; - -describe('@ionic/cli', () => { - - describe('lib/ionic-angular', () => { - - describe('IonicAngularBuildCLI', () => { - - describe('buildOptionsToAppScriptsArgs', () => { - - const options = { - '--': ['--generateSourceMap', 'false'], - prod: true, - aot: true, - minifyjs: true, - minifycss: true, - optimizejs: true, - }; - - it('should transform defaults', async () => { - const appscripts = new IonicAngularBuildCLI({} as any); - const result = await (appscripts as any).buildOptionsToAppScriptsArgs({ _: [], '--': [] }); - expect(result).toEqual([]); - }); - - it('should transform options', async () => { - const appscripts = new IonicAngularBuildCLI({} as any); - const result = await (appscripts as any).buildOptionsToAppScriptsArgs(options); - expect(result).toEqual(['--prod', '--aot', '--minifyjs', '--minifycss', '--optimizejs', '--generateSourceMap', 'false']); - }); - - }); - - }); - - }); - -}); diff --git a/packages/@ionic/cli/src/lib/project/ionic-angular/__tests__/index.ts b/packages/@ionic/cli/src/lib/project/ionic-angular/__tests__/index.ts deleted file mode 100644 index b44e7c9ba6..0000000000 --- a/packages/@ionic/cli/src/lib/project/ionic-angular/__tests__/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -import * as path from 'path' -import { IonicAngularProject } from '../'; - -describe('@ionic/cli', () => { - - describe('lib/project/ionic-angular', () => { - - describe('IonicAngularProject', () => { - - let p: IonicAngularProject; - - beforeEach(() => { - p = new IonicAngularProject({ context: 'app', configPath: '/path/to/proj/file' } as any, {} as any); - jest.spyOn(p, 'config', 'get').mockImplementation(() => ({ get: () => undefined } as any)); - }); - - it('should set directory attribute', async () => { - expect(p.directory).toEqual(path.resolve('/path/to/proj')); - }); - - describe('getSourceDir', () => { - - it('should default to src', async () => { - const result = await p.getSourceDir(); - expect(result).toEqual(path.resolve('/path/to/proj/src')); - }); - - }); - - }); - - }); - -}); diff --git a/packages/@ionic/cli/src/lib/project/ionic-angular/__tests__/serve.ts b/packages/@ionic/cli/src/lib/project/ionic-angular/__tests__/serve.ts deleted file mode 100644 index d8baa3727d..0000000000 --- a/packages/@ionic/cli/src/lib/project/ionic-angular/__tests__/serve.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { IonicAngularServeRunner } from '../serve'; - -describe('@ionic/cli', () => { - - describe('lib/project/ionic-angular/serve', () => { - - describe('IonicAngularServeRunner', () => { - - describe('createOptionsFromCommandLine', () => { - - const defaults = { - '--': [], - publicHost: undefined, - host: 'localhost', - browser: undefined, - browserOption: undefined, - consolelogs: false, - engine: 'browser', - env: undefined, - externalAddressRequired: false, - lab: false, - labHost: 'localhost', - labPort: 8200, - livereload: true, - livereloadPort: 35729, - notificationPort: 53703, - open: false, - port: 8100, - proxy: true, - serverlogs: false, - project: undefined, - verbose: false, - }; - - it('should provide defaults with no options', () => { - const runner = new IonicAngularServeRunner({} as any); - const result = runner.createOptionsFromCommandLine([], { _: [] }); - expect(result).toEqual(defaults); - }); - - it('should provide options from negations of cli flag defaults', () => { - const runner = new IonicAngularServeRunner({} as any); - const result = runner.createOptionsFromCommandLine([], { _: [], livereload: false, proxy: false, lab: true, open: true, externalAddressRequired: true }); - expect(result).toEqual({ ...defaults, livereload: false, proxy: false, lab: true, open: true, externalAddressRequired: true }); - }); - - it('should allow overrides of default values', () => { - const runner = new IonicAngularServeRunner({} as any); - const result = runner.createOptionsFromCommandLine([], { _: [], host: '0.0.0.0', port: '1111', 'livereload-port': '2222', 'dev-logger-port': '3333', env: 'prod' }); - expect(result).toEqual({ ...defaults, host: '0.0.0.0', port: 1111, livereloadPort: 2222, notificationPort: 3333, env: 'prod' }); - }); - - it('should respect --external flag', () => { - const runner = new IonicAngularServeRunner({} as any); - const result = runner.createOptionsFromCommandLine([], { _: [], host: 'localhost', external: true }); - expect(result).toEqual({ ...defaults, host: '0.0.0.0' }); - }); - - it('should pass on separated args', () => { - const runner = new IonicAngularServeRunner({} as any); - const result = runner.createOptionsFromCommandLine([], { _: [], '--': ['foo', '--bar'] }); - expect(result).toEqual({ ...defaults, '--': ['foo', '--bar'] }); - }); - - }); - - }); - - }); - -}); diff --git a/packages/@ionic/cli/src/lib/project/ionic-angular/ailments.ts b/packages/@ionic/cli/src/lib/project/ionic-angular/ailments.ts deleted file mode 100644 index 99b8ac81fa..0000000000 --- a/packages/@ionic/cli/src/lib/project/ionic-angular/ailments.ts +++ /dev/null @@ -1,272 +0,0 @@ -import * as semver from 'semver'; - -import { ProjectType, TreatableAilment } from '../../../definitions'; -import { BUILD_SCRIPT } from '../../build'; -import { ancillary, input, strong } from '../../color'; -import { Ailment, AilmentDeps } from '../../doctor'; -import { SERVE_SCRIPT } from '../../serve'; -import { pkgFromRegistry, pkgManagerArgs } from '../../utils/npm'; - -import { IonicAngularProject } from './'; -import { DEFAULT_BUILD_SCRIPT_VALUE } from './build'; -import { DEFAULT_SERVE_SCRIPT_VALUE } from './serve'; - -export interface IonicAngularAilmentDeps extends AilmentDeps { - readonly project: IonicAngularProject; -} - -export abstract class IonicAngularAilment extends Ailment { - readonly projects: ProjectType[] = ['ionic-angular']; - protected readonly project: IonicAngularProject; - - constructor(deps: IonicAngularAilmentDeps) { - super(deps); - this.project = deps.project; - } -} - -export class IonicAngularUpdateAvailable extends IonicAngularAilment { - readonly id = 'ionic-angular-update-available'; - currentVersion?: string; - latestVersion?: string; - - async getVersionPair(): Promise<[string, string]> { - if (!this.currentVersion || !this.latestVersion) { - const [ currentPkg ] = await this.project.getPackageJson('ionic-angular'); - const latestPkg = await pkgFromRegistry(this.config.get('npmClient'), { pkg: 'ionic-angular' }); - this.currentVersion = currentPkg ? currentPkg.version : undefined; - this.latestVersion = latestPkg ? latestPkg.version : undefined; - } - - if (!this.currentVersion || !this.latestVersion) { - return ['0.0.0', '0.0.0']; - } - - return [ this.currentVersion, this.latestVersion ]; - } - - async getMessage() { - const [ currentVersion, latestVersion ] = await this.getVersionPair(); - - return ( - `Update available for Ionic Framework.\n` + - `An update is available for ${strong('ionic-angular')} (${ancillary(currentVersion)} => ${ancillary(latestVersion)}).\n` - ).trim(); - } - - async detected() { - const [ currentVersion, latestVersion ] = await this.getVersionPair(); - const diff = semver.diff(currentVersion, latestVersion); - - return diff === 'minor' || diff === 'patch'; - } - - async getTreatmentSteps() { - const [ , latestVersion ] = await this.getVersionPair(); - const args = await pkgManagerArgs(this.config.get('npmClient'), { command: 'install', pkg: `ionic-angular@${latestVersion ? latestVersion : 'latest'}` }); - - return [ - { message: `Visit ${strong('https://github.com/ionic-team/ionic/releases')} for each upgrade's instructions` }, - { message: `If no instructions, run: ${input(args.join(' '))}` }, - { message: `Watch for npm warnings about peer dependencies--they may need manual updating` }, - ]; - } -} - -export class IonicAngularMajorUpdateAvailable extends IonicAngularAilment { - readonly id = 'ionic-angular-major-update-available'; - currentVersion?: string; - latestVersion?: string; - - async getVersionPair(): Promise<[string, string]> { - if (!this.currentVersion || !this.latestVersion) { - const [ currentPkg ] = await this.project.getPackageJson('ionic-angular'); - const latestPkg = await pkgFromRegistry(this.config.get('npmClient'), { pkg: 'ionic-angular' }); - this.currentVersion = currentPkg ? currentPkg.version : undefined; - this.latestVersion = latestPkg ? latestPkg.version : undefined; - } - - if (!this.currentVersion || !this.latestVersion) { - return ['0.0.0', '0.0.0']; - } - - return [ this.currentVersion, this.latestVersion ]; - } - - async getMessage() { - const [ currentVersion, latestVersion ] = await this.getVersionPair(); - - return ( - `Major update available for Ionic Framework.\n` + - `A major update is available for ${strong('ionic-angular')} (${ancillary(currentVersion)} => ${ancillary(latestVersion)}).\n` - ).trim(); - } - - async detected() { - const [ currentVersion, latestVersion ] = await this.getVersionPair(); - const diff = semver.diff(currentVersion, latestVersion); - - return diff === 'major'; - } - - async getTreatmentSteps() { - return [ - { message: `Visit ${strong('https://ionicframework.com/blog')} and ${strong('https://github.com/ionic-team/ionic/releases')} for upgrade instructions` }, - ]; - } -} - -export class AppScriptsUpdateAvailable extends IonicAngularAilment implements TreatableAilment { - readonly id = 'app-scripts-update-available'; - readonly treatable = true; - currentVersion?: string; - latestVersion?: string; - - async getVersionPair(): Promise<[string, string]> { - if (!this.currentVersion || !this.latestVersion) { - const [ currentPkg ] = await this.project.getPackageJson('@ionic/app-scripts'); - const latestPkg = await pkgFromRegistry(this.config.get('npmClient'), { pkg: '@ionic/app-scripts' }); - this.currentVersion = currentPkg ? currentPkg.version : undefined; - this.latestVersion = latestPkg ? latestPkg.version : undefined; - } - - if (!this.currentVersion || !this.latestVersion) { - return ['0.0.0', '0.0.0']; - } - - return [ this.currentVersion, this.latestVersion ]; - } - - async getMessage() { - const [ currentVersion, latestVersion ] = await this.getVersionPair(); - - return ( - `Update available for ${strong('@ionic/app-scripts')}.\n` + - `An update is available for ${strong('@ionic/app-scripts')} (${ancillary(currentVersion)} => ${ancillary(latestVersion)}).\n` - ).trim(); - } - - async detected() { - const [ currentVersion, latestVersion ] = await this.getVersionPair(); - const diff = semver.diff(currentVersion, latestVersion); - - return diff === 'minor' || diff === 'patch'; - } - - async getTreatmentSteps() { - const [ , latestVersion ] = await this.getVersionPair(); - const [ manager, ...managerArgs ] = await pkgManagerArgs(this.config.get('npmClient'), { command: 'install', pkg: `@ionic/app-scripts@${latestVersion ? latestVersion : 'latest'}`, saveDev: true }); - - return [ - { - message: `Run: ${input(manager + ' ' + managerArgs.join(' '))}`, - treat: async () => { - await this.shell.run(manager, managerArgs, {}); - }, - }, - ]; - } -} - -export class AppScriptsMajorUpdateAvailable extends IonicAngularAilment { - readonly id = 'app-scripts-major-update-available'; - currentVersion?: string; - latestVersion?: string; - - async getVersionPair(): Promise<[string, string]> { - if (!this.currentVersion || !this.latestVersion) { - const [ currentPkg ] = await this.project.getPackageJson('@ionic/app-scripts'); - const latestPkg = await pkgFromRegistry(this.config.get('npmClient'), { pkg: '@ionic/app-scripts' }); - this.currentVersion = currentPkg ? currentPkg.version : undefined; - this.latestVersion = latestPkg ? latestPkg.version : undefined; - } - - if (!this.currentVersion || !this.latestVersion) { - return ['0.0.0', '0.0.0']; - } - - return [ this.currentVersion, this.latestVersion ]; - } - - async getMessage() { - const [ currentVersion, latestVersion ] = await this.getVersionPair(); - - return ( - `Major update available for ${strong('@ionic/app-scripts')}.\n` + - `A major update is available for ${strong('@ionic/app-scripts')} (${ancillary(currentVersion)} => ${ancillary(latestVersion)}).\n` - ).trim(); - } - - async detected() { - const [ currentVersion, latestVersion ] = await this.getVersionPair(); - const diff = semver.diff(currentVersion, latestVersion); - - return diff === 'major'; - } - - async getTreatmentSteps() { - return [ - { message: `Visit ${strong('https://github.com/ionic-team/ionic-app-scripts/releases')} for upgrade instructions` }, - ]; - } -} - -export class IonicAngularPackageJsonHasDefaultIonicBuildCommand extends IonicAngularAilment { - readonly id = 'ionic-angular-package-json-has-default-ionic-build-command'; - currentVersion?: string; - latestVersion?: string; - - async getMessage() { - return ( - `The ${strong(BUILD_SCRIPT)} npm script is unchanged.\n` + - `The Ionic CLI now looks for the ${strong(BUILD_SCRIPT)} npm script in ${strong('package.json')} for a custom build script to run instead of the default (${input(DEFAULT_BUILD_SCRIPT_VALUE)}). If you don't use it, it's considered quicker and cleaner to just remove it.` - ).trim(); - } - - async detected() { - const pkg = await this.project.requirePackageJson(); - - if (pkg.scripts && pkg.scripts[BUILD_SCRIPT] === DEFAULT_BUILD_SCRIPT_VALUE) { - return true; - } - - return false; - } - - async getTreatmentSteps() { - return [ - { message: `Remove the ${strong(BUILD_SCRIPT)} npm script from ${strong('package.json')}` }, - { message: `Continue using ${input('ionic build')} normally` }, - ]; - } -} - -export class IonicAngularPackageJsonHasDefaultIonicServeCommand extends IonicAngularAilment { - readonly id = 'ionic-angular-package-json-has-default-ionic-serve-command'; - currentVersion?: string; - latestVersion?: string; - - async getMessage() { - return ( - `The ${strong(SERVE_SCRIPT)} npm script is unchanged.\n` + - `The Ionic CLI now looks for the ${strong(SERVE_SCRIPT)} npm script in ${strong('package.json')} for a custom serve script to run instead of the default (${input(DEFAULT_SERVE_SCRIPT_VALUE)}). If you don't use it, it's considered quicker and cleaner to just remove it.` - ).trim(); - } - - async detected() { - const pkg = await this.project.requirePackageJson(); - - if (pkg.scripts && pkg.scripts[SERVE_SCRIPT] === DEFAULT_SERVE_SCRIPT_VALUE) { - return true; - } - - return false; - } - - async getTreatmentSteps() { - return [ - { message: `Remove the ${strong(SERVE_SCRIPT)} npm script from ${strong('package.json')}` }, - { message: `Continue using ${input('ionic serve')} normally` }, - ]; - } -} diff --git a/packages/@ionic/cli/src/lib/project/ionic-angular/app-scripts.ts b/packages/@ionic/cli/src/lib/project/ionic-angular/app-scripts.ts deleted file mode 100644 index 793be39ee4..0000000000 --- a/packages/@ionic/cli/src/lib/project/ionic-angular/app-scripts.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { MetadataGroup } from '@ionic/cli-framework'; -import { compileNodeModulesPaths } from '@ionic/cli-framework/utils/node'; -import * as Debug from 'debug'; - -import { CommandMetadataOption } from '../../../definitions'; -import { weak } from '../../color'; - -const debug = Debug('ionic:lib:project:ionic-angular:app-scripts'); - -export async function importAppScripts(projectDir: string): Promise { - const pkg = '@ionic/app-scripts'; - - debug('Importing %s', pkg); - const p = require.resolve(pkg, { paths: compileNodeModulesPaths(projectDir) }); - const m = require(p); - debug('fin'); - - return m; -} - -export const APP_SCRIPTS_OPTIONS: CommandMetadataOption[] = [ - { - name: 'prod', - summary: 'Build the application for production', - type: Boolean, - groups: ['app-scripts', 'cordova'], - hint: weak('[app-scripts]'), - }, - { - name: 'aot', - summary: 'Perform ahead-of-time compilation for this build', - type: Boolean, - groups: [MetadataGroup.ADVANCED, 'app-scripts', 'cordova'], - hint: weak('[app-scripts]'), - }, - { - name: 'minifyjs', - summary: 'Minify JS for this build', - type: Boolean, - groups: [MetadataGroup.ADVANCED, 'app-scripts', 'cordova'], - hint: weak('[app-scripts]'), - }, - { - name: 'minifycss', - summary: 'Minify CSS for this build', - type: Boolean, - groups: [MetadataGroup.ADVANCED, 'app-scripts', 'cordova'], - hint: weak('[app-scripts]'), - }, - { - name: 'optimizejs', - summary: 'Perform JS optimizations for this build', - type: Boolean, - groups: [MetadataGroup.ADVANCED, 'app-scripts', 'cordova'], - hint: weak('[app-scripts]'), - }, - { - name: 'env', - summary: '', - groups: [MetadataGroup.HIDDEN, MetadataGroup.ADVANCED, 'app-scripts', 'cordova'], - hint: weak('[app-scripts]'), - }, -]; diff --git a/packages/@ionic/cli/src/lib/project/ionic-angular/build.ts b/packages/@ionic/cli/src/lib/project/ionic-angular/build.ts deleted file mode 100644 index 8d4b7da8d9..0000000000 --- a/packages/@ionic/cli/src/lib/project/ionic-angular/build.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { MetadataGroup, unparseArgs } from '@ionic/cli-framework'; -import * as Debug from 'debug'; - -import { CommandLineInputs, CommandLineOptions, CommandMetadata, IonicAngularBuildOptions } from '../../../definitions'; -import { BUILD_SCRIPT, BuildCLI, BuildRunner, BuildRunnerDeps } from '../../build'; -import { ancillary, input, strong, weak } from '../../color'; - -import { IonicAngularProject } from './'; -import { APP_SCRIPTS_OPTIONS } from './app-scripts'; - -const debug = Debug('ionic:lib:project:ionic-angular:build'); - -export const DEFAULT_PROGRAM = 'ionic-app-scripts'; -export const DEFAULT_BUILD_SCRIPT_VALUE = `${DEFAULT_PROGRAM} build`; - -export interface IonicAngularBuildRunnerDeps extends BuildRunnerDeps { - readonly project: IonicAngularProject; -} - -export class IonicAngularBuildRunner extends BuildRunner { - constructor(protected readonly e: IonicAngularBuildRunnerDeps) { - super(); - } - - async getCommandMetadata(): Promise> { - return { - description: ` -${input('ionic build')} uses ${strong('@ionic/app-scripts')}. See the project's ${strong('README.md')}[^app-scripts-readme] for documentation. Options not listed below are considered advanced and can be passed to the ${input('ionic-app-scripts')} CLI using the ${input('--')} separator after the Ionic CLI arguments. See the examples. - `, - footnotes: [ - { - id: 'app-scripts-readme', - url: 'https://github.com/ionic-team/ionic-app-scripts/blob/master/README.md', - }, - ], - options: [ - { - name: 'source-map', - summary: 'Output sourcemaps', - type: Boolean, - groups: [MetadataGroup.ADVANCED, 'cordova'], - hint: weak('[app-scripts]'), - }, - ...APP_SCRIPTS_OPTIONS, - ], - exampleCommands: [ - '--prod', - ], - }; - } - - createOptionsFromCommandLine(inputs: CommandLineInputs, options: CommandLineOptions): IonicAngularBuildOptions { - const baseOptions = super.createBaseOptionsFromCommandLine(inputs, options); - const sourcemaps = typeof options['source-map'] === 'boolean' ? Boolean(options['source-map']) : undefined; - - return { - ...baseOptions, - type: 'ionic-angular', - prod: options['prod'] ? true : false, - sourcemaps, - aot: options['aot'] ? true : false, - minifyjs: options['minifyjs'] ? true : false, - minifycss: options['minifycss'] ? true : false, - optimizejs: options['optimizejs'] ? true : false, - env: options['env'] ? String(options['env']) : undefined, - }; - } - - async buildProject(options: IonicAngularBuildOptions): Promise { - const appscripts = new IonicAngularBuildCLI(this.e); - await appscripts.build(options); - } -} - -export class IonicAngularBuildCLI extends BuildCLI { - readonly name = 'Ionic App Scripts'; - readonly pkg = '@ionic/app-scripts'; - readonly program = DEFAULT_PROGRAM; - readonly prefix = 'app-scripts'; - readonly script?: string = BUILD_SCRIPT; - - protected buildOptionsToAppScriptsArgs(options: IonicAngularBuildOptions): string[] { - const minimistArgs = { - _: [], - prod: options.prod ? true : false, - aot: options.aot ? true : false, - minifyjs: options.minifyjs ? true : false, - minifycss: options.minifycss ? true : false, - optimizejs: options.optimizejs ? true : false, - generateSourceMap: typeof options.sourcemaps !== 'undefined' ? options.sourcemaps ? 'true' : 'false' : undefined, - target: options.engine === 'cordova' ? 'cordova' : undefined, - platform: options.platform, - env: options.env, - }; - - return [...unparseArgs(minimistArgs, { allowCamelCase: true, useEquals: false }), ...options['--']]; - } - - protected async buildArgs(options: IonicAngularBuildOptions): Promise { - const { pkgManagerArgs } = await import('../../utils/npm'); - - const args = this.buildOptionsToAppScriptsArgs(options); - - if (this.resolvedProgram === this.program) { - return ['build', ...args]; - } else { - const [ , ...pkgArgs ] = await pkgManagerArgs(this.e.config.get('npmClient'), { command: 'run', script: this.script, scriptArgs: [...args] }); - return pkgArgs; - } - } - - protected async resolveProgram(): Promise { - if (typeof this.script !== 'undefined') { - debug(`Looking for ${ancillary(this.script)} npm script.`); - - const pkg = await this.e.project.requirePackageJson(); - - if (pkg.scripts && pkg.scripts[this.script]) { - if (pkg.scripts[this.script] === DEFAULT_BUILD_SCRIPT_VALUE) { - debug(`Found ${ancillary(this.script)}, but it is the default. Not running.`); - } else { - debug(`Using ${ancillary(this.script)} npm script.`); - return this.e.config.get('npmClient'); - } - } - } - - return this.program; - } -} diff --git a/packages/@ionic/cli/src/lib/project/ionic-angular/generate.ts b/packages/@ionic/cli/src/lib/project/ionic-angular/generate.ts deleted file mode 100644 index ddc7fbfa8f..0000000000 --- a/packages/@ionic/cli/src/lib/project/ionic-angular/generate.ts +++ /dev/null @@ -1,175 +0,0 @@ -import { contains, unparseArgs, validators } from '@ionic/cli-framework'; - -import { CommandLineInputs, CommandLineOptions, CommandMetadata, IonicAngularGenerateOptions } from '../../../definitions'; -import { input, strong, weak } from '../../color'; -import { GenerateRunner, GenerateRunnerDeps } from '../../generate'; - -import { IonicAngularProject } from './'; -import { importAppScripts } from './app-scripts'; - -const GENERATOR_TYPES = ['component', 'directive', 'page', 'pipe', 'provider', 'tabs']; - -export interface IonicAngularGenerateRunnerDeps extends GenerateRunnerDeps { - readonly project: IonicAngularProject; -} - -export class IonicAngularGenerateRunner extends GenerateRunner { - constructor(protected readonly e: IonicAngularGenerateRunnerDeps) { - super(); - } - - async getCommandMetadata(): Promise> { - return { - groups: [], - summary: `Generate pipes, components, pages, directives, providers, and tabs`, - description: ` -Automatically create components for your Ionic app. - -The given ${input('name')} is normalized into an appropriate naming convention. For example, ${input('ionic generate page neat')} creates a page by the name of ${input('NeatPage')} in ${input('src/pages/neat/')}. - `, - exampleCommands: [ - '', - ...GENERATOR_TYPES, - 'component foo', - 'page Login', - 'page Detail --no-module', - 'page About --constants', - 'pipe MyFilterPipe', - ], - inputs: [ - { - name: 'type', - summary: `The type of generator (e.g. ${GENERATOR_TYPES.map(t => input(t)).join(', ')})`, - validators: [validators.required, contains(GENERATOR_TYPES, {})], - }, - { - name: 'name', - summary: 'The name of the component being generated', - validators: [validators.required], - }, - ], - options: [ - { - name: 'module', - summary: 'Do not generate an NgModule for the page', - hint: weak('[page]'), - type: Boolean, - default: true, - }, - { - name: 'constants', - summary: 'Generate a page constant file for lazy-loaded pages', - hint: weak('[page]'), - type: Boolean, - default: false, - }, - ], - }; - } - - async ensureCommandLine(inputs: CommandLineInputs, options: CommandLineOptions): Promise { - if (!inputs[0]) { - const generatorType = await this.e.prompt({ - type: 'list', - name: 'generatorType', - message: 'What would you like to generate:', - choices: GENERATOR_TYPES, - }); - - inputs[0] = generatorType; - } - - if (!inputs[1]) { - const generatorName = await this.e.prompt({ - type: 'input', - name: 'generatorName', - message: 'What should the name be?', - validate: v => validators.required(v), - }); - - inputs[1] = generatorName; - } - } - - createOptionsFromCommandLine(inputs: CommandLineInputs, options: CommandLineOptions): IonicAngularGenerateOptions { - const baseOptions = super.createOptionsFromCommandLine(inputs, options); - - return { - ...baseOptions, - module: options['module'] ? true : false, - constants: options['constants'] ? true : false, - }; - } - - async run(options: IonicAngularGenerateOptions) { - const AppScripts = await importAppScripts(this.e.project.directory); - - const appScriptsArgs = unparseArgs({ _: [], module: options.module, constants: options.constants }, { useEquals: false, ignoreFalse: true, allowCamelCase: true }); - AppScripts.setProcessArgs(['node', 'appscripts'].concat(appScriptsArgs)); - AppScripts.setCwd(this.e.project.directory); - - const context = AppScripts.generateContext(); - - switch (options.type) { - case 'page': - await AppScripts.processPageRequest(context, options.name, options); - break; - case 'component': - const componentData = await this.getModules(context, 'component'); - await AppScripts.processComponentRequest(context, options.name, componentData); - break; - case 'directive': - const directiveData = await this.getModules(context, 'directive'); - await AppScripts.processDirectiveRequest(context, options.name, directiveData); - break; - case 'pipe': - const pipeData = await this.getModules(context, 'pipe'); - await AppScripts.processPipeRequest(context, options.name, pipeData); - break; - case 'provider': - const providerData = context.appNgModulePath; - await AppScripts.processProviderRequest(context, options.name, providerData); - break; - case 'tabs': - const tabsData = await this.tabsPrompt(); - await AppScripts.processTabsRequest(context, options.name, tabsData, options); - break; - } - - this.e.log.ok(`Generated a ${strong(options.type)}${options.type === 'tabs' ? ' page' : ''} named ${strong(options.name)}!`); - } - - async tabsPrompt() { - const tabNames = []; - - const howMany = await this.e.prompt({ - type: 'input', - name: 'howMany', - message: 'How many tabs?', - validate: v => validators.numeric(v), - }); - - for (let i = 0; i < parseInt(howMany, 10); i++) { - const tabName = await this.e.prompt({ - type: 'input', - name: 'tabName', - message: 'Name of this tab:', - }); - - tabNames.push(tabName); - } - - return tabNames; - } - - async getModules(context: any, kind: string) { - switch (kind) { - case 'component': - return context.componentsNgModulePath ? context.componentsNgModulePath : context.appNgModulePath; - case 'pipe': - return context.pipesNgModulePath ? context.pipesNgModulePath : context.appNgModulePath; - case 'directive': - return context.directivesNgModulePath ? context.directivesNgModulePath : context.appNgModulePath; - } - } -} diff --git a/packages/@ionic/cli/src/lib/project/ionic-angular/index.ts b/packages/@ionic/cli/src/lib/project/ionic-angular/index.ts deleted file mode 100644 index 1e93ef8b5f..0000000000 --- a/packages/@ionic/cli/src/lib/project/ionic-angular/index.ts +++ /dev/null @@ -1,89 +0,0 @@ -import * as Debug from 'debug'; -import * as lodash from 'lodash'; - -import { Project } from '../'; -import { IAilmentRegistry, InfoItem } from '../../../definitions'; -import { strong } from '../../color'; - -const debug = Debug('ionic:lib:project:ionic-angular'); - -export class IonicAngularProject extends Project { - readonly type: 'ionic-angular' = 'ionic-angular'; - - async getInfo(): Promise { - const [ - [ ionicAngularPkg ], - [ appScriptsPkg ], - ] = await Promise.all([ - this.getPackageJson('ionic-angular'), - this.getPackageJson('@ionic/app-scripts'), - ]); - - return [ - ...(await super.getInfo()), - { - group: 'ionic', - name: 'Ionic Framework', - key: 'framework', - value: ionicAngularPkg ? `ionic-angular ${ionicAngularPkg.version}` : 'not installed', - }, - { - group: 'ionic', - name: '@ionic/app-scripts', - key: 'app_scripts_version', - value: appScriptsPkg ? appScriptsPkg.version : 'not installed', - }, - ]; - } - - async getDocsUrl(): Promise { - return 'https://ion.link/v3-docs'; - } - - async registerAilments(registry: IAilmentRegistry): Promise { - await super.registerAilments(registry); - const ailments = await import('./ailments'); - const deps = { ...this.e, project: this }; - - registry.register(new ailments.IonicAngularUpdateAvailable(deps)); - registry.register(new ailments.IonicAngularMajorUpdateAvailable(deps)); - registry.register(new ailments.AppScriptsUpdateAvailable(deps)); - registry.register(new ailments.AppScriptsMajorUpdateAvailable(deps)); - registry.register(new ailments.IonicAngularPackageJsonHasDefaultIonicBuildCommand(deps)); - registry.register(new ailments.IonicAngularPackageJsonHasDefaultIonicServeCommand(deps)); - } - - async detected() { - try { - const pkg = await this.requirePackageJson(); - const deps = lodash.assign({}, pkg.dependencies, pkg.devDependencies); - - if (typeof deps['ionic-angular'] === 'string') { - debug(`${strong('ionic-angular')} detected in ${strong('package.json')}`); - return true; - } - } catch (e) { - // ignore - } - - return false; - } - - async requireBuildRunner(): Promise { - const { IonicAngularBuildRunner } = await import('./build'); - const deps = { ...this.e, project: this }; - return new IonicAngularBuildRunner(deps); - } - - async requireServeRunner(): Promise { - const { IonicAngularServeRunner } = await import('./serve'); - const deps = { ...this.e, project: this }; - return new IonicAngularServeRunner(deps); - } - - async requireGenerateRunner(): Promise { - const { IonicAngularGenerateRunner } = await import('./generate'); - const deps = { ...this.e, project: this }; - return new IonicAngularGenerateRunner(deps); - } -} diff --git a/packages/@ionic/cli/src/lib/project/ionic-angular/serve.ts b/packages/@ionic/cli/src/lib/project/ionic-angular/serve.ts deleted file mode 100644 index 045947e716..0000000000 --- a/packages/@ionic/cli/src/lib/project/ionic-angular/serve.ts +++ /dev/null @@ -1,212 +0,0 @@ -import { MetadataGroup, ParsedArgs, unparseArgs } from '@ionic/cli-framework'; -import { str2num } from '@ionic/cli-framework/utils/string'; -import * as Debug from 'debug'; - -import { CommandLineInputs, CommandLineOptions, CommandMetadata, IonicAngularServeOptions, ServeDetails } from '../../../definitions'; -import { ancillary, weak } from '../../color'; -import { BIND_ALL_ADDRESS, DEFAULT_DEV_LOGGER_PORT, DEFAULT_LIVERELOAD_PORT, LOCAL_ADDRESSES, SERVE_SCRIPT, ServeCLI, ServeRunner, ServeRunnerDeps } from '../../serve'; -import { findOpenIonicPorts } from '../common'; - -import { IonicAngularProject } from './'; -import { APP_SCRIPTS_OPTIONS } from './app-scripts'; - -const debug = Debug('ionic:lib:project:ionic-angular:serve'); - -const DEFAULT_PROGRAM = 'ionic-app-scripts'; -export const DEFAULT_SERVE_SCRIPT_VALUE = `${DEFAULT_PROGRAM} serve`; - -export interface IonicAngularServeRunnerDeps extends ServeRunnerDeps { - readonly project: IonicAngularProject; -} - -export class IonicAngularServeRunner extends ServeRunner { - constructor(protected readonly e: IonicAngularServeRunnerDeps) { - super(); - } - - async getCommandMetadata(): Promise> { - return { - options: [ - { - name: 'consolelogs', - summary: 'Print app console logs to Ionic CLI', - type: Boolean, - groups: ['cordova'], - aliases: ['c'], - hint: weak('[app-scripts]'), - }, - { - name: 'serverlogs', - summary: 'Print dev server logs to Ionic CLI', - type: Boolean, - aliases: ['s'], - groups: [MetadataGroup.HIDDEN, 'cordova'], - hint: weak('[app-scripts]'), - }, - { - name: 'livereload-port', - summary: 'Use specific port for live-reload', - default: DEFAULT_LIVERELOAD_PORT.toString(), - aliases: ['r'], - groups: [MetadataGroup.ADVANCED, 'cordova'], - hint: weak('[app-scripts]'), - spec: { value: 'port' }, - }, - { - name: 'dev-logger-port', - summary: 'Use specific port for dev server', - default: DEFAULT_DEV_LOGGER_PORT.toString(), - groups: [MetadataGroup.ADVANCED, 'cordova'], - hint: weak('[app-scripts]'), - spec: { value: 'port' }, - }, - { - name: 'proxy', - summary: 'Do not add proxies', - type: Boolean, - default: true, - groups: [MetadataGroup.ADVANCED, 'cordova'], - hint: weak('[app-scripts]'), - // TODO: Adding 'x' to aliases here has some weird behavior with minimist. - }, - { - name: 'source-map', - summary: 'Output sourcemaps', - type: Boolean, - groups: [MetadataGroup.ADVANCED, 'cordova'], - hint: weak('[app-scripts]'), - }, - ...APP_SCRIPTS_OPTIONS, - ], - exampleCommands: [ - '-c', '-- --enableLint false', - ], - }; - } - - createOptionsFromCommandLine(inputs: CommandLineInputs, options: CommandLineOptions): IonicAngularServeOptions { - const baseOptions = super.createOptionsFromCommandLine(inputs, options); - const sourcemaps = typeof options['source-map'] === 'boolean' ? Boolean(options['source-map']) : undefined; - const livereloadPort = str2num(options['livereload-port'], DEFAULT_LIVERELOAD_PORT); - const notificationPort = str2num(options['dev-logger-port'], DEFAULT_DEV_LOGGER_PORT); - - return { - ...baseOptions, - sourcemaps, - consolelogs: options['consolelogs'] ? true : false, - serverlogs: options['serverlogs'] ? true : false, - livereloadPort, - notificationPort, - env: options['env'] ? String(options['env']) : undefined, - }; - } - - modifyOpenUrl(url: string, options: IonicAngularServeOptions): string { - return `${url}${options.browserOption ? options.browserOption : ''}${options.platform ? `?ionicplatform=${options.platform}` : ''}`; - } - - async serveProject(options: IonicAngularServeOptions): Promise { - const [ externalIP, availableInterfaces ] = await this.selectExternalIP(options); - const { port, livereloadPort, notificationPort } = await findOpenIonicPorts(options.host, options); - - options.port = port; - options.livereloadPort = livereloadPort; - options.notificationPort = notificationPort; - - const appscripts = new IonicAngularServeCLI(this.e); - await appscripts.serve(options); - - return { - custom: appscripts.resolvedProgram !== appscripts.program, - protocol: 'http', - localAddress: 'localhost', - externalAddress: externalIP, - externalNetworkInterfaces: availableInterfaces, - port, - externallyAccessible: ![BIND_ALL_ADDRESS, ...LOCAL_ADDRESSES].includes(externalIP), - }; - } - - getUsedPorts(options: IonicAngularServeOptions, details: ServeDetails): number[] { - return [ - ...super.getUsedPorts(options, details), - ...options.livereloadPort ? [options.livereloadPort] : [], - ...options.notificationPort ? [options.notificationPort] : [], - ]; - } -} - -class IonicAngularServeCLI extends ServeCLI { - readonly name = 'Ionic App Scripts'; - readonly pkg = '@ionic/app-scripts'; - readonly program = DEFAULT_PROGRAM; - readonly prefix = 'app-scripts'; - readonly script?: string = SERVE_SCRIPT; - - protected stdoutFilter(line: string): boolean { - if (this.resolvedProgram !== this.program) { - return super.stdoutFilter(line); - } - - if (line.includes('server running')) { - this.emit('ready'); - return false; - } - - return true; - } - - protected async buildArgs(options: IonicAngularServeOptions): Promise { - const { pkgManagerArgs } = await import('../../utils/npm'); - - const args = this.serveOptionsToAppScriptsArgs(options); - - if (this.resolvedProgram === this.program) { - return ['serve', ...args]; - } else { - const [ , ...pkgArgs ] = await pkgManagerArgs(this.e.config.get('npmClient'), { command: 'run', script: this.script, scriptArgs: [...args] }); - return pkgArgs; - } - } - - protected serveOptionsToAppScriptsArgs(options: IonicAngularServeOptions): string[] { - const args: ParsedArgs = { - _: [], - address: options.host, - port: String(options.port), - 'livereload-port': String(options.livereloadPort), - 'dev-logger-port': String(options.notificationPort), - consolelogs: options.consolelogs, - serverlogs: options.serverlogs, - nobrowser: true, - nolivereload: !options.livereload, - noproxy: !options.proxy, - iscordovaserve: options.engine === 'cordova', - generateSourceMap: typeof options.sourcemaps !== 'undefined' ? options.sourcemaps ? 'true' : 'false' : undefined, - platform: options.platform, - target: options.engine === 'cordova' ? 'cordova' : undefined, - env: options.env, - }; - - return [...unparseArgs(args, { allowCamelCase: true, useEquals: false }), ...options['--']]; - } - - protected async resolveProgram(): Promise { - if (typeof this.script !== 'undefined') { - debug(`Looking for ${ancillary(this.script)} npm script.`); - - const pkg = await this.e.project.requirePackageJson(); - - if (pkg.scripts && pkg.scripts[this.script]) { - if (pkg.scripts[this.script] === DEFAULT_SERVE_SCRIPT_VALUE) { - debug(`Found ${ancillary(this.script)}, but it is the default. Not running.`); - } else { - debug(`Using ${ancillary(this.script)} npm script.`); - return this.e.config.get('npmClient'); - } - } - } - - return this.program; - } -} From 6ea2d48da10d2b964ab95961cc9600874279c59d Mon Sep 17 00:00:00 2001 From: Mike Hartington Date: Wed, 7 Dec 2022 12:43:34 -0500 Subject: [PATCH 14/49] feat(): remove ionicv1 project type BREAKING CHANGE: This commit removes the Ionic V1 project type from the available project integrations. Please migrate to a modern Ionic project. --- .../src/lib/project/ionic1/__tests__/index.ts | 25 --- .../src/lib/project/ionic1/__tests__/serve.ts | 70 -------- .../cli/src/lib/project/ionic1/build.ts | 51 ------ .../cli/src/lib/project/ionic1/index.ts | 154 ----------------- .../cli/src/lib/project/ionic1/serve.ts | 161 ------------------ 5 files changed, 461 deletions(-) delete mode 100644 packages/@ionic/cli/src/lib/project/ionic1/__tests__/index.ts delete mode 100644 packages/@ionic/cli/src/lib/project/ionic1/__tests__/serve.ts delete mode 100644 packages/@ionic/cli/src/lib/project/ionic1/build.ts delete mode 100644 packages/@ionic/cli/src/lib/project/ionic1/index.ts delete mode 100644 packages/@ionic/cli/src/lib/project/ionic1/serve.ts diff --git a/packages/@ionic/cli/src/lib/project/ionic1/__tests__/index.ts b/packages/@ionic/cli/src/lib/project/ionic1/__tests__/index.ts deleted file mode 100644 index 1e330ef2f0..0000000000 --- a/packages/@ionic/cli/src/lib/project/ionic1/__tests__/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as path from 'path' -import { Ionic1Project } from '../'; - -describe('@ionic/cli', () => { - - describe('lib/project/ionic1', () => { - - describe('Ionic1Project', () => { - - let p: Ionic1Project; - - beforeEach(() => { - p = new Ionic1Project({ context: 'app', configPath: '/path/to/proj/file' } as any, {} as any); - jest.spyOn(p, 'config', 'get').mockImplementation(() => ({ get: () => undefined } as any)); - }); - - it('should set directory attribute', async () => { - expect(p.directory).toEqual(path.resolve('/path/to/proj')); - }); - - }); - - }); - -}); diff --git a/packages/@ionic/cli/src/lib/project/ionic1/__tests__/serve.ts b/packages/@ionic/cli/src/lib/project/ionic1/__tests__/serve.ts deleted file mode 100644 index 50e1888d6d..0000000000 --- a/packages/@ionic/cli/src/lib/project/ionic1/__tests__/serve.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { Ionic1ServeRunner } from '../serve'; - -describe('@ionic/cli', () => { - - describe('lib/project/ionic1/serve', () => { - - describe('Ionic1ServeRunner', () => { - - describe('createOptionsFromCommandLine', () => { - - const defaults = { - '--': [], - publicHost: undefined, - host: 'localhost', - browser: undefined, - browserOption: undefined, - consolelogs: false, - engine: 'browser', - externalAddressRequired: false, - lab: false, - labHost: 'localhost', - labPort: 8200, - livereload: true, - livereloadPort: 35729, - notificationPort: 53703, - open: false, - port: 8100, - proxy: true, - serverlogs: false, - project: undefined, - verbose: false, - }; - - it('should provide defaults with no options', () => { - const runner = new Ionic1ServeRunner({} as any); - const result = runner.createOptionsFromCommandLine([], { _: [] }); - expect(result).toEqual(defaults); - }); - - it('should provide options from negations of cli flag defaults', () => { - const runner = new Ionic1ServeRunner({} as any); - const result = runner.createOptionsFromCommandLine([], { _: [], livereload: false, proxy: false, lab: true, open: true, externalAddressRequired: true }); - expect(result).toEqual({ ...defaults, livereload: false, proxy: false, lab: true, open: true, externalAddressRequired: true }); - }); - - it('should allow overrides of default values', () => { - const runner = new Ionic1ServeRunner({} as any); - const result = runner.createOptionsFromCommandLine([], { _: [], host: '0.0.0.0', port: '1111', 'livereload-port': '2222', 'dev-logger-port': '3333' }); - expect(result).toEqual({ ...defaults, host: '0.0.0.0', port: 1111, livereloadPort: 2222, notificationPort: 3333 }); - }); - - it('should respect --external flag', () => { - const runner = new Ionic1ServeRunner({} as any); - const result = runner.createOptionsFromCommandLine([], { _: [], host: 'localhost', external: true }); - expect(result).toEqual({ ...defaults, host: '0.0.0.0' }); - }); - - it('should pass on separated args', () => { - const runner = new Ionic1ServeRunner({} as any); - const result = runner.createOptionsFromCommandLine([], { _: [], '--': ['foo', '--bar'] }); - expect(result).toEqual({ ...defaults, '--': ['foo', '--bar'] }); - }); - - }); - - }); - - }); - -}); diff --git a/packages/@ionic/cli/src/lib/project/ionic1/build.ts b/packages/@ionic/cli/src/lib/project/ionic1/build.ts deleted file mode 100644 index ed8e7a1963..0000000000 --- a/packages/@ionic/cli/src/lib/project/ionic1/build.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { CommandLineInputs, CommandLineOptions, CommandMetadata, Ionic1BuildOptions } from '../../../definitions'; -import { BUILD_SCRIPT, BuildCLI, BuildRunner, BuildRunnerDeps } from '../../build'; - -import { Ionic1Project } from './'; - -export interface Ionic1BuildRunnerDeps extends BuildRunnerDeps { - readonly project: Ionic1Project; -} - -export class Ionic1BuildRunner extends BuildRunner { - constructor(protected readonly e: Ionic1BuildRunnerDeps) { - super(); - } - - async getCommandMetadata(): Promise> { - return {}; - } - - createOptionsFromCommandLine(inputs: CommandLineInputs, options: CommandLineOptions): Ionic1BuildOptions { - const baseOptions = super.createBaseOptionsFromCommandLine(inputs, options); - - return { - ...baseOptions, - type: 'ionic1', - }; - } - - async buildProject(options: Ionic1BuildOptions): Promise { - const v1 = new Ionic1BuildCLI(this.e); - await v1.build(options); - } -} - -class Ionic1BuildCLI extends BuildCLI { - readonly name = 'Ionic 1 Toolkit'; - readonly pkg = '@ionic/v1-toolkit'; - readonly program = 'ionic-v1'; - readonly prefix = 'v1'; - readonly script = BUILD_SCRIPT; - - protected async buildArgs(options: Ionic1BuildOptions): Promise { - const { pkgManagerArgs } = await import('../../utils/npm'); - - if (this.resolvedProgram === this.program) { - return ['build']; - } else { - const [ , ...pkgArgs ] = await pkgManagerArgs(this.e.config.get('npmClient'), { command: 'run', script: this.script }); - return pkgArgs; - } - } -} diff --git a/packages/@ionic/cli/src/lib/project/ionic1/index.ts b/packages/@ionic/cli/src/lib/project/ionic1/index.ts deleted file mode 100644 index 5d2bb181ad..0000000000 --- a/packages/@ionic/cli/src/lib/project/ionic1/index.ts +++ /dev/null @@ -1,154 +0,0 @@ -import { PackageJson } from '@ionic/cli-framework'; -import { readJson } from '@ionic/utils-fs'; -import { prettyPath } from '@ionic/utils-terminal'; -import * as Debug from 'debug'; -import * as lodash from 'lodash'; -import * as path from 'path'; - -import { Project } from '../'; -import { InfoItem } from '../../../definitions'; -import { strong } from '../../color'; -import { FatalException, RunnerNotFoundException } from '../../errors'; - -const debug = Debug('ionic:lib:project:angular'); - -export const ERROR_INVALID_BOWER_JSON = 'INVALID_BOWER_JSON'; - -export interface BowerJson { - name: string; - dependencies?: { [key: string]: string | undefined; }; - devDependencies?: { [key: string]: string | undefined; }; -} - -function isBowerJson(obj: any): obj is BowerJson { - return obj && typeof obj.name === 'string'; -} - -async function readBowerJsonFile(p: string): Promise { - const bowerJson = await readJson(p); - - if (!isBowerJson(bowerJson)) { - throw ERROR_INVALID_BOWER_JSON; - } - - return bowerJson; -} - -export class Ionic1Project extends Project { - readonly type: 'ionic1' = 'ionic1'; - protected bowerJsonFile?: BowerJson; - - async getInfo(): Promise { - const [ - ionic1Version, - [ v1ToolkitPkg ], - ] = await (Promise.all([ - this.getFrameworkVersion(), - this.getPackageJson('@ionic/v1-toolkit'), - ])); - - return [ - ...(await super.getInfo()), - { - group: 'ionic', - name: 'Ionic Framework', - key: 'framework', - value: ionic1Version ? `ionic1 ${ionic1Version}` : 'unknown', - }, - { - group: 'ionic', - name: '@ionic/v1-toolkit', - value: v1ToolkitPkg ? v1ToolkitPkg.version : 'not installed', - }, - ]; - } - - async detected() { - try { - const bwr = await readBowerJsonFile(path.resolve(this.directory, 'bower.json')); - const deps = lodash.assign({}, bwr.dependencies, bwr.devDependencies); - - if (typeof deps['ionic'] === 'string') { - debug(`${strong('ionic')} detected in ${strong('bower.json')}`); - return true; - } - } catch (e) { - // ignore - } - - return false; - } - - async getSourceDir(): Promise { - return this.getDistDir(); // ionic1's source directory is the dist directory - } - - async getDocsUrl(): Promise { - return 'https://ion.link/v1-docs'; - } - - // this method search not only package.json - async getFrameworkVersion(): Promise { - const ionicVersionFilePath = path.resolve(await this.getDistDir(), 'lib', 'ionic', 'version.json'); // TODO - const bowerJsonPath = path.resolve(this.directory, 'bower.json'); - - try { - try { - const ionicVersionJson = await readJson(ionicVersionFilePath); - return ionicVersionJson['version']; - } catch (e) { - const bwr = await this.loadBowerJson(); - const deps = lodash.assign({}, bwr.dependencies, bwr.devDependencies); - - const ionicEntry = deps['ionic']; - - if (!ionicEntry) { - return; - } - - const m = ionicEntry.match(/.+#(.+)/); - - if (m && m[1]) { - return m[1]; - } - } - } catch (e) { - this.e.log.error(`Error with ${strong(prettyPath(bowerJsonPath))} file: ${e}`); - } - } - - async loadBowerJson(): Promise { - if (!this.bowerJsonFile) { - const bowerJsonPath = path.resolve(this.directory, 'bower.json'); - try { - this.bowerJsonFile = await readBowerJsonFile(bowerJsonPath); - } catch (e) { - if (e instanceof SyntaxError) { - throw new FatalException(`Could not parse ${strong('bower.json')}. Is it a valid JSON file?`); - } else if (e === ERROR_INVALID_BOWER_JSON) { - throw new FatalException(`The ${strong('bower.json')} file seems malformed.`); - } - - throw e; // Probably file not found - } - } - - return this.bowerJsonFile; - } - - async requireBuildRunner(): Promise { - const { Ionic1BuildRunner } = await import('./build'); - const deps = { ...this.e, project: this }; - return new Ionic1BuildRunner(deps); - } - - async requireServeRunner(): Promise { - const { Ionic1ServeRunner } = await import('./serve'); - const deps = { ...this.e, project: this }; - return new Ionic1ServeRunner(deps); - } - - async requireGenerateRunner(): Promise { - throw new RunnerNotFoundException('Generators are not supported in Ionic 1 projects.'); - } -} diff --git a/packages/@ionic/cli/src/lib/project/ionic1/serve.ts b/packages/@ionic/cli/src/lib/project/ionic1/serve.ts deleted file mode 100644 index 8a26d68cd9..0000000000 --- a/packages/@ionic/cli/src/lib/project/ionic1/serve.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { MetadataGroup } from '@ionic/cli-framework'; -import { str2num } from '@ionic/cli-framework/utils/string'; - -import { CommandLineInputs, CommandLineOptions, CommandMetadata, Ionic1ServeOptions, ServeDetails } from '../../../definitions'; -import { BIND_ALL_ADDRESS, DEFAULT_DEV_LOGGER_PORT, DEFAULT_LIVERELOAD_PORT, LOCAL_ADDRESSES, SERVE_SCRIPT, ServeCLI, ServeRunner, ServeRunnerDeps } from '../../serve'; -import { findOpenIonicPorts } from '../common'; - -import { Ionic1Project } from './'; - -export interface Ionic1ServeRunnerDeps extends ServeRunnerDeps { - readonly project: Ionic1Project; -} - -export class Ionic1ServeRunner extends ServeRunner { - constructor(protected readonly e: Ionic1ServeRunnerDeps) { - super(); - } - - async getCommandMetadata(): Promise> { - return { - options: [ - { - name: 'consolelogs', - summary: 'Print app console logs to Ionic CLI', - type: Boolean, - groups: ['cordova'], - aliases: ['c'], - }, - { - name: 'serverlogs', - summary: 'Print dev server logs to Ionic CLI', - type: Boolean, - aliases: ['s'], - groups: [MetadataGroup.HIDDEN, 'cordova'], - }, - { - name: 'livereload-port', - summary: 'Use specific port for live-reload', - default: DEFAULT_LIVERELOAD_PORT.toString(), - aliases: ['r'], - groups: [MetadataGroup.ADVANCED, 'cordova'], - spec: { value: 'port' }, - }, - { - name: 'dev-logger-port', - summary: 'Use specific port for dev server communication', - default: DEFAULT_DEV_LOGGER_PORT.toString(), - groups: [MetadataGroup.ADVANCED, 'cordova'], - spec: { value: 'port' }, - }, - { - name: 'proxy', - summary: 'Do not add proxies', - type: Boolean, - default: true, - groups: [MetadataGroup.ADVANCED, 'cordova'], - // TODO: Adding 'x' to aliases here has some weird behavior with minimist. - }, - ], - exampleCommands: [ - '-c', - ], - }; - } - - createOptionsFromCommandLine(inputs: CommandLineInputs, options: CommandLineOptions): Ionic1ServeOptions { - const baseOptions = super.createOptionsFromCommandLine(inputs, options); - const livereloadPort = str2num(options['livereload-port'], DEFAULT_LIVERELOAD_PORT); - const notificationPort = str2num(options['dev-logger-port'], DEFAULT_DEV_LOGGER_PORT); - - return { - ...baseOptions, - consolelogs: options['consolelogs'] ? true : false, - serverlogs: options['serverlogs'] ? true : false, - livereloadPort, - notificationPort, - }; - } - - modifyOpenUrl(url: string, options: Ionic1ServeOptions): string { - return `${url}${options.browserOption ? options.browserOption : ''}${options.platform ? `?ionicplatform=${options.platform}` : ''}`; - } - - async serveProject(options: Ionic1ServeOptions): Promise { - const [ externalIP, availableInterfaces ] = await this.selectExternalIP(options); - const { port, livereloadPort, notificationPort } = await findOpenIonicPorts(options.host, options); - - options.port = port; - options.livereloadPort = livereloadPort; - options.notificationPort = notificationPort; - - const v1 = new Ionic1ServeCLI(this.e); - await v1.serve(options); - - return { - custom: v1.resolvedProgram !== v1.program, - protocol: 'http', - localAddress: 'localhost', - externalAddress: externalIP, - externalNetworkInterfaces: availableInterfaces, - port, - externallyAccessible: ![BIND_ALL_ADDRESS, ...LOCAL_ADDRESSES].includes(externalIP), - }; - } - - getUsedPorts(options: Ionic1ServeOptions, details: ServeDetails): number[] { - return [ - ...super.getUsedPorts(options, details), - ...options.livereloadPort ? [options.livereloadPort] : [], - ...options.notificationPort ? [options.notificationPort] : [], - ]; - } -} - -class Ionic1ServeCLI extends ServeCLI { - readonly name = 'Ionic 1 Toolkit'; - readonly pkg = '@ionic/v1-toolkit'; - readonly program = 'ionic-v1'; - readonly prefix = 'v1'; - readonly script = SERVE_SCRIPT; - - protected stdoutFilter(line: string): boolean { - if (this.resolvedProgram !== this.program) { - return super.stdoutFilter(line); - } - - if (line.includes('server running')) { - this.emit('ready'); - return false; - } - - return true; - } - - protected async buildArgs(options: Ionic1ServeOptions): Promise { - const { pkgManagerArgs } = await import('../../utils/npm'); - - const args = [ - `--host=${options.host}`, - `--port=${String(options.port)}`, - `--livereload-port=${String(options.livereloadPort)}`, - `--dev-port=${String(options.notificationPort)}`, - `--engine=${options.engine}`, - ]; - - if (options.platform) { - args.push(`--platform=${options.platform}`); - } - - if (options.consolelogs) { - args.push('-c'); - } - - if (this.resolvedProgram === this.program) { - return ['serve', ...args]; - } else { - const [ , ...pkgArgs ] = await pkgManagerArgs(this.e.config.get('npmClient'), { command: 'run', script: this.script, scriptArgs: [...args] }); - return pkgArgs; - } - } -} From d40da3d07da909f82807fe7182c035c69d20a65c Mon Sep 17 00:00:00 2001 From: Mike Hartington Date: Wed, 7 Dec 2022 12:56:34 -0500 Subject: [PATCH 15/49] feat(): remove v3 and v1 integrations BREAKING CHANGE: This commit removes integrations with V1 and V3 Ionic project types --- packages/@ionic/cli/src/lib/project/index.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/@ionic/cli/src/lib/project/index.ts b/packages/@ionic/cli/src/lib/project/index.ts index 349123f31e..4d69ceee82 100644 --- a/packages/@ionic/cli/src/lib/project/index.ts +++ b/packages/@ionic/cli/src/lib/project/index.ts @@ -307,12 +307,6 @@ export async function createProjectFromDetails(details: ProjectDetailsResult, de case 'vue': const { VueProject } = await import('./vue'); return new VueProject(details, deps); - case 'ionic-angular': - const { IonicAngularProject } = await import('./ionic-angular'); - return new IonicAngularProject(details, deps); - case 'ionic1': - const { Ionic1Project } = await import('./ionic1'); - return new Ionic1Project(details, deps); case 'custom': const { CustomProject } = await import('./custom'); return new CustomProject(details, deps); From 40fd6842fb0b338885b2d1eeb83dd705a94a6e57 Mon Sep 17 00:00:00 2001 From: Mike Hartington Date: Wed, 7 Dec 2022 12:58:37 -0500 Subject: [PATCH 16/49] refactor(angular): rework angular generators command Rework commands so that most angular generate options do not conflict with internal ionic cli options. --- packages/@ionic/cli/src/definitions.ts | 3 +- packages/@ionic/cli/src/lib/generate.ts | 4 +-- .../cli/src/lib/project/angular/generate.ts | 35 ++++++++++--------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/packages/@ionic/cli/src/definitions.ts b/packages/@ionic/cli/src/definitions.ts index 7b49e6216b..bdc31ca4f3 100644 --- a/packages/@ionic/cli/src/definitions.ts +++ b/packages/@ionic/cli/src/definitions.ts @@ -691,15 +691,16 @@ export interface Ionic1BuildOptions extends BuildOptions<'ionic1'> {} export interface CustomBuildOptions extends BuildOptions<'custom'> {} export interface GenerateOptions { - type: string; name: string; } export interface AngularGenerateOptions extends GenerateOptions { [key: string]: any; // TODO + schematic: string; } export interface IonicAngularGenerateOptions extends GenerateOptions { + type: string; module: boolean; constants: boolean; } diff --git a/packages/@ionic/cli/src/lib/generate.ts b/packages/@ionic/cli/src/lib/generate.ts index 2299845f78..f453ff44e1 100644 --- a/packages/@ionic/cli/src/lib/generate.ts +++ b/packages/@ionic/cli/src/lib/generate.ts @@ -15,8 +15,8 @@ export abstract class GenerateRunner implements Runne protected abstract readonly e: GenerateRunnerDeps; createOptionsFromCommandLine(inputs: CommandLineInputs, options: CommandLineOptions): GenerateOptions { - const [ type, name ] = inputs; - return { type, name }; + const [ name ] = inputs; + return { name }; } async ensureCommandLine(inputs: CommandLineInputs, options: CommandLineOptions): Promise { /* overwritten in subclasses */ } diff --git a/packages/@ionic/cli/src/lib/project/angular/generate.ts b/packages/@ionic/cli/src/lib/project/angular/generate.ts index b05866ed3b..468eb4251f 100644 --- a/packages/@ionic/cli/src/lib/project/angular/generate.ts +++ b/packages/@ionic/cli/src/lib/project/angular/generate.ts @@ -58,7 +58,7 @@ To test a generator before file modifications are made, use the ${input('--dry-r ], inputs: [ { - name: 'type', + name: 'schematic', summary: `The type of feature (e.g. ${['page', 'component', 'directive', 'service'].map(c => input(c)).join(', ')})`, validators: [validators.required], }, @@ -75,22 +75,22 @@ To test a generator before file modifications are made, use the ${input('--dry-r if (inputs[0]) { this.validateFeatureType(inputs[0]); } else { - const type = await this.e.prompt({ + const schematic = await this.e.prompt({ type: 'list', - name: 'type', + name: 'schematic', message: 'What would you like to generate?', choices: SCHEMATICS, }); - inputs[0] = type; + inputs[0] = schematic; } if (!inputs[1]) { - const type = SCHEMATIC_ALIAS.get(inputs[0]) || inputs[0]; + const schematic = SCHEMATIC_ALIAS.get(inputs[0]) || inputs[0]; const name = await this.e.prompt({ type: 'input', name: 'name', - message: `Name/path of ${input(type)}:`, + message: `Name/path of ${input(schematic)}:`, validate: v => validators.required(v), }); @@ -99,7 +99,8 @@ To test a generator before file modifications are made, use the ${input('--dry-r } createOptionsFromCommandLine(inputs: CommandLineInputs, options: CommandLineOptions): AngularGenerateOptions { - const baseOptions = super.createOptionsFromCommandLine(inputs, options); + const [schematic, name] = inputs; + const baseOptions = {name, schematic} const project = options['project'] ? String(options['project']) : 'app'; // TODO: this is a little gross, is there a better way to pass in all the @@ -113,22 +114,22 @@ To test a generator before file modifications are made, use the ${input('--dry-r async run(options: AngularGenerateOptions) { const { name } = options; - const type = SCHEMATIC_ALIAS.get(options.type) || options.type; + const schematic = SCHEMATIC_ALIAS.get(options.schematic) || options.schematic; try { - await this.generateComponent(type, name, lodash.omit(options, 'type', 'name')); + await this.generateComponent(schematic, name, lodash.omit(options, 'schematic', 'name')); } catch (e) { debug(e); - throw new FatalException(`Could not generate ${input(type)}.`); + throw new FatalException(`Could not generate ${input(schematic)}.`); } if (!options['dry-run']) { - this.e.log.ok(`Generated ${input(type)}!`); + this.e.log.ok(`Generated ${input(schematic)}!`); } } - private validateFeatureType(type: string) { - if (type === 'provider') { + private validateFeatureType(schematic: string) { + if (schematic === 'provider') { throw new FatalException( `Please use ${input('ionic generate service')} for generating service providers.\n` + `For more information, please see the Angular documentation${ancillary('[1]')} on services.\n\n` + @@ -136,17 +137,17 @@ To test a generator before file modifications are made, use the ${input('--dry-r ); } - if (!SCHEMATICS.includes(type) && !SCHEMATIC_ALIAS.get(type)) { + if (!SCHEMATICS.includes(schematic) && !SCHEMATIC_ALIAS.get(schematic)) { throw new FatalException( - `${input(type)} is not a known feature.\n` + + `${input(schematic)} is not a known feature.\n` + `Use ${input('npx ng g --help')} to list available types of features.` ); } } - private async generateComponent(type: string, name: string, options: { [key: string]: string | boolean; }) { + private async generateComponent(schematic: string, name: string, options: { [key: string]: string | boolean; }) { const args = { - _: ['generate', type, name], + _: ['generate', schematic, name], // convert `--no-` style options to `--=false` ...lodash.mapValues(options, v => v === false ? 'false' : v), }; From 0c3f1126642ae283845da3379eb647d1fca185c2 Mon Sep 17 00:00:00 2001 From: Ionitron Date: Tue, 13 Dec 2022 15:32:30 +0000 Subject: [PATCH 17/49] chore(release): publish [skip ci] - @ionic/cli@6.20.5 - cli-scripts@2.1.59 --- packages/@ionic/cli/CHANGELOG.md | 8 ++++++++ packages/@ionic/cli/package.json | 2 +- packages/cli-scripts/CHANGELOG.md | 8 ++++++++ packages/cli-scripts/package.json | 4 ++-- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/@ionic/cli/CHANGELOG.md b/packages/@ionic/cli/CHANGELOG.md index 63cfc88f0a..d550596f21 100644 --- a/packages/@ionic/cli/CHANGELOG.md +++ b/packages/@ionic/cli/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.20.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.4...@ionic/cli@6.20.5) (2022-12-13) + +**Note:** Version bump only for package @ionic/cli + + + + + ## [6.20.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.3...@ionic/cli@6.20.4) (2022-11-15) diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index b4ef12ebac..aa3d0c9cf6 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/cli", - "version": "6.20.4", + "version": "6.20.5", "description": "A tool for creating and developing Ionic Framework mobile apps.", "homepage": "https://ionicframework.com", "author": "Ionic Team (https://ionicframework.com) ", diff --git a/packages/cli-scripts/CHANGELOG.md b/packages/cli-scripts/CHANGELOG.md index c8cca9de23..ab910b6c89 100644 --- a/packages/cli-scripts/CHANGELOG.md +++ b/packages/cli-scripts/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.59](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.58...cli-scripts@2.1.59) (2022-12-13) + +**Note:** Version bump only for package cli-scripts + + + + + ## [2.1.58](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.57...cli-scripts@2.1.58) (2022-11-15) **Note:** Version bump only for package cli-scripts diff --git a/packages/cli-scripts/package.json b/packages/cli-scripts/package.json index 73035ad3f8..2e5424e460 100644 --- a/packages/cli-scripts/package.json +++ b/packages/cli-scripts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "cli-scripts", - "version": "2.1.58", + "version": "2.1.59", "bin": { "ionic-cli-scripts": "./bin/ionic-cli-scripts" }, @@ -16,7 +16,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@ionic/cli": "6.20.4", + "@ionic/cli": "6.20.5", "@ionic/cli-framework": "5.1.3", "@ionic/utils-fs": "3.1.6", "ansi-styles": "^4.0.0", From 553ea794f916f17db131d359caba9b6c1b31b919 Mon Sep 17 00:00:00 2001 From: Mike Summerfeldt <20338451+IT-MikeS@users.noreply.github.com> Date: Tue, 20 Dec 2022 10:44:25 -0500 Subject: [PATCH 18/49] fix(cli): capacitor recognize multi-project (#4937) * fix(cli): capacitor recognize multi-project * chore: remove comment Co-authored-by: jcesarmobile * chore: make command not found bubble up Co-authored-by: jcesarmobile --- .../src/lib/integrations/capacitor/index.ts | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts b/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts index d6c22d3e82..32a720a1e4 100644 --- a/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts +++ b/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts @@ -13,6 +13,7 @@ import { InfoItem, IntegrationAddDetails, IntegrationName, + IShellSpawnOptions, ProjectIntegration, ProjectPersonalizationDetails } from '../../../definitions'; @@ -190,7 +191,25 @@ export class Integration extends BaseIntegration { debug('Getting config with Capacitor CLI: %O', args); - const output = await this.e.shell.cmdinfo('capacitor', args, { cwd: this.root }); + let output = undefined; + try { + output = await (async (_command: string, _args: readonly string[] = [], opts: IShellSpawnOptions = {}) => { + try { + const proc = await this.e.shell.createSubprocess(_command, _args, opts); + const out = await proc.output(); + return out.split('\n').join(' ').trim(); + } catch (err) { + throw err; + } + })('capacitor', args, { cwd: this.root }) + } catch (error) { + if ((error as any).code === 'ERR_SUBPROCESS_COMMAND_NOT_FOUND') { + throw new Error(`Capacitor command not found. Is the Capacitor CLI installed? (npm i -D @capacitor/cli)`); + } else { + throw new Error((error as any).message); + } + } + if (!output) { debug('Could not get config from Capacitor CLI (probably old version)'); From 4904337bd80d8a3bc9f036b37af59fa92e1edef1 Mon Sep 17 00:00:00 2001 From: Ionitron Date: Tue, 20 Dec 2022 15:48:55 +0000 Subject: [PATCH 19/49] chore(release): publish [skip ci] - @ionic/cli@6.20.6 - cli-scripts@2.1.60 --- packages/@ionic/cli/CHANGELOG.md | 11 +++++++++++ packages/@ionic/cli/package.json | 2 +- packages/cli-scripts/CHANGELOG.md | 8 ++++++++ packages/cli-scripts/package.json | 4 ++-- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/packages/@ionic/cli/CHANGELOG.md b/packages/@ionic/cli/CHANGELOG.md index d550596f21..c0faa9649c 100644 --- a/packages/@ionic/cli/CHANGELOG.md +++ b/packages/@ionic/cli/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.20.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.5...@ionic/cli@6.20.6) (2022-12-20) + + +### Bug Fixes + +* **cli:** capacitor recognize multi-project ([#4937](https://github.com/ionic-team/ionic-cli/issues/4937)) ([553ea79](https://github.com/ionic-team/ionic-cli/commit/553ea794f916f17db131d359caba9b6c1b31b919)) + + + + + ## [6.20.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.4...@ionic/cli@6.20.5) (2022-12-13) **Note:** Version bump only for package @ionic/cli diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index aa3d0c9cf6..415f783041 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/cli", - "version": "6.20.5", + "version": "6.20.6", "description": "A tool for creating and developing Ionic Framework mobile apps.", "homepage": "https://ionicframework.com", "author": "Ionic Team (https://ionicframework.com) ", diff --git a/packages/cli-scripts/CHANGELOG.md b/packages/cli-scripts/CHANGELOG.md index ab910b6c89..d1d5ad2e3b 100644 --- a/packages/cli-scripts/CHANGELOG.md +++ b/packages/cli-scripts/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.60](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.59...cli-scripts@2.1.60) (2022-12-20) + +**Note:** Version bump only for package cli-scripts + + + + + ## [2.1.59](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.58...cli-scripts@2.1.59) (2022-12-13) **Note:** Version bump only for package cli-scripts diff --git a/packages/cli-scripts/package.json b/packages/cli-scripts/package.json index 2e5424e460..6369a693b5 100644 --- a/packages/cli-scripts/package.json +++ b/packages/cli-scripts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "cli-scripts", - "version": "2.1.59", + "version": "2.1.60", "bin": { "ionic-cli-scripts": "./bin/ionic-cli-scripts" }, @@ -16,7 +16,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@ionic/cli": "6.20.5", + "@ionic/cli": "6.20.6", "@ionic/cli-framework": "5.1.3", "@ionic/utils-fs": "3.1.6", "ansi-styles": "^4.0.0", From f586a18805ead288850f18d8981db4f0ad8848ed Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Mon, 9 Jan 2023 18:06:58 +0100 Subject: [PATCH 20/49] fix: deploy manifest error if no capacitor CLI (#4940) --- .../cli/src/lib/integrations/capacitor/index.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts b/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts index 32a720a1e4..223daabbcf 100644 --- a/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts +++ b/packages/@ionic/cli/src/lib/integrations/capacitor/index.ts @@ -227,11 +227,14 @@ export class Integration extends BaseIntegration { }); getCapacitorConfig = lodash.memoize(async (): Promise => { - const cli = await this.getCapacitorCLIConfig(); - - if (cli) { - debug('Loaded Capacitor config!'); - return cli.app.extConfig; + try { + const cli = await this.getCapacitorCLIConfig(); + if (cli) { + debug('Loaded Capacitor config!'); + return cli.app.extConfig; + } + } catch (ex) { + // ignore } // fallback to reading capacitor.config.json if it exists From 6fcf882b9ee9c31fcea38a6390b3c181c4df5ca6 Mon Sep 17 00:00:00 2001 From: Damian Tarnawsky <84595830+dtarnawsky@users.noreply.github.com> Date: Tue, 10 Jan 2023 09:36:53 -0800 Subject: [PATCH 21/49] fix(cli): Deprecate doctor and lab commands (#4945) --- packages/@ionic/cli/src/commands/capacitor/build.ts | 6 +++--- packages/@ionic/cli/src/commands/doctor/check.ts | 3 ++- packages/@ionic/cli/src/commands/doctor/list.ts | 2 ++ packages/@ionic/cli/src/commands/doctor/treat.ts | 3 ++- packages/@ionic/cli/src/commands/serve.ts | 7 ++++--- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/@ionic/cli/src/commands/capacitor/build.ts b/packages/@ionic/cli/src/commands/capacitor/build.ts index b5ba3770c8..e36837adbf 100644 --- a/packages/@ionic/cli/src/commands/capacitor/build.ts +++ b/packages/@ionic/cli/src/commands/capacitor/build.ts @@ -36,17 +36,17 @@ export class BuildCommand extends CapacitorCommand implements CommandPreRun { const footnotes: Footnote[] = [ { id: 'capacitor-native-config-docs', - url: 'https://capacitor.ionicframework.com/docs/basics/configuring-your-app', + url: 'https://capacitorjs.com/docs/basics/configuring-your-app', shortUrl: 'https://ion.link/capacitor-native-config-docs', }, { id: 'capacitor-ios-config-docs', - url: 'https://capacitor.ionicframework.com/docs/ios/configuration', + url: 'https://capacitorjs.com/docs/ios/configuration', shortUrl: 'https://ion.link/capacitor-ios-config-docs', }, { id: 'capacitor-android-config-docs', - url: 'https://capacitor.ionicframework.com/docs/android/configuration', + url: 'https://capacitorjs.com/docs/android/configuration', shortUrl: 'https://ion.link/capacitor-android-config-docs', }, ]; diff --git a/packages/@ionic/cli/src/commands/doctor/check.ts b/packages/@ionic/cli/src/commands/doctor/check.ts index 8112c07b85..5f84688058 100644 --- a/packages/@ionic/cli/src/commands/doctor/check.ts +++ b/packages/@ionic/cli/src/commands/doctor/check.ts @@ -1,4 +1,4 @@ -import { contains, validate } from '@ionic/cli-framework'; +import { contains, MetadataGroup, validate } from '@ionic/cli-framework'; import { CommandLineInputs, CommandLineOptions, CommandMetadata, IAilment } from '../../definitions'; import { isTreatableAilment } from '../../guards'; @@ -13,6 +13,7 @@ export class DoctorCheckCommand extends DoctorCommand { name: 'check', type: 'project', summary: 'Check the health of your Ionic project', + groups: [MetadataGroup.DEPRECATED], description: ` This command detects and prints common issues and suggested steps to fix them. diff --git a/packages/@ionic/cli/src/commands/doctor/list.ts b/packages/@ionic/cli/src/commands/doctor/list.ts index f5b08f9338..3d2d014c87 100644 --- a/packages/@ionic/cli/src/commands/doctor/list.ts +++ b/packages/@ionic/cli/src/commands/doctor/list.ts @@ -1,3 +1,4 @@ +import { MetadataGroup } from '@ionic/cli-framework'; import { strcmp } from '@ionic/cli-framework/utils/string'; import { columnar } from '@ionic/utils-terminal'; @@ -14,6 +15,7 @@ export class DoctorListCommand extends DoctorCommand { name: 'list', type: 'project', summary: 'List all issues and their identifiers', + groups: [MetadataGroup.DEPRECATED], description: ` Issues can have various tags: - ${strong('treatable')}: ${input('ionic doctor treat')} can attempt to fix the issue diff --git a/packages/@ionic/cli/src/commands/doctor/treat.ts b/packages/@ionic/cli/src/commands/doctor/treat.ts index 095d938011..ce800388a8 100644 --- a/packages/@ionic/cli/src/commands/doctor/treat.ts +++ b/packages/@ionic/cli/src/commands/doctor/treat.ts @@ -1,4 +1,4 @@ -import { contains, validate } from '@ionic/cli-framework'; +import { contains, MetadataGroup, validate } from '@ionic/cli-framework'; import { CommandLineInputs, CommandLineOptions, CommandMetadata, TreatableAilment } from '../../definitions'; import { isExitCodeException, isTreatableAilment } from '../../guards'; @@ -16,6 +16,7 @@ export class DoctorTreatCommand extends DoctorCommand { name: 'treat', type: 'project', summary: 'Attempt to fix issues in your Ionic project', + groups: [MetadataGroup.DEPRECATED], description: ` This command detects and attempts to fix common issues. Before a fix is attempted, the steps are printed and a confirmation prompt is displayed. diff --git a/packages/@ionic/cli/src/commands/serve.ts b/packages/@ionic/cli/src/commands/serve.ts index 8f87209e70..e40b74f914 100644 --- a/packages/@ionic/cli/src/commands/serve.ts +++ b/packages/@ionic/cli/src/commands/serve.ts @@ -19,7 +19,7 @@ export class ServeCommand extends Command implements CommandPreRun { name: 'lab-host', summary: 'Use specific host for Ionic Lab server', default: 'localhost', - groups: [MetadataGroup.ADVANCED], + groups: [MetadataGroup.HIDDEN, MetadataGroup.ADVANCED], spec: { value: 'host' }, hint: weak('(--lab)'), }, @@ -27,7 +27,7 @@ export class ServeCommand extends Command implements CommandPreRun { name: 'lab-port', summary: 'Use specific port for Ionic Lab server', default: DEFAULT_LAB_PORT.toString(), - groups: [MetadataGroup.ADVANCED], + groups: [MetadataGroup.HIDDEN, MetadataGroup.ADVANCED], spec: { value: 'port' }, hint: weak('(--lab)'), }, @@ -56,10 +56,11 @@ export class ServeCommand extends Command implements CommandPreRun { summary: 'Test your apps on multiple platform types in the browser', type: Boolean, aliases: ['l'], + groups: [MetadataGroup.HIDDEN], }, ]; - const exampleCommands = ['', '--external', '--lab']; + const exampleCommands = ['', '--external']; const footnotes: Footnote[] = []; let description = ` From f5f75fa27cffee37571813a2827cfc02baf0cb9a Mon Sep 17 00:00:00 2001 From: Cybertron01Z <113620162+Cybertron01Z@users.noreply.github.com> Date: Fri, 13 Jan 2023 18:20:56 +0100 Subject: [PATCH 22/49] fix(capacitor): forward --inline to Capacitor CLI on copy and sync (#4928) Co-authored-by: Mike Summerfeldt <20338451+IT-MikeS@users.noreply.github.com> Co-authored-by: jcesarmobile --- 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..b9af544437 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: false + } ]; 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..8f78b1db5d 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: false + } ]; 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 057d3a33c382c84e1d4e1436763dd303eb5bbb79 Mon Sep 17 00:00:00 2001 From: Ionitron Date: Fri, 13 Jan 2023 17:24:40 +0000 Subject: [PATCH 23/49] chore(release): publish [skip ci] - @ionic/cli@6.20.7 - cli-scripts@2.1.61 --- packages/@ionic/cli/CHANGELOG.md | 13 +++++++++++++ packages/@ionic/cli/package.json | 2 +- packages/cli-scripts/CHANGELOG.md | 8 ++++++++ packages/cli-scripts/package.json | 4 ++-- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/packages/@ionic/cli/CHANGELOG.md b/packages/@ionic/cli/CHANGELOG.md index c0faa9649c..e7079588ec 100644 --- a/packages/@ionic/cli/CHANGELOG.md +++ b/packages/@ionic/cli/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.20.7](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.6...@ionic/cli@6.20.7) (2023-01-13) + + +### Bug Fixes + +* **capacitor:** forward --inline to Capacitor CLI on copy and sync ([#4928](https://github.com/ionic-team/ionic-cli/issues/4928)) ([f5f75fa](https://github.com/ionic-team/ionic-cli/commit/f5f75fa27cffee37571813a2827cfc02baf0cb9a)) +* **cli:** Deprecate doctor and lab commands ([#4945](https://github.com/ionic-team/ionic-cli/issues/4945)) ([6fcf882](https://github.com/ionic-team/ionic-cli/commit/6fcf882b9ee9c31fcea38a6390b3c181c4df5ca6)) +* deploy manifest error if no capacitor CLI ([#4940](https://github.com/ionic-team/ionic-cli/issues/4940)) ([f586a18](https://github.com/ionic-team/ionic-cli/commit/f586a18805ead288850f18d8981db4f0ad8848ed)) + + + + + ## [6.20.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.5...@ionic/cli@6.20.6) (2022-12-20) diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index 415f783041..c0aaab1b2e 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/cli", - "version": "6.20.6", + "version": "6.20.7", "description": "A tool for creating and developing Ionic Framework mobile apps.", "homepage": "https://ionicframework.com", "author": "Ionic Team (https://ionicframework.com) ", diff --git a/packages/cli-scripts/CHANGELOG.md b/packages/cli-scripts/CHANGELOG.md index d1d5ad2e3b..136669b624 100644 --- a/packages/cli-scripts/CHANGELOG.md +++ b/packages/cli-scripts/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.61](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.60...cli-scripts@2.1.61) (2023-01-13) + +**Note:** Version bump only for package cli-scripts + + + + + ## [2.1.60](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.59...cli-scripts@2.1.60) (2022-12-20) **Note:** Version bump only for package cli-scripts diff --git a/packages/cli-scripts/package.json b/packages/cli-scripts/package.json index 6369a693b5..b2970e4ce3 100644 --- a/packages/cli-scripts/package.json +++ b/packages/cli-scripts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "cli-scripts", - "version": "2.1.60", + "version": "2.1.61", "bin": { "ionic-cli-scripts": "./bin/ionic-cli-scripts" }, @@ -16,7 +16,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@ionic/cli": "6.20.6", + "@ionic/cli": "6.20.7", "@ionic/cli-framework": "5.1.3", "@ionic/utils-fs": "3.1.6", "ansi-styles": "^4.0.0", From d0f746b04fc73493b4d4532d6e1099a9580628f8 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 13 Jan 2023 18:55:16 +0100 Subject: [PATCH 24/49] chore(ci): update actions (#4948) --- .github/workflows/cd.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b5e632d515..f1d69f9b83 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -12,14 +12,14 @@ jobs: timeout-minutes: 30 steps: - run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v3 with: node-version: 14.x - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Restore Dependency Cache - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: ~/.npm key: ${{ runner.OS }}-dependency-cache-${{ hashFiles('**/package.json') }} From b72aa4e109818707ea13bd5ee88a2cf252ca8d66 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 13 Jan 2023 19:02:39 +0100 Subject: [PATCH 25/49] chore: restore unpublished version --- packages/@ionic/cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index c0aaab1b2e..415f783041 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/cli", - "version": "6.20.7", + "version": "6.20.6", "description": "A tool for creating and developing Ionic Framework mobile apps.", "homepage": "https://ionicframework.com", "author": "Ionic Team (https://ionicframework.com) ", From 9b1f6241469863e29b18a8b8f504d737897ea79a Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 13 Jan 2023 19:02:53 +0100 Subject: [PATCH 26/49] chore(release): publish [skip ci] - @ionic/cli@6.20.7 --- packages/@ionic/cli/CHANGELOG.md | 8 ++++++++ packages/@ionic/cli/package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/@ionic/cli/CHANGELOG.md b/packages/@ionic/cli/CHANGELOG.md index e7079588ec..f5c9da8b8a 100644 --- a/packages/@ionic/cli/CHANGELOG.md +++ b/packages/@ionic/cli/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.20.7](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.7...@ionic/cli@6.20.7) (2023-01-13) + +**Note:** Version bump only for package @ionic/cli + + + + + ## [6.20.7](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.6...@ionic/cli@6.20.7) (2023-01-13) diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index 415f783041..c0aaab1b2e 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/cli", - "version": "6.20.6", + "version": "6.20.7", "description": "A tool for creating and developing Ionic Framework mobile apps.", "homepage": "https://ionicframework.com", "author": "Ionic Team (https://ionicframework.com) ", From d30e3e9e3ea85fb1657c44d0051362192542e63e Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 13 Jan 2023 19:04:03 +0100 Subject: [PATCH 27/49] chore(release): publish [skip ci] - @ionic/cli@6.20.8 - cli-scripts@2.1.62 --- packages/@ionic/cli/CHANGELOG.md | 8 ++++++++ packages/@ionic/cli/package.json | 2 +- packages/cli-scripts/CHANGELOG.md | 8 ++++++++ packages/cli-scripts/package.json | 4 ++-- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/@ionic/cli/CHANGELOG.md b/packages/@ionic/cli/CHANGELOG.md index f5c9da8b8a..e5c0461956 100644 --- a/packages/@ionic/cli/CHANGELOG.md +++ b/packages/@ionic/cli/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.20.8](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.7...@ionic/cli@6.20.8) (2023-01-13) + +**Note:** Version bump only for package @ionic/cli + + + + + ## [6.20.7](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.7...@ionic/cli@6.20.7) (2023-01-13) **Note:** Version bump only for package @ionic/cli diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index c0aaab1b2e..935a21687e 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/cli", - "version": "6.20.7", + "version": "6.20.8", "description": "A tool for creating and developing Ionic Framework mobile apps.", "homepage": "https://ionicframework.com", "author": "Ionic Team (https://ionicframework.com) ", diff --git a/packages/cli-scripts/CHANGELOG.md b/packages/cli-scripts/CHANGELOG.md index 136669b624..ae947d7310 100644 --- a/packages/cli-scripts/CHANGELOG.md +++ b/packages/cli-scripts/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.62](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.61...cli-scripts@2.1.62) (2023-01-13) + +**Note:** Version bump only for package cli-scripts + + + + + ## [2.1.61](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.60...cli-scripts@2.1.61) (2023-01-13) **Note:** Version bump only for package cli-scripts diff --git a/packages/cli-scripts/package.json b/packages/cli-scripts/package.json index b2970e4ce3..38caec608d 100644 --- a/packages/cli-scripts/package.json +++ b/packages/cli-scripts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "cli-scripts", - "version": "2.1.61", + "version": "2.1.62", "bin": { "ionic-cli-scripts": "./bin/ionic-cli-scripts" }, @@ -16,7 +16,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@ionic/cli": "6.20.7", + "@ionic/cli": "6.20.8", "@ionic/cli-framework": "5.1.3", "@ionic/utils-fs": "3.1.6", "ansi-styles": "^4.0.0", From a2eb4b2cf46e0f2004c1850acfdeada46fb211b5 Mon Sep 17 00:00:00 2001 From: smzelek <11831150+smzelek@users.noreply.github.com> Date: Mon, 13 Mar 2023 18:52:12 -0400 Subject: [PATCH 28/49] fix(cli): native solution preview should no longer be hidden (#4962) --- packages/@ionic/cli/assets/oauth/success/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@ionic/cli/assets/oauth/success/index.html b/packages/@ionic/cli/assets/oauth/success/index.html index 99c5732207..a945060dd4 100644 --- a/packages/@ionic/cli/assets/oauth/success/index.html +++ b/packages/@ionic/cli/assets/oauth/success/index.html @@ -87,13 +87,13 @@ font-weight: 400; } - .ad-box{ + .native-solutions{ display:block; text-align:center; padding-top:30px; } - .ad-box>ion-card{ + .native-solutions>ion-card{ width:300px; display:inline-block; } @@ -125,7 +125,7 @@

Your app is now building in your t

There was an error logging in. Please return to the terminal.

-
+
From 5c23518b1a7bda4f020a82ced5557e157ccdbbc7 Mon Sep 17 00:00:00 2001 From: Mike Hartington Date: Thu, 16 Mar 2023 09:50:32 -0400 Subject: [PATCH 29/49] fix(): update test to reflect new output (#4967) --- .../@ionic/cli/src/lib/project/angular/__tests__/generate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@ionic/cli/src/lib/project/angular/__tests__/generate.ts b/packages/@ionic/cli/src/lib/project/angular/__tests__/generate.ts index aa8aa8ae5d..62cc285182 100644 --- a/packages/@ionic/cli/src/lib/project/angular/__tests__/generate.ts +++ b/packages/@ionic/cli/src/lib/project/angular/__tests__/generate.ts @@ -12,7 +12,7 @@ describe('@ionic/cli', () => { const defaults = { name: undefined, project: 'app', - type: undefined, + schematic: undefined, }; it('should provide defaults with no inputs or options', () => { @@ -24,7 +24,7 @@ describe('@ionic/cli', () => { it('should provide options from inputs', () => { const runner = new AngularGenerateRunner({} as any); const result = runner.createOptionsFromCommandLine(['service', 'FancyBar'], { _: [] }); - expect(result).toEqual({ ...defaults, name: 'FancyBar', type: 'service' }); + expect(result).toEqual({ ...defaults, name: 'FancyBar', schematic: 'service' }); }); it('should respect --project', () => { From 5d7f4a74e7ed902209086addd744bb1990ae444f Mon Sep 17 00:00:00 2001 From: Ionitron Date: Fri, 17 Mar 2023 11:25:00 +0000 Subject: [PATCH 30/49] chore(release): publish [skip ci] - @ionic/cli@6.20.9 - cli-scripts@2.1.63 --- packages/@ionic/cli/CHANGELOG.md | 11 +++++++++++ packages/@ionic/cli/package.json | 2 +- packages/cli-scripts/CHANGELOG.md | 8 ++++++++ packages/cli-scripts/package.json | 4 ++-- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/packages/@ionic/cli/CHANGELOG.md b/packages/@ionic/cli/CHANGELOG.md index e5c0461956..8b6de7e04b 100644 --- a/packages/@ionic/cli/CHANGELOG.md +++ b/packages/@ionic/cli/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.20.9](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.8...@ionic/cli@6.20.9) (2023-03-17) + + +### Bug Fixes + +* **cli:** native solution preview should no longer be hidden ([#4962](https://github.com/ionic-team/ionic-cli/issues/4962)) ([a2eb4b2](https://github.com/ionic-team/ionic-cli/commit/a2eb4b2cf46e0f2004c1850acfdeada46fb211b5)) + + + + + ## [6.20.8](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.7...@ionic/cli@6.20.8) (2023-01-13) **Note:** Version bump only for package @ionic/cli diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index 935a21687e..043b5015bb 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/cli", - "version": "6.20.8", + "version": "6.20.9", "description": "A tool for creating and developing Ionic Framework mobile apps.", "homepage": "https://ionicframework.com", "author": "Ionic Team (https://ionicframework.com) ", diff --git a/packages/cli-scripts/CHANGELOG.md b/packages/cli-scripts/CHANGELOG.md index ae947d7310..524980a314 100644 --- a/packages/cli-scripts/CHANGELOG.md +++ b/packages/cli-scripts/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.63](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.62...cli-scripts@2.1.63) (2023-03-17) + +**Note:** Version bump only for package cli-scripts + + + + + ## [2.1.62](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.61...cli-scripts@2.1.62) (2023-01-13) **Note:** Version bump only for package cli-scripts diff --git a/packages/cli-scripts/package.json b/packages/cli-scripts/package.json index 38caec608d..4ce1ef6f3a 100644 --- a/packages/cli-scripts/package.json +++ b/packages/cli-scripts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "cli-scripts", - "version": "2.1.62", + "version": "2.1.63", "bin": { "ionic-cli-scripts": "./bin/ionic-cli-scripts" }, @@ -16,7 +16,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@ionic/cli": "6.20.8", + "@ionic/cli": "6.20.9", "@ionic/cli-framework": "5.1.3", "@ionic/utils-fs": "3.1.6", "ansi-styles": "^4.0.0", From 49a90e6ea1ca37efb9efb621cb5241301c9f1dac Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 17 Mar 2023 13:08:51 +0100 Subject: [PATCH 31/49] chore: restore unpublished version --- packages/@ionic/cli/package.json | 2 +- packages/cli-scripts/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index 043b5015bb..935a21687e 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/cli", - "version": "6.20.9", + "version": "6.20.8", "description": "A tool for creating and developing Ionic Framework mobile apps.", "homepage": "https://ionicframework.com", "author": "Ionic Team (https://ionicframework.com) ", diff --git a/packages/cli-scripts/package.json b/packages/cli-scripts/package.json index 4ce1ef6f3a..1d5beac885 100644 --- a/packages/cli-scripts/package.json +++ b/packages/cli-scripts/package.json @@ -16,7 +16,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@ionic/cli": "6.20.9", + "@ionic/cli": "6.20.8", "@ionic/cli-framework": "5.1.3", "@ionic/utils-fs": "3.1.6", "ansi-styles": "^4.0.0", From 133ad560e62acac8e2c75a0aa4a237ed44eb5834 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 17 Mar 2023 13:10:10 +0100 Subject: [PATCH 32/49] chore(release): publish [skip ci] - @ionic/cli@6.20.9 - cli-scripts@2.1.64 --- packages/@ionic/cli/CHANGELOG.md | 11 +++++++++++ packages/@ionic/cli/package.json | 2 +- packages/cli-scripts/CHANGELOG.md | 8 ++++++++ packages/cli-scripts/package.json | 4 ++-- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/packages/@ionic/cli/CHANGELOG.md b/packages/@ionic/cli/CHANGELOG.md index 8b6de7e04b..73dde20771 100644 --- a/packages/@ionic/cli/CHANGELOG.md +++ b/packages/@ionic/cli/CHANGELOG.md @@ -14,6 +14,17 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline +## [6.20.9](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.8...@ionic/cli@6.20.9) (2023-03-17) + + +### Bug Fixes + +* **cli:** native solution preview should no longer be hidden ([#4962](https://github.com/ionic-team/ionic-cli/issues/4962)) ([a2eb4b2](https://github.com/ionic-team/ionic-cli/commit/a2eb4b2cf46e0f2004c1850acfdeada46fb211b5)) + + + + + ## [6.20.8](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli@6.20.7...@ionic/cli@6.20.8) (2023-01-13) **Note:** Version bump only for package @ionic/cli diff --git a/packages/@ionic/cli/package.json b/packages/@ionic/cli/package.json index 935a21687e..043b5015bb 100644 --- a/packages/@ionic/cli/package.json +++ b/packages/@ionic/cli/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/cli", - "version": "6.20.8", + "version": "6.20.9", "description": "A tool for creating and developing Ionic Framework mobile apps.", "homepage": "https://ionicframework.com", "author": "Ionic Team (https://ionicframework.com) ", diff --git a/packages/cli-scripts/CHANGELOG.md b/packages/cli-scripts/CHANGELOG.md index 524980a314..87da7ad5df 100644 --- a/packages/cli-scripts/CHANGELOG.md +++ b/packages/cli-scripts/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.64](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.63...cli-scripts@2.1.64) (2023-03-17) + +**Note:** Version bump only for package cli-scripts + + + + + ## [2.1.63](https://github.com/ionic-team/ionic-cli/compare/cli-scripts@2.1.62...cli-scripts@2.1.63) (2023-03-17) **Note:** Version bump only for package cli-scripts diff --git a/packages/cli-scripts/package.json b/packages/cli-scripts/package.json index 1d5beac885..5edf659039 100644 --- a/packages/cli-scripts/package.json +++ b/packages/cli-scripts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "cli-scripts", - "version": "2.1.63", + "version": "2.1.64", "bin": { "ionic-cli-scripts": "./bin/ionic-cli-scripts" }, @@ -16,7 +16,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { - "@ionic/cli": "6.20.8", + "@ionic/cli": "6.20.9", "@ionic/cli-framework": "5.1.3", "@ionic/utils-fs": "3.1.6", "ansi-styles": "^4.0.0", From 4d0b731f8792fd1886bfadf24be054cbadbdc707 Mon Sep 17 00:00:00 2001 From: Lars Mikkelsen Date: Fri, 17 Mar 2023 11:39:17 -0400 Subject: [PATCH 33/49] fix(ci): fix publish with granular access token --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index edeb2ca4f7..2be1c8aabe 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "docs": "node packages/cli-scripts/bin/ionic-cli-scripts docs", "docs:watch": "chokidar 'packages/cli-scripts/dist/docs/**/*.js' -c 'npm run docs'", "publish:testing": "lerna publish prerelease --preid=testing --exact --no-git-tag-version --no-push --dist-tag=testing", - "publish:ci": "lerna publish -m 'chore(release): publish [skip ci]' --exact --conventional-commits" + "publish:ci": "lerna publish -m 'chore(release): publish [skip ci]' --exact --conventional-commits --no-verify-access" }, "devDependencies": { "chokidar-cli": "^2.0.0", From 3d3c4daffae5385327f46e191c16ed6cf80fec1a Mon Sep 17 00:00:00 2001 From: Lars Mikkelsen Date: Fri, 17 Mar 2023 11:43:57 -0400 Subject: [PATCH 34/49] fix(ci): fix Docker image push --- .github/workflows/cd.yml | 4 +--- .github/workflows/docker-image.yml | 7 ++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index f1d69f9b83..3af5a40920 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -35,9 +35,7 @@ jobs: - name: Sleep while npm takes its time run: sleep 20 - name: GitHub Container Registry Login - run: echo ${GH_TOKEN} | docker login ghcr.io -u ionitron --password-stdin - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} + run: echo ${{ github.token }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: Build Container run: | docker build \ diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3ee0d8533c..e2b5c2ad6d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -14,10 +14,7 @@ jobs: with: fetch-depth: 0 - name: GitHub Container Registry Login - run: echo ${GH_TOKEN} | docker login ghcr.io -u ionitron --password-stdin - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - + run: echo ${{ github.token }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: Build Container run: | docker build \ @@ -28,4 +25,4 @@ jobs: - name: Push Container as latest run: docker push ghcr.io/${{ github.repository }}:latest - name: Push Container as version - run: docker push ghcr.io/${{ github.repository }}:$(npm info @ionic/cli dist-tags.latest) \ No newline at end of file + run: docker push ghcr.io/${{ github.repository }}:$(npm info @ionic/cli dist-tags.latest) From d6512a5139943dbe2084f99e63075db6e6b15b4d Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 20 Mar 2023 10:56:20 -0400 Subject: [PATCH 35/49] refactor(lab): remove ionic serve --lab option (#4960) BREAKING CHANGE: The `--lab` option has been removed from `ionic serve`. See https://ionicframework.com/docs/developing/previewing for alternatives. --- packages/@ionic/cli/src/commands/index.ts | 1 - packages/@ionic/cli/src/commands/serve.ts | 59 +- packages/@ionic/cli/src/definitions.ts | 3 - .../@ionic/cli/src/lib/__tests__/serve.ts | 7 +- .../lib/project/angular/__tests__/serve.ts | 7 +- packages/@ionic/cli/src/lib/serve.ts | 61 +- packages/@ionic/lab/.gitignore | 3 - packages/@ionic/lab/.npmrc | 1 - packages/@ionic/lab/CHANGELOG.md | 625 ------------------ packages/@ionic/lab/LICENSE | 21 - packages/@ionic/lab/README.md | 10 - packages/@ionic/lab/bin/ionic-lab | 24 - packages/@ionic/lab/jest.config.js | 1 - packages/@ionic/lab/lint-staged.config.js | 1 - packages/@ionic/lab/package.json | 60 -- packages/@ionic/lab/src/index.ts | 135 ---- packages/@ionic/lab/src/stencil/.gitignore | 1 - .../stencil/assets/android-device-skin.png | Bin 12184 -> 0 bytes .../src/stencil/assets/android-statusbar.png | Bin 2608 -> 0 bytes .../@ionic/lab/src/stencil/assets/app.css | 131 ---- .../@ionic/lab/src/stencil/assets/favicon.png | Bin 4256 -> 0 bytes .../@ionic/lab/src/stencil/assets/fonts.css | 132 ---- .../lab/src/stencil/assets/ios-statusbar.png | Bin 3145 -> 0 bytes .../src/stencil/assets/iphone-device-skin.png | Bin 12974 -> 0 bytes .../lab/src/stencil/assets/lab-logo.png | Bin 1900 -> 0 bytes .../@ionic/lab/src/stencil/assets/reboot.css | 281 -------- .../lab/src/stencil/assets/variables.css | 41 -- .../lab/src/stencil/assets/wp-statusbar.png | Bin 1321 -> 0 bytes .../@ionic/lab/src/stencil/components.d.ts | 131 ---- .../components/ionlab-app/ionlab-app.tsx | 123 ---- .../ionlab-device-frame.css | 146 ---- .../ionlab-device-frame.tsx | 55 -- .../ionlab-platform-dropdown.css | 49 -- .../ionlab-platform-dropdown.tsx | 46 -- .../ionlab-preview/ionlab-preview.css | 32 - .../ionlab-preview/ionlab-preview.tsx | 47 -- .../ionlab-sidebar/ionlab-sidebar.css | 35 - .../ionlab-sidebar/ionlab-sidebar.tsx | 37 -- .../sk-fading-circle/sk-fading-circle.css | 157 ----- .../sk-fading-circle/sk-fading-circle.tsx | 24 - .../@ionic/lab/src/stencil/declarations.d.ts | 9 - packages/@ionic/lab/src/stencil/index.html | 34 - .../@ionic/lab/src/stencil/utils/index.ts | 35 - packages/@ionic/lab/stencil.config.js | 20 - packages/@ionic/lab/tsconfig.json | 17 - 45 files changed, 11 insertions(+), 2591 deletions(-) delete mode 100644 packages/@ionic/lab/.gitignore delete mode 100644 packages/@ionic/lab/.npmrc delete mode 100644 packages/@ionic/lab/CHANGELOG.md delete mode 100644 packages/@ionic/lab/LICENSE delete mode 100644 packages/@ionic/lab/README.md delete mode 100755 packages/@ionic/lab/bin/ionic-lab delete mode 100644 packages/@ionic/lab/jest.config.js delete mode 100644 packages/@ionic/lab/lint-staged.config.js delete mode 100644 packages/@ionic/lab/package.json delete mode 100644 packages/@ionic/lab/src/index.ts delete mode 100644 packages/@ionic/lab/src/stencil/.gitignore delete mode 100644 packages/@ionic/lab/src/stencil/assets/android-device-skin.png delete mode 100644 packages/@ionic/lab/src/stencil/assets/android-statusbar.png delete mode 100644 packages/@ionic/lab/src/stencil/assets/app.css delete mode 100644 packages/@ionic/lab/src/stencil/assets/favicon.png delete mode 100644 packages/@ionic/lab/src/stencil/assets/fonts.css delete mode 100644 packages/@ionic/lab/src/stencil/assets/ios-statusbar.png delete mode 100644 packages/@ionic/lab/src/stencil/assets/iphone-device-skin.png delete mode 100644 packages/@ionic/lab/src/stencil/assets/lab-logo.png delete mode 100644 packages/@ionic/lab/src/stencil/assets/reboot.css delete mode 100644 packages/@ionic/lab/src/stencil/assets/variables.css delete mode 100644 packages/@ionic/lab/src/stencil/assets/wp-statusbar.png delete mode 100644 packages/@ionic/lab/src/stencil/components.d.ts delete mode 100644 packages/@ionic/lab/src/stencil/components/ionlab-app/ionlab-app.tsx delete mode 100644 packages/@ionic/lab/src/stencil/components/ionlab-device-frame/ionlab-device-frame.css delete mode 100644 packages/@ionic/lab/src/stencil/components/ionlab-device-frame/ionlab-device-frame.tsx delete mode 100644 packages/@ionic/lab/src/stencil/components/ionlab-platform-dropdown/ionlab-platform-dropdown.css delete mode 100644 packages/@ionic/lab/src/stencil/components/ionlab-platform-dropdown/ionlab-platform-dropdown.tsx delete mode 100644 packages/@ionic/lab/src/stencil/components/ionlab-preview/ionlab-preview.css delete mode 100644 packages/@ionic/lab/src/stencil/components/ionlab-preview/ionlab-preview.tsx delete mode 100644 packages/@ionic/lab/src/stencil/components/ionlab-sidebar/ionlab-sidebar.css delete mode 100644 packages/@ionic/lab/src/stencil/components/ionlab-sidebar/ionlab-sidebar.tsx delete mode 100644 packages/@ionic/lab/src/stencil/components/sk-fading-circle/sk-fading-circle.css delete mode 100644 packages/@ionic/lab/src/stencil/components/sk-fading-circle/sk-fading-circle.tsx delete mode 100644 packages/@ionic/lab/src/stencil/declarations.d.ts delete mode 100644 packages/@ionic/lab/src/stencil/index.html delete mode 100644 packages/@ionic/lab/src/stencil/utils/index.ts delete mode 100644 packages/@ionic/lab/stencil.config.js delete mode 100644 packages/@ionic/lab/tsconfig.json diff --git a/packages/@ionic/cli/src/commands/index.ts b/packages/@ionic/cli/src/commands/index.ts index 427a73aabf..b77b78d93f 100644 --- a/packages/@ionic/cli/src/commands/index.ts +++ b/packages/@ionic/cli/src/commands/index.ts @@ -81,7 +81,6 @@ export class IonicNamespace extends Namespace { ['state', async () => { const { StateCommand } = await import('./state'); return new StateCommand(this); }], ['telemetry', async () => { const { TelemetryCommand } = await import('./telemetry'); return new TelemetryCommand(this); }], ['version', async () => { const { VersionCommand } = await import('./version'); return new VersionCommand(this); }], - ['lab', async () => { const { LabCommand } = await import('./serve'); return new LabCommand(this); }], ['g', 'generate'], ['s', 'serve'], ]); diff --git a/packages/@ionic/cli/src/commands/serve.ts b/packages/@ionic/cli/src/commands/serve.ts index 284cf494cd..6b21d317e0 100644 --- a/packages/@ionic/cli/src/commands/serve.ts +++ b/packages/@ionic/cli/src/commands/serve.ts @@ -3,11 +3,10 @@ import { sleepForever } from '@ionic/utils-process'; import * as lodash from 'lodash'; import { CommandInstanceInfo, CommandLineInputs, CommandLineOptions, CommandMetadata, CommandMetadataOption, CommandPreRun } from '../definitions'; -import { input, strong, weak } from '../lib/color'; +import { input } from '../lib/color'; import { Command } from '../lib/command'; import { FatalException, RunnerException } from '../lib/errors'; -import { getFullCommandParts } from '../lib/executor'; -import { BROWSERS, COMMON_SERVE_COMMAND_OPTIONS, DEFAULT_LAB_PORT } from '../lib/serve'; +import { BROWSERS, COMMON_SERVE_COMMAND_OPTIONS } from '../lib/serve'; export class ServeCommand extends Command implements CommandPreRun { async getMetadata(): Promise { @@ -15,22 +14,6 @@ export class ServeCommand extends Command implements CommandPreRun { let options: CommandMetadataOption[] = [ ...COMMON_SERVE_COMMAND_OPTIONS, - { - name: 'lab-host', - summary: 'Use specific host for Ionic Lab server', - default: 'localhost', - groups: [MetadataGroup.ADVANCED], - spec: { value: 'host' }, - hint: weak('(--lab)'), - }, - { - name: 'lab-port', - summary: 'Use specific port for Ionic Lab server', - default: DEFAULT_LAB_PORT.toString(), - groups: [MetadataGroup.ADVANCED], - spec: { value: 'port' }, - hint: weak('(--lab)'), - }, { name: 'open', summary: 'Do not open a browser window', @@ -51,23 +34,15 @@ export class ServeCommand extends Command implements CommandPreRun { groups: [MetadataGroup.ADVANCED], spec: { value: 'path' }, }, - { - name: 'lab', - summary: 'Test your apps on multiple platform types in the browser', - type: Boolean, - aliases: ['l'], - }, ]; - const exampleCommands = ['', '--external', '--lab']; + const exampleCommands = ['', '--external']; const footnotes: Footnote[] = []; let description = ` Easily spin up a development server which launches in your browser. It watches for changes in your source files and automatically reloads with the updated build. -By default, ${input('ionic serve')} boots up a development server on ${input('localhost')}. To serve to your LAN, specify the ${input('--external')} option, which will use all network interfaces and print the external address(es) on which your app is being served. - -Try the ${input('--lab')} option to see multiple platforms at once.`; +By default, ${input('ionic serve')} boots up a development server on ${input('localhost')}. To serve to your LAN, specify the ${input('--external')} option, which will use all network interfaces and print the external address(es) on which your app is being served.`; const runner = this.project && await this.project.getServeRunner(); @@ -93,13 +68,6 @@ Try the ${input('--lab')} option to see multiple platforms at once.`; } async preRun(inputs: CommandLineInputs, options: CommandLineOptions, { location }: CommandInstanceInfo): Promise { - const parts = getFullCommandParts(location); - const alias = lodash.last(parts); - - if (alias === 'lab') { - options['lab'] = true; - } - if (options['nolivereload']) { this.env.log.warn(`The ${input('--nolivereload')} option has been deprecated. Please use ${input('--no-livereload')}.`); options['livereload'] = false; @@ -145,22 +113,3 @@ Try the ${input('--lab')} option to see multiple platforms at once.`; await sleepForever(); } } - -export class LabCommand extends ServeCommand { - async getMetadata(): Promise { - const metadata = await super.getMetadata(); - const groups = [...metadata.groups || [], MetadataGroup.HIDDEN]; - const exampleCommands = [...metadata.exampleCommands || []].filter(c => !c.includes('--lab')); - - return { - ...metadata, - summary: 'Start Ionic Lab for multi-platform dev/testing', - description: ` -Start an instance of ${strong('Ionic Lab')}, a tool for developing Ionic apps for multiple platforms at once side-by-side. - -${input('ionic lab')} is just a convenient shortcut for ${input('ionic serve --lab')}.`, - groups, - exampleCommands, - }; - } -} diff --git a/packages/@ionic/cli/src/definitions.ts b/packages/@ionic/cli/src/definitions.ts index bdc31ca4f3..7bd0922d71 100644 --- a/packages/@ionic/cli/src/definitions.ts +++ b/packages/@ionic/cli/src/definitions.ts @@ -712,9 +712,6 @@ export interface ServeOptions { publicHost?: string; livereload: boolean; proxy: boolean; - lab: boolean; - labHost: string; - labPort: number; open: boolean; browser?: string; browserOption?: string; diff --git a/packages/@ionic/cli/src/lib/__tests__/serve.ts b/packages/@ionic/cli/src/lib/__tests__/serve.ts index e9da53993f..48c25bb61c 100644 --- a/packages/@ionic/cli/src/lib/__tests__/serve.ts +++ b/packages/@ionic/cli/src/lib/__tests__/serve.ts @@ -26,9 +26,6 @@ describe('@ionic/cli', () => { browserOption: undefined, engine: 'browser', externalAddressRequired: false, - lab: false, - labHost: 'localhost', - labPort: 8200, livereload: true, open: false, port: 8100, @@ -45,8 +42,8 @@ describe('@ionic/cli', () => { it('should provide options from negations of cli flag defaults', () => { const runner = new MyServeRunner({}); - const result = runner.createOptionsFromCommandLine([], { _: [], livereload: false, proxy: false, lab: true, open: true, externalAddressRequired: true }); - expect(result).toEqual({ ...defaults, livereload: false, proxy: false, lab: true, open: true, externalAddressRequired: true }); + const result = runner.createOptionsFromCommandLine([], { _: [], livereload: false, proxy: false, open: true, externalAddressRequired: true }); + expect(result).toEqual({ ...defaults, livereload: false, proxy: false, open: true, externalAddressRequired: true }); }); it('should allow overrides of default values', () => { diff --git a/packages/@ionic/cli/src/lib/project/angular/__tests__/serve.ts b/packages/@ionic/cli/src/lib/project/angular/__tests__/serve.ts index 3c369e4a72..dbfe0e850c 100644 --- a/packages/@ionic/cli/src/lib/project/angular/__tests__/serve.ts +++ b/packages/@ionic/cli/src/lib/project/angular/__tests__/serve.ts @@ -17,9 +17,6 @@ describe('@ionic/cli', () => { browserOption: undefined, engine: 'browser', externalAddressRequired: false, - lab: false, - labHost: 'localhost', - labPort: 8200, livereload: true, open: false, port: 8100, @@ -38,8 +35,8 @@ describe('@ionic/cli', () => { it('should provide options from negations of cli flag defaults', () => { const runner = new AngularServeRunner({} as any); - const result = runner.createOptionsFromCommandLine([], { _: [], livereload: false, proxy: false, lab: true, open: true, externalAddressRequired: true }); - expect(result).toEqual({ ...defaults, livereload: false, proxy: false, lab: true, open: true, externalAddressRequired: true }); + const result = runner.createOptionsFromCommandLine([], { _: [], livereload: false, proxy: false, open: true, externalAddressRequired: true }); + expect(result).toEqual({ ...defaults, livereload: false, proxy: false, open: true, externalAddressRequired: true }); }); it('should allow overrides of default values', () => { diff --git a/packages/@ionic/cli/src/lib/serve.ts b/packages/@ionic/cli/src/lib/serve.ts index 0027a043cc..8f63bcfb4a 100644 --- a/packages/@ionic/cli/src/lib/serve.ts +++ b/packages/@ionic/cli/src/lib/serve.ts @@ -2,7 +2,7 @@ import { BaseError, MetadataGroup, ParsedArgs, unparseArgs } from '@ionic/cli-fr import { LOGGER_LEVELS, createPrefixedFormatter } from '@ionic/cli-framework-output'; import { PromptModule } from '@ionic/cli-framework-prompts'; import { str2num } from '@ionic/cli-framework/utils/string'; -import { NetworkInterface, findClosestOpenPort, getExternalIPv4Interfaces, isHostConnectable } from '@ionic/utils-network'; +import { NetworkInterface, getExternalIPv4Interfaces, isHostConnectable } from '@ionic/utils-network'; import { createProcessEnv, killProcessTree, onBeforeExit, processExit } from '@ionic/utils-process'; import * as chalk from 'chalk'; import * as Debug from 'debug'; @@ -11,7 +11,7 @@ import * as lodash from 'lodash'; import * as split2 from 'split2'; import * as stream from 'stream'; -import { CommandLineInputs, CommandLineOptions, CommandMetadata, CommandMetadataOption, IConfig, ILogger, IProject, IShell, IonicEnvironmentFlags, LabServeDetails, NpmClient, Runner, ServeDetails, ServeOptions } from '../definitions'; +import { CommandLineInputs, CommandLineOptions, CommandMetadata, CommandMetadataOption, IConfig, ILogger, IProject, IShell, IonicEnvironmentFlags, NpmClient, Runner, ServeDetails, ServeOptions } from '../definitions'; import { ancillary, input, strong, weak } from './color'; import { FatalException, ServeCLIProgramNotFoundException } from './errors'; @@ -25,7 +25,6 @@ const debug = Debug('ionic:lib:serve'); export const DEFAULT_DEV_LOGGER_PORT = 53703; export const DEFAULT_LIVERELOAD_PORT = 35729; export const DEFAULT_SERVER_PORT = 8100; -export const DEFAULT_LAB_PORT = 8200; export const DEFAULT_DEVAPP_COMM_PORT = 53233; export const DEFAULT_ADDRESS = 'localhost'; @@ -138,7 +137,6 @@ export abstract class ServeRunner implements Runner implements Runner implements Runner `${details.protocol}://${host}:${details.port}`; - const labHost = labDetails ? `http://${labDetails.host}:${labDetails.port}` : undefined; this.e.log.nl(); this.e.log.info( `Development server running!` + - (labHost ? `\nLab: ${strong(labHost)}` : '') + `\nLocal: ${strong(localAddress)}` + (details.externalNetworkInterfaces.length > 0 ? `\nExternal: ${details.externalNetworkInterfaces.map(v => strong(fmtExternalAddress(v.address))).join(', ')}` : '') + `\n\n${chalk.yellow('Use Ctrl+C to quit this process')}` @@ -212,7 +204,7 @@ export abstract class ServeRunner implements Runner implements Runner { - const labDetails: LabServeDetails = { - projectType: this.e.project.type, - host: options.labHost, - port: await findClosestOpenPort(options.labPort), - }; - - const lab = new IonicLabServeCLI(this.e); - await lab.serve({ serveDetails, ...labDetails }); - - return labDetails; - } - async selectExternalIP(options: T): Promise<[string, NetworkInterface[]]> { let availableInterfaces: NetworkInterface[] = []; let chosenIP = options.host; @@ -647,37 +626,3 @@ export class YarnServeCLI extends PkgManagerServeCLI { readonly program = 'yarn'; readonly prefix = 'yarn'; } - -interface IonicLabServeCLIOptions extends Readonly { - readonly serveDetails: Readonly; -} - -class IonicLabServeCLI extends ServeCLI { - readonly name = 'Ionic Lab'; - readonly pkg = '@ionic/lab'; - readonly program = 'ionic-lab'; - readonly prefix = 'lab'; - readonly script = undefined; - - protected stdoutFilter(line: string): boolean { - if (line.includes('running')) { - this.emit('ready'); - } - - return false; // no stdout - } - - protected async buildArgs(options: IonicLabServeCLIOptions): Promise { - const { serveDetails, ...labDetails } = options; - - const pkg = await this.e.project.requirePackageJson(); - - const url = `${serveDetails.protocol}://localhost:${serveDetails.port}`; - const appName = this.e.project.config.get('name'); - const labArgs = [url, '--host', labDetails.host, '--port', String(labDetails.port), '--project-type', labDetails.projectType]; - const nameArgs = appName ? ['--app-name', appName] : []; - const versionArgs = pkg.version ? ['--app-version', pkg.version] : []; - - return [...labArgs, ...nameArgs, ...versionArgs]; - } -} diff --git a/packages/@ionic/lab/.gitignore b/packages/@ionic/lab/.gitignore deleted file mode 100644 index 796a78ed1b..0000000000 --- a/packages/@ionic/lab/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.stencil -www -bin/ionic-lab.* diff --git a/packages/@ionic/lab/.npmrc b/packages/@ionic/lab/.npmrc deleted file mode 100644 index 43c97e719a..0000000000 --- a/packages/@ionic/lab/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false diff --git a/packages/@ionic/lab/CHANGELOG.md b/packages/@ionic/lab/CHANGELOG.md deleted file mode 100644 index e4f55793ea..0000000000 --- a/packages/@ionic/lab/CHANGELOG.md +++ /dev/null @@ -1,625 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [3.2.15](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.14...@ionic/lab@3.2.15) (2022-10-06) - - -### Bug Fixes - -* **cli:** capacitor commands not working ([#4918](https://github.com/ionic-team/ionic-cli/issues/4918)) ([27b958b](https://github.com/ionic-team/ionic-cli/commit/27b958bdf22c37f962d705a1b8ba1fee78b59c42)) - - - - - -## [3.2.14](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.13...@ionic/lab@3.2.14) (2022-09-29) - - -### Bug Fixes - -* **cli:** capacitor config not being read from multi-project directories ([#4909](https://github.com/ionic-team/ionic-cli/issues/4909)) ([0ab4881](https://github.com/ionic-team/ionic-cli/commit/0ab4881736f0d3b967d12802cb9cd01ba24d2088)) - - - - - -## [3.2.13](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.12...@ionic/lab@3.2.13) (2022-06-16) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.2.12](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.11...@ionic/lab@3.2.12) (2022-05-09) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.2.11](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.10...@ionic/lab@3.2.11) (2022-03-04) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.2.10](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.9...@ionic/lab@3.2.10) (2020-12-10) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.2.9](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.8...@ionic/lab@3.2.9) (2020-09-29) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.2.8](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.7...@ionic/lab@3.2.8) (2020-09-24) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.2.7](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.6...@ionic/lab@3.2.7) (2020-09-02) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.2.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.5...@ionic/lab@3.2.6) (2020-08-29) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.2.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.4...@ionic/lab@3.2.5) (2020-08-28) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.2.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.3...@ionic/lab@3.2.4) (2020-08-27) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.2.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.2...@ionic/lab@3.2.3) (2020-08-27) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.2.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.1...@ionic/lab@3.2.2) (2020-08-26) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.2.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.2.0...@ionic/lab@3.2.1) (2020-08-25) - -**Note:** Version bump only for package @ionic/lab - - - - - -# [3.2.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.1.7...@ionic/lab@3.2.0) (2020-08-12) - - -### Features - -* **lab:** improvements to the lab design ([#4511](https://github.com/ionic-team/ionic-cli/issues/4511)) ([625fe7b](https://github.com/ionic-team/ionic-cli/commit/625fe7b894a47837c33dfe2b8363a491f57ecbda)) - - - - - -## [3.1.7](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.1.6...@ionic/lab@3.1.7) (2020-06-02) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.1.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.1.5...@ionic/lab@3.1.6) (2020-05-12) - - -### Bug Fixes - -* pin tslib to avoid "Cannot set property pathExists" error ([689e1f0](https://github.com/ionic-team/ionic-cli/commit/689e1f038b907356ef855a067a76d4822e7072a8)) - - - - - -## [3.1.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.1.4...@ionic/lab@3.1.5) (2020-05-06) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.1.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.1.3...@ionic/lab@3.1.4) (2020-04-29) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.1.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.1.2...@ionic/lab@3.1.3) (2020-03-30) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.1.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.1.1...@ionic/lab@3.1.2) (2020-03-09) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.1.0...@ionic/lab@3.1.1) (2020-03-03) - -**Note:** Version bump only for package @ionic/lab - - - - - -# 3.1.0 (2020-02-11) - - -### Features - -* **start:** add new list starter option ([#4315](https://github.com/ionic-team/ionic-cli/issues/4315)) ([1df44c1](https://github.com/ionic-team/ionic-cli/commit/1df44c1591f37b89f2b672857740edd6cb2aea67)) - - - - - -## [3.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.0.1...@ionic/lab@3.0.2) (2020-02-10) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [3.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@3.0.0...@ionic/lab@3.0.1) (2020-02-03) - -**Note:** Version bump only for package @ionic/lab - - - - - -# [3.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.19...@ionic/lab@3.0.0) (2020-01-25) - - -### chore - -* require Node 10 ([5a47874](https://github.com/ionic-team/ionic-cli/commit/5a478746c074207b6dc96aa8771f04a606deb1ef)) - - -### BREAKING CHANGES - -* A minimum of Node.js 10.3.0 is required. - - - - - -## [2.0.19](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.18...@ionic/lab@2.0.19) (2020-01-13) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.18](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.17...@ionic/lab@2.0.18) (2019-12-10) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.17](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.16...@ionic/lab@2.0.17) (2019-12-05) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.16](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.15...@ionic/lab@2.0.16) (2019-11-25) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.15](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.14...@ionic/lab@2.0.15) (2019-11-24) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.14](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.13...@ionic/lab@2.0.14) (2019-11-21) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.13](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.12...@ionic/lab@2.0.13) (2019-10-14) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.12](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.11...@ionic/lab@2.0.12) (2019-10-14) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.11](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.10...@ionic/lab@2.0.11) (2019-09-18) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.10](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.9...@ionic/lab@2.0.10) (2019-08-28) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.9](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.8...@ionic/lab@2.0.9) (2019-08-23) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.8](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.7...@ionic/lab@2.0.8) (2019-08-14) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.7](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.6...@ionic/lab@2.0.7) (2019-08-07) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.5...@ionic/lab@2.0.6) (2019-07-09) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.4...@ionic/lab@2.0.5) (2019-06-28) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.3...@ionic/lab@2.0.4) (2019-06-21) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.2...@ionic/lab@2.0.3) (2019-06-18) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.1...@ionic/lab@2.0.2) (2019-06-10) - -**Note:** Version bump only for package @ionic/lab - - - - - -## [2.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@2.0.0...@ionic/lab@2.0.1) (2019-06-05) - -**Note:** Version bump only for package @ionic/lab - - - - - -# [2.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.24...@ionic/lab@2.0.0) (2019-05-29) - - -### chore - -* require Node 8 ([5670e68](https://github.com/ionic-team/ionic-cli/commit/5670e68)) - - -### BREAKING CHANGES - -* A minimum of Node.js 8.9.4 is required. - - - - - - -## [1.0.24](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.23...@ionic/lab@1.0.24) (2019-03-12) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.23](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.22...@ionic/lab@1.0.23) (2019-03-06) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.22](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.21...@ionic/lab@1.0.22) (2019-02-27) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.21](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.20...@ionic/lab@1.0.21) (2019-02-15) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.20](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.19...@ionic/lab@1.0.20) (2019-01-29) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.19](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.18...@ionic/lab@1.0.19) (2019-01-23) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.18](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.17...@ionic/lab@1.0.18) (2019-01-08) - - -### Bug Fixes - -* **lab:** iframe now needs allow policy ([487b82a](https://github.com/ionic-team/ionic-cli/commit/487b82a)) - - - - - -## [1.0.17](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.16...@ionic/lab@1.0.17) (2019-01-07) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.16](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.15...@ionic/lab@1.0.16) (2018-12-19) - - -### Bug Fixes - -* **lab:** correct statusbar position ([#3766](https://github.com/ionic-team/ionic-cli/issues/3766)) ([b37fa03](https://github.com/ionic-team/ionic-cli/commit/b37fa03)) -* **lab:** default cursor for platform titles ([b215beb](https://github.com/ionic-team/ionic-cli/commit/b215beb)) -* **lab:** improve dev experience on smaller screens ([45a6c58](https://github.com/ionic-team/ionic-cli/commit/45a6c58)) -* **lab:** statusbar padding for all versions ([4fa13a3](https://github.com/ionic-team/ionic-cli/commit/4fa13a3)) - - - - - -## [1.0.15](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.14...@ionic/lab@1.0.15) (2018-11-27) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.14](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.13...@ionic/lab@1.0.14) (2018-11-20) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.13](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.12...@ionic/lab@1.0.13) (2018-11-04) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.12](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.11...@ionic/lab@1.0.12) (2018-10-31) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.11](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.10...@ionic/lab@1.0.11) (2018-10-05) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.10](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.9...@ionic/lab@1.0.10) (2018-10-03) - - -### Bug Fixes - -* **lab:** proper statusbar padding ([63b0eef](https://github.com/ionic-team/ionic-cli/commit/63b0eef)) -* **lab:** use correct query params for project type ([4801680](https://github.com/ionic-team/ionic-cli/commit/4801680)) -* **serve:** persist config for livereload ([27193e8](https://github.com/ionic-team/ionic-cli/commit/27193e8)) - - - - - -## [1.0.9](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.8...@ionic/lab@1.0.9) (2018-09-05) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.8](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.7...@ionic/lab@1.0.8) (2018-08-20) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.7](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.6...@ionic/lab@1.0.7) (2018-08-15) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.5...@ionic/lab@1.0.6) (2018-08-09) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.5](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.4...@ionic/lab@1.0.5) (2018-08-07) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.3...@ionic/lab@1.0.4) (2018-08-07) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.2...@ionic/lab@1.0.3) (2018-08-06) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.1...@ionic/lab@1.0.2) (2018-08-02) - - - - -**Note:** Version bump only for package @ionic/lab - - -## [1.0.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.0...@ionic/lab@1.0.1) (2018-07-30) - - - - -**Note:** Version bump only for package @ionic/lab - - -# [1.0.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/lab@1.0.0-rc.13...@ionic/lab@1.0.0) (2018-07-25) - - - - -**Note:** Version bump only for package @ionic/lab diff --git a/packages/@ionic/lab/LICENSE b/packages/@ionic/lab/LICENSE deleted file mode 100644 index 7c5808ced6..0000000000 --- a/packages/@ionic/lab/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Drifty Co - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/packages/@ionic/lab/README.md b/packages/@ionic/lab/README.md deleted file mode 100644 index d4f290bc38..0000000000 --- a/packages/@ionic/lab/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Ionic Lab - -Stand-alone Ionic Lab package, a utility used by `ionic serve --lab`. - -Once installed, invoke serve on your framework CLI of choice. Then, copy the -URL of that server and invoke the Ionic Lab CLI. For example: - -```bash -$ ionic-lab http://localhost:4200 -``` diff --git a/packages/@ionic/lab/bin/ionic-lab b/packages/@ionic/lab/bin/ionic-lab deleted file mode 100755 index 7548c3d0b0..0000000000 --- a/packages/@ionic/lab/bin/ionic-lab +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - -process.title = 'ionic-lab'; -process.on('unhandledRejection', function(r) { console.error(r); }); - -var semver = require('semver'); -var version = semver.parse(process.version); -var minversion = 'v10.3.0'; - -if (semver.lt(version, minversion)) { - var details = version.major === 6 - ? ' Node.js 6 reached end-of-life on 2019-04-30 and is no longer supported.' - : version.major === 8 - ? ' Node.js 8 reached end-of-life on 2019-12-31 and is no longer supported.' - : ''; - - process.stderr.write('ERR: Your Node.js version is ' + version.raw + '.' + details + ' Please update to the latest Node LTS version.\n'); - process.exit(1); -} - -var cli = require('../'); -cli.run(process.argv.slice(2), process.env); diff --git a/packages/@ionic/lab/jest.config.js b/packages/@ionic/lab/jest.config.js deleted file mode 100644 index eace8d6d9d..0000000000 --- a/packages/@ionic/lab/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../jest.config.base'); diff --git a/packages/@ionic/lab/lint-staged.config.js b/packages/@ionic/lab/lint-staged.config.js deleted file mode 100644 index 5815a72f0d..0000000000 --- a/packages/@ionic/lab/lint-staged.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../../lint-staged.config.base'); diff --git a/packages/@ionic/lab/package.json b/packages/@ionic/lab/package.json deleted file mode 100644 index 52830fc72b..0000000000 --- a/packages/@ionic/lab/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "@ionic/lab", - "version": "3.2.15", - "description": "Ionic Lab utility for developing Ionic apps, used by Ionic CLI", - "bin": { - "ionic-lab": "./bin/ionic-lab" - }, - "main": "dist/index.js", - "types": "dist/index.d.ts", - "homepage": "https://ionicframework.com/", - "author": "Ionic Team (https://ionic.io)", - "license": "MIT", - "engines": { - "node": ">=10.3.0" - }, - "files": [ - "bin/", - "dist/", - "www/", - "LICENSE", - "README.md" - ], - "repository": { - "type": "git", - "url": "https://github.com/ionic-team/ionic-cli.git" - }, - "bugs": { - "url": "https://github.com/ionic-team/ionic-cli/issues" - }, - "scripts": { - "clean": "npm run clean.tsc", - "clean.tsc": "rimraf dist", - "clean.stencil": "rimraf www", - "lint": "true", - "build": "npm run build.tsc && npm run build.stencil", - "build.stencil": "npm run clean.stencil && stencil build", - "build.tsc": "npm run clean.tsc && tsc", - "watch": "npm run watch.tsc", - "watch.stencil": "npm run clean.stencil && stencil build --dev --watch --serve --address localhost --port 8900 --no-open", - "watch.tsc": "tsc -w --preserveWatchOutput", - "prepublishOnly": "npm run build" - }, - "dependencies": { - "@ionic/cli-framework": "5.1.3", - "@ionic/utils-fs": "3.1.6", - "chalk": "^4.0.0", - "express": "^4.16.2", - "tslib": "^2.0.1" - }, - "devDependencies": { - "@ionic-internal/ionic-ds": "^2.1.0", - "@stencil/core": "~1.8.5", - "@types/express": "4.17.13", - "@types/express-serve-static-core": "4.17.28", - "@types/node": "~10.17.13", - "lint-staged": "^10.0.2", - "rimraf": "^3.0.0", - "typescript": "~4.0.2" - } -} diff --git a/packages/@ionic/lab/src/index.ts b/packages/@ionic/lab/src/index.ts deleted file mode 100644 index 3bfa7686ba..0000000000 --- a/packages/@ionic/lab/src/index.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { Command, CommandLineInputs, CommandLineOptions, CommandMap, CommandMapDefault, Namespace, execute, validators } from '@ionic/cli-framework'; -import { readFile } from '@ionic/utils-fs'; -import * as chalk from 'chalk'; -import * as express from 'express'; -import * as http from 'http'; -import * as https from 'https'; -import * as path from 'path'; -import * as tls from 'tls'; - -const WWW_DIRECTORY = path.join(__dirname, '..', 'www'); - -class DefaultCommand extends Command { - async getMetadata() { - return { - name: 'default', - summary: '', - inputs: [ - { - name: 'url', - summary: 'The URL of the livereload server to use with lab', - validators: [validators.required, validators.url], - }, - ], - options: [ - { - name: 'host', - summary: 'HTTP host of Ionic Lab', - default: 'localhost', - }, - { - name: 'port', - summary: 'HTTP port of Ionic Lab', - default: '8200', - }, - { - name: 'project-type', - summary: 'Ionic project type', - }, - { - name: 'ssl', - summary: 'Host Ionic Lab with HTTPS', - type: Boolean, - }, - { - name: 'ssl-key', - summary: 'Path to SSL key', - }, - { - name: 'ssl-cert', - summary: 'Path to SSL certificate', - }, - { - name: 'app-name', - summary: 'App name to show in bottom left corner', - }, - { - name: 'app-version', - summary: 'App version to show in bottom left corner', - }, - ], - }; - } - - async run(inputs: CommandLineInputs, options: CommandLineOptions) { - const [ url ] = inputs; - const { host, port, ssl } = options; - - const protocol = ssl ? 'https' : 'http'; - const projectType = options['project-type']; - const name = options['app-name']; - const version = options['app-version']; - - const app = express(); - - app.use('/', express.static(WWW_DIRECTORY)); - - app.get('/api/app', (req, res) => { - res.json({ url, name, version, projectType }); - }); - - const server = ssl ? https.createServer(await this.collectSecureContextOptions(options), app) : http.createServer(app); - server.listen({ port, host }); - - const labUrl = `${protocol}://${host}:${port}`; - - server.on('listening', () => { - process.stdout.write( - 'Ionic Lab running!\n' + - `Lab: ${chalk.bold(labUrl)}\n` + - `App: ${chalk.bold(url)}\n` - ); - }); - } - - async collectSecureContextOptions(options: CommandLineOptions): Promise { - const sslKeyPath = options['ssl-key'] ? String(options['ssl-key']) : undefined; - const sslCertPath = options['ssl-cert'] ? String(options['ssl-cert']) : undefined; - - if (!sslKeyPath || !sslCertPath) { - throw new Error('SSL key and cert required for serving SSL'); - } - - const [ key, cert ] = await Promise.all([this.readPem(sslKeyPath), this.readPem(sslCertPath)]); - - return { key, cert }; - } - - async readPem(p: string): Promise { - try { - return await readFile(p, { encoding: 'utf8' }); - } catch (e) { - process.stderr.write(String(e.stack ? e.stack : e) + '\n'); - throw new Error(`Error encountered with ${p}`); - } - } -} - -class LabNamespace extends Namespace { - async getMetadata() { - return { - name: 'ionic-lab', - summary: '', - }; - } - - async getCommands(): Promise { - return new CommandMap([[CommandMapDefault, async () => new DefaultCommand(this)]]); - } -} - -const namespace = new LabNamespace(); - -export async function run(argv: string[], env: NodeJS.ProcessEnv) { - await execute({ namespace, argv, env }); -} diff --git a/packages/@ionic/lab/src/stencil/.gitignore b/packages/@ionic/lab/src/stencil/.gitignore deleted file mode 100644 index dd449725e1..0000000000 --- a/packages/@ionic/lab/src/stencil/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.md diff --git a/packages/@ionic/lab/src/stencil/assets/android-device-skin.png b/packages/@ionic/lab/src/stencil/assets/android-device-skin.png deleted file mode 100644 index d31f1cc511cfdcb0f9033be19169bf1c5a3e26ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12184 zcmeI2`CpP*-^VW~b;{D|uE|M5Tkg@j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0JI3Sqp2s4XMXH1Q)jLHn%V*df-T@NMz diff --git a/packages/@ionic/lab/src/stencil/assets/app.css b/packages/@ionic/lab/src/stencil/assets/app.css deleted file mode 100644 index 620a151685..0000000000 --- a/packages/@ionic/lab/src/stencil/assets/app.css +++ /dev/null @@ -1,131 +0,0 @@ -html, -body { - height: 100%; -} - -body { - -webkit-font-smoothing: antialiased; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - font-weight: normal; -} - -a { - color: var(--font-color); -} - -a:hover { - text-decoration: none; - color: var(--font-color); -} - -ionlab-app { - display: flex; - flex-direction: column; - height: 100%; -} - -header { - background: var(--section-bg); - height: 50px; - line-height: 50px; - font-size: var(--font-size-sm); - font-weight: bold; - color: var(--icon-color); -} - -header .icon { - display: inline-block; - vertical-align: middle; - margin-top: -3px; - font-size: 22px; - color: var(--icon-color); - cursor: pointer; -} - -#logo { - display: inline-block; - vertical-align: middle; - background: url('lab-logo.png'); - background-size: 100%; - background-repeat: no-repeat; - margin-top: -2px; - width: 64px; - height: 28px; - margin-left: 15px; -} - -#header-left { - float: left; -} - -#header-left .menu-icon { - margin-left: 13px; -} - -#header-right { - float: right; -} - -#header-right button { - display: inline-block; - height: 100%; - background: none; - border: none; - outline: none; - margin: 0; - padding: 0 10px; - cursor: pointer; - color: var(--icon-color); - font-weight: bold; -} - -#header-right .fullscreen-icon { - margin-left: 5px; -} - -main { - color: var(--font-color); - display: flex; - flex: 1; - overflow: hidden; -} - -footer { - width: 100%; - border-top: 1px solid rgba(0, 0, 0, 0.06); - background: var(--section-bg); - font-size: var(--font-size-sm); - color: var(--font-color); -} - -#footer-left { - float: left; - padding: 14px 0 14px 15px; -} - -#footer-right { - float: right; - padding: 14px 15px 14px 5px; -} - -#footer-right a { - font-family: var(--font-family-medium); - margin-left: 10px; -} - -#error-box { - width: 500px; - align-self: center; - justify-content: center; - text-align: center; - background: var(--section-bg); - padding: 25px; - margin: 100px 0; -} diff --git a/packages/@ionic/lab/src/stencil/assets/favicon.png b/packages/@ionic/lab/src/stencil/assets/favicon.png deleted file mode 100644 index 7469634d5a7f4a3b1be7a2bd7e5a765944a6ea14..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4256 zcmXw6cRbbK8~@yU?Y*)xBU#xynO&=JLq>LAN>-$zGA^lH+|2B__Q=TITx6zfB0>ns zzOtR)?fd)v&g(hPdCqg*@Anz6^Us4p8R^neaZ*7LM60iN&4f7O|8@!l(L2M_N&-0S$f=4F*O;77?HMca`Xg%Kyz6=loBQ zs6aGgBU1kA=Kz&gz$p8#xYEmikAViN7@(i_m#&uru0{ZzBw+9kXukz=fj}h;XvKgV zIB-23T+aZ=guffrzYoPo15u<-{Ro`Ah0u(AWz2w>|E z__+=CkHO9Xm|g>FVL&$?9G`&Mb+E7rrdGktbkI5tYR5qS7m)QCJgx%wih))HnBM@S z%bEaRfNcj+ z&A_`HxPAbSOTiN&G94JkgMkI`egt@yg4>zEG7X@Tz~M3Yz6NT(g3=*SJ_wRK!0RRu zQ4aztL0}^=&jb%%uxJzimeL~=BU8wLcZQns$Jzo5%g#({>TUA1C!V@rjcEu3!uI%3 zcXv}=LB8(;8w(+!q4@Z<*2cQ%=qK*Tx>^-GLL~A3w(4KgH1nHUdbh7_YQfU|!mMPB zuDW{6)z@vGC+d|6`EA#WW5edDNFg!)P{>h`q@9NE`DXLJS;B>|Gi%zgrIy8+#Kh;D z*-zK^?@?@aG%ieUDl1zoY7hAPoGd6B@v81E)M#a_u+>VqukF-iO&`sas82U|FLY&i zp6*SIdCW9D-Cgc(sL9RXSyQZ)@L2m%bD>7id(EQu!i>scZ;Wh40O9c!Uha!PX(3l%e$~y=(|f zAMOUz@Uf~N!`Eu|jt(`*DW0w~eA=Q{<2``*b#ct|FY*VdVSJ1D;}6U9%w$mLT=JY$ zCKSr$m_#nw#3RIoj-F_m$Xad>C1Kbpo;W)vB#vf?;`W$z%!D-=*xyj6XXe!CNhQDp zRngIv8YF}&1{mFM9`83VDH-_|-vxb%B7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(y#>Q$Qz0+Mn_+&q^a_*d_NOsv`+u+*qmg{-osfLv=ZCaiJKgqk z!k|NHaGe3^?y?8-IRdFnUCra8Y=+h3S0JCruL@h#`nd#xVl6R4tSXD@xqiH~Tfib^ zW*br>IHxd|={Bj?clrX<{ts4TO~J8hl0x=hO!4Q_7zog}qnd68*1v$sub9hW;3%>5 zASG%4olINLM$(676~@FL1EmH|4p2}(JQp#@!S%T38uR|!c{T8$3Zo*>BB4TV6(js` zF<9{fU`4uCv_{T{i9c-N)%#|D@GqkCtySX}VUW)l(4Z5Zy5RXK6Efkh6rW|a{55$^ zZUZI3W7SG`Kl)Jl-?CLTNr!&+Sy^h)ec@%gwGu7}v)2Xzce=We`Gq?K{_eJ8%esYO z1X-H43CiM}Ly6JFSz V$dsK=Amt2z^Jm;nlTM-T{6AG4+rt0= diff --git a/packages/@ionic/lab/src/stencil/assets/lab-logo.png b/packages/@ionic/lab/src/stencil/assets/lab-logo.png deleted file mode 100644 index 7e7b5ad49b84941dcb9ff75b9ffe64c71e1e119a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1900 zcmeH{`#aMM9LK-gFu9wJosl%UtH-@K%5_*ANpnrL&UECiAv3qH6r+6!jyUe6 zl-tBk?w4}hl*Rq?A>?vO*n!Xqe=)aaPlI57U+gCtt=qtw6XX<6AhPjmC~pA{56FRrYrepUDS zO+yQ-^?lpFA38d_dwTo&2R?op`fqe>eB$%;%-lR@;mhLE*KgdF)ivJw#wLGjdq=SQ zV{hN~;0_J|#Jup<76b}}J+>S5iJgu_;0dCsqWQLgOTBqUt-5{6K z(4iCcl^BvH$)}37ZY4d)_#81kTEk3%^d?kaGl_No8WiX`I5b|zA9$k@|Mf1@r=(TJ z%(D*MQmX!wyQ)>iX&%g?6HBayXNmxo;n;k#(ggoYHIM=sdC1wshdhlDlI@8xaN7HM+tYpP4vA%SrTIaC_+ z$Zw;L+W$nee277&_yz8Rg*k~b3K)IRA+galXzH1OG6UA8sKrQR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ugL4wfX_{VbIj^5F#e;s|u)e9E2>@VGCfaZo+D5nISx@^b2K8|zXHB!`drMqr z^A_^kY~FC2rO^K+l}TlKlOkojQTltB)_ET4@+};<(KE|_S)zWsAKY6$w6h)fP}RG& ze5y<@p7~W+5c#mE~Ub=Sh;RX5eu4Q@|)(0z8qipEiZwc*jow0k) zO(@^`-2ROY2N}b9SpWcFOUlq)?biG?oA+rSE?9O@3-EQ<>G7)XN^dN<3+n&??1-cE zSZxs>ra*tNVA;LvF&3zw3{{R5I5oJs6Hv38M zSHkyQW%_Xn?RO19JsM<>t?`HTjF*N9j~ApC3ocsS{oq~+w!3fSg8mG|jW$vfk)yT@_zjSD9*m_IJ>)J&w(pHY<}VBvaRBIDnF%A9z*{)&-2qCGt7snjDKIPv$ut=G5`Q<$~JpioThS@&F|6k zQqvUni)=m|;M3~!O-3$4hwnM@>&e`*Xh0E9atw_-bhy& z0D$-DJ+!oT3GML$)M?A~xZY{ydd8x02R}AuPx`p_v2$>LrCnm;4j;C>w#rT&)cQ01 z-~v?ufS%4Y=0h$X)G}RG%XO1f%FrHL#P3_OUpa5|HO+IJ^5AdTybH{2_IR_UvIRX( zzu5HlztbPnO7i<-BG1FHa0& zaQ~iOuV=j23V#uf-Oa{NT)KW>!kN#%wMie-<65SN`hM(K-{FE;ipujrDi7%(J^6w) zob@$*AqziC0Km32^pe<0HM*RzER(&m$5!-%ta-fkrg_WYUfzIdTFHWO`p@a_KT}qm zF0&1l`cC>7CNh8Hhm7th>V00000NkvXXu0mjf<6wc} diff --git a/packages/@ionic/lab/src/stencil/components.d.ts b/packages/@ionic/lab/src/stencil/components.d.ts deleted file mode 100644 index de4ee29cc3..0000000000 --- a/packages/@ionic/lab/src/stencil/components.d.ts +++ /dev/null @@ -1,131 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/** - * This is an autogenerated file created by the Stencil compiler. - * It contains typing information for all components that exist in this project. - */ - - -import { HTMLStencilElement, JSXBase } from '@stencil/core/internal'; - - -export namespace Components { - interface IonlabApp {} - interface IonlabDeviceFrame { - 'icon': string; - 'platform': string; - 'platformName': string; - 'url': string; - } - interface IonlabPlatformDropdown { - 'activePlatforms': string[]; - } - interface IonlabPreview { - 'activeDevices': string[]; - 'projectType'?: string; - 'url'?: string; - } - interface IonlabSidebar { - 'visible': boolean; - } - interface SkFadingCircle {} -} - -declare global { - - - interface HTMLIonlabAppElement extends Components.IonlabApp, HTMLStencilElement {} - var HTMLIonlabAppElement: { - prototype: HTMLIonlabAppElement; - new (): HTMLIonlabAppElement; - }; - - interface HTMLIonlabDeviceFrameElement extends Components.IonlabDeviceFrame, HTMLStencilElement {} - var HTMLIonlabDeviceFrameElement: { - prototype: HTMLIonlabDeviceFrameElement; - new (): HTMLIonlabDeviceFrameElement; - }; - - interface HTMLIonlabPlatformDropdownElement extends Components.IonlabPlatformDropdown, HTMLStencilElement {} - var HTMLIonlabPlatformDropdownElement: { - prototype: HTMLIonlabPlatformDropdownElement; - new (): HTMLIonlabPlatformDropdownElement; - }; - - interface HTMLIonlabPreviewElement extends Components.IonlabPreview, HTMLStencilElement {} - var HTMLIonlabPreviewElement: { - prototype: HTMLIonlabPreviewElement; - new (): HTMLIonlabPreviewElement; - }; - - interface HTMLIonlabSidebarElement extends Components.IonlabSidebar, HTMLStencilElement {} - var HTMLIonlabSidebarElement: { - prototype: HTMLIonlabSidebarElement; - new (): HTMLIonlabSidebarElement; - }; - - interface HTMLSkFadingCircleElement extends Components.SkFadingCircle, HTMLStencilElement {} - var HTMLSkFadingCircleElement: { - prototype: HTMLSkFadingCircleElement; - new (): HTMLSkFadingCircleElement; - }; - interface HTMLElementTagNameMap { - 'ionlab-app': HTMLIonlabAppElement; - 'ionlab-device-frame': HTMLIonlabDeviceFrameElement; - 'ionlab-platform-dropdown': HTMLIonlabPlatformDropdownElement; - 'ionlab-preview': HTMLIonlabPreviewElement; - 'ionlab-sidebar': HTMLIonlabSidebarElement; - 'sk-fading-circle': HTMLSkFadingCircleElement; - } -} - -declare namespace LocalJSX { - interface IonlabApp {} - interface IonlabDeviceFrame { - 'icon'?: string; - 'platform'?: string; - 'platformName'?: string; - 'url'?: string; - } - interface IonlabPlatformDropdown { - 'activePlatforms'?: string[]; - 'onIonlabPlatformToggled'?: (event: CustomEvent) => void; - } - interface IonlabPreview { - 'activeDevices'?: string[]; - 'projectType'?: string; - 'url'?: string; - } - interface IonlabSidebar { - 'onIonlabSidebarCloseClicked'?: (event: CustomEvent) => void; - 'visible'?: boolean; - } - interface SkFadingCircle {} - - interface IntrinsicElements { - 'ionlab-app': IonlabApp; - 'ionlab-device-frame': IonlabDeviceFrame; - 'ionlab-platform-dropdown': IonlabPlatformDropdown; - 'ionlab-preview': IonlabPreview; - 'ionlab-sidebar': IonlabSidebar; - 'sk-fading-circle': SkFadingCircle; - } -} - -export { LocalJSX as JSX }; - - -declare module "@stencil/core" { - export namespace JSX { - interface IntrinsicElements { - 'ionlab-app': LocalJSX.IonlabApp & JSXBase.HTMLAttributes; - 'ionlab-device-frame': LocalJSX.IonlabDeviceFrame & JSXBase.HTMLAttributes; - 'ionlab-platform-dropdown': LocalJSX.IonlabPlatformDropdown & JSXBase.HTMLAttributes; - 'ionlab-preview': LocalJSX.IonlabPreview & JSXBase.HTMLAttributes; - 'ionlab-sidebar': LocalJSX.IonlabSidebar & JSXBase.HTMLAttributes; - 'sk-fading-circle': LocalJSX.SkFadingCircle & JSXBase.HTMLAttributes; - } - } -} - - diff --git a/packages/@ionic/lab/src/stencil/components/ionlab-app/ionlab-app.tsx b/packages/@ionic/lab/src/stencil/components/ionlab-app/ionlab-app.tsx deleted file mode 100644 index 1a338a05ff..0000000000 --- a/packages/@ionic/lab/src/stencil/components/ionlab-app/ionlab-app.tsx +++ /dev/null @@ -1,123 +0,0 @@ -import { Component, Listen, State, h } from '@stencil/core'; - -import { PLATFORM_IOS, PLATFORM_ANDROID } from '../../utils'; - -@Component({ - tag: 'ionlab-app', -}) -export class App { - @State() sidebarVisible: boolean = true; - @State() activeDevices: string[] = [PLATFORM_IOS, PLATFORM_ANDROID]; - @State() details: { url?: string; name?: string; version?: string; projectType?: string; } = {}; - session: string; - - componentWillLoad() { - this.loadAppDetails(); - this.loadLocalStorageState(); - } - - componentWillUpdate() { - this.saveLocalStorageState(); - } - - loadAppDetails() { - const self = this; - const req = new XMLHttpRequest(); - - req.addEventListener('load', function() { - try { - self.details = JSON.parse(this.responseText); - } catch (e) { - console.error('Error loading app details from Ionic Lab API!'); - console.error('Response was:', this.responseText); - } - }); - - req.addEventListener('error', (err) => { - console.error('Error loading app details from Ionic Lab API!'); - console.error('Error was:', err); - }); - - req.open('GET', '/api/app'); - req.send(); - } - - loadLocalStorageState() { - const storedPlatforms = localStorage.getItem('ionic-lab-platforms'); - - if (storedPlatforms) { - this.activeDevices = JSON.parse(storedPlatforms); - } - - const storedSidebarOpen = localStorage.getItem('ionic-lab-sidebar-open'); - - if (storedSidebarOpen) { - this.sidebarVisible = JSON.parse(storedSidebarOpen); - } - } - - saveLocalStorageState() { - localStorage.setItem('ionic-lab-platforms', JSON.stringify(this.activeDevices)); - localStorage.setItem('ionic-lab-sidebar-open', JSON.stringify(this.sidebarVisible)); - } - - @Listen('ionlabSidebarCloseClicked') - sidebarCloseClickedHander(event) { - this.sidebarVisible = false; - } - - @Listen('ionlabPlatformToggled') - ionlabPlatformToggledHandler(event) { - this.togglePlatform(event.detail); - } - - togglePlatform(platform: string) { - const idx = this.activeDevices.indexOf(platform); - const devices = [...this.activeDevices]; - - if (idx >= 0) { - devices.splice(idx, 1); - } else { - devices.push(platform); - } - - this.activeDevices = devices; - } - - render() { - return [ -
-
- this.sidebarVisible = !this.sidebarVisible } /> - -
- -
, -
- - -
, - - ]; - } -} diff --git a/packages/@ionic/lab/src/stencil/components/ionlab-device-frame/ionlab-device-frame.css b/packages/@ionic/lab/src/stencil/components/ionlab-device-frame/ionlab-device-frame.css deleted file mode 100644 index ddf171607e..0000000000 --- a/packages/@ionic/lab/src/stencil/components/ionlab-device-frame/ionlab-device-frame.css +++ /dev/null @@ -1,146 +0,0 @@ -ionlab-device-frame { - display: block; - margin: 0 20px; - vertical-align: middle; -} - -ionlab-device-frame h2 { - font-size: var(--font-size-base); - margin: 1em 0; - vertical-align: middle; - text-align: left; - font-weight: var(--font-weight-bold); - vertical-align: top; - color: #727a87; -} - -ionlab-device-frame h2 .icon { - display: inline-block; - margin-right: 7px; - font-size: var(--font-size-lg); -} - -ionlab-device-frame .frame-container { - position: relative; - width: var(--frame-width); - height: var(--frame-height); - border-radius: 3px; - box-shadow: 0 8px 24px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.16); - overflow: hidden; - - margin: 0; - - background-size: contain; - background-repeat: no-repeat; - - z-index: 1; -} - -ionlab-device-frame .frame-container .statusbar { - position: absolute; - top: 0; - width: var(--frame-width); - height: 20px; - background-size: 100%; - background-repeat: no-repeat; - background-position: center; - border-radius: 3px 3px 0 0; -} - -ionlab-device-frame .frame-container sk-fading-circle, -ionlab-device-frame .frame-container .load-error { - position: absolute; - top: 50%; - left: 50%; - -webkit-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); -} - -ionlab-device-frame .frame-container .load-error { - background: var(--section-bg); - padding: 10px 20px; -} - -ionlab-device-frame .frame-container .load-error p { - margin: 0; -} - -ionlab-device-frame .frame-container iframe { - background: #000; - border: none; - width: 100%; - height: 100%; - - position: absolute; - - top: 0; - left: 0; - - margin: var(--device-frame-width); - - width: calc(100% - var(--device-frame-width) * 2); - height: calc(100% - var(--device-frame-width) * 2); - - border: none; - - overflow: hidden; - - -webkit-mask-image: -webkit-radial-gradient(white, black); - - z-index: 1; -} - -.statusbar-ios, -.statusbar-md { - display: none; -} - -#device-ios .statusbar-ios { - display: block; - fill: #090a0d; - left: 50%; - position: absolute; - top: 12px; - transform: translateX(-50%); - width: 165px; - z-index: 2; -} - -#device-android .statusbar-md { - display: block; - fill: hsla(0,0%,49%,.3); - padding: .5rem 2.2rem; - position: relative; - width: 100%; - z-index: 2; - top: 12px; -} - -#device-ios .frame-container { - background-image: url('/assets/android-device-skin.png'); - border-radius: 44px; -} - -#device-ios .frame-container iframe { - border-radius: 32px; -} - -#device-android .frame-container { - background-image: url('/assets/iphone-device-skin.png'); - border-radius: 54px; -} - -#device-android .frame-container iframe { - border-radius: 38px; -} - -@media only screen and (max-height: 850px) { - ionlab-device-frame h2 { - display: none; - } - - #device-ios .statusbar-ios { - top: 10px; - } -} diff --git a/packages/@ionic/lab/src/stencil/components/ionlab-device-frame/ionlab-device-frame.tsx b/packages/@ionic/lab/src/stencil/components/ionlab-device-frame/ionlab-device-frame.tsx deleted file mode 100644 index 4704ec4232..0000000000 --- a/packages/@ionic/lab/src/stencil/components/ionlab-device-frame/ionlab-device-frame.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { Component, Prop, State, h } from '@stencil/core'; - -@Component({ - tag: 'ionlab-device-frame', - styleUrl: 'ionlab-device-frame.css', -}) -export class DeviceFrame { - @Prop() platform: string; - @Prop() platformName: string; - @Prop() url: string; - @Prop() icon: string; - @State() error: boolean = false; - @State() loaded: boolean = false; - - interval: number; - - componentDidLoad() { - this.interval = window.setInterval(() => { - this.error = this.url ? false : true; - }, 20000); - } - - loadedHandler(event) { - this.loaded = true; - this.error = false; - window.clearInterval(this.interval); - } - - hostData() { - return { - id: `device-${this.platform}`, - }; - } - - render() { - return [ -

{ this.platformName }

, -
-
- - - - - - - - -
- { !this.loaded && !this.error ? : null } - { this.error ?

Load Timeout

Still trying...

: null } -