@flock/wirespec 0.16.13 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/clikt-clikt.mjs +1166 -1166
- package/colormath-root-colormath.mjs +425 -425
- package/kotlin-kotlin-stdlib.mjs +6 -2
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1767 -1767
- package/kotlinx-io-kotlinx-io-core.mjs +380 -380
- package/markdown.mjs +1864 -1864
- package/mordant-mordant.mjs +1638 -1638
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +3947 -3030
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +245 -245
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +181 -181
- package/wirespec-src-compiler-emitters-python.mjs +244 -244
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +227 -227
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +72 -72
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +411 -397
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +295 -290
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +525 -497
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +136 -136
- package/wirespec-src-plugin-cli.mjs +75 -75
- package/wirespec-src-plugin-npm.d.ts +1 -1
- package/wirespec-src-plugin-npm.mjs +314 -195
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +24 -24
|
@@ -85,7 +85,7 @@ function generateReference(_this__u8e3s4, ref, random) {
|
|
|
85
85
|
tmp = generateIterator(_this__u8e3s4, resolveReference(_this__u8e3s4, ref.r23_1), random);
|
|
86
86
|
} else {
|
|
87
87
|
if (ref instanceof Primitive) {
|
|
88
|
-
var tmp1_subject = ref.
|
|
88
|
+
var tmp1_subject = ref.v29_1;
|
|
89
89
|
var tmp_0;
|
|
90
90
|
if (tmp1_subject instanceof Integer) {
|
|
91
91
|
// Inline function 'kotlin.let' call
|
|
@@ -152,9 +152,9 @@ function generateIterator(_this__u8e3s4, def, random) {
|
|
|
152
152
|
function resolveReference(_this__u8e3s4, type) {
|
|
153
153
|
// Inline function 'kotlin.collections.find' call
|
|
154
154
|
// Inline function 'arrow.core.NonEmptyList.flatMap' call
|
|
155
|
-
var this_0 = _this__u8e3s4.
|
|
155
|
+
var this_0 = _this__u8e3s4.s25_1;
|
|
156
156
|
// Inline function 'community.flock.wirespec.generator.resolveReference.<anonymous>' call
|
|
157
|
-
var tmp = this_0.pk_1.
|
|
157
|
+
var tmp = this_0.pk_1.u25_1.nk();
|
|
158
158
|
// Inline function 'kotlin.collections.flatMap' call
|
|
159
159
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
160
160
|
var this_1 = this_0.qk_1;
|
|
@@ -163,7 +163,7 @@ function resolveReference(_this__u8e3s4, type) {
|
|
|
163
163
|
while (tmp0_iterator.h()) {
|
|
164
164
|
var element = tmp0_iterator.i();
|
|
165
165
|
// Inline function 'community.flock.wirespec.generator.resolveReference.<anonymous>' call
|
|
166
|
-
var list = element.
|
|
166
|
+
var list = element.u25_1;
|
|
167
167
|
addAll(destination, list);
|
|
168
168
|
}
|
|
169
169
|
var this_2 = tmp.uk(destination).tk();
|
|
@@ -174,7 +174,7 @@ function resolveReference(_this__u8e3s4, type) {
|
|
|
174
174
|
while (tmp0_iterator_0.h()) {
|
|
175
175
|
var element_0 = tmp0_iterator_0.i();
|
|
176
176
|
// Inline function 'community.flock.wirespec.generator.resolveReference.<anonymous>' call
|
|
177
|
-
if (element_0.
|
|
177
|
+
if (element_0.l26().b1() === type.b1()) {
|
|
178
178
|
tmp$ret$6 = element_0;
|
|
179
179
|
break $l$block;
|
|
180
180
|
}
|
|
@@ -194,7 +194,7 @@ function resolveReference(_this__u8e3s4, type) {
|
|
|
194
194
|
function defaultGenerator(random) {
|
|
195
195
|
// Inline function 'kotlin.let' call
|
|
196
196
|
// Inline function 'kotlin.contracts.contract' call
|
|
197
|
-
var p0 = Companion_instance.
|
|
197
|
+
var p0 = Companion_instance.s4e('\\w{1,50}').b4f(random);
|
|
198
198
|
return JsonPrimitive_1(p0);
|
|
199
199
|
}
|
|
200
200
|
function generateObject(_this__u8e3s4, def, random) {
|
|
@@ -233,7 +233,7 @@ function generateType(_this__u8e3s4, def, random) {
|
|
|
233
233
|
var typeSeed = random.ge();
|
|
234
234
|
// Inline function 'kotlin.let' call
|
|
235
235
|
// Inline function 'kotlin.collections.fold' call
|
|
236
|
-
var this_0 = def.
|
|
236
|
+
var this_0 = def.o24_1.k24_1;
|
|
237
237
|
var accumulator = emptyMap();
|
|
238
238
|
var tmp0_iterator = this_0.g();
|
|
239
239
|
while (tmp0_iterator.h()) {
|
|
@@ -243,7 +243,7 @@ function generateType(_this__u8e3s4, def, random) {
|
|
|
243
243
|
// Inline function 'kotlin.let' call
|
|
244
244
|
// Inline function 'kotlin.contracts.contract' call
|
|
245
245
|
// Inline function 'community.flock.wirespec.generator.generateType.<anonymous>.<anonymous>.<anonymous>' call
|
|
246
|
-
var value = element.
|
|
246
|
+
var value = element.r24_1.b1();
|
|
247
247
|
// Inline function 'kotlin.text.sumOf' call
|
|
248
248
|
var sum = 0;
|
|
249
249
|
var inductionVariable = 0;
|
|
@@ -257,17 +257,17 @@ function generateType(_this__u8e3s4, def, random) {
|
|
|
257
257
|
}
|
|
258
258
|
var fieldSeed = typeSeed + sum | 0;
|
|
259
259
|
var fieldRandom = Random(fieldSeed);
|
|
260
|
-
accumulator = plus(acc, to(value, generateReference(_this__u8e3s4, element.
|
|
260
|
+
accumulator = plus(acc, to(value, generateReference(_this__u8e3s4, element.s24_1, fieldRandom)));
|
|
261
261
|
}
|
|
262
262
|
// Inline function 'kotlin.contracts.contract' call
|
|
263
263
|
var p0 = accumulator;
|
|
264
264
|
return new JsonObject(p0);
|
|
265
265
|
}
|
|
266
266
|
function generateRefined(def, random) {
|
|
267
|
-
var type = def.
|
|
267
|
+
var type = def.t26_1.v29_1;
|
|
268
268
|
var tmp;
|
|
269
269
|
if (type instanceof String_0) {
|
|
270
|
-
var pattern = type.
|
|
270
|
+
var pattern = type.y28_1;
|
|
271
271
|
var tmp_0;
|
|
272
272
|
var tmp_1 = pattern;
|
|
273
273
|
if ((tmp_1 == null ? null : new RegExp_0(tmp_1))instanceof RegExp_0) {
|
|
@@ -296,12 +296,12 @@ function generateRefined(def, random) {
|
|
|
296
296
|
} else {
|
|
297
297
|
if (type instanceof Integer) {
|
|
298
298
|
// Inline function 'kotlin.let' call
|
|
299
|
-
var tmp0_safe_receiver = type.
|
|
300
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
299
|
+
var tmp0_safe_receiver = type.b29_1;
|
|
300
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w28_1;
|
|
301
301
|
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : toInt(tmp1_safe_receiver);
|
|
302
302
|
var tmp_3 = tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs;
|
|
303
|
-
var tmp3_safe_receiver = type.
|
|
304
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.
|
|
303
|
+
var tmp3_safe_receiver = type.b29_1;
|
|
304
|
+
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.x28_1;
|
|
305
305
|
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toInt(tmp4_safe_receiver);
|
|
306
306
|
// Inline function 'kotlin.contracts.contract' call
|
|
307
307
|
var p0_1 = random.uf(tmp_3, tmp5_elvis_lhs == null ? 0 : tmp5_elvis_lhs);
|
|
@@ -309,12 +309,12 @@ function generateRefined(def, random) {
|
|
|
309
309
|
} else {
|
|
310
310
|
if (type instanceof Number_0) {
|
|
311
311
|
// Inline function 'kotlin.let' call
|
|
312
|
-
var tmp6_safe_receiver = type.
|
|
313
|
-
var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.
|
|
312
|
+
var tmp6_safe_receiver = type.e29_1;
|
|
313
|
+
var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.w28_1;
|
|
314
314
|
var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : toDouble(tmp7_safe_receiver);
|
|
315
315
|
var tmp_4 = tmp8_elvis_lhs == null ? 0.0 : tmp8_elvis_lhs;
|
|
316
|
-
var tmp9_safe_receiver = type.
|
|
317
|
-
var tmp10_safe_receiver = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.
|
|
316
|
+
var tmp9_safe_receiver = type.e29_1;
|
|
317
|
+
var tmp10_safe_receiver = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.x28_1;
|
|
318
318
|
var tmp11_elvis_lhs = tmp10_safe_receiver == null ? null : toDouble(tmp10_safe_receiver);
|
|
319
319
|
// Inline function 'kotlin.contracts.contract' call
|
|
320
320
|
var p0_2 = random.xf(tmp_4, tmp11_elvis_lhs == null ? 0.0 : tmp11_elvis_lhs);
|
|
@@ -331,20 +331,20 @@ function generateRefined(def, random) {
|
|
|
331
331
|
function generateEnum(def, random) {
|
|
332
332
|
// Inline function 'kotlin.let' call
|
|
333
333
|
// Inline function 'kotlin.let' call
|
|
334
|
-
var this_0 = random.tf(def.
|
|
334
|
+
var this_0 = random.tf(def.y26_1.j());
|
|
335
335
|
// Inline function 'kotlin.contracts.contract' call
|
|
336
336
|
// Inline function 'kotlin.contracts.contract' call
|
|
337
|
-
var p0 = toList(def.
|
|
337
|
+
var p0 = toList(def.y26_1).k(this_0);
|
|
338
338
|
return JsonPrimitive_1(p0);
|
|
339
339
|
}
|
|
340
340
|
function generateUnion(_this__u8e3s4, def, random) {
|
|
341
341
|
// Inline function 'kotlin.let' call
|
|
342
342
|
// Inline function 'kotlin.let' call
|
|
343
|
-
var this_0 = random.tf(def.
|
|
343
|
+
var this_0 = random.tf(def.j24_1.j());
|
|
344
344
|
// Inline function 'kotlin.contracts.contract' call
|
|
345
345
|
// Inline function 'kotlin.contracts.contract' call
|
|
346
346
|
// Inline function 'community.flock.wirespec.generator.generateUnion.<anonymous>' call
|
|
347
|
-
var it = toList(def.
|
|
347
|
+
var it = toList(def.j24_1).k(this_0);
|
|
348
348
|
return generate_0(_this__u8e3s4, it, random);
|
|
349
349
|
}
|
|
350
350
|
function randomRegex(regex, random) {
|
|
@@ -353,7 +353,7 @@ function randomRegex(regex, random) {
|
|
|
353
353
|
var endIndex = regex.length - 2 | 0;
|
|
354
354
|
// Inline function 'kotlin.js.asDynamic' call
|
|
355
355
|
var tmp$ret$1 = regex.substring(1, endIndex);
|
|
356
|
-
return tmp.
|
|
356
|
+
return tmp.s4e(tmp$ret$1).b4f(random);
|
|
357
357
|
}
|
|
358
358
|
//region block: exports
|
|
359
359
|
export {
|