@flock/wirespec 0.7.6 → 0.7.8
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/kotlin/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js +397 -616
- package/kotlin/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js.map +1 -1
- package/kotlin/arrow-arrow-atomic.js +15 -15
- package/kotlin/arrow-arrow-continuations.js +3 -3
- package/kotlin/arrow-arrow-core.js +98 -94
- package/kotlin/arrow-arrow-core.js.map +1 -1
- package/kotlin/kotlin-kotlin-stdlib-js-ir.js +2118 -3178
- package/kotlin/kotlin-kotlin-stdlib-js-ir.js.map +1 -1
- package/kotlin/kotlin-openapi-bindings.js +3772 -4589
- package/kotlin/kotlin-openapi-bindings.js.map +1 -1
- package/kotlin/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +15 -0
- package/kotlin/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core-js-ir.js +1682 -2034
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map +1 -1
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json-js-ir.js +1308 -1619
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map +1 -1
- package/kotlin/{wirespec-cli.js → wirespec-src-compiler-cli.js} +263 -378
- package/kotlin/wirespec-src-compiler-cli.js.map +1 -0
- package/kotlin/{wirespec-core.js → wirespec-src-compiler-core.js} +3143 -2611
- package/kotlin/wirespec-src-compiler-core.js.map +1 -0
- package/kotlin/{wirespec-lib.js → wirespec-src-compiler-lib.js} +100 -132
- package/kotlin/wirespec-src-compiler-lib.js.map +1 -0
- package/kotlin/{wirespec-openapi.js → wirespec-src-openapi.js} +878 -1665
- package/kotlin/wirespec-src-openapi.js.map +1 -0
- package/package.json +6 -4
- package/kotlin/wirespec-cli.js.map +0 -1
- package/kotlin/wirespec-core.js.map +0 -1
- package/kotlin/wirespec-lib.js.map +0 -1
- package/kotlin/wirespec-openapi.js.map +0 -1
- package/sync-hashes/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js.hash +0 -1
- package/sync-hashes/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js.map.hash +0 -1
- package/sync-hashes/arrow-arrow-annotations.js.hash +0 -1
- package/sync-hashes/arrow-arrow-annotations.js.map.hash +0 -1
- package/sync-hashes/arrow-arrow-atomic.js.hash +0 -1
- package/sync-hashes/arrow-arrow-atomic.js.map.hash +0 -1
- package/sync-hashes/arrow-arrow-continuations.js.hash +0 -1
- package/sync-hashes/arrow-arrow-continuations.js.map.hash +0 -1
- package/sync-hashes/arrow-arrow-core.js.hash +0 -1
- package/sync-hashes/arrow-arrow-core.js.map.hash +0 -1
- package/sync-hashes/kotlin-kotlin-stdlib-js-ir.js.hash +0 -1
- package/sync-hashes/kotlin-kotlin-stdlib-js-ir.js.map.hash +0 -1
- package/sync-hashes/kotlin-openapi-bindings.js.hash +0 -1
- package/sync-hashes/kotlin-openapi-bindings.js.map.hash +0 -1
- package/sync-hashes/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.hash +0 -1
- package/sync-hashes/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map.hash +0 -1
- package/sync-hashes/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.hash +0 -1
- package/sync-hashes/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map.hash +0 -1
- package/sync-hashes/wirespec-bin.js.hash +0 -1
- package/sync-hashes/wirespec-cli.js.hash +0 -1
- package/sync-hashes/wirespec-cli.js.map.hash +0 -1
- package/sync-hashes/wirespec-core.js.hash +0 -1
- package/sync-hashes/wirespec-core.js.map.hash +0 -1
- package/sync-hashes/wirespec-lib.js.hash +0 -1
- package/sync-hashes/wirespec-lib.js.map.hash +0 -1
- package/sync-hashes/wirespec-openapi.js.hash +0 -1
- package/sync-hashes/wirespec-openapi.js.map.hash +0 -1
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
(function (root, factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports', './kotlin-kotlin-stdlib-js-ir.js', './Kotlinx-Cli-Library-kotlinx-cli-js-ir.js', './wirespec-core.js', './arrow-arrow-core.js', './wirespec-openapi.js'], factory);
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib-js-ir.js', './Kotlinx-Cli-Library-kotlinx-cli-js-ir.js', './wirespec-src-compiler-core.js', './arrow-arrow-core.js', './wirespec-src-openapi.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
|
-
factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'), require('./Kotlinx-Cli-Library-kotlinx-cli-js-ir.js'), require('./wirespec-core.js'), require('./arrow-arrow-core.js'), require('./wirespec-openapi.js'));
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'), require('./Kotlinx-Cli-Library-kotlinx-cli-js-ir.js'), require('./wirespec-src-compiler-core.js'), require('./arrow-arrow-core.js'), require('./wirespec-src-openapi.js'));
|
|
6
6
|
else {
|
|
7
7
|
if (typeof this['kotlin-kotlin-stdlib-js-ir'] === 'undefined') {
|
|
8
|
-
throw new Error("Error loading module 'wirespec-cli'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'wirespec-cli'.");
|
|
8
|
+
throw new Error("Error loading module 'wirespec-src-compiler-cli'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'wirespec-src-compiler-cli'.");
|
|
9
9
|
}
|
|
10
10
|
if (typeof this['Kotlinx-Cli-Library-kotlinx-cli-js-ir'] === 'undefined') {
|
|
11
|
-
throw new Error("Error loading module 'wirespec-cli'. Its dependency 'Kotlinx-Cli-Library-kotlinx-cli-js-ir' was not found. Please, check whether 'Kotlinx-Cli-Library-kotlinx-cli-js-ir' is loaded prior to 'wirespec-cli'.");
|
|
11
|
+
throw new Error("Error loading module 'wirespec-src-compiler-cli'. Its dependency 'Kotlinx-Cli-Library-kotlinx-cli-js-ir' was not found. Please, check whether 'Kotlinx-Cli-Library-kotlinx-cli-js-ir' is loaded prior to 'wirespec-src-compiler-cli'.");
|
|
12
12
|
}
|
|
13
|
-
if (typeof this['wirespec-core'] === 'undefined') {
|
|
14
|
-
throw new Error("Error loading module 'wirespec-cli'. Its dependency 'wirespec-core' was not found. Please, check whether 'wirespec-core' is loaded prior to 'wirespec-cli'.");
|
|
13
|
+
if (typeof this['wirespec-src-compiler-core'] === 'undefined') {
|
|
14
|
+
throw new Error("Error loading module 'wirespec-src-compiler-cli'. Its dependency 'wirespec-src-compiler-core' was not found. Please, check whether 'wirespec-src-compiler-core' is loaded prior to 'wirespec-src-compiler-cli'.");
|
|
15
15
|
}
|
|
16
16
|
if (typeof this['arrow-arrow-core'] === 'undefined') {
|
|
17
|
-
throw new Error("Error loading module 'wirespec-cli'. Its dependency 'arrow-arrow-core' was not found. Please, check whether 'arrow-arrow-core' is loaded prior to 'wirespec-cli'.");
|
|
17
|
+
throw new Error("Error loading module 'wirespec-src-compiler-cli'. Its dependency 'arrow-arrow-core' was not found. Please, check whether 'arrow-arrow-core' is loaded prior to 'wirespec-src-compiler-cli'.");
|
|
18
18
|
}
|
|
19
|
-
if (typeof this['wirespec-openapi'] === 'undefined') {
|
|
20
|
-
throw new Error("Error loading module 'wirespec-cli'. Its dependency 'wirespec-openapi' was not found. Please, check whether 'wirespec-openapi' is loaded prior to 'wirespec-cli'.");
|
|
19
|
+
if (typeof this['wirespec-src-openapi'] === 'undefined') {
|
|
20
|
+
throw new Error("Error loading module 'wirespec-src-compiler-cli'. Its dependency 'wirespec-src-openapi' was not found. Please, check whether 'wirespec-src-openapi' is loaded prior to 'wirespec-src-compiler-cli'.");
|
|
21
21
|
}
|
|
22
|
-
root['wirespec-cli'] = factory(typeof this['wirespec-cli'] === 'undefined' ? {} : this['wirespec-cli'], this['kotlin-kotlin-stdlib-js-ir'], this['Kotlinx-Cli-Library-kotlinx-cli-js-ir'], this['wirespec-core'], this['arrow-arrow-core'], this['wirespec-openapi']);
|
|
22
|
+
root['wirespec-src-compiler-cli'] = factory(typeof this['wirespec-src-compiler-cli'] === 'undefined' ? {} : this['wirespec-src-compiler-cli'], this['kotlin-kotlin-stdlib-js-ir'], this['Kotlinx-Cli-Library-kotlinx-cli-js-ir'], this['wirespec-src-compiler-core'], this['arrow-arrow-core'], this['wirespec-src-openapi']);
|
|
23
23
|
}
|
|
24
24
|
}(this, function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_cli, kotlin_community_flock_wirespec_compiler_core, kotlin_io_arrow_kt_arrow_core, kotlin_community_flock_wirespec_openapi) {
|
|
25
25
|
'use strict';
|
|
26
26
|
//region block: imports
|
|
27
27
|
var imul = Math.imul;
|
|
28
|
-
var numberRangeToNumber = kotlin_kotlin.$_$.
|
|
28
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.p7;
|
|
29
29
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.g;
|
|
30
|
-
var Unit_getInstance = kotlin_kotlin.$_$.
|
|
31
|
-
var copyToArray = kotlin_kotlin.$_$.
|
|
30
|
+
var Unit_getInstance = kotlin_kotlin.$_$.h3;
|
|
31
|
+
var copyToArray = kotlin_kotlin.$_$.n4;
|
|
32
32
|
var ArgParser = kotlin_org_jetbrains_kotlinx_kotlinx_cli.$_$.d;
|
|
33
33
|
var Boolean_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_cli.$_$.a;
|
|
34
|
-
var VOID = kotlin_kotlin.$_$.
|
|
34
|
+
var VOID = kotlin_kotlin.$_$.cb;
|
|
35
35
|
var default_0 = kotlin_org_jetbrains_kotlinx_kotlinx_cli.$_$.f;
|
|
36
|
-
var KProperty0 = kotlin_kotlin.$_$.
|
|
37
|
-
var THROW_ISE = kotlin_kotlin.$_$.
|
|
38
|
-
var getLocalDelegateReference = kotlin_kotlin.$_$.
|
|
36
|
+
var KProperty0 = kotlin_kotlin.$_$.e8;
|
|
37
|
+
var THROW_ISE = kotlin_kotlin.$_$.da;
|
|
38
|
+
var getLocalDelegateReference = kotlin_kotlin.$_$.u6;
|
|
39
39
|
var String_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_cli.$_$.c;
|
|
40
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
40
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.b4;
|
|
41
41
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.f;
|
|
42
42
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.e1;
|
|
43
43
|
var Choice = kotlin_org_jetbrains_kotlinx_kotlinx_cli.$_$.e;
|
|
@@ -46,60 +46,61 @@
|
|
|
46
46
|
var toList = kotlin_kotlin.$_$.y5;
|
|
47
47
|
var get_DEFAULT_PACKAGE_NAME = kotlin_community_flock_wirespec_compiler_core.$_$.a;
|
|
48
48
|
var toSet = kotlin_kotlin.$_$.a6;
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
49
|
+
var enumEntries = kotlin_kotlin.$_$.g6;
|
|
50
|
+
var Enum = kotlin_kotlin.$_$.t9;
|
|
51
|
+
var protoOf = kotlin_kotlin.$_$.t7;
|
|
52
|
+
var classMeta = kotlin_kotlin.$_$.q6;
|
|
53
|
+
var setMetadataFor = kotlin_kotlin.$_$.u7;
|
|
53
54
|
var plus = kotlin_kotlin.$_$.o5;
|
|
54
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
55
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
56
|
-
var objectMeta = kotlin_kotlin.$_$.
|
|
57
|
-
var interfaceMeta = kotlin_kotlin.$_$.
|
|
55
|
+
var THROW_CCE = kotlin_kotlin.$_$.ca;
|
|
56
|
+
var isInterface = kotlin_kotlin.$_$.i7;
|
|
57
|
+
var objectMeta = kotlin_kotlin.$_$.s7;
|
|
58
|
+
var interfaceMeta = kotlin_kotlin.$_$.z6;
|
|
58
59
|
var Wirespec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.d1;
|
|
59
60
|
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.x;
|
|
60
|
-
var to = kotlin_kotlin.$_$.
|
|
61
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
61
|
+
var to = kotlin_kotlin.$_$.bb;
|
|
62
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.xa;
|
|
62
63
|
var Left = kotlin_io_arrow_kt_arrow_core.$_$.c;
|
|
63
|
-
var charSequenceLength = kotlin_kotlin.$_$.
|
|
64
|
-
var charSequenceGet = kotlin_kotlin.$_$.
|
|
65
|
-
var toString = kotlin_kotlin.$_$.
|
|
66
|
-
var toString_0 = kotlin_kotlin.$_$.
|
|
64
|
+
var charSequenceLength = kotlin_kotlin.$_$.o6;
|
|
65
|
+
var charSequenceGet = kotlin_kotlin.$_$.n6;
|
|
66
|
+
var toString = kotlin_kotlin.$_$.k1;
|
|
67
|
+
var toString_0 = kotlin_kotlin.$_$.y7;
|
|
67
68
|
var first = kotlin_kotlin.$_$.u4;
|
|
68
69
|
var listOf = kotlin_kotlin.$_$.h5;
|
|
69
70
|
var Right = kotlin_io_arrow_kt_arrow_core.$_$.d;
|
|
70
|
-
var println = kotlin_kotlin.$_$.
|
|
71
|
+
var println = kotlin_kotlin.$_$.h6;
|
|
71
72
|
var Companion_getInstance_0 = kotlin_community_flock_wirespec_openapi.$_$.a;
|
|
72
73
|
var Companion_getInstance_1 = kotlin_community_flock_wirespec_openapi.$_$.b;
|
|
73
74
|
var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.f;
|
|
74
|
-
var equals = kotlin_kotlin.$_$.
|
|
75
|
+
var equals = kotlin_kotlin.$_$.s6;
|
|
75
76
|
var TypeScriptEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.e;
|
|
76
77
|
var ScalaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.d;
|
|
77
78
|
var KotlinEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.c;
|
|
78
79
|
var JavaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.b;
|
|
79
|
-
var equals_0 = kotlin_kotlin.$_$.
|
|
80
|
+
var equals_0 = kotlin_kotlin.$_$.p8;
|
|
80
81
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.b1;
|
|
81
82
|
var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.y;
|
|
82
|
-
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.
|
|
83
|
-
var charArrayOf = kotlin_kotlin.$_$.
|
|
84
|
-
var split = kotlin_kotlin.$_$.
|
|
83
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.h1;
|
|
84
|
+
var charArrayOf = kotlin_kotlin.$_$.l6;
|
|
85
|
+
var split = kotlin_kotlin.$_$.z8;
|
|
85
86
|
var joinToString = kotlin_kotlin.$_$.a5;
|
|
86
|
-
var split_0 = kotlin_kotlin.$_$.
|
|
87
|
+
var split_0 = kotlin_kotlin.$_$.a9;
|
|
87
88
|
var last = kotlin_kotlin.$_$.e5;
|
|
88
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
89
|
-
var endsWith = kotlin_kotlin.$_$.
|
|
90
|
-
var dropLast = kotlin_kotlin.$_$.
|
|
91
|
-
var iterator = kotlin_kotlin.$_$.
|
|
92
|
-
var asSequence = kotlin_kotlin.$_$.
|
|
93
|
-
var map = kotlin_kotlin.$_$.
|
|
94
|
-
var filter = kotlin_kotlin.$_$.
|
|
95
|
-
var toSet_0 = kotlin_kotlin.$_$.
|
|
96
|
-
var Companion_getInstance_2 = kotlin_kotlin.$_$.
|
|
97
|
-
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.
|
|
98
|
-
var createFailure = kotlin_kotlin.$_$.
|
|
99
|
-
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.
|
|
100
|
-
var isObject = kotlin_kotlin.$_$.
|
|
101
|
-
var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.
|
|
102
|
-
var isArray = kotlin_kotlin.$_$.
|
|
89
|
+
var getStringHashCode = kotlin_kotlin.$_$.x6;
|
|
90
|
+
var endsWith = kotlin_kotlin.$_$.o8;
|
|
91
|
+
var dropLast = kotlin_kotlin.$_$.m8;
|
|
92
|
+
var iterator = kotlin_kotlin.$_$.m7;
|
|
93
|
+
var asSequence = kotlin_kotlin.$_$.h8;
|
|
94
|
+
var map = kotlin_kotlin.$_$.j8;
|
|
95
|
+
var filter = kotlin_kotlin.$_$.i8;
|
|
96
|
+
var toSet_0 = kotlin_kotlin.$_$.k8;
|
|
97
|
+
var Companion_getInstance_2 = kotlin_kotlin.$_$.c3;
|
|
98
|
+
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.l1;
|
|
99
|
+
var createFailure = kotlin_kotlin.$_$.qa;
|
|
100
|
+
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.o1;
|
|
101
|
+
var isObject = kotlin_kotlin.$_$.k7;
|
|
102
|
+
var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.n1;
|
|
103
|
+
var isArray = kotlin_kotlin.$_$.a7;
|
|
103
104
|
//endregion
|
|
104
105
|
//region block: pre-declaration
|
|
105
106
|
setMetadataFor(Language, 'Language', interfaceMeta);
|
|
@@ -121,87 +122,66 @@
|
|
|
121
122
|
setMetadataFor(Directory, 'Directory', classMeta);
|
|
122
123
|
//endregion
|
|
123
124
|
function main(args) {
|
|
124
|
-
var tmp$ret$5;
|
|
125
125
|
// Inline function 'kotlin.let' call
|
|
126
|
-
var tmp$ret$4;
|
|
127
126
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
128
|
-
var tmp$ret$3;
|
|
129
127
|
// Inline function 'kotlin.collections.mapNotNull' call
|
|
130
|
-
var
|
|
131
|
-
var tmp$ret$2;
|
|
128
|
+
var tmp0_mapNotNull = numberRangeToNumber(0, 20);
|
|
132
129
|
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
133
130
|
var tmp0_mapNotNullTo = ArrayList_init_$Create$();
|
|
134
131
|
// Inline function 'kotlin.collections.forEach' call
|
|
135
|
-
var inductionVariable =
|
|
136
|
-
var last =
|
|
132
|
+
var inductionVariable = tmp0_mapNotNull.y_1;
|
|
133
|
+
var last = tmp0_mapNotNull.z_1;
|
|
137
134
|
if (inductionVariable <= last)
|
|
138
135
|
do {
|
|
139
136
|
var element = inductionVariable;
|
|
140
137
|
inductionVariable = inductionVariable + 1 | 0;
|
|
141
138
|
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
|
|
142
|
-
var
|
|
143
|
-
// Inline function 'community.flock.wirespec.compiler.cli.main.<anonymous>' call
|
|
144
|
-
tmp$ret$0 = orNull(args, element);
|
|
145
|
-
var tmp0_safe_receiver = tmp$ret$0;
|
|
139
|
+
var tmp0_safe_receiver = orNull(args, element);
|
|
146
140
|
if (tmp0_safe_receiver == null)
|
|
147
141
|
null;
|
|
148
142
|
else {
|
|
149
|
-
var tmp$ret$1;
|
|
150
143
|
// Inline function 'kotlin.let' call
|
|
151
144
|
// Inline function 'kotlin.contracts.contract' call
|
|
152
145
|
tmp0_mapNotNullTo.a(tmp0_safe_receiver);
|
|
153
|
-
tmp$ret$1 = Unit_getInstance();
|
|
154
146
|
}
|
|
155
147
|
}
|
|
156
148
|
while (!(element === last));
|
|
157
|
-
|
|
158
|
-
tmp$ret$3 = tmp$ret$2;
|
|
159
|
-
var tmp2_toTypedArray = tmp$ret$3;
|
|
160
|
-
tmp$ret$4 = copyToArray(tmp2_toTypedArray);
|
|
161
|
-
var tmp3_let = tmp$ret$4;
|
|
149
|
+
var tmp2_let = copyToArray(tmp0_mapNotNullTo);
|
|
162
150
|
// Inline function 'kotlin.contracts.contract' call
|
|
163
|
-
cli(
|
|
164
|
-
tmp$ret$5 = Unit_getInstance();
|
|
151
|
+
cli(tmp2_let);
|
|
165
152
|
}
|
|
166
153
|
function cli(args) {
|
|
167
154
|
var parser = new ArgParser('wirespec');
|
|
168
|
-
var debug$delegate = default_0(parser.
|
|
155
|
+
var debug$delegate = default_0(parser.y1w(Boolean_getInstance(), VOID, 'd', 'Debug mode'), false).b20(null, getLocalDelegateReference('debug', KProperty0, false, function () {
|
|
169
156
|
return THROW_ISE();
|
|
170
157
|
}));
|
|
171
|
-
var input$delegate = parser.
|
|
158
|
+
var input$delegate = parser.a1x(String_getInstance(), VOID, 'Input file').b20(null, getLocalDelegateReference('input', KProperty0, false, function () {
|
|
172
159
|
return THROW_ISE();
|
|
173
160
|
}));
|
|
174
|
-
var output$delegate = parser.
|
|
161
|
+
var output$delegate = parser.y1w(String_getInstance(), VOID, 'o', 'Output directory').b20(null, getLocalDelegateReference('output', KProperty0, false, function () {
|
|
175
162
|
return THROW_ISE();
|
|
176
163
|
}));
|
|
177
|
-
var tmp$ret$5;
|
|
178
164
|
// Inline function 'kotlin.collections.map' call
|
|
179
|
-
var tmp$ret$2;
|
|
180
165
|
// Inline function 'kotlin.collections.map' call
|
|
181
|
-
var
|
|
182
|
-
var tmp$ret$1;
|
|
166
|
+
var tmp0_map = Companion_getInstance_3().h20();
|
|
183
167
|
// Inline function 'kotlin.collections.mapTo' call
|
|
184
|
-
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(
|
|
185
|
-
var tmp0_iterator =
|
|
168
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_map, 10));
|
|
169
|
+
var tmp0_iterator = tmp0_map.c();
|
|
186
170
|
while (tmp0_iterator.d()) {
|
|
187
171
|
var item = tmp0_iterator.e();
|
|
188
172
|
var tmp$ret$0;
|
|
189
173
|
// Inline function 'community.flock.wirespec.compiler.cli.cli.<anonymous>' call
|
|
190
|
-
tmp$ret$0 = item.
|
|
174
|
+
tmp$ret$0 = item.q4_1;
|
|
191
175
|
tmp0_mapTo.a(tmp$ret$0);
|
|
192
176
|
}
|
|
193
|
-
tmp$ret$1 = tmp0_mapTo;
|
|
194
|
-
tmp$ret$2 = tmp$ret$1;
|
|
195
|
-
var tmp3_map = tmp$ret$2;
|
|
196
|
-
var tmp$ret$4;
|
|
197
177
|
// Inline function 'kotlin.collections.mapTo' call
|
|
198
|
-
var
|
|
199
|
-
var tmp0_iterator_0 =
|
|
178
|
+
var tmp0_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_mapTo, 10));
|
|
179
|
+
var tmp0_iterator_0 = tmp0_mapTo.c();
|
|
200
180
|
while (tmp0_iterator_0.d()) {
|
|
201
181
|
var item_0 = tmp0_iterator_0.e();
|
|
202
182
|
var tmp$ret$3;
|
|
203
183
|
// Inline function 'community.flock.wirespec.compiler.cli.cli.<anonymous>' call
|
|
204
|
-
var tmp0_elvis_lhs = Companion_getInstance_3().
|
|
184
|
+
var tmp0_elvis_lhs = Companion_getInstance_3().i20(item_0);
|
|
205
185
|
var tmp;
|
|
206
186
|
if (tmp0_elvis_lhs == null) {
|
|
207
187
|
throw IllegalStateException_init_$Create$('Language not found');
|
|
@@ -209,37 +189,34 @@
|
|
|
209
189
|
tmp = tmp0_elvis_lhs;
|
|
210
190
|
}
|
|
211
191
|
tmp$ret$3 = tmp;
|
|
212
|
-
|
|
192
|
+
tmp0_mapTo_0.a(tmp$ret$3);
|
|
213
193
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
var tmp_0 = tmp$ret$5;
|
|
217
|
-
var language$delegate = multiple(default_0(parser.g1w(new Choice(tmp_0, cli$lambda_5), VOID, 'l', 'Language type'), Jvm_Kotlin_getInstance())).j1z(null, getLocalDelegateReference('language', KProperty0, false, function () {
|
|
194
|
+
var tmp_0 = tmp0_mapTo_0;
|
|
195
|
+
var language$delegate = multiple(default_0(parser.y1w(new Choice(tmp_0, cli$lambda_5), VOID, 'l', 'Language type'), Jvm_Kotlin_getInstance())).b20(null, getLocalDelegateReference('language', KProperty0, false, function () {
|
|
218
196
|
return THROW_ISE();
|
|
219
197
|
}));
|
|
220
198
|
var tmp$ret$7;
|
|
221
199
|
// Inline function 'kotlinx.cli.Companion.Choice' call
|
|
222
|
-
|
|
223
|
-
var
|
|
200
|
+
Companion_getInstance();
|
|
201
|
+
var tmp3_Choice = cli$lambda_6;
|
|
224
202
|
var tmp$ret$6;
|
|
225
203
|
// Inline function 'kotlin.enumValues' call
|
|
226
204
|
tmp$ret$6 = values_1();
|
|
227
205
|
var tmp_1 = toList(tmp$ret$6);
|
|
228
|
-
var tmp0_elvis_lhs_0 = null;
|
|
229
206
|
var tmp_2;
|
|
230
|
-
if (
|
|
231
|
-
tmp_2 = cli$lambda_7(
|
|
207
|
+
if (null == null) {
|
|
208
|
+
tmp_2 = cli$lambda_7(tmp3_Choice);
|
|
232
209
|
} else {
|
|
233
|
-
tmp_2 =
|
|
210
|
+
tmp_2 = null;
|
|
234
211
|
}
|
|
235
|
-
tmp$ret$7 = new Choice(tmp_1, tmp_2,
|
|
236
|
-
var openapi$delegate = parser.
|
|
212
|
+
tmp$ret$7 = new Choice(tmp_1, tmp_2, tmp3_Choice);
|
|
213
|
+
var openapi$delegate = parser.y1w(tmp$ret$7, VOID, 'a', 'Use openapi as input').b20(null, getLocalDelegateReference('openapi', KProperty0, false, function () {
|
|
237
214
|
return THROW_ISE();
|
|
238
215
|
}));
|
|
239
|
-
var packageName$delegate = default_0(parser.
|
|
216
|
+
var packageName$delegate = default_0(parser.y1w(String_getInstance(), VOID, 'p', 'Package name'), get_DEFAULT_PACKAGE_NAME()).b20(null, getLocalDelegateReference('packageName', KProperty0, false, function () {
|
|
240
217
|
return THROW_ISE();
|
|
241
218
|
}));
|
|
242
|
-
parser.
|
|
219
|
+
parser.c1x(args);
|
|
243
220
|
var logger = new cli$logger$1(debug$delegate);
|
|
244
221
|
compile_0(toSet(cli$lambda_2(language$delegate)), cli$lambda_0(input$delegate), cli$lambda_1(output$delegate), cli$lambda_4(packageName$delegate), cli$lambda_3(openapi$delegate), logger);
|
|
245
222
|
}
|
|
@@ -249,6 +226,11 @@
|
|
|
249
226
|
function values() {
|
|
250
227
|
return [Jvm_Java_getInstance(), Jvm_Kotlin_getInstance(), Jvm_Scala_getInstance()];
|
|
251
228
|
}
|
|
229
|
+
function get_entries() {
|
|
230
|
+
if ($ENTRIES == null)
|
|
231
|
+
$ENTRIES = enumEntries(values());
|
|
232
|
+
return $ENTRIES;
|
|
233
|
+
}
|
|
252
234
|
var Jvm_entriesInitialized;
|
|
253
235
|
function Jvm_initEntries() {
|
|
254
236
|
if (Jvm_entriesInitialized)
|
|
@@ -258,11 +240,17 @@
|
|
|
258
240
|
Jvm_Kotlin_instance = new Jvm('Kotlin', 1);
|
|
259
241
|
Jvm_Scala_instance = new Jvm('Scala', 2);
|
|
260
242
|
}
|
|
243
|
+
var $ENTRIES;
|
|
261
244
|
var Script_TypeScript_instance;
|
|
262
245
|
var Script_Wirespec_instance;
|
|
263
246
|
function values_0() {
|
|
264
247
|
return [Script_TypeScript_getInstance(), Script_Wirespec_getInstance()];
|
|
265
248
|
}
|
|
249
|
+
function get_entries_0() {
|
|
250
|
+
if ($ENTRIES_0 == null)
|
|
251
|
+
$ENTRIES_0 = enumEntries(values_0());
|
|
252
|
+
return $ENTRIES_0;
|
|
253
|
+
}
|
|
266
254
|
var Script_entriesInitialized;
|
|
267
255
|
function Script_initEntries() {
|
|
268
256
|
if (Script_entriesInitialized)
|
|
@@ -271,6 +259,7 @@
|
|
|
271
259
|
Script_TypeScript_instance = new Script('TypeScript', 0);
|
|
272
260
|
Script_Wirespec_instance = new Script('Wirespec', 1);
|
|
273
261
|
}
|
|
262
|
+
var $ENTRIES_0;
|
|
274
263
|
function Jvm(name, ordinal) {
|
|
275
264
|
Enum.call(this, name, ordinal);
|
|
276
265
|
}
|
|
@@ -280,31 +269,27 @@
|
|
|
280
269
|
function Companion() {
|
|
281
270
|
Companion_instance = this;
|
|
282
271
|
}
|
|
283
|
-
protoOf(Companion).
|
|
284
|
-
return plus(
|
|
272
|
+
protoOf(Companion).h20 = function () {
|
|
273
|
+
return plus(get_entries(), get_entries_0());
|
|
285
274
|
};
|
|
286
|
-
protoOf(Companion).
|
|
287
|
-
var tmp$ret$2;
|
|
275
|
+
protoOf(Companion).i20 = function (s) {
|
|
288
276
|
// Inline function 'kotlin.collections.find' call
|
|
289
|
-
var tmp0_find = this.
|
|
277
|
+
var tmp0_find = this.h20();
|
|
290
278
|
var tmp$ret$1;
|
|
291
279
|
$l$block: {
|
|
292
280
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
293
281
|
var tmp0_iterator = tmp0_find.c();
|
|
294
282
|
while (tmp0_iterator.d()) {
|
|
295
283
|
var element = tmp0_iterator.e();
|
|
296
|
-
var tmp$ret$0;
|
|
297
284
|
// Inline function 'community.flock.wirespec.compiler.cli.Companion.valueOf.<anonymous>' call
|
|
298
|
-
|
|
299
|
-
if (tmp$ret$0) {
|
|
285
|
+
if (element.q4_1 === s) {
|
|
300
286
|
tmp$ret$1 = element;
|
|
301
287
|
break $l$block;
|
|
302
288
|
}
|
|
303
289
|
}
|
|
304
290
|
tmp$ret$1 = null;
|
|
305
291
|
}
|
|
306
|
-
tmp
|
|
307
|
-
var tmp = tmp$ret$2;
|
|
292
|
+
var tmp = tmp$ret$1;
|
|
308
293
|
return (tmp == null ? true : isInterface(tmp, Language)) ? tmp : THROW_CCE();
|
|
309
294
|
};
|
|
310
295
|
var Companion_instance;
|
|
@@ -353,17 +338,15 @@
|
|
|
353
338
|
}
|
|
354
339
|
function compile_0(languages, input, output, packageName, openapi, logger) {
|
|
355
340
|
if (!(openapi == null)) {
|
|
356
|
-
var fullPath = Companion_getInstance_4().
|
|
341
|
+
var fullPath = Companion_getInstance_4().g1u(input);
|
|
357
342
|
var file = new JsonFile(fullPath);
|
|
358
|
-
var tmp0_subject = openapi;
|
|
359
|
-
var tmp0 = tmp0_subject.q4_1;
|
|
360
343
|
var tmp;
|
|
361
|
-
switch (
|
|
344
|
+
switch (openapi.r4_1) {
|
|
362
345
|
case 0:
|
|
363
|
-
tmp = Companion_getInstance_0().
|
|
346
|
+
tmp = Companion_getInstance_0().g1u(file.m16());
|
|
364
347
|
break;
|
|
365
348
|
case 1:
|
|
366
|
-
tmp = Companion_getInstance_1().
|
|
349
|
+
tmp = Companion_getInstance_1().g1u(file.m16());
|
|
367
350
|
break;
|
|
368
351
|
default:
|
|
369
352
|
noWhenBranchMatchedException();
|
|
@@ -371,208 +354,153 @@
|
|
|
371
354
|
}
|
|
372
355
|
var ast = tmp;
|
|
373
356
|
var path = out(fullPath, packageName, output);
|
|
374
|
-
var tmp$ret$11;
|
|
375
357
|
// Inline function 'kotlin.collections.map' call
|
|
376
|
-
var tmp$ret$9;
|
|
377
358
|
// Inline function 'kotlin.collections.map' call
|
|
378
|
-
var
|
|
379
|
-
var tmp$ret$8;
|
|
359
|
+
var tmp0_map = emit(languages, packageName, path, logger);
|
|
380
360
|
// Inline function 'kotlin.collections.mapTo' call
|
|
381
|
-
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(
|
|
382
|
-
var tmp0_iterator =
|
|
361
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_map, 10));
|
|
362
|
+
var tmp0_iterator = tmp0_map.c();
|
|
383
363
|
while (tmp0_iterator.d()) {
|
|
384
364
|
var item = tmp0_iterator.e();
|
|
385
365
|
var tmp$ret$7;
|
|
386
366
|
// Inline function 'community.flock.wirespec.compiler.cli.compile.<anonymous>' call
|
|
387
|
-
var emitter = item.
|
|
388
|
-
var file_0 = item.
|
|
389
|
-
var result = emitter.
|
|
367
|
+
var emitter = item.j3();
|
|
368
|
+
var file_0 = item.k3();
|
|
369
|
+
var result = emitter.ci(ast);
|
|
390
370
|
var tmp_0;
|
|
391
|
-
if (!emitter.
|
|
371
|
+
if (!emitter.bi_1) {
|
|
392
372
|
var tmp$ret$6;
|
|
393
373
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
394
|
-
var tmp0_replaceFirstChar = fullPath.
|
|
374
|
+
var tmp0_replaceFirstChar = fullPath.n20_1;
|
|
395
375
|
var tmp_1;
|
|
396
|
-
var tmp$ret$0;
|
|
397
376
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
398
|
-
|
|
399
|
-
if (tmp$ret$0) {
|
|
377
|
+
if (charSequenceLength(tmp0_replaceFirstChar) > 0) {
|
|
400
378
|
var tmp$ret$3;
|
|
401
379
|
// Inline function 'kotlin.text.uppercase' call
|
|
402
|
-
var
|
|
403
|
-
var tmp$ret$2;
|
|
380
|
+
var tmp1_uppercase = charSequenceGet(tmp0_replaceFirstChar, 0);
|
|
404
381
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
405
|
-
var tmp$ret$1;
|
|
406
382
|
// Inline function 'kotlin.js.asDynamic' call
|
|
407
|
-
|
|
408
|
-
tmp$ret$1 = tmp1_asDynamic;
|
|
409
|
-
var tmp2_unsafeCast = tmp$ret$1.toUpperCase();
|
|
410
|
-
tmp$ret$2 = tmp2_unsafeCast;
|
|
411
|
-
tmp$ret$3 = tmp$ret$2;
|
|
383
|
+
tmp$ret$3 = toString(tmp1_uppercase).toUpperCase();
|
|
412
384
|
var tmp_2 = toString_0(tmp$ret$3);
|
|
413
|
-
var tmp$ret$5;
|
|
414
385
|
// Inline function 'kotlin.text.substring' call
|
|
415
|
-
var tmp$ret$4;
|
|
416
386
|
// Inline function 'kotlin.js.asDynamic' call
|
|
417
|
-
|
|
418
|
-
tmp$ret$5 = tmp$ret$4.substring(1);
|
|
419
|
-
tmp_1 = tmp_2 + tmp$ret$5;
|
|
387
|
+
tmp_1 = tmp_2 + tmp0_replaceFirstChar.substring(1);
|
|
420
388
|
} else {
|
|
421
389
|
tmp_1 = tmp0_replaceFirstChar;
|
|
422
390
|
}
|
|
423
391
|
tmp$ret$6 = tmp_1;
|
|
424
|
-
tmp_0 = to(listOf(to(tmp$ret$6, first(result).
|
|
392
|
+
tmp_0 = to(listOf(to(tmp$ret$6, first(result).i3_1)), file_0);
|
|
425
393
|
} else {
|
|
426
394
|
tmp_0 = to(result, file_0);
|
|
427
395
|
}
|
|
428
396
|
tmp$ret$7 = tmp_0;
|
|
429
397
|
tmp0_mapTo.a(tmp$ret$7);
|
|
430
398
|
}
|
|
431
|
-
tmp$ret$8 = tmp0_mapTo;
|
|
432
|
-
tmp$ret$9 = tmp$ret$8;
|
|
433
|
-
var tmp3_map = tmp$ret$9;
|
|
434
|
-
var tmp$ret$10;
|
|
435
399
|
// Inline function 'kotlin.collections.mapTo' call
|
|
436
|
-
var
|
|
437
|
-
var tmp0_iterator_0 =
|
|
400
|
+
var tmp0_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_mapTo, 10));
|
|
401
|
+
var tmp0_iterator_0 = tmp0_mapTo.c();
|
|
438
402
|
while (tmp0_iterator_0.d()) {
|
|
439
403
|
var item_0 = tmp0_iterator_0.e();
|
|
440
|
-
var results = item_0.
|
|
441
|
-
var file_1 = item_0.
|
|
404
|
+
var results = item_0.j3();
|
|
405
|
+
var file_1 = item_0.k3();
|
|
442
406
|
write(results, file_1);
|
|
443
|
-
|
|
407
|
+
tmp0_mapTo_0.a(Unit_getInstance());
|
|
444
408
|
}
|
|
445
|
-
tmp$ret$10 = tmp2_mapTo;
|
|
446
|
-
tmp$ret$11 = tmp$ret$10;
|
|
447
409
|
} else {
|
|
448
410
|
// Inline function 'kotlin.collections.forEach' call
|
|
449
|
-
var
|
|
450
|
-
var tmp0_iterator_1 = tmp4_forEach.c();
|
|
411
|
+
var tmp0_iterator_1 = (new Directory(input)).k20().c();
|
|
451
412
|
while (tmp0_iterator_1.d()) {
|
|
452
413
|
var element = tmp0_iterator_1.e();
|
|
453
414
|
// Inline function 'community.flock.wirespec.compiler.cli.compile.<anonymous>' call
|
|
454
|
-
var path_0 = out(element.
|
|
455
|
-
var tmp$ret$30;
|
|
415
|
+
var path_0 = out(element.l20_1, packageName, output);
|
|
456
416
|
// Inline function 'kotlin.collections.map' call
|
|
457
|
-
var tmp$ret$28;
|
|
458
417
|
// Inline function 'kotlin.let' call
|
|
459
|
-
var tmp$ret$12;
|
|
460
418
|
// Inline function 'kotlin.let' call
|
|
461
|
-
var tmp0_let = element.
|
|
462
|
-
var
|
|
419
|
+
var tmp0_let = element.m16();
|
|
420
|
+
var tmp1_let_this = Wirespec_getInstance();
|
|
463
421
|
// Inline function 'kotlin.contracts.contract' call
|
|
464
|
-
|
|
465
|
-
var tmp2_let = tmp$ret$12(logger);
|
|
422
|
+
var tmp2_let = compile(tmp1_let_this, tmp0_let)(logger);
|
|
466
423
|
// Inline function 'kotlin.contracts.contract' call
|
|
467
|
-
var tmp$ret$27;
|
|
468
424
|
// Inline function 'community.flock.wirespec.compiler.cli.compile.<anonymous>.<anonymous>' call
|
|
469
|
-
var tmp$ret$26;
|
|
470
425
|
// Inline function 'kotlin.collections.map' call
|
|
471
|
-
var
|
|
472
|
-
var tmp$ret$25;
|
|
426
|
+
var tmp0_map_0 = emit(languages, packageName, path_0, logger);
|
|
473
427
|
// Inline function 'kotlin.collections.mapTo' call
|
|
474
|
-
var
|
|
475
|
-
var tmp0_iterator_2 =
|
|
428
|
+
var tmp0_mapTo_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_map_0, 10));
|
|
429
|
+
var tmp0_iterator_2 = tmp0_map_0.c();
|
|
476
430
|
while (tmp0_iterator_2.d()) {
|
|
477
431
|
var item_1 = tmp0_iterator_2.e();
|
|
478
|
-
var tmp$ret$
|
|
432
|
+
var tmp$ret$25;
|
|
479
433
|
// Inline function 'community.flock.wirespec.compiler.cli.compile.<anonymous>.<anonymous>.<anonymous>' call
|
|
480
|
-
var emitter_0 = item_1.
|
|
481
|
-
var file_2 = item_1.
|
|
434
|
+
var emitter_0 = item_1.j3();
|
|
435
|
+
var file_2 = item_1.k3();
|
|
482
436
|
var result_0 = tmp2_let(emitter_0);
|
|
483
437
|
var tmp_3;
|
|
484
|
-
if (!emitter_0.
|
|
485
|
-
var tmp$ret$
|
|
438
|
+
if (!emitter_0.bi_1) {
|
|
439
|
+
var tmp$ret$24;
|
|
486
440
|
// Inline function 'arrow.core.Either.map' call
|
|
487
441
|
// Inline function 'kotlin.contracts.contract' call
|
|
488
|
-
var tmp$ret$22;
|
|
489
442
|
// Inline function 'arrow.core.flatMap' call
|
|
490
443
|
// Inline function 'kotlin.contracts.contract' call
|
|
491
|
-
var tmp0_subject_0 = result_0;
|
|
492
444
|
var tmp_4;
|
|
493
|
-
if (
|
|
494
|
-
var tmp$ret$21;
|
|
445
|
+
if (result_0 instanceof Right) {
|
|
495
446
|
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
496
|
-
var
|
|
497
|
-
var tmp$ret$
|
|
447
|
+
var tmp0_anonymous = result_0.vg_1;
|
|
448
|
+
var tmp$ret$21;
|
|
498
449
|
// Inline function 'community.flock.wirespec.compiler.cli.compile.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
499
|
-
var tmp$ret$
|
|
450
|
+
var tmp$ret$20;
|
|
500
451
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
501
|
-
var tmp0_replaceFirstChar_0 = element.
|
|
452
|
+
var tmp0_replaceFirstChar_0 = element.l20_1.n20_1;
|
|
502
453
|
var tmp_5;
|
|
503
|
-
var tmp$ret$13;
|
|
504
454
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
var tmp$ret$16;
|
|
455
|
+
if (charSequenceLength(tmp0_replaceFirstChar_0) > 0) {
|
|
456
|
+
var tmp$ret$17;
|
|
508
457
|
// Inline function 'kotlin.text.uppercase' call
|
|
509
|
-
var
|
|
510
|
-
var tmp$ret$15;
|
|
458
|
+
var tmp1_uppercase_0 = charSequenceGet(tmp0_replaceFirstChar_0, 0);
|
|
511
459
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
512
|
-
var tmp$ret$14;
|
|
513
460
|
// Inline function 'kotlin.js.asDynamic' call
|
|
514
|
-
|
|
515
|
-
tmp$ret$
|
|
516
|
-
var tmp2_unsafeCast_0 = tmp$ret$14.toUpperCase();
|
|
517
|
-
tmp$ret$15 = tmp2_unsafeCast_0;
|
|
518
|
-
tmp$ret$16 = tmp$ret$15;
|
|
519
|
-
var tmp_6 = toString_0(tmp$ret$16);
|
|
520
|
-
var tmp$ret$18;
|
|
461
|
+
tmp$ret$17 = toString(tmp1_uppercase_0).toUpperCase();
|
|
462
|
+
var tmp_6 = toString_0(tmp$ret$17);
|
|
521
463
|
// Inline function 'kotlin.text.substring' call
|
|
522
|
-
var tmp$ret$17;
|
|
523
464
|
// Inline function 'kotlin.js.asDynamic' call
|
|
524
|
-
|
|
525
|
-
tmp$ret$18 = tmp$ret$17.substring(1);
|
|
526
|
-
tmp_5 = tmp_6 + tmp$ret$18;
|
|
465
|
+
tmp_5 = tmp_6 + tmp0_replaceFirstChar_0.substring(1);
|
|
527
466
|
} else {
|
|
528
467
|
tmp_5 = tmp0_replaceFirstChar_0;
|
|
529
468
|
}
|
|
530
|
-
tmp$ret$
|
|
531
|
-
tmp$ret$
|
|
532
|
-
|
|
533
|
-
tmp_4 = tmp$ret$21;
|
|
469
|
+
tmp$ret$20 = tmp_5;
|
|
470
|
+
tmp$ret$21 = listOf(to(tmp$ret$20, first(tmp0_anonymous).i3_1));
|
|
471
|
+
tmp_4 = new Right(tmp$ret$21);
|
|
534
472
|
} else {
|
|
535
|
-
if (
|
|
473
|
+
if (result_0 instanceof Left) {
|
|
536
474
|
tmp_4 = result_0;
|
|
537
475
|
} else {
|
|
538
476
|
noWhenBranchMatchedException();
|
|
539
477
|
}
|
|
540
478
|
}
|
|
541
|
-
tmp$ret$
|
|
542
|
-
|
|
543
|
-
tmp_3 = to(tmp$ret$23, file_2);
|
|
479
|
+
tmp$ret$24 = tmp_4;
|
|
480
|
+
tmp_3 = to(tmp$ret$24, file_2);
|
|
544
481
|
} else {
|
|
545
482
|
tmp_3 = to(result_0, file_2);
|
|
546
483
|
}
|
|
547
|
-
tmp$ret$
|
|
548
|
-
|
|
484
|
+
tmp$ret$25 = tmp_3;
|
|
485
|
+
tmp0_mapTo_1.a(tmp$ret$25);
|
|
549
486
|
}
|
|
550
|
-
tmp$ret$25 = tmp0_mapTo_0;
|
|
551
|
-
tmp$ret$26 = tmp$ret$25;
|
|
552
|
-
tmp$ret$27 = tmp$ret$26;
|
|
553
|
-
tmp$ret$28 = tmp$ret$27;
|
|
554
|
-
var tmp4_map = tmp$ret$28;
|
|
555
|
-
var tmp$ret$29;
|
|
556
487
|
// Inline function 'kotlin.collections.mapTo' call
|
|
557
|
-
var
|
|
558
|
-
var tmp0_iterator_3 =
|
|
488
|
+
var tmp0_mapTo_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_mapTo_1, 10));
|
|
489
|
+
var tmp0_iterator_3 = tmp0_mapTo_1.c();
|
|
559
490
|
while (tmp0_iterator_3.d()) {
|
|
560
491
|
var item_2 = tmp0_iterator_3.e();
|
|
561
492
|
// Inline function 'community.flock.wirespec.compiler.cli.compile.<anonymous>.<anonymous>' call
|
|
562
|
-
var results_0 = item_2.
|
|
563
|
-
var file_3 = item_2.
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
write(results_0.qg_1, file_3);
|
|
493
|
+
var results_0 = item_2.j3();
|
|
494
|
+
var file_3 = item_2.k3();
|
|
495
|
+
if (results_0 instanceof Right) {
|
|
496
|
+
write(results_0.vg_1, file_3);
|
|
567
497
|
} else {
|
|
568
|
-
if (
|
|
569
|
-
println(results_0.
|
|
498
|
+
if (results_0 instanceof Left) {
|
|
499
|
+
println(results_0.qg_1);
|
|
570
500
|
}
|
|
571
501
|
}
|
|
572
|
-
|
|
502
|
+
tmp0_mapTo_2.a(Unit_getInstance());
|
|
573
503
|
}
|
|
574
|
-
tmp$ret$29 = tmp3_mapTo;
|
|
575
|
-
tmp$ret$30 = tmp$ret$29;
|
|
576
504
|
}
|
|
577
505
|
}
|
|
578
506
|
}
|
|
@@ -585,15 +513,13 @@
|
|
|
585
513
|
while (tmp0_iterator.d()) {
|
|
586
514
|
var element = tmp0_iterator.e();
|
|
587
515
|
// Inline function 'community.flock.wirespec.compiler.cli.write.<anonymous>' call
|
|
588
|
-
var name = element.
|
|
589
|
-
var result = element.
|
|
590
|
-
file.
|
|
516
|
+
var name = element.j3();
|
|
517
|
+
var result = element.k3();
|
|
518
|
+
file.p20(name).q20(result);
|
|
591
519
|
}
|
|
592
520
|
}
|
|
593
521
|
function emit(languages, packageName, path, logger) {
|
|
594
|
-
var tmp$ret$2;
|
|
595
522
|
// Inline function 'kotlin.collections.map' call
|
|
596
|
-
var tmp$ret$1;
|
|
597
523
|
// Inline function 'kotlin.collections.mapTo' call
|
|
598
524
|
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(languages, 10));
|
|
599
525
|
var tmp0_iterator = languages.c();
|
|
@@ -601,17 +527,16 @@
|
|
|
601
527
|
var item = tmp0_iterator.e();
|
|
602
528
|
var tmp$ret$0;
|
|
603
529
|
// Inline function 'community.flock.wirespec.compiler.cli.emit.<anonymous>' call
|
|
604
|
-
var tmp0_subject = item;
|
|
605
530
|
var tmp;
|
|
606
|
-
if (equals(
|
|
531
|
+
if (equals(item, Jvm_Java_getInstance())) {
|
|
607
532
|
tmp = to(new JavaEmitter(packageName, logger), new JavaFile(path(Extension_Java_getInstance())));
|
|
608
|
-
} else if (equals(
|
|
533
|
+
} else if (equals(item, Jvm_Kotlin_getInstance())) {
|
|
609
534
|
tmp = to(new KotlinEmitter(packageName, logger), new KotlinFile(path(Extension_Kotlin_getInstance())));
|
|
610
|
-
} else if (equals(
|
|
535
|
+
} else if (equals(item, Jvm_Scala_getInstance())) {
|
|
611
536
|
tmp = to(new ScalaEmitter(packageName, logger), new ScalaFile(path(Extension_Scala_getInstance())));
|
|
612
|
-
} else if (equals(
|
|
537
|
+
} else if (equals(item, Script_TypeScript_getInstance())) {
|
|
613
538
|
tmp = to(new TypeScriptEmitter(logger), new TypeScriptFile(path(Extension_TypeScript_getInstance())));
|
|
614
|
-
} else if (equals(
|
|
539
|
+
} else if (equals(item, Script_Wirespec_getInstance())) {
|
|
615
540
|
tmp = to(new WirespecEmitter(logger), new WirespecFile(path(Extension_Wirespec_getInstance())));
|
|
616
541
|
} else {
|
|
617
542
|
noWhenBranchMatchedException();
|
|
@@ -619,42 +544,40 @@
|
|
|
619
544
|
tmp$ret$0 = tmp;
|
|
620
545
|
tmp0_mapTo.a(tmp$ret$0);
|
|
621
546
|
}
|
|
622
|
-
|
|
623
|
-
tmp$ret$2 = tmp$ret$1;
|
|
624
|
-
return tmp$ret$2;
|
|
547
|
+
return tmp0_mapTo;
|
|
625
548
|
}
|
|
626
549
|
function cli$lambda($debug$delegate) {
|
|
627
|
-
return $debug$delegate.
|
|
550
|
+
return $debug$delegate.o1y(null, getLocalDelegateReference('debug', KProperty0, false, function () {
|
|
628
551
|
return THROW_ISE();
|
|
629
552
|
}));
|
|
630
553
|
}
|
|
631
554
|
function cli$lambda_0($input$delegate) {
|
|
632
|
-
return $input$delegate.
|
|
555
|
+
return $input$delegate.o1y(null, getLocalDelegateReference('input', KProperty0, false, function () {
|
|
633
556
|
return THROW_ISE();
|
|
634
557
|
}));
|
|
635
558
|
}
|
|
636
559
|
function cli$lambda_1($output$delegate) {
|
|
637
|
-
return $output$delegate.
|
|
560
|
+
return $output$delegate.o1y(null, getLocalDelegateReference('output', KProperty0, false, function () {
|
|
638
561
|
return THROW_ISE();
|
|
639
562
|
}));
|
|
640
563
|
}
|
|
641
564
|
function cli$lambda_2($language$delegate) {
|
|
642
|
-
return $language$delegate.
|
|
565
|
+
return $language$delegate.o1y(null, getLocalDelegateReference('language', KProperty0, false, function () {
|
|
643
566
|
return THROW_ISE();
|
|
644
567
|
}));
|
|
645
568
|
}
|
|
646
569
|
function cli$lambda_3($openapi$delegate) {
|
|
647
|
-
return $openapi$delegate.
|
|
570
|
+
return $openapi$delegate.o1y(null, getLocalDelegateReference('openapi', KProperty0, false, function () {
|
|
648
571
|
return THROW_ISE();
|
|
649
572
|
}));
|
|
650
573
|
}
|
|
651
574
|
function cli$lambda_4($packageName$delegate) {
|
|
652
|
-
return $packageName$delegate.
|
|
575
|
+
return $packageName$delegate.o1y(null, getLocalDelegateReference('packageName', KProperty0, false, function () {
|
|
653
576
|
return THROW_ISE();
|
|
654
577
|
}));
|
|
655
578
|
}
|
|
656
579
|
function cli$lambda_5(it) {
|
|
657
|
-
var tmp0_elvis_lhs = Companion_getInstance_3().
|
|
580
|
+
var tmp0_elvis_lhs = Companion_getInstance_3().i20(it);
|
|
658
581
|
var tmp;
|
|
659
582
|
if (tmp0_elvis_lhs == null) {
|
|
660
583
|
throw IllegalStateException_init_$Create$('Language not found');
|
|
@@ -664,16 +587,11 @@
|
|
|
664
587
|
return tmp;
|
|
665
588
|
}
|
|
666
589
|
function cli$lambda_6(it) {
|
|
667
|
-
var tmp$ret$1;
|
|
668
590
|
// Inline function 'kotlin.text.lowercase' call
|
|
669
|
-
var tmp0_lowercase = it.toString();
|
|
670
|
-
var tmp$ret$0;
|
|
671
591
|
// Inline function 'kotlin.js.asDynamic' call
|
|
672
|
-
|
|
673
|
-
tmp$ret$1 = tmp$ret$0.toLowerCase();
|
|
674
|
-
return tmp$ret$1;
|
|
592
|
+
return it.toString().toLowerCase();
|
|
675
593
|
}
|
|
676
|
-
function cli$lambda_7($
|
|
594
|
+
function cli$lambda_7($tmp3_Choice) {
|
|
677
595
|
return function (it) {
|
|
678
596
|
var tmp$ret$3;
|
|
679
597
|
// Inline function 'kotlin.collections.find' call
|
|
@@ -691,8 +609,8 @@
|
|
|
691
609
|
var element = indexedObject[inductionVariable];
|
|
692
610
|
inductionVariable = inductionVariable + 1 | 0;
|
|
693
611
|
var tmp$ret$1;
|
|
694
|
-
// Inline function '
|
|
695
|
-
tmp$ret$1 = equals_0($
|
|
612
|
+
// Inline function 'kotlinx.cli.Companion.Choice.<anonymous>.<anonymous>' call
|
|
613
|
+
tmp$ret$1 = equals_0($tmp3_Choice(element), it, true);
|
|
696
614
|
if (tmp$ret$1) {
|
|
697
615
|
tmp$ret$2 = element;
|
|
698
616
|
break $l$block;
|
|
@@ -721,17 +639,17 @@
|
|
|
721
639
|
if (tmp0_elvis_lhs == null) {
|
|
722
640
|
var tmp$ret$1;
|
|
723
641
|
// Inline function 'kotlin.text.lowercase' call
|
|
724
|
-
var tmp0_lowercase = extension.
|
|
642
|
+
var tmp0_lowercase = extension.q4_1;
|
|
725
643
|
var tmp$ret$0;
|
|
726
644
|
// Inline function 'kotlin.js.asDynamic' call
|
|
727
645
|
tmp$ret$0 = tmp0_lowercase;
|
|
728
646
|
tmp$ret$1 = tmp$ret$0.toLowerCase();
|
|
729
|
-
tmp = $this_out.
|
|
647
|
+
tmp = $this_out.m20_1 + '/out/' + tmp$ret$1;
|
|
730
648
|
} else {
|
|
731
649
|
tmp = tmp0_elvis_lhs;
|
|
732
650
|
}
|
|
733
651
|
var dir = tmp;
|
|
734
|
-
return $this_out.
|
|
652
|
+
return $this_out.r20(dir + '/' + joinToString(split($packageName, charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
|
|
735
653
|
};
|
|
736
654
|
}
|
|
737
655
|
function OpenapiVersion_V2_getInstance() {
|
|
@@ -751,6 +669,11 @@
|
|
|
751
669
|
function values_2() {
|
|
752
670
|
return [Extension_Java_getInstance(), Extension_Kotlin_getInstance(), Extension_Scala_getInstance(), Extension_TypeScript_getInstance(), Extension_Wirespec_getInstance(), Extension_Json_getInstance()];
|
|
753
671
|
}
|
|
672
|
+
function get_entries_1() {
|
|
673
|
+
if ($ENTRIES_1 == null)
|
|
674
|
+
$ENTRIES_1 = enumEntries(values_2());
|
|
675
|
+
return $ENTRIES_1;
|
|
676
|
+
}
|
|
754
677
|
var Extension_entriesInitialized;
|
|
755
678
|
function Extension_initEntries() {
|
|
756
679
|
if (Extension_entriesInitialized)
|
|
@@ -763,9 +686,10 @@
|
|
|
763
686
|
Extension_Wirespec_instance = new Extension('Wirespec', 4, 'ws');
|
|
764
687
|
Extension_Json_instance = new Extension('Json', 5, 'json');
|
|
765
688
|
}
|
|
689
|
+
var $ENTRIES_1;
|
|
766
690
|
function Extension(name, ordinal, ext) {
|
|
767
691
|
Enum.call(this, name, ordinal);
|
|
768
|
-
this.
|
|
692
|
+
this.u20_1 = ext;
|
|
769
693
|
}
|
|
770
694
|
function Extension_Java_getInstance() {
|
|
771
695
|
Extension_initEntries();
|
|
@@ -794,47 +718,31 @@
|
|
|
794
718
|
function Companion_0() {
|
|
795
719
|
Companion_instance_0 = this;
|
|
796
720
|
}
|
|
797
|
-
protoOf(Companion_0).
|
|
721
|
+
protoOf(Companion_0).g1u = function (input) {
|
|
798
722
|
var list = split_0(input, ['/', '.']);
|
|
799
|
-
var tmp$ret$6;
|
|
800
723
|
// Inline function 'kotlin.let' call
|
|
801
|
-
var tmp$ret$1;
|
|
802
724
|
// Inline function 'kotlin.text.lowercase' call
|
|
803
|
-
var tmp0_lowercase = last(list);
|
|
804
|
-
var tmp$ret$0;
|
|
805
725
|
// Inline function 'kotlin.js.asDynamic' call
|
|
806
|
-
|
|
807
|
-
tmp$ret$1 = tmp$ret$0.toLowerCase();
|
|
808
|
-
var tmp1_let = tmp$ret$1;
|
|
726
|
+
var tmp1_let = last(list).toLowerCase();
|
|
809
727
|
// Inline function 'kotlin.contracts.contract' call
|
|
810
|
-
var tmp$ret$5;
|
|
811
728
|
// Inline function 'community.flock.wirespec.compiler.cli.io.Companion.parse.<anonymous>' call
|
|
812
|
-
var tmp$ret$4;
|
|
813
729
|
// Inline function 'kotlin.collections.find' call
|
|
814
|
-
var tmp0_find =
|
|
730
|
+
var tmp0_find = get_entries_1();
|
|
815
731
|
var tmp$ret$3;
|
|
816
732
|
$l$block: {
|
|
817
733
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
818
|
-
var
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
while (inductionVariable < last_0) {
|
|
822
|
-
var element = indexedObject[inductionVariable];
|
|
823
|
-
inductionVariable = inductionVariable + 1 | 0;
|
|
824
|
-
var tmp$ret$2;
|
|
734
|
+
var tmp0_iterator = tmp0_find.c();
|
|
735
|
+
while (tmp0_iterator.d()) {
|
|
736
|
+
var element = tmp0_iterator.e();
|
|
825
737
|
// Inline function 'community.flock.wirespec.compiler.cli.io.Companion.parse.<anonymous>.<anonymous>' call
|
|
826
|
-
|
|
827
|
-
if (tmp$ret$2) {
|
|
738
|
+
if (element.u20_1 === tmp1_let) {
|
|
828
739
|
tmp$ret$3 = element;
|
|
829
740
|
break $l$block;
|
|
830
741
|
}
|
|
831
742
|
}
|
|
832
743
|
tmp$ret$3 = null;
|
|
833
744
|
}
|
|
834
|
-
|
|
835
|
-
tmp$ret$5 = tmp$ret$4;
|
|
836
|
-
tmp$ret$6 = tmp$ret$5;
|
|
837
|
-
var tmp0_elvis_lhs = tmp$ret$6;
|
|
745
|
+
var tmp0_elvis_lhs = tmp$ret$3;
|
|
838
746
|
var tmp;
|
|
839
747
|
if (tmp0_elvis_lhs == null) {
|
|
840
748
|
throw IllegalStateException_init_$Create$('Invalid file extension');
|
|
@@ -855,26 +763,26 @@
|
|
|
855
763
|
function FullFilePath(directory, fileName, extension) {
|
|
856
764
|
Companion_getInstance_4();
|
|
857
765
|
extension = extension === VOID ? Extension_Wirespec_getInstance() : extension;
|
|
858
|
-
this.
|
|
859
|
-
this.
|
|
860
|
-
this.
|
|
766
|
+
this.m20_1 = directory;
|
|
767
|
+
this.n20_1 = fileName;
|
|
768
|
+
this.o20_1 = extension;
|
|
861
769
|
}
|
|
862
770
|
protoOf(FullFilePath).toString = function () {
|
|
863
|
-
return this.
|
|
771
|
+
return this.m20_1 + '/' + this.n20_1 + '.' + this.o20_1.u20_1;
|
|
864
772
|
};
|
|
865
|
-
protoOf(FullFilePath).
|
|
773
|
+
protoOf(FullFilePath).v20 = function (directory, fileName, extension) {
|
|
866
774
|
return new FullFilePath(directory, fileName, extension);
|
|
867
775
|
};
|
|
868
|
-
protoOf(FullFilePath).
|
|
869
|
-
directory = directory === VOID ? this.
|
|
870
|
-
fileName = fileName === VOID ? this.
|
|
871
|
-
extension = extension === VOID ? this.
|
|
872
|
-
return $super === VOID ? this.
|
|
776
|
+
protoOf(FullFilePath).r20 = function (directory, fileName, extension, $super) {
|
|
777
|
+
directory = directory === VOID ? this.m20_1 : directory;
|
|
778
|
+
fileName = fileName === VOID ? this.n20_1 : fileName;
|
|
779
|
+
extension = extension === VOID ? this.o20_1 : extension;
|
|
780
|
+
return $super === VOID ? this.v20(directory, fileName, extension) : $super.v20.call(this, directory, fileName, extension);
|
|
873
781
|
};
|
|
874
782
|
protoOf(FullFilePath).hashCode = function () {
|
|
875
|
-
var result = getStringHashCode(this.
|
|
876
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
877
|
-
result = imul(result, 31) + this.
|
|
783
|
+
var result = getStringHashCode(this.m20_1);
|
|
784
|
+
result = imul(result, 31) + getStringHashCode(this.n20_1) | 0;
|
|
785
|
+
result = imul(result, 31) + this.o20_1.hashCode() | 0;
|
|
878
786
|
return result;
|
|
879
787
|
};
|
|
880
788
|
protoOf(FullFilePath).equals = function (other) {
|
|
@@ -883,65 +791,63 @@
|
|
|
883
791
|
if (!(other instanceof FullFilePath))
|
|
884
792
|
return false;
|
|
885
793
|
var tmp0_other_with_cast = other instanceof FullFilePath ? other : THROW_CCE();
|
|
886
|
-
if (!(this.
|
|
794
|
+
if (!(this.m20_1 === tmp0_other_with_cast.m20_1))
|
|
887
795
|
return false;
|
|
888
|
-
if (!(this.
|
|
796
|
+
if (!(this.n20_1 === tmp0_other_with_cast.n20_1))
|
|
889
797
|
return false;
|
|
890
|
-
if (!this.
|
|
798
|
+
if (!this.o20_1.equals(tmp0_other_with_cast.o20_1))
|
|
891
799
|
return false;
|
|
892
800
|
return true;
|
|
893
801
|
};
|
|
894
802
|
function JavaFile(path) {
|
|
895
|
-
File.call(this, path.
|
|
803
|
+
File.call(this, path.r20(VOID, VOID, Extension_Java_getInstance()));
|
|
896
804
|
}
|
|
897
|
-
protoOf(JavaFile).
|
|
898
|
-
return new JavaFile(this.
|
|
805
|
+
protoOf(JavaFile).p20 = function (fileName) {
|
|
806
|
+
return new JavaFile(this.l20_1.r20(VOID, fileName));
|
|
899
807
|
};
|
|
900
808
|
function JsonFile(path) {
|
|
901
|
-
File.call(this, path.
|
|
809
|
+
File.call(this, path.r20(VOID, VOID, Extension_Json_getInstance()));
|
|
902
810
|
}
|
|
903
|
-
protoOf(JsonFile).
|
|
904
|
-
return new JsonFile(this.
|
|
811
|
+
protoOf(JsonFile).p20 = function (fileName) {
|
|
812
|
+
return new JsonFile(this.l20_1.r20(VOID, fileName));
|
|
905
813
|
};
|
|
906
814
|
function KotlinFile(path) {
|
|
907
|
-
File.call(this, path.
|
|
815
|
+
File.call(this, path.r20(VOID, VOID, Extension_Kotlin_getInstance()));
|
|
908
816
|
}
|
|
909
|
-
protoOf(KotlinFile).
|
|
910
|
-
return new KotlinFile(this.
|
|
817
|
+
protoOf(KotlinFile).p20 = function (fileName) {
|
|
818
|
+
return new KotlinFile(this.l20_1.r20(VOID, fileName));
|
|
911
819
|
};
|
|
912
820
|
function ScalaFile(path) {
|
|
913
|
-
File.call(this, path.
|
|
821
|
+
File.call(this, path.r20(VOID, VOID, Extension_Scala_getInstance()));
|
|
914
822
|
}
|
|
915
|
-
protoOf(ScalaFile).
|
|
916
|
-
return new ScalaFile(this.
|
|
823
|
+
protoOf(ScalaFile).p20 = function (fileName) {
|
|
824
|
+
return new ScalaFile(this.l20_1.r20(VOID, fileName));
|
|
917
825
|
};
|
|
918
826
|
function TypeScriptFile(path) {
|
|
919
|
-
File.call(this, path.
|
|
827
|
+
File.call(this, path.r20(VOID, VOID, Extension_TypeScript_getInstance()));
|
|
920
828
|
}
|
|
921
|
-
protoOf(TypeScriptFile).
|
|
922
|
-
return new TypeScriptFile(this.
|
|
829
|
+
protoOf(TypeScriptFile).p20 = function (fileName) {
|
|
830
|
+
return new TypeScriptFile(this.l20_1.r20(VOID, fileName));
|
|
923
831
|
};
|
|
924
832
|
function WirespecFile(path) {
|
|
925
|
-
File.call(this, path.
|
|
833
|
+
File.call(this, path.r20(VOID, VOID, Extension_Wirespec_getInstance()));
|
|
926
834
|
}
|
|
927
|
-
protoOf(WirespecFile).
|
|
928
|
-
return new WirespecFile(this.
|
|
835
|
+
protoOf(WirespecFile).p20 = function (fileName) {
|
|
836
|
+
return new WirespecFile(this.l20_1.r20(VOID, fileName));
|
|
929
837
|
};
|
|
930
838
|
function Directory$wirespecFiles$lambda(it) {
|
|
931
|
-
var tmp$ret$0;
|
|
932
839
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
933
|
-
|
|
934
|
-
return tmp$ret$0;
|
|
840
|
+
return it;
|
|
935
841
|
}
|
|
936
842
|
function Directory$wirespecFiles$lambda_0(it) {
|
|
937
|
-
return endsWith(it, Extension_Wirespec_getInstance().
|
|
843
|
+
return endsWith(it, Extension_Wirespec_getInstance().u20_1);
|
|
938
844
|
}
|
|
939
845
|
function Directory$wirespecFiles$lambda_1(it) {
|
|
940
|
-
return dropLast(it, Extension_Wirespec_getInstance().
|
|
846
|
+
return dropLast(it, Extension_Wirespec_getInstance().u20_1.length + 1 | 0);
|
|
941
847
|
}
|
|
942
848
|
function Directory$wirespecFiles$lambda_2(this$0) {
|
|
943
849
|
return function (it) {
|
|
944
|
-
return new FullFilePath(this$0.
|
|
850
|
+
return new FullFilePath(this$0.j20_1, it);
|
|
945
851
|
};
|
|
946
852
|
}
|
|
947
853
|
function WirespecFile$_init_$ref_cj1n5j() {
|
|
@@ -952,10 +858,10 @@
|
|
|
952
858
|
return l;
|
|
953
859
|
}
|
|
954
860
|
function Directory(path) {
|
|
955
|
-
this.
|
|
861
|
+
this.j20_1 = path;
|
|
956
862
|
}
|
|
957
|
-
protoOf(Directory).
|
|
958
|
-
var tmp = asSequence(iterator(get_fs().readdirSync(this.
|
|
863
|
+
protoOf(Directory).k20 = function () {
|
|
864
|
+
var tmp = asSequence(iterator(get_fs().readdirSync(this.j20_1, 'utf-8')));
|
|
959
865
|
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
|
|
960
866
|
var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
|
|
961
867
|
var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
|
|
@@ -963,31 +869,22 @@
|
|
|
963
869
|
return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
|
|
964
870
|
};
|
|
965
871
|
function File(path) {
|
|
966
|
-
this.
|
|
872
|
+
this.l20_1 = path;
|
|
967
873
|
}
|
|
968
|
-
protoOf(File).
|
|
969
|
-
var tmp$ret$0;
|
|
874
|
+
protoOf(File).m16 = function () {
|
|
970
875
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
971
|
-
|
|
972
|
-
tmp$ret$0 = tmp0_unsafeCast;
|
|
973
|
-
return tmp$ret$0;
|
|
876
|
+
return get_fs().readFileSync(this.l20_1.toString(), 'utf-8');
|
|
974
877
|
};
|
|
975
|
-
protoOf(File).
|
|
976
|
-
var tmp$ret$2;
|
|
878
|
+
protoOf(File).q20 = function (text) {
|
|
977
879
|
// Inline function 'kotlin.run' call
|
|
978
|
-
var tmp0_run = this.
|
|
880
|
+
var tmp0_run = this.l20_1.r20(joinToString(split_0(this.l20_1.m20_1, ['out']), 'out/node'));
|
|
979
881
|
// Inline function 'kotlin.contracts.contract' call
|
|
980
|
-
var tmp$ret$1;
|
|
981
882
|
// Inline function 'community.flock.wirespec.compiler.cli.io.File.write.<anonymous>' call
|
|
982
|
-
var tmp$ret$0;
|
|
983
883
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
if (!tmp$ret$0) {
|
|
987
|
-
get_fs().mkdirSync(tmp0_run.u1z_1, {recursive: true});
|
|
884
|
+
if (!get_fs().existsSync(tmp0_run.m20_1)) {
|
|
885
|
+
get_fs().mkdirSync(tmp0_run.m20_1, {recursive: true});
|
|
988
886
|
}
|
|
989
|
-
|
|
990
|
-
tmp$ret$2 = tmp$ret$1;
|
|
887
|
+
get_fs().writeFileSync(tmp0_run.toString(), text);
|
|
991
888
|
};
|
|
992
889
|
function get_fs() {
|
|
993
890
|
_init_properties_JavaScriptBindings_kt__clolet();
|
|
@@ -996,8 +893,7 @@
|
|
|
996
893
|
var fs;
|
|
997
894
|
var properties_initialized_JavaScriptBindings_kt_6og6hv;
|
|
998
895
|
function _init_properties_JavaScriptBindings_kt__clolet() {
|
|
999
|
-
if (properties_initialized_JavaScriptBindings_kt_6og6hv) {
|
|
1000
|
-
} else {
|
|
896
|
+
if (!properties_initialized_JavaScriptBindings_kt_6og6hv) {
|
|
1001
897
|
properties_initialized_JavaScriptBindings_kt_6og6hv = true;
|
|
1002
898
|
fs = require('fs');
|
|
1003
899
|
}
|
|
@@ -1009,51 +905,40 @@
|
|
|
1009
905
|
var nodeArgs;
|
|
1010
906
|
function orNull(_this__u8e3s4, idx) {
|
|
1011
907
|
_init_properties_CommandLineArguments_kt__b5v7hl();
|
|
1012
|
-
var tmp$ret$4;
|
|
1013
908
|
// Inline function 'kotlin.Result.getOrNull' call
|
|
1014
|
-
var tmp$ret$3;
|
|
1015
909
|
// Inline function 'kotlin.runCatching' call
|
|
1016
910
|
var tmp;
|
|
1017
911
|
try {
|
|
1018
|
-
var tmp$ret$1;
|
|
1019
912
|
// Inline function 'kotlin.Companion.success' call
|
|
1020
|
-
|
|
1021
|
-
var tmp$ret$0;
|
|
913
|
+
Companion_getInstance_2();
|
|
1022
914
|
// Inline function 'community.flock.wirespec.compiler.utils.orNull.<anonymous>' call
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
tmp$ret$1 = _Result___init__impl__xyqfz8(tmp1_success);
|
|
1026
|
-
tmp = tmp$ret$1;
|
|
915
|
+
var tmp1_success = get_nodeArgs()[idx];
|
|
916
|
+
tmp = _Result___init__impl__xyqfz8(tmp1_success);
|
|
1027
917
|
} catch ($p) {
|
|
1028
918
|
var tmp_0;
|
|
1029
919
|
if ($p instanceof Error) {
|
|
1030
920
|
var e = $p;
|
|
1031
|
-
var tmp$ret$2;
|
|
1032
921
|
// Inline function 'kotlin.Companion.failure' call
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
tmp_0 = tmp$ret$2;
|
|
922
|
+
Companion_getInstance_2();
|
|
923
|
+
tmp_0 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
1036
924
|
} else {
|
|
1037
925
|
throw $p;
|
|
1038
926
|
}
|
|
1039
927
|
tmp = tmp_0;
|
|
1040
928
|
}
|
|
1041
|
-
|
|
1042
|
-
var tmp3_getOrNull = tmp$ret$3;
|
|
929
|
+
var tmp0_getOrNull = tmp;
|
|
1043
930
|
var tmp_1;
|
|
1044
|
-
if (_Result___get_isFailure__impl__jpiriv(
|
|
931
|
+
if (_Result___get_isFailure__impl__jpiriv(tmp0_getOrNull)) {
|
|
1045
932
|
tmp_1 = null;
|
|
1046
933
|
} else {
|
|
1047
|
-
var tmp_2 = _Result___get_value__impl__bjfvqg(
|
|
934
|
+
var tmp_2 = _Result___get_value__impl__bjfvqg(tmp0_getOrNull);
|
|
1048
935
|
tmp_1 = (tmp_2 == null ? true : isObject(tmp_2)) ? tmp_2 : THROW_CCE();
|
|
1049
936
|
}
|
|
1050
|
-
|
|
1051
|
-
return tmp$ret$4;
|
|
937
|
+
return tmp_1;
|
|
1052
938
|
}
|
|
1053
939
|
var properties_initialized_CommandLineArguments_kt_ekn5uh;
|
|
1054
940
|
function _init_properties_CommandLineArguments_kt__b5v7hl() {
|
|
1055
|
-
if (properties_initialized_CommandLineArguments_kt_ekn5uh) {
|
|
1056
|
-
} else {
|
|
941
|
+
if (!properties_initialized_CommandLineArguments_kt_ekn5uh) {
|
|
1057
942
|
properties_initialized_CommandLineArguments_kt_ekn5uh = true;
|
|
1058
943
|
var tmp = process.argv.slice(2);
|
|
1059
944
|
nodeArgs = (!(tmp == null) ? isArray(tmp) : false) ? tmp : THROW_CCE();
|
|
@@ -1066,4 +951,4 @@
|
|
|
1066
951
|
return _;
|
|
1067
952
|
}));
|
|
1068
953
|
|
|
1069
|
-
//# sourceMappingURL=wirespec-cli.js.map
|
|
954
|
+
//# sourceMappingURL=wirespec-src-compiler-cli.js.map
|