1 | (function (root, factory) {
|
2 | if (typeof define === 'function' && define.amd)
|
3 | define(['exports', 'kotlin', 'ktor-ktor-client-json', 'ktor-ktor-client-serialization', 'ktor-ktor-client-core', 'kotlinx-serialization-kotlinx-serialization-runtime', 'ktor-ktor-http', 'kotlinx-coroutines-core'], factory);
|
4 | else if (typeof exports === 'object')
|
5 | factory(module.exports, require('kotlin'), require('ktor-ktor-client-json'), require('ktor-ktor-client-serialization'), require('ktor-ktor-client-core'), require('kotlinx-serialization-kotlinx-serialization-runtime'), require('ktor-ktor-http'), require('kotlinx-coroutines-core'));
|
6 | else {
|
7 | if (typeof kotlin === 'undefined') {
|
8 | throw new Error("Error loading module 'git-rest-wrapper-gitrest'. Its dependency 'kotlin' was not found. Please, check whether 'kotlin' is loaded prior to 'git-rest-wrapper-gitrest'.");
|
9 | }if (typeof this['ktor-ktor-client-json'] === 'undefined') {
|
10 | throw new Error("Error loading module 'git-rest-wrapper-gitrest'. Its dependency 'ktor-ktor-client-json' was not found. Please, check whether 'ktor-ktor-client-json' is loaded prior to 'git-rest-wrapper-gitrest'.");
|
11 | }if (typeof this['ktor-ktor-client-serialization'] === 'undefined') {
|
12 | throw new Error("Error loading module 'git-rest-wrapper-gitrest'. Its dependency 'ktor-ktor-client-serialization' was not found. Please, check whether 'ktor-ktor-client-serialization' is loaded prior to 'git-rest-wrapper-gitrest'.");
|
13 | }if (typeof this['ktor-ktor-client-core'] === 'undefined') {
|
14 | throw new Error("Error loading module 'git-rest-wrapper-gitrest'. Its dependency 'ktor-ktor-client-core' was not found. Please, check whether 'ktor-ktor-client-core' is loaded prior to 'git-rest-wrapper-gitrest'.");
|
15 | }if (typeof this['kotlinx-serialization-kotlinx-serialization-runtime'] === 'undefined') {
|
16 | throw new Error("Error loading module 'git-rest-wrapper-gitrest'. Its dependency 'kotlinx-serialization-kotlinx-serialization-runtime' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-runtime' is loaded prior to 'git-rest-wrapper-gitrest'.");
|
17 | }if (typeof this['ktor-ktor-http'] === 'undefined') {
|
18 | throw new Error("Error loading module 'git-rest-wrapper-gitrest'. Its dependency 'ktor-ktor-http' was not found. Please, check whether 'ktor-ktor-http' is loaded prior to 'git-rest-wrapper-gitrest'.");
|
19 | }if (typeof this['kotlinx-coroutines-core'] === 'undefined') {
|
20 | throw new Error("Error loading module 'git-rest-wrapper-gitrest'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'git-rest-wrapper-gitrest'.");
|
21 | }root['git-rest-wrapper-gitrest'] = factory(typeof this['git-rest-wrapper-gitrest'] === 'undefined' ? {} : this['git-rest-wrapper-gitrest'], kotlin, this['ktor-ktor-client-json'], this['ktor-ktor-client-serialization'], this['ktor-ktor-client-core'], this['kotlinx-serialization-kotlinx-serialization-runtime'], this['ktor-ktor-http'], this['kotlinx-coroutines-core']);
|
22 | }
|
23 | }(this, function (_, Kotlin, $module$ktor_ktor_client_json, $module$ktor_ktor_client_serialization, $module$ktor_ktor_client_core, $module$kotlinx_serialization_kotlinx_serialization_runtime, $module$ktor_ktor_http, $module$kotlinx_coroutines_core) {
|
24 | 'use strict';
|
25 | var $$importsForInline$$ = _.$$importsForInline$$ || (_.$$importsForInline$$ = {});
|
26 | var Unit = Kotlin.kotlin.Unit;
|
27 | var COROUTINE_SUSPENDED = Kotlin.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED;
|
28 | var CoroutineImpl = Kotlin.kotlin.coroutines.CoroutineImpl;
|
29 | var equals = Kotlin.equals;
|
30 | var RuntimeException_init = Kotlin.kotlin.RuntimeException_init_pdl1vj$;
|
31 | var List = Kotlin.kotlin.collections.List;
|
32 | var Any = Object;
|
33 | var throwCCE = Kotlin.throwCCE;
|
34 | var toString = Kotlin.toString;
|
35 | var Exception = Kotlin.kotlin.Exception;
|
36 | var HashMap_init = Kotlin.kotlin.collections.HashMap_init_q3lmfv$;
|
37 | var Kind_CLASS = Kotlin.Kind.CLASS;
|
38 | var Kind_INTERFACE = Kotlin.Kind.INTERFACE;
|
39 | var JsonFeature = $module$ktor_ktor_client_json.io.ktor.client.features.json.JsonFeature;
|
40 | var KotlinxSerializer = $module$ktor_ktor_client_serialization.io.ktor.client.features.json.serializer.KotlinxSerializer;
|
41 | var HttpClient = $module$ktor_ktor_client_core.io.ktor.client.HttpClient_f0veat$;
|
42 | var isBlank = Kotlin.kotlin.text.isBlank_gw00vp$;
|
43 | var println = Kotlin.kotlin.io.println_s8jyv4$;
|
44 | var JsonConfiguration = $module$kotlinx_serialization_kotlinx_serialization_runtime.kotlinx.serialization.json.JsonConfiguration;
|
45 | var Json = $module$kotlinx_serialization_kotlinx_serialization_runtime.kotlinx.serialization.json.Json;
|
46 | var removePrefix = Kotlin.kotlin.text.removePrefix_gsj5wt$;
|
47 | var hashCode = Kotlin.hashCode;
|
48 | var first = Kotlin.kotlin.collections.first_us0mfu$;
|
49 | var Regex_init = Kotlin.kotlin.text.Regex_init_61zpoe$;
|
50 | var ensureNotNull = Kotlin.ensureNotNull;
|
51 | var Kind_OBJECT = Kotlin.Kind.OBJECT;
|
52 | var getKClass = Kotlin.getKClass;
|
53 | var createKType = Kotlin.createKType;
|
54 | var createInvariantKTypeProjection = Kotlin.createInvariantKTypeProjection;
|
55 | var URLProtocol = $module$ktor_ktor_http.io.ktor.http.URLProtocol;
|
56 | var header = $module$ktor_ktor_client_core.io.ktor.client.request.header_xadl6p$;
|
57 | var defaultRequest = $module$ktor_ktor_client_core.io.ktor.client.features.defaultRequest_fxc3ki$;
|
58 | var takeFrom = $module$ktor_ktor_client_core.$$importsForInline$$['ktor-ktor-http'].io.ktor.http.takeFrom_jl1sg7$;
|
59 | var utils = $module$ktor_ktor_client_core.io.ktor.client.utils;
|
60 | var url = $module$ktor_ktor_client_core.io.ktor.client.request.url_3rzbk2$;
|
61 | var HttpMethod = $module$ktor_ktor_client_core.$$importsForInline$$['ktor-ktor-http'].io.ktor.http.HttpMethod;
|
62 | var HttpRequestBuilder_init = $module$ktor_ktor_client_core.io.ktor.client.request.HttpRequestBuilder;
|
63 | var HttpStatement_init = $module$ktor_ktor_client_core.io.ktor.client.statement.HttpStatement;
|
64 | var HttpResponse = $module$ktor_ktor_client_core.io.ktor.client.statement.HttpResponse;
|
65 | var complete = $module$ktor_ktor_client_core.io.ktor.client.statement.complete_abn2de$;
|
66 | var call = $module$ktor_ktor_client_core.io.ktor.client.call;
|
67 | var TypeInfo_init = $module$ktor_ktor_client_core.io.ktor.client.call.TypeInfo;
|
68 | var NullableSerializer = $module$kotlinx_serialization_kotlinx_serialization_runtime.kotlinx.serialization.internal.NullableSerializer;
|
69 | var SerialClassDescImpl = $module$kotlinx_serialization_kotlinx_serialization_runtime.kotlinx.serialization.internal.SerialClassDescImpl;
|
70 | var internal = $module$kotlinx_serialization_kotlinx_serialization_runtime.kotlinx.serialization.internal;
|
71 | var UnknownFieldException = $module$kotlinx_serialization_kotlinx_serialization_runtime.kotlinx.serialization.UnknownFieldException;
|
72 | var GeneratedSerializer = $module$kotlinx_serialization_kotlinx_serialization_runtime.kotlinx.serialization.internal.GeneratedSerializer;
|
73 | var PrimitiveClasses$stringClass = Kotlin.kotlin.reflect.js.internal.PrimitiveClasses.stringClass;
|
74 | var ReferenceArraySerializer = $module$kotlinx_serialization_kotlinx_serialization_runtime.kotlinx.serialization.internal.ReferenceArraySerializer;
|
75 | var firstOrNull = Kotlin.kotlin.collections.firstOrNull_2p1efm$;
|
76 | var replace = Kotlin.kotlin.text.replace_680rmw$;
|
77 | var PrimitiveKind = $module$kotlinx_serialization_kotlinx_serialization_runtime.kotlinx.serialization.PrimitiveKind;
|
78 | var PrimitiveDescriptor = $module$kotlinx_serialization_kotlinx_serialization_runtime.kotlinx.serialization.PrimitiveDescriptor_87l9oo$;
|
79 | var kotlin_js_internal_StringCompanionObject = Kotlin.kotlin.js.internal.StringCompanionObject;
|
80 | var serializer = $module$kotlinx_serialization_kotlinx_serialization_runtime.kotlinx.serialization.builtins.serializer_6eet4j$;
|
81 | var KSerializer = $module$kotlinx_serialization_kotlinx_serialization_runtime.kotlinx.serialization.KSerializer;
|
82 | var coroutines = $module$kotlinx_coroutines_core.kotlinx.coroutines;
|
83 | var promise = $module$kotlinx_coroutines_core.kotlinx.coroutines.promise_pda6u4$;
|
84 | var collectionSizeOrDefault = Kotlin.kotlin.collections.collectionSizeOrDefault_ba2ldo$;
|
85 | var ArrayList_init = Kotlin.kotlin.collections.ArrayList_init_ww73n8$;
|
86 | var copyToArray = Kotlin.kotlin.collections.copyToArray;
|
87 | var await_0 = $module$kotlinx_coroutines_core.kotlinx.coroutines.await_t11jrl$;
|
88 | var split = Kotlin.kotlin.text.split_ip8yn$;
|
89 | var toLong = Kotlin.kotlin.text.toLong_pdl1vz$;
|
90 | var startsWith = Kotlin.kotlin.text.startsWith_7epoxm$;
|
91 | var L864000000 = Kotlin.Long.fromInt(864000000);
|
92 | License.prototype = Object.create(DelegateResource.prototype);
|
93 | License.prototype.constructor = License;
|
94 | Repo.prototype = Object.create(DelegateResource.prototype);
|
95 | Repo.prototype.constructor = Repo;
|
96 | UrlType$HTTP.prototype = Object.create(UrlType.prototype);
|
97 | UrlType$HTTP.prototype.constructor = UrlType$HTTP;
|
98 | UrlType$HTTPS.prototype = Object.create(UrlType.prototype);
|
99 | UrlType$HTTPS.prototype.constructor = UrlType$HTTPS;
|
100 | UrlType$SSH.prototype = Object.create(UrlType.prototype);
|
101 | UrlType$SSH.prototype.constructor = UrlType$SSH;
|
102 | User.prototype = Object.create(DelegateResource.prototype);
|
103 | User.prototype.constructor = User;
|
104 | GiteaRepo.prototype = Object.create(Repo.prototype);
|
105 | GiteaRepo.prototype.constructor = GiteaRepo;
|
106 | GiteaUser.prototype = Object.create(User.prototype);
|
107 | GiteaUser.prototype.constructor = GiteaUser;
|
108 | GithubLicense.prototype = Object.create(License.prototype);
|
109 | GithubLicense.prototype.constructor = GithubLicense;
|
110 | GithubRepo.prototype = Object.create(Repo.prototype);
|
111 | GithubRepo.prototype.constructor = GithubRepo;
|
112 | GithubUser.prototype = Object.create(User.prototype);
|
113 | GithubUser.prototype.constructor = GithubUser;
|
114 | GitlabLicense.prototype = Object.create(License.prototype);
|
115 | GitlabLicense.prototype.constructor = GitlabLicense;
|
116 | GitlabRepo.prototype = Object.create(Repo.prototype);
|
117 | GitlabRepo.prototype.constructor = GitlabRepo;
|
118 | GitlabUser.prototype = Object.create(User.prototype);
|
119 | GitlabUser.prototype.constructor = GitlabUser;
|
120 | function gitrest(block) {
|
121 | var $receiver = new GitrestConfig();
|
122 | block($receiver);
|
123 | var config = $receiver;
|
124 | return new GitrestClient(config);
|
125 | }
|
126 | function GitrestClient(config) {
|
127 | this.config_0 = config;
|
128 | this.providers_0 = HashMap_init();
|
129 | }
|
130 | function Coroutine$get_0($this, str_0, endpointKey_0, block_0, continuation_0) {
|
131 | CoroutineImpl.call(this, continuation_0);
|
132 | this.exceptionState_0 = 8;
|
133 | this.$this = $this;
|
134 | this.local$tmp$_2 = void 0;
|
135 | this.local$tmp$_3 = void 0;
|
136 | this.local$providerStr = void 0;
|
137 | this.local$requestKey = void 0;
|
138 | this.local$tmp$_4 = void 0;
|
139 | this.local$str = str_0;
|
140 | this.local$endpointKey = endpointKey_0;
|
141 | this.local$block = block_0;
|
142 | }
|
143 | Coroutine$get_0.$metadata$ = {
|
144 | kind: Kotlin.Kind.CLASS,
|
145 | simpleName: null,
|
146 | interfaces: [CoroutineImpl]
|
147 | };
|
148 | Coroutine$get_0.prototype = Object.create(CoroutineImpl.prototype);
|
149 | Coroutine$get_0.prototype.constructor = Coroutine$get_0;
|
150 | Coroutine$get_0.prototype.doResume = function () {
|
151 | do
|
152 | try {
|
153 | switch (this.state_0) {
|
154 | case 0:
|
155 | var tmp$, tmp$_0, tmp$_1;
|
156 | this.local$providerStr = ProviderString_init_1(this.local$str);
|
157 | this.local$requestKey = this.local$providerStr.toString() + ':' + this.local$endpointKey;
|
158 | this.state_0 = 1;
|
159 | this.result_0 = this.$this.config_0.cache.get_ytbaoo$(this.local$requestKey, this);
|
160 | if (this.result_0 === COROUTINE_SUSPENDED)
|
161 | return COROUTINE_SUSPENDED;
|
162 | continue;
|
163 | case 1:
|
164 | if ((tmp$ = this.result_0) != null) {
|
165 | this.$this.config_0.logDebug('GIT-REST: Returning cached entry for ' + this.local$providerStr);
|
166 | return tmp$;
|
167 | } else {
|
168 | this.state_0 = 2;
|
169 | continue;
|
170 | }
|
171 |
|
172 | case 2:
|
173 | var providerId = this.local$providerStr.provider + '@' + this.local$providerStr.hostname;
|
174 | var tmp$_2;
|
175 | if ((tmp$_0 = this.$this.providers_0.get_11rb$(providerId)) != null)
|
176 | tmp$_2 = tmp$_0;
|
177 | else {
|
178 | var tmp$_3, tmp$_4, tmp$_5;
|
179 | var tmp$_6;
|
180 | var $receiver = this.$this.config_0.providers;
|
181 | var firstOrNull$result;
|
182 | firstOrNull$break: do {
|
183 | var tmp$_7;
|
184 | for (tmp$_7 = 0; tmp$_7 !== $receiver.length; ++tmp$_7) {
|
185 | var element = $receiver[tmp$_7];
|
186 | if (equals(element.key, this.local$providerStr.provider)) {
|
187 | firstOrNull$result = element;
|
188 | break firstOrNull$break;
|
189 | }}
|
190 | firstOrNull$result = null;
|
191 | }
|
192 | while (false);
|
193 | if ((tmp$_4 = (tmp$_3 = firstOrNull$result) != null ? tmp$_3.create_wf0mc2$(this.$this.config_0, this.local$providerStr.hostname) : null) != null) {
|
194 | this.$this.providers_0.put_xwzc9p$(providerId, tmp$_4);
|
195 | tmp$_6 = tmp$_4;
|
196 | } else
|
197 | tmp$_6 = null;
|
198 | tmp$_5 = tmp$_6;
|
199 | if (tmp$_5 == null) {
|
200 | throw RuntimeException_init('Provider not found: ' + providerId);
|
201 | }tmp$_2 = tmp$_5;
|
202 | }
|
203 |
|
204 | var provider = tmp$_2;
|
205 | this.exceptionState_0 = 6;
|
206 | this.state_0 = 3;
|
207 | this.result_0 = this.local$block(provider, this.local$providerStr.id, this);
|
208 | if (this.result_0 === COROUTINE_SUSPENDED)
|
209 | return COROUTINE_SUSPENDED;
|
210 | continue;
|
211 | case 3:
|
212 | var tmp$_8;
|
213 | if ((tmp$_1 = this.result_0) != null) {
|
214 | var tmp$_9, tmp$_10, tmp$_11, tmp$_12;
|
215 | if (((tmp$_10 = Kotlin.isType(tmp$_9 = tmp$_1, DelegateResource) ? tmp$_9 : null) != null ? (tmp$_10.setId_qtmmzu$(this.local$providerStr), Unit) : null) == null) {
|
216 | if ((tmp$_12 = Kotlin.isType(tmp$_11 = tmp$_1, List) ? tmp$_11 : null) != null) {
|
217 | var tmp$_13;
|
218 | tmp$_13 = tmp$_12.iterator();
|
219 | while (tmp$_13.hasNext()) {
|
220 | var element_0 = tmp$_13.next();
|
221 | element_0.setId_qtmmzu$(this.local$providerStr);
|
222 | }
|
223 | }}tmp$_8 = tmp$_1;
|
224 | } else
|
225 | tmp$_8 = null;
|
226 | if ((this.local$tmp$_2 = tmp$_8) != null) {
|
227 | var tmp$_14;
|
228 | this.state_0 = 4;
|
229 | this.result_0 = this.$this.config_0.cache.set_bm4g0d$(this.local$requestKey, Kotlin.isType(tmp$_14 = this.local$tmp$_2, Any) ? tmp$_14 : throwCCE(), this);
|
230 | if (this.result_0 === COROUTINE_SUSPENDED)
|
231 | return COROUTINE_SUSPENDED;
|
232 | continue;
|
233 | } else {
|
234 | this.local$tmp$_4 = null;
|
235 | this.state_0 = 5;
|
236 | continue;
|
237 | }
|
238 |
|
239 | case 4:
|
240 | this.local$tmp$_4 = this.local$tmp$_2;
|
241 | this.state_0 = 5;
|
242 | continue;
|
243 | case 5:
|
244 | this.local$tmp$_3 = this.local$tmp$_4;
|
245 | this.exceptionState_0 = 8;
|
246 | this.state_0 = 7;
|
247 | continue;
|
248 | case 6:
|
249 | this.exceptionState_0 = 8;
|
250 | var e = this.exception_0;
|
251 | if (Kotlin.isType(e, Exception)) {
|
252 | if (this.$this.config_0.strictMode)
|
253 | throw e;
|
254 | else
|
255 | this.$this.config_0.logError('GIT-REST: Error fetching ' + this.local$str + ': ' + toString(Kotlin.getKClassFromExpression(e).simpleName) + ' - ' + toString(e.message));
|
256 | this.local$tmp$_3 = null;
|
257 | } else
|
258 | throw e;
|
259 | this.state_0 = 7;
|
260 | continue;
|
261 | case 7:
|
262 | return this.local$tmp$_3;
|
263 | case 8:
|
264 | throw this.exception_0;
|
265 | default:this.state_0 = 8;
|
266 | throw new Error('State Machine Unreachable execution');
|
267 | }
|
268 | } catch (e) {
|
269 | if (this.state_0 === 8) {
|
270 | this.exceptionState_0 = this.state_0;
|
271 | throw e;
|
272 | } else {
|
273 | this.state_0 = this.exceptionState_0;
|
274 | this.exception_0 = e;
|
275 | }
|
276 | }
|
277 | while (true);
|
278 | };
|
279 | GitrestClient.prototype.get_0 = function (str_0, endpointKey_0, block_0, continuation_0, suspended) {
|
280 | var instance = new Coroutine$get_0(this, str_0, endpointKey_0, block_0, continuation_0);
|
281 | if (suspended)
|
282 | return instance;
|
283 | else
|
284 | return instance.doResume(null);
|
285 | };
|
286 | function Coroutine$GitrestClient$getUser$lambda(it_0, id_0, continuation_0) {
|
287 | CoroutineImpl.call(this, continuation_0);
|
288 | this.exceptionState_0 = 1;
|
289 | this.local$it = it_0;
|
290 | this.local$id = id_0;
|
291 | }
|
292 | Coroutine$GitrestClient$getUser$lambda.$metadata$ = {
|
293 | kind: Kotlin.Kind.CLASS,
|
294 | simpleName: null,
|
295 | interfaces: [CoroutineImpl]
|
296 | };
|
297 | Coroutine$GitrestClient$getUser$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
298 | Coroutine$GitrestClient$getUser$lambda.prototype.constructor = Coroutine$GitrestClient$getUser$lambda;
|
299 | Coroutine$GitrestClient$getUser$lambda.prototype.doResume = function () {
|
300 | do
|
301 | try {
|
302 | switch (this.state_0) {
|
303 | case 0:
|
304 | this.state_0 = 2;
|
305 | this.result_0 = this.local$it.getUser_61zpoe$(this.local$id, this);
|
306 | if (this.result_0 === COROUTINE_SUSPENDED)
|
307 | return COROUTINE_SUSPENDED;
|
308 | continue;
|
309 | case 1:
|
310 | throw this.exception_0;
|
311 | case 2:
|
312 | return this.result_0;
|
313 | default:this.state_0 = 1;
|
314 | throw new Error('State Machine Unreachable execution');
|
315 | }
|
316 | } catch (e) {
|
317 | if (this.state_0 === 1) {
|
318 | this.exceptionState_0 = this.state_0;
|
319 | throw e;
|
320 | } else {
|
321 | this.state_0 = this.exceptionState_0;
|
322 | this.exception_0 = e;
|
323 | }
|
324 | }
|
325 | while (true);
|
326 | };
|
327 | function GitrestClient$getUser$lambda(it_0, id_0, continuation_0, suspended) {
|
328 | var instance = new Coroutine$GitrestClient$getUser$lambda(it_0, id_0, continuation_0);
|
329 | if (suspended)
|
330 | return instance;
|
331 | else
|
332 | return instance.doResume(null);
|
333 | }
|
334 | GitrestClient.prototype.getUser_61zpoe$ = function (str, continuation) {
|
335 | return this.get_0(str, 'getUser', GitrestClient$getUser$lambda, continuation);
|
336 | };
|
337 | function Coroutine$GitrestClient$getRepo$lambda(it_0, id_0, continuation_0) {
|
338 | CoroutineImpl.call(this, continuation_0);
|
339 | this.exceptionState_0 = 1;
|
340 | this.local$it = it_0;
|
341 | this.local$id = id_0;
|
342 | }
|
343 | Coroutine$GitrestClient$getRepo$lambda.$metadata$ = {
|
344 | kind: Kotlin.Kind.CLASS,
|
345 | simpleName: null,
|
346 | interfaces: [CoroutineImpl]
|
347 | };
|
348 | Coroutine$GitrestClient$getRepo$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
349 | Coroutine$GitrestClient$getRepo$lambda.prototype.constructor = Coroutine$GitrestClient$getRepo$lambda;
|
350 | Coroutine$GitrestClient$getRepo$lambda.prototype.doResume = function () {
|
351 | do
|
352 | try {
|
353 | switch (this.state_0) {
|
354 | case 0:
|
355 | this.state_0 = 2;
|
356 | this.result_0 = this.local$it.getRepo_61zpoe$(this.local$id, this);
|
357 | if (this.result_0 === COROUTINE_SUSPENDED)
|
358 | return COROUTINE_SUSPENDED;
|
359 | continue;
|
360 | case 1:
|
361 | throw this.exception_0;
|
362 | case 2:
|
363 | return this.result_0;
|
364 | default:this.state_0 = 1;
|
365 | throw new Error('State Machine Unreachable execution');
|
366 | }
|
367 | } catch (e) {
|
368 | if (this.state_0 === 1) {
|
369 | this.exceptionState_0 = this.state_0;
|
370 | throw e;
|
371 | } else {
|
372 | this.state_0 = this.exceptionState_0;
|
373 | this.exception_0 = e;
|
374 | }
|
375 | }
|
376 | while (true);
|
377 | };
|
378 | function GitrestClient$getRepo$lambda(it_0, id_0, continuation_0, suspended) {
|
379 | var instance = new Coroutine$GitrestClient$getRepo$lambda(it_0, id_0, continuation_0);
|
380 | if (suspended)
|
381 | return instance;
|
382 | else
|
383 | return instance.doResume(null);
|
384 | }
|
385 | GitrestClient.prototype.getRepo_61zpoe$ = function (str, continuation) {
|
386 | return this.get_0(str, 'getRepo', GitrestClient$getRepo$lambda, continuation);
|
387 | };
|
388 | function Coroutine$GitrestClient$getRepoContributors$lambda(it_0, id_0, continuation_0) {
|
389 | CoroutineImpl.call(this, continuation_0);
|
390 | this.exceptionState_0 = 1;
|
391 | this.local$it = it_0;
|
392 | this.local$id = id_0;
|
393 | }
|
394 | Coroutine$GitrestClient$getRepoContributors$lambda.$metadata$ = {
|
395 | kind: Kotlin.Kind.CLASS,
|
396 | simpleName: null,
|
397 | interfaces: [CoroutineImpl]
|
398 | };
|
399 | Coroutine$GitrestClient$getRepoContributors$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
400 | Coroutine$GitrestClient$getRepoContributors$lambda.prototype.constructor = Coroutine$GitrestClient$getRepoContributors$lambda;
|
401 | Coroutine$GitrestClient$getRepoContributors$lambda.prototype.doResume = function () {
|
402 | do
|
403 | try {
|
404 | switch (this.state_0) {
|
405 | case 0:
|
406 | this.state_0 = 2;
|
407 | this.result_0 = this.local$it.getRepoContributors_61zpoe$(this.local$id, this);
|
408 | if (this.result_0 === COROUTINE_SUSPENDED)
|
409 | return COROUTINE_SUSPENDED;
|
410 | continue;
|
411 | case 1:
|
412 | throw this.exception_0;
|
413 | case 2:
|
414 | return this.result_0;
|
415 | default:this.state_0 = 1;
|
416 | throw new Error('State Machine Unreachable execution');
|
417 | }
|
418 | } catch (e) {
|
419 | if (this.state_0 === 1) {
|
420 | this.exceptionState_0 = this.state_0;
|
421 | throw e;
|
422 | } else {
|
423 | this.state_0 = this.exceptionState_0;
|
424 | this.exception_0 = e;
|
425 | }
|
426 | }
|
427 | while (true);
|
428 | };
|
429 | function GitrestClient$getRepoContributors$lambda(it_0, id_0, continuation_0, suspended) {
|
430 | var instance = new Coroutine$GitrestClient$getRepoContributors$lambda(it_0, id_0, continuation_0);
|
431 | if (suspended)
|
432 | return instance;
|
433 | else
|
434 | return instance.doResume(null);
|
435 | }
|
436 | GitrestClient.prototype.getRepoContributors_61zpoe$ = function (str, continuation) {
|
437 | return this.get_0(str, 'getRepoContributors', GitrestClient$getRepoContributors$lambda, continuation);
|
438 | };
|
439 | function Coroutine$GitrestClient$getLicense$lambda(it_0, id_0, continuation_0) {
|
440 | CoroutineImpl.call(this, continuation_0);
|
441 | this.exceptionState_0 = 1;
|
442 | this.local$it = it_0;
|
443 | this.local$id = id_0;
|
444 | }
|
445 | Coroutine$GitrestClient$getLicense$lambda.$metadata$ = {
|
446 | kind: Kotlin.Kind.CLASS,
|
447 | simpleName: null,
|
448 | interfaces: [CoroutineImpl]
|
449 | };
|
450 | Coroutine$GitrestClient$getLicense$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
451 | Coroutine$GitrestClient$getLicense$lambda.prototype.constructor = Coroutine$GitrestClient$getLicense$lambda;
|
452 | Coroutine$GitrestClient$getLicense$lambda.prototype.doResume = function () {
|
453 | do
|
454 | try {
|
455 | switch (this.state_0) {
|
456 | case 0:
|
457 | this.state_0 = 2;
|
458 | this.result_0 = this.local$it.getLicense_61zpoe$(this.local$id, this);
|
459 | if (this.result_0 === COROUTINE_SUSPENDED)
|
460 | return COROUTINE_SUSPENDED;
|
461 | continue;
|
462 | case 1:
|
463 | throw this.exception_0;
|
464 | case 2:
|
465 | return this.result_0;
|
466 | default:this.state_0 = 1;
|
467 | throw new Error('State Machine Unreachable execution');
|
468 | }
|
469 | } catch (e) {
|
470 | if (this.state_0 === 1) {
|
471 | this.exceptionState_0 = this.state_0;
|
472 | throw e;
|
473 | } else {
|
474 | this.state_0 = this.exceptionState_0;
|
475 | this.exception_0 = e;
|
476 | }
|
477 | }
|
478 | while (true);
|
479 | };
|
480 | function GitrestClient$getLicense$lambda(it_0, id_0, continuation_0, suspended) {
|
481 | var instance = new Coroutine$GitrestClient$getLicense$lambda(it_0, id_0, continuation_0);
|
482 | if (suspended)
|
483 | return instance;
|
484 | else
|
485 | return instance.doResume(null);
|
486 | }
|
487 | GitrestClient.prototype.getLicense_61zpoe$ = function (str, continuation) {
|
488 | return this.get_0(str, 'getLicense', GitrestClient$getLicense$lambda, continuation);
|
489 | };
|
490 | GitrestClient.$metadata$ = {
|
491 | kind: Kind_CLASS,
|
492 | simpleName: 'GitrestClient',
|
493 | interfaces: [RequestProvider]
|
494 | };
|
495 | function RequestProvider() {
|
496 | }
|
497 | RequestProvider.$metadata$ = {
|
498 | kind: Kind_INTERFACE,
|
499 | simpleName: 'RequestProvider',
|
500 | interfaces: []
|
501 | };
|
502 | function ServiceBuilder() {
|
503 | }
|
504 | function ServiceBuilder$ktor$lambda$lambda(this$ktor) {
|
505 | return function ($receiver) {
|
506 | $receiver.serializer = new KotlinxSerializer(this$ktor.jsonSerializer);
|
507 | return Unit;
|
508 | };
|
509 | }
|
510 | function ServiceBuilder$ktor$lambda(this$ktor, closure$block) {
|
511 | return function ($receiver) {
|
512 | $receiver.install_xlxg29$(JsonFeature.Feature, ServiceBuilder$ktor$lambda$lambda(this$ktor));
|
513 | closure$block($receiver);
|
514 | return Unit;
|
515 | };
|
516 | }
|
517 | ServiceBuilder.prototype.ktor_1v6kay$ = function ($receiver, block) {
|
518 | return HttpClient(ServiceBuilder$ktor$lambda($receiver, block));
|
519 | };
|
520 | ServiceBuilder.$metadata$ = {
|
521 | kind: Kind_INTERFACE,
|
522 | simpleName: 'ServiceBuilder',
|
523 | interfaces: []
|
524 | };
|
525 | function DelegateResource() {
|
526 | this.id_axp2ks$_0 = '';
|
527 | this.hostname_sgm644$_0 = '';
|
528 | this.provider_v1qh6e$_0 = '';
|
529 | }
|
530 | Object.defineProperty(DelegateResource.prototype, 'id', {
|
531 | get: function () {
|
532 | return this.id_axp2ks$_0;
|
533 | },
|
534 | set: function (id) {
|
535 | this.id_axp2ks$_0 = id;
|
536 | }
|
537 | });
|
538 | Object.defineProperty(DelegateResource.prototype, 'hostname', {
|
539 | get: function () {
|
540 | return this.hostname_sgm644$_0;
|
541 | },
|
542 | set: function (hostname) {
|
543 | this.hostname_sgm644$_0 = hostname;
|
544 | }
|
545 | });
|
546 | Object.defineProperty(DelegateResource.prototype, 'provider', {
|
547 | get: function () {
|
548 | return this.provider_v1qh6e$_0;
|
549 | },
|
550 | set: function (provider) {
|
551 | this.provider_v1qh6e$_0 = provider;
|
552 | }
|
553 | });
|
554 | Object.defineProperty(DelegateResource.prototype, 'providerString', {
|
555 | get: function () {
|
556 | return ProviderString_init_0(this.provider, this.hostname, this.id);
|
557 | }
|
558 | });
|
559 | DelegateResource.prototype.setId_qtmmzu$ = function (providerString) {
|
560 | this.hostname = providerString.hostname;
|
561 | this.provider = providerString.provider;
|
562 | if (isBlank(this.id))
|
563 | throw RuntimeException_init('GIT-REST: Malformed response, .id not provided in ' + toString(Kotlin.getKClassFromExpression(this).simpleName) + ', requested ' + providerString);
|
564 | };
|
565 | DelegateResource.$metadata$ = {
|
566 | kind: Kind_CLASS,
|
567 | simpleName: 'DelegateResource',
|
568 | interfaces: []
|
569 | };
|
570 | function GitrestConfig() {
|
571 | this.providers = [GithubProvider$Companion_getInstance(), GitlabProvider$Companion_getInstance(), GiteaProvider$Companion_getInstance()];
|
572 | this.strictMode = false;
|
573 | this.logDebug = GitrestConfig$logDebug$lambda;
|
574 | this.logError = GitrestConfig$logError$lambda;
|
575 | this.jsonSerializer = new Json(JsonConfiguration.Companion.Stable.copy_bjakrj$(void 0, true));
|
576 | this.cache = new MemoryCache();
|
577 | this.platformConfig = new PlatformConfig();
|
578 | }
|
579 | GitrestConfig.prototype.platform_9or9kc$ = function (block) {
|
580 | block(this.platformConfig);
|
581 | };
|
582 | function GitrestConfig$logDebug$lambda(it) {
|
583 | return Unit;
|
584 | }
|
585 | function GitrestConfig$logError$lambda(it) {
|
586 | println(it);
|
587 | return Unit;
|
588 | }
|
589 | GitrestConfig.$metadata$ = {
|
590 | kind: Kind_CLASS,
|
591 | simpleName: 'GitrestConfig',
|
592 | interfaces: []
|
593 | };
|
594 | function License() {
|
595 | DelegateResource.call(this);
|
596 | this.name_hv9rx6$_0 = null;
|
597 | this.description_lwiggj$_0 = null;
|
598 | this.body_hox0f7$_0 = null;
|
599 | this.infoUrl_80v10y$_0 = null;
|
600 | this.permissions_4d9prp$_0 = null;
|
601 | this.conditions_x62ax9$_0 = null;
|
602 | this.limitations_do0i7e$_0 = null;
|
603 | }
|
604 | Object.defineProperty(License.prototype, 'name', {
|
605 | get: function () {
|
606 | return this.name_hv9rx6$_0;
|
607 | }
|
608 | });
|
609 | Object.defineProperty(License.prototype, 'description', {
|
610 | get: function () {
|
611 | return this.description_lwiggj$_0;
|
612 | }
|
613 | });
|
614 | Object.defineProperty(License.prototype, 'body', {
|
615 | get: function () {
|
616 | return this.body_hox0f7$_0;
|
617 | }
|
618 | });
|
619 | Object.defineProperty(License.prototype, 'infoUrl', {
|
620 | get: function () {
|
621 | return this.infoUrl_80v10y$_0;
|
622 | }
|
623 | });
|
624 | Object.defineProperty(License.prototype, 'permissions', {
|
625 | get: function () {
|
626 | return this.permissions_4d9prp$_0;
|
627 | }
|
628 | });
|
629 | Object.defineProperty(License.prototype, 'conditions', {
|
630 | get: function () {
|
631 | return this.conditions_x62ax9$_0;
|
632 | }
|
633 | });
|
634 | Object.defineProperty(License.prototype, 'limitations', {
|
635 | get: function () {
|
636 | return this.limitations_do0i7e$_0;
|
637 | }
|
638 | });
|
639 | License.$metadata$ = {
|
640 | kind: Kind_CLASS,
|
641 | simpleName: 'License',
|
642 | interfaces: [DelegateResource]
|
643 | };
|
644 | function ProviderString() {
|
645 | this.provider = null;
|
646 | this.hostname = null;
|
647 | this.id = null;
|
648 | }
|
649 | ProviderString.prototype.inferUrl_4sgkox$ = function (type) {
|
650 | if (type === void 0)
|
651 | type = UrlType$HTTPS_getInstance();
|
652 | return type.getUrl_puj7f4$(removePrefix(this.hostname, 'api.'), this.id);
|
653 | };
|
654 | ProviderString.prototype.toString = function () {
|
655 | return this.provider + '@' + this.hostname + ':' + this.id;
|
656 | };
|
657 | ProviderString.prototype.equals = function (other) {
|
658 | var tmp$, tmp$_0, tmp$_1;
|
659 | return (tmp$_1 = (tmp$_0 = Kotlin.isType(tmp$ = other, ProviderString) ? tmp$ : null) != null ? equals(this.provider, tmp$_0.provider) && equals(this.hostname, other.hostname) && equals(this.id, tmp$_0.id) : null) != null ? tmp$_1 : this === other;
|
660 | };
|
661 | ProviderString.prototype.hashCode = function () {
|
662 | var result = hashCode(this.provider);
|
663 | result = (31 * result | 0) + hashCode(this.hostname) | 0;
|
664 | result = (31 * result | 0) + hashCode(this.id) | 0;
|
665 | return result;
|
666 | };
|
667 | ProviderString.$metadata$ = {
|
668 | kind: Kind_CLASS,
|
669 | simpleName: 'ProviderString',
|
670 | interfaces: []
|
671 | };
|
672 | function ProviderString_init(provider, hostname, $this) {
|
673 | $this = $this || Object.create(ProviderString.prototype);
|
674 | ProviderString.call($this);
|
675 | $this.provider = provider;
|
676 | $this.hostname = hostname;
|
677 | $this.id = '';
|
678 | return $this;
|
679 | }
|
680 | function ProviderString_init_0(provider, hostname, id, $this) {
|
681 | $this = $this || Object.create(ProviderString.prototype);
|
682 | ProviderString_init_1(provider + '@' + hostname + ':' + id, $this);
|
683 | return $this;
|
684 | }
|
685 | function ProviderString_init_1(str, $this) {
|
686 | $this = $this || Object.create(ProviderString.prototype);
|
687 | ProviderString.call($this);
|
688 | var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3;
|
689 | if (str.length === 0)
|
690 | throw RuntimeException_init('GIT-REST: Empty ProviderString');
|
691 | var providerRegex = Regex_init('(?:(\\w*)(?:@([\\w.]*))?:)?([\\w-_./]*)');
|
692 | var hostnameRegex = Regex_init('(\\w+\\.\\w+)$');
|
693 | tmp$_0 = (tmp$ = providerRegex.matchEntire_6bul2c$(str)) != null ? tmp$.destructured : null;
|
694 | if (tmp$_0 == null) {
|
695 | throw RuntimeException_init("GIT-REST: Unable to parse ProviderString '" + str + "'");
|
696 | }var provider = tmp$_0.match.groupValues.get_za3lpa$(1);
|
697 | var hostname = tmp$_0.match.groupValues.get_za3lpa$(2);
|
698 | var id = tmp$_0.match.groupValues.get_za3lpa$(3);
|
699 | var tmp$_4 = provider.length === 0;
|
700 | if (tmp$_4) {
|
701 | tmp$_4 = hostname.length === 0;
|
702 | }if (tmp$_4) {
|
703 | var default_0 = first(DEFAULT_PROVIDERS);
|
704 | $this.provider = default_0.provider;
|
705 | $this.hostname = default_0.hostname;
|
706 | } else {
|
707 | if (provider.length === 0 || equals(provider, 'git')) {
|
708 | var $receiver = DEFAULT_PROVIDERS;
|
709 | var firstOrNull$result;
|
710 | firstOrNull$break: do {
|
711 | var tmp$_5;
|
712 | for (tmp$_5 = 0; tmp$_5 !== $receiver.length; ++tmp$_5) {
|
713 | var element = $receiver[tmp$_5];
|
714 | var tmp$_6, tmp$_7;
|
715 | if (equals((tmp$_6 = hostnameRegex.find_905azu$(element.hostname)) != null ? tmp$_6.value : null, (tmp$_7 = hostnameRegex.find_905azu$(hostname)) != null ? tmp$_7.value : null)) {
|
716 | firstOrNull$result = element;
|
717 | break firstOrNull$break;
|
718 | }}
|
719 | firstOrNull$result = null;
|
720 | }
|
721 | while (false);
|
722 | tmp$_1 = firstOrNull$result;
|
723 | if (tmp$_1 == null) {
|
724 | throw RuntimeException_init("GIT-REST: Unable to find a default provider for '" + str + "'");
|
725 | }var default_1 = tmp$_1;
|
726 | $this.provider = default_1.provider;
|
727 | $this.hostname = default_1.hostname;
|
728 | } else {
|
729 | if (hostname.length === 0) {
|
730 | var $receiver_0 = DEFAULT_PROVIDERS;
|
731 | var firstOrNull$result_0;
|
732 | firstOrNull$break: do {
|
733 | var tmp$_8;
|
734 | for (tmp$_8 = 0; tmp$_8 !== $receiver_0.length; ++tmp$_8) {
|
735 | var element_0 = $receiver_0[tmp$_8];
|
736 | if (equals(element_0.provider, provider)) {
|
737 | firstOrNull$result_0 = element_0;
|
738 | break firstOrNull$break;
|
739 | }}
|
740 | firstOrNull$result_0 = null;
|
741 | }
|
742 | while (false);
|
743 | tmp$_2 = firstOrNull$result_0;
|
744 | if (tmp$_2 == null) {
|
745 | throw RuntimeException_init("GIT-REST: Unable to find a default context for '" + str + "'");
|
746 | }var default_2 = tmp$_2;
|
747 | $this.provider = provider;
|
748 | $this.hostname = default_2.hostname;
|
749 | } else {
|
750 | var $receiver_1 = DEFAULT_PROVIDERS;
|
751 | var firstOrNull$result_1;
|
752 | firstOrNull$break: do {
|
753 | var tmp$_9;
|
754 | for (tmp$_9 = 0; tmp$_9 !== $receiver_1.length; ++tmp$_9) {
|
755 | var element_1 = $receiver_1[tmp$_9];
|
756 | var tmp$_10, tmp$_11;
|
757 | if (equals(element_1.provider, provider) && equals((tmp$_10 = hostnameRegex.find_905azu$(element_1.hostname)) != null ? tmp$_10.value : null, (tmp$_11 = hostnameRegex.find_905azu$(hostname)) != null ? tmp$_11.value : null)) {
|
758 | firstOrNull$result_1 = element_1;
|
759 | break firstOrNull$break;
|
760 | }}
|
761 | firstOrNull$result_1 = null;
|
762 | }
|
763 | while (false);
|
764 | var default_3 = firstOrNull$result_1;
|
765 | $this.provider = provider;
|
766 | $this.hostname = (tmp$_3 = default_3 != null ? default_3.hostname : null) != null ? tmp$_3 : hostname;
|
767 | }
|
768 | }
|
769 | }
|
770 | $this.id = id;
|
771 | return $this;
|
772 | }
|
773 | function Repo() {
|
774 | DelegateResource.call(this);
|
775 | this.description_eirp3i$_0 = null;
|
776 | this.url_eun8ip$_0 = null;
|
777 | this.websiteUrl_dmzd2q$_0 = null;
|
778 | this.gitUrlHttp_hdynwf$_0 = null;
|
779 | this.gitUrlSsh_ivwby5$_0 = null;
|
780 | this.license_6si5jh$_0 = null;
|
781 | this.defaultBranch_4ygp4l$_0 = null;
|
782 | }
|
783 | Object.defineProperty(Repo.prototype, 'description', {
|
784 | get: function () {
|
785 | return this.description_eirp3i$_0;
|
786 | }
|
787 | });
|
788 | Object.defineProperty(Repo.prototype, 'url', {
|
789 | get: function () {
|
790 | return this.url_eun8ip$_0;
|
791 | }
|
792 | });
|
793 | Object.defineProperty(Repo.prototype, 'websiteUrl', {
|
794 | get: function () {
|
795 | return this.websiteUrl_dmzd2q$_0;
|
796 | }
|
797 | });
|
798 | Object.defineProperty(Repo.prototype, 'gitUrlHttp', {
|
799 | get: function () {
|
800 | return this.gitUrlHttp_hdynwf$_0;
|
801 | }
|
802 | });
|
803 | Object.defineProperty(Repo.prototype, 'gitUrlSsh', {
|
804 | get: function () {
|
805 | return this.gitUrlSsh_ivwby5$_0;
|
806 | }
|
807 | });
|
808 | Object.defineProperty(Repo.prototype, 'license', {
|
809 | get: function () {
|
810 | return this.license_6si5jh$_0;
|
811 | }
|
812 | });
|
813 | Object.defineProperty(Repo.prototype, 'defaultBranch', {
|
814 | get: function () {
|
815 | return this.defaultBranch_4ygp4l$_0;
|
816 | }
|
817 | });
|
818 | Repo.prototype.setId_qtmmzu$ = function (providerString) {
|
819 | var tmp$;
|
820 | DelegateResource.prototype.setId_qtmmzu$.call(this, providerString);
|
821 | (tmp$ = this.license) != null ? (tmp$.setId_qtmmzu$(providerString), Unit) : null;
|
822 | };
|
823 | Repo.prototype.getRawFileUrl_puj7f4$$default = function (branchName, filePath) {
|
824 | return null;
|
825 | };
|
826 | Repo.prototype.getRawFileUrl_puj7f4$ = function (branchName, filePath, callback$default) {
|
827 | if (branchName === void 0)
|
828 | branchName = ensureNotNull(this.defaultBranch);
|
829 | return callback$default ? callback$default(branchName, filePath) : this.getRawFileUrl_puj7f4$$default(branchName, filePath);
|
830 | };
|
831 | Repo.$metadata$ = {
|
832 | kind: Kind_CLASS,
|
833 | simpleName: 'Repo',
|
834 | interfaces: [DelegateResource]
|
835 | };
|
836 | function UrlType(prefix, separator) {
|
837 | this.prefix = prefix;
|
838 | this.separator = separator;
|
839 | }
|
840 | UrlType.prototype.getUrl_puj7f4$ = function (hostname, path) {
|
841 | return this.prefix + hostname + this.separator + path;
|
842 | };
|
843 | function UrlType$HTTP() {
|
844 | UrlType$HTTP_instance = this;
|
845 | UrlType.call(this, 'http://', '/');
|
846 | }
|
847 | UrlType$HTTP.$metadata$ = {
|
848 | kind: Kind_OBJECT,
|
849 | simpleName: 'HTTP',
|
850 | interfaces: [UrlType]
|
851 | };
|
852 | var UrlType$HTTP_instance = null;
|
853 | function UrlType$HTTP_getInstance() {
|
854 | if (UrlType$HTTP_instance === null) {
|
855 | new UrlType$HTTP();
|
856 | }return UrlType$HTTP_instance;
|
857 | }
|
858 | function UrlType$HTTPS() {
|
859 | UrlType$HTTPS_instance = this;
|
860 | UrlType.call(this, 'https://', '/');
|
861 | }
|
862 | UrlType$HTTPS.$metadata$ = {
|
863 | kind: Kind_OBJECT,
|
864 | simpleName: 'HTTPS',
|
865 | interfaces: [UrlType]
|
866 | };
|
867 | var UrlType$HTTPS_instance = null;
|
868 | function UrlType$HTTPS_getInstance() {
|
869 | if (UrlType$HTTPS_instance === null) {
|
870 | new UrlType$HTTPS();
|
871 | }return UrlType$HTTPS_instance;
|
872 | }
|
873 | function UrlType$SSH() {
|
874 | UrlType$SSH_instance = this;
|
875 | UrlType.call(this, 'git@', ':');
|
876 | }
|
877 | UrlType$SSH.$metadata$ = {
|
878 | kind: Kind_OBJECT,
|
879 | simpleName: 'SSH',
|
880 | interfaces: [UrlType]
|
881 | };
|
882 | var UrlType$SSH_instance = null;
|
883 | function UrlType$SSH_getInstance() {
|
884 | if (UrlType$SSH_instance === null) {
|
885 | new UrlType$SSH();
|
886 | }return UrlType$SSH_instance;
|
887 | }
|
888 | UrlType.$metadata$ = {
|
889 | kind: Kind_CLASS,
|
890 | simpleName: 'UrlType',
|
891 | interfaces: []
|
892 | };
|
893 | function User() {
|
894 | DelegateResource.call(this);
|
895 | this.name_p9le18$_0 = null;
|
896 | this.url_33p196$_0 = null;
|
897 | this.avatarUrl_q68x0f$_0 = null;
|
898 | this.websiteUrl_beuvqt$_0 = null;
|
899 | this.email_6073dz$_0 = null;
|
900 | this.bio_341clv$_0 = null;
|
901 | }
|
902 | Object.defineProperty(User.prototype, 'name', {
|
903 | get: function () {
|
904 | return this.name_p9le18$_0;
|
905 | }
|
906 | });
|
907 | Object.defineProperty(User.prototype, 'url', {
|
908 | get: function () {
|
909 | return this.url_33p196$_0;
|
910 | }
|
911 | });
|
912 | Object.defineProperty(User.prototype, 'avatarUrl', {
|
913 | get: function () {
|
914 | return this.avatarUrl_q68x0f$_0;
|
915 | }
|
916 | });
|
917 | Object.defineProperty(User.prototype, 'websiteUrl', {
|
918 | get: function () {
|
919 | return this.websiteUrl_beuvqt$_0;
|
920 | }
|
921 | });
|
922 | Object.defineProperty(User.prototype, 'email', {
|
923 | get: function () {
|
924 | return this.email_6073dz$_0;
|
925 | }
|
926 | });
|
927 | Object.defineProperty(User.prototype, 'bio', {
|
928 | get: function () {
|
929 | return this.bio_341clv$_0;
|
930 | }
|
931 | });
|
932 | User.$metadata$ = {
|
933 | kind: Kind_CLASS,
|
934 | simpleName: 'User',
|
935 | interfaces: [DelegateResource]
|
936 | };
|
937 | function get$lambda($receiver) {
|
938 | return Unit;
|
939 | }
|
940 | function GiteaProvider(client) {
|
941 | GiteaProvider$Companion_getInstance();
|
942 | if (client === void 0)
|
943 | client = HttpClient();
|
944 | this.client = client;
|
945 | }
|
946 | function Coroutine$getUser_61zpoe$($this, str_0, continuation_0) {
|
947 | CoroutineImpl.call(this, continuation_0);
|
948 | this.exceptionState_0 = 6;
|
949 | this.$this = $this;
|
950 | this.local$response = void 0;
|
951 | this.local$str = str_0;
|
952 | }
|
953 | Coroutine$getUser_61zpoe$.$metadata$ = {
|
954 | kind: Kotlin.Kind.CLASS,
|
955 | simpleName: null,
|
956 | interfaces: [CoroutineImpl]
|
957 | };
|
958 | Coroutine$getUser_61zpoe$.prototype = Object.create(CoroutineImpl.prototype);
|
959 | Coroutine$getUser_61zpoe$.prototype.constructor = Coroutine$getUser_61zpoe$;
|
960 | Coroutine$getUser_61zpoe$.prototype.doResume = function () {
|
961 | do
|
962 | try {
|
963 | switch (this.state_0) {
|
964 | case 0:
|
965 | var $receiver_0 = this.$this.client;
|
966 | var urlString = 'api/v1/users/' + this.local$str;
|
967 | var host_0;
|
968 | var body_0;
|
969 | host_0 = 'localhost';
|
970 | body_0 = utils.EmptyContent;
|
971 | var $receiver_1 = new HttpRequestBuilder_init();
|
972 | url($receiver_1, 'http', host_0, 0, '/');
|
973 | $receiver_1.method = HttpMethod.Companion.Get;
|
974 | $receiver_1.body = body_0;
|
975 | takeFrom($receiver_1.url, urlString);
|
976 | get$lambda($receiver_1);
|
977 | var $this_0 = new HttpStatement_init($receiver_1, $receiver_0);
|
978 | var tmp$_4, tmp$_5, tmp$_6;
|
979 | tmp$_4 = getKClass(GiteaUser);
|
980 | if (equals(tmp$_4, getKClass(HttpStatement_init))) {
|
981 | this.result_0 = (tmp$_5 = $this_0) == null || Kotlin.isType(tmp$_5, GiteaUser) ? tmp$_5 : throwCCE();
|
982 | this.state_0 = 9;
|
983 | continue;
|
984 | } else {
|
985 | if (equals(tmp$_4, getKClass(HttpResponse))) {
|
986 | this.state_0 = 7;
|
987 | this.result_0 = $this_0.execute(this);
|
988 | if (this.result_0 === COROUTINE_SUSPENDED)
|
989 | return COROUTINE_SUSPENDED;
|
990 | continue;
|
991 | } else {
|
992 | this.state_0 = 1;
|
993 | this.result_0 = $this_0.executeUnsafe(this);
|
994 | if (this.result_0 === COROUTINE_SUSPENDED)
|
995 | return COROUTINE_SUSPENDED;
|
996 | continue;
|
997 | }
|
998 | }
|
999 |
|
1000 | case 1:
|
1001 | this.local$response = this.result_0;
|
1002 | this.exceptionState_0 = 4;
|
1003 | var tmp$_7;
|
1004 | var tmp$_8 = this.local$response.call;
|
1005 | var typeInfo$result_0;
|
1006 | typeInfo$break: do {
|
1007 | try {
|
1008 | typeInfo$result_0 = new TypeInfo_init(getKClass(GiteaUser), call.JsType, createKType(getKClass(GiteaUser), [], true));
|
1009 | } catch (_) {
|
1010 | typeInfo$result_0 = new TypeInfo_init(getKClass(GiteaUser), call.JsType);
|
1011 | break typeInfo$break;
|
1012 | }
|
1013 | }
|
1014 | while (false);
|
1015 | this.state_0 = 2;
|
1016 | this.result_0 = tmp$_8.receive_jo9acv$(typeInfo$result_0, this);
|
1017 | if (this.result_0 === COROUTINE_SUSPENDED)
|
1018 | return COROUTINE_SUSPENDED;
|
1019 | continue;
|
1020 | case 2:
|
1021 | this.result_0 = (tmp$_7 = this.result_0) == null || Kotlin.isType(tmp$_7, GiteaUser) ? tmp$_7 : throwCCE();
|
1022 | this.exceptionState_0 = 6;
|
1023 | this.finallyPath_0 = [3];
|
1024 | this.state_0 = 5;
|
1025 | continue;
|
1026 | case 3:
|
1027 | this.state_0 = 8;
|
1028 | continue;
|
1029 | case 4:
|
1030 | this.finallyPath_0 = [6];
|
1031 | this.state_0 = 5;
|
1032 | continue;
|
1033 | case 5:
|
1034 | this.exceptionState_0 = 6;
|
1035 | complete(this.local$response);
|
1036 | this.state_0 = this.finallyPath_0.shift();
|
1037 | continue;
|
1038 | case 6:
|
1039 | throw this.exception_0;
|
1040 | case 7:
|
1041 | this.result_0 = (tmp$_6 = this.result_0) == null || Kotlin.isType(tmp$_6, GiteaUser) ? tmp$_6 : throwCCE();
|
1042 | this.state_0 = 8;
|
1043 | continue;
|
1044 | case 8:
|
1045 | this.state_0 = 9;
|
1046 | continue;
|
1047 | case 9:
|
1048 | this.result_0;
|
1049 | return this.result_0;
|
1050 | default:this.state_0 = 6;
|
1051 | throw new Error('State Machine Unreachable execution');
|
1052 | }
|
1053 | } catch (e) {
|
1054 | if (this.state_0 === 6) {
|
1055 | this.exceptionState_0 = this.state_0;
|
1056 | throw e;
|
1057 | } else {
|
1058 | this.state_0 = this.exceptionState_0;
|
1059 | this.exception_0 = e;
|
1060 | }
|
1061 | }
|
1062 | while (true);
|
1063 | };
|
1064 | GiteaProvider.prototype.getUser_61zpoe$ = function (str_0, continuation_0, suspended) {
|
1065 | var instance = new Coroutine$getUser_61zpoe$(this, str_0, continuation_0);
|
1066 | if (suspended)
|
1067 | return instance;
|
1068 | else
|
1069 | return instance.doResume(null);
|
1070 | };
|
1071 | function Coroutine$getRepo_61zpoe$($this, str_0, continuation_0) {
|
1072 | CoroutineImpl.call(this, continuation_0);
|
1073 | this.exceptionState_0 = 6;
|
1074 | this.$this = $this;
|
1075 | this.local$response = void 0;
|
1076 | this.local$str = str_0;
|
1077 | }
|
1078 | Coroutine$getRepo_61zpoe$.$metadata$ = {
|
1079 | kind: Kotlin.Kind.CLASS,
|
1080 | simpleName: null,
|
1081 | interfaces: [CoroutineImpl]
|
1082 | };
|
1083 | Coroutine$getRepo_61zpoe$.prototype = Object.create(CoroutineImpl.prototype);
|
1084 | Coroutine$getRepo_61zpoe$.prototype.constructor = Coroutine$getRepo_61zpoe$;
|
1085 | Coroutine$getRepo_61zpoe$.prototype.doResume = function () {
|
1086 | do
|
1087 | try {
|
1088 | switch (this.state_0) {
|
1089 | case 0:
|
1090 | var $receiver_0 = this.$this.client;
|
1091 | var urlString = 'api/v1/repos/' + this.local$str;
|
1092 | var host_0;
|
1093 | var body_0;
|
1094 | host_0 = 'localhost';
|
1095 | body_0 = utils.EmptyContent;
|
1096 | var $receiver_1 = new HttpRequestBuilder_init();
|
1097 | url($receiver_1, 'http', host_0, 0, '/');
|
1098 | $receiver_1.method = HttpMethod.Companion.Get;
|
1099 | $receiver_1.body = body_0;
|
1100 | takeFrom($receiver_1.url, urlString);
|
1101 | get$lambda($receiver_1);
|
1102 | var $this_0 = new HttpStatement_init($receiver_1, $receiver_0);
|
1103 | var tmp$_4, tmp$_5, tmp$_6;
|
1104 | tmp$_4 = getKClass(GiteaRepo);
|
1105 | if (equals(tmp$_4, getKClass(HttpStatement_init))) {
|
1106 | this.result_0 = (tmp$_5 = $this_0) == null || Kotlin.isType(tmp$_5, GiteaRepo) ? tmp$_5 : throwCCE();
|
1107 | this.state_0 = 9;
|
1108 | continue;
|
1109 | } else {
|
1110 | if (equals(tmp$_4, getKClass(HttpResponse))) {
|
1111 | this.state_0 = 7;
|
1112 | this.result_0 = $this_0.execute(this);
|
1113 | if (this.result_0 === COROUTINE_SUSPENDED)
|
1114 | return COROUTINE_SUSPENDED;
|
1115 | continue;
|
1116 | } else {
|
1117 | this.state_0 = 1;
|
1118 | this.result_0 = $this_0.executeUnsafe(this);
|
1119 | if (this.result_0 === COROUTINE_SUSPENDED)
|
1120 | return COROUTINE_SUSPENDED;
|
1121 | continue;
|
1122 | }
|
1123 | }
|
1124 |
|
1125 | case 1:
|
1126 | this.local$response = this.result_0;
|
1127 | this.exceptionState_0 = 4;
|
1128 | var tmp$_7;
|
1129 | var tmp$_8 = this.local$response.call;
|
1130 | var typeInfo$result_0;
|
1131 | typeInfo$break: do {
|
1132 | try {
|
1133 | typeInfo$result_0 = new TypeInfo_init(getKClass(GiteaRepo), call.JsType, createKType(getKClass(GiteaRepo), [], true));
|
1134 | } catch (_) {
|
1135 | typeInfo$result_0 = new TypeInfo_init(getKClass(GiteaRepo), call.JsType);
|
1136 | break typeInfo$break;
|
1137 | }
|
1138 | }
|
1139 | while (false);
|
1140 | this.state_0 = 2;
|
1141 | this.result_0 = tmp$_8.receive_jo9acv$(typeInfo$result_0, this);
|
1142 | if (this.result_0 === COROUTINE_SUSPENDED)
|
1143 | return COROUTINE_SUSPENDED;
|
1144 | continue;
|
1145 | case 2:
|
1146 | this.result_0 = (tmp$_7 = this.result_0) == null || Kotlin.isType(tmp$_7, GiteaRepo) ? tmp$_7 : throwCCE();
|
1147 | this.exceptionState_0 = 6;
|
1148 | this.finallyPath_0 = [3];
|
1149 | this.state_0 = 5;
|
1150 | continue;
|
1151 | case 3:
|
1152 | this.state_0 = 8;
|
1153 | continue;
|
1154 | case 4:
|
1155 | this.finallyPath_0 = [6];
|
1156 | this.state_0 = 5;
|
1157 | continue;
|
1158 | case 5:
|
1159 | this.exceptionState_0 = 6;
|
1160 | complete(this.local$response);
|
1161 | this.state_0 = this.finallyPath_0.shift();
|
1162 | continue;
|
1163 | case 6:
|
1164 | throw this.exception_0;
|
1165 | case 7:
|
1166 | this.result_0 = (tmp$_6 = this.result_0) == null || Kotlin.isType(tmp$_6, GiteaRepo) ? tmp$_6 : throwCCE();
|
1167 | this.state_0 = 8;
|
1168 | continue;
|
1169 | case 8:
|
1170 | this.state_0 = 9;
|
1171 | continue;
|
1172 | case 9:
|
1173 | this.result_0;
|
1174 | return this.result_0;
|
1175 | default:this.state_0 = 6;
|
1176 | throw new Error('State Machine Unreachable execution');
|
1177 | }
|
1178 | } catch (e) {
|
1179 | if (this.state_0 === 6) {
|
1180 | this.exceptionState_0 = this.state_0;
|
1181 | throw e;
|
1182 | } else {
|
1183 | this.state_0 = this.exceptionState_0;
|
1184 | this.exception_0 = e;
|
1185 | }
|
1186 | }
|
1187 | while (true);
|
1188 | };
|
1189 | GiteaProvider.prototype.getRepo_61zpoe$ = function (str_0, continuation_0, suspended) {
|
1190 | var instance = new Coroutine$getRepo_61zpoe$(this, str_0, continuation_0);
|
1191 | if (suspended)
|
1192 | return instance;
|
1193 | else
|
1194 | return instance.doResume(null);
|
1195 | };
|
1196 | function Coroutine$getRepoContributors_61zpoe$($this, str_0, continuation_0) {
|
1197 | CoroutineImpl.call(this, continuation_0);
|
1198 | this.exceptionState_0 = 6;
|
1199 | this.$this = $this;
|
1200 | this.local$response = void 0;
|
1201 | this.local$str = str_0;
|
1202 | }
|
1203 | Coroutine$getRepoContributors_61zpoe$.$metadata$ = {
|
1204 | kind: Kotlin.Kind.CLASS,
|
1205 | simpleName: null,
|
1206 | interfaces: [CoroutineImpl]
|
1207 | };
|
1208 | Coroutine$getRepoContributors_61zpoe$.prototype = Object.create(CoroutineImpl.prototype);
|
1209 | Coroutine$getRepoContributors_61zpoe$.prototype.constructor = Coroutine$getRepoContributors_61zpoe$;
|
1210 | Coroutine$getRepoContributors_61zpoe$.prototype.doResume = function () {
|
1211 | do
|
1212 | try {
|
1213 | switch (this.state_0) {
|
1214 | case 0:
|
1215 | var $receiver_0 = this.$this.client;
|
1216 | var urlString = 'api/v1/repos/' + this.local$str + '/collaborators';
|
1217 | var host_0;
|
1218 | var body_0;
|
1219 | host_0 = 'localhost';
|
1220 | body_0 = utils.EmptyContent;
|
1221 | var $receiver_1 = new HttpRequestBuilder_init();
|
1222 | url($receiver_1, 'http', host_0, 0, '/');
|
1223 | $receiver_1.method = HttpMethod.Companion.Get;
|
1224 | $receiver_1.body = body_0;
|
1225 | takeFrom($receiver_1.url, urlString);
|
1226 | get$lambda($receiver_1);
|
1227 | var $this_0 = new HttpStatement_init($receiver_1, $receiver_0);
|
1228 | var tmp$_4, tmp$_5, tmp$_6;
|
1229 | tmp$_4 = getKClass(List);
|
1230 | if (equals(tmp$_4, getKClass(HttpStatement_init))) {
|
1231 | this.result_0 = (tmp$_5 = $this_0) == null || Kotlin.isType(tmp$_5, List) ? tmp$_5 : throwCCE();
|
1232 | this.state_0 = 9;
|
1233 | continue;
|
1234 | } else {
|
1235 | if (equals(tmp$_4, getKClass(HttpResponse))) {
|
1236 | this.state_0 = 7;
|
1237 | this.result_0 = $this_0.execute(this);
|
1238 | if (this.result_0 === COROUTINE_SUSPENDED)
|
1239 | return COROUTINE_SUSPENDED;
|
1240 | continue;
|
1241 | } else {
|
1242 | this.state_0 = 1;
|
1243 | this.result_0 = $this_0.executeUnsafe(this);
|
1244 | if (this.result_0 === COROUTINE_SUSPENDED)
|
1245 | return COROUTINE_SUSPENDED;
|
1246 | continue;
|
1247 | }
|
1248 | }
|
1249 |
|
1250 | case 1:
|
1251 | this.local$response = this.result_0;
|
1252 | this.exceptionState_0 = 4;
|
1253 | var tmp$_7;
|
1254 | var tmp$_8 = this.local$response.call;
|
1255 | var typeInfo$result_0;
|
1256 | typeInfo$break: do {
|
1257 | try {
|
1258 | typeInfo$result_0 = new TypeInfo_init(getKClass(List), call.JsType, createKType(getKClass(List), [createInvariantKTypeProjection(createKType(getKClass(GiteaUser), [], false))], true));
|
1259 | } catch (_) {
|
1260 | typeInfo$result_0 = new TypeInfo_init(getKClass(List), call.JsType);
|
1261 | break typeInfo$break;
|
1262 | }
|
1263 | }
|
1264 | while (false);
|
1265 | this.state_0 = 2;
|
1266 | this.result_0 = tmp$_8.receive_jo9acv$(typeInfo$result_0, this);
|
1267 | if (this.result_0 === COROUTINE_SUSPENDED)
|
1268 | return COROUTINE_SUSPENDED;
|
1269 | continue;
|
1270 | case 2:
|
1271 | this.result_0 = (tmp$_7 = this.result_0) == null || Kotlin.isType(tmp$_7, List) ? tmp$_7 : throwCCE();
|
1272 | this.exceptionState_0 = 6;
|
1273 | this.finallyPath_0 = [3];
|
1274 | this.state_0 = 5;
|
1275 | continue;
|
1276 | case 3:
|
1277 | this.state_0 = 8;
|
1278 | continue;
|
1279 | case 4:
|
1280 | this.finallyPath_0 = [6];
|
1281 | this.state_0 = 5;
|
1282 | continue;
|
1283 | case 5:
|
1284 | this.exceptionState_0 = 6;
|
1285 | complete(this.local$response);
|
1286 | this.state_0 = this.finallyPath_0.shift();
|
1287 | continue;
|
1288 | case 6:
|
1289 | throw this.exception_0;
|
1290 | case 7:
|
1291 | this.result_0 = (tmp$_6 = this.result_0) == null || Kotlin.isType(tmp$_6, List) ? tmp$_6 : throwCCE();
|
1292 | this.state_0 = 8;
|
1293 | continue;
|
1294 | case 8:
|
1295 | this.state_0 = 9;
|
1296 | continue;
|
1297 | case 9:
|
1298 | this.result_0;
|
1299 | return this.result_0;
|
1300 | default:this.state_0 = 6;
|
1301 | throw new Error('State Machine Unreachable execution');
|
1302 | }
|
1303 | } catch (e) {
|
1304 | if (this.state_0 === 6) {
|
1305 | this.exceptionState_0 = this.state_0;
|
1306 | throw e;
|
1307 | } else {
|
1308 | this.state_0 = this.exceptionState_0;
|
1309 | this.exception_0 = e;
|
1310 | }
|
1311 | }
|
1312 | while (true);
|
1313 | };
|
1314 | GiteaProvider.prototype.getRepoContributors_61zpoe$ = function (str_0, continuation_0, suspended) {
|
1315 | var instance = new Coroutine$getRepoContributors_61zpoe$(this, str_0, continuation_0);
|
1316 | if (suspended)
|
1317 | return instance;
|
1318 | else
|
1319 | return instance.doResume(null);
|
1320 | };
|
1321 | GiteaProvider.prototype.getLicense_61zpoe$ = function (str, continuation) {
|
1322 | return null;
|
1323 | };
|
1324 | function GiteaProvider$Companion() {
|
1325 | GiteaProvider$Companion_instance = this;
|
1326 | this.key_j3w2ca$_0 = 'gitea';
|
1327 | this.tokens_ce47l7$_0 = HashMap_init();
|
1328 | }
|
1329 | Object.defineProperty(GiteaProvider$Companion.prototype, 'key', {
|
1330 | get: function () {
|
1331 | return this.key_j3w2ca$_0;
|
1332 | }
|
1333 | });
|
1334 | Object.defineProperty(GiteaProvider$Companion.prototype, 'tokens', {
|
1335 | get: function () {
|
1336 | return this.tokens_ce47l7$_0;
|
1337 | }
|
1338 | });
|
1339 | function GiteaProvider$Companion$create$lambda$lambda$lambda(closure$hostname) {
|
1340 | return function ($receiver, it) {
|
1341 | $receiver.protocol = URLProtocol.Companion.HTTPS;
|
1342 | $receiver.host = closure$hostname;
|
1343 | return Unit;
|
1344 | };
|
1345 | }
|
1346 | function GiteaProvider$Companion$create$lambda$lambda(closure$hostname, this$GiteaProvider$) {
|
1347 | return function ($receiver) {
|
1348 | var tmp$;
|
1349 | $receiver.url_6yzzjr$(GiteaProvider$Companion$create$lambda$lambda$lambda(closure$hostname));
|
1350 | if ((tmp$ = this$GiteaProvider$.tokens.get_11rb$(closure$hostname)) != null) {
|
1351 | header($receiver, 'Authorization', 'token ' + tmp$);
|
1352 | }return Unit;
|
1353 | };
|
1354 | }
|
1355 | function GiteaProvider$Companion$create$lambda(closure$hostname, this$GiteaProvider$) {
|
1356 | return function ($receiver) {
|
1357 | defaultRequest($receiver, GiteaProvider$Companion$create$lambda$lambda(closure$hostname, this$GiteaProvider$));
|
1358 | return Unit;
|
1359 | };
|
1360 | }
|
1361 | GiteaProvider$Companion.prototype.create_wf0mc2$ = function (config, hostname) {
|
1362 | var client = this.ktor_1v6kay$(config, GiteaProvider$Companion$create$lambda(hostname, this));
|
1363 | return new GiteaProvider(client);
|
1364 | };
|
1365 | GiteaProvider$Companion.$metadata$ = {
|
1366 | kind: Kind_OBJECT,
|
1367 | simpleName: 'Companion',
|
1368 | interfaces: [ServiceBuilder]
|
1369 | };
|
1370 | var GiteaProvider$Companion_instance = null;
|
1371 | function GiteaProvider$Companion_getInstance() {
|
1372 | if (GiteaProvider$Companion_instance === null) {
|
1373 | new GiteaProvider$Companion();
|
1374 | }return GiteaProvider$Companion_instance;
|
1375 | }
|
1376 | GiteaProvider.$metadata$ = {
|
1377 | kind: Kind_CLASS,
|
1378 | simpleName: 'GiteaProvider',
|
1379 | interfaces: [RequestProvider]
|
1380 | };
|
1381 | function GiteaRepo() {
|
1382 | GiteaRepo$Companion_getInstance();
|
1383 | Repo.call(this);
|
1384 | this.id_gjulfy$_0 = '';
|
1385 | this.description_1u29ij$_0 = null;
|
1386 | this.url_fvc3fs$_0 = null;
|
1387 | this.websiteUrl_f1v89$_0 = null;
|
1388 | this.gitUrlHttp_ulw5qw$_0 = null;
|
1389 | this.gitUrlSsh_5kbq2s$_0 = null;
|
1390 | this.defaultBranch_frg4ck$_0 = null;
|
1391 | }
|
1392 | Object.defineProperty(GiteaRepo.prototype, 'id', {
|
1393 | get: function () {
|
1394 | return this.id_gjulfy$_0;
|
1395 | },
|
1396 | set: function (id) {
|
1397 | this.id_gjulfy$_0 = id;
|
1398 | }
|
1399 | });
|
1400 | Object.defineProperty(GiteaRepo.prototype, 'description', {
|
1401 | get: function () {
|
1402 | return this.description_1u29ij$_0;
|
1403 | }
|
1404 | });
|
1405 | Object.defineProperty(GiteaRepo.prototype, 'url', {
|
1406 | get: function () {
|
1407 | return this.url_fvc3fs$_0;
|
1408 | }
|
1409 | });
|
1410 | Object.defineProperty(GiteaRepo.prototype, 'websiteUrl', {
|
1411 | get: function () {
|
1412 | return this.websiteUrl_f1v89$_0;
|
1413 | }
|
1414 | });
|
1415 | Object.defineProperty(GiteaRepo.prototype, 'gitUrlHttp', {
|
1416 | get: function () {
|
1417 | return this.gitUrlHttp_ulw5qw$_0;
|
1418 | }
|
1419 | });
|
1420 | Object.defineProperty(GiteaRepo.prototype, 'gitUrlSsh', {
|
1421 | get: function () {
|
1422 | return this.gitUrlSsh_5kbq2s$_0;
|
1423 | }
|
1424 | });
|
1425 | Object.defineProperty(GiteaRepo.prototype, 'defaultBranch', {
|
1426 | get: function () {
|
1427 | return this.defaultBranch_frg4ck$_0;
|
1428 | }
|
1429 | });
|
1430 | GiteaRepo.prototype.getRawFileUrl_puj7f4$$default = function (branchName, filePath) {
|
1431 | return toString(this.url) + '/raw/branch/' + branchName + '/' + filePath;
|
1432 | };
|
1433 | function GiteaRepo$Companion() {
|
1434 | GiteaRepo$Companion_instance = this;
|
1435 | }
|
1436 | GiteaRepo$Companion.prototype.serializer = function () {
|
1437 | return GiteaRepo$$serializer_getInstance();
|
1438 | };
|
1439 | GiteaRepo$Companion.$metadata$ = {
|
1440 | kind: Kind_OBJECT,
|
1441 | simpleName: 'Companion',
|
1442 | interfaces: []
|
1443 | };
|
1444 | var GiteaRepo$Companion_instance = null;
|
1445 | function GiteaRepo$Companion_getInstance() {
|
1446 | if (GiteaRepo$Companion_instance === null) {
|
1447 | new GiteaRepo$Companion();
|
1448 | }return GiteaRepo$Companion_instance;
|
1449 | }
|
1450 | function GiteaRepo$$serializer() {
|
1451 | this.descriptor_5gs2na$_0 = new SerialClassDescImpl('me.jfenn.gitrest.provider.gitea.model.GiteaRepo', this, 7);
|
1452 | this.descriptor.addElement_ivxn3r$('full_name', true);
|
1453 | this.descriptor.addElement_ivxn3r$('description', true);
|
1454 | this.descriptor.addElement_ivxn3r$('html_url', true);
|
1455 | this.descriptor.addElement_ivxn3r$('website', true);
|
1456 | this.descriptor.addElement_ivxn3r$('clone_url', true);
|
1457 | this.descriptor.addElement_ivxn3r$('ssh_url', true);
|
1458 | this.descriptor.addElement_ivxn3r$('default_branch', true);
|
1459 | GiteaRepo$$serializer_instance = this;
|
1460 | }
|
1461 | Object.defineProperty(GiteaRepo$$serializer.prototype, 'descriptor', {
|
1462 | get: function () {
|
1463 | return this.descriptor_5gs2na$_0;
|
1464 | }
|
1465 | });
|
1466 | GiteaRepo$$serializer.prototype.serialize_awe97i$ = function (encoder, value) {
|
1467 | var output = encoder.beginStructure_r0sa6z$(this.descriptor, []);
|
1468 | if (!equals(value.id, '') || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 0))
|
1469 | output.encodeStringElement_bgm7zs$(this.descriptor, 0, value.id);
|
1470 | if (!equals(value.description, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 1))
|
1471 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 1, new OptionalStringSerializer(), value.description);
|
1472 | if (!equals(value.url, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 2))
|
1473 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 2, internal.StringSerializer, value.url);
|
1474 | if (!equals(value.websiteUrl, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 3))
|
1475 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 3, new OptionalStringSerializer(), value.websiteUrl);
|
1476 | if (!equals(value.gitUrlHttp, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 4))
|
1477 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 4, internal.StringSerializer, value.gitUrlHttp);
|
1478 | if (!equals(value.gitUrlSsh, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 5))
|
1479 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 5, internal.StringSerializer, value.gitUrlSsh);
|
1480 | if (!equals(value.defaultBranch, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 6))
|
1481 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 6, internal.StringSerializer, value.defaultBranch);
|
1482 | output.endStructure_qatsm0$(this.descriptor);
|
1483 | };
|
1484 | GiteaRepo$$serializer.prototype.deserialize_nts5qn$ = function (decoder) {
|
1485 | var index;
|
1486 | var bitMask0 = 0;
|
1487 | var local0
|
1488 | , local1
|
1489 | , local2
|
1490 | , local3
|
1491 | , local4
|
1492 | , local5
|
1493 | , local6;
|
1494 | var input = decoder.beginStructure_r0sa6z$(this.descriptor, []);
|
1495 | loopLabel: while (true) {
|
1496 | index = input.decodeElementIndex_qatsm0$(this.descriptor);
|
1497 | switch (index) {
|
1498 | case 0:
|
1499 | local0 = input.decodeStringElement_3zr2iy$(this.descriptor, 0);
|
1500 | bitMask0 |= 1;
|
1501 | break;
|
1502 | case 1:
|
1503 | local1 = (bitMask0 & 2) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 1, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 1, new OptionalStringSerializer(), local1);
|
1504 | bitMask0 |= 2;
|
1505 | break;
|
1506 | case 2:
|
1507 | local2 = (bitMask0 & 4) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 2, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 2, internal.StringSerializer, local2);
|
1508 | bitMask0 |= 4;
|
1509 | break;
|
1510 | case 3:
|
1511 | local3 = (bitMask0 & 8) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 3, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 3, new OptionalStringSerializer(), local3);
|
1512 | bitMask0 |= 8;
|
1513 | break;
|
1514 | case 4:
|
1515 | local4 = (bitMask0 & 16) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 4, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 4, internal.StringSerializer, local4);
|
1516 | bitMask0 |= 16;
|
1517 | break;
|
1518 | case 5:
|
1519 | local5 = (bitMask0 & 32) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 5, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 5, internal.StringSerializer, local5);
|
1520 | bitMask0 |= 32;
|
1521 | break;
|
1522 | case 6:
|
1523 | local6 = (bitMask0 & 64) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 6, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 6, internal.StringSerializer, local6);
|
1524 | bitMask0 |= 64;
|
1525 | break;
|
1526 | case -1:
|
1527 | break loopLabel;
|
1528 | default:throw new UnknownFieldException(index);
|
1529 | }
|
1530 | }
|
1531 | input.endStructure_qatsm0$(this.descriptor);
|
1532 | return GiteaRepo_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, null);
|
1533 | };
|
1534 | GiteaRepo$$serializer.prototype.childSerializers = function () {
|
1535 | return [internal.StringSerializer, new NullableSerializer(new OptionalStringSerializer()), new NullableSerializer(internal.StringSerializer), new NullableSerializer(new OptionalStringSerializer()), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer)];
|
1536 | };
|
1537 | GiteaRepo$$serializer.$metadata$ = {
|
1538 | kind: Kind_OBJECT,
|
1539 | simpleName: '$serializer',
|
1540 | interfaces: [GeneratedSerializer]
|
1541 | };
|
1542 | var GiteaRepo$$serializer_instance = null;
|
1543 | function GiteaRepo$$serializer_getInstance() {
|
1544 | if (GiteaRepo$$serializer_instance === null) {
|
1545 | new GiteaRepo$$serializer();
|
1546 | }return GiteaRepo$$serializer_instance;
|
1547 | }
|
1548 | function GiteaRepo_init(seen1, id, description, url, websiteUrl, gitUrlHttp, gitUrlSsh, defaultBranch, serializationConstructorMarker) {
|
1549 | var $this = serializationConstructorMarker || Object.create(GiteaRepo.prototype);
|
1550 | Repo.call($this);
|
1551 | if ((seen1 & 1) === 0)
|
1552 | $this.id_gjulfy$_0 = '';
|
1553 | else
|
1554 | $this.id_gjulfy$_0 = id;
|
1555 | if ((seen1 & 2) === 0)
|
1556 | $this.description_1u29ij$_0 = null;
|
1557 | else
|
1558 | $this.description_1u29ij$_0 = description;
|
1559 | if ((seen1 & 4) === 0)
|
1560 | $this.url_fvc3fs$_0 = null;
|
1561 | else
|
1562 | $this.url_fvc3fs$_0 = url;
|
1563 | if ((seen1 & 8) === 0)
|
1564 | $this.websiteUrl_f1v89$_0 = null;
|
1565 | else
|
1566 | $this.websiteUrl_f1v89$_0 = websiteUrl;
|
1567 | if ((seen1 & 16) === 0)
|
1568 | $this.gitUrlHttp_ulw5qw$_0 = null;
|
1569 | else
|
1570 | $this.gitUrlHttp_ulw5qw$_0 = gitUrlHttp;
|
1571 | if ((seen1 & 32) === 0)
|
1572 | $this.gitUrlSsh_5kbq2s$_0 = null;
|
1573 | else
|
1574 | $this.gitUrlSsh_5kbq2s$_0 = gitUrlSsh;
|
1575 | if ((seen1 & 64) === 0)
|
1576 | $this.defaultBranch_frg4ck$_0 = null;
|
1577 | else
|
1578 | $this.defaultBranch_frg4ck$_0 = defaultBranch;
|
1579 | return $this;
|
1580 | }
|
1581 | GiteaRepo.$metadata$ = {
|
1582 | kind: Kind_CLASS,
|
1583 | simpleName: 'GiteaRepo',
|
1584 | interfaces: [Repo]
|
1585 | };
|
1586 | function GiteaUser() {
|
1587 | GiteaUser$Companion_getInstance();
|
1588 | User.call(this);
|
1589 | this.id_dvpvlh$_0 = '';
|
1590 | this.name_e641gb$_0 = null;
|
1591 | this.avatarUrl_vjaj3c$_0 = null;
|
1592 | this.email_8zsb4i$_0 = null;
|
1593 | }
|
1594 | Object.defineProperty(GiteaUser.prototype, 'id', {
|
1595 | get: function () {
|
1596 | return this.id_dvpvlh$_0;
|
1597 | },
|
1598 | set: function (id) {
|
1599 | this.id_dvpvlh$_0 = id;
|
1600 | }
|
1601 | });
|
1602 | Object.defineProperty(GiteaUser.prototype, 'name', {
|
1603 | get: function () {
|
1604 | return this.name_e641gb$_0;
|
1605 | }
|
1606 | });
|
1607 | Object.defineProperty(GiteaUser.prototype, 'url', {
|
1608 | get: function () {
|
1609 | return 'https://' + this.hostname + '/' + this.id;
|
1610 | }
|
1611 | });
|
1612 | Object.defineProperty(GiteaUser.prototype, 'avatarUrl', {
|
1613 | get: function () {
|
1614 | return this.avatarUrl_vjaj3c$_0;
|
1615 | }
|
1616 | });
|
1617 | Object.defineProperty(GiteaUser.prototype, 'email', {
|
1618 | get: function () {
|
1619 | return this.email_8zsb4i$_0;
|
1620 | }
|
1621 | });
|
1622 | function GiteaUser$Companion() {
|
1623 | GiteaUser$Companion_instance = this;
|
1624 | }
|
1625 | GiteaUser$Companion.prototype.serializer = function () {
|
1626 | return GiteaUser$$serializer_getInstance();
|
1627 | };
|
1628 | GiteaUser$Companion.$metadata$ = {
|
1629 | kind: Kind_OBJECT,
|
1630 | simpleName: 'Companion',
|
1631 | interfaces: []
|
1632 | };
|
1633 | var GiteaUser$Companion_instance = null;
|
1634 | function GiteaUser$Companion_getInstance() {
|
1635 | if (GiteaUser$Companion_instance === null) {
|
1636 | new GiteaUser$Companion();
|
1637 | }return GiteaUser$Companion_instance;
|
1638 | }
|
1639 | function GiteaUser$$serializer() {
|
1640 | this.descriptor_zagfup$_0 = new SerialClassDescImpl('me.jfenn.gitrest.provider.gitea.model.GiteaUser', this, 4);
|
1641 | this.descriptor.addElement_ivxn3r$('login', true);
|
1642 | this.descriptor.addElement_ivxn3r$('full_name', true);
|
1643 | this.descriptor.addElement_ivxn3r$('avatar_url', true);
|
1644 | this.descriptor.addElement_ivxn3r$('email', true);
|
1645 | GiteaUser$$serializer_instance = this;
|
1646 | }
|
1647 | Object.defineProperty(GiteaUser$$serializer.prototype, 'descriptor', {
|
1648 | get: function () {
|
1649 | return this.descriptor_zagfup$_0;
|
1650 | }
|
1651 | });
|
1652 | GiteaUser$$serializer.prototype.serialize_awe97i$ = function (encoder, value) {
|
1653 | var output = encoder.beginStructure_r0sa6z$(this.descriptor, []);
|
1654 | if (!equals(value.id, '') || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 0))
|
1655 | output.encodeStringElement_bgm7zs$(this.descriptor, 0, value.id);
|
1656 | if (!equals(value.name, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 1))
|
1657 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 1, new OptionalStringSerializer(), value.name);
|
1658 | if (!equals(value.avatarUrl, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 2))
|
1659 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 2, internal.StringSerializer, value.avatarUrl);
|
1660 | if (!equals(value.email, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 3))
|
1661 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 3, new OptionalStringSerializer(), value.email);
|
1662 | output.endStructure_qatsm0$(this.descriptor);
|
1663 | };
|
1664 | GiteaUser$$serializer.prototype.deserialize_nts5qn$ = function (decoder) {
|
1665 | var index;
|
1666 | var bitMask0 = 0;
|
1667 | var local0
|
1668 | , local1
|
1669 | , local2
|
1670 | , local3;
|
1671 | var input = decoder.beginStructure_r0sa6z$(this.descriptor, []);
|
1672 | loopLabel: while (true) {
|
1673 | index = input.decodeElementIndex_qatsm0$(this.descriptor);
|
1674 | switch (index) {
|
1675 | case 0:
|
1676 | local0 = input.decodeStringElement_3zr2iy$(this.descriptor, 0);
|
1677 | bitMask0 |= 1;
|
1678 | break;
|
1679 | case 1:
|
1680 | local1 = (bitMask0 & 2) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 1, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 1, new OptionalStringSerializer(), local1);
|
1681 | bitMask0 |= 2;
|
1682 | break;
|
1683 | case 2:
|
1684 | local2 = (bitMask0 & 4) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 2, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 2, internal.StringSerializer, local2);
|
1685 | bitMask0 |= 4;
|
1686 | break;
|
1687 | case 3:
|
1688 | local3 = (bitMask0 & 8) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 3, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 3, new OptionalStringSerializer(), local3);
|
1689 | bitMask0 |= 8;
|
1690 | break;
|
1691 | case -1:
|
1692 | break loopLabel;
|
1693 | default:throw new UnknownFieldException(index);
|
1694 | }
|
1695 | }
|
1696 | input.endStructure_qatsm0$(this.descriptor);
|
1697 | return GiteaUser_init(bitMask0, local0, local1, local2, local3, null);
|
1698 | };
|
1699 | GiteaUser$$serializer.prototype.childSerializers = function () {
|
1700 | return [internal.StringSerializer, new NullableSerializer(new OptionalStringSerializer()), new NullableSerializer(internal.StringSerializer), new NullableSerializer(new OptionalStringSerializer())];
|
1701 | };
|
1702 | GiteaUser$$serializer.$metadata$ = {
|
1703 | kind: Kind_OBJECT,
|
1704 | simpleName: '$serializer',
|
1705 | interfaces: [GeneratedSerializer]
|
1706 | };
|
1707 | var GiteaUser$$serializer_instance = null;
|
1708 | function GiteaUser$$serializer_getInstance() {
|
1709 | if (GiteaUser$$serializer_instance === null) {
|
1710 | new GiteaUser$$serializer();
|
1711 | }return GiteaUser$$serializer_instance;
|
1712 | }
|
1713 | function GiteaUser_init(seen1, id, name, avatarUrl, email, serializationConstructorMarker) {
|
1714 | var $this = serializationConstructorMarker || Object.create(GiteaUser.prototype);
|
1715 | User.call($this);
|
1716 | if ((seen1 & 1) === 0)
|
1717 | $this.id_dvpvlh$_0 = '';
|
1718 | else
|
1719 | $this.id_dvpvlh$_0 = id;
|
1720 | if ((seen1 & 2) === 0)
|
1721 | $this.name_e641gb$_0 = null;
|
1722 | else
|
1723 | $this.name_e641gb$_0 = name;
|
1724 | if ((seen1 & 4) === 0)
|
1725 | $this.avatarUrl_vjaj3c$_0 = null;
|
1726 | else
|
1727 | $this.avatarUrl_vjaj3c$_0 = avatarUrl;
|
1728 | if ((seen1 & 8) === 0)
|
1729 | $this.email_8zsb4i$_0 = null;
|
1730 | else
|
1731 | $this.email_8zsb4i$_0 = email;
|
1732 | return $this;
|
1733 | }
|
1734 | GiteaUser.$metadata$ = {
|
1735 | kind: Kind_CLASS,
|
1736 | simpleName: 'GiteaUser',
|
1737 | interfaces: [User]
|
1738 | };
|
1739 | function get$lambda_0($receiver) {
|
1740 | return Unit;
|
1741 | }
|
1742 | function GithubProvider(client) {
|
1743 | GithubProvider$Companion_getInstance();
|
1744 | if (client === void 0)
|
1745 | client = HttpClient();
|
1746 | this.client = client;
|
1747 | }
|
1748 | function Coroutine$getUser_61zpoe$_0($this, str_0, continuation_0) {
|
1749 | CoroutineImpl.call(this, continuation_0);
|
1750 | this.exceptionState_0 = 6;
|
1751 | this.$this = $this;
|
1752 | this.local$response = void 0;
|
1753 | this.local$str = str_0;
|
1754 | }
|
1755 | Coroutine$getUser_61zpoe$_0.$metadata$ = {
|
1756 | kind: Kotlin.Kind.CLASS,
|
1757 | simpleName: null,
|
1758 | interfaces: [CoroutineImpl]
|
1759 | };
|
1760 | Coroutine$getUser_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype);
|
1761 | Coroutine$getUser_61zpoe$_0.prototype.constructor = Coroutine$getUser_61zpoe$_0;
|
1762 | Coroutine$getUser_61zpoe$_0.prototype.doResume = function () {
|
1763 | do
|
1764 | try {
|
1765 | switch (this.state_0) {
|
1766 | case 0:
|
1767 | var $receiver_0 = this.$this.client;
|
1768 | var urlString = 'users/' + this.local$str;
|
1769 | var host_0;
|
1770 | var body_0;
|
1771 | host_0 = 'localhost';
|
1772 | body_0 = utils.EmptyContent;
|
1773 | var $receiver_1 = new HttpRequestBuilder_init();
|
1774 | url($receiver_1, 'http', host_0, 0, '/');
|
1775 | $receiver_1.method = HttpMethod.Companion.Get;
|
1776 | $receiver_1.body = body_0;
|
1777 | takeFrom($receiver_1.url, urlString);
|
1778 | get$lambda_0($receiver_1);
|
1779 | var $this_0 = new HttpStatement_init($receiver_1, $receiver_0);
|
1780 | var tmp$_4, tmp$_5, tmp$_6;
|
1781 | tmp$_4 = getKClass(GithubUser);
|
1782 | if (equals(tmp$_4, getKClass(HttpStatement_init))) {
|
1783 | this.result_0 = (tmp$_5 = $this_0) == null || Kotlin.isType(tmp$_5, GithubUser) ? tmp$_5 : throwCCE();
|
1784 | this.state_0 = 9;
|
1785 | continue;
|
1786 | } else {
|
1787 | if (equals(tmp$_4, getKClass(HttpResponse))) {
|
1788 | this.state_0 = 7;
|
1789 | this.result_0 = $this_0.execute(this);
|
1790 | if (this.result_0 === COROUTINE_SUSPENDED)
|
1791 | return COROUTINE_SUSPENDED;
|
1792 | continue;
|
1793 | } else {
|
1794 | this.state_0 = 1;
|
1795 | this.result_0 = $this_0.executeUnsafe(this);
|
1796 | if (this.result_0 === COROUTINE_SUSPENDED)
|
1797 | return COROUTINE_SUSPENDED;
|
1798 | continue;
|
1799 | }
|
1800 | }
|
1801 |
|
1802 | case 1:
|
1803 | this.local$response = this.result_0;
|
1804 | this.exceptionState_0 = 4;
|
1805 | var tmp$_7;
|
1806 | var tmp$_8 = this.local$response.call;
|
1807 | var typeInfo$result_0;
|
1808 | typeInfo$break: do {
|
1809 | try {
|
1810 | typeInfo$result_0 = new TypeInfo_init(getKClass(GithubUser), call.JsType, createKType(getKClass(GithubUser), [], true));
|
1811 | } catch (_) {
|
1812 | typeInfo$result_0 = new TypeInfo_init(getKClass(GithubUser), call.JsType);
|
1813 | break typeInfo$break;
|
1814 | }
|
1815 | }
|
1816 | while (false);
|
1817 | this.state_0 = 2;
|
1818 | this.result_0 = tmp$_8.receive_jo9acv$(typeInfo$result_0, this);
|
1819 | if (this.result_0 === COROUTINE_SUSPENDED)
|
1820 | return COROUTINE_SUSPENDED;
|
1821 | continue;
|
1822 | case 2:
|
1823 | this.result_0 = (tmp$_7 = this.result_0) == null || Kotlin.isType(tmp$_7, GithubUser) ? tmp$_7 : throwCCE();
|
1824 | this.exceptionState_0 = 6;
|
1825 | this.finallyPath_0 = [3];
|
1826 | this.state_0 = 5;
|
1827 | continue;
|
1828 | case 3:
|
1829 | this.state_0 = 8;
|
1830 | continue;
|
1831 | case 4:
|
1832 | this.finallyPath_0 = [6];
|
1833 | this.state_0 = 5;
|
1834 | continue;
|
1835 | case 5:
|
1836 | this.exceptionState_0 = 6;
|
1837 | complete(this.local$response);
|
1838 | this.state_0 = this.finallyPath_0.shift();
|
1839 | continue;
|
1840 | case 6:
|
1841 | throw this.exception_0;
|
1842 | case 7:
|
1843 | this.result_0 = (tmp$_6 = this.result_0) == null || Kotlin.isType(tmp$_6, GithubUser) ? tmp$_6 : throwCCE();
|
1844 | this.state_0 = 8;
|
1845 | continue;
|
1846 | case 8:
|
1847 | this.state_0 = 9;
|
1848 | continue;
|
1849 | case 9:
|
1850 | this.result_0;
|
1851 | return this.result_0;
|
1852 | default:this.state_0 = 6;
|
1853 | throw new Error('State Machine Unreachable execution');
|
1854 | }
|
1855 | } catch (e) {
|
1856 | if (this.state_0 === 6) {
|
1857 | this.exceptionState_0 = this.state_0;
|
1858 | throw e;
|
1859 | } else {
|
1860 | this.state_0 = this.exceptionState_0;
|
1861 | this.exception_0 = e;
|
1862 | }
|
1863 | }
|
1864 | while (true);
|
1865 | };
|
1866 | GithubProvider.prototype.getUser_61zpoe$ = function (str_0, continuation_0, suspended) {
|
1867 | var instance = new Coroutine$getUser_61zpoe$_0(this, str_0, continuation_0);
|
1868 | if (suspended)
|
1869 | return instance;
|
1870 | else
|
1871 | return instance.doResume(null);
|
1872 | };
|
1873 | function Coroutine$getRepo_61zpoe$_0($this, str_0, continuation_0) {
|
1874 | CoroutineImpl.call(this, continuation_0);
|
1875 | this.exceptionState_0 = 6;
|
1876 | this.$this = $this;
|
1877 | this.local$response = void 0;
|
1878 | this.local$str = str_0;
|
1879 | }
|
1880 | Coroutine$getRepo_61zpoe$_0.$metadata$ = {
|
1881 | kind: Kotlin.Kind.CLASS,
|
1882 | simpleName: null,
|
1883 | interfaces: [CoroutineImpl]
|
1884 | };
|
1885 | Coroutine$getRepo_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype);
|
1886 | Coroutine$getRepo_61zpoe$_0.prototype.constructor = Coroutine$getRepo_61zpoe$_0;
|
1887 | Coroutine$getRepo_61zpoe$_0.prototype.doResume = function () {
|
1888 | do
|
1889 | try {
|
1890 | switch (this.state_0) {
|
1891 | case 0:
|
1892 | var $receiver_0 = this.$this.client;
|
1893 | var urlString = 'repos/' + this.local$str;
|
1894 | var host_0;
|
1895 | var body_0;
|
1896 | host_0 = 'localhost';
|
1897 | body_0 = utils.EmptyContent;
|
1898 | var $receiver_1 = new HttpRequestBuilder_init();
|
1899 | url($receiver_1, 'http', host_0, 0, '/');
|
1900 | $receiver_1.method = HttpMethod.Companion.Get;
|
1901 | $receiver_1.body = body_0;
|
1902 | takeFrom($receiver_1.url, urlString);
|
1903 | get$lambda_0($receiver_1);
|
1904 | var $this_0 = new HttpStatement_init($receiver_1, $receiver_0);
|
1905 | var tmp$_4, tmp$_5, tmp$_6;
|
1906 | tmp$_4 = getKClass(GithubRepo);
|
1907 | if (equals(tmp$_4, getKClass(HttpStatement_init))) {
|
1908 | this.result_0 = (tmp$_5 = $this_0) == null || Kotlin.isType(tmp$_5, GithubRepo) ? tmp$_5 : throwCCE();
|
1909 | this.state_0 = 9;
|
1910 | continue;
|
1911 | } else {
|
1912 | if (equals(tmp$_4, getKClass(HttpResponse))) {
|
1913 | this.state_0 = 7;
|
1914 | this.result_0 = $this_0.execute(this);
|
1915 | if (this.result_0 === COROUTINE_SUSPENDED)
|
1916 | return COROUTINE_SUSPENDED;
|
1917 | continue;
|
1918 | } else {
|
1919 | this.state_0 = 1;
|
1920 | this.result_0 = $this_0.executeUnsafe(this);
|
1921 | if (this.result_0 === COROUTINE_SUSPENDED)
|
1922 | return COROUTINE_SUSPENDED;
|
1923 | continue;
|
1924 | }
|
1925 | }
|
1926 |
|
1927 | case 1:
|
1928 | this.local$response = this.result_0;
|
1929 | this.exceptionState_0 = 4;
|
1930 | var tmp$_7;
|
1931 | var tmp$_8 = this.local$response.call;
|
1932 | var typeInfo$result_0;
|
1933 | typeInfo$break: do {
|
1934 | try {
|
1935 | typeInfo$result_0 = new TypeInfo_init(getKClass(GithubRepo), call.JsType, createKType(getKClass(GithubRepo), [], true));
|
1936 | } catch (_) {
|
1937 | typeInfo$result_0 = new TypeInfo_init(getKClass(GithubRepo), call.JsType);
|
1938 | break typeInfo$break;
|
1939 | }
|
1940 | }
|
1941 | while (false);
|
1942 | this.state_0 = 2;
|
1943 | this.result_0 = tmp$_8.receive_jo9acv$(typeInfo$result_0, this);
|
1944 | if (this.result_0 === COROUTINE_SUSPENDED)
|
1945 | return COROUTINE_SUSPENDED;
|
1946 | continue;
|
1947 | case 2:
|
1948 | this.result_0 = (tmp$_7 = this.result_0) == null || Kotlin.isType(tmp$_7, GithubRepo) ? tmp$_7 : throwCCE();
|
1949 | this.exceptionState_0 = 6;
|
1950 | this.finallyPath_0 = [3];
|
1951 | this.state_0 = 5;
|
1952 | continue;
|
1953 | case 3:
|
1954 | this.state_0 = 8;
|
1955 | continue;
|
1956 | case 4:
|
1957 | this.finallyPath_0 = [6];
|
1958 | this.state_0 = 5;
|
1959 | continue;
|
1960 | case 5:
|
1961 | this.exceptionState_0 = 6;
|
1962 | complete(this.local$response);
|
1963 | this.state_0 = this.finallyPath_0.shift();
|
1964 | continue;
|
1965 | case 6:
|
1966 | throw this.exception_0;
|
1967 | case 7:
|
1968 | this.result_0 = (tmp$_6 = this.result_0) == null || Kotlin.isType(tmp$_6, GithubRepo) ? tmp$_6 : throwCCE();
|
1969 | this.state_0 = 8;
|
1970 | continue;
|
1971 | case 8:
|
1972 | this.state_0 = 9;
|
1973 | continue;
|
1974 | case 9:
|
1975 | this.result_0;
|
1976 | return this.result_0;
|
1977 | default:this.state_0 = 6;
|
1978 | throw new Error('State Machine Unreachable execution');
|
1979 | }
|
1980 | } catch (e) {
|
1981 | if (this.state_0 === 6) {
|
1982 | this.exceptionState_0 = this.state_0;
|
1983 | throw e;
|
1984 | } else {
|
1985 | this.state_0 = this.exceptionState_0;
|
1986 | this.exception_0 = e;
|
1987 | }
|
1988 | }
|
1989 | while (true);
|
1990 | };
|
1991 | GithubProvider.prototype.getRepo_61zpoe$ = function (str_0, continuation_0, suspended) {
|
1992 | var instance = new Coroutine$getRepo_61zpoe$_0(this, str_0, continuation_0);
|
1993 | if (suspended)
|
1994 | return instance;
|
1995 | else
|
1996 | return instance.doResume(null);
|
1997 | };
|
1998 | function Coroutine$getRepoContributors_61zpoe$_0($this, str_0, continuation_0) {
|
1999 | CoroutineImpl.call(this, continuation_0);
|
2000 | this.exceptionState_0 = 6;
|
2001 | this.$this = $this;
|
2002 | this.local$response = void 0;
|
2003 | this.local$str = str_0;
|
2004 | }
|
2005 | Coroutine$getRepoContributors_61zpoe$_0.$metadata$ = {
|
2006 | kind: Kotlin.Kind.CLASS,
|
2007 | simpleName: null,
|
2008 | interfaces: [CoroutineImpl]
|
2009 | };
|
2010 | Coroutine$getRepoContributors_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype);
|
2011 | Coroutine$getRepoContributors_61zpoe$_0.prototype.constructor = Coroutine$getRepoContributors_61zpoe$_0;
|
2012 | Coroutine$getRepoContributors_61zpoe$_0.prototype.doResume = function () {
|
2013 | do
|
2014 | try {
|
2015 | switch (this.state_0) {
|
2016 | case 0:
|
2017 | var $receiver_0 = this.$this.client;
|
2018 | var urlString = 'repos/' + this.local$str + '/contributors';
|
2019 | var host_0;
|
2020 | var body_0;
|
2021 | host_0 = 'localhost';
|
2022 | body_0 = utils.EmptyContent;
|
2023 | var $receiver_1 = new HttpRequestBuilder_init();
|
2024 | url($receiver_1, 'http', host_0, 0, '/');
|
2025 | $receiver_1.method = HttpMethod.Companion.Get;
|
2026 | $receiver_1.body = body_0;
|
2027 | takeFrom($receiver_1.url, urlString);
|
2028 | get$lambda_0($receiver_1);
|
2029 | var $this_0 = new HttpStatement_init($receiver_1, $receiver_0);
|
2030 | var tmp$_4, tmp$_5, tmp$_6;
|
2031 | tmp$_4 = getKClass(List);
|
2032 | if (equals(tmp$_4, getKClass(HttpStatement_init))) {
|
2033 | this.result_0 = (tmp$_5 = $this_0) == null || Kotlin.isType(tmp$_5, List) ? tmp$_5 : throwCCE();
|
2034 | this.state_0 = 9;
|
2035 | continue;
|
2036 | } else {
|
2037 | if (equals(tmp$_4, getKClass(HttpResponse))) {
|
2038 | this.state_0 = 7;
|
2039 | this.result_0 = $this_0.execute(this);
|
2040 | if (this.result_0 === COROUTINE_SUSPENDED)
|
2041 | return COROUTINE_SUSPENDED;
|
2042 | continue;
|
2043 | } else {
|
2044 | this.state_0 = 1;
|
2045 | this.result_0 = $this_0.executeUnsafe(this);
|
2046 | if (this.result_0 === COROUTINE_SUSPENDED)
|
2047 | return COROUTINE_SUSPENDED;
|
2048 | continue;
|
2049 | }
|
2050 | }
|
2051 |
|
2052 | case 1:
|
2053 | this.local$response = this.result_0;
|
2054 | this.exceptionState_0 = 4;
|
2055 | var tmp$_7;
|
2056 | var tmp$_8 = this.local$response.call;
|
2057 | var typeInfo$result_0;
|
2058 | typeInfo$break: do {
|
2059 | try {
|
2060 | typeInfo$result_0 = new TypeInfo_init(getKClass(List), call.JsType, createKType(getKClass(List), [createInvariantKTypeProjection(createKType(getKClass(GithubUser), [], false))], true));
|
2061 | } catch (_) {
|
2062 | typeInfo$result_0 = new TypeInfo_init(getKClass(List), call.JsType);
|
2063 | break typeInfo$break;
|
2064 | }
|
2065 | }
|
2066 | while (false);
|
2067 | this.state_0 = 2;
|
2068 | this.result_0 = tmp$_8.receive_jo9acv$(typeInfo$result_0, this);
|
2069 | if (this.result_0 === COROUTINE_SUSPENDED)
|
2070 | return COROUTINE_SUSPENDED;
|
2071 | continue;
|
2072 | case 2:
|
2073 | this.result_0 = (tmp$_7 = this.result_0) == null || Kotlin.isType(tmp$_7, List) ? tmp$_7 : throwCCE();
|
2074 | this.exceptionState_0 = 6;
|
2075 | this.finallyPath_0 = [3];
|
2076 | this.state_0 = 5;
|
2077 | continue;
|
2078 | case 3:
|
2079 | this.state_0 = 8;
|
2080 | continue;
|
2081 | case 4:
|
2082 | this.finallyPath_0 = [6];
|
2083 | this.state_0 = 5;
|
2084 | continue;
|
2085 | case 5:
|
2086 | this.exceptionState_0 = 6;
|
2087 | complete(this.local$response);
|
2088 | this.state_0 = this.finallyPath_0.shift();
|
2089 | continue;
|
2090 | case 6:
|
2091 | throw this.exception_0;
|
2092 | case 7:
|
2093 | this.result_0 = (tmp$_6 = this.result_0) == null || Kotlin.isType(tmp$_6, List) ? tmp$_6 : throwCCE();
|
2094 | this.state_0 = 8;
|
2095 | continue;
|
2096 | case 8:
|
2097 | this.state_0 = 9;
|
2098 | continue;
|
2099 | case 9:
|
2100 | this.result_0;
|
2101 | return this.result_0;
|
2102 | default:this.state_0 = 6;
|
2103 | throw new Error('State Machine Unreachable execution');
|
2104 | }
|
2105 | } catch (e) {
|
2106 | if (this.state_0 === 6) {
|
2107 | this.exceptionState_0 = this.state_0;
|
2108 | throw e;
|
2109 | } else {
|
2110 | this.state_0 = this.exceptionState_0;
|
2111 | this.exception_0 = e;
|
2112 | }
|
2113 | }
|
2114 | while (true);
|
2115 | };
|
2116 | GithubProvider.prototype.getRepoContributors_61zpoe$ = function (str_0, continuation_0, suspended) {
|
2117 | var instance = new Coroutine$getRepoContributors_61zpoe$_0(this, str_0, continuation_0);
|
2118 | if (suspended)
|
2119 | return instance;
|
2120 | else
|
2121 | return instance.doResume(null);
|
2122 | };
|
2123 | function Coroutine$getLicense_61zpoe$($this, str_0, continuation_0) {
|
2124 | CoroutineImpl.call(this, continuation_0);
|
2125 | this.exceptionState_0 = 6;
|
2126 | this.$this = $this;
|
2127 | this.local$response = void 0;
|
2128 | this.local$str = str_0;
|
2129 | }
|
2130 | Coroutine$getLicense_61zpoe$.$metadata$ = {
|
2131 | kind: Kotlin.Kind.CLASS,
|
2132 | simpleName: null,
|
2133 | interfaces: [CoroutineImpl]
|
2134 | };
|
2135 | Coroutine$getLicense_61zpoe$.prototype = Object.create(CoroutineImpl.prototype);
|
2136 | Coroutine$getLicense_61zpoe$.prototype.constructor = Coroutine$getLicense_61zpoe$;
|
2137 | Coroutine$getLicense_61zpoe$.prototype.doResume = function () {
|
2138 | do
|
2139 | try {
|
2140 | switch (this.state_0) {
|
2141 | case 0:
|
2142 | var $receiver_0 = this.$this.client;
|
2143 | var urlString = 'licenses/' + this.local$str;
|
2144 | var host_0;
|
2145 | var body_0;
|
2146 | host_0 = 'localhost';
|
2147 | body_0 = utils.EmptyContent;
|
2148 | var $receiver_1 = new HttpRequestBuilder_init();
|
2149 | url($receiver_1, 'http', host_0, 0, '/');
|
2150 | $receiver_1.method = HttpMethod.Companion.Get;
|
2151 | $receiver_1.body = body_0;
|
2152 | takeFrom($receiver_1.url, urlString);
|
2153 | get$lambda_0($receiver_1);
|
2154 | var $this_0 = new HttpStatement_init($receiver_1, $receiver_0);
|
2155 | var tmp$_4, tmp$_5, tmp$_6;
|
2156 | tmp$_4 = getKClass(GithubLicense);
|
2157 | if (equals(tmp$_4, getKClass(HttpStatement_init))) {
|
2158 | this.result_0 = (tmp$_5 = $this_0) == null || Kotlin.isType(tmp$_5, GithubLicense) ? tmp$_5 : throwCCE();
|
2159 | this.state_0 = 9;
|
2160 | continue;
|
2161 | } else {
|
2162 | if (equals(tmp$_4, getKClass(HttpResponse))) {
|
2163 | this.state_0 = 7;
|
2164 | this.result_0 = $this_0.execute(this);
|
2165 | if (this.result_0 === COROUTINE_SUSPENDED)
|
2166 | return COROUTINE_SUSPENDED;
|
2167 | continue;
|
2168 | } else {
|
2169 | this.state_0 = 1;
|
2170 | this.result_0 = $this_0.executeUnsafe(this);
|
2171 | if (this.result_0 === COROUTINE_SUSPENDED)
|
2172 | return COROUTINE_SUSPENDED;
|
2173 | continue;
|
2174 | }
|
2175 | }
|
2176 |
|
2177 | case 1:
|
2178 | this.local$response = this.result_0;
|
2179 | this.exceptionState_0 = 4;
|
2180 | var tmp$_7;
|
2181 | var tmp$_8 = this.local$response.call;
|
2182 | var typeInfo$result_0;
|
2183 | typeInfo$break: do {
|
2184 | try {
|
2185 | typeInfo$result_0 = new TypeInfo_init(getKClass(GithubLicense), call.JsType, createKType(getKClass(GithubLicense), [], true));
|
2186 | } catch (_) {
|
2187 | typeInfo$result_0 = new TypeInfo_init(getKClass(GithubLicense), call.JsType);
|
2188 | break typeInfo$break;
|
2189 | }
|
2190 | }
|
2191 | while (false);
|
2192 | this.state_0 = 2;
|
2193 | this.result_0 = tmp$_8.receive_jo9acv$(typeInfo$result_0, this);
|
2194 | if (this.result_0 === COROUTINE_SUSPENDED)
|
2195 | return COROUTINE_SUSPENDED;
|
2196 | continue;
|
2197 | case 2:
|
2198 | this.result_0 = (tmp$_7 = this.result_0) == null || Kotlin.isType(tmp$_7, GithubLicense) ? tmp$_7 : throwCCE();
|
2199 | this.exceptionState_0 = 6;
|
2200 | this.finallyPath_0 = [3];
|
2201 | this.state_0 = 5;
|
2202 | continue;
|
2203 | case 3:
|
2204 | this.state_0 = 8;
|
2205 | continue;
|
2206 | case 4:
|
2207 | this.finallyPath_0 = [6];
|
2208 | this.state_0 = 5;
|
2209 | continue;
|
2210 | case 5:
|
2211 | this.exceptionState_0 = 6;
|
2212 | complete(this.local$response);
|
2213 | this.state_0 = this.finallyPath_0.shift();
|
2214 | continue;
|
2215 | case 6:
|
2216 | throw this.exception_0;
|
2217 | case 7:
|
2218 | this.result_0 = (tmp$_6 = this.result_0) == null || Kotlin.isType(tmp$_6, GithubLicense) ? tmp$_6 : throwCCE();
|
2219 | this.state_0 = 8;
|
2220 | continue;
|
2221 | case 8:
|
2222 | this.state_0 = 9;
|
2223 | continue;
|
2224 | case 9:
|
2225 | this.result_0;
|
2226 | return this.result_0;
|
2227 | default:this.state_0 = 6;
|
2228 | throw new Error('State Machine Unreachable execution');
|
2229 | }
|
2230 | } catch (e) {
|
2231 | if (this.state_0 === 6) {
|
2232 | this.exceptionState_0 = this.state_0;
|
2233 | throw e;
|
2234 | } else {
|
2235 | this.state_0 = this.exceptionState_0;
|
2236 | this.exception_0 = e;
|
2237 | }
|
2238 | }
|
2239 | while (true);
|
2240 | };
|
2241 | GithubProvider.prototype.getLicense_61zpoe$ = function (str_0, continuation_0, suspended) {
|
2242 | var instance = new Coroutine$getLicense_61zpoe$(this, str_0, continuation_0);
|
2243 | if (suspended)
|
2244 | return instance;
|
2245 | else
|
2246 | return instance.doResume(null);
|
2247 | };
|
2248 | function GithubProvider$Companion() {
|
2249 | GithubProvider$Companion_instance = this;
|
2250 | this.key_n7o64m$_0 = 'github';
|
2251 | this.tokens_l15paj$_0 = HashMap_init();
|
2252 | }
|
2253 | Object.defineProperty(GithubProvider$Companion.prototype, 'key', {
|
2254 | get: function () {
|
2255 | return this.key_n7o64m$_0;
|
2256 | }
|
2257 | });
|
2258 | Object.defineProperty(GithubProvider$Companion.prototype, 'tokens', {
|
2259 | get: function () {
|
2260 | return this.tokens_l15paj$_0;
|
2261 | }
|
2262 | });
|
2263 | function GithubProvider$Companion$create$lambda$lambda$lambda(closure$hostname) {
|
2264 | return function ($receiver, it) {
|
2265 | $receiver.protocol = URLProtocol.Companion.HTTPS;
|
2266 | $receiver.host = closure$hostname;
|
2267 | return Unit;
|
2268 | };
|
2269 | }
|
2270 | function GithubProvider$Companion$create$lambda$lambda(closure$hostname, this$GithubProvider$) {
|
2271 | return function ($receiver) {
|
2272 | var tmp$;
|
2273 | $receiver.url_6yzzjr$(GithubProvider$Companion$create$lambda$lambda$lambda(closure$hostname));
|
2274 | header($receiver, 'Accept', 'application/vnd.github.v3+json');
|
2275 | if ((tmp$ = this$GithubProvider$.tokens.get_11rb$(closure$hostname)) != null) {
|
2276 | header($receiver, 'Authorization', 'token ' + tmp$);
|
2277 | }return Unit;
|
2278 | };
|
2279 | }
|
2280 | function GithubProvider$Companion$create$lambda(closure$hostname, this$GithubProvider$) {
|
2281 | return function ($receiver) {
|
2282 | defaultRequest($receiver, GithubProvider$Companion$create$lambda$lambda(closure$hostname, this$GithubProvider$));
|
2283 | return Unit;
|
2284 | };
|
2285 | }
|
2286 | GithubProvider$Companion.prototype.create_wf0mc2$ = function (config, hostname) {
|
2287 | var client = this.ktor_1v6kay$(config, GithubProvider$Companion$create$lambda(hostname, this));
|
2288 | return new GithubProvider(client);
|
2289 | };
|
2290 | GithubProvider$Companion.$metadata$ = {
|
2291 | kind: Kind_OBJECT,
|
2292 | simpleName: 'Companion',
|
2293 | interfaces: [ServiceBuilder]
|
2294 | };
|
2295 | var GithubProvider$Companion_instance = null;
|
2296 | function GithubProvider$Companion_getInstance() {
|
2297 | if (GithubProvider$Companion_instance === null) {
|
2298 | new GithubProvider$Companion();
|
2299 | }return GithubProvider$Companion_instance;
|
2300 | }
|
2301 | GithubProvider.$metadata$ = {
|
2302 | kind: Kind_CLASS,
|
2303 | simpleName: 'GithubProvider',
|
2304 | interfaces: [RequestProvider]
|
2305 | };
|
2306 | function GithubLicense() {
|
2307 | GithubLicense$Companion_getInstance();
|
2308 | License.call(this);
|
2309 | this.id_apklj$_0 = '';
|
2310 | this.name_1pgghj$_0 = null;
|
2311 | this.description_b2yzgc$_0 = null;
|
2312 | this.body_1vt7zi$_0 = null;
|
2313 | this.infoUrl_qv4jsx$_0 = null;
|
2314 | this.permissions_xocwak$_0 = null;
|
2315 | this.conditions_ycdnyc$_0 = null;
|
2316 | this.limitations_odm3uv$_0 = null;
|
2317 | }
|
2318 | Object.defineProperty(GithubLicense.prototype, 'id', {
|
2319 | get: function () {
|
2320 | return this.id_apklj$_0;
|
2321 | },
|
2322 | set: function (id) {
|
2323 | this.id_apklj$_0 = id;
|
2324 | }
|
2325 | });
|
2326 | Object.defineProperty(GithubLicense.prototype, 'name', {
|
2327 | get: function () {
|
2328 | return this.name_1pgghj$_0;
|
2329 | }
|
2330 | });
|
2331 | Object.defineProperty(GithubLicense.prototype, 'description', {
|
2332 | get: function () {
|
2333 | return this.description_b2yzgc$_0;
|
2334 | }
|
2335 | });
|
2336 | Object.defineProperty(GithubLicense.prototype, 'body', {
|
2337 | get: function () {
|
2338 | return this.body_1vt7zi$_0;
|
2339 | }
|
2340 | });
|
2341 | Object.defineProperty(GithubLicense.prototype, 'infoUrl', {
|
2342 | get: function () {
|
2343 | return this.infoUrl_qv4jsx$_0;
|
2344 | }
|
2345 | });
|
2346 | Object.defineProperty(GithubLicense.prototype, 'permissions', {
|
2347 | get: function () {
|
2348 | return this.permissions_xocwak$_0;
|
2349 | }
|
2350 | });
|
2351 | Object.defineProperty(GithubLicense.prototype, 'conditions', {
|
2352 | get: function () {
|
2353 | return this.conditions_ycdnyc$_0;
|
2354 | }
|
2355 | });
|
2356 | Object.defineProperty(GithubLicense.prototype, 'limitations', {
|
2357 | get: function () {
|
2358 | return this.limitations_odm3uv$_0;
|
2359 | }
|
2360 | });
|
2361 | function GithubLicense$Companion() {
|
2362 | GithubLicense$Companion_instance = this;
|
2363 | }
|
2364 | GithubLicense$Companion.prototype.serializer = function () {
|
2365 | return GithubLicense$$serializer_getInstance();
|
2366 | };
|
2367 | GithubLicense$Companion.$metadata$ = {
|
2368 | kind: Kind_OBJECT,
|
2369 | simpleName: 'Companion',
|
2370 | interfaces: []
|
2371 | };
|
2372 | var GithubLicense$Companion_instance = null;
|
2373 | function GithubLicense$Companion_getInstance() {
|
2374 | if (GithubLicense$Companion_instance === null) {
|
2375 | new GithubLicense$Companion();
|
2376 | }return GithubLicense$Companion_instance;
|
2377 | }
|
2378 | function GithubLicense$$serializer() {
|
2379 | this.descriptor_29cfwz$_0 = new SerialClassDescImpl('me.jfenn.gitrest.provider.github.model.GithubLicense', this, 8);
|
2380 | this.descriptor.addElement_ivxn3r$('key', true);
|
2381 | this.descriptor.addElement_ivxn3r$('name', true);
|
2382 | this.descriptor.addElement_ivxn3r$('description', true);
|
2383 | this.descriptor.addElement_ivxn3r$('body', true);
|
2384 | this.descriptor.addElement_ivxn3r$('html_url', true);
|
2385 | this.descriptor.addElement_ivxn3r$('permissions', true);
|
2386 | this.descriptor.addElement_ivxn3r$('conditions', true);
|
2387 | this.descriptor.addElement_ivxn3r$('limitations', true);
|
2388 | GithubLicense$$serializer_instance = this;
|
2389 | }
|
2390 | Object.defineProperty(GithubLicense$$serializer.prototype, 'descriptor', {
|
2391 | get: function () {
|
2392 | return this.descriptor_29cfwz$_0;
|
2393 | }
|
2394 | });
|
2395 | GithubLicense$$serializer.prototype.serialize_awe97i$ = function (encoder, value) {
|
2396 | var output = encoder.beginStructure_r0sa6z$(this.descriptor, []);
|
2397 | if (!equals(value.id, '') || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 0))
|
2398 | output.encodeStringElement_bgm7zs$(this.descriptor, 0, value.id);
|
2399 | if (!equals(value.name, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 1))
|
2400 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 1, internal.StringSerializer, value.name);
|
2401 | if (!equals(value.description, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 2))
|
2402 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 2, internal.StringSerializer, value.description);
|
2403 | if (!equals(value.body, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 3))
|
2404 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 3, internal.StringSerializer, value.body);
|
2405 | if (!equals(value.infoUrl, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 4))
|
2406 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 4, internal.StringSerializer, value.infoUrl);
|
2407 | if (!equals(value.permissions, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 5))
|
2408 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 5, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer), value.permissions);
|
2409 | if (!equals(value.conditions, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 6))
|
2410 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 6, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer), value.conditions);
|
2411 | if (!equals(value.limitations, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 7))
|
2412 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 7, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer), value.limitations);
|
2413 | output.endStructure_qatsm0$(this.descriptor);
|
2414 | };
|
2415 | GithubLicense$$serializer.prototype.deserialize_nts5qn$ = function (decoder) {
|
2416 | var index;
|
2417 | var bitMask0 = 0;
|
2418 | var local0
|
2419 | , local1
|
2420 | , local2
|
2421 | , local3
|
2422 | , local4
|
2423 | , local5
|
2424 | , local6
|
2425 | , local7;
|
2426 | var input = decoder.beginStructure_r0sa6z$(this.descriptor, []);
|
2427 | loopLabel: while (true) {
|
2428 | index = input.decodeElementIndex_qatsm0$(this.descriptor);
|
2429 | switch (index) {
|
2430 | case 0:
|
2431 | local0 = input.decodeStringElement_3zr2iy$(this.descriptor, 0);
|
2432 | bitMask0 |= 1;
|
2433 | break;
|
2434 | case 1:
|
2435 | local1 = (bitMask0 & 2) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 1, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 1, internal.StringSerializer, local1);
|
2436 | bitMask0 |= 2;
|
2437 | break;
|
2438 | case 2:
|
2439 | local2 = (bitMask0 & 4) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 2, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 2, internal.StringSerializer, local2);
|
2440 | bitMask0 |= 4;
|
2441 | break;
|
2442 | case 3:
|
2443 | local3 = (bitMask0 & 8) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 3, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 3, internal.StringSerializer, local3);
|
2444 | bitMask0 |= 8;
|
2445 | break;
|
2446 | case 4:
|
2447 | local4 = (bitMask0 & 16) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 4, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 4, internal.StringSerializer, local4);
|
2448 | bitMask0 |= 16;
|
2449 | break;
|
2450 | case 5:
|
2451 | local5 = (bitMask0 & 32) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 5, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer)) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 5, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer), local5);
|
2452 | bitMask0 |= 32;
|
2453 | break;
|
2454 | case 6:
|
2455 | local6 = (bitMask0 & 64) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 6, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer)) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 6, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer), local6);
|
2456 | bitMask0 |= 64;
|
2457 | break;
|
2458 | case 7:
|
2459 | local7 = (bitMask0 & 128) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 7, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer)) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 7, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer), local7);
|
2460 | bitMask0 |= 128;
|
2461 | break;
|
2462 | case -1:
|
2463 | break loopLabel;
|
2464 | default:throw new UnknownFieldException(index);
|
2465 | }
|
2466 | }
|
2467 | input.endStructure_qatsm0$(this.descriptor);
|
2468 | return GithubLicense_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null);
|
2469 | };
|
2470 | GithubLicense$$serializer.prototype.childSerializers = function () {
|
2471 | return [internal.StringSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer)), new NullableSerializer(new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer)), new NullableSerializer(new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer))];
|
2472 | };
|
2473 | GithubLicense$$serializer.$metadata$ = {
|
2474 | kind: Kind_OBJECT,
|
2475 | simpleName: '$serializer',
|
2476 | interfaces: [GeneratedSerializer]
|
2477 | };
|
2478 | var GithubLicense$$serializer_instance = null;
|
2479 | function GithubLicense$$serializer_getInstance() {
|
2480 | if (GithubLicense$$serializer_instance === null) {
|
2481 | new GithubLicense$$serializer();
|
2482 | }return GithubLicense$$serializer_instance;
|
2483 | }
|
2484 | function GithubLicense_init(seen1, id, name, description, body, infoUrl, permissions, conditions, limitations, serializationConstructorMarker) {
|
2485 | var $this = serializationConstructorMarker || Object.create(GithubLicense.prototype);
|
2486 | License.call($this);
|
2487 | if ((seen1 & 1) === 0)
|
2488 | $this.id_apklj$_0 = '';
|
2489 | else
|
2490 | $this.id_apklj$_0 = id;
|
2491 | if ((seen1 & 2) === 0)
|
2492 | $this.name_1pgghj$_0 = null;
|
2493 | else
|
2494 | $this.name_1pgghj$_0 = name;
|
2495 | if ((seen1 & 4) === 0)
|
2496 | $this.description_b2yzgc$_0 = null;
|
2497 | else
|
2498 | $this.description_b2yzgc$_0 = description;
|
2499 | if ((seen1 & 8) === 0)
|
2500 | $this.body_1vt7zi$_0 = null;
|
2501 | else
|
2502 | $this.body_1vt7zi$_0 = body;
|
2503 | if ((seen1 & 16) === 0)
|
2504 | $this.infoUrl_qv4jsx$_0 = null;
|
2505 | else
|
2506 | $this.infoUrl_qv4jsx$_0 = infoUrl;
|
2507 | if ((seen1 & 32) === 0)
|
2508 | $this.permissions_xocwak$_0 = null;
|
2509 | else
|
2510 | $this.permissions_xocwak$_0 = permissions;
|
2511 | if ((seen1 & 64) === 0)
|
2512 | $this.conditions_ycdnyc$_0 = null;
|
2513 | else
|
2514 | $this.conditions_ycdnyc$_0 = conditions;
|
2515 | if ((seen1 & 128) === 0)
|
2516 | $this.limitations_odm3uv$_0 = null;
|
2517 | else
|
2518 | $this.limitations_odm3uv$_0 = limitations;
|
2519 | return $this;
|
2520 | }
|
2521 | GithubLicense.$metadata$ = {
|
2522 | kind: Kind_CLASS,
|
2523 | simpleName: 'GithubLicense',
|
2524 | interfaces: [License]
|
2525 | };
|
2526 | function GithubRepo() {
|
2527 | GithubRepo$Companion_getInstance();
|
2528 | Repo.call(this);
|
2529 | this.id_6jygxo$_0 = '';
|
2530 | this.description_uc2fdr$_0 = null;
|
2531 | this.url_9wflgy$_0 = null;
|
2532 | this.websiteUrl_57a5p9$_0 = null;
|
2533 | this.gitUrlHttp_ysvvaq$_0 = null;
|
2534 | this.gitUrlSsh_81c8r2$_0 = null;
|
2535 | this.license_cs82v8$_0 = null;
|
2536 | this.defaultBranch_1fsm12$_0 = null;
|
2537 | }
|
2538 | Object.defineProperty(GithubRepo.prototype, 'id', {
|
2539 | get: function () {
|
2540 | return this.id_6jygxo$_0;
|
2541 | },
|
2542 | set: function (id) {
|
2543 | this.id_6jygxo$_0 = id;
|
2544 | }
|
2545 | });
|
2546 | Object.defineProperty(GithubRepo.prototype, 'description', {
|
2547 | get: function () {
|
2548 | return this.description_uc2fdr$_0;
|
2549 | }
|
2550 | });
|
2551 | Object.defineProperty(GithubRepo.prototype, 'url', {
|
2552 | get: function () {
|
2553 | return this.url_9wflgy$_0;
|
2554 | }
|
2555 | });
|
2556 | Object.defineProperty(GithubRepo.prototype, 'websiteUrl', {
|
2557 | get: function () {
|
2558 | return this.websiteUrl_57a5p9$_0;
|
2559 | }
|
2560 | });
|
2561 | Object.defineProperty(GithubRepo.prototype, 'gitUrlHttp', {
|
2562 | get: function () {
|
2563 | return this.gitUrlHttp_ysvvaq$_0;
|
2564 | }
|
2565 | });
|
2566 | Object.defineProperty(GithubRepo.prototype, 'gitUrlSsh', {
|
2567 | get: function () {
|
2568 | return this.gitUrlSsh_81c8r2$_0;
|
2569 | }
|
2570 | });
|
2571 | Object.defineProperty(GithubRepo.prototype, 'license', {
|
2572 | get: function () {
|
2573 | return this.license_cs82v8$_0;
|
2574 | }
|
2575 | });
|
2576 | Object.defineProperty(GithubRepo.prototype, 'defaultBranch', {
|
2577 | get: function () {
|
2578 | return this.defaultBranch_1fsm12$_0;
|
2579 | }
|
2580 | });
|
2581 | GithubRepo.prototype.getRawFileUrl_puj7f4$$default = function (branchName, filePath) {
|
2582 | return 'https://raw.githubusercontent.com/' + this.id + '/' + branchName + '/' + filePath;
|
2583 | };
|
2584 | function GithubRepo$Companion() {
|
2585 | GithubRepo$Companion_instance = this;
|
2586 | }
|
2587 | GithubRepo$Companion.prototype.serializer = function () {
|
2588 | return GithubRepo$$serializer_getInstance();
|
2589 | };
|
2590 | GithubRepo$Companion.$metadata$ = {
|
2591 | kind: Kind_OBJECT,
|
2592 | simpleName: 'Companion',
|
2593 | interfaces: []
|
2594 | };
|
2595 | var GithubRepo$Companion_instance = null;
|
2596 | function GithubRepo$Companion_getInstance() {
|
2597 | if (GithubRepo$Companion_instance === null) {
|
2598 | new GithubRepo$Companion();
|
2599 | }return GithubRepo$Companion_instance;
|
2600 | }
|
2601 | function GithubRepo$$serializer() {
|
2602 | this.descriptor_xjpwhc$_0 = new SerialClassDescImpl('me.jfenn.gitrest.provider.github.model.GithubRepo', this, 8);
|
2603 | this.descriptor.addElement_ivxn3r$('full_name', true);
|
2604 | this.descriptor.addElement_ivxn3r$('description', true);
|
2605 | this.descriptor.addElement_ivxn3r$('html_url', true);
|
2606 | this.descriptor.addElement_ivxn3r$('homepage', true);
|
2607 | this.descriptor.addElement_ivxn3r$('clone_url', true);
|
2608 | this.descriptor.addElement_ivxn3r$('ssh_url', true);
|
2609 | this.descriptor.addElement_ivxn3r$('license', true);
|
2610 | this.descriptor.addElement_ivxn3r$('default_branch', true);
|
2611 | GithubRepo$$serializer_instance = this;
|
2612 | }
|
2613 | Object.defineProperty(GithubRepo$$serializer.prototype, 'descriptor', {
|
2614 | get: function () {
|
2615 | return this.descriptor_xjpwhc$_0;
|
2616 | }
|
2617 | });
|
2618 | GithubRepo$$serializer.prototype.serialize_awe97i$ = function (encoder, value) {
|
2619 | var output = encoder.beginStructure_r0sa6z$(this.descriptor, []);
|
2620 | if (!equals(value.id, '') || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 0))
|
2621 | output.encodeStringElement_bgm7zs$(this.descriptor, 0, value.id);
|
2622 | if (!equals(value.description, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 1))
|
2623 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 1, new OptionalStringSerializer(), value.description);
|
2624 | if (!equals(value.url, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 2))
|
2625 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 2, internal.StringSerializer, value.url);
|
2626 | if (!equals(value.websiteUrl, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 3))
|
2627 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 3, new OptionalStringSerializer(), value.websiteUrl);
|
2628 | if (!equals(value.gitUrlHttp, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 4))
|
2629 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 4, internal.StringSerializer, value.gitUrlHttp);
|
2630 | if (!equals(value.gitUrlSsh, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 5))
|
2631 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 5, internal.StringSerializer, value.gitUrlSsh);
|
2632 | if (!equals(value.license, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 6))
|
2633 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 6, GithubLicense$$serializer_getInstance(), value.license);
|
2634 | if (!equals(value.defaultBranch, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 7))
|
2635 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 7, internal.StringSerializer, value.defaultBranch);
|
2636 | output.endStructure_qatsm0$(this.descriptor);
|
2637 | };
|
2638 | GithubRepo$$serializer.prototype.deserialize_nts5qn$ = function (decoder) {
|
2639 | var index;
|
2640 | var bitMask0 = 0;
|
2641 | var local0
|
2642 | , local1
|
2643 | , local2
|
2644 | , local3
|
2645 | , local4
|
2646 | , local5
|
2647 | , local6
|
2648 | , local7;
|
2649 | var input = decoder.beginStructure_r0sa6z$(this.descriptor, []);
|
2650 | loopLabel: while (true) {
|
2651 | index = input.decodeElementIndex_qatsm0$(this.descriptor);
|
2652 | switch (index) {
|
2653 | case 0:
|
2654 | local0 = input.decodeStringElement_3zr2iy$(this.descriptor, 0);
|
2655 | bitMask0 |= 1;
|
2656 | break;
|
2657 | case 1:
|
2658 | local1 = (bitMask0 & 2) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 1, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 1, new OptionalStringSerializer(), local1);
|
2659 | bitMask0 |= 2;
|
2660 | break;
|
2661 | case 2:
|
2662 | local2 = (bitMask0 & 4) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 2, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 2, internal.StringSerializer, local2);
|
2663 | bitMask0 |= 4;
|
2664 | break;
|
2665 | case 3:
|
2666 | local3 = (bitMask0 & 8) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 3, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 3, new OptionalStringSerializer(), local3);
|
2667 | bitMask0 |= 8;
|
2668 | break;
|
2669 | case 4:
|
2670 | local4 = (bitMask0 & 16) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 4, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 4, internal.StringSerializer, local4);
|
2671 | bitMask0 |= 16;
|
2672 | break;
|
2673 | case 5:
|
2674 | local5 = (bitMask0 & 32) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 5, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 5, internal.StringSerializer, local5);
|
2675 | bitMask0 |= 32;
|
2676 | break;
|
2677 | case 6:
|
2678 | local6 = (bitMask0 & 64) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 6, GithubLicense$$serializer_getInstance()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 6, GithubLicense$$serializer_getInstance(), local6);
|
2679 | bitMask0 |= 64;
|
2680 | break;
|
2681 | case 7:
|
2682 | local7 = (bitMask0 & 128) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 7, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 7, internal.StringSerializer, local7);
|
2683 | bitMask0 |= 128;
|
2684 | break;
|
2685 | case -1:
|
2686 | break loopLabel;
|
2687 | default:throw new UnknownFieldException(index);
|
2688 | }
|
2689 | }
|
2690 | input.endStructure_qatsm0$(this.descriptor);
|
2691 | return GithubRepo_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null);
|
2692 | };
|
2693 | GithubRepo$$serializer.prototype.childSerializers = function () {
|
2694 | return [internal.StringSerializer, new NullableSerializer(new OptionalStringSerializer()), new NullableSerializer(internal.StringSerializer), new NullableSerializer(new OptionalStringSerializer()), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(GithubLicense$$serializer_getInstance()), new NullableSerializer(internal.StringSerializer)];
|
2695 | };
|
2696 | GithubRepo$$serializer.$metadata$ = {
|
2697 | kind: Kind_OBJECT,
|
2698 | simpleName: '$serializer',
|
2699 | interfaces: [GeneratedSerializer]
|
2700 | };
|
2701 | var GithubRepo$$serializer_instance = null;
|
2702 | function GithubRepo$$serializer_getInstance() {
|
2703 | if (GithubRepo$$serializer_instance === null) {
|
2704 | new GithubRepo$$serializer();
|
2705 | }return GithubRepo$$serializer_instance;
|
2706 | }
|
2707 | function GithubRepo_init(seen1, id, description, url, websiteUrl, gitUrlHttp, gitUrlSsh, license, defaultBranch, serializationConstructorMarker) {
|
2708 | var $this = serializationConstructorMarker || Object.create(GithubRepo.prototype);
|
2709 | Repo.call($this);
|
2710 | if ((seen1 & 1) === 0)
|
2711 | $this.id_6jygxo$_0 = '';
|
2712 | else
|
2713 | $this.id_6jygxo$_0 = id;
|
2714 | if ((seen1 & 2) === 0)
|
2715 | $this.description_uc2fdr$_0 = null;
|
2716 | else
|
2717 | $this.description_uc2fdr$_0 = description;
|
2718 | if ((seen1 & 4) === 0)
|
2719 | $this.url_9wflgy$_0 = null;
|
2720 | else
|
2721 | $this.url_9wflgy$_0 = url;
|
2722 | if ((seen1 & 8) === 0)
|
2723 | $this.websiteUrl_57a5p9$_0 = null;
|
2724 | else
|
2725 | $this.websiteUrl_57a5p9$_0 = websiteUrl;
|
2726 | if ((seen1 & 16) === 0)
|
2727 | $this.gitUrlHttp_ysvvaq$_0 = null;
|
2728 | else
|
2729 | $this.gitUrlHttp_ysvvaq$_0 = gitUrlHttp;
|
2730 | if ((seen1 & 32) === 0)
|
2731 | $this.gitUrlSsh_81c8r2$_0 = null;
|
2732 | else
|
2733 | $this.gitUrlSsh_81c8r2$_0 = gitUrlSsh;
|
2734 | if ((seen1 & 64) === 0)
|
2735 | $this.license_cs82v8$_0 = null;
|
2736 | else
|
2737 | $this.license_cs82v8$_0 = license;
|
2738 | if ((seen1 & 128) === 0)
|
2739 | $this.defaultBranch_1fsm12$_0 = null;
|
2740 | else
|
2741 | $this.defaultBranch_1fsm12$_0 = defaultBranch;
|
2742 | return $this;
|
2743 | }
|
2744 | GithubRepo.$metadata$ = {
|
2745 | kind: Kind_CLASS,
|
2746 | simpleName: 'GithubRepo',
|
2747 | interfaces: [Repo]
|
2748 | };
|
2749 | function GithubUser() {
|
2750 | GithubUser$Companion_getInstance();
|
2751 | User.call(this);
|
2752 | this.id_9836s5$_0 = '';
|
2753 | this.name_dv8nh7$_0 = null;
|
2754 | this.url_1uilsl$_0 = null;
|
2755 | this.avatarUrl_y0b1rm$_0 = null;
|
2756 | this.websiteUrl_u94eis$_0 = null;
|
2757 | this.email_7ssi0o$_0 = null;
|
2758 | this.bio_1u6afw$_0 = null;
|
2759 | }
|
2760 | Object.defineProperty(GithubUser.prototype, 'id', {
|
2761 | get: function () {
|
2762 | return this.id_9836s5$_0;
|
2763 | },
|
2764 | set: function (id) {
|
2765 | this.id_9836s5$_0 = id;
|
2766 | }
|
2767 | });
|
2768 | Object.defineProperty(GithubUser.prototype, 'name', {
|
2769 | get: function () {
|
2770 | return this.name_dv8nh7$_0;
|
2771 | }
|
2772 | });
|
2773 | Object.defineProperty(GithubUser.prototype, 'url', {
|
2774 | get: function () {
|
2775 | return this.url_1uilsl$_0;
|
2776 | }
|
2777 | });
|
2778 | Object.defineProperty(GithubUser.prototype, 'avatarUrl', {
|
2779 | get: function () {
|
2780 | return this.avatarUrl_y0b1rm$_0;
|
2781 | }
|
2782 | });
|
2783 | Object.defineProperty(GithubUser.prototype, 'websiteUrl', {
|
2784 | get: function () {
|
2785 | return this.websiteUrl_u94eis$_0;
|
2786 | }
|
2787 | });
|
2788 | Object.defineProperty(GithubUser.prototype, 'email', {
|
2789 | get: function () {
|
2790 | return this.email_7ssi0o$_0;
|
2791 | }
|
2792 | });
|
2793 | Object.defineProperty(GithubUser.prototype, 'bio', {
|
2794 | get: function () {
|
2795 | return this.bio_1u6afw$_0;
|
2796 | }
|
2797 | });
|
2798 | function GithubUser$Companion() {
|
2799 | GithubUser$Companion_instance = this;
|
2800 | }
|
2801 | GithubUser$Companion.prototype.serializer = function () {
|
2802 | return GithubUser$$serializer_getInstance();
|
2803 | };
|
2804 | GithubUser$Companion.$metadata$ = {
|
2805 | kind: Kind_OBJECT,
|
2806 | simpleName: 'Companion',
|
2807 | interfaces: []
|
2808 | };
|
2809 | var GithubUser$Companion_instance = null;
|
2810 | function GithubUser$Companion_getInstance() {
|
2811 | if (GithubUser$Companion_instance === null) {
|
2812 | new GithubUser$Companion();
|
2813 | }return GithubUser$Companion_instance;
|
2814 | }
|
2815 | function GithubUser$$serializer() {
|
2816 | this.descriptor_77im0n$_0 = new SerialClassDescImpl('me.jfenn.gitrest.provider.github.model.GithubUser', this, 7);
|
2817 | this.descriptor.addElement_ivxn3r$('login', true);
|
2818 | this.descriptor.addElement_ivxn3r$('name', true);
|
2819 | this.descriptor.addElement_ivxn3r$('html_url', true);
|
2820 | this.descriptor.addElement_ivxn3r$('avatar_url', true);
|
2821 | this.descriptor.addElement_ivxn3r$('blog', true);
|
2822 | this.descriptor.addElement_ivxn3r$('email', true);
|
2823 | this.descriptor.addElement_ivxn3r$('bio', true);
|
2824 | GithubUser$$serializer_instance = this;
|
2825 | }
|
2826 | Object.defineProperty(GithubUser$$serializer.prototype, 'descriptor', {
|
2827 | get: function () {
|
2828 | return this.descriptor_77im0n$_0;
|
2829 | }
|
2830 | });
|
2831 | GithubUser$$serializer.prototype.serialize_awe97i$ = function (encoder, value) {
|
2832 | var output = encoder.beginStructure_r0sa6z$(this.descriptor, []);
|
2833 | if (!equals(value.id, '') || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 0))
|
2834 | output.encodeStringElement_bgm7zs$(this.descriptor, 0, value.id);
|
2835 | if (!equals(value.name, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 1))
|
2836 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 1, new OptionalStringSerializer(), value.name);
|
2837 | if (!equals(value.url, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 2))
|
2838 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 2, internal.StringSerializer, value.url);
|
2839 | if (!equals(value.avatarUrl, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 3))
|
2840 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 3, internal.StringSerializer, value.avatarUrl);
|
2841 | if (!equals(value.websiteUrl, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 4))
|
2842 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 4, new OptionalStringSerializer(), value.websiteUrl);
|
2843 | if (!equals(value.email, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 5))
|
2844 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 5, new OptionalStringSerializer(), value.email);
|
2845 | if (!equals(value.bio, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 6))
|
2846 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 6, new OptionalStringSerializer(), value.bio);
|
2847 | output.endStructure_qatsm0$(this.descriptor);
|
2848 | };
|
2849 | GithubUser$$serializer.prototype.deserialize_nts5qn$ = function (decoder) {
|
2850 | var index;
|
2851 | var bitMask0 = 0;
|
2852 | var local0
|
2853 | , local1
|
2854 | , local2
|
2855 | , local3
|
2856 | , local4
|
2857 | , local5
|
2858 | , local6;
|
2859 | var input = decoder.beginStructure_r0sa6z$(this.descriptor, []);
|
2860 | loopLabel: while (true) {
|
2861 | index = input.decodeElementIndex_qatsm0$(this.descriptor);
|
2862 | switch (index) {
|
2863 | case 0:
|
2864 | local0 = input.decodeStringElement_3zr2iy$(this.descriptor, 0);
|
2865 | bitMask0 |= 1;
|
2866 | break;
|
2867 | case 1:
|
2868 | local1 = (bitMask0 & 2) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 1, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 1, new OptionalStringSerializer(), local1);
|
2869 | bitMask0 |= 2;
|
2870 | break;
|
2871 | case 2:
|
2872 | local2 = (bitMask0 & 4) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 2, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 2, internal.StringSerializer, local2);
|
2873 | bitMask0 |= 4;
|
2874 | break;
|
2875 | case 3:
|
2876 | local3 = (bitMask0 & 8) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 3, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 3, internal.StringSerializer, local3);
|
2877 | bitMask0 |= 8;
|
2878 | break;
|
2879 | case 4:
|
2880 | local4 = (bitMask0 & 16) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 4, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 4, new OptionalStringSerializer(), local4);
|
2881 | bitMask0 |= 16;
|
2882 | break;
|
2883 | case 5:
|
2884 | local5 = (bitMask0 & 32) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 5, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 5, new OptionalStringSerializer(), local5);
|
2885 | bitMask0 |= 32;
|
2886 | break;
|
2887 | case 6:
|
2888 | local6 = (bitMask0 & 64) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 6, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 6, new OptionalStringSerializer(), local6);
|
2889 | bitMask0 |= 64;
|
2890 | break;
|
2891 | case -1:
|
2892 | break loopLabel;
|
2893 | default:throw new UnknownFieldException(index);
|
2894 | }
|
2895 | }
|
2896 | input.endStructure_qatsm0$(this.descriptor);
|
2897 | return GithubUser_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, null);
|
2898 | };
|
2899 | GithubUser$$serializer.prototype.childSerializers = function () {
|
2900 | return [internal.StringSerializer, new NullableSerializer(new OptionalStringSerializer()), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(new OptionalStringSerializer()), new NullableSerializer(new OptionalStringSerializer()), new NullableSerializer(new OptionalStringSerializer())];
|
2901 | };
|
2902 | GithubUser$$serializer.$metadata$ = {
|
2903 | kind: Kind_OBJECT,
|
2904 | simpleName: '$serializer',
|
2905 | interfaces: [GeneratedSerializer]
|
2906 | };
|
2907 | var GithubUser$$serializer_instance = null;
|
2908 | function GithubUser$$serializer_getInstance() {
|
2909 | if (GithubUser$$serializer_instance === null) {
|
2910 | new GithubUser$$serializer();
|
2911 | }return GithubUser$$serializer_instance;
|
2912 | }
|
2913 | function GithubUser_init(seen1, id, name, url, avatarUrl, websiteUrl, email, bio, serializationConstructorMarker) {
|
2914 | var $this = serializationConstructorMarker || Object.create(GithubUser.prototype);
|
2915 | User.call($this);
|
2916 | if ((seen1 & 1) === 0)
|
2917 | $this.id_9836s5$_0 = '';
|
2918 | else
|
2919 | $this.id_9836s5$_0 = id;
|
2920 | if ((seen1 & 2) === 0)
|
2921 | $this.name_dv8nh7$_0 = null;
|
2922 | else
|
2923 | $this.name_dv8nh7$_0 = name;
|
2924 | if ((seen1 & 4) === 0)
|
2925 | $this.url_1uilsl$_0 = null;
|
2926 | else
|
2927 | $this.url_1uilsl$_0 = url;
|
2928 | if ((seen1 & 8) === 0)
|
2929 | $this.avatarUrl_y0b1rm$_0 = null;
|
2930 | else
|
2931 | $this.avatarUrl_y0b1rm$_0 = avatarUrl;
|
2932 | if ((seen1 & 16) === 0)
|
2933 | $this.websiteUrl_u94eis$_0 = null;
|
2934 | else
|
2935 | $this.websiteUrl_u94eis$_0 = websiteUrl;
|
2936 | if ((seen1 & 32) === 0)
|
2937 | $this.email_7ssi0o$_0 = null;
|
2938 | else
|
2939 | $this.email_7ssi0o$_0 = email;
|
2940 | if ((seen1 & 64) === 0)
|
2941 | $this.bio_1u6afw$_0 = null;
|
2942 | else
|
2943 | $this.bio_1u6afw$_0 = bio;
|
2944 | return $this;
|
2945 | }
|
2946 | GithubUser.$metadata$ = {
|
2947 | kind: Kind_CLASS,
|
2948 | simpleName: 'GithubUser',
|
2949 | interfaces: [User]
|
2950 | };
|
2951 | function get$lambda_1($receiver) {
|
2952 | return Unit;
|
2953 | }
|
2954 | function GitlabProvider(client) {
|
2955 | GitlabProvider$Companion_getInstance();
|
2956 | this.client = client;
|
2957 | }
|
2958 | function Coroutine$getUser_61zpoe$_1($this, str_0, continuation_0) {
|
2959 | CoroutineImpl.call(this, continuation_0);
|
2960 | this.exceptionState_0 = 6;
|
2961 | this.$this = $this;
|
2962 | this.local$response = void 0;
|
2963 | this.local$str = str_0;
|
2964 | }
|
2965 | Coroutine$getUser_61zpoe$_1.$metadata$ = {
|
2966 | kind: Kotlin.Kind.CLASS,
|
2967 | simpleName: null,
|
2968 | interfaces: [CoroutineImpl]
|
2969 | };
|
2970 | Coroutine$getUser_61zpoe$_1.prototype = Object.create(CoroutineImpl.prototype);
|
2971 | Coroutine$getUser_61zpoe$_1.prototype.constructor = Coroutine$getUser_61zpoe$_1;
|
2972 | Coroutine$getUser_61zpoe$_1.prototype.doResume = function () {
|
2973 | do
|
2974 | try {
|
2975 | switch (this.state_0) {
|
2976 | case 0:
|
2977 | var $receiver_0 = this.$this.client;
|
2978 | var urlString = 'api/v4/users?username=' + this.local$str;
|
2979 | var host_0;
|
2980 | var body_0;
|
2981 | host_0 = 'localhost';
|
2982 | body_0 = utils.EmptyContent;
|
2983 | var $receiver_1 = new HttpRequestBuilder_init();
|
2984 | url($receiver_1, 'http', host_0, 0, '/');
|
2985 | $receiver_1.method = HttpMethod.Companion.Get;
|
2986 | $receiver_1.body = body_0;
|
2987 | takeFrom($receiver_1.url, urlString);
|
2988 | get$lambda_1($receiver_1);
|
2989 | var $this_0 = new HttpStatement_init($receiver_1, $receiver_0);
|
2990 | var tmp$_4, tmp$_5, tmp$_6;
|
2991 | tmp$_4 = getKClass(List);
|
2992 | if (equals(tmp$_4, getKClass(HttpStatement_init))) {
|
2993 | this.result_0 = Kotlin.isType(tmp$_5 = $this_0, List) ? tmp$_5 : throwCCE();
|
2994 | this.state_0 = 9;
|
2995 | continue;
|
2996 | } else {
|
2997 | if (equals(tmp$_4, getKClass(HttpResponse))) {
|
2998 | this.state_0 = 7;
|
2999 | this.result_0 = $this_0.execute(this);
|
3000 | if (this.result_0 === COROUTINE_SUSPENDED)
|
3001 | return COROUTINE_SUSPENDED;
|
3002 | continue;
|
3003 | } else {
|
3004 | this.state_0 = 1;
|
3005 | this.result_0 = $this_0.executeUnsafe(this);
|
3006 | if (this.result_0 === COROUTINE_SUSPENDED)
|
3007 | return COROUTINE_SUSPENDED;
|
3008 | continue;
|
3009 | }
|
3010 | }
|
3011 |
|
3012 | case 1:
|
3013 | this.local$response = this.result_0;
|
3014 | this.exceptionState_0 = 4;
|
3015 | var tmp$_7;
|
3016 | var tmp$_8 = this.local$response.call;
|
3017 | var typeInfo$result_0;
|
3018 | typeInfo$break: do {
|
3019 | try {
|
3020 | typeInfo$result_0 = new TypeInfo_init(getKClass(List), call.JsType, createKType(getKClass(List), [createInvariantKTypeProjection(createKType(getKClass(GitlabUser), [], false))], false));
|
3021 | } catch (_) {
|
3022 | typeInfo$result_0 = new TypeInfo_init(getKClass(List), call.JsType);
|
3023 | break typeInfo$break;
|
3024 | }
|
3025 | }
|
3026 | while (false);
|
3027 | this.state_0 = 2;
|
3028 | this.result_0 = tmp$_8.receive_jo9acv$(typeInfo$result_0, this);
|
3029 | if (this.result_0 === COROUTINE_SUSPENDED)
|
3030 | return COROUTINE_SUSPENDED;
|
3031 | continue;
|
3032 | case 2:
|
3033 | this.result_0 = Kotlin.isType(tmp$_7 = this.result_0, List) ? tmp$_7 : throwCCE();
|
3034 | this.exceptionState_0 = 6;
|
3035 | this.finallyPath_0 = [3];
|
3036 | this.state_0 = 5;
|
3037 | continue;
|
3038 | case 3:
|
3039 | this.state_0 = 8;
|
3040 | continue;
|
3041 | case 4:
|
3042 | this.finallyPath_0 = [6];
|
3043 | this.state_0 = 5;
|
3044 | continue;
|
3045 | case 5:
|
3046 | this.exceptionState_0 = 6;
|
3047 | complete(this.local$response);
|
3048 | this.state_0 = this.finallyPath_0.shift();
|
3049 | continue;
|
3050 | case 6:
|
3051 | throw this.exception_0;
|
3052 | case 7:
|
3053 | this.result_0 = Kotlin.isType(tmp$_6 = this.result_0, List) ? tmp$_6 : throwCCE();
|
3054 | this.state_0 = 8;
|
3055 | continue;
|
3056 | case 8:
|
3057 | this.state_0 = 9;
|
3058 | continue;
|
3059 | case 9:
|
3060 | this.result_0;
|
3061 | var userList = this.result_0;
|
3062 | return firstOrNull(userList);
|
3063 | default:this.state_0 = 6;
|
3064 | throw new Error('State Machine Unreachable execution');
|
3065 | }
|
3066 | } catch (e) {
|
3067 | if (this.state_0 === 6) {
|
3068 | this.exceptionState_0 = this.state_0;
|
3069 | throw e;
|
3070 | } else {
|
3071 | this.state_0 = this.exceptionState_0;
|
3072 | this.exception_0 = e;
|
3073 | }
|
3074 | }
|
3075 | while (true);
|
3076 | };
|
3077 | GitlabProvider.prototype.getUser_61zpoe$ = function (str_0, continuation_0, suspended) {
|
3078 | var instance = new Coroutine$getUser_61zpoe$_1(this, str_0, continuation_0);
|
3079 | if (suspended)
|
3080 | return instance;
|
3081 | else
|
3082 | return instance.doResume(null);
|
3083 | };
|
3084 | function Coroutine$getRepo_61zpoe$_1($this, str_0, continuation_0) {
|
3085 | CoroutineImpl.call(this, continuation_0);
|
3086 | this.exceptionState_0 = 6;
|
3087 | this.$this = $this;
|
3088 | this.local$response = void 0;
|
3089 | this.local$str = str_0;
|
3090 | }
|
3091 | Coroutine$getRepo_61zpoe$_1.$metadata$ = {
|
3092 | kind: Kotlin.Kind.CLASS,
|
3093 | simpleName: null,
|
3094 | interfaces: [CoroutineImpl]
|
3095 | };
|
3096 | Coroutine$getRepo_61zpoe$_1.prototype = Object.create(CoroutineImpl.prototype);
|
3097 | Coroutine$getRepo_61zpoe$_1.prototype.constructor = Coroutine$getRepo_61zpoe$_1;
|
3098 | Coroutine$getRepo_61zpoe$_1.prototype.doResume = function () {
|
3099 | do
|
3100 | try {
|
3101 | switch (this.state_0) {
|
3102 | case 0:
|
3103 | var $receiver_0 = this.$this.client;
|
3104 | var urlString = 'api/v4/projects/' + replace(this.local$str, '/', '%2F') + '?license=true';
|
3105 | var host_0;
|
3106 | var body_0;
|
3107 | host_0 = 'localhost';
|
3108 | body_0 = utils.EmptyContent;
|
3109 | var $receiver_1 = new HttpRequestBuilder_init();
|
3110 | url($receiver_1, 'http', host_0, 0, '/');
|
3111 | $receiver_1.method = HttpMethod.Companion.Get;
|
3112 | $receiver_1.body = body_0;
|
3113 | takeFrom($receiver_1.url, urlString);
|
3114 | get$lambda_1($receiver_1);
|
3115 | var $this_0 = new HttpStatement_init($receiver_1, $receiver_0);
|
3116 | var tmp$_4, tmp$_5, tmp$_6;
|
3117 | tmp$_4 = getKClass(GitlabRepo);
|
3118 | if (equals(tmp$_4, getKClass(HttpStatement_init))) {
|
3119 | this.result_0 = (tmp$_5 = $this_0) == null || Kotlin.isType(tmp$_5, GitlabRepo) ? tmp$_5 : throwCCE();
|
3120 | this.state_0 = 9;
|
3121 | continue;
|
3122 | } else {
|
3123 | if (equals(tmp$_4, getKClass(HttpResponse))) {
|
3124 | this.state_0 = 7;
|
3125 | this.result_0 = $this_0.execute(this);
|
3126 | if (this.result_0 === COROUTINE_SUSPENDED)
|
3127 | return COROUTINE_SUSPENDED;
|
3128 | continue;
|
3129 | } else {
|
3130 | this.state_0 = 1;
|
3131 | this.result_0 = $this_0.executeUnsafe(this);
|
3132 | if (this.result_0 === COROUTINE_SUSPENDED)
|
3133 | return COROUTINE_SUSPENDED;
|
3134 | continue;
|
3135 | }
|
3136 | }
|
3137 |
|
3138 | case 1:
|
3139 | this.local$response = this.result_0;
|
3140 | this.exceptionState_0 = 4;
|
3141 | var tmp$_7;
|
3142 | var tmp$_8 = this.local$response.call;
|
3143 | var typeInfo$result_0;
|
3144 | typeInfo$break: do {
|
3145 | try {
|
3146 | typeInfo$result_0 = new TypeInfo_init(getKClass(GitlabRepo), call.JsType, createKType(getKClass(GitlabRepo), [], true));
|
3147 | } catch (_) {
|
3148 | typeInfo$result_0 = new TypeInfo_init(getKClass(GitlabRepo), call.JsType);
|
3149 | break typeInfo$break;
|
3150 | }
|
3151 | }
|
3152 | while (false);
|
3153 | this.state_0 = 2;
|
3154 | this.result_0 = tmp$_8.receive_jo9acv$(typeInfo$result_0, this);
|
3155 | if (this.result_0 === COROUTINE_SUSPENDED)
|
3156 | return COROUTINE_SUSPENDED;
|
3157 | continue;
|
3158 | case 2:
|
3159 | this.result_0 = (tmp$_7 = this.result_0) == null || Kotlin.isType(tmp$_7, GitlabRepo) ? tmp$_7 : throwCCE();
|
3160 | this.exceptionState_0 = 6;
|
3161 | this.finallyPath_0 = [3];
|
3162 | this.state_0 = 5;
|
3163 | continue;
|
3164 | case 3:
|
3165 | this.state_0 = 8;
|
3166 | continue;
|
3167 | case 4:
|
3168 | this.finallyPath_0 = [6];
|
3169 | this.state_0 = 5;
|
3170 | continue;
|
3171 | case 5:
|
3172 | this.exceptionState_0 = 6;
|
3173 | complete(this.local$response);
|
3174 | this.state_0 = this.finallyPath_0.shift();
|
3175 | continue;
|
3176 | case 6:
|
3177 | throw this.exception_0;
|
3178 | case 7:
|
3179 | this.result_0 = (tmp$_6 = this.result_0) == null || Kotlin.isType(tmp$_6, GitlabRepo) ? tmp$_6 : throwCCE();
|
3180 | this.state_0 = 8;
|
3181 | continue;
|
3182 | case 8:
|
3183 | this.state_0 = 9;
|
3184 | continue;
|
3185 | case 9:
|
3186 | this.result_0;
|
3187 | return this.result_0;
|
3188 | default:this.state_0 = 6;
|
3189 | throw new Error('State Machine Unreachable execution');
|
3190 | }
|
3191 | } catch (e) {
|
3192 | if (this.state_0 === 6) {
|
3193 | this.exceptionState_0 = this.state_0;
|
3194 | throw e;
|
3195 | } else {
|
3196 | this.state_0 = this.exceptionState_0;
|
3197 | this.exception_0 = e;
|
3198 | }
|
3199 | }
|
3200 | while (true);
|
3201 | };
|
3202 | GitlabProvider.prototype.getRepo_61zpoe$ = function (str_0, continuation_0, suspended) {
|
3203 | var instance = new Coroutine$getRepo_61zpoe$_1(this, str_0, continuation_0);
|
3204 | if (suspended)
|
3205 | return instance;
|
3206 | else
|
3207 | return instance.doResume(null);
|
3208 | };
|
3209 | function Coroutine$getRepoContributors_61zpoe$_1($this, str_0, continuation_0) {
|
3210 | CoroutineImpl.call(this, continuation_0);
|
3211 | this.exceptionState_0 = 6;
|
3212 | this.$this = $this;
|
3213 | this.local$response = void 0;
|
3214 | this.local$str = str_0;
|
3215 | }
|
3216 | Coroutine$getRepoContributors_61zpoe$_1.$metadata$ = {
|
3217 | kind: Kotlin.Kind.CLASS,
|
3218 | simpleName: null,
|
3219 | interfaces: [CoroutineImpl]
|
3220 | };
|
3221 | Coroutine$getRepoContributors_61zpoe$_1.prototype = Object.create(CoroutineImpl.prototype);
|
3222 | Coroutine$getRepoContributors_61zpoe$_1.prototype.constructor = Coroutine$getRepoContributors_61zpoe$_1;
|
3223 | Coroutine$getRepoContributors_61zpoe$_1.prototype.doResume = function () {
|
3224 | do
|
3225 | try {
|
3226 | switch (this.state_0) {
|
3227 | case 0:
|
3228 | var $receiver_0 = this.$this.client;
|
3229 | var urlString = 'api/v4/projects/' + replace(this.local$str, '/', '%2F') + '/users';
|
3230 | var host_0;
|
3231 | var body_0;
|
3232 | host_0 = 'localhost';
|
3233 | body_0 = utils.EmptyContent;
|
3234 | var $receiver_1 = new HttpRequestBuilder_init();
|
3235 | url($receiver_1, 'http', host_0, 0, '/');
|
3236 | $receiver_1.method = HttpMethod.Companion.Get;
|
3237 | $receiver_1.body = body_0;
|
3238 | takeFrom($receiver_1.url, urlString);
|
3239 | get$lambda_1($receiver_1);
|
3240 | var $this_0 = new HttpStatement_init($receiver_1, $receiver_0);
|
3241 | var tmp$_4, tmp$_5, tmp$_6;
|
3242 | tmp$_4 = getKClass(List);
|
3243 | if (equals(tmp$_4, getKClass(HttpStatement_init))) {
|
3244 | this.result_0 = (tmp$_5 = $this_0) == null || Kotlin.isType(tmp$_5, List) ? tmp$_5 : throwCCE();
|
3245 | this.state_0 = 9;
|
3246 | continue;
|
3247 | } else {
|
3248 | if (equals(tmp$_4, getKClass(HttpResponse))) {
|
3249 | this.state_0 = 7;
|
3250 | this.result_0 = $this_0.execute(this);
|
3251 | if (this.result_0 === COROUTINE_SUSPENDED)
|
3252 | return COROUTINE_SUSPENDED;
|
3253 | continue;
|
3254 | } else {
|
3255 | this.state_0 = 1;
|
3256 | this.result_0 = $this_0.executeUnsafe(this);
|
3257 | if (this.result_0 === COROUTINE_SUSPENDED)
|
3258 | return COROUTINE_SUSPENDED;
|
3259 | continue;
|
3260 | }
|
3261 | }
|
3262 |
|
3263 | case 1:
|
3264 | this.local$response = this.result_0;
|
3265 | this.exceptionState_0 = 4;
|
3266 | var tmp$_7;
|
3267 | var tmp$_8 = this.local$response.call;
|
3268 | var typeInfo$result_0;
|
3269 | typeInfo$break: do {
|
3270 | try {
|
3271 | typeInfo$result_0 = new TypeInfo_init(getKClass(List), call.JsType, createKType(getKClass(List), [createInvariantKTypeProjection(createKType(getKClass(GitlabUser), [], false))], true));
|
3272 | } catch (_) {
|
3273 | typeInfo$result_0 = new TypeInfo_init(getKClass(List), call.JsType);
|
3274 | break typeInfo$break;
|
3275 | }
|
3276 | }
|
3277 | while (false);
|
3278 | this.state_0 = 2;
|
3279 | this.result_0 = tmp$_8.receive_jo9acv$(typeInfo$result_0, this);
|
3280 | if (this.result_0 === COROUTINE_SUSPENDED)
|
3281 | return COROUTINE_SUSPENDED;
|
3282 | continue;
|
3283 | case 2:
|
3284 | this.result_0 = (tmp$_7 = this.result_0) == null || Kotlin.isType(tmp$_7, List) ? tmp$_7 : throwCCE();
|
3285 | this.exceptionState_0 = 6;
|
3286 | this.finallyPath_0 = [3];
|
3287 | this.state_0 = 5;
|
3288 | continue;
|
3289 | case 3:
|
3290 | this.state_0 = 8;
|
3291 | continue;
|
3292 | case 4:
|
3293 | this.finallyPath_0 = [6];
|
3294 | this.state_0 = 5;
|
3295 | continue;
|
3296 | case 5:
|
3297 | this.exceptionState_0 = 6;
|
3298 | complete(this.local$response);
|
3299 | this.state_0 = this.finallyPath_0.shift();
|
3300 | continue;
|
3301 | case 6:
|
3302 | throw this.exception_0;
|
3303 | case 7:
|
3304 | this.result_0 = (tmp$_6 = this.result_0) == null || Kotlin.isType(tmp$_6, List) ? tmp$_6 : throwCCE();
|
3305 | this.state_0 = 8;
|
3306 | continue;
|
3307 | case 8:
|
3308 | this.state_0 = 9;
|
3309 | continue;
|
3310 | case 9:
|
3311 | this.result_0;
|
3312 | return this.result_0;
|
3313 | default:this.state_0 = 6;
|
3314 | throw new Error('State Machine Unreachable execution');
|
3315 | }
|
3316 | } catch (e) {
|
3317 | if (this.state_0 === 6) {
|
3318 | this.exceptionState_0 = this.state_0;
|
3319 | throw e;
|
3320 | } else {
|
3321 | this.state_0 = this.exceptionState_0;
|
3322 | this.exception_0 = e;
|
3323 | }
|
3324 | }
|
3325 | while (true);
|
3326 | };
|
3327 | GitlabProvider.prototype.getRepoContributors_61zpoe$ = function (str_0, continuation_0, suspended) {
|
3328 | var instance = new Coroutine$getRepoContributors_61zpoe$_1(this, str_0, continuation_0);
|
3329 | if (suspended)
|
3330 | return instance;
|
3331 | else
|
3332 | return instance.doResume(null);
|
3333 | };
|
3334 | function Coroutine$getLicense_61zpoe$_0($this, str_0, continuation_0) {
|
3335 | CoroutineImpl.call(this, continuation_0);
|
3336 | this.exceptionState_0 = 6;
|
3337 | this.$this = $this;
|
3338 | this.local$response = void 0;
|
3339 | this.local$str = str_0;
|
3340 | }
|
3341 | Coroutine$getLicense_61zpoe$_0.$metadata$ = {
|
3342 | kind: Kotlin.Kind.CLASS,
|
3343 | simpleName: null,
|
3344 | interfaces: [CoroutineImpl]
|
3345 | };
|
3346 | Coroutine$getLicense_61zpoe$_0.prototype = Object.create(CoroutineImpl.prototype);
|
3347 | Coroutine$getLicense_61zpoe$_0.prototype.constructor = Coroutine$getLicense_61zpoe$_0;
|
3348 | Coroutine$getLicense_61zpoe$_0.prototype.doResume = function () {
|
3349 | do
|
3350 | try {
|
3351 | switch (this.state_0) {
|
3352 | case 0:
|
3353 | var $receiver_0 = this.$this.client;
|
3354 | var urlString = 'api/v4/templates/licenses/' + this.local$str;
|
3355 | var host_0;
|
3356 | var body_0;
|
3357 | host_0 = 'localhost';
|
3358 | body_0 = utils.EmptyContent;
|
3359 | var $receiver_1 = new HttpRequestBuilder_init();
|
3360 | url($receiver_1, 'http', host_0, 0, '/');
|
3361 | $receiver_1.method = HttpMethod.Companion.Get;
|
3362 | $receiver_1.body = body_0;
|
3363 | takeFrom($receiver_1.url, urlString);
|
3364 | get$lambda_1($receiver_1);
|
3365 | var $this_0 = new HttpStatement_init($receiver_1, $receiver_0);
|
3366 | var tmp$_4, tmp$_5, tmp$_6;
|
3367 | tmp$_4 = getKClass(GitlabLicense);
|
3368 | if (equals(tmp$_4, getKClass(HttpStatement_init))) {
|
3369 | this.result_0 = (tmp$_5 = $this_0) == null || Kotlin.isType(tmp$_5, GitlabLicense) ? tmp$_5 : throwCCE();
|
3370 | this.state_0 = 9;
|
3371 | continue;
|
3372 | } else {
|
3373 | if (equals(tmp$_4, getKClass(HttpResponse))) {
|
3374 | this.state_0 = 7;
|
3375 | this.result_0 = $this_0.execute(this);
|
3376 | if (this.result_0 === COROUTINE_SUSPENDED)
|
3377 | return COROUTINE_SUSPENDED;
|
3378 | continue;
|
3379 | } else {
|
3380 | this.state_0 = 1;
|
3381 | this.result_0 = $this_0.executeUnsafe(this);
|
3382 | if (this.result_0 === COROUTINE_SUSPENDED)
|
3383 | return COROUTINE_SUSPENDED;
|
3384 | continue;
|
3385 | }
|
3386 | }
|
3387 |
|
3388 | case 1:
|
3389 | this.local$response = this.result_0;
|
3390 | this.exceptionState_0 = 4;
|
3391 | var tmp$_7;
|
3392 | var tmp$_8 = this.local$response.call;
|
3393 | var typeInfo$result_0;
|
3394 | typeInfo$break: do {
|
3395 | try {
|
3396 | typeInfo$result_0 = new TypeInfo_init(getKClass(GitlabLicense), call.JsType, createKType(getKClass(GitlabLicense), [], true));
|
3397 | } catch (_) {
|
3398 | typeInfo$result_0 = new TypeInfo_init(getKClass(GitlabLicense), call.JsType);
|
3399 | break typeInfo$break;
|
3400 | }
|
3401 | }
|
3402 | while (false);
|
3403 | this.state_0 = 2;
|
3404 | this.result_0 = tmp$_8.receive_jo9acv$(typeInfo$result_0, this);
|
3405 | if (this.result_0 === COROUTINE_SUSPENDED)
|
3406 | return COROUTINE_SUSPENDED;
|
3407 | continue;
|
3408 | case 2:
|
3409 | this.result_0 = (tmp$_7 = this.result_0) == null || Kotlin.isType(tmp$_7, GitlabLicense) ? tmp$_7 : throwCCE();
|
3410 | this.exceptionState_0 = 6;
|
3411 | this.finallyPath_0 = [3];
|
3412 | this.state_0 = 5;
|
3413 | continue;
|
3414 | case 3:
|
3415 | this.state_0 = 8;
|
3416 | continue;
|
3417 | case 4:
|
3418 | this.finallyPath_0 = [6];
|
3419 | this.state_0 = 5;
|
3420 | continue;
|
3421 | case 5:
|
3422 | this.exceptionState_0 = 6;
|
3423 | complete(this.local$response);
|
3424 | this.state_0 = this.finallyPath_0.shift();
|
3425 | continue;
|
3426 | case 6:
|
3427 | throw this.exception_0;
|
3428 | case 7:
|
3429 | this.result_0 = (tmp$_6 = this.result_0) == null || Kotlin.isType(tmp$_6, GitlabLicense) ? tmp$_6 : throwCCE();
|
3430 | this.state_0 = 8;
|
3431 | continue;
|
3432 | case 8:
|
3433 | this.state_0 = 9;
|
3434 | continue;
|
3435 | case 9:
|
3436 | this.result_0;
|
3437 | return this.result_0;
|
3438 | default:this.state_0 = 6;
|
3439 | throw new Error('State Machine Unreachable execution');
|
3440 | }
|
3441 | } catch (e) {
|
3442 | if (this.state_0 === 6) {
|
3443 | this.exceptionState_0 = this.state_0;
|
3444 | throw e;
|
3445 | } else {
|
3446 | this.state_0 = this.exceptionState_0;
|
3447 | this.exception_0 = e;
|
3448 | }
|
3449 | }
|
3450 | while (true);
|
3451 | };
|
3452 | GitlabProvider.prototype.getLicense_61zpoe$ = function (str_0, continuation_0, suspended) {
|
3453 | var instance = new Coroutine$getLicense_61zpoe$_0(this, str_0, continuation_0);
|
3454 | if (suspended)
|
3455 | return instance;
|
3456 | else
|
3457 | return instance.doResume(null);
|
3458 | };
|
3459 | function GitlabProvider$Companion() {
|
3460 | GitlabProvider$Companion_instance = this;
|
3461 | this.key_p7tpty$_0 = 'gitlab';
|
3462 | this.tokens_miskhh$_0 = HashMap_init();
|
3463 | }
|
3464 | Object.defineProperty(GitlabProvider$Companion.prototype, 'key', {
|
3465 | get: function () {
|
3466 | return this.key_p7tpty$_0;
|
3467 | }
|
3468 | });
|
3469 | Object.defineProperty(GitlabProvider$Companion.prototype, 'tokens', {
|
3470 | get: function () {
|
3471 | return this.tokens_miskhh$_0;
|
3472 | }
|
3473 | });
|
3474 | function GitlabProvider$Companion$create$lambda$lambda$lambda(closure$hostname) {
|
3475 | return function ($receiver, it) {
|
3476 | $receiver.protocol = URLProtocol.Companion.HTTPS;
|
3477 | $receiver.host = closure$hostname;
|
3478 | return Unit;
|
3479 | };
|
3480 | }
|
3481 | function GitlabProvider$Companion$create$lambda$lambda(closure$hostname, this$GitlabProvider$) {
|
3482 | return function ($receiver) {
|
3483 | var tmp$;
|
3484 | $receiver.url_6yzzjr$(GitlabProvider$Companion$create$lambda$lambda$lambda(closure$hostname));
|
3485 | if ((tmp$ = this$GitlabProvider$.tokens.get_11rb$(closure$hostname)) != null) {
|
3486 | header($receiver, 'Authorization', 'Bearer ' + tmp$);
|
3487 | }return Unit;
|
3488 | };
|
3489 | }
|
3490 | function GitlabProvider$Companion$create$lambda(closure$hostname, this$GitlabProvider$) {
|
3491 | return function ($receiver) {
|
3492 | defaultRequest($receiver, GitlabProvider$Companion$create$lambda$lambda(closure$hostname, this$GitlabProvider$));
|
3493 | return Unit;
|
3494 | };
|
3495 | }
|
3496 | GitlabProvider$Companion.prototype.create_wf0mc2$ = function (config, hostname) {
|
3497 | var client = this.ktor_1v6kay$(config, GitlabProvider$Companion$create$lambda(hostname, this));
|
3498 | return new GitlabProvider(client);
|
3499 | };
|
3500 | GitlabProvider$Companion.$metadata$ = {
|
3501 | kind: Kind_OBJECT,
|
3502 | simpleName: 'Companion',
|
3503 | interfaces: [ServiceBuilder]
|
3504 | };
|
3505 | var GitlabProvider$Companion_instance = null;
|
3506 | function GitlabProvider$Companion_getInstance() {
|
3507 | if (GitlabProvider$Companion_instance === null) {
|
3508 | new GitlabProvider$Companion();
|
3509 | }return GitlabProvider$Companion_instance;
|
3510 | }
|
3511 | GitlabProvider.$metadata$ = {
|
3512 | kind: Kind_CLASS,
|
3513 | simpleName: 'GitlabProvider',
|
3514 | interfaces: [RequestProvider]
|
3515 | };
|
3516 | function GitlabLicense() {
|
3517 | GitlabLicense$Companion_getInstance();
|
3518 | License.call(this);
|
3519 | this.id_peimpz$_0 = '';
|
3520 | this.name_m64ih5$_0 = null;
|
3521 | this.fullName = null;
|
3522 | this.description_jjllvo$_0 = null;
|
3523 | this.body_lzrqz6$_0 = null;
|
3524 | this.infoUrl_1xt6wx$_0 = null;
|
3525 | this.permissions_6q6kck$_0 = null;
|
3526 | this.conditions_x3bp18$_0 = null;
|
3527 | this.limitations_g0xcs9$_0 = null;
|
3528 | }
|
3529 | Object.defineProperty(GitlabLicense.prototype, 'id', {
|
3530 | get: function () {
|
3531 | return this.id_peimpz$_0;
|
3532 | },
|
3533 | set: function (id) {
|
3534 | this.id_peimpz$_0 = id;
|
3535 | }
|
3536 | });
|
3537 | Object.defineProperty(GitlabLicense.prototype, 'name', {
|
3538 | get: function () {
|
3539 | return this.name_m64ih5$_0;
|
3540 | }
|
3541 | });
|
3542 | Object.defineProperty(GitlabLicense.prototype, 'description', {
|
3543 | get: function () {
|
3544 | return this.description_jjllvo$_0;
|
3545 | }
|
3546 | });
|
3547 | Object.defineProperty(GitlabLicense.prototype, 'body', {
|
3548 | get: function () {
|
3549 | return this.body_lzrqz6$_0;
|
3550 | }
|
3551 | });
|
3552 | Object.defineProperty(GitlabLicense.prototype, 'infoUrl', {
|
3553 | get: function () {
|
3554 | return this.infoUrl_1xt6wx$_0;
|
3555 | }
|
3556 | });
|
3557 | Object.defineProperty(GitlabLicense.prototype, 'permissions', {
|
3558 | get: function () {
|
3559 | return this.permissions_6q6kck$_0;
|
3560 | }
|
3561 | });
|
3562 | Object.defineProperty(GitlabLicense.prototype, 'conditions', {
|
3563 | get: function () {
|
3564 | return this.conditions_x3bp18$_0;
|
3565 | }
|
3566 | });
|
3567 | Object.defineProperty(GitlabLicense.prototype, 'limitations', {
|
3568 | get: function () {
|
3569 | return this.limitations_g0xcs9$_0;
|
3570 | }
|
3571 | });
|
3572 | function GitlabLicense$Companion() {
|
3573 | GitlabLicense$Companion_instance = this;
|
3574 | }
|
3575 | GitlabLicense$Companion.prototype.serializer = function () {
|
3576 | return GitlabLicense$$serializer_getInstance();
|
3577 | };
|
3578 | GitlabLicense$Companion.$metadata$ = {
|
3579 | kind: Kind_OBJECT,
|
3580 | simpleName: 'Companion',
|
3581 | interfaces: []
|
3582 | };
|
3583 | var GitlabLicense$Companion_instance = null;
|
3584 | function GitlabLicense$Companion_getInstance() {
|
3585 | if (GitlabLicense$Companion_instance === null) {
|
3586 | new GitlabLicense$Companion();
|
3587 | }return GitlabLicense$Companion_instance;
|
3588 | }
|
3589 | function GitlabLicense$$serializer() {
|
3590 | this.descriptor_v3ek4t$_0 = new SerialClassDescImpl('me.jfenn.gitrest.provider.gitlab.model.GitlabLicense', this, 9);
|
3591 | this.descriptor.addElement_ivxn3r$('key', true);
|
3592 | this.descriptor.addElement_ivxn3r$('nickname', true);
|
3593 | this.descriptor.addElement_ivxn3r$('name', true);
|
3594 | this.descriptor.addElement_ivxn3r$('description', true);
|
3595 | this.descriptor.addElement_ivxn3r$('content', true);
|
3596 | this.descriptor.addElement_ivxn3r$('html_url', true);
|
3597 | this.descriptor.addElement_ivxn3r$('permissions', true);
|
3598 | this.descriptor.addElement_ivxn3r$('conditions', true);
|
3599 | this.descriptor.addElement_ivxn3r$('limitations', true);
|
3600 | GitlabLicense$$serializer_instance = this;
|
3601 | }
|
3602 | Object.defineProperty(GitlabLicense$$serializer.prototype, 'descriptor', {
|
3603 | get: function () {
|
3604 | return this.descriptor_v3ek4t$_0;
|
3605 | }
|
3606 | });
|
3607 | GitlabLicense$$serializer.prototype.serialize_awe97i$ = function (encoder, value) {
|
3608 | var output = encoder.beginStructure_r0sa6z$(this.descriptor, []);
|
3609 | if (!equals(value.id, '') || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 0))
|
3610 | output.encodeStringElement_bgm7zs$(this.descriptor, 0, value.id);
|
3611 | if (!equals(value.name, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 1))
|
3612 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 1, internal.StringSerializer, value.name);
|
3613 | if (!equals(value.fullName, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 2))
|
3614 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 2, internal.StringSerializer, value.fullName);
|
3615 | if (!equals(value.description, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 3))
|
3616 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 3, internal.StringSerializer, value.description);
|
3617 | if (!equals(value.body, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 4))
|
3618 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 4, internal.StringSerializer, value.body);
|
3619 | if (!equals(value.infoUrl, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 5))
|
3620 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 5, internal.StringSerializer, value.infoUrl);
|
3621 | if (!equals(value.permissions, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 6))
|
3622 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 6, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer), value.permissions);
|
3623 | if (!equals(value.conditions, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 7))
|
3624 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 7, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer), value.conditions);
|
3625 | if (!equals(value.limitations, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 8))
|
3626 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 8, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer), value.limitations);
|
3627 | output.endStructure_qatsm0$(this.descriptor);
|
3628 | };
|
3629 | GitlabLicense$$serializer.prototype.deserialize_nts5qn$ = function (decoder) {
|
3630 | var index;
|
3631 | var bitMask0 = 0;
|
3632 | var local0
|
3633 | , local1
|
3634 | , local2
|
3635 | , local3
|
3636 | , local4
|
3637 | , local5
|
3638 | , local6
|
3639 | , local7
|
3640 | , local8;
|
3641 | var input = decoder.beginStructure_r0sa6z$(this.descriptor, []);
|
3642 | loopLabel: while (true) {
|
3643 | index = input.decodeElementIndex_qatsm0$(this.descriptor);
|
3644 | switch (index) {
|
3645 | case 0:
|
3646 | local0 = input.decodeStringElement_3zr2iy$(this.descriptor, 0);
|
3647 | bitMask0 |= 1;
|
3648 | break;
|
3649 | case 1:
|
3650 | local1 = (bitMask0 & 2) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 1, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 1, internal.StringSerializer, local1);
|
3651 | bitMask0 |= 2;
|
3652 | break;
|
3653 | case 2:
|
3654 | local2 = (bitMask0 & 4) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 2, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 2, internal.StringSerializer, local2);
|
3655 | bitMask0 |= 4;
|
3656 | break;
|
3657 | case 3:
|
3658 | local3 = (bitMask0 & 8) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 3, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 3, internal.StringSerializer, local3);
|
3659 | bitMask0 |= 8;
|
3660 | break;
|
3661 | case 4:
|
3662 | local4 = (bitMask0 & 16) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 4, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 4, internal.StringSerializer, local4);
|
3663 | bitMask0 |= 16;
|
3664 | break;
|
3665 | case 5:
|
3666 | local5 = (bitMask0 & 32) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 5, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 5, internal.StringSerializer, local5);
|
3667 | bitMask0 |= 32;
|
3668 | break;
|
3669 | case 6:
|
3670 | local6 = (bitMask0 & 64) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 6, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer)) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 6, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer), local6);
|
3671 | bitMask0 |= 64;
|
3672 | break;
|
3673 | case 7:
|
3674 | local7 = (bitMask0 & 128) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 7, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer)) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 7, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer), local7);
|
3675 | bitMask0 |= 128;
|
3676 | break;
|
3677 | case 8:
|
3678 | local8 = (bitMask0 & 256) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 8, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer)) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 8, new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer), local8);
|
3679 | bitMask0 |= 256;
|
3680 | break;
|
3681 | case -1:
|
3682 | break loopLabel;
|
3683 | default:throw new UnknownFieldException(index);
|
3684 | }
|
3685 | }
|
3686 | input.endStructure_qatsm0$(this.descriptor);
|
3687 | return GitlabLicense_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, null);
|
3688 | };
|
3689 | GitlabLicense$$serializer.prototype.childSerializers = function () {
|
3690 | return [internal.StringSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer)), new NullableSerializer(new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer)), new NullableSerializer(new ReferenceArraySerializer(PrimitiveClasses$stringClass, internal.StringSerializer))];
|
3691 | };
|
3692 | GitlabLicense$$serializer.$metadata$ = {
|
3693 | kind: Kind_OBJECT,
|
3694 | simpleName: '$serializer',
|
3695 | interfaces: [GeneratedSerializer]
|
3696 | };
|
3697 | var GitlabLicense$$serializer_instance = null;
|
3698 | function GitlabLicense$$serializer_getInstance() {
|
3699 | if (GitlabLicense$$serializer_instance === null) {
|
3700 | new GitlabLicense$$serializer();
|
3701 | }return GitlabLicense$$serializer_instance;
|
3702 | }
|
3703 | function GitlabLicense_init(seen1, id, name, fullName, description, body, infoUrl, permissions, conditions, limitations, serializationConstructorMarker) {
|
3704 | var $this = serializationConstructorMarker || Object.create(GitlabLicense.prototype);
|
3705 | License.call($this);
|
3706 | if ((seen1 & 1) === 0)
|
3707 | $this.id_peimpz$_0 = '';
|
3708 | else
|
3709 | $this.id_peimpz$_0 = id;
|
3710 | if ((seen1 & 2) === 0)
|
3711 | $this.name_m64ih5$_0 = null;
|
3712 | else
|
3713 | $this.name_m64ih5$_0 = name;
|
3714 | if ((seen1 & 4) === 0)
|
3715 | $this.fullName = null;
|
3716 | else
|
3717 | $this.fullName = fullName;
|
3718 | if ((seen1 & 8) === 0)
|
3719 | $this.description_jjllvo$_0 = null;
|
3720 | else
|
3721 | $this.description_jjllvo$_0 = description;
|
3722 | if ((seen1 & 16) === 0)
|
3723 | $this.body_lzrqz6$_0 = null;
|
3724 | else
|
3725 | $this.body_lzrqz6$_0 = body;
|
3726 | if ((seen1 & 32) === 0)
|
3727 | $this.infoUrl_1xt6wx$_0 = null;
|
3728 | else
|
3729 | $this.infoUrl_1xt6wx$_0 = infoUrl;
|
3730 | if ((seen1 & 64) === 0)
|
3731 | $this.permissions_6q6kck$_0 = null;
|
3732 | else
|
3733 | $this.permissions_6q6kck$_0 = permissions;
|
3734 | if ((seen1 & 128) === 0)
|
3735 | $this.conditions_x3bp18$_0 = null;
|
3736 | else
|
3737 | $this.conditions_x3bp18$_0 = conditions;
|
3738 | if ((seen1 & 256) === 0)
|
3739 | $this.limitations_g0xcs9$_0 = null;
|
3740 | else
|
3741 | $this.limitations_g0xcs9$_0 = limitations;
|
3742 | return $this;
|
3743 | }
|
3744 | GitlabLicense.$metadata$ = {
|
3745 | kind: Kind_CLASS,
|
3746 | simpleName: 'GitlabLicense',
|
3747 | interfaces: [License]
|
3748 | };
|
3749 | function GitlabRepo() {
|
3750 | GitlabRepo$Companion_getInstance();
|
3751 | Repo.call(this);
|
3752 | this.id_xqpd18$_0 = '';
|
3753 | this.description_w1l4f5$_0 = null;
|
3754 | this.url_jgmm42$_0 = null;
|
3755 | this.gitUrlHttp_bawtse$_0 = null;
|
3756 | this.gitUrlSsh_4xwnda$_0 = null;
|
3757 | this.license_b3cw3g$_0 = null;
|
3758 | this.defaultBranch_517b0m$_0 = null;
|
3759 | }
|
3760 | Object.defineProperty(GitlabRepo.prototype, 'id', {
|
3761 | get: function () {
|
3762 | return this.id_xqpd18$_0;
|
3763 | },
|
3764 | set: function (id) {
|
3765 | this.id_xqpd18$_0 = id;
|
3766 | }
|
3767 | });
|
3768 | Object.defineProperty(GitlabRepo.prototype, 'description', {
|
3769 | get: function () {
|
3770 | return this.description_w1l4f5$_0;
|
3771 | }
|
3772 | });
|
3773 | Object.defineProperty(GitlabRepo.prototype, 'url', {
|
3774 | get: function () {
|
3775 | return this.url_jgmm42$_0;
|
3776 | }
|
3777 | });
|
3778 | Object.defineProperty(GitlabRepo.prototype, 'gitUrlHttp', {
|
3779 | get: function () {
|
3780 | return this.gitUrlHttp_bawtse$_0;
|
3781 | }
|
3782 | });
|
3783 | Object.defineProperty(GitlabRepo.prototype, 'gitUrlSsh', {
|
3784 | get: function () {
|
3785 | return this.gitUrlSsh_4xwnda$_0;
|
3786 | }
|
3787 | });
|
3788 | Object.defineProperty(GitlabRepo.prototype, 'license', {
|
3789 | get: function () {
|
3790 | return this.license_b3cw3g$_0;
|
3791 | }
|
3792 | });
|
3793 | Object.defineProperty(GitlabRepo.prototype, 'defaultBranch', {
|
3794 | get: function () {
|
3795 | return this.defaultBranch_517b0m$_0;
|
3796 | }
|
3797 | });
|
3798 | GitlabRepo.prototype.getRawFileUrl_puj7f4$$default = function (branchName, filePath) {
|
3799 | return toString(this.url) + '/raw/' + branchName + '/' + filePath;
|
3800 | };
|
3801 | function GitlabRepo$Companion() {
|
3802 | GitlabRepo$Companion_instance = this;
|
3803 | }
|
3804 | GitlabRepo$Companion.prototype.serializer = function () {
|
3805 | return GitlabRepo$$serializer_getInstance();
|
3806 | };
|
3807 | GitlabRepo$Companion.$metadata$ = {
|
3808 | kind: Kind_OBJECT,
|
3809 | simpleName: 'Companion',
|
3810 | interfaces: []
|
3811 | };
|
3812 | var GitlabRepo$Companion_instance = null;
|
3813 | function GitlabRepo$Companion_getInstance() {
|
3814 | if (GitlabRepo$Companion_instance === null) {
|
3815 | new GitlabRepo$Companion();
|
3816 | }return GitlabRepo$Companion_instance;
|
3817 | }
|
3818 | function GitlabRepo$$serializer() {
|
3819 | this.descriptor_8fa3ww$_0 = new SerialClassDescImpl('me.jfenn.gitrest.provider.gitlab.model.GitlabRepo', this, 7);
|
3820 | this.descriptor.addElement_ivxn3r$('path_with_namespace', true);
|
3821 | this.descriptor.addElement_ivxn3r$('description', true);
|
3822 | this.descriptor.addElement_ivxn3r$('web_url', true);
|
3823 | this.descriptor.addElement_ivxn3r$('http_url_to_repo', true);
|
3824 | this.descriptor.addElement_ivxn3r$('ssh_url_to_repo', true);
|
3825 | this.descriptor.addElement_ivxn3r$('license', true);
|
3826 | this.descriptor.addElement_ivxn3r$('default_branch', true);
|
3827 | GitlabRepo$$serializer_instance = this;
|
3828 | }
|
3829 | Object.defineProperty(GitlabRepo$$serializer.prototype, 'descriptor', {
|
3830 | get: function () {
|
3831 | return this.descriptor_8fa3ww$_0;
|
3832 | }
|
3833 | });
|
3834 | GitlabRepo$$serializer.prototype.serialize_awe97i$ = function (encoder, value) {
|
3835 | var output = encoder.beginStructure_r0sa6z$(this.descriptor, []);
|
3836 | if (!equals(value.id, '') || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 0))
|
3837 | output.encodeStringElement_bgm7zs$(this.descriptor, 0, value.id);
|
3838 | if (!equals(value.description, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 1))
|
3839 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 1, new OptionalStringSerializer(), value.description);
|
3840 | if (!equals(value.url, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 2))
|
3841 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 2, internal.StringSerializer, value.url);
|
3842 | if (!equals(value.gitUrlHttp, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 3))
|
3843 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 3, internal.StringSerializer, value.gitUrlHttp);
|
3844 | if (!equals(value.gitUrlSsh, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 4))
|
3845 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 4, internal.StringSerializer, value.gitUrlSsh);
|
3846 | if (!equals(value.license, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 5))
|
3847 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 5, GitlabLicense$$serializer_getInstance(), value.license);
|
3848 | if (!equals(value.defaultBranch, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 6))
|
3849 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 6, internal.StringSerializer, value.defaultBranch);
|
3850 | output.endStructure_qatsm0$(this.descriptor);
|
3851 | };
|
3852 | GitlabRepo$$serializer.prototype.deserialize_nts5qn$ = function (decoder) {
|
3853 | var index;
|
3854 | var bitMask0 = 0;
|
3855 | var local0
|
3856 | , local1
|
3857 | , local2
|
3858 | , local3
|
3859 | , local4
|
3860 | , local5
|
3861 | , local6;
|
3862 | var input = decoder.beginStructure_r0sa6z$(this.descriptor, []);
|
3863 | loopLabel: while (true) {
|
3864 | index = input.decodeElementIndex_qatsm0$(this.descriptor);
|
3865 | switch (index) {
|
3866 | case 0:
|
3867 | local0 = input.decodeStringElement_3zr2iy$(this.descriptor, 0);
|
3868 | bitMask0 |= 1;
|
3869 | break;
|
3870 | case 1:
|
3871 | local1 = (bitMask0 & 2) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 1, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 1, new OptionalStringSerializer(), local1);
|
3872 | bitMask0 |= 2;
|
3873 | break;
|
3874 | case 2:
|
3875 | local2 = (bitMask0 & 4) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 2, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 2, internal.StringSerializer, local2);
|
3876 | bitMask0 |= 4;
|
3877 | break;
|
3878 | case 3:
|
3879 | local3 = (bitMask0 & 8) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 3, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 3, internal.StringSerializer, local3);
|
3880 | bitMask0 |= 8;
|
3881 | break;
|
3882 | case 4:
|
3883 | local4 = (bitMask0 & 16) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 4, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 4, internal.StringSerializer, local4);
|
3884 | bitMask0 |= 16;
|
3885 | break;
|
3886 | case 5:
|
3887 | local5 = (bitMask0 & 32) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 5, GitlabLicense$$serializer_getInstance()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 5, GitlabLicense$$serializer_getInstance(), local5);
|
3888 | bitMask0 |= 32;
|
3889 | break;
|
3890 | case 6:
|
3891 | local6 = (bitMask0 & 64) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 6, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 6, internal.StringSerializer, local6);
|
3892 | bitMask0 |= 64;
|
3893 | break;
|
3894 | case -1:
|
3895 | break loopLabel;
|
3896 | default:throw new UnknownFieldException(index);
|
3897 | }
|
3898 | }
|
3899 | input.endStructure_qatsm0$(this.descriptor);
|
3900 | return GitlabRepo_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, null);
|
3901 | };
|
3902 | GitlabRepo$$serializer.prototype.childSerializers = function () {
|
3903 | return [internal.StringSerializer, new NullableSerializer(new OptionalStringSerializer()), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(GitlabLicense$$serializer_getInstance()), new NullableSerializer(internal.StringSerializer)];
|
3904 | };
|
3905 | GitlabRepo$$serializer.$metadata$ = {
|
3906 | kind: Kind_OBJECT,
|
3907 | simpleName: '$serializer',
|
3908 | interfaces: [GeneratedSerializer]
|
3909 | };
|
3910 | var GitlabRepo$$serializer_instance = null;
|
3911 | function GitlabRepo$$serializer_getInstance() {
|
3912 | if (GitlabRepo$$serializer_instance === null) {
|
3913 | new GitlabRepo$$serializer();
|
3914 | }return GitlabRepo$$serializer_instance;
|
3915 | }
|
3916 | function GitlabRepo_init(seen1, id, description, url, gitUrlHttp, gitUrlSsh, license, defaultBranch, serializationConstructorMarker) {
|
3917 | var $this = serializationConstructorMarker || Object.create(GitlabRepo.prototype);
|
3918 | Repo.call($this);
|
3919 | if ((seen1 & 1) === 0)
|
3920 | $this.id_xqpd18$_0 = '';
|
3921 | else
|
3922 | $this.id_xqpd18$_0 = id;
|
3923 | if ((seen1 & 2) === 0)
|
3924 | $this.description_w1l4f5$_0 = null;
|
3925 | else
|
3926 | $this.description_w1l4f5$_0 = description;
|
3927 | if ((seen1 & 4) === 0)
|
3928 | $this.url_jgmm42$_0 = null;
|
3929 | else
|
3930 | $this.url_jgmm42$_0 = url;
|
3931 | if ((seen1 & 8) === 0)
|
3932 | $this.gitUrlHttp_bawtse$_0 = null;
|
3933 | else
|
3934 | $this.gitUrlHttp_bawtse$_0 = gitUrlHttp;
|
3935 | if ((seen1 & 16) === 0)
|
3936 | $this.gitUrlSsh_4xwnda$_0 = null;
|
3937 | else
|
3938 | $this.gitUrlSsh_4xwnda$_0 = gitUrlSsh;
|
3939 | if ((seen1 & 32) === 0)
|
3940 | $this.license_b3cw3g$_0 = null;
|
3941 | else
|
3942 | $this.license_b3cw3g$_0 = license;
|
3943 | if ((seen1 & 64) === 0)
|
3944 | $this.defaultBranch_517b0m$_0 = null;
|
3945 | else
|
3946 | $this.defaultBranch_517b0m$_0 = defaultBranch;
|
3947 | return $this;
|
3948 | }
|
3949 | GitlabRepo.$metadata$ = {
|
3950 | kind: Kind_CLASS,
|
3951 | simpleName: 'GitlabRepo',
|
3952 | interfaces: [Repo]
|
3953 | };
|
3954 | function GitlabUser() {
|
3955 | GitlabUser$Companion_getInstance();
|
3956 | User.call(this);
|
3957 | this.id_ym9z3f$_0 = '';
|
3958 | this.name_q4tzh7$_0 = null;
|
3959 | this.url_7poeuj$_0 = null;
|
3960 | this.avatarUrl_uwvgdu$_0 = null;
|
3961 | this.websiteUrl_5bt1ms$_0 = null;
|
3962 | this.email_wwlk54$_0 = null;
|
3963 | this.bio_7q0q78$_0 = null;
|
3964 | }
|
3965 | Object.defineProperty(GitlabUser.prototype, 'id', {
|
3966 | get: function () {
|
3967 | return this.id_ym9z3f$_0;
|
3968 | },
|
3969 | set: function (id) {
|
3970 | this.id_ym9z3f$_0 = id;
|
3971 | }
|
3972 | });
|
3973 | Object.defineProperty(GitlabUser.prototype, 'name', {
|
3974 | get: function () {
|
3975 | return this.name_q4tzh7$_0;
|
3976 | }
|
3977 | });
|
3978 | Object.defineProperty(GitlabUser.prototype, 'url', {
|
3979 | get: function () {
|
3980 | return this.url_7poeuj$_0;
|
3981 | }
|
3982 | });
|
3983 | Object.defineProperty(GitlabUser.prototype, 'avatarUrl', {
|
3984 | get: function () {
|
3985 | return this.avatarUrl_uwvgdu$_0;
|
3986 | }
|
3987 | });
|
3988 | Object.defineProperty(GitlabUser.prototype, 'websiteUrl', {
|
3989 | get: function () {
|
3990 | return this.websiteUrl_5bt1ms$_0;
|
3991 | }
|
3992 | });
|
3993 | Object.defineProperty(GitlabUser.prototype, 'email', {
|
3994 | get: function () {
|
3995 | return this.email_wwlk54$_0;
|
3996 | }
|
3997 | });
|
3998 | Object.defineProperty(GitlabUser.prototype, 'bio', {
|
3999 | get: function () {
|
4000 | return this.bio_7q0q78$_0;
|
4001 | }
|
4002 | });
|
4003 | function GitlabUser$Companion() {
|
4004 | GitlabUser$Companion_instance = this;
|
4005 | }
|
4006 | GitlabUser$Companion.prototype.serializer = function () {
|
4007 | return GitlabUser$$serializer_getInstance();
|
4008 | };
|
4009 | GitlabUser$Companion.$metadata$ = {
|
4010 | kind: Kind_OBJECT,
|
4011 | simpleName: 'Companion',
|
4012 | interfaces: []
|
4013 | };
|
4014 | var GitlabUser$Companion_instance = null;
|
4015 | function GitlabUser$Companion_getInstance() {
|
4016 | if (GitlabUser$Companion_instance === null) {
|
4017 | new GitlabUser$Companion();
|
4018 | }return GitlabUser$Companion_instance;
|
4019 | }
|
4020 | function GitlabUser$$serializer() {
|
4021 | this.descriptor_lulfk9$_0 = new SerialClassDescImpl('me.jfenn.gitrest.provider.gitlab.model.GitlabUser', this, 7);
|
4022 | this.descriptor.addElement_ivxn3r$('username', true);
|
4023 | this.descriptor.addElement_ivxn3r$('name', true);
|
4024 | this.descriptor.addElement_ivxn3r$('web_url', true);
|
4025 | this.descriptor.addElement_ivxn3r$('avatar_url', true);
|
4026 | this.descriptor.addElement_ivxn3r$('website_url', true);
|
4027 | this.descriptor.addElement_ivxn3r$('public_email', true);
|
4028 | this.descriptor.addElement_ivxn3r$('bio', true);
|
4029 | GitlabUser$$serializer_instance = this;
|
4030 | }
|
4031 | Object.defineProperty(GitlabUser$$serializer.prototype, 'descriptor', {
|
4032 | get: function () {
|
4033 | return this.descriptor_lulfk9$_0;
|
4034 | }
|
4035 | });
|
4036 | GitlabUser$$serializer.prototype.serialize_awe97i$ = function (encoder, value) {
|
4037 | var output = encoder.beginStructure_r0sa6z$(this.descriptor, []);
|
4038 | if (!equals(value.id, '') || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 0))
|
4039 | output.encodeStringElement_bgm7zs$(this.descriptor, 0, value.id);
|
4040 | if (!equals(value.name, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 1))
|
4041 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 1, new OptionalStringSerializer(), value.name);
|
4042 | if (!equals(value.url, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 2))
|
4043 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 2, internal.StringSerializer, value.url);
|
4044 | if (!equals(value.avatarUrl, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 3))
|
4045 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 3, internal.StringSerializer, value.avatarUrl);
|
4046 | if (!equals(value.websiteUrl, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 4))
|
4047 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 4, new OptionalStringSerializer(), value.websiteUrl);
|
4048 | if (!equals(value.email, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 5))
|
4049 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 5, new OptionalStringSerializer(), value.email);
|
4050 | if (!equals(value.bio, null) || output.shouldEncodeElementDefault_3zr2iy$(this.descriptor, 6))
|
4051 | output.encodeNullableSerializableElement_orpvvi$(this.descriptor, 6, new OptionalStringSerializer(), value.bio);
|
4052 | output.endStructure_qatsm0$(this.descriptor);
|
4053 | };
|
4054 | GitlabUser$$serializer.prototype.deserialize_nts5qn$ = function (decoder) {
|
4055 | var index;
|
4056 | var bitMask0 = 0;
|
4057 | var local0
|
4058 | , local1
|
4059 | , local2
|
4060 | , local3
|
4061 | , local4
|
4062 | , local5
|
4063 | , local6;
|
4064 | var input = decoder.beginStructure_r0sa6z$(this.descriptor, []);
|
4065 | loopLabel: while (true) {
|
4066 | index = input.decodeElementIndex_qatsm0$(this.descriptor);
|
4067 | switch (index) {
|
4068 | case 0:
|
4069 | local0 = input.decodeStringElement_3zr2iy$(this.descriptor, 0);
|
4070 | bitMask0 |= 1;
|
4071 | break;
|
4072 | case 1:
|
4073 | local1 = (bitMask0 & 2) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 1, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 1, new OptionalStringSerializer(), local1);
|
4074 | bitMask0 |= 2;
|
4075 | break;
|
4076 | case 2:
|
4077 | local2 = (bitMask0 & 4) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 2, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 2, internal.StringSerializer, local2);
|
4078 | bitMask0 |= 4;
|
4079 | break;
|
4080 | case 3:
|
4081 | local3 = (bitMask0 & 8) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 3, internal.StringSerializer) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 3, internal.StringSerializer, local3);
|
4082 | bitMask0 |= 8;
|
4083 | break;
|
4084 | case 4:
|
4085 | local4 = (bitMask0 & 16) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 4, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 4, new OptionalStringSerializer(), local4);
|
4086 | bitMask0 |= 16;
|
4087 | break;
|
4088 | case 5:
|
4089 | local5 = (bitMask0 & 32) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 5, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 5, new OptionalStringSerializer(), local5);
|
4090 | bitMask0 |= 32;
|
4091 | break;
|
4092 | case 6:
|
4093 | local6 = (bitMask0 & 64) === 0 ? input.decodeNullableSerializableElement_cwlm4k$(this.descriptor, 6, new OptionalStringSerializer()) : input.updateNullableSerializableElement_u33s02$(this.descriptor, 6, new OptionalStringSerializer(), local6);
|
4094 | bitMask0 |= 64;
|
4095 | break;
|
4096 | case -1:
|
4097 | break loopLabel;
|
4098 | default:throw new UnknownFieldException(index);
|
4099 | }
|
4100 | }
|
4101 | input.endStructure_qatsm0$(this.descriptor);
|
4102 | return GitlabUser_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, null);
|
4103 | };
|
4104 | GitlabUser$$serializer.prototype.childSerializers = function () {
|
4105 | return [internal.StringSerializer, new NullableSerializer(new OptionalStringSerializer()), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(new OptionalStringSerializer()), new NullableSerializer(new OptionalStringSerializer()), new NullableSerializer(new OptionalStringSerializer())];
|
4106 | };
|
4107 | GitlabUser$$serializer.$metadata$ = {
|
4108 | kind: Kind_OBJECT,
|
4109 | simpleName: '$serializer',
|
4110 | interfaces: [GeneratedSerializer]
|
4111 | };
|
4112 | var GitlabUser$$serializer_instance = null;
|
4113 | function GitlabUser$$serializer_getInstance() {
|
4114 | if (GitlabUser$$serializer_instance === null) {
|
4115 | new GitlabUser$$serializer();
|
4116 | }return GitlabUser$$serializer_instance;
|
4117 | }
|
4118 | function GitlabUser_init(seen1, id, name, url, avatarUrl, websiteUrl, email, bio, serializationConstructorMarker) {
|
4119 | var $this = serializationConstructorMarker || Object.create(GitlabUser.prototype);
|
4120 | User.call($this);
|
4121 | if ((seen1 & 1) === 0)
|
4122 | $this.id_ym9z3f$_0 = '';
|
4123 | else
|
4124 | $this.id_ym9z3f$_0 = id;
|
4125 | if ((seen1 & 2) === 0)
|
4126 | $this.name_q4tzh7$_0 = null;
|
4127 | else
|
4128 | $this.name_q4tzh7$_0 = name;
|
4129 | if ((seen1 & 4) === 0)
|
4130 | $this.url_7poeuj$_0 = null;
|
4131 | else
|
4132 | $this.url_7poeuj$_0 = url;
|
4133 | if ((seen1 & 8) === 0)
|
4134 | $this.avatarUrl_uwvgdu$_0 = null;
|
4135 | else
|
4136 | $this.avatarUrl_uwvgdu$_0 = avatarUrl;
|
4137 | if ((seen1 & 16) === 0)
|
4138 | $this.websiteUrl_5bt1ms$_0 = null;
|
4139 | else
|
4140 | $this.websiteUrl_5bt1ms$_0 = websiteUrl;
|
4141 | if ((seen1 & 32) === 0)
|
4142 | $this.email_wwlk54$_0 = null;
|
4143 | else
|
4144 | $this.email_wwlk54$_0 = email;
|
4145 | if ((seen1 & 64) === 0)
|
4146 | $this.bio_7q0q78$_0 = null;
|
4147 | else
|
4148 | $this.bio_7q0q78$_0 = bio;
|
4149 | return $this;
|
4150 | }
|
4151 | GitlabUser.$metadata$ = {
|
4152 | kind: Kind_CLASS,
|
4153 | simpleName: 'GitlabUser',
|
4154 | interfaces: [User]
|
4155 | };
|
4156 | function Cache() {
|
4157 | }
|
4158 | Cache.$metadata$ = {
|
4159 | kind: Kind_INTERFACE,
|
4160 | simpleName: 'Cache',
|
4161 | interfaces: []
|
4162 | };
|
4163 | function NoCache() {
|
4164 | NoCache_instance = this;
|
4165 | }
|
4166 | NoCache.prototype.set_bm4g0d$ = function (key, value, continuation) {
|
4167 | };
|
4168 | NoCache.prototype.get_ytbaoo$ = function (id, continuation) {
|
4169 | return null;
|
4170 | };
|
4171 | NoCache.$metadata$ = {
|
4172 | kind: Kind_OBJECT,
|
4173 | simpleName: 'NoCache',
|
4174 | interfaces: [Cache]
|
4175 | };
|
4176 | var NoCache_instance = null;
|
4177 | function NoCache_getInstance() {
|
4178 | if (NoCache_instance === null) {
|
4179 | new NoCache();
|
4180 | }return NoCache_instance;
|
4181 | }
|
4182 | var DEFAULT_PROVIDERS;
|
4183 | function OptionalStringSerializer() {
|
4184 | this.descriptor_llni3b$_0 = PrimitiveDescriptor('kotlin.OptionalString', PrimitiveKind.STRING);
|
4185 | this.valueSerializer_7gml4p$_0 = serializer(kotlin_js_internal_StringCompanionObject);
|
4186 | }
|
4187 | Object.defineProperty(OptionalStringSerializer.prototype, 'descriptor', {
|
4188 | get: function () {
|
4189 | return this.descriptor_llni3b$_0;
|
4190 | }
|
4191 | });
|
4192 | OptionalStringSerializer.prototype.deserialize_nts5qn$ = function (decoder) {
|
4193 | var str = this.valueSerializer_7gml4p$_0.deserialize_nts5qn$(decoder);
|
4194 | return !isBlank(str) ? str : null;
|
4195 | };
|
4196 | OptionalStringSerializer.prototype.serialize_awe97i$ = function (encoder, value) {
|
4197 | if (value != null) {
|
4198 | this.valueSerializer_7gml4p$_0.serialize_awe97i$(encoder, value);
|
4199 | }};
|
4200 | OptionalStringSerializer.$metadata$ = {
|
4201 | kind: Kind_CLASS,
|
4202 | simpleName: 'OptionalStringSerializer',
|
4203 | interfaces: [KSerializer]
|
4204 | };
|
4205 | function Client(config) {
|
4206 | this.client = gitrest(Client$client$lambda(config));
|
4207 | }
|
4208 | function Coroutine$Client$getUser$lambda(this$Client_0, closure$str_0, $receiver_0, controller, continuation_0) {
|
4209 | CoroutineImpl.call(this, continuation_0);
|
4210 | this.$controller = controller;
|
4211 | this.exceptionState_0 = 1;
|
4212 | this.local$this$Client = this$Client_0;
|
4213 | this.local$closure$str = closure$str_0;
|
4214 | }
|
4215 | Coroutine$Client$getUser$lambda.$metadata$ = {
|
4216 | kind: Kotlin.Kind.CLASS,
|
4217 | simpleName: null,
|
4218 | interfaces: [CoroutineImpl]
|
4219 | };
|
4220 | Coroutine$Client$getUser$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
4221 | Coroutine$Client$getUser$lambda.prototype.constructor = Coroutine$Client$getUser$lambda;
|
4222 | Coroutine$Client$getUser$lambda.prototype.doResume = function () {
|
4223 | do
|
4224 | try {
|
4225 | switch (this.state_0) {
|
4226 | case 0:
|
4227 | var tmp$;
|
4228 | this.state_0 = 2;
|
4229 | this.result_0 = this.local$this$Client.client.getUser_61zpoe$(this.local$closure$str, this);
|
4230 | if (this.result_0 === COROUTINE_SUSPENDED)
|
4231 | return COROUTINE_SUSPENDED;
|
4232 | continue;
|
4233 | case 1:
|
4234 | throw this.exception_0;
|
4235 | case 2:
|
4236 | return (tmp$ = this.result_0) != null ? new User_0(tmp$) : null;
|
4237 | default:this.state_0 = 1;
|
4238 | throw new Error('State Machine Unreachable execution');
|
4239 | }
|
4240 | } catch (e) {
|
4241 | if (this.state_0 === 1) {
|
4242 | this.exceptionState_0 = this.state_0;
|
4243 | throw e;
|
4244 | } else {
|
4245 | this.state_0 = this.exceptionState_0;
|
4246 | this.exception_0 = e;
|
4247 | }
|
4248 | }
|
4249 | while (true);
|
4250 | };
|
4251 | function Client$getUser$lambda(this$Client_0, closure$str_0) {
|
4252 | return function ($receiver_0, continuation_0, suspended) {
|
4253 | var instance = new Coroutine$Client$getUser$lambda(this$Client_0, closure$str_0, $receiver_0, this, continuation_0);
|
4254 | if (suspended)
|
4255 | return instance;
|
4256 | else
|
4257 | return instance.doResume(null);
|
4258 | };
|
4259 | }
|
4260 | Client.prototype.getUser = function (str) {
|
4261 | return promise(coroutines.GlobalScope, void 0, void 0, Client$getUser$lambda(this, str));
|
4262 | };
|
4263 | function Coroutine$Client$getRepo$lambda(this$Client_0, closure$str_0, $receiver_0, controller, continuation_0) {
|
4264 | CoroutineImpl.call(this, continuation_0);
|
4265 | this.$controller = controller;
|
4266 | this.exceptionState_0 = 1;
|
4267 | this.local$this$Client = this$Client_0;
|
4268 | this.local$closure$str = closure$str_0;
|
4269 | }
|
4270 | Coroutine$Client$getRepo$lambda.$metadata$ = {
|
4271 | kind: Kotlin.Kind.CLASS,
|
4272 | simpleName: null,
|
4273 | interfaces: [CoroutineImpl]
|
4274 | };
|
4275 | Coroutine$Client$getRepo$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
4276 | Coroutine$Client$getRepo$lambda.prototype.constructor = Coroutine$Client$getRepo$lambda;
|
4277 | Coroutine$Client$getRepo$lambda.prototype.doResume = function () {
|
4278 | do
|
4279 | try {
|
4280 | switch (this.state_0) {
|
4281 | case 0:
|
4282 | var tmp$;
|
4283 | this.state_0 = 2;
|
4284 | this.result_0 = this.local$this$Client.client.getRepo_61zpoe$(this.local$closure$str, this);
|
4285 | if (this.result_0 === COROUTINE_SUSPENDED)
|
4286 | return COROUTINE_SUSPENDED;
|
4287 | continue;
|
4288 | case 1:
|
4289 | throw this.exception_0;
|
4290 | case 2:
|
4291 | return (tmp$ = this.result_0) != null ? new Repo_0(tmp$) : null;
|
4292 | default:this.state_0 = 1;
|
4293 | throw new Error('State Machine Unreachable execution');
|
4294 | }
|
4295 | } catch (e) {
|
4296 | if (this.state_0 === 1) {
|
4297 | this.exceptionState_0 = this.state_0;
|
4298 | throw e;
|
4299 | } else {
|
4300 | this.state_0 = this.exceptionState_0;
|
4301 | this.exception_0 = e;
|
4302 | }
|
4303 | }
|
4304 | while (true);
|
4305 | };
|
4306 | function Client$getRepo$lambda(this$Client_0, closure$str_0) {
|
4307 | return function ($receiver_0, continuation_0, suspended) {
|
4308 | var instance = new Coroutine$Client$getRepo$lambda(this$Client_0, closure$str_0, $receiver_0, this, continuation_0);
|
4309 | if (suspended)
|
4310 | return instance;
|
4311 | else
|
4312 | return instance.doResume(null);
|
4313 | };
|
4314 | }
|
4315 | Client.prototype.getRepo = function (str) {
|
4316 | return promise(coroutines.GlobalScope, void 0, void 0, Client$getRepo$lambda(this, str));
|
4317 | };
|
4318 | function Coroutine$Client$getRepoContributors$lambda(this$Client_0, closure$str_0, $receiver_0, controller, continuation_0) {
|
4319 | CoroutineImpl.call(this, continuation_0);
|
4320 | this.$controller = controller;
|
4321 | this.exceptionState_0 = 1;
|
4322 | this.local$this$Client = this$Client_0;
|
4323 | this.local$closure$str = closure$str_0;
|
4324 | }
|
4325 | Coroutine$Client$getRepoContributors$lambda.$metadata$ = {
|
4326 | kind: Kotlin.Kind.CLASS,
|
4327 | simpleName: null,
|
4328 | interfaces: [CoroutineImpl]
|
4329 | };
|
4330 | Coroutine$Client$getRepoContributors$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
4331 | Coroutine$Client$getRepoContributors$lambda.prototype.constructor = Coroutine$Client$getRepoContributors$lambda;
|
4332 | Coroutine$Client$getRepoContributors$lambda.prototype.doResume = function () {
|
4333 | do
|
4334 | try {
|
4335 | switch (this.state_0) {
|
4336 | case 0:
|
4337 | var tmp$, tmp$_0;
|
4338 | this.state_0 = 2;
|
4339 | this.result_0 = this.local$this$Client.client.getRepoContributors_61zpoe$(this.local$closure$str, this);
|
4340 | if (this.result_0 === COROUTINE_SUSPENDED)
|
4341 | return COROUTINE_SUSPENDED;
|
4342 | continue;
|
4343 | case 1:
|
4344 | throw this.exception_0;
|
4345 | case 2:
|
4346 | var tmp$_1;
|
4347 | if ((tmp$ = this.result_0) != null) {
|
4348 | var destination = ArrayList_init(collectionSizeOrDefault(tmp$, 10));
|
4349 | var tmp$_2;
|
4350 | tmp$_2 = tmp$.iterator();
|
4351 | while (tmp$_2.hasNext()) {
|
4352 | var item = tmp$_2.next();
|
4353 | destination.add_11rb$(new User_0(item));
|
4354 | }
|
4355 | tmp$_1 = destination;
|
4356 | } else
|
4357 | tmp$_1 = null;
|
4358 | return (tmp$_0 = tmp$_1) != null ? copyToArray(tmp$_0) : null;
|
4359 | default:this.state_0 = 1;
|
4360 | throw new Error('State Machine Unreachable execution');
|
4361 | }
|
4362 | } catch (e) {
|
4363 | if (this.state_0 === 1) {
|
4364 | this.exceptionState_0 = this.state_0;
|
4365 | throw e;
|
4366 | } else {
|
4367 | this.state_0 = this.exceptionState_0;
|
4368 | this.exception_0 = e;
|
4369 | }
|
4370 | }
|
4371 | while (true);
|
4372 | };
|
4373 | function Client$getRepoContributors$lambda(this$Client_0, closure$str_0) {
|
4374 | return function ($receiver_0, continuation_0, suspended) {
|
4375 | var instance = new Coroutine$Client$getRepoContributors$lambda(this$Client_0, closure$str_0, $receiver_0, this, continuation_0);
|
4376 | if (suspended)
|
4377 | return instance;
|
4378 | else
|
4379 | return instance.doResume(null);
|
4380 | };
|
4381 | }
|
4382 | Client.prototype.getRepoContributors = function (str) {
|
4383 | return promise(coroutines.GlobalScope, void 0, void 0, Client$getRepoContributors$lambda(this, str));
|
4384 | };
|
4385 | function Coroutine$Client$getLicense$lambda(this$Client_0, closure$str_0, $receiver_0, controller, continuation_0) {
|
4386 | CoroutineImpl.call(this, continuation_0);
|
4387 | this.$controller = controller;
|
4388 | this.exceptionState_0 = 1;
|
4389 | this.local$this$Client = this$Client_0;
|
4390 | this.local$closure$str = closure$str_0;
|
4391 | }
|
4392 | Coroutine$Client$getLicense$lambda.$metadata$ = {
|
4393 | kind: Kotlin.Kind.CLASS,
|
4394 | simpleName: null,
|
4395 | interfaces: [CoroutineImpl]
|
4396 | };
|
4397 | Coroutine$Client$getLicense$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
4398 | Coroutine$Client$getLicense$lambda.prototype.constructor = Coroutine$Client$getLicense$lambda;
|
4399 | Coroutine$Client$getLicense$lambda.prototype.doResume = function () {
|
4400 | do
|
4401 | try {
|
4402 | switch (this.state_0) {
|
4403 | case 0:
|
4404 | var tmp$;
|
4405 | this.state_0 = 2;
|
4406 | this.result_0 = this.local$this$Client.client.getLicense_61zpoe$(this.local$closure$str, this);
|
4407 | if (this.result_0 === COROUTINE_SUSPENDED)
|
4408 | return COROUTINE_SUSPENDED;
|
4409 | continue;
|
4410 | case 1:
|
4411 | throw this.exception_0;
|
4412 | case 2:
|
4413 | return (tmp$ = this.result_0) != null ? new License_0(tmp$) : null;
|
4414 | default:this.state_0 = 1;
|
4415 | throw new Error('State Machine Unreachable execution');
|
4416 | }
|
4417 | } catch (e) {
|
4418 | if (this.state_0 === 1) {
|
4419 | this.exceptionState_0 = this.state_0;
|
4420 | throw e;
|
4421 | } else {
|
4422 | this.state_0 = this.exceptionState_0;
|
4423 | this.exception_0 = e;
|
4424 | }
|
4425 | }
|
4426 | while (true);
|
4427 | };
|
4428 | function Client$getLicense$lambda(this$Client_0, closure$str_0) {
|
4429 | return function ($receiver_0, continuation_0, suspended) {
|
4430 | var instance = new Coroutine$Client$getLicense$lambda(this$Client_0, closure$str_0, $receiver_0, this, continuation_0);
|
4431 | if (suspended)
|
4432 | return instance;
|
4433 | else
|
4434 | return instance.doResume(null);
|
4435 | };
|
4436 | }
|
4437 | Client.prototype.getLicense = function (str) {
|
4438 | return promise(coroutines.GlobalScope, void 0, void 0, Client$getLicense$lambda(this, str));
|
4439 | };
|
4440 | function Client$client$lambda(closure$config) {
|
4441 | return function ($receiver) {
|
4442 | var $receiver_0 = $receiver.providers;
|
4443 | var tmp$;
|
4444 | for (tmp$ = 0; tmp$ !== $receiver_0.length; ++tmp$) {
|
4445 | var element = $receiver_0[tmp$];
|
4446 | var closure$config_0 = closure$config;
|
4447 | var tmp$_0;
|
4448 | if ((closure$config_0 != null ? closure$config_0.tokens : null) != null) {
|
4449 | var $receiver_1 = $receiver.providers;
|
4450 | var tmp$_1;
|
4451 | for (tmp$_1 = 0; tmp$_1 !== $receiver_1.length; ++tmp$_1) {
|
4452 | var element_0 = $receiver_1[tmp$_1];
|
4453 | element_0.tokens.putAll_a2k3zr$(closure$config_0.tokens);
|
4454 | }
|
4455 | }if (((tmp$_0 = closure$config_0 != null ? closure$config_0.cache : null) != null ? tmp$_0.type : null) == 'disk') {
|
4456 | $receiver.cache = new DiskCache($receiver);
|
4457 | }}
|
4458 | return Unit;
|
4459 | };
|
4460 | }
|
4461 | Client.$metadata$ = {
|
4462 | kind: Kind_CLASS,
|
4463 | simpleName: 'Client',
|
4464 | interfaces: []
|
4465 | };
|
4466 | function License_0(license) {
|
4467 | this.id = license.id;
|
4468 | this.hostname = license.hostname;
|
4469 | this.provider = license.provider;
|
4470 | this.name = license.name;
|
4471 | this.description = license.description;
|
4472 | this.body = license.body;
|
4473 | this.infoUrl = license.infoUrl;
|
4474 | this.permissions = license.permissions;
|
4475 | this.conditions = license.conditions;
|
4476 | this.limitations = license.limitations;
|
4477 | }
|
4478 | License_0.$metadata$ = {
|
4479 | kind: Kind_CLASS,
|
4480 | simpleName: 'License',
|
4481 | interfaces: []
|
4482 | };
|
4483 | function Repo_0(repo) {
|
4484 | this.repo_0 = repo;
|
4485 | this.id = this.repo_0.id;
|
4486 | this.hostname = this.repo_0.hostname;
|
4487 | this.provider = this.repo_0.provider;
|
4488 | this.description = this.repo_0.description;
|
4489 | this.url = this.repo_0.url;
|
4490 | this.websiteUrl = this.repo_0.websiteUrl;
|
4491 | this.gitUrlHttp = this.repo_0.gitUrlHttp;
|
4492 | this.gitUrlSsh = this.repo_0.gitUrlSsh;
|
4493 | var tmp$;
|
4494 | this.license = (tmp$ = this.repo_0.license) != null ? new License_0(tmp$) : null;
|
4495 | this.defaultBranch = this.repo_0.defaultBranch;
|
4496 | }
|
4497 | Repo_0.prototype.getRawFileUrl = function (branchName, filePath) {
|
4498 | return this.repo_0.getRawFileUrl_puj7f4$(branchName, filePath);
|
4499 | };
|
4500 | Repo_0.$metadata$ = {
|
4501 | kind: Kind_CLASS,
|
4502 | simpleName: 'Repo',
|
4503 | interfaces: []
|
4504 | };
|
4505 | function User_0(user) {
|
4506 | this.id = user.id;
|
4507 | this.hostname = user.hostname;
|
4508 | this.provider = user.provider;
|
4509 | this.name = user.name;
|
4510 | this.url = user.url;
|
4511 | this.avatarUrl = user.avatarUrl;
|
4512 | this.websiteUrl = user.websiteUrl;
|
4513 | this.email = user.email;
|
4514 | this.bio = user.bio;
|
4515 | }
|
4516 | User_0.$metadata$ = {
|
4517 | kind: Kind_CLASS,
|
4518 | simpleName: 'User',
|
4519 | interfaces: []
|
4520 | };
|
4521 | function PlatformConfig() {
|
4522 | }
|
4523 | PlatformConfig.$metadata$ = {
|
4524 | kind: Kind_CLASS,
|
4525 | simpleName: 'PlatformConfig',
|
4526 | interfaces: []
|
4527 | };
|
4528 | function DiskCache(config, cacheDuration) {
|
4529 | if (cacheDuration === void 0)
|
4530 | cacheDuration = L864000000;
|
4531 | this.config = config;
|
4532 | this.cacheDuration = cacheDuration;
|
4533 | this.persist_0 = null;
|
4534 | this.promisePersist_0 = null;
|
4535 | }
|
4536 | function Coroutine$getPersist_0($this, continuation_0) {
|
4537 | CoroutineImpl.call(this, continuation_0);
|
4538 | this.exceptionState_0 = 1;
|
4539 | this.$this = $this;
|
4540 | }
|
4541 | Coroutine$getPersist_0.$metadata$ = {
|
4542 | kind: Kotlin.Kind.CLASS,
|
4543 | simpleName: null,
|
4544 | interfaces: [CoroutineImpl]
|
4545 | };
|
4546 | Coroutine$getPersist_0.prototype = Object.create(CoroutineImpl.prototype);
|
4547 | Coroutine$getPersist_0.prototype.constructor = Coroutine$getPersist_0;
|
4548 | Coroutine$getPersist_0.prototype.doResume = function () {
|
4549 | do
|
4550 | try {
|
4551 | switch (this.state_0) {
|
4552 | case 0:
|
4553 | var tmp$, tmp$_0;
|
4554 | if (this.$this.persist_0 == null) {
|
4555 | this.$this.persist_0 = require('node-persist');
|
4556 | this.$this.promisePersist_0 = Kotlin.isType(tmp$ = this.$this.persist_0.init(), Promise) ? tmp$ : throwCCE();
|
4557 | }
|
4558 | if ((tmp$_0 = this.$this.promisePersist_0) != null) {
|
4559 | this.state_0 = 2;
|
4560 | this.result_0 = await_0(tmp$_0, this);
|
4561 | if (this.result_0 === COROUTINE_SUSPENDED)
|
4562 | return COROUTINE_SUSPENDED;
|
4563 | continue;
|
4564 | } else {
|
4565 | this.result_0 = null;
|
4566 | this.state_0 = 3;
|
4567 | continue;
|
4568 | }
|
4569 |
|
4570 | case 1:
|
4571 | throw this.exception_0;
|
4572 | case 2:
|
4573 | this.state_0 = 3;
|
4574 | continue;
|
4575 | case 3:
|
4576 | return this.$this.persist_0;
|
4577 | default:this.state_0 = 1;
|
4578 | throw new Error('State Machine Unreachable execution');
|
4579 | }
|
4580 | } catch (e) {
|
4581 | if (this.state_0 === 1) {
|
4582 | this.exceptionState_0 = this.state_0;
|
4583 | throw e;
|
4584 | } else {
|
4585 | this.state_0 = this.exceptionState_0;
|
4586 | this.exception_0 = e;
|
4587 | }
|
4588 | }
|
4589 | while (true);
|
4590 | };
|
4591 | DiskCache.prototype.getPersist_0 = function (continuation_0, suspended) {
|
4592 | var instance = new Coroutine$getPersist_0(this, continuation_0);
|
4593 | if (suspended)
|
4594 | return instance;
|
4595 | else
|
4596 | return instance.doResume(null);
|
4597 | };
|
4598 | DiskCache.prototype.getVersion_0 = function () {
|
4599 | var keys = Object.keys;
|
4600 | return keys(new Repo())[0];
|
4601 | };
|
4602 | function Coroutine$set_bm4g0d$($this, key_0, value_0, continuation_0) {
|
4603 | CoroutineImpl.call(this, continuation_0);
|
4604 | this.exceptionState_0 = 1;
|
4605 | this.$this = $this;
|
4606 | this.local$string = void 0;
|
4607 | this.local$key = key_0;
|
4608 | this.local$value = value_0;
|
4609 | }
|
4610 | Coroutine$set_bm4g0d$.$metadata$ = {
|
4611 | kind: Kotlin.Kind.CLASS,
|
4612 | simpleName: null,
|
4613 | interfaces: [CoroutineImpl]
|
4614 | };
|
4615 | Coroutine$set_bm4g0d$.prototype = Object.create(CoroutineImpl.prototype);
|
4616 | Coroutine$set_bm4g0d$.prototype.constructor = Coroutine$set_bm4g0d$;
|
4617 | Coroutine$set_bm4g0d$.prototype.doResume = function () {
|
4618 | do
|
4619 | try {
|
4620 | switch (this.state_0) {
|
4621 | case 0:
|
4622 | var tmp$;
|
4623 | this.local$string = this.$this.getVersion_0() + '#' + toString(Date.now()) + '#' + JSON.stringify(this.local$value);
|
4624 | this.state_0 = 2;
|
4625 | this.result_0 = this.$this.getPersist_0(this);
|
4626 | if (this.result_0 === COROUTINE_SUSPENDED)
|
4627 | return COROUTINE_SUSPENDED;
|
4628 | continue;
|
4629 | case 1:
|
4630 | throw this.exception_0;
|
4631 | case 2:
|
4632 | this.state_0 = 3;
|
4633 | this.result_0 = await_0(Kotlin.isType(tmp$ = this.result_0.setItem(this.local$key, this.local$string), Promise) ? tmp$ : throwCCE(), this);
|
4634 | if (this.result_0 === COROUTINE_SUSPENDED)
|
4635 | return COROUTINE_SUSPENDED;
|
4636 | continue;
|
4637 | case 3:
|
4638 | return;
|
4639 | default:this.state_0 = 1;
|
4640 | throw new Error('State Machine Unreachable execution');
|
4641 | }
|
4642 | } catch (e) {
|
4643 | if (this.state_0 === 1) {
|
4644 | this.exceptionState_0 = this.state_0;
|
4645 | throw e;
|
4646 | } else {
|
4647 | this.state_0 = this.exceptionState_0;
|
4648 | this.exception_0 = e;
|
4649 | }
|
4650 | }
|
4651 | while (true);
|
4652 | };
|
4653 | DiskCache.prototype.set_bm4g0d$ = function (key_0, value_0, continuation_0, suspended) {
|
4654 | var instance = new Coroutine$set_bm4g0d$(this, key_0, value_0, continuation_0);
|
4655 | if (suspended)
|
4656 | return instance;
|
4657 | else
|
4658 | return instance.doResume(null);
|
4659 | };
|
4660 | function Coroutine$get_ytbaoo$($this, key_0, continuation_0) {
|
4661 | CoroutineImpl.call(this, continuation_0);
|
4662 | this.exceptionState_0 = 1;
|
4663 | this.$this = $this;
|
4664 | this.local$tmp$_0 = void 0;
|
4665 | this.local$stringContents = void 0;
|
4666 | this.local$lastModified = void 0;
|
4667 | this.local$json = void 0;
|
4668 | this.local$key = key_0;
|
4669 | }
|
4670 | Coroutine$get_ytbaoo$.$metadata$ = {
|
4671 | kind: Kotlin.Kind.CLASS,
|
4672 | simpleName: null,
|
4673 | interfaces: [CoroutineImpl]
|
4674 | };
|
4675 | Coroutine$get_ytbaoo$.prototype = Object.create(CoroutineImpl.prototype);
|
4676 | Coroutine$get_ytbaoo$.prototype.constructor = Coroutine$get_ytbaoo$;
|
4677 | Coroutine$get_ytbaoo$.prototype.doResume = function () {
|
4678 | do
|
4679 | try {
|
4680 | switch (this.state_0) {
|
4681 | case 0:
|
4682 | var tmp$;
|
4683 | this.state_0 = 2;
|
4684 | this.result_0 = this.$this.getPersist_0(this);
|
4685 | if (this.result_0 === COROUTINE_SUSPENDED)
|
4686 | return COROUTINE_SUSPENDED;
|
4687 | continue;
|
4688 | case 1:
|
4689 | throw this.exception_0;
|
4690 | case 2:
|
4691 | this.state_0 = 3;
|
4692 | this.result_0 = await_0(Kotlin.isType(tmp$ = this.result_0.getItem(this.local$key), Promise) ? tmp$ : throwCCE(), this);
|
4693 | if (this.result_0 === COROUTINE_SUSPENDED)
|
4694 | return COROUTINE_SUSPENDED;
|
4695 | continue;
|
4696 | case 3:
|
4697 | this.local$tmp$_0 = this.result_0;
|
4698 | if (this.local$tmp$_0 == null) {
|
4699 | return null;
|
4700 | } else {
|
4701 | this.state_0 = 4;
|
4702 | continue;
|
4703 | }
|
4704 |
|
4705 | case 4:
|
4706 | var string = this.local$tmp$_0;
|
4707 | this.local$stringContents = split(string, ['#'], void 0, 3);
|
4708 | if (this.local$stringContents.size !== 3) {
|
4709 | return null;
|
4710 | } else {
|
4711 | this.state_0 = 5;
|
4712 | continue;
|
4713 | }
|
4714 |
|
4715 | case 5:
|
4716 | var version = this.local$stringContents.get_za3lpa$(0);
|
4717 | this.local$lastModified = this.local$stringContents.get_za3lpa$(1);
|
4718 | this.local$json = this.local$stringContents.get_za3lpa$(2);
|
4719 | if (!equals(version, this.$this.getVersion_0())) {
|
4720 | return null;
|
4721 | } else {
|
4722 | this.state_0 = 6;
|
4723 | continue;
|
4724 | }
|
4725 |
|
4726 | case 6:
|
4727 | if (Date.now() - toLong(this.local$lastModified).toNumber() < this.$this.cacheDuration.toNumber()) {
|
4728 | return null;
|
4729 | } else {
|
4730 | this.state_0 = 7;
|
4731 | continue;
|
4732 | }
|
4733 |
|
4734 | case 7:
|
4735 | return startsWith(this.local$json, '{') ? JSON.parse(this.local$json) : null;
|
4736 | default:this.state_0 = 1;
|
4737 | throw new Error('State Machine Unreachable execution');
|
4738 | }
|
4739 | } catch (e) {
|
4740 | if (this.state_0 === 1) {
|
4741 | this.exceptionState_0 = this.state_0;
|
4742 | throw e;
|
4743 | } else {
|
4744 | this.state_0 = this.exceptionState_0;
|
4745 | this.exception_0 = e;
|
4746 | }
|
4747 | }
|
4748 | while (true);
|
4749 | };
|
4750 | DiskCache.prototype.get_ytbaoo$ = function (key_0, continuation_0, suspended) {
|
4751 | var instance = new Coroutine$get_ytbaoo$(this, key_0, continuation_0);
|
4752 | if (suspended)
|
4753 | return instance;
|
4754 | else
|
4755 | return instance.doResume(null);
|
4756 | };
|
4757 | DiskCache.$metadata$ = {
|
4758 | kind: Kind_CLASS,
|
4759 | simpleName: 'DiskCache',
|
4760 | interfaces: [Cache]
|
4761 | };
|
4762 | function MemoryCache(underlyingCache) {
|
4763 | if (underlyingCache === void 0)
|
4764 | underlyingCache = NoCache_getInstance();
|
4765 | this.underlyingCache = underlyingCache;
|
4766 | this.map_0 = HashMap_init();
|
4767 | }
|
4768 | function Coroutine$set_bm4g0d$_0($this, key_0, value_0, continuation_0) {
|
4769 | CoroutineImpl.call(this, continuation_0);
|
4770 | this.exceptionState_0 = 1;
|
4771 | this.$this = $this;
|
4772 | this.local$key = key_0;
|
4773 | this.local$value = value_0;
|
4774 | }
|
4775 | Coroutine$set_bm4g0d$_0.$metadata$ = {
|
4776 | kind: Kotlin.Kind.CLASS,
|
4777 | simpleName: null,
|
4778 | interfaces: [CoroutineImpl]
|
4779 | };
|
4780 | Coroutine$set_bm4g0d$_0.prototype = Object.create(CoroutineImpl.prototype);
|
4781 | Coroutine$set_bm4g0d$_0.prototype.constructor = Coroutine$set_bm4g0d$_0;
|
4782 | Coroutine$set_bm4g0d$_0.prototype.doResume = function () {
|
4783 | do
|
4784 | try {
|
4785 | switch (this.state_0) {
|
4786 | case 0:
|
4787 | this.$this.map_0.put_xwzc9p$(this.local$key, this.local$value);
|
4788 | this.state_0 = 2;
|
4789 | this.result_0 = this.$this.underlyingCache.set_bm4g0d$(this.local$key, this.local$value, this);
|
4790 | if (this.result_0 === COROUTINE_SUSPENDED)
|
4791 | return COROUTINE_SUSPENDED;
|
4792 | continue;
|
4793 | case 1:
|
4794 | throw this.exception_0;
|
4795 | case 2:
|
4796 | return;
|
4797 | default:this.state_0 = 1;
|
4798 | throw new Error('State Machine Unreachable execution');
|
4799 | }
|
4800 | } catch (e) {
|
4801 | if (this.state_0 === 1) {
|
4802 | this.exceptionState_0 = this.state_0;
|
4803 | throw e;
|
4804 | } else {
|
4805 | this.state_0 = this.exceptionState_0;
|
4806 | this.exception_0 = e;
|
4807 | }
|
4808 | }
|
4809 | while (true);
|
4810 | };
|
4811 | MemoryCache.prototype.set_bm4g0d$ = function (key_0, value_0, continuation_0, suspended) {
|
4812 | var instance = new Coroutine$set_bm4g0d$_0(this, key_0, value_0, continuation_0);
|
4813 | if (suspended)
|
4814 | return instance;
|
4815 | else
|
4816 | return instance.doResume(null);
|
4817 | };
|
4818 | function Coroutine$get_ytbaoo$_0($this, key_0, continuation_0) {
|
4819 | CoroutineImpl.call(this, continuation_0);
|
4820 | this.exceptionState_0 = 1;
|
4821 | this.$this = $this;
|
4822 | this.local$tmp$ = void 0;
|
4823 | this.local$key = key_0;
|
4824 | }
|
4825 | Coroutine$get_ytbaoo$_0.$metadata$ = {
|
4826 | kind: Kotlin.Kind.CLASS,
|
4827 | simpleName: null,
|
4828 | interfaces: [CoroutineImpl]
|
4829 | };
|
4830 | Coroutine$get_ytbaoo$_0.prototype = Object.create(CoroutineImpl.prototype);
|
4831 | Coroutine$get_ytbaoo$_0.prototype.constructor = Coroutine$get_ytbaoo$_0;
|
4832 | Coroutine$get_ytbaoo$_0.prototype.doResume = function () {
|
4833 | do
|
4834 | try {
|
4835 | switch (this.state_0) {
|
4836 | case 0:
|
4837 | var tmp$;
|
4838 | this.local$tmp$ = this.$this.map_0.get_11rb$(this.local$key);
|
4839 | if (this.local$tmp$ == null) {
|
4840 | this.state_0 = 2;
|
4841 | this.result_0 = this.$this.underlyingCache.get_ytbaoo$(this.local$key, this);
|
4842 | if (this.result_0 === COROUTINE_SUSPENDED)
|
4843 | return COROUTINE_SUSPENDED;
|
4844 | continue;
|
4845 | } else {
|
4846 | this.state_0 = 3;
|
4847 | continue;
|
4848 | }
|
4849 |
|
4850 | case 1:
|
4851 | throw this.exception_0;
|
4852 | case 2:
|
4853 | this.local$tmp$ = this.result_0;
|
4854 | this.state_0 = 3;
|
4855 | continue;
|
4856 | case 3:
|
4857 | return (tmp$ = this.local$tmp$) == null || Kotlin.isType(tmp$, Any) ? tmp$ : null;
|
4858 | default:this.state_0 = 1;
|
4859 | throw new Error('State Machine Unreachable execution');
|
4860 | }
|
4861 | } catch (e) {
|
4862 | if (this.state_0 === 1) {
|
4863 | this.exceptionState_0 = this.state_0;
|
4864 | throw e;
|
4865 | } else {
|
4866 | this.state_0 = this.exceptionState_0;
|
4867 | this.exception_0 = e;
|
4868 | }
|
4869 | }
|
4870 | while (true);
|
4871 | };
|
4872 | MemoryCache.prototype.get_ytbaoo$ = function (key_0, continuation_0, suspended) {
|
4873 | var instance = new Coroutine$get_ytbaoo$_0(this, key_0, continuation_0);
|
4874 | if (suspended)
|
4875 | return instance;
|
4876 | else
|
4877 | return instance.doResume(null);
|
4878 | };
|
4879 | MemoryCache.$metadata$ = {
|
4880 | kind: Kind_CLASS,
|
4881 | simpleName: 'MemoryCache',
|
4882 | interfaces: [Cache]
|
4883 | };
|
4884 | var package$me = _.me || (_.me = {});
|
4885 | var package$jfenn = package$me.jfenn || (package$me.jfenn = {});
|
4886 | var package$gitrest = package$jfenn.gitrest || (package$jfenn.gitrest = {});
|
4887 | package$gitrest.gitrest_vws507$ = gitrest;
|
4888 | package$gitrest.GitrestClient = GitrestClient;
|
4889 | var package$base = package$gitrest.base || (package$gitrest.base = {});
|
4890 | package$base.RequestProvider = RequestProvider;
|
4891 | package$base.ServiceBuilder = ServiceBuilder;
|
4892 | var package$model = package$gitrest.model || (package$gitrest.model = {});
|
4893 | package$model.DelegateResource = DelegateResource;
|
4894 | package$model.GitrestConfig = GitrestConfig;
|
4895 | package$model.License = License;
|
4896 | package$model.ProviderString_init_wdz5eb$ = ProviderString_init;
|
4897 | package$model.ProviderString_init_6hosri$ = ProviderString_init_0;
|
4898 | package$model.ProviderString_init_61zpoe$ = ProviderString_init_1;
|
4899 | package$model.ProviderString = ProviderString;
|
4900 | package$model.Repo = Repo;
|
4901 | Object.defineProperty(UrlType, 'HTTP', {
|
4902 | get: UrlType$HTTP_getInstance
|
4903 | });
|
4904 | Object.defineProperty(UrlType, 'HTTPS', {
|
4905 | get: UrlType$HTTPS_getInstance
|
4906 | });
|
4907 | Object.defineProperty(UrlType, 'SSH', {
|
4908 | get: UrlType$SSH_getInstance
|
4909 | });
|
4910 | package$model.UrlType = UrlType;
|
4911 | package$model.User = User;
|
4912 | $$importsForInline$$['ktor-ktor-client-core'] = $module$ktor_ktor_client_core;
|
4913 | Object.defineProperty(GiteaProvider, 'Companion', {
|
4914 | get: GiteaProvider$Companion_getInstance
|
4915 | });
|
4916 | var package$provider = package$gitrest.provider || (package$gitrest.provider = {});
|
4917 | var package$gitea = package$provider.gitea || (package$provider.gitea = {});
|
4918 | package$gitea.GiteaProvider = GiteaProvider;
|
4919 | Object.defineProperty(GiteaRepo, 'Companion', {
|
4920 | get: GiteaRepo$Companion_getInstance
|
4921 | });
|
4922 | Object.defineProperty(GiteaRepo, '$serializer', {
|
4923 | get: GiteaRepo$$serializer_getInstance
|
4924 | });
|
4925 | var package$model_0 = package$gitea.model || (package$gitea.model = {});
|
4926 | package$model_0.GiteaRepo_init_a1hnut$ = GiteaRepo_init;
|
4927 | package$model_0.GiteaRepo = GiteaRepo;
|
4928 | Object.defineProperty(GiteaUser, 'Companion', {
|
4929 | get: GiteaUser$Companion_getInstance
|
4930 | });
|
4931 | Object.defineProperty(GiteaUser, '$serializer', {
|
4932 | get: GiteaUser$$serializer_getInstance
|
4933 | });
|
4934 | package$model_0.GiteaUser_init_hbbcfw$ = GiteaUser_init;
|
4935 | package$model_0.GiteaUser = GiteaUser;
|
4936 | Object.defineProperty(GithubProvider, 'Companion', {
|
4937 | get: GithubProvider$Companion_getInstance
|
4938 | });
|
4939 | var package$github = package$provider.github || (package$provider.github = {});
|
4940 | package$github.GithubProvider = GithubProvider;
|
4941 | Object.defineProperty(GithubLicense, 'Companion', {
|
4942 | get: GithubLicense$Companion_getInstance
|
4943 | });
|
4944 | Object.defineProperty(GithubLicense, '$serializer', {
|
4945 | get: GithubLicense$$serializer_getInstance
|
4946 | });
|
4947 | var package$model_1 = package$github.model || (package$github.model = {});
|
4948 | package$model_1.GithubLicense_init_18s5sa$ = GithubLicense_init;
|
4949 | package$model_1.GithubLicense = GithubLicense;
|
4950 | Object.defineProperty(GithubRepo, 'Companion', {
|
4951 | get: GithubRepo$Companion_getInstance
|
4952 | });
|
4953 | Object.defineProperty(GithubRepo, '$serializer', {
|
4954 | get: GithubRepo$$serializer_getInstance
|
4955 | });
|
4956 | package$model_1.GithubRepo_init_jj9o6y$ = GithubRepo_init;
|
4957 | package$model_1.GithubRepo = GithubRepo;
|
4958 | Object.defineProperty(GithubUser, 'Companion', {
|
4959 | get: GithubUser$Companion_getInstance
|
4960 | });
|
4961 | Object.defineProperty(GithubUser, '$serializer', {
|
4962 | get: GithubUser$$serializer_getInstance
|
4963 | });
|
4964 | package$model_1.GithubUser_init_a1hnut$ = GithubUser_init;
|
4965 | package$model_1.GithubUser = GithubUser;
|
4966 | Object.defineProperty(GitlabProvider, 'Companion', {
|
4967 | get: GitlabProvider$Companion_getInstance
|
4968 | });
|
4969 | var package$gitlab = package$provider.gitlab || (package$provider.gitlab = {});
|
4970 | package$gitlab.GitlabProvider = GitlabProvider;
|
4971 | Object.defineProperty(GitlabLicense, 'Companion', {
|
4972 | get: GitlabLicense$Companion_getInstance
|
4973 | });
|
4974 | Object.defineProperty(GitlabLicense, '$serializer', {
|
4975 | get: GitlabLicense$$serializer_getInstance
|
4976 | });
|
4977 | var package$model_2 = package$gitlab.model || (package$gitlab.model = {});
|
4978 | package$model_2.GitlabLicense_init_e0c47h$ = GitlabLicense_init;
|
4979 | package$model_2.GitlabLicense = GitlabLicense;
|
4980 | Object.defineProperty(GitlabRepo, 'Companion', {
|
4981 | get: GitlabRepo$Companion_getInstance
|
4982 | });
|
4983 | Object.defineProperty(GitlabRepo, '$serializer', {
|
4984 | get: GitlabRepo$$serializer_getInstance
|
4985 | });
|
4986 | package$model_2.GitlabRepo_init_73kx01$ = GitlabRepo_init;
|
4987 | package$model_2.GitlabRepo = GitlabRepo;
|
4988 | Object.defineProperty(GitlabUser, 'Companion', {
|
4989 | get: GitlabUser$Companion_getInstance
|
4990 | });
|
4991 | Object.defineProperty(GitlabUser, '$serializer', {
|
4992 | get: GitlabUser$$serializer_getInstance
|
4993 | });
|
4994 | package$model_2.GitlabUser_init_a1hnut$ = GitlabUser_init;
|
4995 | package$model_2.GitlabUser = GitlabUser;
|
4996 | var package$service = package$gitrest.service || (package$gitrest.service = {});
|
4997 | package$service.Cache = Cache;
|
4998 | Object.defineProperty(package$service, 'NoCache', {
|
4999 | get: NoCache_getInstance
|
5000 | });
|
5001 | var package$util = package$gitrest.util || (package$gitrest.util = {});
|
5002 | Object.defineProperty(package$util, 'DEFAULT_PROVIDERS', {
|
5003 | get: function () {
|
5004 | return DEFAULT_PROVIDERS;
|
5005 | }
|
5006 | });
|
5007 | package$util.OptionalStringSerializer = OptionalStringSerializer;
|
5008 | _.Client = Client;
|
5009 | var package$gitrest_0 = _.gitrest || (_.gitrest = {});
|
5010 | var package$js = package$gitrest_0.js || (package$gitrest_0.js = {});
|
5011 | package$js.License = License_0;
|
5012 | package$js.Repo = Repo_0;
|
5013 | package$js.User = User_0;
|
5014 | package$model.PlatformConfig = PlatformConfig;
|
5015 | package$service.DiskCache = DiskCache;
|
5016 | package$service.MemoryCache = MemoryCache;
|
5017 | GiteaProvider$Companion.prototype.ktor_1v6kay$ = ServiceBuilder.prototype.ktor_1v6kay$;
|
5018 | GiteaRepo$$serializer.prototype.patch_mynpiu$ = GeneratedSerializer.prototype.patch_mynpiu$;
|
5019 | GiteaUser$$serializer.prototype.patch_mynpiu$ = GeneratedSerializer.prototype.patch_mynpiu$;
|
5020 | GithubProvider$Companion.prototype.ktor_1v6kay$ = ServiceBuilder.prototype.ktor_1v6kay$;
|
5021 | GithubLicense$$serializer.prototype.patch_mynpiu$ = GeneratedSerializer.prototype.patch_mynpiu$;
|
5022 | GithubRepo$$serializer.prototype.patch_mynpiu$ = GeneratedSerializer.prototype.patch_mynpiu$;
|
5023 | GithubUser$$serializer.prototype.patch_mynpiu$ = GeneratedSerializer.prototype.patch_mynpiu$;
|
5024 | GitlabProvider$Companion.prototype.ktor_1v6kay$ = ServiceBuilder.prototype.ktor_1v6kay$;
|
5025 | GitlabLicense$$serializer.prototype.patch_mynpiu$ = GeneratedSerializer.prototype.patch_mynpiu$;
|
5026 | GitlabRepo$$serializer.prototype.patch_mynpiu$ = GeneratedSerializer.prototype.patch_mynpiu$;
|
5027 | GitlabUser$$serializer.prototype.patch_mynpiu$ = GeneratedSerializer.prototype.patch_mynpiu$;
|
5028 | OptionalStringSerializer.prototype.patch_mynpiu$ = KSerializer.prototype.patch_mynpiu$;
|
5029 | DEFAULT_PROVIDERS = [ProviderString_init('github', 'api.github.com'), ProviderString_init('gitlab', 'gitlab.com'), ProviderString_init('gitea', 'codeberg.org')];
|
5030 | Kotlin.defineModule('git-rest-wrapper-gitrest', _);
|
5031 | return _;
|
5032 | }));
|
5033 |
|
5034 |
|