Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ionic-team/ionic-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @ionic/[email protected]
Choose a base ref
...
head repository: ionic-team/ionic-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @ionic/[email protected]
Choose a head ref
Loading
Showing with 2,299 additions and 456 deletions.
  1. +6 −0 .github/dependabot.yml
  2. +17 −0 .github/workflows/cd.yml
  3. +31 −0 .github/workflows/docker-image.yml
  4. +14 −0 Dockerfile
  5. +19 −0 packages/@ionic/cli-framework-output/CHANGELOG.md
  6. +2 −4 packages/@ionic/cli-framework-output/package.json
  7. +1 −1 packages/@ionic/cli-framework-output/src/utils.ts
  8. +8 −0 packages/@ionic/cli-framework-prompts/CHANGELOG.md
  9. +2 −2 packages/@ionic/cli-framework-prompts/package.json
  10. +27 −0 packages/@ionic/cli-framework/CHANGELOG.md
  11. +5 −5 packages/@ionic/cli-framework/package.json
  12. +9 −2 packages/@ionic/cli-framework/src/lib/config.ts
  13. +280 −0 packages/@ionic/cli/CHANGELOG.md
  14. +67 −2 packages/@ionic/cli/assets/oauth/success/index.html
  15. +10 −12 packages/@ionic/cli/package.json
  16. +5 −9 packages/@ionic/cli/src/commands/capacitor/add.ts
  17. +192 −80 packages/@ionic/cli/src/commands/capacitor/base.ts
  18. +1 −1 packages/@ionic/cli/src/commands/capacitor/build.ts
  19. +1 −1 packages/@ionic/cli/src/commands/capacitor/copy.ts
  20. +186 −90 packages/@ionic/cli/src/commands/capacitor/run.ts
  21. +2 −2 packages/@ionic/cli/src/commands/capacitor/sync.ts
  22. +1 −1 packages/@ionic/cli/src/commands/capacitor/update.ts
  23. +2 −2 packages/@ionic/cli/src/commands/cordova/build.ts
  24. +3 −2 packages/@ionic/cli/src/commands/cordova/run.ts
  25. +17 −10 packages/@ionic/cli/src/commands/deploy/add.ts
  26. +73 −7 packages/@ionic/cli/src/commands/deploy/build.ts
  27. +66 −0 packages/@ionic/cli/src/commands/deploy/capacitor.ts
  28. +1 −0 packages/@ionic/cli/src/commands/deploy/configure.ts
  29. +63 −3 packages/@ionic/cli/src/commands/deploy/core.ts
  30. +78 −5 packages/@ionic/cli/src/commands/deploy/manifest.ts
  31. +1 −1 packages/@ionic/cli/src/commands/generate.ts
  32. +2 −2 packages/@ionic/cli/src/commands/git/remote.ts
  33. +9 −5 packages/@ionic/cli/src/commands/link.ts
  34. +1 −1 packages/@ionic/cli/src/commands/login.ts
  35. +182 −42 packages/@ionic/cli/src/commands/package/build.ts
  36. +5 −3 packages/@ionic/cli/src/commands/package/deploy.ts
  37. +5 −3 packages/@ionic/cli/src/commands/package/index.ts
  38. +60 −2 packages/@ionic/cli/src/commands/start.ts
  39. +29 −9 packages/@ionic/cli/src/definitions.ts
  40. +25 −1 packages/@ionic/cli/src/guards.ts
  41. +1 −1 packages/@ionic/cli/src/lib/color.ts
  42. +2 −2 packages/@ionic/cli/src/lib/index.ts
  43. +93 −0 packages/@ionic/cli/src/lib/integrations/capacitor/android.ts
  44. +8 −17 packages/@ionic/cli/src/lib/integrations/capacitor/config.ts
  45. +116 −27 packages/@ionic/cli/src/lib/integrations/capacitor/index.ts
  46. +8 −0 packages/@ionic/cli/src/lib/integrations/cordova/index.ts
  47. +5 −4 packages/@ionic/cli/src/lib/integrations/enterprise/index.ts
  48. +8 −7 packages/@ionic/cli/src/lib/integrations/index.ts
  49. +13 −7 packages/@ionic/cli/src/lib/oauth/oauth.ts
  50. +4 −1 packages/@ionic/cli/src/lib/oauth/openid.ts
  51. +1 −1 packages/@ionic/cli/src/lib/project/angular/generate.ts
  52. +14 −6 packages/@ionic/cli/src/lib/project/index.ts
  53. +30 −12 packages/@ionic/cli/src/lib/project/vue/build.ts
  54. +7 −1 packages/@ionic/cli/src/lib/project/vue/index.ts
  55. +97 −17 packages/@ionic/cli/src/lib/project/vue/serve.ts
  56. +1 −1 packages/@ionic/cli/src/lib/serve.ts
  57. +26 −0 packages/@ionic/cli/src/lib/session.ts
  58. +1 −5 packages/@ionic/cli/src/lib/shell.ts
  59. +40 −16 packages/@ionic/cli/src/lib/start.ts
  60. +8 −1 packages/@ionic/cli/src/lib/updates.ts
  61. +9 −0 packages/@ionic/cli/src/lib/utils/__tests__/npm.ts
  62. +15 −5 packages/@ionic/cli/src/lib/utils/npm.ts
  63. +24 −0 packages/@ionic/lab/CHANGELOG.md
  64. +2 −2 packages/@ionic/lab/package.json
  65. +8 −0 packages/@ionic/utils-process/CHANGELOG.md
  66. +2 −2 packages/@ionic/utils-process/package.json
  67. +19 −0 packages/@ionic/utils-subprocess/CHANGELOG.md
  68. +4 −4 packages/@ionic/utils-subprocess/package.json
  69. +8 −0 packages/@ionic/utils-terminal/CHANGELOG.md
  70. +3 −1 packages/@ionic/utils-terminal/package.json
  71. +24 −0 packages/@ionic/v1-toolkit/CHANGELOG.md
  72. +3 −3 packages/@ionic/v1-toolkit/package.json
  73. +184 −0 packages/cli-scripts/CHANGELOG.md
  74. +3 −3 packages/cli-scripts/package.json
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
17 changes: 17 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -32,3 +32,20 @@ jobs:
GIT_AUTHOR_EMAIL: hi@ionicframework.com
GIT_COMMITTER_NAME: Ionitron
GIT_COMMITTER_EMAIL: hi@ionicframework.com
- 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 }}
- name: Build Container
run: |
docker build \
--build-arg IONIC_CLI_VERSION=$(npm info @ionic/cli dist-tags.latest) \
--tag ghcr.io/${{ github.repository }}:latest \
--tag ghcr.io/${{ github.repository}}:$(npm info @ionic/cli dist-tags.latest) \
.
- 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)
31 changes: 31 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: BuildDockerImage

