mirror of
https://github.com/valitydev/checkout.git
synced 2024-11-06 02:25:18 +00:00
Add payment result view default state. Set up build env (#328)
This commit is contained in:
parent
17cb74690a
commit
0bfc635965
19
.github/workflows/master.yaml
vendored
19
.github/workflows/master.yaml
vendored
@ -20,12 +20,10 @@ jobs:
|
||||
uses: ./.github/actions/init
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Set checkout version
|
||||
uses: jossef/action-set-json-field@v2
|
||||
with:
|
||||
file: ./dist/v1/env.json
|
||||
field: version
|
||||
value: ${{ github.sha }}
|
||||
env:
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||
- name: Deploy image
|
||||
uses: valitydev/action-deploy-docker@v2
|
||||
with:
|
||||
@ -61,12 +59,3 @@ jobs:
|
||||
directory: 'dist'
|
||||
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: main
|
||||
- name: Create Sentry release
|
||||
uses: getsentry/action-release@v1
|
||||
env:
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||
with:
|
||||
environment: 'production'
|
||||
sourcemaps: './dist'
|
||||
|
@ -35,8 +35,6 @@ creditCardType.addCard({
|
||||
const initSentry = async (dsn: string) => {
|
||||
const { init, BrowserTracing } = await import('@sentry/react');
|
||||
const { CaptureConsole } = await import('@sentry/integrations');
|
||||
const fetchEnv = withRetry(fetchConfig<{ version: string }>);
|
||||
const env = await fetchEnv('./env.json');
|
||||
init({
|
||||
environment: 'production',
|
||||
dsn,
|
||||
@ -47,7 +45,6 @@ const initSentry = async (dsn: string) => {
|
||||
}),
|
||||
],
|
||||
tracesSampleRate: 0.1,
|
||||
release: env.version,
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -80,5 +80,15 @@ export const getResultInfo = (condition: PaymentCondition): ResultInfo => {
|
||||
label: 'form.header.final.pending.label',
|
||||
description: 'form.header.final.pending.description',
|
||||
};
|
||||
default:
|
||||
const errDescription = `Unexpected Payment condition: ${condition.name}`;
|
||||
console.error(errDescription, JSON.stringify(condition));
|
||||
return {
|
||||
iconName: 'WarningIcon',
|
||||
color: 'red.500',
|
||||
label: 'form.header.final.error.label',
|
||||
description: errDescription,
|
||||
hasActions: false,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"version": ""
|
||||
}
|
@ -27,10 +27,6 @@ export default defineConfig({
|
||||
src: 'src/appConfig.json',
|
||||
dest: './',
|
||||
},
|
||||
{
|
||||
src: 'src/env.json',
|
||||
dest: './',
|
||||
},
|
||||
{
|
||||
src: 'src/assets/*',
|
||||
dest: './assets',
|
||||
@ -39,10 +35,10 @@ export default defineConfig({
|
||||
}),
|
||||
visualizer(),
|
||||
sentryVitePlugin({
|
||||
org: 'empayredev',
|
||||
project: 'checkout',
|
||||
telemetry: false,
|
||||
org: process.env.SENTRY_ORG,
|
||||
project: process.env.SENTRY_PROJECT,
|
||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||
telemetry: false,
|
||||
}),
|
||||
],
|
||||
server: {
|
||||
|
Loading…
Reference in New Issue
Block a user