Skip to content

Commit

Permalink
remove tunnel, sentry pinia, and codecov project
Browse files Browse the repository at this point in the history
  • Loading branch information
smeubank committed Nov 5, 2024
1 parent a27d1a3 commit 63d940c
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 66 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,14 @@ jobs:
run: |
export PYTHONPATH=$(pwd)
pytest --cov=api api/tests/ --cov-report=xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: smeubank/vue-store-pinia
- name: Upload backend coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: backend
slug: smeubank/vue-store-pinia

- name: Upload backend coverage to Codecov via PIP CLI
run: |
Expand Down
2 changes: 1 addition & 1 deletion api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def filter_transactions(event, hint):
# Configure CORS with regex
app.add_middleware(
CORSMiddleware,
allow_origin_regex=r"^https://vue-store-pinia.*\.vercel\.app$|https://vue-store-pinia\.onrender\.com|http://localhost(:8000)?|http://127\.0\.0\.1(:8000)?",
allow_origin_regex=r"^https://vue-store-pinia.*\.vercel\.app$|https://vue-store-pinia\.onrender\.com|http://localhost(:8000|:5173)?|http://127\.0\.0\.1(:8000)?",
allow_credentials=True,
allow_methods=["*"],
allow_headers=["sentry-trace", "baggage", "*"], # Include sentry-trace and baggage
Expand Down
118 changes: 62 additions & 56 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"@fortawesome/fontawesome-free": "^6.6.0",
"@sentry/vite-plugin": "^2.22.5",
"@sentry/vue": "^8.33.1",
"@sentry/vue": "^8.37.0",
"pinia": "^2.1.0",
"vue": "^3.3.0",
"vue-router": "^4.2.0"
Expand Down
4 changes: 3 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { createRouter, createWebHistory } from 'vue-router'
import * as Sentry from '@sentry/vue'
import { createSentryPiniaPlugin } from "@sentry/vue";
import App from './App.vue'
import LandingPage from './pages/LandingPage.vue'
import ProductsPage from './pages/ProductsPage.vue'
Expand Down Expand Up @@ -39,14 +40,15 @@ Sentry.init({
Sentry.browserTracingIntegration({ router }),
Sentry.replayIntegration(),
],
tunnel: tunnelUrl, // Use the determined tunnel URL
// tunnel: tunnelUrl, // Use the determined tunnel URL
sendDefaultPii: true, // Enable sending of headers and cookies
tracesSampleRate: 1.0,
tracePropagationTargets: ['localhost', /\/.*/],
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
})

pinia.use(createSentryPiniaPlugin());
app.use(pinia)
app.use(router)
app.mount('#app')
3 changes: 2 additions & 1 deletion src/pages/ProductsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import ProductCard from '../components/ProductCard.vue'
const products = ref([])
onMounted(async () => {
const baseUrl = 'https://vue-store-pinia.onrender.com' || 'http://localhost:8000';
// const baseUrl = 'https://vue-store-pinia.onrender.com';
const baseUrl = 'http://localhost:8000';
const response = await fetch(`${baseUrl}/products`);
const data = await response.json();
products.value = data.map(product => ({
Expand Down

0 comments on commit 63d940c

Please sign in to comment.