on: workflow_dispatch

jobs:
build-docker-container:
name: Build and Deploy Docker Container with latest CLI
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: 14.x
- uses: actions/checkout@v2
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 }}

- name: Build Container
run: |
docker build \
--build-arg IONIC_CLI_VERSION=$(npm info @ionic/cli dist-tags.latest) \
--tag ghcr.io/${{ github.repository }}:latest \
--tag ghcr.io/${{ github.repository}}:$(npm info @ionic/cli dist-tags.latest) \
.
- 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)
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:lts

# Set CI to true & LANG
ENV CI=1
ENV LANG en_US.UTF-8

# Install the desired version of @ionic/cli
ARG IONIC_CLI_VERSION

RUN npm i -g @ionic/cli@${IONIC_CLI_VERSION} && \
ionic --no-interactive config set -g daemon.updates false && \
ionic --no-interactive config set -g telemetry false

WORKDIR /usr/src/app
19 changes: 19 additions & 0 deletions packages/@ionic/cli-framework-output/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.2.4](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework-output@2.2.3...@ionic/cli-framework-output@2.2.4) (2022-05-09)

**Note:** Version bump only for package @ionic/cli-framework-output





## [2.2.3](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework-output@2.2.2...@ionic/cli-framework-output@2.2.3) (2022-03-04)


### Bug Fixes

* correct time unit ([#4796](https://github.com/ionic-team/ionic-cli/issues/4796)) ([8f79cf2](https://github.com/ionic-team/ionic-cli/commit/8f79cf2069ff0b59a076ae9112fcef2dd84f8dc2))





## [2.2.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework-output@2.2.1...@ionic/cli-framework-output@2.2.2) (2020-09-29)


6 changes: 2 additions & 4 deletions packages/@ionic/cli-framework-output/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ionic/cli-framework-output",
"version": "2.2.2",
"version": "2.2.4",
"description": "The log/tasks/spinners portion of Ionic CLI Framework",
"homepage": "https://ionicframework.com/",
"author": "Ionic Team <hi@ionic.io> (https://ionicframework.com)",
@@ -24,7 +24,7 @@
},
"license": "MIT",
"dependencies": {
"@ionic/utils-terminal": "2.3.1",
"@ionic/utils-terminal": "2.3.2",
"debug": "^4.0.0",
"tslib": "^2.0.1"
},
@@ -34,8 +34,6 @@
"@types/inquirer": "0.0.43",
"@types/jest": "^26.0.10",
"@types/node": "~10.17.13",
"@types/slice-ansi": "^4.0.0",
"@types/wrap-ansi": "^3.0.0",
"jest": "^26.4.2",
"jest-cli": "^26.0.1",
"lint-staged": "^10.0.2",
2 changes: 1 addition & 1 deletion packages/@ionic/cli-framework-output/src/utils.ts
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ export function dropWhile<T>(array: readonly T[], predicate: (item: T) => boolea
});
}

const TIME_UNITS = ['s', 'ms', 'μp'];
const TIME_UNITS = ['s', 'ms', 'μs'];

