ghost 5.0.1 → 5.1.1
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/content/themes/casper/assets/built/screen.css +1 -1
- package/content/themes/casper/assets/built/screen.css.map +1 -1
- package/content/themes/casper/assets/css/screen.css +303 -35
- package/content/themes/casper/default.hbs +17 -7
- package/content/themes/casper/package.json +3 -2
- package/content/themes/casper/partials/icons/facebook.hbs +1 -1
- package/content/themes/casper/partials/icons/fire.hbs +3 -0
- package/content/themes/casper/partials/icons/lock.hbs +5 -0
- package/content/themes/casper/partials/icons/twitter.hbs +1 -1
- package/content/themes/casper/partials/post-card.hbs +39 -19
- package/content/themes/casper/post.hbs +20 -9
- package/core/built/assets/{chunk.3.52b444495dfcf50afb0b.js → chunk.3.dc389a0f93cb5fabd695.js} +19 -19
- package/core/built/assets/{ghost-dark-b6e3268bcae976a8675b0d9ae54540f2.css → ghost-dark-2c7356ee2c7b16f27a1f97932bd67e0b.css} +1 -1
- package/core/built/assets/{ghost.min-2cc3688ea6600a54e0cd83107a8577e8.js → ghost.min-95041d583ba9b90f587a92839509ebd6.js} +300 -302
- package/core/built/assets/{ghost.min-a40c7b301c702bd84c2fae19366ab5d7.css → ghost.min-e8119caef1eb246cf596cd83eb67b97e.css} +1 -1
- package/core/built/assets/{vendor.min-2bca41946dea27dc292428db605d466d.js → vendor.min-ea369e6487643585f35409d474b06789.js} +77 -94
- package/core/frontend/helpers/tiers.js +1 -16
- package/core/frontend/services/rendering/context.js +0 -3
- package/core/frontend/services/rendering/format-response.js +5 -1
- package/core/frontend/services/routing/controllers/static.js +4 -1
- package/core/frontend/services/routing/controllers/unsubscribe.js +10 -34
- package/core/frontend/web/middleware/handle-image-sizes.js +50 -10
- package/core/frontend/web/middleware/serve-favicon.js +3 -18
- package/core/server/api/canary/utils/serializers/output/mappers/posts.js +1 -4
- package/core/server/api/canary/utils/serializers/output/members.js +11 -14
- package/core/server/api/canary/utils/serializers/output/settings.js +13 -0
- package/core/server/api/canary/utils/validators/input/images.js +32 -18
- package/core/server/api/canary/utils/validators/input/settings.js +6 -0
- package/core/server/lib/image/blog-icon.js +51 -27
- package/core/server/lib/mobiledoc.js +1 -1
- package/core/server/models/member.js +0 -12
- package/core/server/models/relations/authors.js +0 -19
- package/core/server/services/invites/invites.js +1 -0
- package/core/server/services/mega/mega.js +0 -55
- package/core/server/services/members/utils.js +1 -3
- package/core/server/services/webhooks/webhooks-service.js +1 -1
- package/core/server/web/admin/views/default-prod.html +4 -4
- package/core/server/web/admin/views/default.html +4 -4
- package/core/server/web/api/middleware/normalize-image.js +1 -1
- package/core/shared/config/overrides.json +5 -2
- package/core/shared/labs.js +2 -13
- package/package.json +16 -16
- package/yarn.lock +239 -139
|
@@ -1,33 +1,53 @@
|
|
|
1
1
|
{{!-- This is a partial file used to generate a post "card"
|
|
2
2
|
which templates loop over to generate a list of posts. --}}
|
|
3
3
|
|
|
4
|
-
<article class="post-card {{post_class}}{{#match @custom.feed_layout "Classic"}}{{#is "home"}}{{#has index="0"}} post-card-large{{/has}}{{#has index="1,2"}} dynamic{{/has}}{{/is}}{{/match}}{{#match @custom.feed_layout "Grid"}} keep-ratio{{/match}}{{#match @custom.feed_layout "List"}}{{#is "home"}} post-card-large{{/is}}{{/match}}">
|
|
4
|
+
<article class="post-card {{post_class}}{{#match @custom.feed_layout "Classic"}}{{#is "home"}}{{#has index="0"}} post-card-large{{/has}}{{#has index="1,2"}} dynamic{{/has}}{{/is}}{{/match}}{{#match @custom.feed_layout "Grid"}} keep-ratio{{/match}}{{#match @custom.feed_layout "List"}}{{#is "home"}} post-card-large{{/is}}{{/match}} post-access-{{visibility}}">
|
|
5
5
|
|
|
6
6
|
{{#if feature_image}}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
<a class="post-card-image-link" href="{{url}}">
|
|
8
|
+
|
|
9
|
+
{{!-- This is a responsive image, it loads different sizes depending on device
|
|
10
|
+
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
|
|
11
|
+
<img class="post-card-image"
|
|
12
|
+
srcset="{{img_url feature_image size="s"}} 300w,
|
|
13
|
+
{{img_url feature_image size="m"}} 600w,
|
|
14
|
+
{{img_url feature_image size="l"}} 1000w,
|
|
15
|
+
{{img_url feature_image size="xl"}} 2000w"
|
|
16
|
+
sizes="(max-width: 1000px) 400px, 800px"
|
|
17
|
+
src="{{img_url feature_image size="m"}}"
|
|
18
|
+
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
|
|
19
|
+
loading="lazy"
|
|
20
|
+
/>
|
|
21
|
+
|
|
22
|
+
{{^has visibility="public"}}
|
|
23
|
+
<div class="post-card-access">
|
|
24
|
+
{{> "icons/lock"}} Members-only
|
|
25
|
+
</div>
|
|
26
|
+
{{/has}}
|
|
27
|
+
|
|
28
|
+
</a>
|
|
21
29
|
{{/if}}
|
|
22
30
|
|
|
23
31
|
<div class="post-card-content">
|
|
24
32
|
|
|
25
33
|
<a class="post-card-content-link" href="{{url}}">
|
|
26
34
|
<header class="post-card-header">
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
<div class="post-card-tags">
|
|
36
|
+
{{#primary_tag}}
|
|
37
|
+
<span class="post-card-primary-tag">{{name}}</span>
|
|
38
|
+
{{/primary_tag}}
|
|
39
|
+
{{#if featured}}
|
|
40
|
+
<span class="post-card-featured">{{> "icons/fire"}} Featured</span>
|
|
41
|
+
{{/if}}
|
|
42
|
+
</div>
|
|
43
|
+
<h2 class="post-card-title">
|
|
44
|
+
{{^has visibility="public"}}
|
|
45
|
+
{{#unless feature_image}}
|
|
46
|
+
{{> "icons/lock"}}
|
|
47
|
+
{{/unless}}
|
|
48
|
+
{{/has}}
|
|
49
|
+
{{title}}
|
|
50
|
+
</h2>
|
|
31
51
|
</header>
|
|
32
52
|
{{#if excerpt}}
|
|
33
53
|
<div class="post-card-excerpt">{{excerpt}}</div>
|
|
@@ -12,11 +12,16 @@ into the {body} tag of the default.hbs template --}}
|
|
|
12
12
|
|
|
13
13
|
<header class="article-header gh-canvas">
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
<div class="article-tag post-card-tags">
|
|
16
|
+
{{#primary_tag}}
|
|
17
|
+
<span class="post-card-primary-tag">
|
|
18
|
+
<a href="{{url}}">{{name}}</a>
|
|
19
|
+
</span>
|
|
20
|
+
{{/primary_tag}}
|
|
21
|
+
{{#if featured}}
|
|
22
|
+
<span class="post-card-featured">{{> "icons/fire"}} Featured</span>
|
|
23
|
+
{{/if}}
|
|
24
|
+
</div>
|
|
20
25
|
|
|
21
26
|
<h1 class="article-title">{{title}}</h1>
|
|
22
27
|
|
|
@@ -45,7 +50,9 @@ into the {body} tag of the default.hbs template --}}
|
|
|
45
50
|
<h4 class="author-name">{{authors}}</h4>
|
|
46
51
|
<div class="byline-meta-content">
|
|
47
52
|
<time class="byline-meta-date" datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time>
|
|
48
|
-
|
|
53
|
+
{{#if reading_time}}
|
|
54
|
+
<span class="byline-reading-time"><span class="bull">•</span> {{reading_time}}</span>
|
|
55
|
+
{{/if}}
|
|
49
56
|
</div>
|
|
50
57
|
</div>
|
|
51
58
|
|
|
@@ -89,7 +96,9 @@ into the {body} tag of the default.hbs template --}}
|
|
|
89
96
|
</main>
|
|
90
97
|
|
|
91
98
|
{{!-- A signup call to action is displayed here, unless viewed as a logged-in member --}}
|
|
92
|
-
{{#
|
|
99
|
+
{{#if @site.members_enabled}}
|
|
100
|
+
{{#unless @member}}
|
|
101
|
+
{{#if access}}
|
|
93
102
|
<section class="footer-cta outer">
|
|
94
103
|
<div class="inner">
|
|
95
104
|
{{#if @custom.email_signup_text}}<h2 class="footer-cta-title">{{@custom.email_signup_text}}</h2>{{/if}}
|
|
@@ -101,7 +110,9 @@ into the {body} tag of the default.hbs template --}}
|
|
|
101
110
|
making the form validation and submission much simpler. --}}
|
|
102
111
|
</div>
|
|
103
112
|
</section>
|
|
104
|
-
{{/if}}
|
|
113
|
+
{{/if}}
|
|
114
|
+
{{/unless}}
|
|
115
|
+
{{/if}}
|
|
105
116
|
|
|
106
117
|
|
|
107
118
|
{{!-- Read more links, just above the footer --}}
|
|
@@ -111,7 +122,7 @@ into the {body} tag of the default.hbs template --}}
|
|
|
111
122
|
|
|
112
123
|
This query gets the latest 3 posts on the site, but adds a filter to
|
|
113
124
|
exclude the post we're currently on from being included. --}}
|
|
114
|
-
{{#get "posts" filter="id:-{{id}}"
|
|
125
|
+
{{#get "posts" filter="id:-{{id}}" limit="3" as |more_posts|}}
|
|
115
126
|
|
|
116
127
|
{{#if more_posts}}
|
|
117
128
|
<aside class="read-more-wrap outer">
|
package/core/built/assets/{chunk.3.52b444495dfcf50afb0b.js → chunk.3.dc389a0f93cb5fabd695.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(window.webpackJsonp_ember_auto_import_=window.webpackJsonp_ember_auto_import_||[]).push([[3],{
|
|
1
|
+
(window.webpackJsonp_ember_auto_import_=window.webpackJsonp_ember_auto_import_||[]).push([[3],{629:function(t,e,n){"use strict"
|
|
2
2
|
n.r(e),n.d(e,"Integrations",(function(){return i})),n.d(e,"BrowserTracing",(function(){return Y})),n.d(e,"Span",(function(){return W.a})),n.d(e,"Transaction",(function(){return J.a})),n.d(e,"registerRequestInstrumentation",(function(){return B})),n.d(e,"defaultRequestInstrumentationOptions",(function(){return L})),n.d(e,"SpanStatus",(function(){return y.a})),n.d(e,"IdleTransaction",(function(){return _.b})),n.d(e,"startIdleTransaction",(function(){return a.b})),n.d(e,"addExtensionMethods",(function(){return a.a})),n.d(e,"extractTraceparentData",(function(){return O.b})),n.d(e,"getActiveTransaction",(function(){return O.c})),n.d(e,"hasTracingEnabled",(function(){return O.d})),n.d(e,"stripUrlQueryAndFragment",(function(){return G.i})),n.d(e,"TRACEPARENT_REGEXP",(function(){return O.a}))
|
|
3
3
|
var i={}
|
|
4
4
|
n.r(i),n.d(i,"Express",(function(){return o})),n.d(i,"Postgres",(function(){return m})),n.d(i,"Mysql",(function(){return h})),n.d(i,"Mongo",(function(){return g})),n.d(i,"BrowserTracing",(function(){return Y}))
|
|
5
|
-
var a=n(
|
|
5
|
+
var a=n(633),r=n(0),s=n(19),o=function(){function t(e){void 0===e&&(e={}),this.name=t.id,this._router=e.router||e.app,this._methods=(Array.isArray(e.methods)?e.methods:[]).concat("use")}return t.prototype.setupOnce=function(){this._router?function(t,e){void 0===e&&(e=[]),e.forEach((function(e){return function(t,e){var n=t[e]
|
|
6
6
|
return t[e]=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i]
|
|
7
7
|
return n.call.apply(n,Object(r.e)([this],u(t,e)))},t}(t,e)}))}(this._router,this._methods):s.b.error("ExpressIntegration is missing an Express instance")},t.id="Express",t}()
|
|
8
8
|
function c(t,e){var n=t.length
|
|
@@ -41,7 +41,7 @@ return t.call.apply(t,Object(r.e)([this],u.slice(0,-1),[function(t,e){var n
|
|
|
41
41
|
null===(n=g)||void 0===n||n.finish(),p(t,e)}]))}}))}},t.prototype._getSpanContextFromOperationArguments=function(t,e,n){var i={collectionName:t.collectionName,dbName:t.dbName,namespace:t.namespace},a={op:"db",description:e,data:i},s=v[e],o=Array.isArray(this._describeOperations)?this._describeOperations.includes(e):this._describeOperations
|
|
42
42
|
if(!s||!o)return a
|
|
43
43
|
try{if("mapReduce"===e){var c=Object(r.c)(n,2),u=c[0],d=c[1]
|
|
44
|
-
i[s[0]]="string"==typeof u?u:u.name||"<anonymous>",i[s[1]]="string"==typeof d?d:d.name||"<anonymous>"}else for(var p=0;p<s.length;p++)i[s[p]]=JSON.stringify(n[p])}catch(t){}return a},t.id="Mongo",t}(),b=n(5),_=n(
|
|
44
|
+
i[s[0]]="string"==typeof u?u:u.name||"<anonymous>",i[s[1]]="string"==typeof d?d:d.name||"<anonymous>"}else for(var p=0;p<s.length;p++)i[s[p]]=JSON.stringify(n[p])}catch(t){}return a},t.id="Mongo",t}(),b=n(5),_=n(634),y=n(632),O=n(631),T=n(638),j=Object(b.a)(),S=n(81),E=n(31),x=function(t,e,n){var i
|
|
45
45
|
return function(a){e.value>=0&&(a||n)&&(e.delta=e.value-(i||0),(e.delta||void 0===i)&&(i=e.value,t(e)))}},I=function(t,e){return{name:t,value:null!=e?e:-1,delta:0,entries:[],id:"v2-"+Date.now()+"-"+(Math.floor(8999999999999*Math.random())+1e12)}},C=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){if("first-input"===t&&!("PerformanceEventTiming"in self))return
|
|
46
46
|
var n=new PerformanceObserver((function(t){return t.getEntries().map(e)}))
|
|
47
47
|
return n.observe({type:t,buffered:!0}),n}}catch(t){}},k=function(t,e){var n=function(i){"pagehide"!==i.type&&"hidden"!==Object(b.a)().document.visibilityState||(t(i),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))}
|
|
@@ -117,15 +117,15 @@ if(e)return Object(O.b)(e)}():void 0,d=Object(r.a)(Object(r.a)(Object(r.a)({},t)
|
|
|
117
117
|
!1===l.sampled&&s.b.log("[Tracing] Will not send "+l.op+" transaction because of beforeNavigate."),s.b.log("[Tracing] Starting "+l.op+" transaction on scope")
|
|
118
118
|
var m=this._getCurrentHub(),h=Object(b.a)().location,f=Object(a.b)(m,l,o,!0,{location:h})
|
|
119
119
|
return f.registerBeforeFinishCallback((function(t,n){e._metrics.addPerformanceEntries(t),function(t,e,n){var i=n-e.startTimestamp
|
|
120
|
-
n&&(i>t||i<0)&&(e.setStatus(y.a.DeadlineExceeded),e.setTag("maxTransactionDurationExceeded","true"))}(Object(O.f)(c),t,n)})),f.setTag("idleTimeout",this._configuredIdleTimeout),f}s.b.warn("[Tracing] Did not create "+t.op+" transaction because _getCurrentHub is invalid.")},t.id="BrowserTracing",t}(),W=n(
|
|
121
|
-
Object(a.a)()},
|
|
120
|
+
n&&(i>t||i<0)&&(e.setStatus(y.a.DeadlineExceeded),e.setTag("maxTransactionDurationExceeded","true"))}(Object(O.f)(c),t,n)})),f.setTag("idleTimeout",this._configuredIdleTimeout),f}s.b.warn("[Tracing] Did not create "+t.op+" transaction because _getCurrentHub is invalid.")},t.id="BrowserTracing",t}(),W=n(635),J=n(636),G=n(83)
|
|
121
|
+
Object(a.a)()},631:function(t,e,n){"use strict"
|
|
122
122
|
n.d(e,"a",(function(){return a})),n.d(e,"d",(function(){return r})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return o})),n.d(e,"e",(function(){return c})),n.d(e,"f",(function(){return u}))
|
|
123
|
-
var i=n(
|
|
123
|
+
var i=n(630),a=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$")
|
|
124
124
|
function r(t){var e
|
|
125
125
|
return void 0===t&&(t=null===(e=Object(i.b)().getClient())||void 0===e?void 0:e.getOptions()),!!t&&("tracesSampleRate"in t||"tracesSampler"in t)}function s(t){var e=t.match(a)
|
|
126
126
|
if(e){var n=void 0
|
|
127
127
|
return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}}function o(t){var e,n
|
|
128
|
-
return void 0===t&&(t=Object(i.b)()),null===(n=null===(e=t)||void 0===e?void 0:e.getScope())||void 0===n?void 0:n.getTransaction()}function c(t){return t/1e3}function u(t){return 1e3*t}},
|
|
128
|
+
return void 0===t&&(t=Object(i.b)()),null===(n=null===(e=t)||void 0===e?void 0:e.getScope())||void 0===n?void 0:n.getTransaction()}function c(t){return t/1e3}function u(t){return 1e3*t}},632:function(t,e,n){"use strict"
|
|
129
129
|
var i
|
|
130
130
|
n.d(e,"a",(function(){return i})),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"}(i||(i={})),function(t){t.fromHttpCode=function(e){if(e<400&&e>=100)return t.Ok
|
|
131
131
|
if(e>=400&&e<500)switch(e){case 401:return t.Unauthenticated
|
|
@@ -137,8 +137,8 @@ case 429:return t.ResourceExhausted
|
|
|
137
137
|
default:return t.InvalidArgument}if(e>=500&&e<600)switch(e){case 501:return t.Unimplemented
|
|
138
138
|
case 503:return t.Unavailable
|
|
139
139
|
case 504:return t.DeadlineExceeded
|
|
140
|
-
default:return t.InternalError}return t.UnknownError}}(i||(i={}))},
|
|
141
|
-
var i=n(0),a=n(
|
|
140
|
+
default:return t.InternalError}return t.UnknownError}}(i||(i={}))},633:function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return f})),n.d(e,"a",(function(){return v}))
|
|
141
|
+
var i=n(0),a=n(630),r=n(91),s=n(19),o=n(18),c=n(639),u=n(634),d=n(636),p=n(631)
|
|
142
142
|
function l(){var t=this.getScope()
|
|
143
143
|
if(t){var e=t.getSpan()
|
|
144
144
|
if(e)return{"sentry-trace":e.toTraceparent()}}return{}}function m(t,e,n){return Object(p.d)(e)?void 0!==t.sampled?(t.setMetadata({transactionSampling:{method:r.a.Explicit}}),t):("function"==typeof e.tracesSampler?(i=e.tracesSampler(n),t.setMetadata({transactionSampling:{method:r.a.Sampler,rate:Number(i)}})):void 0!==n.parentSampled?(i=n.parentSampled,t.setMetadata({transactionSampling:{method:r.a.Inheritance}})):(i=e.tracesSampleRate,t.setMetadata({transactionSampling:{method:r.a.Rate,rate:Number(i)}})),function(t){return isNaN(t)||"number"!=typeof t&&"boolean"!=typeof t?(s.b.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got "+JSON.stringify(t)+" of type "+JSON.stringify(typeof t)+"."),!1):!(t<0||t>1)||(s.b.warn("[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got "+t+"."),!1)}(i)?i?(t.sampled=Math.random()<i,t.sampled?(s.b.log("[Tracing] starting "+t.op+" transaction - "+t.name),t):(s.b.log("[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = "+Number(i)+")"),t)):(s.b.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(s.b.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)):(t.sampled=!1,t)
|
|
@@ -146,9 +146,9 @@ var i}function h(t,e){var n,a,r=(null===(n=this.getClient())||void 0===n?void 0:
|
|
|
146
146
|
return(s=m(s,r,Object(i.a)({parentSampled:t.parentSampled,transactionContext:t},e))).sampled&&s.initSpanRecorder(null===(a=r._experiments)||void 0===a?void 0:a.maxSpans),s}function f(t,e,n,a,r){var s,o,c=(null===(s=t.getClient())||void 0===s?void 0:s.getOptions())||{},d=new u.b(e,t,n,a)
|
|
147
147
|
return(d=m(d,c,Object(i.a)({parentSampled:e.parentSampled,transactionContext:e},r))).sampled&&d.initSpanRecorder(null===(o=c._experiments)||void 0===o?void 0:o.maxSpans),d}function v(){var e;(e=Object(a.d)()).__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=h),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=l)),Object(o.b)()&&function(){var e=Object(a.d)()
|
|
148
148
|
if(e.__SENTRY__){var n={mongodb:function(){return new(Object(o.a)(t,"./integrations/node/mongo").Mongo)},mongoose:function(){return new(Object(o.a)(t,"./integrations/node/mongo").Mongo)({mongoose:!0})},mysql:function(){return new(Object(o.a)(t,"./integrations/node/mysql").Mysql)},pg:function(){return new(Object(o.a)(t,"./integrations/node/postgres").Postgres)}},r=Object.keys(n).filter((function(t){return!!Object(o.c)(t)})).map((function(t){try{return n[t]()}catch(t){return}})).filter((function(t){return t}))
|
|
149
|
-
r.length>0&&(e.__SENTRY__.integrations=Object(i.e)(e.__SENTRY__.integrations||[],r))}}(),Object(c.a)()}}).call(this,n(46)(t))},
|
|
149
|
+
r.length>0&&(e.__SENTRY__.integrations=Object(i.e)(e.__SENTRY__.integrations||[],r))}}(),Object(c.a)()}}).call(this,n(46)(t))},634:function(t,e,n){"use strict"
|
|
150
150
|
n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return l}))
|
|
151
|
-
var i=n(0),a=n(81),r=n(19),s=n(
|
|
151
|
+
var i=n(0),a=n(81),r=n(19),s=n(638),o=n(635),c=n(632),u=n(636),d=1e3,p=function(t){function e(e,n,i,a){void 0===i&&(i="")
|
|
152
152
|
var r=t.call(this,a)||this
|
|
153
153
|
return r._pushActivity=e,r._popActivity=n,r.transactionSpanId=i,r}return Object(i.b)(e,t),e.prototype.add=function(e){var n=this
|
|
154
154
|
e.spanId!==this.transactionSpanId&&(e.finish=function(t){e.endTimestamp="number"==typeof t?t:Object(a.e)(),n._popActivity(e.spanId)},void 0===e.endTimestamp&&this._pushActivity(e.spanId)),t.prototype.add.call(this,e)},e}(o.b),l=function(t){function e(e,n,i,a){void 0===i&&(i=d),void 0===a&&(a=!1)
|
|
@@ -166,9 +166,9 @@ setTimeout((function(){e._finished||(e.setTag(s.a,s.b[1]),e.finish(i))}),n)}},e.
|
|
|
166
166
|
t===this._prevHeartbeatString?this._heartbeatCounter+=1:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(r.b.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus(c.a.DeadlineExceeded),this.setTag(s.a,s.b[0]),this.finish()):this._pingHeartbeat()}},e.prototype._pingHeartbeat=function(){var t=this
|
|
167
167
|
r.b.log("pinging Heartbeat -> current counter: "+this._heartbeatCounter),setTimeout((function(){t._beat()}),5e3)},e}(u.a)
|
|
168
168
|
function m(t){if(t){var e=t.getScope()
|
|
169
|
-
e&&e.getTransaction()&&e.setSpan(void 0)}}},
|
|
169
|
+
e&&e.getTransaction()&&e.setSpan(void 0)}}},635:function(t,e,n){"use strict"
|
|
170
170
|
n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return u}))
|
|
171
|
-
var i=n(0),a=n(83),r=n(81),s=n(7),o=n(
|
|
171
|
+
var i=n(0),a=n(83),r=n(81),s=n(7),o=n(632),c=function(){function t(t){void 0===t&&(t=1e3),this.spans=[],this._maxlen=t}return t.prototype.add=function(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)},t}(),u=function(){function t(t){if(this.traceId=Object(a.j)(),this.spanId=Object(a.j)().substring(16),this.startTimestamp=Object(r.e)(),this.tags={},this.data={},!t)return this
|
|
172
172
|
t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp)}return t.prototype.child=function(t){return this.startChild(t)},t.prototype.startChild=function(e){var n=new t(Object(i.a)(Object(i.a)({},e),{parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId}))
|
|
173
173
|
return n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n),n.transaction=this.transaction,n},t.prototype.setTag=function(t,e){var n
|
|
174
174
|
return this.tags=Object(i.a)(Object(i.a)({},this.tags),((n={})[t]=e,n)),this},t.prototype.setData=function(t,e){var n
|
|
@@ -176,9 +176,9 @@ return this.data=Object(i.a)(Object(i.a)({},this.data),((n={})[t]=e,n)),this},t.
|
|
|
176
176
|
var e=o.a.fromHttpCode(t)
|
|
177
177
|
return e!==o.a.UnknownError&&this.setStatus(e),this},t.prototype.isSuccess=function(){return this.status===o.a.Ok},t.prototype.finish=function(t){this.endTimestamp="number"==typeof t?t:Object(r.e)()},t.prototype.toTraceparent=function(){var t=""
|
|
178
178
|
return void 0!==this.sampled&&(t=this.sampled?"-1":"-0"),this.traceId+"-"+this.spanId+t},t.prototype.toContext=function(){return Object(s.a)({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})},t.prototype.updateWithContext=function(t){var e,n,i,a,r
|
|
179
|
-
return this.data=null!=(e=t.data)?e:{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=null!=(n=t.spanId)?n:this.spanId,this.startTimestamp=null!=(i=t.startTimestamp)?i:this.startTimestamp,this.status=t.status,this.tags=null!=(a=t.tags)?a:{},this.traceId=null!=(r=t.traceId)?r:this.traceId,this},t.prototype.getTraceContext=function(){return Object(s.a)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})},t.prototype.toJSON=function(){return Object(s.a)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})},t}()},
|
|
179
|
+
return this.data=null!=(e=t.data)?e:{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=null!=(n=t.spanId)?n:this.spanId,this.startTimestamp=null!=(i=t.startTimestamp)?i:this.startTimestamp,this.status=t.status,this.tags=null!=(a=t.tags)?a:{},this.traceId=null!=(r=t.traceId)?r:this.traceId,this},t.prototype.getTraceContext=function(){return Object(s.a)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})},t.prototype.toJSON=function(){return Object(s.a)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})},t}()},636:function(t,e,n){"use strict"
|
|
180
180
|
n.d(e,"a",(function(){return d}))
|
|
181
|
-
var i=n(0),a=n(
|
|
181
|
+
var i=n(0),a=n(630),r=n(87),s=n(4),o=n(19),c=n(7),u=n(635),d=function(t){function e(e,n){var i=t.call(this,e)||this
|
|
182
182
|
return i._measurements={},i._hub=Object(a.b)(),Object(s.g)(n,a.a)&&(i._hub=n),i.name=e.name||"",i.metadata=e.metadata||{},i._trimEnd=e.trimEnd,i.transaction=i,i}return Object(i.b)(e,t),e.prototype.setName=function(t){this.name=t},e.prototype.initSpanRecorder=function(t){void 0===t&&(t=1e3),this.spanRecorder||(this.spanRecorder=new u.b(t)),this.spanRecorder.add(this)},e.prototype.setMeasurements=function(t){this._measurements=Object(i.a)({},t)},e.prototype.setMetadata=function(t){this.metadata=Object(i.a)(Object(i.a)({},this.metadata),t)},e.prototype.finish=function(e){var n,i,a,s,c,u=this
|
|
183
183
|
if(void 0===this.endTimestamp){if(this.name||(o.b.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),t.prototype.finish.call(this,e),!0!==this.sampled)return o.b.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(null===(c=null===(a=null===(n=this._hub.getClient())||void 0===n?void 0:(i=n).getTransport)||void 0===a?void 0:(s=a.call(i)).recordLostEvent)||void 0===c||c.call(s,r.a.SampleRate,"transaction"))
|
|
184
184
|
var d=this.spanRecorder?this.spanRecorder.spans.filter((function(t){return t!==u&&t.endTimestamp})):[]
|
|
@@ -186,12 +186,12 @@ this._trimEnd&&d.length>0&&(this.endTimestamp=d.reduce((function(t,e){return t.e
|
|
|
186
186
|
var p={contexts:{trace:this.getTraceContext()},spans:d,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",debug_meta:this.metadata}
|
|
187
187
|
return Object.keys(this._measurements).length>0&&(o.b.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),p.measurements=this._measurements),o.b.log("[Tracing] Finishing "+this.op+" transaction: "+this.name+"."),this._hub.captureEvent(p)}},e.prototype.toContext=function(){var e=t.prototype.toContext.call(this)
|
|
188
188
|
return Object(c.a)(Object(i.a)(Object(i.a)({},e),{name:this.name,trimEnd:this._trimEnd}))},e.prototype.updateWithContext=function(e){var n
|
|
189
|
-
return t.prototype.updateWithContext.call(this,e),this.name=null!=(n=e.name)?n:"",this._trimEnd=e.trimEnd,this},e}(u.a)},
|
|
189
|
+
return t.prototype.updateWithContext.call(this,e),this.name=null!=(n=e.name)?n:"",this._trimEnd=e.trimEnd,this},e}(u.a)},638:function(t,e,n){"use strict"
|
|
190
190
|
n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a}))
|
|
191
|
-
var i="finishReason",a=["heartbeatFailed","idleTimeout","documentHidden"]},
|
|
191
|
+
var i="finishReason",a=["heartbeatFailed","idleTimeout","documentHidden"]},639:function(t,e,n){"use strict"
|
|
192
192
|
n.d(e,"a",(function(){return o}))
|
|
193
|
-
var i=n(90),a=n(19),r=n(
|
|
193
|
+
var i=n(90),a=n(19),r=n(632),s=n(631)
|
|
194
194
|
function o(){Object(i.a)({callback:c,type:"error"}),Object(i.a)({callback:c,type:"unhandledrejection"})}function c(){var t=Object(s.c)()
|
|
195
195
|
t&&(a.b.log("[Tracing] Transaction: "+r.a.InternalError+" -> Global error occured"),t.setStatus(r.a.InternalError))}}}])
|
|
196
196
|
|
|
197
|
-
//# sourceMappingURL=chunk.3.
|
|
197
|
+
//# sourceMappingURL=chunk.3.dc389a0f93cb5fabd695.map
|