Skip to content

Commit cc576d4

Browse files
onurtemizkanandreiborzaLms24
authored
feat: Add Angular Wizard (#767)
* feat(angular): Add Angular menu option and install SDK (#765) Adds Angular menu option with SDK installation --------- Co-authored-by: Andrei <168741329+andreiborza@users.noreply.github.com> * Add CHANGELOG entry. * feat(angular): Add Sentry setup in `main.ts` (#768) - Adds Sentry initialization on main.ts with feature selection - Also adds Prettier run * feat(angular): Add Sentry setup in App Config (#769) * feat(angular): Add Sentry setup in App Config * Use `hasSentryContent` from `ast-utils` * Bail out if `app-config` is not under pre-defined location * feat(angular): Configure source map upload. (#770) * feat(angular): Configure source map upload. * Use `preSelectedProject` as is * Fix * test(angular): Add E2E tests. (#780) * switch tests to vitest * fix missing new options * ref(angular): Fix eslint errors and failing e2e test (#964) * fix(angular): Fix source map generation bugs (#963) - avoid crash when reading `angular.json` fails - fixed bug where we'd remove production config in `angular.json` - added reporting of read/write file errors to Sentry - added a bunch of tests for `angular.json` manipulation - fixed a bunch of lint and TS errors by introducing a defensively typed `PartialAngularJson` type * .gitignore .envrc * test(angular): Add tests for enabling source maps generation (#968) * feat(angular): Add example component (#953) See PR description for details * feat(angular): Check for min compatible Angular version with wizard setup (#970) --------- Co-authored-by: Andrei <168741329+andreiborza@users.noreply.github.com> Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
1 parent 9e9719a commit cc576d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2864
-151
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ jobs:
116116
matrix:
117117
wizard:
118118
- Expo
119+
- Angular-17
120+
- Angular-19
119121
- Flutter
120122
- Nuxt-3
121123
- Nuxt-4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@ plugins
4343
package-lock.json
4444

4545
.env
46+
.envrc
4647

4748
.sentryclirc

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
## 4.7.0
1616

17+
- feat: Add Angular Wizard ([#767](https://github.com/getsentry/sentry-wizard/pull/767))
1718
- feat: Add `deno` as a package manager ([#905](https://github.com/getsentry/sentry-wizard/pull/905))
1819
- feat(nextjs): Add `onRouterTransitionStart` to client instrumentation template ([#938](https://github.com/getsentry/sentry-wizard/pull/938))
1920
- feat(cocoa): Update snippets to use new UI Profiling configureation ([#933](https://github.com/getsentry/sentry-wizard/pull/933))

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,25 @@ open a [GitHub issue](https://github.com/getsentry/sentry-wizard/issues)!
5757

5858
The following CLI arguments are available:
5959

60-
| Option | Description | Type | Default | Choices | Environment Variable |
61-
| ---------------------- | ----------------------------------------------------------------- | ------- | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
62-
| `--help` | Show help | boolean | | | |
63-
| `--version` | Show version number | boolean | | | |
64-
| `--debug` | Enable verbose logging | boolean | `false` | | `SENTRY_WIZARD_DEBUG` |
65-
| `--uninstall` | Revert project setup process. Not available for all integrations. | boolean | `false` | | `SENTRY_WIZARD_UNINSTALL` |
66-
| `--skip-connect` | Skips the connection to the server | boolean | `false` | | `SENTRY_WIZARD_SKIP_CONNECT` |
67-
| `--quiet` | Do not fallback to prompting user asking questions | boolean | `false` | | `SENTRY_WIZARD_QUIET` |
68-
| `-i, --integration` | Choose the integration to setup | choices | Select integration during setup | "reactNative", "flutter", ios", "android", "cordova", "electron", "nextjs", "nuxt", "remix", "sveltekit", "sourcemaps" | `SENTRY_WIZARD_INTEGRATION` |
69-
| `-p, --platform` | Choose platform(s) | array | Select platform(s) during setup | "ios", "android" | `SENTRY_WIZARD_PLATFORM` |
70-
| `-u, --url` | The URL to your Sentry installation | string | `https://sentry.io` | | `SENTRY_WIZARD_URL` |
71-
| `--project` | The Sentry project slug to use | string | Select project during setup | | |
72-
| `--org` | The Sentry org slug to use | string | Select org during setup | | |
73-
| `--saas` | Skip the self-hosted or SaaS URL selection process | boolean | Select self-hosted or SaaS during setup | | |
74-
| `-s, --signup` | Redirect to signup page if not logged in | boolean | `false` | | |
75-
| `--disable-telemetry` | Don't send telemetry data to Sentry | boolean | `false` | | |
76-
| `--force-install` | Force install the SDK NPM package (use with caution!) | boolean | `false` | | |
77-
| `--coming-from` | Specify the partner organization initiating this command. | string | | | |
78-
| `--ignore-git-changes` | Ignore git changes in the project and not prompt for confirmation | boolean | `false` | | |
60+
| Option | Description | Type | Default | Choices | Environment Variable |
61+
| ---------------------- | ----------------------------------------------------------------- | ------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
62+
| `--help` | Show help | boolean | | | |
63+
| `--version` | Show version number | boolean | | | |
64+
| `--debug` | Enable verbose logging | boolean | `false` | | `SENTRY_WIZARD_DEBUG` |
65+
| `--uninstall` | Revert project setup process. Not available for all integrations. | boolean | `false` | | `SENTRY_WIZARD_UNINSTALL` |
66+
| `--skip-connect` | Skips the connection to the server | boolean | `false` | | `SENTRY_WIZARD_SKIP_CONNECT` |
67+
| `--quiet` | Do not fallback to prompting user asking questions | boolean | `false` | | `SENTRY_WIZARD_QUIET` |
68+
| `-i, --integration` | Choose the integration to setup | choices | Select integration during setup | "reactNative", "flutter", ios", "android", "cordova", "angular", "electron", "nextjs", "nuxt", "remix", "sveltekit", "sourcemaps" | `SENTRY_WIZARD_INTEGRATION` |
69+
| `-p, --platform` | Choose platform(s) | array | Select platform(s) during setup | "ios", "android" | `SENTRY_WIZARD_PLATFORM` |
70+
| `-u, --url` | The URL to your Sentry installation | string | `https://sentry.io` | | `SENTRY_WIZARD_URL` |
71+
| `--project` | The Sentry project slug to use | string | Select project during setup | | |
72+
| `--org` | The Sentry org slug to use | string | Select org during setup | | |
73+
| `--saas` | Skip the self-hosted or SaaS URL selection process | boolean | Select self-hosted or SaaS during setup | | |
74+
| `-s, --signup` | Redirect to signup page if not logged in | boolean | `false` | | |
75+
| `--disable-telemetry` | Don't send telemetry data to Sentry | boolean | `false` | | |
76+
| `--force-install` | Force install the SDK NPM package (use with caution!) | boolean | `false` | | |
77+
| `--coming-from` | Specify the partner organization initiating this command. | string | | | |
78+
| `--ignore-git-changes` | Ignore git changes in the project and not prompt for confirmation | boolean | `false` | | |
7979

8080
## Resources
8181

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
40+
# System files
41+
.DS_Store
42+
Thumbs.db
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"angular-test-app": {
7+
"projectType": "application",
8+
"schematics": {},
9+
"root": "",
10+
"sourceRoot": "src",
11+
"prefix": "app",
12+
"architect": {
13+
"build": {
14+
"builder": "@angular-devkit/build-angular:application",
15+
"options": {
16+
"outputPath": "dist/angular-test-app",
17+
"index": "src/index.html",
18+
"browser": "src/main.ts",
19+
"polyfills": ["zone.js"],
20+
"tsConfig": "tsconfig.app.json",
21+
"scripts": []
22+
},
23+
"configurations": {
24+
"production": {
25+
"budgets": [
26+
{
27+
"type": "initial",
28+
"maximumWarning": "500kb",
29+
"maximumError": "1mb"
30+
},
31+
{
32+
"type": "anyComponentStyle",
33+
"maximumWarning": "2kb",
34+
"maximumError": "4kb"
35+
}
36+
],
37+
"outputHashing": "all"
38+
},
39+
"development": {
40+
"optimization": false,
41+
"extractLicenses": false,
42+
"sourceMap": true
43+
}
44+
},
45+
"defaultConfiguration": "production"
46+
},
47+
"serve": {
48+
"builder": "@angular-devkit/build-angular:dev-server",
49+
"configurations": {
50+
"production": {
51+
"buildTarget": "angular-test-app:build:production"
52+
},
53+
"development": {
54+
"buildTarget": "angular-test-app:build:development"
55+
}
56+
},
57+
"defaultConfiguration": "development"
58+
},
59+
"extract-i18n": {
60+
"builder": "@angular-devkit/build-angular:extract-i18n",
61+
"options": {
62+
"buildTarget": "angular-test-app:build"
63+
}
64+
}
65+
}
66+
}
67+
}
68+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "angular-17-test-app",
3+
"version": "0.0.0",
4+
"scripts": {
5+
"ng": "ng",
6+
"start": "ng serve",
7+
"build": "ng build",
8+
"dev": "ng build --watch --configuration development"
9+
},
10+
"private": true,
11+
"dependencies": {
12+
"@angular/animations": "^17.3.0",
13+
"@angular/common": "^17.3.0",
14+
"@angular/compiler": "^17.3.0",
15+
"@angular/core": "^17.3.0",
16+
"@angular/forms": "^17.3.0",
17+
"@angular/platform-browser": "^17.3.0",
18+
"@angular/platform-browser-dynamic": "^17.3.0",
19+
"@angular/router": "^17.3.0",
20+
"rxjs": "~7.8.0",
21+
"tslib": "^2.3.0",
22+
"zone.js": "~0.14.3"
23+
},
24+
"devDependencies": {
25+
"@angular-devkit/build-angular": "^17.3.11",
26+
"@angular/cli": "^17.3.11",
27+
"@angular/compiler-cli": "^17.3.0",
28+
"@types/jasmine": "~5.1.0",
29+
"jasmine-core": "~5.1.0",
30+
"karma": "~6.4.0",
31+
"karma-chrome-launcher": "~3.2.0",
32+
"karma-coverage": "~2.2.0",
33+
"karma-jasmine": "~5.1.0",
34+
"karma-jasmine-html-reporter": "~2.1.0",
35+
"prettier": "^3.4.2",
36+
"typescript": "~5.4.2"
37+
}
38+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<main class="main">
2+
<div class="content">
3+
<h1>Hello, {{ title }}</h1>
4+
<p>Congratulations! Your app is running. 🎉</p>
5+
</div>
6+
</main>
7+
8+
<router-outlet />
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Component } from '@angular/core';
2+
import { RouterOutlet } from '@angular/router';
3+
4+
@Component({
5+
selector: 'app-root',
6+
standalone: true,
7+
imports: [RouterOutlet],
8+
templateUrl: './app.component.html',
9+
})
10+
export class AppComponent {
11+
title = 'angular-test-app';
12+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { ApplicationConfig } from '@angular/core';
2+
import { provideRouter } from '@angular/router';
3+
4+
import { routes } from './app.routes';
5+
6+
export const appConfig: ApplicationConfig = {
7+
providers: [provideRouter(routes)]
8+
};

0 commit comments

Comments
 (0)