export function formatHrTime(hrtime: [number, number]): string {
let time = hrtime[0] + hrtime[1] / 1e9;
8 changes: 8 additions & 0 deletions packages/@ionic/cli-framework-prompts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.9](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework-prompts@2.1.8...@ionic/cli-framework-prompts@2.1.9) (2022-05-09)

**Note:** Version bump only for package @ionic/cli-framework-prompts





## [2.1.8](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework-prompts@2.1.7...@ionic/cli-framework-prompts@2.1.8) (2020-09-29)

**Note:** Version bump only for package @ionic/cli-framework-prompts
4 changes: 2 additions & 2 deletions packages/@ionic/cli-framework-prompts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ionic/cli-framework-prompts",
"version": "2.1.8",
"version": "2.1.9",
"description": "The interactive prompts portion of Ionic CLI Framework",
"homepage": "https://ionicframework.com/",
"author": "Ionic Team <hi@ionic.io> (https://ionicframework.com)",
@@ -24,7 +24,7 @@
},
"license": "MIT",
"dependencies": {
"@ionic/utils-terminal": "2.3.1",
"@ionic/utils-terminal": "2.3.2",
"debug": "^4.0.0",
"inquirer": "^7.0.0",
"tslib": "^2.0.1"
27 changes: 27 additions & 0 deletions packages/@ionic/cli-framework/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [5.1.2](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework@5.1.1...@ionic/cli-framework@5.1.2) (2022-05-09)

**Note:** Version bump only for package @ionic/cli-framework





## [5.1.1](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework@5.1.0...@ionic/cli-framework@5.1.1) (2022-03-04)

**Note:** Version bump only for package @ionic/cli-framework





# [5.1.0](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework@5.0.6...@ionic/cli-framework@5.1.0) (2020-12-10)


### Features

* **config:** add spaces option when writing JSON config ([#4612](https://github.com/ionic-team/ionic-cli/issues/4612)) ([fdd9bb2](https://github.com/ionic-team/ionic-cli/commit/fdd9bb26098441238adc56ea7a67b385a3b9a964))





## [5.0.6](https://github.com/ionic-team/ionic-cli/compare/@ionic/cli-framework@5.0.5...@ionic/cli-framework@5.0.6) (2020-09-29)

**Note:** Version bump only for package @ionic/cli-framework
10 changes: 5 additions & 5 deletions packages/@ionic/cli-framework/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ionic/cli-framework",
"version": "5.0.6",
"version": "5.1.2",
"description": "The foundation framework of the Ionic CLI",
"homepage": "https://ionicframework.com/",
"author": "Ionic Team <hi@ionic.io> (https://ionicframework.com) ",
@@ -19,14 +19,14 @@
},
"license": "MIT",
"dependencies": {
"@ionic/cli-framework-output": "2.2.2",
"@ionic/cli-framework-output": "2.2.4",
"@ionic/utils-array": "2.1.5",
"@ionic/utils-fs": "3.1.5",
"@ionic/utils-object": "2.1.5",
"@ionic/utils-process": "2.1.8",
"@ionic/utils-process": "2.1.9",
"@ionic/utils-stream": "3.1.5",
"@ionic/utils-subprocess": "2.1.8",
"@ionic/utils-terminal": "2.3.1",
"@ionic/utils-subprocess": "2.1.10",
"@ionic/utils-terminal": "2.3.2",
"chalk": "^4.0.0",
"debug": "^4.0.0",
"lodash": "^4.17.5",
11 changes: 9 additions & 2 deletions packages/@ionic/cli-framework/src/lib/config.ts
Original file line number Diff line number Diff line change
@@ -5,6 +5,11 @@ import * as path from 'path';
import * as writeFileAtomic from 'write-file-atomic';

export interface BaseConfigOptions {
/**
* The number of spaces to use when writing the JSON file.
*/
spaces?: string | number;

/**
* If specified, the class will operate on a nested object within the config
* file navigated to by this path prefix, an array of object path keys.
@@ -16,9 +21,11 @@ export interface BaseConfigOptions {
}

export abstract class BaseConfig<T extends object> {
protected readonly spaces: string | number;
protected readonly pathPrefix: readonly string[];

constructor(readonly p: string, { pathPrefix = [] }: BaseConfigOptions = {}) {
constructor(readonly p: string, { spaces = 2, pathPrefix = [] }: BaseConfigOptions = {}) {
this.spaces = spaces;
this.pathPrefix = pathPrefix;
}

@@ -87,6 +94,6 @@ export abstract class BaseConfig<T extends object> {

private _setFile(value: any): void {
mkdirpSync(path.dirname(this.p));
writeFileAtomic.sync(this.p, JSON.stringify(value, undefined, 2) + '\n');
writeFileAtomic.sync(this.p, JSON.stringify(value, undefined, this.spaces) + '\n');
}
}
Loading