@flock/wirespec 0.9.28 → 0.9.29
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 +1156 -1156
- package/colormath-root-colormath.js +430 -430
- package/kotlin-kotlin-stdlib.js +5 -5
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-rgxgen.js +1763 -1763
- package/markdown.js +1871 -1871
- package/mordant-mordant.js +1641 -1641
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +1823 -1658
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +273 -273
- package/wirespec-src-converter-openapi.js +288 -288
- package/wirespec-src-plugin-arguments.js +79 -79
- package/wirespec-src-plugin-arguments.js.map +1 -1
- package/wirespec-src-plugin-cli.js +168 -137
- package/wirespec-src-plugin-cli.js.map +1 -1
- package/wirespec-src-plugin-npm.js +12 -12
- package/wirespec-src-tools-generator.js +13 -13
|
@@ -58,12 +58,20 @@
|
|
|
58
58
|
var setOf = kotlin_kotlin.$_$.s7;
|
|
59
59
|
var CliktCommand = kotlin_clikt_clikt.$_$.a;
|
|
60
60
|
var default_0 = kotlin_clikt_clikt.$_$.e;
|
|
61
|
+
var Companion_instance_1 = kotlin_community_flock_wirespec_compiler_core.$_$.d2;
|
|
62
|
+
var Level_ERROR_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.v1;
|
|
61
63
|
var flag = kotlin_clikt_clikt.$_$.f;
|
|
62
|
-
var
|
|
64
|
+
var Companion_instance_2 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.w;
|
|
63
65
|
var FullDirPath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.d;
|
|
64
66
|
var Console_instance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.v;
|
|
65
67
|
var toString = kotlin_kotlin.$_$.ya;
|
|
66
68
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.l1;
|
|
69
|
+
var THROW_CCE = kotlin_kotlin.$_$.ff;
|
|
70
|
+
var isCharSequence = kotlin_kotlin.$_$.ea;
|
|
71
|
+
var trim = kotlin_kotlin.$_$.me;
|
|
72
|
+
var Level_DEBUG_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.u1;
|
|
73
|
+
var Level_INFO_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.w1;
|
|
74
|
+
var Level_WARN_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.x1;
|
|
67
75
|
var Enum = kotlin_kotlin.$_$.ve;
|
|
68
76
|
var KProperty1 = kotlin_kotlin.$_$.pb;
|
|
69
77
|
var getPropertyCallableRef = kotlin_kotlin.$_$.r9;
|
|
@@ -76,7 +84,6 @@
|
|
|
76
84
|
var FullFilePath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.e;
|
|
77
85
|
var Console = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.b;
|
|
78
86
|
var Compile = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.f;
|
|
79
|
-
var THROW_CCE = kotlin_kotlin.$_$.ff;
|
|
80
87
|
var OpenApiV2Parser_instance = kotlin_community_flock_wirespec_converter_openapi.$_$.b;
|
|
81
88
|
var OpenApiV3Parser_instance = kotlin_community_flock_wirespec_converter_openapi.$_$.d;
|
|
82
89
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.h5;
|
|
@@ -101,10 +108,10 @@
|
|
|
101
108
|
var TypeScriptEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.e;
|
|
102
109
|
var FileExtension_TypeScript_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.n;
|
|
103
110
|
var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.f;
|
|
104
|
-
var WirespecSpec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
111
|
+
var WirespecSpec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.c2;
|
|
105
112
|
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.d1;
|
|
106
113
|
var Left = kotlin_io_arrow_kt_arrow_core.$_$.d;
|
|
107
|
-
var Companion_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
114
|
+
var Companion_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.a2;
|
|
108
115
|
var Right = kotlin_io_arrow_kt_arrow_core.$_$.e;
|
|
109
116
|
var println = kotlin_kotlin.$_$.z8;
|
|
110
117
|
var Output = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.h;
|
|
@@ -129,7 +136,7 @@
|
|
|
129
136
|
var filter = kotlin_kotlin.$_$.sb;
|
|
130
137
|
var toSet_0 = kotlin_kotlin.$_$.yb;
|
|
131
138
|
var split_0 = kotlin_kotlin.$_$.ld;
|
|
132
|
-
var
|
|
139
|
+
var Companion_instance_3 = kotlin_kotlin.$_$.b4;
|
|
133
140
|
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.a2;
|
|
134
141
|
var createFailure = kotlin_kotlin.$_$.uf;
|
|
135
142
|
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.d2;
|
|
@@ -154,7 +161,7 @@
|
|
|
154
161
|
//endregion
|
|
155
162
|
function WirespecCli$main$ref($boundThis) {
|
|
156
163
|
var l = function (p0) {
|
|
157
|
-
$boundThis.
|
|
164
|
+
$boundThis.g3u(p0);
|
|
158
165
|
return Unit_instance;
|
|
159
166
|
};
|
|
160
167
|
l.callableName = 'main';
|
|
@@ -162,39 +169,39 @@
|
|
|
162
169
|
}
|
|
163
170
|
function Companion() {
|
|
164
171
|
}
|
|
165
|
-
protoOf(Companion).
|
|
172
|
+
protoOf(Companion).l46 = function (compile, convert) {
|
|
166
173
|
return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile), new Convert_0(convert)]));
|
|
167
174
|
};
|
|
168
|
-
var
|
|
175
|
+
var Companion_instance_4;
|
|
169
176
|
function Companion_getInstance_0() {
|
|
170
|
-
return
|
|
177
|
+
return Companion_instance_4;
|
|
171
178
|
}
|
|
172
179
|
function WirespecCli() {
|
|
173
180
|
NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
|
|
174
181
|
}
|
|
175
182
|
function _get_languages__ojonze($this) {
|
|
176
|
-
return $this.
|
|
183
|
+
return $this.l47_1.s43($this, languages$factory_0());
|
|
177
184
|
}
|
|
178
185
|
function Compile_0(block) {
|
|
179
186
|
CommonOptions.call(this);
|
|
180
|
-
this.
|
|
181
|
-
this.
|
|
187
|
+
this.k47_1 = block;
|
|
188
|
+
this.l47_1 = multiple(choice(option(this, Options_Language_getInstance().o47_1.slice(), 'Language'), Companion_instance.l2e()), VOID, true).d44(this, languages$factory());
|
|
182
189
|
}
|
|
183
|
-
protoOf(Compile_0).
|
|
190
|
+
protoOf(Compile_0).h3u = function () {
|
|
184
191
|
// Inline function 'kotlin.let' call
|
|
185
|
-
var this_0 = new CompilerArguments(Compile_instance, this.
|
|
192
|
+
var this_0 = new CompilerArguments(Compile_instance, this.o48(this.n48()), Companion_instance_0.m2e(this.p48()), toSet(_get_languages__ojonze(this)), _PackageName___init__impl__s13tbs(this.q48()), this.s48(this.r48()), this.t48(), this.u48());
|
|
186
193
|
// Inline function 'kotlin.contracts.contract' call
|
|
187
|
-
this.
|
|
194
|
+
this.k47_1(this_0);
|
|
188
195
|
};
|
|
189
196
|
function _get_format__qlarck($this) {
|
|
190
|
-
return $this.
|
|
197
|
+
return $this.u49_1.s43($this, format$factory_0());
|
|
191
198
|
}
|
|
192
199
|
function _get_languages__ojonze_0($this) {
|
|
193
|
-
return $this.
|
|
200
|
+
return $this.v49_1.s43($this, languages$factory_2());
|
|
194
201
|
}
|
|
195
202
|
function Convert_0(block) {
|
|
196
203
|
CommonOptions.call(this);
|
|
197
|
-
this.
|
|
204
|
+
this.t49_1 = block;
|
|
198
205
|
var tmp = this;
|
|
199
206
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
200
207
|
var this_0 = argument(this, VOID, 'Input format');
|
|
@@ -214,21 +221,21 @@
|
|
|
214
221
|
var tmp$ret$2 = element.p2_1;
|
|
215
222
|
destination.m2(tmp$ret$2, element);
|
|
216
223
|
}
|
|
217
|
-
tmp.
|
|
218
|
-
this.
|
|
224
|
+
tmp.u49_1 = choice_0(this_0, destination, true).y42(this, format$factory());
|
|
225
|
+
this.v49_1 = multiple(choice(option(this, Options_Language_getInstance().o47_1.slice(), 'Language'), Companion_instance.l2e(), VOID, true), listOf(Language_Wirespec_getInstance())).d44(this, languages$factory_1());
|
|
219
226
|
}
|
|
220
|
-
protoOf(Convert_0).
|
|
221
|
-
if (this.
|
|
227
|
+
protoOf(Convert_0).h3u = function () {
|
|
228
|
+
if (this.n48() == null)
|
|
222
229
|
null;
|
|
223
230
|
else {
|
|
224
231
|
// Inline function 'kotlin.let' call
|
|
225
232
|
// Inline function 'kotlin.contracts.contract' call
|
|
226
|
-
this.
|
|
233
|
+
this.a3u('To convert, please specify a file', VOID, true);
|
|
227
234
|
}
|
|
228
235
|
// Inline function 'kotlin.let' call
|
|
229
236
|
var tmp = new Convert(_get_format__qlarck(this));
|
|
230
|
-
var tmp_0 = this.
|
|
231
|
-
var tmp_1 = Companion_instance_0.
|
|
237
|
+
var tmp_0 = this.o48(null);
|
|
238
|
+
var tmp_1 = Companion_instance_0.m2e(this.p48());
|
|
232
239
|
// Inline function 'kotlin.collections.ifEmpty' call
|
|
233
240
|
var this_0 = toSet(_get_languages__ojonze_0(this));
|
|
234
241
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -240,42 +247,42 @@
|
|
|
240
247
|
tmp_2 = this_0;
|
|
241
248
|
}
|
|
242
249
|
var tmp$ret$2 = tmp_2;
|
|
243
|
-
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.
|
|
250
|
+
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.q48()), this.s48(this.r48()), this.t48(), this.u48());
|
|
244
251
|
// Inline function 'kotlin.contracts.contract' call
|
|
245
|
-
this.
|
|
252
|
+
this.t49_1(this_1);
|
|
246
253
|
};
|
|
247
254
|
function _get_inputFile__x1bqj($this) {
|
|
248
|
-
return $this.
|
|
255
|
+
return $this.g48_1.s43($this, inputFile$factory_0());
|
|
249
256
|
}
|
|
250
257
|
function CommonOptions() {
|
|
251
258
|
CliktCommand.call(this);
|
|
252
|
-
this.
|
|
253
|
-
this.
|
|
254
|
-
this.
|
|
255
|
-
this.
|
|
256
|
-
this.
|
|
257
|
-
this.
|
|
258
|
-
this.
|
|
259
|
-
}
|
|
260
|
-
protoOf(CommonOptions).
|
|
261
|
-
return this.
|
|
259
|
+
this.g48_1 = option(this, Options_InputFile_getInstance().o47_1.slice(), 'Input file').d44(this, inputFile$factory());
|
|
260
|
+
this.h48_1 = option(this, Options_InputDir_getInstance().o47_1.slice(), 'Input directory').d44(this, inputDir$factory());
|
|
261
|
+
this.i48_1 = option(this, Options_OutputDir_getInstance().o47_1.slice(), 'Output directory').d44(this, outputDir$factory());
|
|
262
|
+
this.j48_1 = default_0(option(this, Options_PackageName_getInstance().o47_1.slice(), 'Package name'), 'community.flock.wirespec.generated').d44(this, packageName$factory());
|
|
263
|
+
this.k48_1 = default_0(option(this, Options_LogLevel_getInstance().o47_1.slice(), 'Log level: ' + Companion_instance_1.toString()), Level_ERROR_getInstance().toString()).d44(this, logLevel$factory());
|
|
264
|
+
this.l48_1 = flag(option(this, Options_Shared_getInstance().o47_1.slice(), 'Generate shared wirespec code'), [], false).d44(this, shared$factory());
|
|
265
|
+
this.m48_1 = flag(option(this, Options_Strict_getInstance().o47_1.slice(), 'Strict mode'), []).d44(this, strict$factory());
|
|
266
|
+
}
|
|
267
|
+
protoOf(CommonOptions).n48 = function () {
|
|
268
|
+
return this.h48_1.s43(this, inputDir$factory_0());
|
|
262
269
|
};
|
|
263
|
-
protoOf(CommonOptions).
|
|
264
|
-
return this.
|
|
270
|
+
protoOf(CommonOptions).p48 = function () {
|
|
271
|
+
return this.i48_1.s43(this, outputDir$factory_0());
|
|
265
272
|
};
|
|
266
|
-
protoOf(CommonOptions).
|
|
267
|
-
return this.
|
|
273
|
+
protoOf(CommonOptions).q48 = function () {
|
|
274
|
+
return this.j48_1.s43(this, packageName$factory_0());
|
|
268
275
|
};
|
|
269
|
-
protoOf(CommonOptions).
|
|
270
|
-
return this.
|
|
276
|
+
protoOf(CommonOptions).r48 = function () {
|
|
277
|
+
return this.k48_1.s43(this, logLevel$factory_0());
|
|
271
278
|
};
|
|
272
|
-
protoOf(CommonOptions).
|
|
273
|
-
return this.
|
|
279
|
+
protoOf(CommonOptions).t48 = function () {
|
|
280
|
+
return this.l48_1.s43(this, shared$factory_0());
|
|
274
281
|
};
|
|
275
|
-
protoOf(CommonOptions).
|
|
276
|
-
return this.
|
|
282
|
+
protoOf(CommonOptions).u48 = function () {
|
|
283
|
+
return this.m48_1.s43(this, strict$factory_0());
|
|
277
284
|
};
|
|
278
|
-
protoOf(CommonOptions).
|
|
285
|
+
protoOf(CommonOptions).o48 = function (inputDir) {
|
|
279
286
|
var tmp;
|
|
280
287
|
if (!(inputDir == null) && !(_get_inputFile__x1bqj(this) == null)) {
|
|
281
288
|
var message = 'Choose either a file or a directory. Not Both.';
|
|
@@ -288,7 +295,7 @@
|
|
|
288
295
|
} else {
|
|
289
296
|
// Inline function 'kotlin.let' call
|
|
290
297
|
// Inline function 'kotlin.contracts.contract' call
|
|
291
|
-
tmp_0 =
|
|
298
|
+
tmp_0 = Companion_instance_2.a2e(tmp0_safe_receiver);
|
|
292
299
|
}
|
|
293
300
|
var tmp0_elvis_lhs = tmp_0;
|
|
294
301
|
var tmp_1;
|
|
@@ -310,14 +317,38 @@
|
|
|
310
317
|
}
|
|
311
318
|
return tmp;
|
|
312
319
|
};
|
|
320
|
+
protoOf(CommonOptions).s48 = function (_this__u8e3s4) {
|
|
321
|
+
// Inline function 'kotlin.text.uppercase' call
|
|
322
|
+
// Inline function 'kotlin.text.trim' call
|
|
323
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
324
|
+
var tmp;
|
|
325
|
+
switch (toString(trim(isCharSequence(_this__u8e3s4) ? _this__u8e3s4 : THROW_CCE())).toUpperCase()) {
|
|
326
|
+
case 'DEBUG':
|
|
327
|
+
tmp = Level_DEBUG_getInstance();
|
|
328
|
+
break;
|
|
329
|
+
case 'INFO':
|
|
330
|
+
tmp = Level_INFO_getInstance();
|
|
331
|
+
break;
|
|
332
|
+
case 'WARN':
|
|
333
|
+
tmp = Level_WARN_getInstance();
|
|
334
|
+
break;
|
|
335
|
+
case 'ERROR':
|
|
336
|
+
tmp = Level_ERROR_getInstance();
|
|
337
|
+
break;
|
|
338
|
+
default:
|
|
339
|
+
var message = 'Choose one of these log levels: ' + Companion_instance_1.toString();
|
|
340
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
341
|
+
}
|
|
342
|
+
return tmp;
|
|
343
|
+
};
|
|
313
344
|
var Options_InputDir_instance;
|
|
314
345
|
var Options_InputFile_instance;
|
|
315
346
|
var Options_OutputDir_instance;
|
|
316
347
|
var Options_Language_instance;
|
|
317
348
|
var Options_PackageName_instance;
|
|
349
|
+
var Options_LogLevel_instance;
|
|
318
350
|
var Options_Shared_instance;
|
|
319
351
|
var Options_Strict_instance;
|
|
320
|
-
var Options_Debug_instance;
|
|
321
352
|
var Options_entriesInitialized;
|
|
322
353
|
function Options_initEntries() {
|
|
323
354
|
if (Options_entriesInitialized)
|
|
@@ -328,13 +359,13 @@
|
|
|
328
359
|
Options_OutputDir_instance = new Options('OutputDir', 2, ['-o', '--output-dir']);
|
|
329
360
|
Options_Language_instance = new Options('Language', 3, ['-l', '--language']);
|
|
330
361
|
Options_PackageName_instance = new Options('PackageName', 4, ['-p', '--package']);
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
362
|
+
Options_LogLevel_instance = new Options('LogLevel', 5, ['--log-level']);
|
|
363
|
+
Options_Shared_instance = new Options('Shared', 6, ['--shared']);
|
|
364
|
+
Options_Strict_instance = new Options('Strict', 7, ['--strict']);
|
|
334
365
|
}
|
|
335
366
|
function Options(name, ordinal, flags) {
|
|
336
367
|
Enum.call(this, name, ordinal);
|
|
337
|
-
this.
|
|
368
|
+
this.o47_1 = flags;
|
|
338
369
|
}
|
|
339
370
|
function Options_InputDir_getInstance() {
|
|
340
371
|
Options_initEntries();
|
|
@@ -356,6 +387,10 @@
|
|
|
356
387
|
Options_initEntries();
|
|
357
388
|
return Options_PackageName_instance;
|
|
358
389
|
}
|
|
390
|
+
function Options_LogLevel_getInstance() {
|
|
391
|
+
Options_initEntries();
|
|
392
|
+
return Options_LogLevel_instance;
|
|
393
|
+
}
|
|
359
394
|
function Options_Shared_getInstance() {
|
|
360
395
|
Options_initEntries();
|
|
361
396
|
return Options_Shared_instance;
|
|
@@ -364,10 +399,6 @@
|
|
|
364
399
|
Options_initEntries();
|
|
365
400
|
return Options_Strict_instance;
|
|
366
401
|
}
|
|
367
|
-
function Options_Debug_getInstance() {
|
|
368
|
-
Options_initEntries();
|
|
369
|
-
return Options_Debug_instance;
|
|
370
|
-
}
|
|
371
402
|
function languages$factory() {
|
|
372
403
|
return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
|
|
373
404
|
return _get_languages__ojonze(receiver);
|
|
@@ -405,32 +436,32 @@
|
|
|
405
436
|
}
|
|
406
437
|
function inputDir$factory() {
|
|
407
438
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
408
|
-
return receiver.
|
|
439
|
+
return receiver.n48();
|
|
409
440
|
}, null);
|
|
410
441
|
}
|
|
411
442
|
function outputDir$factory() {
|
|
412
443
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
413
|
-
return receiver.
|
|
444
|
+
return receiver.p48();
|
|
414
445
|
}, null);
|
|
415
446
|
}
|
|
416
447
|
function packageName$factory() {
|
|
417
448
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
418
|
-
return receiver.
|
|
449
|
+
return receiver.q48();
|
|
450
|
+
}, null);
|
|
451
|
+
}
|
|
452
|
+
function logLevel$factory() {
|
|
453
|
+
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
454
|
+
return receiver.r48();
|
|
419
455
|
}, null);
|
|
420
456
|
}
|
|
421
457
|
function shared$factory() {
|
|
422
458
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
423
|
-
return receiver.
|
|
459
|
+
return receiver.t48();
|
|
424
460
|
}, null);
|
|
425
461
|
}
|
|
426
462
|
function strict$factory() {
|
|
427
463
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
428
|
-
return receiver.
|
|
429
|
-
}, null);
|
|
430
|
-
}
|
|
431
|
-
function debug$factory() {
|
|
432
|
-
return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
|
|
433
|
-
return receiver.l48();
|
|
464
|
+
return receiver.u48();
|
|
434
465
|
}, null);
|
|
435
466
|
}
|
|
436
467
|
function inputFile$factory_0() {
|
|
@@ -440,32 +471,32 @@
|
|
|
440
471
|
}
|
|
441
472
|
function inputDir$factory_0() {
|
|
442
473
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
443
|
-
return receiver.
|
|
474
|
+
return receiver.n48();
|
|
444
475
|
}, null);
|
|
445
476
|
}
|
|
446
477
|
function outputDir$factory_0() {
|
|
447
478
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
448
|
-
return receiver.
|
|
479
|
+
return receiver.p48();
|
|
449
480
|
}, null);
|
|
450
481
|
}
|
|
451
482
|
function packageName$factory_0() {
|
|
452
483
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
453
|
-
return receiver.
|
|
484
|
+
return receiver.q48();
|
|
485
|
+
}, null);
|
|
486
|
+
}
|
|
487
|
+
function logLevel$factory_0() {
|
|
488
|
+
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
489
|
+
return receiver.r48();
|
|
454
490
|
}, null);
|
|
455
491
|
}
|
|
456
492
|
function shared$factory_0() {
|
|
457
493
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
458
|
-
return receiver.
|
|
494
|
+
return receiver.t48();
|
|
459
495
|
}, null);
|
|
460
496
|
}
|
|
461
497
|
function strict$factory_0() {
|
|
462
498
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
463
|
-
return receiver.
|
|
464
|
-
}, null);
|
|
465
|
-
}
|
|
466
|
-
function debug$factory_0() {
|
|
467
|
-
return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
|
|
468
|
-
return receiver.l48();
|
|
499
|
+
return receiver.u48();
|
|
469
500
|
}, null);
|
|
470
501
|
}
|
|
471
502
|
function main(args) {
|
|
@@ -490,30 +521,30 @@
|
|
|
490
521
|
}
|
|
491
522
|
}
|
|
492
523
|
var this_1 = copyToArray(destination);
|
|
493
|
-
var tmp =
|
|
524
|
+
var tmp = Companion_instance_4;
|
|
494
525
|
var tmp_0 = compile$ref();
|
|
495
526
|
// Inline function 'kotlin.contracts.contract' call
|
|
496
|
-
tmp.
|
|
527
|
+
tmp.l46(tmp_0, convert$ref())(this_1);
|
|
497
528
|
}
|
|
498
529
|
function compile_0(arguments_0) {
|
|
499
|
-
var input = arguments_0.
|
|
500
|
-
var output = arguments_0.
|
|
501
|
-
var languages = arguments_0.
|
|
502
|
-
var packageName = arguments_0.
|
|
503
|
-
var logger = new Logger(arguments_0.
|
|
504
|
-
var operation = arguments_0.
|
|
530
|
+
var input = arguments_0.r2d_1;
|
|
531
|
+
var output = arguments_0.s2d_1;
|
|
532
|
+
var languages = arguments_0.t2d_1;
|
|
533
|
+
var packageName = arguments_0.u2d_1;
|
|
534
|
+
var logger = new Logger(arguments_0.v2d_1);
|
|
535
|
+
var operation = arguments_0.q2d_1;
|
|
505
536
|
if (operation instanceof Convert) {
|
|
506
537
|
var fullPath = input instanceof FullFilePath ? input : THROW_CCE();
|
|
507
538
|
var file = new JsonFile(fullPath);
|
|
508
|
-
var strict = arguments_0.
|
|
509
|
-
var format = operation.
|
|
539
|
+
var strict = arguments_0.x2d_1;
|
|
540
|
+
var format = operation.z2d_1;
|
|
510
541
|
var tmp;
|
|
511
542
|
switch (format.q2_1) {
|
|
512
543
|
case 0:
|
|
513
|
-
tmp = OpenApiV2Parser_instance.
|
|
544
|
+
tmp = OpenApiV2Parser_instance.c2f(file.y1a(), !strict);
|
|
514
545
|
break;
|
|
515
546
|
case 1:
|
|
516
|
-
tmp = OpenApiV3Parser_instance.
|
|
547
|
+
tmp = OpenApiV3Parser_instance.c2f(file.y1a(), !strict);
|
|
517
548
|
break;
|
|
518
549
|
default:
|
|
519
550
|
noWhenBranchMatchedException();
|
|
@@ -532,11 +563,11 @@
|
|
|
532
563
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
533
564
|
var emitter = item.od();
|
|
534
565
|
var file_0 = item.pd();
|
|
535
|
-
var results = emitter.
|
|
566
|
+
var results = emitter.o22(ast);
|
|
536
567
|
var tmp_0;
|
|
537
|
-
if (!emitter.
|
|
568
|
+
if (!emitter.n22_1) {
|
|
538
569
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
539
|
-
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.
|
|
570
|
+
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.f2e_1);
|
|
540
571
|
var tmp_1;
|
|
541
572
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
542
573
|
if (charSequenceLength(this_1) > 0) {
|
|
@@ -553,7 +584,7 @@
|
|
|
553
584
|
tmp_1 = this_1;
|
|
554
585
|
}
|
|
555
586
|
var tmp$ret$6 = tmp_1;
|
|
556
|
-
tmp_0 = to(listOf(new Emitted(tmp$ret$6, first(results).
|
|
587
|
+
tmp_0 = to(listOf(new Emitted(tmp$ret$6, first(results).w24_1)), file_0);
|
|
557
588
|
} else {
|
|
558
589
|
tmp_0 = to(results, file_0);
|
|
559
590
|
}
|
|
@@ -577,19 +608,19 @@
|
|
|
577
608
|
} else {
|
|
578
609
|
if (input instanceof FullDirPath) {
|
|
579
610
|
// Inline function 'kotlin.collections.forEach' call
|
|
580
|
-
var tmp0_iterator_1 = (new Directory(input.
|
|
611
|
+
var tmp0_iterator_1 = (new Directory(input.k2e_1)).y49().g();
|
|
581
612
|
while (tmp0_iterator_1.h()) {
|
|
582
613
|
var element = tmp0_iterator_1.i();
|
|
583
614
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
584
|
-
wirespec(element, languages, packageName, out(element.
|
|
615
|
+
wirespec(element, languages, packageName, out(element.w49_1, packageName, output), logger);
|
|
585
616
|
}
|
|
586
617
|
} else {
|
|
587
618
|
if (input instanceof FullFilePath)
|
|
588
|
-
if (input.
|
|
619
|
+
if (input.g2e_1.equals(FileExtension_Wirespec_getInstance())) {
|
|
589
620
|
// Inline function 'kotlin.let' call
|
|
590
621
|
// Inline function 'kotlin.contracts.contract' call
|
|
591
622
|
var it = new WirespecFile(input);
|
|
592
|
-
wirespec(it, languages, packageName, out(it.
|
|
623
|
+
wirespec(it, languages, packageName, out(it.w49_1, packageName, output), logger);
|
|
593
624
|
} else {
|
|
594
625
|
// Inline function 'kotlin.error' call
|
|
595
626
|
var message = 'Path ' + input.toString() + ' is not a Wirespec file';
|
|
@@ -619,12 +650,12 @@
|
|
|
619
650
|
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>' call
|
|
620
651
|
var name = element.od();
|
|
621
652
|
var result = element.pd();
|
|
622
|
-
var
|
|
653
|
+
var tmp14_safe_receiver = file == null ? null : file.z49(_FileName___init__impl__nzn12e(name));
|
|
623
654
|
var tmp;
|
|
624
|
-
if (
|
|
655
|
+
if (tmp14_safe_receiver == null) {
|
|
625
656
|
tmp = null;
|
|
626
657
|
} else {
|
|
627
|
-
|
|
658
|
+
tmp14_safe_receiver.s18(result);
|
|
628
659
|
tmp = Unit_instance;
|
|
629
660
|
}
|
|
630
661
|
if (tmp == null) {
|
|
@@ -744,7 +775,7 @@
|
|
|
744
775
|
var file = item.pd();
|
|
745
776
|
var results = this_1(emitter);
|
|
746
777
|
var tmp;
|
|
747
|
-
if (!emitter.
|
|
778
|
+
if (!emitter.n22_1) {
|
|
748
779
|
// Inline function 'arrow.core.Either.map' call
|
|
749
780
|
// Inline function 'kotlin.contracts.contract' call
|
|
750
781
|
// Inline function 'arrow.core.flatMap' call
|
|
@@ -754,7 +785,7 @@
|
|
|
754
785
|
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
755
786
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>.<anonymous>' call
|
|
756
787
|
var it = results.zj_1;
|
|
757
|
-
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().
|
|
788
|
+
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().i23(_FileName___get_value__impl__3u4cz6(path(FileExtension_Wirespec_getInstance()).f2e_1)), first(it).w24_1));
|
|
758
789
|
tmp_0 = new Right(tmp$ret$2);
|
|
759
790
|
} else {
|
|
760
791
|
if (results instanceof Left) {
|
|
@@ -809,7 +840,7 @@
|
|
|
809
840
|
function compile$lambda($output) {
|
|
810
841
|
return function (it) {
|
|
811
842
|
var tmp = $output;
|
|
812
|
-
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).
|
|
843
|
+
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).n2e_1), _FileName___init__impl__nzn12e('console'), it);
|
|
813
844
|
};
|
|
814
845
|
}
|
|
815
846
|
function out$lambda($output, $this_out, $packageName) {
|
|
@@ -821,49 +852,49 @@
|
|
|
821
852
|
// Inline function 'kotlin.text.lowercase' call
|
|
822
853
|
// Inline function 'kotlin.js.asDynamic' call
|
|
823
854
|
var tmp$ret$1 = extension.p2_1.toLowerCase();
|
|
824
|
-
tmp = $this_out.
|
|
855
|
+
tmp = $this_out.e2e_1 + '/out/' + tmp$ret$1;
|
|
825
856
|
} else {
|
|
826
857
|
tmp = new Output(tmp0_elvis_lhs);
|
|
827
858
|
}
|
|
828
859
|
var dir = tmp;
|
|
829
|
-
return $this_out.
|
|
860
|
+
return $this_out.i2e(toString(dir) + '/' + joinToString(split(_PackageName___get_value__impl__2zr98c($packageName), charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
|
|
830
861
|
};
|
|
831
862
|
}
|
|
832
863
|
function JavaFile(path) {
|
|
833
|
-
File.call(this, path.
|
|
864
|
+
File.call(this, path.i2e(VOID, VOID, FileExtension_Java_getInstance()));
|
|
834
865
|
}
|
|
835
|
-
protoOf(JavaFile).
|
|
836
|
-
return new JavaFile(this.
|
|
866
|
+
protoOf(JavaFile).z49 = function (fileName) {
|
|
867
|
+
return new JavaFile(this.w49_1.i2e(VOID, fileName));
|
|
837
868
|
};
|
|
838
869
|
function JsonFile(path) {
|
|
839
|
-
File.call(this, path.
|
|
870
|
+
File.call(this, path.i2e(VOID, VOID, FileExtension_Json_getInstance()));
|
|
840
871
|
}
|
|
841
|
-
protoOf(JsonFile).
|
|
842
|
-
return new JsonFile(this.
|
|
872
|
+
protoOf(JsonFile).z49 = function (fileName) {
|
|
873
|
+
return new JsonFile(this.w49_1.i2e(VOID, fileName));
|
|
843
874
|
};
|
|
844
875
|
function KotlinFile(path) {
|
|
845
|
-
File.call(this, path.
|
|
876
|
+
File.call(this, path.i2e(VOID, VOID, FileExtension_Kotlin_getInstance()));
|
|
846
877
|
}
|
|
847
|
-
protoOf(KotlinFile).
|
|
848
|
-
return new KotlinFile(this.
|
|
878
|
+
protoOf(KotlinFile).z49 = function (fileName) {
|
|
879
|
+
return new KotlinFile(this.w49_1.i2e(VOID, fileName));
|
|
849
880
|
};
|
|
850
881
|
function ScalaFile(path) {
|
|
851
|
-
File.call(this, path.
|
|
882
|
+
File.call(this, path.i2e(VOID, VOID, FileExtension_Scala_getInstance()));
|
|
852
883
|
}
|
|
853
|
-
protoOf(ScalaFile).
|
|
854
|
-
return new ScalaFile(this.
|
|
884
|
+
protoOf(ScalaFile).z49 = function (fileName) {
|
|
885
|
+
return new ScalaFile(this.w49_1.i2e(VOID, fileName));
|
|
855
886
|
};
|
|
856
887
|
function TypeScriptFile(path) {
|
|
857
|
-
File.call(this, path.
|
|
888
|
+
File.call(this, path.i2e(VOID, VOID, FileExtension_TypeScript_getInstance()));
|
|
858
889
|
}
|
|
859
|
-
protoOf(TypeScriptFile).
|
|
860
|
-
return new TypeScriptFile(this.
|
|
890
|
+
protoOf(TypeScriptFile).z49 = function (fileName) {
|
|
891
|
+
return new TypeScriptFile(this.w49_1.i2e(VOID, fileName));
|
|
861
892
|
};
|
|
862
893
|
function WirespecFile(path) {
|
|
863
|
-
File.call(this, path.
|
|
894
|
+
File.call(this, path.i2e(VOID, VOID, FileExtension_Wirespec_getInstance()));
|
|
864
895
|
}
|
|
865
|
-
protoOf(WirespecFile).
|
|
866
|
-
return new WirespecFile(this.
|
|
896
|
+
protoOf(WirespecFile).z49 = function (fileName) {
|
|
897
|
+
return new WirespecFile(this.w49_1.i2e(VOID, fileName));
|
|
867
898
|
};
|
|
868
899
|
function cli(args) {
|
|
869
900
|
main(args);
|
|
@@ -926,14 +957,14 @@
|
|
|
926
957
|
return it;
|
|
927
958
|
}
|
|
928
959
|
function Directory$wirespecFiles$lambda_0(it) {
|
|
929
|
-
return endsWith(it, FileExtension_Wirespec_getInstance().
|
|
960
|
+
return endsWith(it, FileExtension_Wirespec_getInstance().d2e_1);
|
|
930
961
|
}
|
|
931
962
|
function Directory$wirespecFiles$lambda_1(it) {
|
|
932
|
-
return dropLast(it, FileExtension_Wirespec_getInstance().
|
|
963
|
+
return dropLast(it, FileExtension_Wirespec_getInstance().d2e_1.length + 1 | 0);
|
|
933
964
|
}
|
|
934
965
|
function Directory$wirespecFiles$lambda_2(this$0) {
|
|
935
966
|
return function (it) {
|
|
936
|
-
return new FullFilePath(this$0.
|
|
967
|
+
return new FullFilePath(this$0.x49_1, _FileName___init__impl__nzn12e(it));
|
|
937
968
|
};
|
|
938
969
|
}
|
|
939
970
|
function WirespecFile$_init_$ref_cj1n5j() {
|
|
@@ -944,10 +975,10 @@
|
|
|
944
975
|
return l;
|
|
945
976
|
}
|
|
946
977
|
function Directory(path) {
|
|
947
|
-
this.
|
|
978
|
+
this.x49_1 = path;
|
|
948
979
|
}
|
|
949
|
-
protoOf(Directory).
|
|
950
|
-
var tmp = asSequence(iterator(get_fs().readdirSync(this.
|
|
980
|
+
protoOf(Directory).y49 = function () {
|
|
981
|
+
var tmp = asSequence(iterator(get_fs().readdirSync(this.x49_1, 'utf-8')));
|
|
951
982
|
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
|
|
952
983
|
var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
|
|
953
984
|
var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
|
|
@@ -955,20 +986,20 @@
|
|
|
955
986
|
return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
|
|
956
987
|
};
|
|
957
988
|
function File(path) {
|
|
958
|
-
this.
|
|
989
|
+
this.w49_1 = path;
|
|
959
990
|
}
|
|
960
991
|
protoOf(File).y1a = function () {
|
|
961
992
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
962
|
-
return get_fs().readFileSync(this.
|
|
993
|
+
return get_fs().readFileSync(this.w49_1.toString(), 'utf-8');
|
|
963
994
|
};
|
|
964
995
|
protoOf(File).s18 = function (text) {
|
|
965
996
|
// Inline function 'kotlin.run' call
|
|
966
997
|
// Inline function 'kotlin.contracts.contract' call
|
|
967
998
|
// Inline function 'community.flock.wirespec.plugin.cli.io.File.write.<anonymous>' call
|
|
968
|
-
var $this$run = this.
|
|
999
|
+
var $this$run = this.w49_1.i2e(joinToString(split_0(this.w49_1.e2e_1, ['out']), 'out/node'));
|
|
969
1000
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
970
|
-
if (!get_fs().existsSync($this$run.
|
|
971
|
-
get_fs().mkdirSync($this$run.
|
|
1001
|
+
if (!get_fs().existsSync($this$run.e2e_1)) {
|
|
1002
|
+
get_fs().mkdirSync($this$run.e2e_1, {recursive: true});
|
|
972
1003
|
}
|
|
973
1004
|
get_fs().writeFileSync($this$run.toString(), text);
|
|
974
1005
|
};
|
|
@@ -1029,7 +1060,7 @@
|
|
|
1029
1060
|
}
|
|
1030
1061
|
}
|
|
1031
1062
|
//region block: init
|
|
1032
|
-
|
|
1063
|
+
Companion_instance_4 = new Companion();
|
|
1033
1064
|
//endregion
|
|
1034
1065
|
//region block: exports
|
|
1035
1066
|
function $jsExportAll$(_) {
|