ghost 5.33.7 → 5.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/tryghost-adapter-cache-redis-5.34.0.tgz +0 -0
- package/components/tryghost-adapter-manager-5.34.0.tgz +0 -0
- package/components/{tryghost-api-framework-5.33.7.tgz → tryghost-api-framework-5.34.0.tgz} +0 -0
- package/components/tryghost-api-version-compatibility-service-5.34.0.tgz +0 -0
- package/components/tryghost-audience-feedback-5.34.0.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.34.0.tgz +0 -0
- package/components/tryghost-constants-5.34.0.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.34.0.tgz +0 -0
- package/components/tryghost-data-generator-5.34.0.tgz +0 -0
- package/components/tryghost-domain-events-5.34.0.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.34.0.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.34.0.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.34.0.tgz +0 -0
- package/components/tryghost-email-content-generator-5.34.0.tgz +0 -0
- package/components/tryghost-email-events-5.34.0.tgz +0 -0
- package/components/tryghost-email-service-5.34.0.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.34.0.tgz +0 -0
- package/components/{tryghost-express-dynamic-redirects-5.33.7.tgz → tryghost-express-dynamic-redirects-5.34.0.tgz} +0 -0
- package/components/tryghost-extract-api-key-5.34.0.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.34.0.tgz +0 -0
- package/components/tryghost-i18n-5.34.0.tgz +0 -0
- package/components/tryghost-importer-revue-5.34.0.tgz +0 -0
- package/components/{tryghost-job-manager-5.33.7.tgz → tryghost-job-manager-5.34.0.tgz} +0 -0
- package/components/tryghost-link-redirects-5.34.0.tgz +0 -0
- package/components/tryghost-link-replacer-5.34.0.tgz +0 -0
- package/components/{tryghost-link-tracking-5.33.7.tgz → tryghost-link-tracking-5.34.0.tgz} +0 -0
- package/components/tryghost-magic-link-5.34.0.tgz +0 -0
- package/components/tryghost-mailgun-client-5.34.0.tgz +0 -0
- package/components/tryghost-member-attribution-5.34.0.tgz +0 -0
- package/components/tryghost-member-events-5.34.0.tgz +0 -0
- package/components/tryghost-members-api-5.34.0.tgz +0 -0
- package/components/tryghost-members-csv-5.34.0.tgz +0 -0
- package/components/{tryghost-members-events-service-5.33.7.tgz → tryghost-members-events-service-5.34.0.tgz} +0 -0
- package/components/{tryghost-members-importer-5.33.7.tgz → tryghost-members-importer-5.34.0.tgz} +0 -0
- package/components/tryghost-members-offers-5.34.0.tgz +0 -0
- package/components/tryghost-members-payments-5.34.0.tgz +0 -0
- package/components/{tryghost-members-ssr-5.33.7.tgz → tryghost-members-ssr-5.34.0.tgz} +0 -0
- package/components/tryghost-members-stripe-service-5.34.0.tgz +0 -0
- package/components/tryghost-milestone-emails-5.34.0.tgz +0 -0
- package/components/tryghost-minifier-5.34.0.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.34.0.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.34.0.tgz +0 -0
- package/components/{tryghost-mw-error-handler-5.33.7.tgz → tryghost-mw-error-handler-5.34.0.tgz} +0 -0
- package/components/tryghost-mw-session-from-token-5.34.0.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.34.0.tgz +0 -0
- package/components/tryghost-mw-vhost-5.34.0.tgz +0 -0
- package/components/tryghost-oembed-service-5.34.0.tgz +0 -0
- package/components/{tryghost-package-json-5.33.7.tgz → tryghost-package-json-5.34.0.tgz} +0 -0
- package/components/tryghost-referrers-5.34.0.tgz +0 -0
- package/components/{tryghost-security-5.33.7.tgz → tryghost-security-5.34.0.tgz} +0 -0
- package/components/tryghost-session-service-5.34.0.tgz +0 -0
- package/components/{tryghost-settings-path-manager-5.33.7.tgz → tryghost-settings-path-manager-5.34.0.tgz} +0 -0
- package/components/tryghost-staff-service-5.34.0.tgz +0 -0
- package/components/tryghost-stats-service-5.34.0.tgz +0 -0
- package/components/tryghost-tags-public-5.34.0.tgz +0 -0
- package/components/tryghost-tiers-5.34.0.tgz +0 -0
- package/components/tryghost-update-check-service-5.34.0.tgz +0 -0
- package/components/tryghost-verification-trigger-5.34.0.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.34.0.tgz +0 -0
- package/components/tryghost-webmentions-5.34.0.tgz +0 -0
- package/core/boot.js +8 -1
- package/core/built/admin/assets/{chunk.143.9057a1659075c0ee7336.js → chunk.143.a07da1be864f2e500e18.js} +14 -14
- package/core/built/admin/assets/{chunk.178.1d2c848ebe2c7baa38dd.js → chunk.178.9ed5500c900a9032f6c2.js} +4 -4
- package/core/built/admin/assets/{chunk.963.e47ead5abeca4cf69fed.js → chunk.616.181e1ad6c33f0bec7a65.js} +3519 -3512
- package/core/built/admin/assets/{chunk.963.e47ead5abeca4cf69fed.js.LICENSE.txt → chunk.616.181e1ad6c33f0bec7a65.js.LICENSE.txt} +0 -0
- package/core/built/admin/assets/{chunk.79.c3c2c05ea7ff7707fcad.js → chunk.79.ec143a398298020c87e6.js} +112 -112
- package/core/built/admin/assets/codemirror/{codemirror-a81c0653d8e57286b75c5a1792f80779.js → codemirror-6c43f4894cbd8db73d7f35cde836c58e.js} +810 -809
- package/core/built/admin/assets/{ghost-fb9fb8adbcaf1603ad4006dd2d49e401.css → ghost-558c1e319d6e025bfab2054bc0f7fe83.css} +1 -1
- package/core/built/admin/assets/{ghost-904f203ff1f5f6bff4e55a03f39a4fbf.js → ghost-ad40d109653288e74a7cd922341fb33d.js} +115 -90
- package/core/built/admin/assets/{ghost-dark-ac0cb221eddc8652a0e7c263ed6513dc.css → ghost-dark-a15754df1f9070dc2525482ce22e2251.css} +1 -1
- package/core/built/admin/assets/simplemde/{simplemde-2885e4a40ed66fcae974595584efe50b.js → simplemde-28049a9bd7f432b0648747eb26958a33.js} +836 -836
- package/core/built/admin/assets/{vendor-0441964c34d58f2aacd5a04bbe240243.js → vendor-253d6527ca6353855164ef65f896f762.js} +1208 -1233
- package/core/built/admin/index.html +6 -6
- package/core/cli/generate-data.js +21 -3
- package/core/frontend/services/routing/router-manager.js +1 -1
- package/core/frontend/web/middleware/handle-image-sizes.js +6 -21
- package/core/server/adapters/cache/Redis.js +3 -0
- package/core/server/adapters/storage/LocalStorageBase.js +11 -1
- package/core/server/api/endpoints/images.js +47 -6
- package/core/server/api/endpoints/mentions.js +1 -1
- package/core/server/api/endpoints/tags-public.js +2 -1
- package/core/server/api/endpoints/utils/serializers/output/email-posts.js +1 -1
- package/core/server/api/endpoints/utils/serializers/output/mappers/mentions.js +1 -1
- package/core/server/api/endpoints/utils/serializers/output/pages.js +1 -1
- package/core/server/api/endpoints/utils/serializers/output/posts.js +1 -1
- package/core/server/api/endpoints/utils/serializers/output/previews.js +1 -1
- package/core/server/api/endpoints/utils/serializers/output/utils/clean.js +1 -0
- package/core/server/data/migrations/versions/5.34/2023-01-30-07-27-add-mentions-permission.js +10 -0
- package/core/server/data/migrations/versions/5.34/2023-02-08-03-08-add-mentions-notifications-column.js +7 -0
- package/core/server/data/migrations/versions/5.34/2023-02-08-22-32-add-mentions-delete-column.js +7 -0
- package/core/server/data/schema/fixtures/fixtures.json +9 -2
- package/core/server/data/schema/schema.js +3 -1
- package/core/server/lib/image/image-size.js +23 -5
- package/core/server/lib/lexical.js +36 -3
- package/core/server/models/member.js +3 -0
- package/core/server/models/mention.js +7 -1
- package/core/server/models/post.js +1 -1
- package/core/server/models/user.js +4 -1
- package/core/server/services/adapter-manager/index.js +7 -0
- package/core/server/services/email-analytics/events/StartEmailAnalyticsJobEvent.js +22 -0
- package/core/server/services/email-analytics/index.js +2 -22
- package/core/server/services/email-analytics/jobs/fetch-latest/index.js +6 -12
- package/core/server/services/email-analytics/wrapper.js +99 -0
- package/core/server/services/email-service/wrapper.js +3 -14
- package/core/server/services/mega/post-email-serializer.js +1 -1
- package/core/server/services/members/jobs/index.js +4 -2
- package/core/server/services/mentions/BookshelfMentionRepository.js +3 -2
- package/core/server/services/mentions/MentionController.js +78 -12
- package/core/server/services/mentions/service.js +43 -3
- package/core/server/services/milestone-emails/MilestoneQueries.js +58 -0
- package/core/server/services/milestone-emails/index.js +1 -0
- package/core/server/services/milestone-emails/service.js +58 -0
- package/core/server/services/tags-public/index.js +1 -0
- package/core/server/services/tags-public/service.js +31 -0
- package/core/server/web/api/endpoints/admin/routes.js +0 -1
- package/core/server/web/api/middleware/index.js +0 -1
- package/core/server/web/shared/middleware/api/spam-prevention.js +31 -1
- package/core/server/web/shared/middleware/brute.js +13 -0
- package/core/server/web/webmentions/routes.js +3 -0
- package/core/shared/config/defaults.json +17 -1
- package/core/shared/config/env/config.development.json +0 -3
- package/core/shared/config/env/config.testing-browser.json +6 -0
- package/core/shared/config/env/config.testing-mysql.json +7 -0
- package/core/shared/config/env/config.testing.json +6 -0
- package/core/shared/labs.js +3 -3
- package/package.json +121 -114
- package/yarn.lock +327 -242
- package/components/tryghost-adapter-manager-5.33.7.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-5.33.7.tgz +0 -0
- package/components/tryghost-audience-feedback-5.33.7.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.33.7.tgz +0 -0
- package/components/tryghost-constants-5.33.7.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.33.7.tgz +0 -0
- package/components/tryghost-data-generator-5.33.7.tgz +0 -0
- package/components/tryghost-domain-events-5.33.7.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.33.7.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.33.7.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.33.7.tgz +0 -0
- package/components/tryghost-email-content-generator-5.33.7.tgz +0 -0
- package/components/tryghost-email-events-5.33.7.tgz +0 -0
- package/components/tryghost-email-service-5.33.7.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.33.7.tgz +0 -0
- package/components/tryghost-extract-api-key-5.33.7.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.33.7.tgz +0 -0
- package/components/tryghost-i18n-5.33.7.tgz +0 -0
- package/components/tryghost-importer-revue-5.33.7.tgz +0 -0
- package/components/tryghost-link-redirects-5.33.7.tgz +0 -0
- package/components/tryghost-link-replacer-5.33.7.tgz +0 -0
- package/components/tryghost-magic-link-5.33.7.tgz +0 -0
- package/components/tryghost-mailgun-client-5.33.7.tgz +0 -0
- package/components/tryghost-member-attribution-5.33.7.tgz +0 -0
- package/components/tryghost-member-events-5.33.7.tgz +0 -0
- package/components/tryghost-members-api-5.33.7.tgz +0 -0
- package/components/tryghost-members-csv-5.33.7.tgz +0 -0
- package/components/tryghost-members-offers-5.33.7.tgz +0 -0
- package/components/tryghost-members-payments-5.33.7.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.33.7.tgz +0 -0
- package/components/tryghost-minifier-5.33.7.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.33.7.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.33.7.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.33.7.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.33.7.tgz +0 -0
- package/components/tryghost-mw-vhost-5.33.7.tgz +0 -0
- package/components/tryghost-oembed-service-5.33.7.tgz +0 -0
- package/components/tryghost-referrers-5.33.7.tgz +0 -0
- package/components/tryghost-session-service-5.33.7.tgz +0 -0
- package/components/tryghost-staff-service-5.33.7.tgz +0 -0
- package/components/tryghost-stats-service-5.33.7.tgz +0 -0
- package/components/tryghost-tiers-5.33.7.tgz +0 -0
- package/components/tryghost-update-check-service-5.33.7.tgz +0 -0
- package/components/tryghost-verification-trigger-5.33.7.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.33.7.tgz +0 -0
- package/components/tryghost-webmentions-5.33.7.tgz +0 -0
- package/core/server/services/email-analytics/jobs/fetch-latest/run.js +0 -57
- package/core/server/web/api/middleware/normalize-image.js +0 -42
|
File without changes
|
|
@@ -33,9 +33,9 @@ this.spanRecorder=new d(e,n,this.spanId,t),("undefined"==typeof __SENTRY_DEBUG__
|
|
|
33
33
|
this._startIdleTimeout(t)}}_beat(){if(this._finished)return
|
|
34
34
|
const t=Object.keys(this.activities).join("")
|
|
35
35
|
t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}function l(t){const e=t.getScope()
|
|
36
|
-
e&&e.getTransaction()&&e.setSpan(void 0)}},98079:(t,e,n)=>{n.r(e),n.d(e,{BROWSER_TRACING_INTEGRATION_ID:()=>
|
|
36
|
+
e&&e.getTransaction()&&e.setSpan(void 0)}},98079:(t,e,n)=>{n.r(e),n.d(e,{BROWSER_TRACING_INTEGRATION_ID:()=>tt,BrowserTracing:()=>nt,IdleTransaction:()=>B.io,Integrations:()=>i,Span:()=>st.Dr,SpanStatus:()=>at,TRACEPARENT_REGEXP:()=>b.K,Transaction:()=>rt.Y,addExtensionMethods:()=>a.ro,defaultRequestInstrumentationOptions:()=>K,extractTraceparentData:()=>b.q,getActiveTransaction:()=>k.x1,hasTracingEnabled:()=>k.zu,instrumentOutgoingRequests:()=>V,spanStatusfromHttpCode:()=>st.Zd,startIdleTransaction:()=>a.lb,stripUrlQueryAndFragment:()=>o.rt})
|
|
37
37
|
var i={}
|
|
38
|
-
n.r(i),n.d(i,{Apollo:()=>
|
|
38
|
+
n.r(i),n.d(i,{Apollo:()=>R,BrowserTracing:()=>nt,Express:()=>p,GraphQL:()=>y,Mongo:()=>E,Mysql:()=>g,Postgres:()=>m,Prisma:()=>S})
|
|
39
39
|
var a=n(38285)
|
|
40
40
|
function s(t){let e,n=t[0],i=1
|
|
41
41
|
for(;i<t.length;){const a=t[i],s=t[i+1]
|
|
@@ -44,8 +44,9 @@ if(i+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return
|
|
|
44
44
|
return n.call(e,...i)})),e=void 0)}return n}var r=n(88521),o=n(72702),c=n(14205),_=n(16140)
|
|
45
45
|
function d(t){const e=s([t,"call",t=>t(),"access",t=>t.getClient,"call",t=>t(),"optionalAccess",t=>t.getOptions,"call",t=>t()])
|
|
46
46
|
return"sentry"!==(s([e,"optionalAccess",t=>t.instrumenter])||"sentry")}class p{static __initStatic(){this.id="Express"}__init(){this.name=p.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
47
|
-
p.prototype.__init.call(this),this._router=t.router||t.app,this._methods=(Array.isArray(t.methods)?t.methods:[]).concat("use")}setupOnce(t,e){this._router?d(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Express Integration is skipped because of instrumenter configuration."):(function(t){
|
|
48
|
-
e
|
|
47
|
+
p.prototype.__init.call(this),this._router=t.router||t.app,this._methods=(Array.isArray(t.methods)?t.methods:[]).concat("use")}setupOnce(t,e){this._router?d(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Express Integration is skipped because of instrumenter configuration."):(function(t){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((e=>function(t,e){const n=t[e]
|
|
48
|
+
return t[e]=function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a]
|
|
49
|
+
return n.call(this,...function(t,e){return t.map((t=>"function"==typeof t?l(t,e):Array.isArray(t)?t.map((t=>"function"==typeof t?l(t,e):t)):t))}(i,e))},t}(t,e)))}(this._router,this._methods),function(t){const e="settings"in t
|
|
49
50
|
e&&void 0===t._router&&t.lazyrouter&&t.lazyrouter()
|
|
50
51
|
const n=e?t._router:t
|
|
51
52
|
if(!n)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.debug("Routing instrumentation is currently only supported in Express 4."))
|
|
@@ -71,168 +72,167 @@ case 4:return function(n,i,a,r){const o=s([a.__sentry_transaction,"optionalAcces
|
|
|
71
72
|
t.call(this,n,i,a,(function(){s([o,"optionalAccess",t=>t.finish,"call",t=>t()])
|
|
72
73
|
for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n]
|
|
73
74
|
r.call(this,...e)}))}
|
|
74
|
-
default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${n}`)}}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
f.prototype.__init.call(this),this._usePgNative=!!t.usePgNative}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Postgres Integration is skipped because of instrumenter configuration."))
|
|
80
|
-
const n=(0,m.$y)("pg")
|
|
75
|
+
default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${n}`)}}p.__initStatic()
|
|
76
|
+
var u=n(30180),h=n(15834)
|
|
77
|
+
class m{static __initStatic(){this.id="Postgres"}__init(){this.name=m.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
78
|
+
m.prototype.__init.call(this),this._usePgNative=!!t.usePgNative}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Postgres Integration is skipped because of instrumenter configuration."))
|
|
79
|
+
const n=(0,u.$y)("pg")
|
|
81
80
|
if(!n)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Postgres Integration was unable to require `pg` package."))
|
|
82
81
|
if(this._usePgNative&&!s([n,"access",t=>t.native,"optionalAccess",t=>t.Client]))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Postgres Integration was unable to access 'pg-native' bindings."))
|
|
83
|
-
const{Client:i}=this._usePgNative?n.native:n;(0,
|
|
82
|
+
const{Client:i}=this._usePgNative?n.native:n;(0,h.hl)(i.prototype,"query",(function(t){return function(n,i,a){const r=s([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),o=s([r,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.text,op:"db"})])
|
|
84
83
|
if("function"==typeof a)return t.call(this,n,i,(function(t,e){s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),a(t,e)}))
|
|
85
84
|
if("function"==typeof i)return t.call(this,n,(function(t,e){s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e)}))
|
|
86
85
|
const c=void 0!==i?t.call(this,n,i):t.call(this,n)
|
|
87
|
-
return(0,_.J8)(c)?c.then((t=>(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),c)}}))}}
|
|
88
|
-
class
|
|
89
|
-
const n=(0,
|
|
90
|
-
n?(0,
|
|
91
|
-
return"function"==typeof a?t.call(this,n,i,(function(t,e,n){s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),a(t,e,n)})):"function"==typeof i?t.call(this,n,(function(t,e,n){s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e,n)})):t.call(this,n,i,a)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Mysql Integration was unable to require `mysql` package.")}}
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
const n=this._useMongoose?"mongoose":"mongodb",i=(0,
|
|
86
|
+
return(0,_.J8)(c)?c.then((t=>(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),c)}}))}}m.__initStatic()
|
|
87
|
+
class g{constructor(){g.prototype.__init.call(this)}static __initStatic(){this.id="Mysql"}__init(){this.name=g.id}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Mysql Integration is skipped because of instrumenter configuration."))
|
|
88
|
+
const n=(0,u.$y)("mysql/lib/Connection.js")
|
|
89
|
+
n?(0,h.hl)(n,"createQuery",(function(t){return function(n,i,a){const r=s([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),o=s([r,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.sql,op:"db"})])
|
|
90
|
+
return"function"==typeof a?t.call(this,n,i,(function(t,e,n){s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),a(t,e,n)})):"function"==typeof i?t.call(this,n,(function(t,e,n){s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e,n)})):t.call(this,n,i,a)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Mysql Integration was unable to require `mysql` package.")}}g.__initStatic()
|
|
91
|
+
const f=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],T={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]}
|
|
92
|
+
class E{static __initStatic(){this.id="Mongo"}__init(){this.name=E.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
93
|
+
E.prototype.__init.call(this),this._operations=Array.isArray(t.operations)?t.operations:f,this._describeOperations=!("describeOperations"in t)||t.describeOperations,this._useMongoose=!!t.useMongoose}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Mongo Integration is skipped because of instrumenter configuration."))
|
|
94
|
+
const n=this._useMongoose?"mongoose":"mongodb",i=(0,u.$y)(n)
|
|
96
95
|
i?this._instrumentOperations(i.Collection,this._operations,e):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error(`Mongo Integration was unable to require \`${n}\` package.`)}_instrumentOperations(t,e,n){e.forEach((e=>this._patchOperation(t,e,n)))}_patchOperation(t,e,n){if(!(e in t.prototype))return
|
|
97
|
-
const i=this._getSpanContextFromOperationArguments.bind(this);(0,
|
|
98
|
-
const c=r[r.length-1],d=n().getScope(),
|
|
99
|
-
if("function"!=typeof c||"mapReduce"===e&&2===r.length){const n=s([
|
|
96
|
+
const i=this._getSpanContextFromOperationArguments.bind(this);(0,h.hl)(t.prototype,e,(function(t){return function(){for(var a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o]
|
|
97
|
+
const c=r[r.length-1],d=s([n().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()])
|
|
98
|
+
if("function"!=typeof c||"mapReduce"===e&&2===r.length){const n=s([d,"optionalAccess",t=>t.startChild,"call",t=>t(i(this,e,r))]),a=t.call(this,...r)
|
|
100
99
|
if((0,_.J8)(a))return a.then((t=>(s([n,"optionalAccess",t=>t.finish,"call",t=>t()]),t)))
|
|
101
|
-
if(
|
|
102
|
-
try{e.once("close",(()=>{s([n,"optionalAccess",t=>t.finish,"call",t=>t()])}))}catch(t){s([n,"optionalAccess",t=>t.finish,"call",t=>t()])}return e}return s([n,"optionalAccess",t=>t.finish,"call",t=>t()]),a}
|
|
103
|
-
|
|
100
|
+
if((p=a)&&"object"==typeof p&&p.once&&"function"==typeof p.once){const e=a
|
|
101
|
+
try{e.once("close",(()=>{s([n,"optionalAccess",t=>t.finish,"call",t=>t()])}))}catch(t){s([n,"optionalAccess",t=>t.finish,"call",t=>t()])}return e}return s([n,"optionalAccess",t=>t.finish,"call",t=>t()]),a}var p
|
|
102
|
+
const l=s([d,"optionalAccess",t=>t.startChild,"call",t=>t(i(this,e,r.slice(0,-1)))])
|
|
103
|
+
return t.call(this,...r.slice(0,-1),(function(t,e){s([l,"optionalAccess",t=>t.finish,"call",t=>t()]),c(t,e)}))}}))}_getSpanContextFromOperationArguments(t,e,n){const i={collectionName:t.collectionName,dbName:t.dbName,namespace:t.namespace},a={op:"db",description:e,data:i},s=T[e],r=Array.isArray(this._describeOperations)?this._describeOperations.includes(e):this._describeOperations
|
|
104
104
|
if(!s||!r)return a
|
|
105
105
|
try{if("mapReduce"===e){const[t,e]=n
|
|
106
|
-
i[s[0]]="string"==typeof t?t:t.name||"<anonymous>",i[s[1]]="string"==typeof e?e:e.name||"<anonymous>"}else for(let t=0;t<s.length;t++)i[s[t]]=JSON.stringify(n[t])}catch(t){}return a}}
|
|
107
|
-
class
|
|
106
|
+
i[s[0]]="string"==typeof t?t:t.name||"<anonymous>",i[s[1]]="string"==typeof e?e:e.name||"<anonymous>"}else for(let t=0;t<s.length;t++)i[s[t]]=JSON.stringify(n[t])}catch(t){}return a}}E.__initStatic()
|
|
107
|
+
class S{static __initStatic(){this.id="Prisma"}__init(){this.name=S.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
108
108
|
var e
|
|
109
|
-
|
|
110
|
-
return(0,_.J8)(c)?c.then((t=>(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),c)})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("PrismaIntegration is missing a Prisma Client Instance")}}
|
|
111
|
-
class
|
|
112
|
-
const n=(0,
|
|
113
|
-
n?(0,
|
|
109
|
+
S.prototype.__init.call(this),(e=t.client)&&e.$use?this._client=t.client:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`Unsupported Prisma client provided to PrismaIntegration. Provided client: ${JSON.stringify(t.client)}`)}setupOnce(t,e){this._client?d(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Prisma Integration is skipped because of instrumenter configuration."):this._client.$use(((t,n)=>{const i=s([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=t.action,r=t.model,o=s([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:r?`${r} ${a}`:a,op:"db.sql.prisma"})]),c=n(t)
|
|
110
|
+
return(0,_.J8)(c)?c.then((t=>(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(s([o,"optionalAccess",t=>t.finish,"call",t=>t()]),c)})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("PrismaIntegration is missing a Prisma Client Instance")}}S.__initStatic()
|
|
111
|
+
class y{constructor(){y.prototype.__init.call(this)}static __initStatic(){this.id="GraphQL"}__init(){this.name=y.id}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("GraphQL Integration is skipped because of instrumenter configuration."))
|
|
112
|
+
const n=(0,u.$y)("graphql/execution/execute.js")
|
|
113
|
+
n?(0,h.hl)(n,"execute",(function(t){return function(){const n=e().getScope(),i=s([n,"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=s([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:"execute",op:"graphql.execute"})])
|
|
114
114
|
s([n,"optionalAccess",t=>t.setSpan,"call",t=>t(a)])
|
|
115
115
|
for(var r=arguments.length,o=new Array(r),c=0;c<r;c++)o[c]=arguments[c]
|
|
116
116
|
const d=t.call(this,...o)
|
|
117
|
-
return(0,_.J8)(d)?d.then((t=>(s([a,"optionalAccess",t=>t.finish,"call",t=>t()]),s([n,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),t))):(s([a,"optionalAccess",t=>t.finish,"call",t=>t()]),s([n,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),d)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("GraphQL Integration was unable to require graphql/execution package.")}}
|
|
118
|
-
var
|
|
119
|
-
class
|
|
120
|
-
const n=(0,
|
|
121
|
-
n?(0,
|
|
122
|
-
const n=(0,
|
|
123
|
-
return this.config.resolvers=n.map((t=>(Object.keys(t).forEach((n=>{Object.keys(t[n]).forEach((i=>{"function"==typeof t[n][i]&&function(t,e,n,i){(0,
|
|
117
|
+
return(0,_.J8)(d)?d.then((t=>(s([a,"optionalAccess",t=>t.finish,"call",t=>t()]),s([n,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),t))):(s([a,"optionalAccess",t=>t.finish,"call",t=>t()]),s([n,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),d)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("GraphQL Integration was unable to require graphql/execution package.")}}y.__initStatic()
|
|
118
|
+
var v=n(7209)
|
|
119
|
+
class R{constructor(){R.prototype.__init.call(this)}static __initStatic(){this.id="Apollo"}__init(){this.name=R.id}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Apollo Integration is skipped because of instrumenter configuration."))
|
|
120
|
+
const n=(0,u.$y)("apollo-server-core")
|
|
121
|
+
n?(0,h.hl)(n.ApolloServerBase.prototype,"constructSchema",(function(t){return function(){if(!this.config.resolvers)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this.config.schema?r.kg.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property."):this.config.modules&&r.kg.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),r.kg.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),t.call(this)
|
|
122
|
+
const n=(0,v.lE)(this.config.resolvers)
|
|
123
|
+
return this.config.resolvers=n.map((t=>(Object.keys(t).forEach((n=>{Object.keys(t[n]).forEach((i=>{"function"==typeof t[n][i]&&function(t,e,n,i){(0,h.hl)(t[e],n,(function(t){return function(){const a=s([i().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),r=s([a,"optionalAccess",t=>t.startChild,"call",t=>t({description:`${e}.${n}`,op:"graphql.resolve"})])
|
|
124
124
|
for(var o=arguments.length,c=new Array(o),d=0;d<o;d++)c[d]=arguments[d]
|
|
125
125
|
const p=t.call(this,...c)
|
|
126
|
-
return(0,_.J8)(p)?p.then((t=>(s([r,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(s([r,"optionalAccess",t=>t.finish,"call",t=>t()]),p)}}))}(t,n,i,e)}))})),t))),t.call(this)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Apollo Integration was unable to require apollo-server-core package.")}}
|
|
127
|
-
var
|
|
128
|
-
const
|
|
129
|
-
var
|
|
130
|
-
const
|
|
131
|
-
return s=>{e.value>=0&&(s||n)&&(a=e.value-(i||0),(a||void 0===i)&&(i=e.value,e.delta=a,t(e)))}},
|
|
126
|
+
return(0,_.J8)(p)?p.then((t=>(s([r,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(s([r,"optionalAccess",t=>t.finish,"call",t=>t()]),p)}}))}(t,n,i,e)}))})),t))),t.call(this)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Apollo Integration was unable to require apollo-server-core package.")}}R.__initStatic()
|
|
127
|
+
var b=n(75492),D=n(22850),N=n(68256),B=n(27448),k=n(48206)
|
|
128
|
+
const G=n(27083).n2
|
|
129
|
+
var U=n(88468)
|
|
130
|
+
const Y=(t,e,n)=>{let i,a
|
|
131
|
+
return s=>{e.value>=0&&(s||n)&&(a=e.value-(i||0),(a||void 0===i)&&(i=e.value,e.delta=a,t(e)))}},x=()=>G.__WEB_VITALS_POLYFILL__?G.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=G.performance.timing,e=G.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"}
|
|
132
132
|
for(const i in t)"navigationStart"!==i&&"toJSON"!==i&&(n[i]=Math.max(t[i]-t.navigationStart,0))
|
|
133
|
-
return n})()):
|
|
134
|
-
return t&&t.activationStart||0},
|
|
133
|
+
return n})()):G.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],I=()=>{const t=x()
|
|
134
|
+
return t&&t.activationStart||0},A=(t,e)=>{const n=x()
|
|
135
135
|
let i="navigate"
|
|
136
|
-
return n&&(i=
|
|
137
|
-
return i.observe(Object.assign({type:t,buffered:!0},n||{})),i}}catch(t){}},
|
|
136
|
+
return n&&(i=G.document.prerendering||I()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},C=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const i=new PerformanceObserver((t=>{e(t.getEntries())}))
|
|
137
|
+
return i.observe(Object.assign({type:t,buffered:!0},n||{})),i}}catch(t){}},O=(t,e)=>{const n=i=>{"pagehide"!==i.type&&"hidden"!==G.document.visibilityState||(t(i),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))}
|
|
138
138
|
addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)}
|
|
139
|
-
let
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
function
|
|
143
|
-
return n&&t.startTimestamp>n&&(t.startTimestamp=n),t.startChild({startTimestamp:n,...i})}function
|
|
144
|
-
function
|
|
145
|
-
o&&r&&
|
|
146
|
-
const
|
|
147
|
-
function
|
|
148
|
-
e&&(0,
|
|
139
|
+
let w=-1
|
|
140
|
+
const $=()=>(w<0&&(w="hidden"!==G.document.visibilityState||G.document.prerendering?1/0:0,O((t=>{let{timeStamp:e}=t
|
|
141
|
+
w=e}),!0)),{get firstHiddenTime(){return w}}),L={}
|
|
142
|
+
function M(t){return"number"==typeof t&&isFinite(t)}function P(t,e){let{startTimestamp:n,...i}=e
|
|
143
|
+
return n&&t.startTimestamp>n&&(t.startTimestamp=n),t.startChild({startTimestamp:n,...i})}function q(){return G&&G.addEventListener&&G.performance}let H,F,j=0,z={}
|
|
144
|
+
function X(t,e,n,i,a,s){const r=s?e[s]:e[`${n}End`],o=e[`${n}Start`]
|
|
145
|
+
o&&r&&P(t,{op:"browser",description:a||n,startTimestamp:i+(0,k.XL)(o),endTimestamp:i+(0,k.XL)(r)})}var J=n(8651),Q=n(8142),W=n(98902)
|
|
146
|
+
const Z=["localhost",/^\//],K={traceFetch:!0,traceXHR:!0,tracingOrigins:Z,tracePropagationTargets:Z}
|
|
147
|
+
function V(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:i,tracingOrigins:a,shouldCreateSpanForRequest:s}={traceFetch:K.traceFetch,traceXHR:K.traceXHR,...t},r="function"==typeof s?s:t=>!0,o=t=>function(t,e){return(0,W.U0)(t,e||Z)}(t,i||a),c={}
|
|
148
|
+
e&&(0,Q.o)("fetch",(t=>{!function(t,e,n,i){if(!(0,k.zu)()||!t.fetchData||!e(t.fetchData.url))return
|
|
149
149
|
if(t.endTimestamp){const e=t.fetchData.__span
|
|
150
150
|
if(!e)return
|
|
151
151
|
const n=i[e]
|
|
152
|
-
return void(n&&(t.response?n.setHttpStatus(t.response.status):t.error&&n.setStatus("internal_error"),n.finish(),delete i[e]))}const a=(0,
|
|
152
|
+
return void(n&&(t.response?n.setHttpStatus(t.response.status):t.error&&n.setStatus("internal_error"),n.finish(),delete i[e]))}const a=(0,J.Gd)().getScope(),s=a&&a.getSpan(),r=s&&s.transaction
|
|
153
153
|
if(s&&r){const e=s.startChild({data:{...t.fetchData,type:"fetch"},description:`${t.fetchData.method} ${t.fetchData.url}`,op:"http.client"})
|
|
154
154
|
t.fetchData.__span=e.spanId,i[e.spanId]=e
|
|
155
155
|
const a=t.args[0]
|
|
156
156
|
t.args[1]=t.args[1]||{}
|
|
157
157
|
const o=t.args[1]
|
|
158
|
-
n(t.fetchData.url)&&(o.headers=function(t,e,n,i){const a=(0,
|
|
158
|
+
n(t.fetchData.url)&&(o.headers=function(t,e,n,i){const a=(0,D.IQ)(e),s=n.toTraceparent(),r="undefined"!=typeof Request&&(0,_.V9)(t,Request)?t.headers:i.headers
|
|
159
159
|
if(r){if("undefined"!=typeof Headers&&(0,_.V9)(r,Headers)){const t=new Headers(r)
|
|
160
|
-
return t.append("sentry-trace",s),a&&t.append(
|
|
161
|
-
return a&&t.push([
|
|
162
|
-
return Array.isArray(t)?e.push(...t):t&&e.push(t),a&&e.push(a),{...r,"sentry-trace":s,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":s,baggage:a}}(a,r.getDynamicSamplingContext(),e,o),r.metadata.propagations++)}}(t,r,o,c)})),n&&(0,
|
|
160
|
+
return t.append("sentry-trace",s),a&&t.append(D.bU,a),t}if(Array.isArray(r)){const t=[...r,["sentry-trace",s]]
|
|
161
|
+
return a&&t.push([D.bU,a]),t}{const t="baggage"in r?r.baggage:void 0,e=[]
|
|
162
|
+
return Array.isArray(t)?e.push(...t):t&&e.push(t),a&&e.push(a),{...r,"sentry-trace":s,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":s,baggage:a}}(a,r.getDynamicSamplingContext(),e,o),r.metadata.propagations++)}}(t,r,o,c)})),n&&(0,Q.o)("xhr",(t=>{!function(t,e,n,i){if(!(0,k.zu)()||t.xhr&&t.xhr.__sentry_own_request__||!(t.xhr&&t.xhr.__sentry_xhr__&&e(t.xhr.__sentry_xhr__.url)))return
|
|
163
163
|
const a=t.xhr.__sentry_xhr__
|
|
164
164
|
if(t.endTimestamp){const e=t.xhr.__sentry_xhr_span_id__
|
|
165
165
|
if(!e)return
|
|
166
166
|
const n=i[e]
|
|
167
|
-
return void(n&&(n.setHttpStatus(a.status_code),n.finish(),delete i[e]))}const s=(0,
|
|
167
|
+
return void(n&&(n.setHttpStatus(a.status_code),n.finish(),delete i[e]))}const s=(0,J.Gd)().getScope(),r=s&&s.getSpan(),o=r&&r.transaction
|
|
168
168
|
if(r&&o){const e=r.startChild({data:{...a.data,type:"xhr",method:a.method,url:a.url},description:`${a.method} ${a.url}`,op:"http.client"})
|
|
169
169
|
if(t.xhr.__sentry_xhr_span_id__=e.spanId,i[t.xhr.__sentry_xhr_span_id__]=e,t.xhr.setRequestHeader&&n(t.xhr.__sentry_xhr__.url))try{t.xhr.setRequestHeader("sentry-trace",e.toTraceparent())
|
|
170
|
-
const n=o.getDynamicSamplingContext(),i=(0,
|
|
171
|
-
i&&t.xhr.setRequestHeader(
|
|
172
|
-
if(!
|
|
173
|
-
let i,a=
|
|
174
|
-
e&&(i=t({name:
|
|
175
|
-
void 0===s&&a&&-1!==a.indexOf(n)?a=void 0:s!==n&&(a=void 0,i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.finish()),i=t({name:
|
|
176
|
-
class
|
|
177
|
-
t&&
|
|
170
|
+
const n=o.getDynamicSamplingContext(),i=(0,D.IQ)(n)
|
|
171
|
+
i&&t.xhr.setRequestHeader(D.bU,i),o.metadata.propagations++}catch(t){}}}(t,r,o,c)}))}const tt="BrowserTracing",et={idleTimeout:B.nT,finalTimeout:B.mg,heartbeatInterval:B.hd,markBackgroundTransactions:!0,routingInstrumentation:function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2]
|
|
172
|
+
if(!G||!G.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn("Could not initialize routing instrumentation due to invalid location"))
|
|
173
|
+
let i,a=G.location.href
|
|
174
|
+
e&&(i=t({name:G.location.pathname,op:"pageload",metadata:{source:"url"}})),n&&(0,Q.o)("history",(e=>{let{to:n,from:s}=e
|
|
175
|
+
void 0===s&&a&&-1!==a.indexOf(n)?a=void 0:s!==n&&(a=void 0,i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.finish()),i=t({name:G.location.pathname,op:"navigation",metadata:{source:"url"}}))}))},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...K}
|
|
176
|
+
class nt{__init(){this.name=tt}constructor(t){nt.prototype.__init.call(this),this.options={...et,...t},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),function(){const t=q()
|
|
177
|
+
t&&U.Z1&&(t.mark&&G.performance.mark("sentry-tracing-init"),(t=>{const e=A("CLS",0)
|
|
178
178
|
let n,i=0,a=[]
|
|
179
179
|
const s=t=>{t.forEach((t=>{if(!t.hadRecentInput){const s=a[0],r=a[a.length-1]
|
|
180
|
-
i&&0!==a.length&&t.startTime-r.startTime<1e3&&t.startTime-s.startTime<5e3?(i+=t.value,a.push(t)):(i=t.value,a=[t]),i>e.value&&(e.value=i,e.entries=a,n&&n())}}))},
|
|
181
|
-
|
|
182
|
-
e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding CLS"),
|
|
180
|
+
i&&0!==a.length&&t.startTime-r.startTime<1e3&&t.startTime-s.startTime<5e3?(i+=t.value,a.push(t)):(i=t.value,a=[t]),i>e.value&&(e.value=i,e.entries=a,n&&n())}}))},r=C("layout-shift",s)
|
|
181
|
+
r&&(n=Y(t,e),O((()=>{s(r.takeRecords()),n(!0)})))})((t=>{const e=t.entries.pop()
|
|
182
|
+
e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding CLS"),z.cls={value:t.value,unit:""},F=e)})),(t=>{const e=$(),n=A("LCP")
|
|
183
183
|
let i
|
|
184
184
|
const a=t=>{const a=t[t.length-1]
|
|
185
|
-
if(a){const t=Math.max(a.startTime-
|
|
186
|
-
t<e.firstHiddenTime&&(n.value=t,n.entries=[a],i())}},s
|
|
187
|
-
if(s){i=
|
|
188
|
-
e
|
|
189
|
-
|
|
185
|
+
if(a){const t=Math.max(a.startTime-I(),0)
|
|
186
|
+
t<e.firstHiddenTime&&(n.value=t,n.entries=[a],i())}},s=C("largest-contentful-paint",a)
|
|
187
|
+
if(s){i=Y(t,n)
|
|
188
|
+
const e=()=>{L[n.id]||(a(s.takeRecords()),s.disconnect(),L[n.id]=!0,i(!0))};["keydown","click"].forEach((t=>{addEventListener(t,e,{once:!0,capture:!0})})),O(e,!0)}})((t=>{const e=t.entries.pop()
|
|
189
|
+
e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding LCP"),z.lcp={value:t.value,unit:"millisecond"},H=e)})),(t=>{const e=$(),n=A("FID")
|
|
190
190
|
let i
|
|
191
|
-
const a=t=>{t.startTime<e.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entries.push(t),i(!0))},s=t=>{t.forEach(a)},
|
|
192
|
-
i=
|
|
191
|
+
const a=t=>{t.startTime<e.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entries.push(t),i(!0))},s=t=>{t.forEach(a)},r=C("first-input",s)
|
|
192
|
+
i=Y(t,n),r&&O((()=>{s(r.takeRecords()),r.disconnect()}),!0)})((t=>{const e=t.entries.pop()
|
|
193
193
|
if(!e)return
|
|
194
|
-
const n=(0,
|
|
194
|
+
const n=(0,k.XL)(U.Z1),i=(0,k.XL)(e.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FID"),z.fid={value:t.value,unit:"millisecond"},z["mark.fid"]={value:n+i,unit:"second"}})))}(),this.options.enableLongTask&&C("longtask",(t=>{for(const e of t){const t=(0,k.x1)()
|
|
195
195
|
if(!t)return
|
|
196
|
-
const n=(0,
|
|
196
|
+
const n=(0,k.XL)(U.Z1+e.startTime),i=(0,k.XL)(e.duration)
|
|
197
197
|
t.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:n,endTimestamp:n+i})}}))}setupOnce(t,e){this._getCurrentHub=e
|
|
198
198
|
const{routingInstrumentation:n,startTransactionOnLocationChange:i,startTransactionOnPageLoad:a,markBackgroundTransactions:s,traceFetch:o,traceXHR:c,tracePropagationTargets:_,shouldCreateSpanForRequest:d,_experiments:p}=this.options
|
|
199
|
-
n((t=>this._createRouteTransaction(t)),a,i),s&&(
|
|
200
|
-
if(
|
|
201
|
-
const{beforeNavigate:e,idleTimeout:n,finalTimeout:i,heartbeatInterval:s}=this.options,o="pageload"===t.op,c=o?
|
|
199
|
+
n((t=>this._createRouteTransaction(t)),a,i),s&&(G&&G.document?G.document.addEventListener("visibilitychange",(()=>{const t=(0,k.x1)()
|
|
200
|
+
if(G.document.hidden&&t){const e="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn("[Tracing] Could not set up background tab detection due to lack of global document")),p.enableInteractions&&this._registerInteractionListener(),V({traceFetch:o,traceXHR:c,tracePropagationTargets:_,shouldCreateSpanForRequest:d})}_createRouteTransaction(t){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`))
|
|
201
|
+
const{beforeNavigate:e,idleTimeout:n,finalTimeout:i,heartbeatInterval:s}=this.options,o="pageload"===t.op,c=o?it("sentry-trace"):null,_=o?it("baggage"):null,d=c?(0,b.q)(c):void 0,p=_?(0,D.EN)(_):void 0,l={...t,...d,metadata:{...t.metadata,dynamicSamplingContext:d&&!p?{}:p},trimEnd:!0},u="function"==typeof e?e(l):l,h=void 0===u?{...l,sampled:!1}:u
|
|
202
202
|
h.metadata=h.name!==l.name?{...h.metadata,source:"custom"}:h.metadata,this._latestRouteName=h.name,this._latestRouteSource=h.metadata&&h.metadata.source,!1===h.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Will not send ${h.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Starting ${h.op} transaction on scope`)
|
|
203
|
-
const m=this._getCurrentHub(),{location:g}=
|
|
204
|
-
return f.registerBeforeFinishCallback((t=>{!function(t){const e=
|
|
205
|
-
if(!e||!
|
|
206
|
-
const n=(0,
|
|
203
|
+
const m=this._getCurrentHub(),{location:g}=G,f=(0,a.lb)(m,h,n,i,!0,{location:g},s)
|
|
204
|
+
return f.registerBeforeFinishCallback((t=>{!function(t){const e=q()
|
|
205
|
+
if(!e||!G.performance.getEntries||!U.Z1)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Tracing] Adding & adjusting spans using Performance API")
|
|
206
|
+
const n=(0,k.XL)(U.Z1),i=e.getEntries()
|
|
207
207
|
let a,s
|
|
208
|
-
if(i.slice(
|
|
209
|
-
if(!("navigation"===t.op&&n+i<t.startTimestamp))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((i=>{
|
|
208
|
+
if(i.slice(j).forEach((e=>{const i=(0,k.XL)(e.startTime),o=(0,k.XL)(e.duration)
|
|
209
|
+
if(!("navigation"===t.op&&n+i<t.startTimestamp))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((i=>{X(t,e,i,n)})),X(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),X(t,e,"fetch",n,"cache","domainLookupStart"),X(t,e,"domainLookup",n,"DNS"),function(t,e,n){P(t,{op:"browser",description:"request",startTimestamp:n+(0,k.XL)(e.requestStart),endTimestamp:n+(0,k.XL)(e.responseEnd)}),P(t,{op:"browser",description:"response",startTimestamp:n+(0,k.XL)(e.responseStart),endTimestamp:n+(0,k.XL)(e.responseEnd)})}(t,e,n)}(t,e,n),a=n+(0,k.XL)(e.responseStart),s=n+(0,k.XL)(e.requestStart)
|
|
210
210
|
break
|
|
211
211
|
case"mark":case"paint":case"measure":{!function(t,e,n,i,a){const s=a+n,r=s+i
|
|
212
|
-
|
|
213
|
-
const a
|
|
214
|
-
"first-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FP"),
|
|
215
|
-
break}case"resource":{const a=e.name.replace(
|
|
212
|
+
P(t,{description:e.name,endTimestamp:r,op:e.entryType,startTimestamp:s})}(t,e,i,o,n)
|
|
213
|
+
const a=$(),s=e.startTime<a.firstHiddenTime
|
|
214
|
+
"first-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FP"),z.fp={value:e.startTime,unit:"millisecond"}),"first-contentful-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FCP"),z.fcp={value:e.startTime,unit:"millisecond"})
|
|
215
|
+
break}case"resource":{const a=e.name.replace(G.location.origin,"")
|
|
216
216
|
!function(t,e,n,i,a,s){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return
|
|
217
217
|
const r={}
|
|
218
218
|
"transferSize"in e&&(r["Transfer Size"]=e.transferSize),"encodedBodySize"in e&&(r["Encoded Body Size"]=e.encodedBodySize),"decodedBodySize"in e&&(r["Decoded Body Size"]=e.decodedBodySize)
|
|
219
219
|
const o=s+i
|
|
220
|
-
|
|
221
|
-
break}}})),
|
|
220
|
+
P(t,{description:n,endTimestamp:o+a,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",startTimestamp:o,data:r})}(t,e,a,i,o,n)
|
|
221
|
+
break}}})),j=Math.max(i.length-1,0),function(t){const e=G.navigator
|
|
222
222
|
if(!e)return
|
|
223
223
|
const n=e.connection
|
|
224
|
-
n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),
|
|
225
|
-
const i=
|
|
226
|
-
const e=
|
|
227
|
-
e&&
|
|
224
|
+
n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),M(n.rtt)&&(z["connection.rtt"]={value:n.rtt,unit:"millisecond"})),M(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),M(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}(t),"pageload"===t.op){"number"==typeof a&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding TTFB"),z.ttfb={value:1e3*(a-t.startTimestamp),unit:"millisecond"},"number"==typeof s&&s<=a&&(z["ttfb.requestTime"]={value:1e3*(a-s),unit:"millisecond"})),["fcp","fp","lcp"].forEach((e=>{if(!z[e]||n>=t.startTimestamp)return
|
|
225
|
+
const i=z[e].value,a=n+(0,k.XL)(i),s=Math.abs(1e3*(a-t.startTimestamp)),o=s-i;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Measurements] Normalized ${e} from ${i} to ${s} (${o})`),z[e].value=s}))
|
|
226
|
+
const e=z["mark.fid"]
|
|
227
|
+
e&&z.fid&&(P(t,{description:"first input delay",endTimestamp:e.value+(0,k.XL)(z.fid.value),op:"ui.action",startTimestamp:e.value}),delete z["mark.fid"]),"fcp"in z||delete z.cls,Object.keys(z).forEach((e=>{t.setMeasurement(e,z[e].value,z[e].unit)})),function(t){H&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding LCP Data"),H.element&&t.setTag("lcp.element",(0,N.Rt)(H.element)),H.id&&t.setTag("lcp.id",H.id),H.url&&t.setTag("lcp.url",H.url.trim().slice(0,200)),t.setTag("lcp.size",H.size)),F&&F.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding CLS Data"),F.sources.forEach(((e,n)=>t.setTag(`cls.source.${n+1}`,(0,N.Rt)(e.node)))))}(t)}H=void 0,F=void 0,z={}}(t)})),f}_registerInteractionListener(){let t
|
|
228
228
|
const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:i}=this.options,s="ui.action.click"
|
|
229
229
|
if(t&&(t.finish(),t=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${s} transaction because _getCurrentHub is invalid.`))
|
|
230
230
|
if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${s} transaction because _latestRouteName is missing.`))
|
|
231
|
-
const o=this._getCurrentHub(),{location:c}=
|
|
232
|
-
t=(0,a.lb)(o,_,e,n,!0,{location:c},i)};["click"].forEach((t=>{addEventListener(t,e,{once:!1,capture:!0})}))}}function
|
|
233
|
-
return e?e.getAttribute("content"):null}var
|
|
234
|
-
!function(t){t.Ok="ok",t.DeadlineExceeded="deadline_exceeded",t.Unauthenticated="unauthenticated",t.PermissionDenied="permission_denied",t.NotFound="not_found",t.ResourceExhausted="resource_exhausted",t.InvalidArgument="invalid_argument",t.Unimplemented="unimplemented",t.Unavailable="unavailable",t.InternalError="internal_error",t.UnknownError="unknown_error",t.Cancelled="cancelled",t.AlreadyExists="already_exists",t.FailedPrecondition="failed_precondition",t.Aborted="aborted",t.OutOfRange="out_of_range",t.DataLoss="data_loss"}(
|
|
235
|
-
var
|
|
231
|
+
const o=this._getCurrentHub(),{location:c}=G,_={name:this._latestRouteName,op:s,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}}
|
|
232
|
+
t=(0,a.lb)(o,_,e,n,!0,{location:c},i)};["click"].forEach((t=>{addEventListener(t,e,{once:!1,capture:!0})}))}}function it(t){const e=(0,N.qT)(`meta[name=${t}]`)
|
|
233
|
+
return e?e.getAttribute("content"):null}var at,st=n(20484)
|
|
234
|
+
!function(t){t.Ok="ok",t.DeadlineExceeded="deadline_exceeded",t.Unauthenticated="unauthenticated",t.PermissionDenied="permission_denied",t.NotFound="not_found",t.ResourceExhausted="resource_exhausted",t.InvalidArgument="invalid_argument",t.Unimplemented="unimplemented",t.Unavailable="unavailable",t.InternalError="internal_error",t.UnknownError="unknown_error",t.Cancelled="cancelled",t.AlreadyExists="already_exists",t.FailedPrecondition="failed_precondition",t.Aborted="aborted",t.OutOfRange="out_of_range",t.DataLoss="data_loss"}(at||(at={}))
|
|
235
|
+
var rt=n(21535);("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&(0,a.ro)()},20484:(t,e,n)=>{n.d(e,{Dr:()=>c,Zd:()=>_,gB:()=>o})
|
|
236
236
|
var i=n(7209),a=n(88468),s=n(88521),r=n(15834)
|
|
237
237
|
class o{__init(){this.spans=[]}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3
|
|
238
238
|
o.prototype.__init.call(this),this._maxlen=t}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class c{__init2(){this.traceId=(0,i.DM)()}__init3(){this.spanId=(0,i.DM)().substring(16)}__init4(){this.startTimestamp=(0,a._I)()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(t){if(c.prototype.__init2.call(this),c.prototype.__init3.call(this),c.prototype.__init4.call(this),c.prototype.__init5.call(this),c.prototype.__init6.call(this),c.prototype.__init7.call(this),!t)return this
|
|
@@ -276,4 +276,4 @@ function a(t){const e=(0,i.Gd)().getClient(),n=t||e&&e.getOptions()
|
|
|
276
276
|
return!!n&&("tracesSampleRate"in n||"tracesSampler"in n)}function s(t){const e=(t||(0,i.Gd)()).getScope()
|
|
277
277
|
return e&&e.getTransaction()}function r(t){return t/1e3}}}])
|
|
278
278
|
|
|
279
|
-
//# sourceMappingURL=chunk.79.
|
|
279
|
+
//# sourceMappingURL=chunk.79.ec143a398298020c87e6.map
|