Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/tc-ssp-3050-migrate-sentry-7-to-…
Browse files Browse the repository at this point in the history
…8' into alpha
  • Loading branch information
henzigo committed Dec 23, 2024
2 parents 4fb8700 + eb3d202 commit ae90261
Show file tree
Hide file tree
Showing 10 changed files with 264 additions and 290 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ CKEDITOR.plugins.add('strinsert',
multiSelect: false,
panel:
{
css: [ editor.config.contentsCss, CKEDITOR.skin.getPath('editor') ],
css: [CKEDITOR.skin.getPath('editor')].concat(config.contentsCss),
voiceLabel: editor.lang.panelVoiceLabel
},

Expand Down
6 changes: 6 additions & 0 deletions app/assets/js/admin/grapesjs/initGrapesJs.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,13 @@ export default class InitGrapesJs {
plugins: plugins,
pluginsOpts: {
[ckeditorPlugin]: {
ckeditor: '',
options: {
enterMode: 2,
versionCheck: false,
allowedContent: true,
extraAllowedContent: '*(*)',
removePlugins: 'exportpdf',
toolbar: [
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', '-', 'RemoveFormat'] },
{ name: 'clipboard', items: ['PasteText', 'PasteFromWord'] },
Expand Down Expand Up @@ -203,8 +206,10 @@ export default class InitGrapesJs {
styleManagerSectors: []
},
[ckeditorPlugin]: {
ckeditor: '',
options: {
enterMode: 2,
versionCheck: false,
toolbar: [
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', '-', 'RemoveFormat'] },
{ name: 'format', items: ['Format'] },
Expand All @@ -216,6 +221,7 @@ export default class InitGrapesJs {
{ name: 'insert', items: ['SpecialChar', 'strinsert'] }
],
extraPlugins: 'strinsert',
removePlugins: 'exportpdf',
strinsert_strings: [
{ 'name': 'Povinné proměnné' },
...variables
Expand Down
2 changes: 1 addition & 1 deletion app/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
"php app/downloadPhing.php --phing-version=3.0.0": "script",
"php phing clean": "script",
"shopsys:domains-urls:configure": "symfony-cmd",
"ckeditor:install --clear=skip --release=full --tag=4.5.11": "symfony-cmd"
"ckeditor:install --clear=skip --release=full --tag=4.22.1": "symfony-cmd"
},
"security-check": "security-checker security:check"
},
Expand Down
2 changes: 2 additions & 0 deletions app/config/packages/fos_ck_editor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ fos_ck_editor:
autoload: false
configs:
default:
versionCheck: false
entities_greek: false
entities_latin: false
enterMode: 2
Expand All @@ -22,6 +23,7 @@ fos_ck_editor:
extraPlugins: 'layoutmanager'

email:
versionCheck: false
entities_greek: false
entities_latin: false
enterMode: 2
Expand Down
1 change: 1 addition & 0 deletions storefront/.env
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ GTM_ID=
GRAPHQL_REDIS_CACHE=1
ERROR_DEBUGGING_LEVEL=no-debug
SHOW_SYMFONY_TOOLBAR=0
SENTRY_AUTH_TOKEN=

# LUIGIS_BOX_ENABLED_DOMAIN_IDS=1,2
# LUIGIS_BOX_TRACKER_IDS_BY_DOMAIN_IDS='{"1": "<TRACKER_ID_FOR_DOMAIN_1>", "2": "<TRACKER_ID_FOR_DOMAIN_2>", ...}'
Expand Down
21 changes: 21 additions & 0 deletions storefront/instrumentation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as Sentry from '@sentry/nextjs';

export function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
// this is your Sentry.init call from `sentry.server.config.js|ts`
Sentry.init({
dsn: process.env.SENTRY_DSN,
environment: process.env.SENTRY_ENVIRONMENT,
tracesSampleRate: 0.1,
});
}

// This is your Sentry.init call from `sentry.edge.config.js|ts`
if (process.env.NEXT_RUNTIME === 'edge') {
Sentry.init({
dsn: process.env.SENTRY_DSN,
environment: process.env.SENTRY_ENVIRONMENT,
tracesSampleRate: 0.1,
});
}
}
18 changes: 12 additions & 6 deletions storefront/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({

/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: { scrollRestoration: true, middlewarePrefetch: 'strict' },
experimental: {
scrollRestoration: true,
middlewarePrefetch: 'strict',
instrumentationHook: true,
},
reactStrictMode: true,
swcMinify: true,
assetPrefix: process.env.CDN_DOMAIN ?? undefined,
sentry: {
disableServerWebpackPlugin: process.env.APP_ENV === 'development',
disableClientWebpackPlugin: process.env.APP_ENV === 'development',
hideSourceMaps: true,
},
images: {
loader: 'custom',
remotePatterns: [
Expand Down Expand Up @@ -115,6 +114,13 @@ const nextConfig = {
};

const SentryWebpackPluginOptions = {
authToken: process.env.SENTRY_AUTH_TOKEN,
disableServerWebpackPlugin: process.env.APP_ENV === 'development',
disableClientWebpackPlugin: process.env.APP_ENV === 'development',
hideSourceMaps: true,
sourcemaps: {
deleteSourcemapsAfterUpload: true,
},
errorHandler: (err, _invokeErr, compilation) => {
compilation.warnings.push('Sentry CLI Plugin: ' + err.message);
},
Expand Down
2 changes: 1 addition & 1 deletion storefront/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@floating-ui/react": "~0.26.28",
"@hookform/resolvers": "~2.6.1",
"@next/bundle-analyzer": "~14.2.20",
"@sentry/nextjs": "~8.40.0",
"@sentry/nextjs": "~8.47.0",
"@urql/devtools": "~2.0.3",
"@urql/exchange-auth": "~2.1.6",
"@urql/exchange-graphcache": "~6.4.1",
Expand Down
Loading

0 comments on commit ae90261

Please sign in to comment.