varsnap 1.6.10 → 1.8.2
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/CHANGELOG.md +32 -0
- package/README.md +14 -2
- package/dist/built/varsnap/core.d.ts +10 -4
- package/dist/built/varsnap/core.js +54 -11
- package/dist/built/varsnap/gitbranchenv.d.ts +1 -0
- package/dist/built/varsnap/gitbranchenv.js +21 -0
- package/dist/varsnap.js +260 -267
- package/dist/varsnap.min.js +2 -2
- package/package.json +12 -3
package/dist/varsnap.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Varsnap.js v1.
|
|
2
|
+
* Varsnap.js v1.8.2
|
|
3
3
|
*/
|
|
4
4
|
(function(exports) {
|
|
5
5
|
!function(e) {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
24
24
|
};
|
|
25
25
|
function o(e, t) {
|
|
26
|
-
!
|
|
26
|
+
!l.isUndefined(e) && l.isUndefined(e["Content-Type"]) && (e["Content-Type"] = t);
|
|
27
27
|
}
|
|
28
28
|
var i, a = {
|
|
29
29
|
transitional: {
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
adapter: (("undefined" != typeof XMLHttpRequest || void 0 !== t && "[object process]" === Object.prototype.toString.call(t)) && (i = n({})),
|
|
35
35
|
i),
|
|
36
36
|
transformRequest: [ function(e, t) {
|
|
37
|
-
return
|
|
38
|
-
e.toString()) :
|
|
37
|
+
return m(t, "Accept"), m(t, "Content-Type"), l.isFormData(e) || l.isArrayBuffer(e) || l.isBuffer(e) || l.isStream(e) || l.isFile(e) || l.isBlob(e) ? e : l.isArrayBufferView(e) ? e.buffer : l.isURLSearchParams(e) ? (o(t, "application/x-www-form-urlencoded;charset=utf-8"),
|
|
38
|
+
e.toString()) : l.isObject(e) || t && "application/json" === t["Content-Type"] ? (o(t, "application/json"),
|
|
39
39
|
function(e, t, n) {
|
|
40
|
-
if (
|
|
41
|
-
return (0, JSON.parse)(e),
|
|
40
|
+
if (l.isString(e)) try {
|
|
41
|
+
return (0, JSON.parse)(e), l.trim(e);
|
|
42
42
|
} catch (r) {
|
|
43
43
|
if ("SyntaxError" !== r.name) throw r;
|
|
44
44
|
}
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
} ],
|
|
48
48
|
transformResponse: [ function(e) {
|
|
49
49
|
var t = this.transitional || a.transitional, n = t && t.silentJSONParsing, r = t && t.forcedJSONParsing, o = !n && "json" === this.responseType;
|
|
50
|
-
if (o || r &&
|
|
50
|
+
if (o || r && l.isString(e) && e.length) try {
|
|
51
51
|
return JSON.parse(e);
|
|
52
52
|
} catch (i) {
|
|
53
53
|
if (o) {
|
|
54
|
-
if ("SyntaxError" === i.name) throw
|
|
54
|
+
if ("SyntaxError" === i.name) throw v(i, this, "E_JSON_PARSE");
|
|
55
55
|
throw i;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
-
|
|
74
|
+
l.forEach([ "delete", "get", "head" ], function(e) {
|
|
75
75
|
a.headers[e] = {};
|
|
76
|
-
}),
|
|
77
|
-
a.headers[e] =
|
|
76
|
+
}), l.forEach([ "post", "put", "patch" ], function(e) {
|
|
77
|
+
a.headers[e] = l.merge(r);
|
|
78
78
|
}), e.exports = a;
|
|
79
79
|
}).call(this);
|
|
80
|
-
}).call(this,
|
|
80
|
+
}).call(this, _);
|
|
81
81
|
}), n = e(function(e, n) {
|
|
82
82
|
"use strict";
|
|
83
83
|
var r = t({});
|
|
@@ -87,16 +87,16 @@
|
|
|
87
87
|
function u() {
|
|
88
88
|
e.cancelToken && e.cancelToken.unsubscribe(o), e.signal && e.signal.removeEventListener("abort", o);
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
l.isFormData(i) && delete a["Content-Type"];
|
|
91
91
|
var c = new XMLHttpRequest();
|
|
92
92
|
if (e.auth) {
|
|
93
|
-
var
|
|
94
|
-
a.Authorization = "Basic " + btoa(
|
|
93
|
+
var f = e.auth.username || "", p = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
94
|
+
a.Authorization = "Basic " + btoa(f + ":" + p);
|
|
95
95
|
}
|
|
96
|
-
var h =
|
|
96
|
+
var h = S(e.baseURL, e.url);
|
|
97
97
|
function g() {
|
|
98
98
|
if (c) {
|
|
99
|
-
var r = "getAllResponseHeaders" in c ?
|
|
99
|
+
var r = "getAllResponseHeaders" in c ? k(c.getAllResponseHeaders()) : null, o = {
|
|
100
100
|
data: s && "text" !== s && "json" !== s ? c.response : c.responseText,
|
|
101
101
|
status: c.status,
|
|
102
102
|
statusText: c.statusText,
|
|
@@ -104,35 +104,35 @@
|
|
|
104
104
|
config: e,
|
|
105
105
|
request: c
|
|
106
106
|
};
|
|
107
|
-
|
|
107
|
+
b(function(e) {
|
|
108
108
|
t(e), u();
|
|
109
109
|
}, function(e) {
|
|
110
110
|
n(e), u();
|
|
111
111
|
}, o), c = null;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
if (c.open(e.method.toUpperCase(),
|
|
114
|
+
if (c.open(e.method.toUpperCase(), d(h, e.params, e.paramsSerializer), !0), c.timeout = e.timeout,
|
|
115
115
|
"onloadend" in c ? c.onloadend = g : c.onreadystatechange = function() {
|
|
116
116
|
c && 4 === c.readyState && (0 !== c.status || c.responseURL && 0 === c.responseURL.indexOf("file:")) && setTimeout(g);
|
|
117
117
|
}, c.onabort = function() {
|
|
118
|
-
c && (n(
|
|
118
|
+
c && (n(y("Request aborted", e, "ECONNABORTED", c)), c = null);
|
|
119
119
|
}, c.onerror = function() {
|
|
120
|
-
n(
|
|
120
|
+
n(y("Network Error", e, null, c)), c = null;
|
|
121
121
|
}, c.ontimeout = function() {
|
|
122
122
|
var t = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded", o = e.transitional || r.transitional;
|
|
123
|
-
e.timeoutErrorMessage && (t = e.timeoutErrorMessage), n(
|
|
123
|
+
e.timeoutErrorMessage && (t = e.timeoutErrorMessage), n(y(t, e, o.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", c)),
|
|
124
124
|
c = null;
|
|
125
|
-
},
|
|
126
|
-
var m = (e.withCredentials ||
|
|
125
|
+
}, l.isStandardBrowserEnv()) {
|
|
126
|
+
var m = (e.withCredentials || E(h)) && e.xsrfCookieName ? w.read(e.xsrfCookieName) : void 0;
|
|
127
127
|
m && (a[e.xsrfHeaderName] = m);
|
|
128
128
|
}
|
|
129
|
-
"setRequestHeader" in c &&
|
|
129
|
+
"setRequestHeader" in c && l.forEach(a, function(e, t) {
|
|
130
130
|
void 0 === i && "content-type" === t.toLowerCase() ? delete a[t] : c.setRequestHeader(t, e);
|
|
131
|
-
}),
|
|
131
|
+
}), l.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials),
|
|
132
132
|
s && "json" !== s && (c.responseType = e.responseType), "function" == typeof e.onDownloadProgress && c.addEventListener("progress", e.onDownloadProgress),
|
|
133
133
|
"function" == typeof e.onUploadProgress && c.upload && c.upload.addEventListener("progress", e.onUploadProgress),
|
|
134
134
|
(e.cancelToken || e.signal) && (o = function(e) {
|
|
135
|
-
c && (n(!e || e && e.type ? new
|
|
135
|
+
c && (n(!e || e && e.type ? new C("canceled") : e), c.abort(), c = null);
|
|
136
136
|
}, e.cancelToken && e.cancelToken.subscribe(o), e.signal && (e.signal.aborted ? o() : e.signal.addEventListener("abort", o))),
|
|
137
137
|
i || (i = null), c.send(i);
|
|
138
138
|
});
|
|
@@ -144,35 +144,36 @@
|
|
|
144
144
|
};
|
|
145
145
|
}, o = Object.prototype.toString;
|
|
146
146
|
function i(e) {
|
|
147
|
-
return
|
|
147
|
+
return Array.isArray(e);
|
|
148
148
|
}
|
|
149
149
|
function a(e) {
|
|
150
150
|
return void 0 === e;
|
|
151
151
|
}
|
|
152
152
|
function s(e) {
|
|
153
|
-
return
|
|
153
|
+
return "[object ArrayBuffer]" === o.call(e);
|
|
154
154
|
}
|
|
155
155
|
function u(e) {
|
|
156
|
+
return null !== e && "object" == typeof e;
|
|
157
|
+
}
|
|
158
|
+
function c(e) {
|
|
156
159
|
if ("[object Object]" !== o.call(e)) return !1;
|
|
157
160
|
var t = Object.getPrototypeOf(e);
|
|
158
161
|
return null === t || t === Object.prototype;
|
|
159
162
|
}
|
|
160
|
-
function
|
|
163
|
+
function f(e, t) {
|
|
161
164
|
if (null != e) if ("object" != typeof e && (e = [ e ]), i(e)) for (var n = 0, r = e.length; n < r; n++) t.call(null, e[n], n, e); else for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.call(null, e[o], o, e);
|
|
162
165
|
}
|
|
163
|
-
var
|
|
166
|
+
var l = {
|
|
164
167
|
isArray: i,
|
|
165
|
-
isArrayBuffer:
|
|
166
|
-
return "[object ArrayBuffer]" === o.call(e);
|
|
167
|
-
},
|
|
168
|
+
isArrayBuffer: s,
|
|
168
169
|
isBuffer: function(e) {
|
|
169
170
|
return null !== e && !a(e) && null !== e.constructor && !a(e.constructor) && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e);
|
|
170
171
|
},
|
|
171
172
|
isFormData: function(e) {
|
|
172
|
-
return "
|
|
173
|
+
return "[object FormData]" === o.call(e);
|
|
173
174
|
},
|
|
174
175
|
isArrayBufferView: function(e) {
|
|
175
|
-
return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && e.buffer
|
|
176
|
+
return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && s(e.buffer);
|
|
176
177
|
},
|
|
177
178
|
isString: function(e) {
|
|
178
179
|
return "string" == typeof e;
|
|
@@ -180,8 +181,8 @@
|
|
|
180
181
|
isNumber: function(e) {
|
|
181
182
|
return "number" == typeof e;
|
|
182
183
|
},
|
|
183
|
-
isObject:
|
|
184
|
-
isPlainObject:
|
|
184
|
+
isObject: u,
|
|
185
|
+
isPlainObject: c,
|
|
185
186
|
isUndefined: a,
|
|
186
187
|
isDate: function(e) {
|
|
187
188
|
return "[object Date]" === o.call(e);
|
|
@@ -193,27 +194,27 @@
|
|
|
193
194
|
return "[object Blob]" === o.call(e);
|
|
194
195
|
},
|
|
195
196
|
isStream: function(e) {
|
|
196
|
-
return
|
|
197
|
+
return u(e) && function(e) {
|
|
197
198
|
return "[object Function]" === o.call(e);
|
|
198
199
|
}(e.pipe);
|
|
199
200
|
},
|
|
200
201
|
isURLSearchParams: function(e) {
|
|
201
|
-
return "
|
|
202
|
+
return "[object URLSearchParams]" === o.call(e);
|
|
202
203
|
},
|
|
203
204
|
isStandardBrowserEnv: function() {
|
|
204
205
|
return ("undefined" == typeof navigator || "ReactNative" !== navigator.product && "NativeScript" !== navigator.product && "NS" !== navigator.product) && "undefined" != typeof window && "undefined" != typeof document;
|
|
205
206
|
},
|
|
206
|
-
forEach:
|
|
207
|
+
forEach: f,
|
|
207
208
|
merge: function e() {
|
|
208
209
|
var t = {};
|
|
209
210
|
function n(n, r) {
|
|
210
|
-
|
|
211
|
+
c(t[r]) && c(n) ? t[r] = e(t[r], n) : c(n) ? t[r] = e({}, n) : i(n) ? t[r] = n.slice() : t[r] = n;
|
|
211
212
|
}
|
|
212
|
-
for (var r = 0, o = arguments.length; r < o; r++)
|
|
213
|
+
for (var r = 0, o = arguments.length; r < o; r++) f(arguments[r], n);
|
|
213
214
|
return t;
|
|
214
215
|
},
|
|
215
216
|
extend: function(e, t, n) {
|
|
216
|
-
return
|
|
217
|
+
return f(t, function(t, o) {
|
|
217
218
|
e[o] = n && "function" == typeof t ? r(t, n) : t;
|
|
218
219
|
}), e;
|
|
219
220
|
},
|
|
@@ -221,17 +222,17 @@
|
|
|
221
222
|
return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "");
|
|
222
223
|
}
|
|
223
224
|
};
|
|
224
|
-
function
|
|
225
|
+
function p(e) {
|
|
225
226
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
226
227
|
}
|
|
227
|
-
var
|
|
228
|
+
var d = function(e, t, n) {
|
|
228
229
|
if (!t) return e;
|
|
229
230
|
var r;
|
|
230
|
-
if (n) r = n(t); else if (
|
|
231
|
+
if (n) r = n(t); else if (l.isURLSearchParams(t)) r = t.toString(); else {
|
|
231
232
|
var o = [];
|
|
232
|
-
|
|
233
|
-
null != e && (
|
|
234
|
-
|
|
233
|
+
l.forEach(t, function(e, t) {
|
|
234
|
+
null != e && (l.isArray(e) ? t += "[]" : e = [ e ], l.forEach(e, function(e) {
|
|
235
|
+
l.isDate(e) ? e = e.toISOString() : l.isObject(e) && (e = JSON.stringify(e)), o.push(p(t) + "=" + p(e));
|
|
235
236
|
}));
|
|
236
237
|
}), r = o.join("&");
|
|
237
238
|
}
|
|
@@ -240,29 +241,29 @@
|
|
|
240
241
|
-1 !== i && (e = e.slice(0, i)), e += (-1 === e.indexOf("?") ? "?" : "&") + r;
|
|
241
242
|
}
|
|
242
243
|
return e;
|
|
243
|
-
},
|
|
244
|
-
function
|
|
244
|
+
}, h = {};
|
|
245
|
+
function g() {
|
|
245
246
|
this.handlers = [];
|
|
246
247
|
}
|
|
247
|
-
|
|
248
|
+
g.prototype.use = function(e, t, n) {
|
|
248
249
|
return this.handlers.push({
|
|
249
250
|
fulfilled: e,
|
|
250
251
|
rejected: t,
|
|
251
252
|
synchronous: !!n && n.synchronous,
|
|
252
253
|
runWhen: n ? n.runWhen : null
|
|
253
254
|
}), this.handlers.length - 1;
|
|
254
|
-
},
|
|
255
|
+
}, g.prototype.eject = function(e) {
|
|
255
256
|
this.handlers[e] && (this.handlers[e] = null);
|
|
256
|
-
},
|
|
257
|
-
|
|
257
|
+
}, g.prototype.forEach = function(e) {
|
|
258
|
+
l.forEach(this.handlers, function(t) {
|
|
258
259
|
null !== t && e(t);
|
|
259
260
|
});
|
|
260
|
-
},
|
|
261
|
-
var
|
|
262
|
-
|
|
261
|
+
}, h = g;
|
|
262
|
+
var m = function(e, t) {
|
|
263
|
+
l.forEach(e, function(n, r) {
|
|
263
264
|
r !== t && r.toUpperCase() === t.toUpperCase() && (e[t] = n, delete e[r]);
|
|
264
265
|
});
|
|
265
|
-
},
|
|
266
|
+
}, v = function(e, t, n, r, o) {
|
|
266
267
|
return e.config = t, n && (e.code = n), e.request = r, e.response = o, e.isAxiosError = !0,
|
|
267
268
|
e.toJSON = function() {
|
|
268
269
|
return {
|
|
@@ -279,17 +280,17 @@
|
|
|
279
280
|
status: this.response && this.response.status ? this.response.status : null
|
|
280
281
|
};
|
|
281
282
|
}, e;
|
|
282
|
-
},
|
|
283
|
+
}, y = function(e, t, n, r, o) {
|
|
283
284
|
var i = new Error(e);
|
|
284
|
-
return
|
|
285
|
-
},
|
|
285
|
+
return v(i, t, n, r, o);
|
|
286
|
+
}, b = function(e, t, n) {
|
|
286
287
|
var r = n.config.validateStatus;
|
|
287
|
-
n.status && r && !r(n.status) ? t(
|
|
288
|
-
},
|
|
288
|
+
n.status && r && !r(n.status) ? t(y("Request failed with status code " + n.status, n.config, null, n.request, n)) : e(n);
|
|
289
|
+
}, w = l.isStandardBrowserEnv() ? {
|
|
289
290
|
write: function(e, t, n, r, o, i) {
|
|
290
291
|
var a = [];
|
|
291
|
-
a.push(e + "=" + encodeURIComponent(t)),
|
|
292
|
-
|
|
292
|
+
a.push(e + "=" + encodeURIComponent(t)), l.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()),
|
|
293
|
+
l.isString(r) && a.push("path=" + r), l.isString(o) && a.push("domain=" + o), !0 === i && a.push("secure"),
|
|
293
294
|
document.cookie = a.join("; ");
|
|
294
295
|
},
|
|
295
296
|
read: function(e) {
|
|
@@ -305,20 +306,20 @@
|
|
|
305
306
|
return null;
|
|
306
307
|
},
|
|
307
308
|
remove: function() {}
|
|
308
|
-
},
|
|
309
|
-
return e && !/^([a-z][a-z\d
|
|
309
|
+
}, S = function(e, t) {
|
|
310
|
+
return e && !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t) ? function(e, t) {
|
|
310
311
|
return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
311
312
|
}(e, t) : t;
|
|
312
|
-
},
|
|
313
|
+
}, T = [ "age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent" ], k = function(e) {
|
|
313
314
|
var t, n, r, o = {};
|
|
314
|
-
return e ? (
|
|
315
|
-
if (r = e.indexOf(":"), t =
|
|
315
|
+
return e ? (l.forEach(e.split("\n"), function(e) {
|
|
316
|
+
if (r = e.indexOf(":"), t = l.trim(e.substr(0, r)).toLowerCase(), n = l.trim(e.substr(r + 1)),
|
|
316
317
|
t) {
|
|
317
|
-
if (o[t] &&
|
|
318
|
+
if (o[t] && T.indexOf(t) >= 0) return;
|
|
318
319
|
o[t] = "set-cookie" === t ? (o[t] ? o[t] : []).concat([ n ]) : o[t] ? o[t] + ", " + n : n;
|
|
319
320
|
}
|
|
320
321
|
}), o) : o;
|
|
321
|
-
},
|
|
322
|
+
}, E = l.isStandardBrowserEnv() ? function() {
|
|
322
323
|
var e, t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
|
|
323
324
|
function r(e) {
|
|
324
325
|
var r = e;
|
|
@@ -335,137 +336,137 @@
|
|
|
335
336
|
};
|
|
336
337
|
}
|
|
337
338
|
return e = r(window.location.href), function(t) {
|
|
338
|
-
var n =
|
|
339
|
+
var n = l.isString(t) ? r(t) : t;
|
|
339
340
|
return n.protocol === e.protocol && n.host === e.host;
|
|
340
341
|
};
|
|
341
342
|
}() : function() {
|
|
342
343
|
return !0;
|
|
343
|
-
},
|
|
344
|
-
function
|
|
344
|
+
}, C = {};
|
|
345
|
+
function j(e) {
|
|
345
346
|
this.message = e;
|
|
346
347
|
}
|
|
347
|
-
|
|
348
|
+
j.prototype.toString = function() {
|
|
348
349
|
return "Cancel" + (this.message ? ": " + this.message : "");
|
|
349
|
-
},
|
|
350
|
-
var
|
|
350
|
+
}, j.prototype.__CANCEL__ = !0, C = j;
|
|
351
|
+
var O, x, _ = {}, P = _ = {};
|
|
351
352
|
function A() {
|
|
352
353
|
throw new Error("setTimeout has not been defined");
|
|
353
354
|
}
|
|
354
|
-
function
|
|
355
|
+
function N() {
|
|
355
356
|
throw new Error("clearTimeout has not been defined");
|
|
356
357
|
}
|
|
357
|
-
function
|
|
358
|
-
if (
|
|
359
|
-
if ((
|
|
358
|
+
function R(e) {
|
|
359
|
+
if (O === setTimeout) return setTimeout(e, 0);
|
|
360
|
+
if ((O === A || !O) && setTimeout) return O = setTimeout, setTimeout(e, 0);
|
|
360
361
|
try {
|
|
361
|
-
return
|
|
362
|
+
return O(e, 0);
|
|
362
363
|
} catch (t) {
|
|
363
364
|
try {
|
|
364
|
-
return
|
|
365
|
+
return O.call(null, e, 0);
|
|
365
366
|
} catch (t) {
|
|
366
|
-
return
|
|
367
|
+
return O.call(this, e, 0);
|
|
367
368
|
}
|
|
368
369
|
}
|
|
369
370
|
}
|
|
370
371
|
!function() {
|
|
371
372
|
try {
|
|
372
|
-
|
|
373
|
+
O = "function" == typeof setTimeout ? setTimeout : A;
|
|
373
374
|
} catch (e) {
|
|
374
|
-
|
|
375
|
+
O = A;
|
|
375
376
|
}
|
|
376
377
|
try {
|
|
377
|
-
|
|
378
|
+
x = "function" == typeof clearTimeout ? clearTimeout : N;
|
|
378
379
|
} catch (e) {
|
|
379
|
-
|
|
380
|
+
x = N;
|
|
380
381
|
}
|
|
381
382
|
}();
|
|
382
|
-
var
|
|
383
|
-
function q() {
|
|
384
|
-
L && R && (L = !1, R.length ? U = R.concat(U) : B = -1, U.length && z());
|
|
385
|
-
}
|
|
383
|
+
var U, L = [], B = !1, q = -1;
|
|
386
384
|
function z() {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
385
|
+
B && U && (B = !1, U.length ? L = U.concat(L) : q = -1, L.length && D());
|
|
386
|
+
}
|
|
387
|
+
function D() {
|
|
388
|
+
if (!B) {
|
|
389
|
+
var e = R(z);
|
|
390
|
+
B = !0;
|
|
391
|
+
for (var t = L.length; t; ) {
|
|
392
|
+
for (U = L, L = []; ++q < t; ) U && U[q].run();
|
|
393
|
+
q = -1, t = L.length;
|
|
393
394
|
}
|
|
394
|
-
|
|
395
|
-
if (
|
|
396
|
-
if ((
|
|
395
|
+
U = null, B = !1, function(e) {
|
|
396
|
+
if (x === clearTimeout) return clearTimeout(e);
|
|
397
|
+
if ((x === N || !x) && clearTimeout) return x = clearTimeout, clearTimeout(e);
|
|
397
398
|
try {
|
|
398
|
-
|
|
399
|
+
x(e);
|
|
399
400
|
} catch (t) {
|
|
400
401
|
try {
|
|
401
|
-
return
|
|
402
|
+
return x.call(null, e);
|
|
402
403
|
} catch (t) {
|
|
403
|
-
return
|
|
404
|
+
return x.call(this, e);
|
|
404
405
|
}
|
|
405
406
|
}
|
|
406
407
|
}(e);
|
|
407
408
|
}
|
|
408
409
|
}
|
|
409
|
-
function
|
|
410
|
+
function J(e, t) {
|
|
410
411
|
this.fun = e, this.array = t;
|
|
411
412
|
}
|
|
412
|
-
function
|
|
413
|
-
|
|
413
|
+
function F() {}
|
|
414
|
+
P.nextTick = function(e) {
|
|
414
415
|
var t = new Array(arguments.length - 1);
|
|
415
416
|
if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
416
|
-
|
|
417
|
-
},
|
|
417
|
+
L.push(new J(e, t)), 1 !== L.length || B || R(D);
|
|
418
|
+
}, J.prototype.run = function() {
|
|
418
419
|
this.fun.apply(null, this.array);
|
|
419
|
-
},
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
420
|
+
}, P.title = "browser", P.browser = !0, P.env = {}, P.argv = [], P.version = "",
|
|
421
|
+
P.versions = {}, P.on = F, P.addListener = F, P.once = F, P.off = F, P.removeListener = F,
|
|
422
|
+
P.removeAllListeners = F, P.emit = F, P.prependListener = F, P.prependOnceListener = F,
|
|
423
|
+
P.listeners = function(e) {
|
|
423
424
|
return [];
|
|
424
|
-
},
|
|
425
|
+
}, P.binding = function(e) {
|
|
425
426
|
throw new Error("process.binding is not supported");
|
|
426
|
-
},
|
|
427
|
+
}, P.cwd = function() {
|
|
427
428
|
return "/";
|
|
428
|
-
},
|
|
429
|
+
}, P.chdir = function(e) {
|
|
429
430
|
throw new Error("process.chdir is not supported");
|
|
430
|
-
},
|
|
431
|
+
}, P.umask = function() {
|
|
431
432
|
return 0;
|
|
432
433
|
};
|
|
433
|
-
var
|
|
434
|
-
var r = this ||
|
|
435
|
-
return
|
|
434
|
+
var I = t({}), V = function(e, t, n) {
|
|
435
|
+
var r = this || I;
|
|
436
|
+
return l.forEach(n, function(n) {
|
|
436
437
|
e = n.call(r, e, t);
|
|
437
438
|
}), e;
|
|
438
|
-
},
|
|
439
|
+
}, H = function(e) {
|
|
439
440
|
return !(!e || !e.__CANCEL__);
|
|
440
441
|
}, M = t({});
|
|
441
|
-
function
|
|
442
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new
|
|
442
|
+
function $(e) {
|
|
443
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new C("canceled");
|
|
443
444
|
}
|
|
444
|
-
var
|
|
445
|
-
return
|
|
446
|
-
e.headers =
|
|
447
|
-
|
|
445
|
+
var G, X = function(e) {
|
|
446
|
+
return $(e), e.headers = e.headers || {}, e.data = V.call(e, e.data, e.headers, e.transformRequest),
|
|
447
|
+
e.headers = l.merge(e.headers.common || {}, e.headers[e.method] || {}, e.headers),
|
|
448
|
+
l.forEach([ "delete", "get", "head", "post", "put", "patch", "common" ], function(t) {
|
|
448
449
|
delete e.headers[t];
|
|
449
450
|
}), (e.adapter || M.adapter)(e).then(function(t) {
|
|
450
|
-
return
|
|
451
|
+
return $(e), t.data = V.call(e, t.data, t.headers, e.transformResponse), t;
|
|
451
452
|
}, function(t) {
|
|
452
|
-
return
|
|
453
|
+
return H(t) || ($(e), t && t.response && (t.response.data = V.call(e, t.response.data, t.response.headers, e.transformResponse))),
|
|
453
454
|
Promise.reject(t);
|
|
454
455
|
});
|
|
455
|
-
},
|
|
456
|
+
}, W = function(e, t) {
|
|
456
457
|
t = t || {};
|
|
457
458
|
var n = {};
|
|
458
459
|
function r(e, t) {
|
|
459
|
-
return
|
|
460
|
+
return l.isPlainObject(e) && l.isPlainObject(t) ? l.merge(e, t) : l.isPlainObject(t) ? l.merge({}, t) : l.isArray(t) ? t.slice() : t;
|
|
460
461
|
}
|
|
461
462
|
function o(n) {
|
|
462
|
-
return
|
|
463
|
+
return l.isUndefined(t[n]) ? l.isUndefined(e[n]) ? void 0 : r(void 0, e[n]) : r(e[n], t[n]);
|
|
463
464
|
}
|
|
464
465
|
function i(e) {
|
|
465
|
-
if (!
|
|
466
|
+
if (!l.isUndefined(t[e])) return r(void 0, t[e]);
|
|
466
467
|
}
|
|
467
468
|
function a(n) {
|
|
468
|
-
return
|
|
469
|
+
return l.isUndefined(t[n]) ? l.isUndefined(e[n]) ? void 0 : r(void 0, e[n]) : r(void 0, t[n]);
|
|
469
470
|
}
|
|
470
471
|
function s(n) {
|
|
471
472
|
return n in t ? r(e[n], t[n]) : n in e ? r(void 0, e[n]) : void 0;
|
|
@@ -498,28 +499,28 @@
|
|
|
498
499
|
responseEncoding: a,
|
|
499
500
|
validateStatus: s
|
|
500
501
|
};
|
|
501
|
-
return
|
|
502
|
+
return l.forEach(Object.keys(e).concat(Object.keys(t)), function(e) {
|
|
502
503
|
var t = u[e] || o, r = t(e);
|
|
503
|
-
|
|
504
|
+
l.isUndefined(r) && t !== s || (n[e] = r);
|
|
504
505
|
}), n;
|
|
505
|
-
},
|
|
506
|
+
}, K = "0.25.0", Y = K, Q = {};
|
|
506
507
|
[ "object", "boolean", "number", "function", "string", "symbol" ].forEach(function(e, t) {
|
|
507
|
-
|
|
508
|
+
Q[e] = function(n) {
|
|
508
509
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
509
510
|
};
|
|
510
511
|
});
|
|
511
|
-
var
|
|
512
|
-
|
|
512
|
+
var Z = {};
|
|
513
|
+
Q.transitional = function(e, t, n) {
|
|
513
514
|
function r(e, t) {
|
|
514
|
-
return "[Axios v" +
|
|
515
|
+
return "[Axios v" + Y + "] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
|
|
515
516
|
}
|
|
516
517
|
return function(n, o, i) {
|
|
517
518
|
if (!1 === e) throw new Error(r(o, " has been removed" + (t ? " in " + t : "")));
|
|
518
|
-
return t && !
|
|
519
|
+
return t && !Z[o] && (Z[o] = !0, console.warn(r(o, " has been deprecated since v" + t + " and will be removed in the near future"))),
|
|
519
520
|
!e || e(n, o, i);
|
|
520
521
|
};
|
|
521
522
|
};
|
|
522
|
-
var
|
|
523
|
+
var ee = {}, te = (G = {
|
|
523
524
|
assertOptions: function(e, t, n) {
|
|
524
525
|
if ("object" != typeof e) throw new TypeError("options must be an object");
|
|
525
526
|
for (var r = Object.keys(e), o = r.length; o-- > 0; ) {
|
|
@@ -530,73 +531,74 @@
|
|
|
530
531
|
} else if (!0 !== n) throw Error("Unknown option " + i);
|
|
531
532
|
}
|
|
532
533
|
},
|
|
533
|
-
validators:
|
|
534
|
+
validators: Q
|
|
534
535
|
}).validators;
|
|
535
|
-
function
|
|
536
|
+
function ne(e) {
|
|
536
537
|
this.defaults = e, this.interceptors = {
|
|
537
|
-
request: new
|
|
538
|
-
response: new
|
|
538
|
+
request: new h(),
|
|
539
|
+
response: new h()
|
|
539
540
|
};
|
|
540
541
|
}
|
|
541
|
-
|
|
542
|
-
"string" == typeof e ? (
|
|
543
|
-
(
|
|
544
|
-
var
|
|
545
|
-
void 0 !==
|
|
546
|
-
silentJSONParsing:
|
|
547
|
-
forcedJSONParsing:
|
|
548
|
-
clarifyTimeoutError:
|
|
542
|
+
ne.prototype.request = function(e, t) {
|
|
543
|
+
if ("string" == typeof e ? (t = t || {}).url = e : t = e || {}, !t.url) throw new Error("Provided config url is not valid");
|
|
544
|
+
(t = W(this.defaults, t)).method ? t.method = t.method.toLowerCase() : this.defaults.method ? t.method = this.defaults.method.toLowerCase() : t.method = "get";
|
|
545
|
+
var n = t.transitional;
|
|
546
|
+
void 0 !== n && G.assertOptions(n, {
|
|
547
|
+
silentJSONParsing: te.transitional(te.boolean),
|
|
548
|
+
forcedJSONParsing: te.transitional(te.boolean),
|
|
549
|
+
clarifyTimeoutError: te.transitional(te.boolean)
|
|
549
550
|
}, !1);
|
|
550
|
-
var
|
|
551
|
-
this.interceptors.request.forEach(function(
|
|
552
|
-
"function" == typeof
|
|
553
|
-
|
|
551
|
+
var r = [], o = !0;
|
|
552
|
+
this.interceptors.request.forEach(function(e) {
|
|
553
|
+
"function" == typeof e.runWhen && !1 === e.runWhen(t) || (o = o && e.synchronous,
|
|
554
|
+
r.unshift(e.fulfilled, e.rejected));
|
|
554
555
|
});
|
|
555
|
-
var
|
|
556
|
+
var i, a = [];
|
|
556
557
|
if (this.interceptors.response.forEach(function(e) {
|
|
557
|
-
|
|
558
|
-
}), !
|
|
559
|
-
var
|
|
560
|
-
for (Array.prototype.unshift.apply(
|
|
561
|
-
return
|
|
558
|
+
a.push(e.fulfilled, e.rejected);
|
|
559
|
+
}), !o) {
|
|
560
|
+
var s = [ X, void 0 ];
|
|
561
|
+
for (Array.prototype.unshift.apply(s, r), s = s.concat(a), i = Promise.resolve(t); s.length; ) i = i.then(s.shift(), s.shift());
|
|
562
|
+
return i;
|
|
562
563
|
}
|
|
563
|
-
for (var
|
|
564
|
-
var
|
|
564
|
+
for (var u = t; r.length; ) {
|
|
565
|
+
var c = r.shift(), f = r.shift();
|
|
565
566
|
try {
|
|
566
|
-
|
|
567
|
-
} catch (
|
|
568
|
-
|
|
567
|
+
u = c(u);
|
|
568
|
+
} catch (l) {
|
|
569
|
+
f(l);
|
|
569
570
|
break;
|
|
570
571
|
}
|
|
571
572
|
}
|
|
572
573
|
try {
|
|
573
|
-
|
|
574
|
-
} catch (
|
|
575
|
-
return Promise.reject(
|
|
574
|
+
i = X(u);
|
|
575
|
+
} catch (l) {
|
|
576
|
+
return Promise.reject(l);
|
|
576
577
|
}
|
|
577
|
-
for (;
|
|
578
|
-
return
|
|
579
|
-
},
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
578
|
+
for (;a.length; ) i = i.then(a.shift(), a.shift());
|
|
579
|
+
return i;
|
|
580
|
+
}, ne.prototype.getUri = function(e) {
|
|
581
|
+
if (!e.url) throw new Error("Provided config url is not valid");
|
|
582
|
+
return e = W(this.defaults, e), d(e.url, e.params, e.paramsSerializer).replace(/^\?/, "");
|
|
583
|
+
}, l.forEach([ "delete", "get", "head", "options" ], function(e) {
|
|
584
|
+
ne.prototype[e] = function(t, n) {
|
|
585
|
+
return this.request(W(n || {}, {
|
|
584
586
|
method: e,
|
|
585
587
|
url: t,
|
|
586
588
|
data: (n || {}).data
|
|
587
589
|
}));
|
|
588
590
|
};
|
|
589
|
-
}),
|
|
590
|
-
|
|
591
|
-
return this.request(
|
|
591
|
+
}), l.forEach([ "post", "put", "patch" ], function(e) {
|
|
592
|
+
ne.prototype[e] = function(t, n, r) {
|
|
593
|
+
return this.request(W(r || {}, {
|
|
592
594
|
method: e,
|
|
593
595
|
url: t,
|
|
594
596
|
data: n
|
|
595
597
|
}));
|
|
596
598
|
};
|
|
597
|
-
}),
|
|
598
|
-
var
|
|
599
|
-
function
|
|
599
|
+
}), ee = ne;
|
|
600
|
+
var re;
|
|
601
|
+
function oe(e) {
|
|
600
602
|
if ("function" != typeof e) throw new TypeError("executor must be a function.");
|
|
601
603
|
var t;
|
|
602
604
|
this.promise = new Promise(function(e) {
|
|
@@ -617,81 +619,44 @@
|
|
|
617
619
|
n.unsubscribe(t);
|
|
618
620
|
}, r;
|
|
619
621
|
}, e(function(e) {
|
|
620
|
-
n.reason || (n.reason = new
|
|
622
|
+
n.reason || (n.reason = new C(e), t(n.reason));
|
|
621
623
|
});
|
|
622
624
|
}
|
|
623
|
-
|
|
625
|
+
oe.prototype.throwIfRequested = function() {
|
|
624
626
|
if (this.reason) throw this.reason;
|
|
625
|
-
},
|
|
627
|
+
}, oe.prototype.subscribe = function(e) {
|
|
626
628
|
this.reason ? e(this.reason) : this._listeners ? this._listeners.push(e) : this._listeners = [ e ];
|
|
627
|
-
},
|
|
629
|
+
}, oe.prototype.unsubscribe = function(e) {
|
|
628
630
|
if (this._listeners) {
|
|
629
631
|
var t = this._listeners.indexOf(e);
|
|
630
632
|
-1 !== t && this._listeners.splice(t, 1);
|
|
631
633
|
}
|
|
632
|
-
},
|
|
634
|
+
}, oe.source = function() {
|
|
633
635
|
var e;
|
|
634
636
|
return {
|
|
635
|
-
token: new
|
|
637
|
+
token: new oe(function(t) {
|
|
636
638
|
e = t;
|
|
637
639
|
}),
|
|
638
640
|
cancel: e
|
|
639
641
|
};
|
|
640
|
-
},
|
|
641
|
-
var
|
|
642
|
-
var n = new
|
|
643
|
-
return
|
|
644
|
-
return e(
|
|
642
|
+
}, re = oe;
|
|
643
|
+
var ie = {}, ae = function e(t) {
|
|
644
|
+
var n = new ee(t), o = r(ee.prototype.request, n);
|
|
645
|
+
return l.extend(o, ee.prototype, n), l.extend(o, n), o.create = function(n) {
|
|
646
|
+
return e(W(t, n));
|
|
645
647
|
}, o;
|
|
646
648
|
}(t({}));
|
|
647
|
-
|
|
648
|
-
|
|
649
|
+
ae.Axios = ee, ae.Cancel = C, ae.CancelToken = re, ae.isCancel = H, ae.VERSION = K,
|
|
650
|
+
ae.all = function(e) {
|
|
649
651
|
return Promise.all(e);
|
|
650
|
-
},
|
|
652
|
+
}, ae.spread = function(e) {
|
|
651
653
|
return function(t) {
|
|
652
654
|
return e.apply(null, t);
|
|
653
655
|
};
|
|
654
|
-
},
|
|
655
|
-
return
|
|
656
|
-
}, (
|
|
657
|
-
var
|
|
658
|
-
Array.isArray;
|
|
659
|
-
var se = function(e) {
|
|
660
|
-
switch (typeof e) {
|
|
661
|
-
case "string":
|
|
662
|
-
return e;
|
|
663
|
-
|
|
664
|
-
case "boolean":
|
|
665
|
-
return e ? "true" : "false";
|
|
666
|
-
|
|
667
|
-
case "number":
|
|
668
|
-
return isFinite(e) ? e : "";
|
|
669
|
-
|
|
670
|
-
default:
|
|
671
|
-
return "";
|
|
672
|
-
}
|
|
673
|
-
}, ue = Array.isArray || function(e) {
|
|
674
|
-
return "[object Array]" === Object.prototype.toString.call(e);
|
|
675
|
-
};
|
|
676
|
-
function ce(e, t) {
|
|
677
|
-
if (e.map) return e.map(t);
|
|
678
|
-
for (var n = [], r = 0; r < e.length; r++) n.push(t(e[r], r));
|
|
679
|
-
return n;
|
|
680
|
-
}
|
|
681
|
-
var fe = Object.keys || function(e) {
|
|
682
|
-
var t = [];
|
|
683
|
-
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
|
|
684
|
-
return t;
|
|
685
|
-
}, le = {
|
|
686
|
-
stringify: function(e, t, n, r) {
|
|
687
|
-
return t = t || "&", n = n || "=", null === e && (e = void 0), "object" == typeof e ? ce(fe(e), function(r) {
|
|
688
|
-
var o = encodeURIComponent(se(r)) + n;
|
|
689
|
-
return ue(e[r]) ? ce(e[r], function(e) {
|
|
690
|
-
return o + encodeURIComponent(se(e));
|
|
691
|
-
}).join(t) : o + encodeURIComponent(se(e[r]));
|
|
692
|
-
}).join(t) : r ? encodeURIComponent(se(r)) + n + encodeURIComponent(se(e)) : "";
|
|
693
|
-
}
|
|
694
|
-
}, pe = {};
|
|
656
|
+
}, ae.isAxiosError = function(e) {
|
|
657
|
+
return l.isObject(e) && !0 === e.isAxiosError;
|
|
658
|
+
}, (ie = ae).default = ae;
|
|
659
|
+
var se = ie, ue = {}, ce = {};
|
|
695
660
|
return function(e) {
|
|
696
661
|
(function() {
|
|
697
662
|
"use strict";
|
|
@@ -774,13 +739,14 @@
|
|
|
774
739
|
writable: !1
|
|
775
740
|
}), e;
|
|
776
741
|
}
|
|
777
|
-
Object.defineProperty(
|
|
742
|
+
Object.defineProperty(ce, "__esModule", {
|
|
778
743
|
value: !0
|
|
779
|
-
}),
|
|
780
|
-
|
|
744
|
+
}), ce.varsnap = ce.clientName = ce.version = void 0;
|
|
745
|
+
ce.version = "1.8.2", ce.clientName = "javascript." + ce.version;
|
|
781
746
|
var u = {
|
|
782
747
|
varsnap: !0,
|
|
783
748
|
env: "development",
|
|
749
|
+
branch: "",
|
|
784
750
|
producerToken: "",
|
|
785
751
|
consumerToken: "",
|
|
786
752
|
logger: console
|
|
@@ -799,31 +765,33 @@
|
|
|
799
765
|
key: "setConfig",
|
|
800
766
|
value: function(e, t, n) {
|
|
801
767
|
return "varsnap" === t && ("string" == typeof n && (n = "true" === n), e[t] = n),
|
|
802
|
-
"env" !== t && "producerToken" !== t && "consumerToken" !== t
|
|
803
|
-
e;
|
|
768
|
+
"env" !== t && "producerToken" !== t && "consumerToken" !== t && "branch" !== t || (e[t] = n),
|
|
769
|
+
"logger" === t && (e[t] = n), e;
|
|
804
770
|
}
|
|
805
771
|
}, {
|
|
806
772
|
key: "getSignature",
|
|
807
773
|
value: function(e, t) {
|
|
808
774
|
var n = "";
|
|
809
775
|
return n = "" !== t && void 0 !== t ? t : (n = (n = e.toString().split("{")[0]).replace(/^\s+|\s+$/g, "")).replace(/,\s+/g, ","),
|
|
810
|
-
"javascript." +
|
|
776
|
+
"javascript." + ce.version + "." + n;
|
|
811
777
|
}
|
|
812
778
|
}, {
|
|
813
779
|
key: "ajax",
|
|
814
|
-
value: function(
|
|
780
|
+
value: function(e, n) {
|
|
815
781
|
var r = {
|
|
816
782
|
method: "POST",
|
|
817
|
-
url:
|
|
783
|
+
url: e,
|
|
818
784
|
headers: {
|
|
819
785
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
820
786
|
},
|
|
821
|
-
data:
|
|
787
|
+
data: new URLSearchParams(n).toString(),
|
|
822
788
|
responseType: "json"
|
|
823
789
|
};
|
|
824
|
-
return
|
|
825
|
-
|
|
790
|
+
return t.isNode() && r.headers && (r.headers["User-Agent"] = "varsnap.js"), (0,
|
|
791
|
+
se.default)(r).then(function(e) {
|
|
826
792
|
return e.data;
|
|
793
|
+
}).catch(function(e) {
|
|
794
|
+
return e;
|
|
827
795
|
});
|
|
828
796
|
}
|
|
829
797
|
}, {
|
|
@@ -867,6 +835,25 @@
|
|
|
867
835
|
var t = String(e);
|
|
868
836
|
return t.length <= 30 ? t : t.substring(0, 30 - "...".length) + "...";
|
|
869
837
|
}
|
|
838
|
+
}, {
|
|
839
|
+
key: "isNode",
|
|
840
|
+
value: function() {
|
|
841
|
+
return "object" === (void 0 === e ? "undefined" : o(e)) && "undefined" == typeof window;
|
|
842
|
+
}
|
|
843
|
+
}, {
|
|
844
|
+
key: "getBranch",
|
|
845
|
+
value: function(e) {
|
|
846
|
+
var n = t.getConfig(e, "branch");
|
|
847
|
+
return n ? new Promise(function(e) {
|
|
848
|
+
return e(n);
|
|
849
|
+
}) : t.isNode() ? new Promise(function(e) {
|
|
850
|
+
(0, ue.exec)("git rev-parse --abbrev-ref HEAD", function(t, n) {
|
|
851
|
+
return e(n.trim());
|
|
852
|
+
});
|
|
853
|
+
}) : new Promise(function(e) {
|
|
854
|
+
return e("");
|
|
855
|
+
});
|
|
856
|
+
}
|
|
870
857
|
} ]), t;
|
|
871
858
|
}(), p = function() {
|
|
872
859
|
function e(t, n, r) {
|
|
@@ -987,7 +974,7 @@
|
|
|
987
974
|
consumer_token: l.getConfig(this.config, "consumerToken"),
|
|
988
975
|
snap_id: t.id,
|
|
989
976
|
test_outputs: p.serialize(r),
|
|
990
|
-
matches: o,
|
|
977
|
+
matches: o.toString(),
|
|
991
978
|
snap_outputs_formatted: p.serialize_formatted(n),
|
|
992
979
|
test_outputs_formatted: p.serialize_formatted(r)
|
|
993
980
|
};
|
|
@@ -1034,11 +1021,17 @@
|
|
|
1034
1021
|
return i.producer = r, i.consumer = o, i.signature = n, c.push(r), f.push(o), i;
|
|
1035
1022
|
}
|
|
1036
1023
|
function g() {
|
|
1037
|
-
var e, n
|
|
1038
|
-
return 0 ===
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1024
|
+
var e, n = l.getConsumers();
|
|
1025
|
+
return 0 === n.length ? Promise.resolve(!0) : (e = n[0].config, l.getBranch(e).then(function(t) {
|
|
1026
|
+
return {
|
|
1027
|
+
branch: t,
|
|
1028
|
+
consumer_token: l.getConfig(e, "consumerToken"),
|
|
1029
|
+
client: ce.clientName
|
|
1030
|
+
};
|
|
1031
|
+
}).then(function(e) {
|
|
1032
|
+
var t = e;
|
|
1033
|
+
return l.ajax("https://www.varsnap.com/api/trial_group/", t);
|
|
1034
|
+
}).then(function(e) {
|
|
1042
1035
|
return e;
|
|
1043
1036
|
}).catch(function(t) {
|
|
1044
1037
|
var n;
|
|
@@ -1050,10 +1043,10 @@
|
|
|
1050
1043
|
trial_group_url: ""
|
|
1051
1044
|
};
|
|
1052
1045
|
})).then(function(e) {
|
|
1053
|
-
var
|
|
1046
|
+
var r, o = [], i = t(n);
|
|
1054
1047
|
try {
|
|
1055
|
-
for (i.s(); !(
|
|
1056
|
-
var a =
|
|
1048
|
+
for (i.s(); !(r = i.n()).done; ) {
|
|
1049
|
+
var a = r.value.consume(e);
|
|
1057
1050
|
o.push(a);
|
|
1058
1051
|
}
|
|
1059
1052
|
} catch (s) {
|
|
@@ -1068,7 +1061,7 @@
|
|
|
1068
1061
|
});
|
|
1069
1062
|
});
|
|
1070
1063
|
}
|
|
1071
|
-
|
|
1064
|
+
ce.varsnap = h, h._config = u, h.updateConfig = function(e) {
|
|
1072
1065
|
for (var t = h._config, n = 0, r = Object.keys(h._config); n < r.length; n++) {
|
|
1073
1066
|
var o = r[n];
|
|
1074
1067
|
Object.prototype.hasOwnProperty.call(e, o) && (t = l.setConfig(t, o, e[o]));
|
|
@@ -1076,8 +1069,8 @@
|
|
|
1076
1069
|
h._config = t;
|
|
1077
1070
|
}, h.reset = function() {
|
|
1078
1071
|
l.resetConsumers(), l.resetProducers();
|
|
1079
|
-
}, h.version =
|
|
1072
|
+
}, h.version = ce.version, h.runTests = g;
|
|
1080
1073
|
}).call(this);
|
|
1081
|
-
}.call(this,
|
|
1074
|
+
}.call(this, _), ce.varsnap;
|
|
1082
1075
|
});
|
|
1083
1076
|
})(typeof Varsnap == "undefined" ? Varsnap = {} : Varsnap);
|