@flock/wirespec 0.11.5 → 0.11.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/clikt-clikt.js +1170 -1170
- package/colormath-root-colormath.js +425 -425
- package/kotlin-kotlin-stdlib.js +16 -16
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-openapi-bindings.js +48 -47
- package/kotlin-openapi-bindings.js.map +1 -1
- package/kotlin-rgxgen.js +1767 -1767
- package/markdown.js +1873 -1873
- package/mordant-mordant.js +1642 -1642
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +1868 -1925
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +415 -384
- package/wirespec-src-compiler-lib.js.map +1 -1
- package/wirespec-src-converter-avro.js +208 -211
- package/wirespec-src-converter-avro.js.map +1 -1
- package/wirespec-src-converter-openapi.js +691 -710
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-plugin-arguments.js +78 -78
- package/wirespec-src-plugin-cli.js +133 -133
- package/wirespec-src-plugin-npm.d.ts +37 -24
- package/wirespec-src-plugin-npm.js +16 -16
- package/wirespec-src-tools-generator.js +100 -90
- package/wirespec-src-tools-generator.js.map +1 -1
|
@@ -65,12 +65,11 @@ export declare namespace community.flock.wirespec.compiler.lib {
|
|
|
65
65
|
readonly __doNotUseOrImplementIt: community.flock.wirespec.compiler.lib.WsNode["__doNotUseOrImplementIt"];
|
|
66
66
|
}
|
|
67
67
|
class WsChannel implements community.flock.wirespec.compiler.lib.WsNode {
|
|
68
|
-
constructor(identifier: string, comment: Nullable<string>, reference: community.flock.wirespec.compiler.lib.WsReference
|
|
68
|
+
constructor(identifier: string, comment: Nullable<string>, reference: community.flock.wirespec.compiler.lib.WsReference);
|
|
69
69
|
get identifier(): string;
|
|
70
70
|
get comment(): Nullable<string>;
|
|
71
71
|
get reference(): community.flock.wirespec.compiler.lib.WsReference;
|
|
72
|
-
|
|
73
|
-
copy(identifier?: string, comment?: Nullable<string>, reference?: community.flock.wirespec.compiler.lib.WsReference, isNullable?: boolean): community.flock.wirespec.compiler.lib.WsChannel;
|
|
72
|
+
copy(identifier?: string, comment?: Nullable<string>, reference?: community.flock.wirespec.compiler.lib.WsReference): community.flock.wirespec.compiler.lib.WsChannel;
|
|
74
73
|
toString(): string;
|
|
75
74
|
hashCode(): number;
|
|
76
75
|
equals(other: Nullable<any>): boolean;
|
|
@@ -159,11 +158,10 @@ export declare namespace community.flock.wirespec.compiler.lib {
|
|
|
159
158
|
equals(other: Nullable<any>): boolean;
|
|
160
159
|
}
|
|
161
160
|
class WsField {
|
|
162
|
-
constructor(identifier: community.flock.wirespec.compiler.lib.WsFieldIdentifier, reference: community.flock.wirespec.compiler.lib.WsReference
|
|
161
|
+
constructor(identifier: community.flock.wirespec.compiler.lib.WsFieldIdentifier, reference: community.flock.wirespec.compiler.lib.WsReference);
|
|
163
162
|
get identifier(): community.flock.wirespec.compiler.lib.WsFieldIdentifier;
|
|
164
163
|
get reference(): community.flock.wirespec.compiler.lib.WsReference;
|
|
165
|
-
|
|
166
|
-
copy(identifier?: community.flock.wirespec.compiler.lib.WsFieldIdentifier, reference?: community.flock.wirespec.compiler.lib.WsReference, isNullable?: boolean): community.flock.wirespec.compiler.lib.WsField;
|
|
164
|
+
copy(identifier?: community.flock.wirespec.compiler.lib.WsFieldIdentifier, reference?: community.flock.wirespec.compiler.lib.WsReference): community.flock.wirespec.compiler.lib.WsField;
|
|
167
165
|
toString(): string;
|
|
168
166
|
hashCode(): number;
|
|
169
167
|
equals(other: Nullable<any>): boolean;
|
|
@@ -192,49 +190,64 @@ export declare namespace community.flock.wirespec.compiler.lib {
|
|
|
192
190
|
readonly __doNotUseOrImplementIt: community.flock.wirespec.compiler.lib.WsIdentifier["__doNotUseOrImplementIt"];
|
|
193
191
|
}
|
|
194
192
|
interface WsReference {
|
|
195
|
-
readonly
|
|
196
|
-
readonly isMap: boolean;
|
|
193
|
+
readonly isNullable: boolean;
|
|
197
194
|
readonly __doNotUseOrImplementIt: {
|
|
198
195
|
readonly "community.flock.wirespec.compiler.lib.WsReference": unique symbol;
|
|
199
196
|
};
|
|
200
197
|
}
|
|
201
198
|
class WsAny implements community.flock.wirespec.compiler.lib.WsReference {
|
|
202
|
-
constructor(
|
|
203
|
-
get
|
|
204
|
-
|
|
205
|
-
copy(isIterable?: boolean, isMap?: boolean): community.flock.wirespec.compiler.lib.WsAny;
|
|
199
|
+
constructor(isNullable: boolean);
|
|
200
|
+
get isNullable(): boolean;
|
|
201
|
+
copy(isNullable?: boolean): community.flock.wirespec.compiler.lib.WsAny;
|
|
206
202
|
toString(): string;
|
|
207
203
|
hashCode(): number;
|
|
208
204
|
equals(other: Nullable<any>): boolean;
|
|
209
205
|
readonly __doNotUseOrImplementIt: community.flock.wirespec.compiler.lib.WsReference["__doNotUseOrImplementIt"];
|
|
210
206
|
}
|
|
211
207
|
class WsUnit implements community.flock.wirespec.compiler.lib.WsReference {
|
|
212
|
-
constructor(
|
|
213
|
-
get
|
|
214
|
-
|
|
215
|
-
|
|
208
|
+
constructor(isNullable: boolean);
|
|
209
|
+
get isNullable(): boolean;
|
|
210
|
+
copy(isNullable?: boolean): community.flock.wirespec.compiler.lib.WsUnit;
|
|
211
|
+
toString(): string;
|
|
212
|
+
hashCode(): number;
|
|
213
|
+
equals(other: Nullable<any>): boolean;
|
|
214
|
+
readonly __doNotUseOrImplementIt: community.flock.wirespec.compiler.lib.WsReference["__doNotUseOrImplementIt"];
|
|
215
|
+
}
|
|
216
|
+
class WsIterable implements community.flock.wirespec.compiler.lib.WsReference {
|
|
217
|
+
constructor(reference: community.flock.wirespec.compiler.lib.WsReference, isNullable: boolean);
|
|
218
|
+
get reference(): community.flock.wirespec.compiler.lib.WsReference;
|
|
219
|
+
get isNullable(): boolean;
|
|
220
|
+
copy(reference?: community.flock.wirespec.compiler.lib.WsReference, isNullable?: boolean): community.flock.wirespec.compiler.lib.WsIterable;
|
|
221
|
+
toString(): string;
|
|
222
|
+
hashCode(): number;
|
|
223
|
+
equals(other: Nullable<any>): boolean;
|
|
224
|
+
readonly __doNotUseOrImplementIt: community.flock.wirespec.compiler.lib.WsReference["__doNotUseOrImplementIt"];
|
|
225
|
+
}
|
|
226
|
+
class WsDict implements community.flock.wirespec.compiler.lib.WsReference {
|
|
227
|
+
constructor(reference: community.flock.wirespec.compiler.lib.WsReference, isNullable: boolean);
|
|
228
|
+
get reference(): community.flock.wirespec.compiler.lib.WsReference;
|
|
229
|
+
get isNullable(): boolean;
|
|
230
|
+
copy(reference?: community.flock.wirespec.compiler.lib.WsReference, isNullable?: boolean): community.flock.wirespec.compiler.lib.WsDict;
|
|
216
231
|
toString(): string;
|
|
217
232
|
hashCode(): number;
|
|
218
233
|
equals(other: Nullable<any>): boolean;
|
|
219
234
|
readonly __doNotUseOrImplementIt: community.flock.wirespec.compiler.lib.WsReference["__doNotUseOrImplementIt"];
|
|
220
235
|
}
|
|
221
236
|
class WsCustom implements community.flock.wirespec.compiler.lib.WsReference {
|
|
222
|
-
constructor(value: string,
|
|
237
|
+
constructor(value: string, isNullable: boolean);
|
|
223
238
|
get value(): string;
|
|
224
|
-
get
|
|
225
|
-
|
|
226
|
-
copy(value?: string, isIterable?: boolean, isMap?: boolean): community.flock.wirespec.compiler.lib.WsCustom;
|
|
239
|
+
get isNullable(): boolean;
|
|
240
|
+
copy(value?: string, isNullable?: boolean): community.flock.wirespec.compiler.lib.WsCustom;
|
|
227
241
|
toString(): string;
|
|
228
242
|
hashCode(): number;
|
|
229
243
|
equals(other: Nullable<any>): boolean;
|
|
230
244
|
readonly __doNotUseOrImplementIt: community.flock.wirespec.compiler.lib.WsReference["__doNotUseOrImplementIt"];
|
|
231
245
|
}
|
|
232
246
|
class WsPrimitive implements community.flock.wirespec.compiler.lib.WsReference {
|
|
233
|
-
constructor(type: community.flock.wirespec.compiler.lib.WsPrimitiveType,
|
|
247
|
+
constructor(type: community.flock.wirespec.compiler.lib.WsPrimitiveType, isNullable: boolean);
|
|
234
248
|
get type(): community.flock.wirespec.compiler.lib.WsPrimitiveType;
|
|
235
|
-
get
|
|
236
|
-
|
|
237
|
-
copy(type?: community.flock.wirespec.compiler.lib.WsPrimitiveType, isIterable?: boolean, isMap?: boolean): community.flock.wirespec.compiler.lib.WsPrimitive;
|
|
249
|
+
get isNullable(): boolean;
|
|
250
|
+
copy(type?: community.flock.wirespec.compiler.lib.WsPrimitiveType, isNullable?: boolean): community.flock.wirespec.compiler.lib.WsPrimitive;
|
|
238
251
|
toString(): string;
|
|
239
252
|
hashCode(): number;
|
|
240
253
|
equals(other: Nullable<any>): boolean;
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
var initMetadataForClass = kotlin_kotlin.$_$.y9;
|
|
45
45
|
var VOID = kotlin_kotlin.$_$.g;
|
|
46
46
|
var main = kotlin_community_flock_wirespec_plugin_cli_cli.$_$.a;
|
|
47
|
-
var WirespecSpec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
48
|
-
var tokenize = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
47
|
+
var WirespecSpec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.p2;
|
|
48
|
+
var tokenize = kotlin_community_flock_wirespec_compiler_core.$_$.n1;
|
|
49
49
|
var produce = kotlin_community_flock_wirespec_compiler_lib.$_$.f;
|
|
50
50
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.i5;
|
|
51
51
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.k;
|
|
52
52
|
var NonEmptyList = kotlin_io_arrow_kt_arrow_core.$_$.f;
|
|
53
53
|
var copyToArray = kotlin_kotlin.$_$.x5;
|
|
54
|
-
var parse = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
54
|
+
var parse = kotlin_community_flock_wirespec_compiler_core.$_$.s1;
|
|
55
55
|
var produce_0 = kotlin_community_flock_wirespec_compiler_lib.$_$.b;
|
|
56
56
|
var OpenApiV2Parser_instance = kotlin_community_flock_wirespec_converter_openapi.$_$.b;
|
|
57
57
|
var produce_1 = kotlin_community_flock_wirespec_compiler_lib.$_$.c;
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
var Right = kotlin_io_arrow_kt_arrow_core.$_$.e;
|
|
64
64
|
var produce_2 = kotlin_community_flock_wirespec_compiler_lib.$_$.d;
|
|
65
65
|
var consume = kotlin_community_flock_wirespec_compiler_lib.$_$.a;
|
|
66
|
-
var get_noLogger = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
66
|
+
var get_noLogger = kotlin_community_flock_wirespec_compiler_core.$_$.u1;
|
|
67
67
|
var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.g;
|
|
68
68
|
var TypeScriptEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.f;
|
|
69
69
|
var JavaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.c;
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
var ScalaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.e;
|
|
72
72
|
var listOf = kotlin_kotlin.$_$.g7;
|
|
73
73
|
var OpenApiV2Emitter_getInstance = kotlin_community_flock_wirespec_converter_openapi.$_$.a;
|
|
74
|
-
var Companion_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.
|
|
74
|
+
var Companion_getInstance = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.x2;
|
|
75
75
|
var curried = kotlin_io_arrow_kt_arrow_core.$_$.g;
|
|
76
76
|
var OpenApiV3Emitter_getInstance = kotlin_community_flock_wirespec_converter_openapi.$_$.c;
|
|
77
|
-
var Companion_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.
|
|
77
|
+
var Companion_getInstance_0 = kotlin_community_flock_kotlinx_openapi_bindings_kotlin_openapi_bindings.$_$.y2;
|
|
78
78
|
var produce_3 = kotlin_community_flock_wirespec_compiler_lib.$_$.g;
|
|
79
|
-
var get_spec = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
80
|
-
var HasLanguageSpec = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
79
|
+
var get_spec = kotlin_community_flock_wirespec_compiler_core.$_$.o1;
|
|
80
|
+
var HasLanguageSpec = kotlin_community_flock_wirespec_compiler_core.$_$.p1;
|
|
81
81
|
var Emitted = kotlin_community_flock_wirespec_compiler_core.$_$.a;
|
|
82
82
|
var Default_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.a;
|
|
83
83
|
//endregion
|
|
@@ -194,10 +194,10 @@
|
|
|
194
194
|
var tmp;
|
|
195
195
|
switch (converters.q2_1) {
|
|
196
196
|
case 0:
|
|
197
|
-
tmp = produce_1(OpenApiV2Parser_instance.
|
|
197
|
+
tmp = produce_1(OpenApiV2Parser_instance.w2a(source));
|
|
198
198
|
break;
|
|
199
199
|
case 1:
|
|
200
|
-
tmp = produce_1(OpenApiV3Parser_instance.
|
|
200
|
+
tmp = produce_1(OpenApiV3Parser_instance.o2b(source));
|
|
201
201
|
break;
|
|
202
202
|
default:
|
|
203
203
|
noWhenBranchMatchedException();
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
var tmp0_iterator = this_0.g();
|
|
279
279
|
while (tmp0_iterator.h()) {
|
|
280
280
|
var item_0 = tmp0_iterator.i();
|
|
281
|
-
var tmp$ret$3 = tmp1_map_$receiver.
|
|
281
|
+
var tmp$ret$3 = tmp1_map_$receiver.h2a(item_0);
|
|
282
282
|
destination_0.e(tmp$ret$3);
|
|
283
283
|
}
|
|
284
284
|
|
|
@@ -320,7 +320,7 @@
|
|
|
320
320
|
while (tmp0_iterator_2.h()) {
|
|
321
321
|
var item_3 = tmp0_iterator_2.i();
|
|
322
322
|
// Inline function 'community.flock.wirespec.plugin.npm.emit.<anonymous>.<anonymous>' call
|
|
323
|
-
var tmp$ret$11 = OpenApiV3Emitter_getInstance().
|
|
323
|
+
var tmp$ret$11 = OpenApiV3Emitter_getInstance().a2b(item_3, null);
|
|
324
324
|
destination_3.e(tmp$ret$11);
|
|
325
325
|
}
|
|
326
326
|
|
|
@@ -367,16 +367,16 @@
|
|
|
367
367
|
return encode$lambda(serializer);
|
|
368
368
|
}
|
|
369
369
|
function parse$1() {
|
|
370
|
-
this.
|
|
370
|
+
this.y5k_1 = get_noLogger();
|
|
371
371
|
}
|
|
372
372
|
protoOf(parse$1).a22 = function () {
|
|
373
|
-
return this.
|
|
373
|
+
return this.y5k_1;
|
|
374
374
|
};
|
|
375
375
|
function generate$this$1() {
|
|
376
|
-
this.
|
|
376
|
+
this.z5k_1 = get_noLogger();
|
|
377
377
|
}
|
|
378
378
|
protoOf(generate$this$1).a22 = function () {
|
|
379
|
-
return this.
|
|
379
|
+
return this.z5k_1;
|
|
380
380
|
};
|
|
381
381
|
function Emitted$_init_$ref_9uzepx() {
|
|
382
382
|
var l = function (p0, p1) {
|
|
@@ -24,37 +24,39 @@
|
|
|
24
24
|
var Default_getInstance = kotlin_kotlin.$_$.v3;
|
|
25
25
|
var VOID = kotlin_kotlin.$_$.g;
|
|
26
26
|
var removeSuffix = kotlin_kotlin.$_$.hd;
|
|
27
|
-
var endsWith = kotlin_kotlin.$_$.oc;
|
|
28
27
|
var Custom = kotlin_community_flock_wirespec_compiler_core.$_$.x;
|
|
28
|
+
var Iterable = kotlin_community_flock_wirespec_compiler_core.$_$.z;
|
|
29
|
+
var endsWith = kotlin_kotlin.$_$.oc;
|
|
29
30
|
var noWhenBranchMatchedException = kotlin_kotlin.$_$.fg;
|
|
30
31
|
var NotImplementedError = kotlin_kotlin.$_$.ef;
|
|
31
32
|
var Any = kotlin_community_flock_wirespec_compiler_core.$_$.w;
|
|
32
33
|
var JsonNull_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.c;
|
|
33
|
-
var Unit = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
34
|
+
var Unit = kotlin_community_flock_wirespec_compiler_core.$_$.g1;
|
|
34
35
|
var Companion_instance = kotlin_community_flock_kotlinx_rgxgen_kotlin_rgxgen.$_$.a;
|
|
35
36
|
var JsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.h;
|
|
36
37
|
var JsonPrimitive_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.j;
|
|
37
|
-
var Boolean_0 = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
38
|
+
var Boolean_0 = kotlin_community_flock_wirespec_compiler_core.$_$.a1;
|
|
38
39
|
var JsonPrimitive_1 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.i;
|
|
39
|
-
var Number_0 = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
40
|
-
var Integer = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
41
|
-
var Primitive = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
40
|
+
var Number_0 = kotlin_community_flock_wirespec_compiler_core.$_$.d1;
|
|
41
|
+
var Integer = kotlin_community_flock_wirespec_compiler_core.$_$.c1;
|
|
42
|
+
var Primitive = kotlin_community_flock_wirespec_compiler_core.$_$.f1;
|
|
43
|
+
var Dict = kotlin_community_flock_wirespec_compiler_core.$_$.y;
|
|
42
44
|
var numberRangeToNumber = kotlin_kotlin.$_$.sa;
|
|
43
45
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.i5;
|
|
44
46
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.k;
|
|
45
47
|
var Unit_instance = kotlin_kotlin.$_$.g4;
|
|
46
48
|
var JsonArray = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.e;
|
|
47
|
-
var Channel = kotlin_community_flock_wirespec_compiler_core.$_$.i;
|
|
48
|
-
var Endpoint = kotlin_community_flock_wirespec_compiler_core.$_$.s;
|
|
49
|
-
var Union = kotlin_community_flock_wirespec_compiler_core.$_$.j1;
|
|
50
|
-
var Enum = kotlin_community_flock_wirespec_compiler_core.$_$.t;
|
|
51
|
-
var Refined = kotlin_community_flock_wirespec_compiler_core.$_$.g1;
|
|
52
|
-
var Type = kotlin_community_flock_wirespec_compiler_core.$_$.i1;
|
|
53
49
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.l;
|
|
54
50
|
var Definition = kotlin_community_flock_wirespec_compiler_core.$_$.l;
|
|
55
51
|
var isInterface = kotlin_kotlin.$_$.ma;
|
|
56
52
|
var toString = kotlin_kotlin.$_$.cb;
|
|
57
53
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.l1;
|
|
54
|
+
var Channel = kotlin_community_flock_wirespec_compiler_core.$_$.i;
|
|
55
|
+
var Endpoint = kotlin_community_flock_wirespec_compiler_core.$_$.s;
|
|
56
|
+
var Union = kotlin_community_flock_wirespec_compiler_core.$_$.l1;
|
|
57
|
+
var Enum = kotlin_community_flock_wirespec_compiler_core.$_$.t;
|
|
58
|
+
var Refined = kotlin_community_flock_wirespec_compiler_core.$_$.i1;
|
|
59
|
+
var Type = kotlin_community_flock_wirespec_compiler_core.$_$.k1;
|
|
58
60
|
var emptyMap = kotlin_kotlin.$_$.c6;
|
|
59
61
|
var charSequenceLength = kotlin_kotlin.$_$.n9;
|
|
60
62
|
var charSequenceGet = kotlin_kotlin.$_$.m9;
|
|
@@ -70,10 +72,14 @@
|
|
|
70
72
|
function generate(_this__u8e3s4, type, random) {
|
|
71
73
|
random = random === VOID ? Default_getInstance() : random;
|
|
72
74
|
// Inline function 'kotlin.let' call
|
|
75
|
+
// Inline function 'kotlin.let' call
|
|
73
76
|
// Inline function 'kotlin.contracts.contract' call
|
|
74
77
|
// Inline function 'community.flock.wirespec.generator.generate.<anonymous>' call
|
|
75
|
-
var it = new Custom(removeSuffix(type, '[]'),
|
|
76
|
-
|
|
78
|
+
var it = new Custom(removeSuffix(type, '[]'), false);
|
|
79
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
80
|
+
// Inline function 'community.flock.wirespec.generator.generate.<anonymous>' call
|
|
81
|
+
var it_0 = endsWith(type, '[]') ? new Iterable(it, false) : it;
|
|
82
|
+
return generate_0(_this__u8e3s4, it_0, random);
|
|
77
83
|
}
|
|
78
84
|
function generate_0(_this__u8e3s4, type, random) {
|
|
79
85
|
random = random === VOID ? Default_getInstance() : random;
|
|
@@ -81,50 +87,54 @@
|
|
|
81
87
|
}
|
|
82
88
|
function generateReference(_this__u8e3s4, ref, random) {
|
|
83
89
|
var tmp;
|
|
84
|
-
if (ref instanceof
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
if (
|
|
88
|
-
|
|
89
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
90
|
-
var p0 = random.ee();
|
|
91
|
-
tmp_0 = JsonPrimitive_1(p0);
|
|
90
|
+
if (ref instanceof Dict) {
|
|
91
|
+
throw new NotImplementedError();
|
|
92
|
+
} else {
|
|
93
|
+
if (ref instanceof Iterable) {
|
|
94
|
+
tmp = generateIterator(_this__u8e3s4, resolveReference(_this__u8e3s4, ref.y25_1), random);
|
|
92
95
|
} else {
|
|
93
|
-
if (
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
tmp_0 = JsonPrimitive_1(p0_0);
|
|
98
|
-
} else {
|
|
99
|
-
if (tmp1_subject instanceof Boolean_0) {
|
|
96
|
+
if (ref instanceof Primitive) {
|
|
97
|
+
var tmp1_subject = ref.h23_1;
|
|
98
|
+
var tmp_0;
|
|
99
|
+
if (tmp1_subject instanceof Integer) {
|
|
100
100
|
// Inline function 'kotlin.let' call
|
|
101
101
|
// Inline function 'kotlin.contracts.contract' call
|
|
102
|
-
var
|
|
103
|
-
tmp_0 =
|
|
102
|
+
var p0 = random.ee();
|
|
103
|
+
tmp_0 = JsonPrimitive_1(p0);
|
|
104
104
|
} else {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
if (tmp1_subject instanceof Number_0) {
|
|
106
|
+
// Inline function 'kotlin.let' call
|
|
107
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
108
|
+
var p0_0 = random.vf();
|
|
109
|
+
tmp_0 = JsonPrimitive_1(p0_0);
|
|
110
|
+
} else {
|
|
111
|
+
if (tmp1_subject instanceof Boolean_0) {
|
|
112
|
+
// Inline function 'kotlin.let' call
|
|
113
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
114
|
+
var p0_1 = random.uf();
|
|
115
|
+
tmp_0 = JsonPrimitive_0(p0_1);
|
|
116
|
+
} else {
|
|
117
|
+
// Inline function 'kotlin.let' call
|
|
118
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
119
|
+
var p0_2 = Companion_instance.s48('\\w{1,50}').b49(random);
|
|
120
|
+
tmp_0 = JsonPrimitive(p0_2);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
109
123
|
}
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
tmp = tmp_0;
|
|
113
|
-
} else {
|
|
114
|
-
if (ref instanceof Custom) {
|
|
115
|
-
// Inline function 'kotlin.let' call
|
|
116
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
117
|
-
// Inline function 'community.flock.wirespec.generator.generateReference.<anonymous>' call
|
|
118
|
-
var it = resolveReference(_this__u8e3s4, ref);
|
|
119
|
-
tmp = ref.a23_1 ? generateIterator(_this__u8e3s4, it, random) : generateObject(_this__u8e3s4, it, random);
|
|
120
|
-
} else {
|
|
121
|
-
if (ref instanceof Unit) {
|
|
122
|
-
tmp = JsonNull_getInstance();
|
|
124
|
+
tmp = tmp_0;
|
|
123
125
|
} else {
|
|
124
|
-
if (ref instanceof
|
|
125
|
-
|
|
126
|
+
if (ref instanceof Custom) {
|
|
127
|
+
tmp = generateObject(_this__u8e3s4, resolveReference(_this__u8e3s4, ref), random);
|
|
126
128
|
} else {
|
|
127
|
-
|
|
129
|
+
if (ref instanceof Unit) {
|
|
130
|
+
tmp = JsonNull_getInstance();
|
|
131
|
+
} else {
|
|
132
|
+
if (ref instanceof Any) {
|
|
133
|
+
throw new NotImplementedError('Cannot generate Any');
|
|
134
|
+
} else {
|
|
135
|
+
noWhenBranchMatchedException();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
128
138
|
}
|
|
129
139
|
}
|
|
130
140
|
}
|
|
@@ -151,35 +161,6 @@
|
|
|
151
161
|
// Inline function 'kotlin.contracts.contract' call
|
|
152
162
|
return new JsonArray(destination);
|
|
153
163
|
}
|
|
154
|
-
function generateObject(_this__u8e3s4, def, random) {
|
|
155
|
-
var tmp;
|
|
156
|
-
if (def instanceof Type) {
|
|
157
|
-
tmp = generateType(_this__u8e3s4, def, random);
|
|
158
|
-
} else {
|
|
159
|
-
if (def instanceof Refined) {
|
|
160
|
-
tmp = generateRefined(def, random);
|
|
161
|
-
} else {
|
|
162
|
-
if (def instanceof Enum) {
|
|
163
|
-
tmp = generateEnum(def, random);
|
|
164
|
-
} else {
|
|
165
|
-
if (def instanceof Union) {
|
|
166
|
-
tmp = generateUnion(_this__u8e3s4, def, random);
|
|
167
|
-
} else {
|
|
168
|
-
if (def instanceof Endpoint) {
|
|
169
|
-
throw new NotImplementedError('Endpoint cannot be generated');
|
|
170
|
-
} else {
|
|
171
|
-
if (def instanceof Channel) {
|
|
172
|
-
throw new NotImplementedError('Channel cannot be generated');
|
|
173
|
-
} else {
|
|
174
|
-
noWhenBranchMatchedException();
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
return tmp;
|
|
182
|
-
}
|
|
183
164
|
function resolveReference(_this__u8e3s4, type) {
|
|
184
165
|
// Inline function 'kotlin.collections.find' call
|
|
185
166
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
@@ -199,7 +180,7 @@
|
|
|
199
180
|
while (tmp0_iterator_0.h()) {
|
|
200
181
|
var element_0 = tmp0_iterator_0.i();
|
|
201
182
|
// Inline function 'community.flock.wirespec.generator.resolveReference.<anonymous>' call
|
|
202
|
-
if (element_0.
|
|
183
|
+
if (element_0.w28().b1() === type.b1()) {
|
|
203
184
|
tmp$ret$3 = element_0;
|
|
204
185
|
break $l$block;
|
|
205
186
|
}
|
|
@@ -216,6 +197,35 @@
|
|
|
216
197
|
}
|
|
217
198
|
return tmp;
|
|
218
199
|
}
|
|
200
|
+
function generateObject(_this__u8e3s4, def, random) {
|
|
201
|
+
var tmp;
|
|
202
|
+
if (def instanceof Type) {
|
|
203
|
+
tmp = generateType(_this__u8e3s4, def, random);
|
|
204
|
+
} else {
|
|
205
|
+
if (def instanceof Refined) {
|
|
206
|
+
tmp = generateRefined(def, random);
|
|
207
|
+
} else {
|
|
208
|
+
if (def instanceof Enum) {
|
|
209
|
+
tmp = generateEnum(def, random);
|
|
210
|
+
} else {
|
|
211
|
+
if (def instanceof Union) {
|
|
212
|
+
tmp = generateUnion(_this__u8e3s4, def, random);
|
|
213
|
+
} else {
|
|
214
|
+
if (def instanceof Endpoint) {
|
|
215
|
+
throw new NotImplementedError('Endpoint cannot be generated');
|
|
216
|
+
} else {
|
|
217
|
+
if (def instanceof Channel) {
|
|
218
|
+
throw new NotImplementedError('Channel cannot be generated');
|
|
219
|
+
} else {
|
|
220
|
+
noWhenBranchMatchedException();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return tmp;
|
|
228
|
+
}
|
|
219
229
|
function generateType(_this__u8e3s4, def, random) {
|
|
220
230
|
// Inline function 'kotlin.let' call
|
|
221
231
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -223,7 +233,7 @@
|
|
|
223
233
|
var typeSeed = random.ee();
|
|
224
234
|
// Inline function 'kotlin.let' call
|
|
225
235
|
// Inline function 'kotlin.collections.fold' call
|
|
226
|
-
var this_0 = def.
|
|
236
|
+
var this_0 = def.f25_1.x25_1;
|
|
227
237
|
var accumulator = emptyMap();
|
|
228
238
|
var tmp0_iterator = this_0.g();
|
|
229
239
|
while (tmp0_iterator.h()) {
|
|
@@ -233,7 +243,7 @@
|
|
|
233
243
|
// Inline function 'kotlin.let' call
|
|
234
244
|
// Inline function 'kotlin.contracts.contract' call
|
|
235
245
|
// Inline function 'community.flock.wirespec.generator.generateType.<anonymous>.<anonymous>.<anonymous>' call
|
|
236
|
-
var value = element.
|
|
246
|
+
var value = element.j24_1.b1();
|
|
237
247
|
// Inline function 'kotlin.text.sumOf' call
|
|
238
248
|
var sum = 0;
|
|
239
249
|
var inductionVariable = 0;
|
|
@@ -247,7 +257,7 @@
|
|
|
247
257
|
}
|
|
248
258
|
var fieldSeed = typeSeed + sum | 0;
|
|
249
259
|
var fieldRandom = Random(fieldSeed);
|
|
250
|
-
accumulator = plus(acc, to(value, generateReference(_this__u8e3s4, element.
|
|
260
|
+
accumulator = plus(acc, to(value, generateReference(_this__u8e3s4, element.k24_1, fieldRandom)));
|
|
251
261
|
}
|
|
252
262
|
// Inline function 'kotlin.contracts.contract' call
|
|
253
263
|
var p0 = accumulator;
|
|
@@ -256,26 +266,26 @@
|
|
|
256
266
|
function generateRefined(def, random) {
|
|
257
267
|
// Inline function 'kotlin.let' call
|
|
258
268
|
// Inline function 'kotlin.contracts.contract' call
|
|
259
|
-
var p0 = randomRegex(def.
|
|
269
|
+
var p0 = randomRegex(def.j25_1.g26_1, random);
|
|
260
270
|
return JsonPrimitive(p0);
|
|
261
271
|
}
|
|
262
272
|
function generateEnum(def, random) {
|
|
263
273
|
// Inline function 'kotlin.let' call
|
|
264
274
|
// Inline function 'kotlin.let' call
|
|
265
|
-
var this_0 = random.sf(def.
|
|
275
|
+
var this_0 = random.sf(def.m25_1.j());
|
|
266
276
|
// Inline function 'kotlin.contracts.contract' call
|
|
267
277
|
// Inline function 'kotlin.contracts.contract' call
|
|
268
|
-
var p0 = toList(def.
|
|
278
|
+
var p0 = toList(def.m25_1).k(this_0);
|
|
269
279
|
return JsonPrimitive(p0);
|
|
270
280
|
}
|
|
271
281
|
function generateUnion(_this__u8e3s4, def, random) {
|
|
272
282
|
// Inline function 'kotlin.let' call
|
|
273
283
|
// Inline function 'kotlin.let' call
|
|
274
|
-
var this_0 = random.sf(def.
|
|
284
|
+
var this_0 = random.sf(def.c25_1.j());
|
|
275
285
|
// Inline function 'kotlin.contracts.contract' call
|
|
276
286
|
// Inline function 'kotlin.contracts.contract' call
|
|
277
287
|
// Inline function 'community.flock.wirespec.generator.generateUnion.<anonymous>' call
|
|
278
|
-
var it = toList(def.
|
|
288
|
+
var it = toList(def.c25_1).k(this_0);
|
|
279
289
|
return generate_0(_this__u8e3s4, it, random);
|
|
280
290
|
}
|
|
281
291
|
function randomRegex(regex, random) {
|
|
@@ -284,7 +294,7 @@
|
|
|
284
294
|
var endIndex = regex.length - 2 | 0;
|
|
285
295
|
// Inline function 'kotlin.js.asDynamic' call
|
|
286
296
|
var tmp$ret$1 = regex.substring(1, endIndex);
|
|
287
|
-
return tmp.
|
|
297
|
+
return tmp.s48(tmp$ret$1).b49(random);
|
|
288
298
|
}
|
|
289
299
|
//region block: exports
|
|
290
300
|
_.$_$ = _.$_$ || {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/tools/generator/src/commonMain/kotlin/community/flock/wirespec/generator/Generator.kt","../../../../../src/plugin/npm/build/compileSync/js/main/productionLibrary/kotlin/src/kotlin/util/Standard.kt","../../../../../src/plugin/npm/build/compileSync/js/main/productionLibrary/kotlin/common/src/generated/_Collections.kt","../../../../../src/plugin/npm/build/compileSync/js/main/productionLibrary/kotlin/common/src/generated/_Strings.kt","../../../../../src/plugin/npm/build/compileSync/js/main/productionLibrary/kotlin/src/kotlin/CharCode.kt","../../../../../src/plugin/npm/build/compileSync/js/main/productionLibrary/kotlin/js/src/kotlin/text/stringJs.kt"],"sourcesContent":[null,null,null,null,null,null],"names":["generate","<this>","type","random","generateReference","ref","generateIterator","def","item","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/tools/generator/src/commonMain/kotlin/community/flock/wirespec/generator/Generator.kt","../../../../../src/plugin/npm/build/compileSync/js/main/productionLibrary/kotlin/src/kotlin/util/Standard.kt","../../../../../src/plugin/npm/build/compileSync/js/main/productionLibrary/kotlin/common/src/generated/_Collections.kt","../../../../../src/plugin/npm/build/compileSync/js/main/productionLibrary/kotlin/common/src/generated/_Strings.kt","../../../../../src/plugin/npm/build/compileSync/js/main/productionLibrary/kotlin/src/kotlin/CharCode.kt","../../../../../src/plugin/npm/build/compileSync/js/main/productionLibrary/kotlin/js/src/kotlin/text/stringJs.kt"],"sourcesContent":[null,null,null,null,null,null],"names":["generate","<this>","type","random","generateReference","ref","generateIterator","def","item","resolveReference","element","generateObject","generateType","accumulator","sum","fieldSeed","fieldRandom","generateRefined","generateEnum","generateUnion","randomRegex","regex"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAoBAA,CAAIC,a,EAAaC,I,EAAcC,MAA/BH,EACI;A;;;;;aCaH,WAA6B,aAAL,IAAK,EAAa,IAAb,CAA7B,EAEG,KAFH,C;;;eDTuB,SAAL,IAAK,EAAS,IAAT,CAAL,GAA+B,aAAqB,EAArB,EAAsC,KAAtC,CAA/B,GAAiF,E;IAC/D,OAAtB,0BAAS,IAAT,EAAa,MAAb,C;EAAqB,C;qBAEpCA,CAAIC,a,EAAaC,I,EAAiBC,MAAlCH,EACI;A;IAA+B,OAA/B,iCAAkB,IAAlB,EAAwB,MAAxB,C;EAA8B,C;4BAUlCI,CAAYH,a,EAAsBI,G,EAAgBF,MAAlDC,EAAoE;A;IAChE,IADsE,GACtE,iB;MA5BoD,MACpD,yB;;MA4BA,IAFsE,GAEtE,qB;cAAyB,gCAAiB,gCAAiB,GAAjB,CAAqB,KAArB,CAAjB,EAAkD,MAAlD,C;;QACzB,IAHsE,GAGtE,sB;cAAoC,eAAJ,GAAI,M;;UAChC,oC;;;qBCmBkD,MAAO,K;oBAAc,mB;;YDlBvE,qC;;;yBCkBsI,MAE7I,K;sBAAiB,q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