@tuprolog/arg2p 0.17.2 → 0.18.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.
@@ -24,24 +24,24 @@
24
24
  var openSync = $module$fs.openSync;
25
25
  var lstatSync = $module$fs.lstatSync;
26
26
  var readlinkSync = $module$fs.readlinkSync;
27
- var toString = kotlin_kotlin.$_$.y7;
28
- var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.k1;
29
- var Unit_instance = kotlin_kotlin.$_$.q;
30
- var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.n1;
27
+ var toString = kotlin_kotlin.$_$.h8;
28
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.n1;
29
+ var Unit_instance = kotlin_kotlin.$_$.r;
30
+ var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.q1;
31
31
  var IOException_init_$Create$ = kotlin_com_squareup_okio_okio.$_$.b;
32
- var numberToLong = kotlin_kotlin.$_$.k6;
33
- var protoOf = kotlin_kotlin.$_$.v7;
34
- var initMetadataForClass = kotlin_kotlin.$_$.i7;
35
- var convertToInt = kotlin_kotlin.$_$.d6;
36
- var toNumber = kotlin_kotlin.$_$.p6;
37
- var numberToInt = kotlin_kotlin.$_$.t7;
38
- var fromInt = kotlin_kotlin.$_$.g6;
39
- var add = kotlin_kotlin.$_$.b6;
32
+ var numberToLong = kotlin_kotlin.$_$.t6;
33
+ var protoOf = kotlin_kotlin.$_$.e8;
34
+ var initMetadataForClass = kotlin_kotlin.$_$.r7;
35
+ var convertToInt = kotlin_kotlin.$_$.m6;
36
+ var toNumber = kotlin_kotlin.$_$.y6;
37
+ var numberToInt = kotlin_kotlin.$_$.c8;
38
+ var fromInt = kotlin_kotlin.$_$.p6;
39
+ var add = kotlin_kotlin.$_$.k6;
40
40
  var FileNotFoundException = kotlin_com_squareup_okio_okio.$_$.d;
41
41
  var FileSystem = kotlin_com_squareup_okio_okio.$_$.e;
42
42
  var Companion_getInstance = kotlin_com_squareup_okio_okio.$_$.a;
43
43
  var FileMetadata = kotlin_com_squareup_okio_okio.$_$.c;
44
- var initMetadataForObject = kotlin_kotlin.$_$.m7;
44
+ var initMetadataForObject = kotlin_kotlin.$_$.v7;
45
45
  var VOID = kotlin_kotlin.$_$.b;
46
46
  //endregion
47
47
  //region block: pre-declaration
@@ -50,74 +50,74 @@
50
50
  initMetadataForObject(NodeJsFileSystem, 'NodeJsFileSystem', VOID, FileSystem);
51
51
  //endregion
52
52
  function FileSink(fd) {
53
- this.q44_1 = fd;
54
- this.r44_1 = false;
53
+ this.k3v_1 = fd;
54
+ this.l3v_1 = false;
55
55
  }
56
- protoOf(FileSink).j42 = function (source, byteCount) {
56
+ protoOf(FileSink).d3t = function (source, byteCount) {
57
57
  // Inline function 'kotlin.require' call
58
58
  if (!(byteCount >= 0n)) {
59
59
  var message = 'byteCount < 0: ' + byteCount.toString();
60
60
  throw IllegalArgumentException_init_$Create$(toString(message));
61
61
  }
62
62
  // Inline function 'kotlin.require' call
63
- if (!(source.z41_1 >= byteCount)) {
64
- var message_0 = 'source.size=' + source.z41_1.toString() + ' < byteCount=' + byteCount.toString();
63
+ if (!(source.t3s_1 >= byteCount)) {
64
+ var message_0 = 'source.size=' + source.t3s_1.toString() + ' < byteCount=' + byteCount.toString();
65
65
  throw IllegalArgumentException_init_$Create$(toString(message_0));
66
66
  }
67
67
  // Inline function 'kotlin.check' call
68
- if (!!this.r44_1) {
68
+ if (!!this.l3v_1) {
69
69
  var message_1 = 'closed';
70
70
  throw IllegalStateException_init_$Create$(toString(message_1));
71
71
  }
72
- var data = source.n43(byteCount);
73
- var writtenByteCount = writeSync(this.q44_1, data);
72
+ var data = source.h3u(byteCount);
73
+ var writtenByteCount = writeSync(this.k3v_1, data);
74
74
  if (!(numberToLong(writtenByteCount) === byteCount)) {
75
75
  throw IOException_init_$Create$('expected ' + byteCount.toString() + ' but was ' + writtenByteCount);
76
76
  }
77
77
  };
78
- protoOf(FileSink).i8 = function () {
78
+ protoOf(FileSink).o8 = function () {
79
79
  };
80
- protoOf(FileSink).w22 = function () {
81
- if (this.r44_1)
80
+ protoOf(FileSink).z22 = function () {
81
+ if (this.l3v_1)
82
82
  return Unit_instance;
83
- this.r44_1 = true;
84
- closeSync(this.q44_1);
83
+ this.l3v_1 = true;
84
+ closeSync(this.k3v_1);
85
85
  };
86
86
  function FileSource(fd) {
87
- this.s44_1 = fd;
88
- this.t44_1 = 0n;
89
- this.u44_1 = false;
87
+ this.m3v_1 = fd;
88
+ this.n3v_1 = 0n;
89
+ this.o3v_1 = false;
90
90
  }
91
- protoOf(FileSource).a44 = function (sink, byteCount) {
91
+ protoOf(FileSource).u3u = function (sink, byteCount) {
92
92
  // Inline function 'kotlin.require' call
93
93
  if (!(byteCount >= 0n)) {
94
94
  var message = 'byteCount < 0: ' + byteCount.toString();
95
95
  throw IllegalArgumentException_init_$Create$(toString(message));
96
96
  }
97
97
  // Inline function 'kotlin.check' call
98
- if (!!this.u44_1) {
98
+ if (!!this.o3v_1) {
99
99
  var message_0 = 'closed';
100
100
  throw IllegalStateException_init_$Create$(toString(message_0));
101
101
  }
102
102
  var data = new Int8Array(convertToInt(byteCount));
103
- var tmp0_fd = this.s44_1;
103
+ var tmp0_fd = this.m3v_1;
104
104
  var tmp1_length = toNumber(byteCount);
105
- var tmp2_position = toNumber(this.t44_1);
105
+ var tmp2_position = toNumber(this.n3v_1);
106
106
  var readByteCount = numberToInt(readSync(tmp0_fd, data, 0.0, tmp1_length, tmp2_position));
107
107
  if (readByteCount === 0)
108
108
  return -1n;
109
109
  var tmp = this;
110
110
  // Inline function 'kotlin.Long.plus' call
111
- var this_0 = this.t44_1;
112
- tmp.t44_1 = add(this_0, fromInt(readByteCount));
113
- sink.b42(data, 0, readByteCount);
111
+ var this_0 = this.n3v_1;
112
+ tmp.n3v_1 = add(this_0, fromInt(readByteCount));
113
+ sink.v3s(data, 0, readByteCount);
114
114
  return fromInt(readByteCount);
115
115
  };
116
- protoOf(FileSource).w22 = function () {
117
- if (this.u44_1)
116
+ protoOf(FileSource).z22 = function () {
117
+ if (this.o3v_1)
118
118
  return Unit_instance;
119
- this.u44_1 = true;
120
- closeSync(this.s44_1);
119
+ this.o3v_1 = true;
120
+ closeSync(this.m3v_1);
121
121
  };
122
122
  function _get_errorCode__501hwc($this, $receiver) {
123
123
  // Inline function 'kotlin.js.asDynamic' call
@@ -141,12 +141,12 @@
141
141
  function NodeJsFileSystem() {
142
142
  NodeJsFileSystem_instance = this;
143
143
  FileSystem.call(this);
144
- this.v44_1 = 61440;
145
- this.w44_1 = 32768;
146
- this.x44_1 = 16384;
147
- this.y44_1 = 40960;
144
+ this.p3v_1 = 61440;
145
+ this.q3v_1 = 32768;
146
+ this.r3v_1 = 16384;
147
+ this.s3v_1 = 40960;
148
148
  }
149
- protoOf(NodeJsFileSystem).c42 = function (path) {
149
+ protoOf(NodeJsFileSystem).w3s = function (path) {
150
150
  var pathString = path.toString();
151
151
  var tmp;
152
152
  try {
@@ -164,9 +164,9 @@
164
164
  }
165
165
  var stat = tmp;
166
166
  var symlinkTarget = null;
167
- if ((numberToInt(stat.mode) & this.v44_1) === this.y44_1) {
167
+ if ((numberToInt(stat.mode) & this.p3v_1) === this.s3v_1) {
168
168
  try {
169
- symlinkTarget = Companion_getInstance().w42(readlinkSync(pathString));
169
+ symlinkTarget = Companion_getInstance().q3t(readlinkSync(pathString));
170
170
  } catch ($p_0) {
171
171
  if ($p_0 instanceof Error) {
172
172
  var e_0 = $p_0;
@@ -176,18 +176,18 @@
176
176
  }
177
177
  }
178
178
  }
179
- return new FileMetadata((numberToInt(stat.mode) & this.v44_1) === this.w44_1, (numberToInt(stat.mode) & this.v44_1) === this.x44_1, symlinkTarget, numberToLong(stat.size), numberToLong(stat.birthtimeMs), numberToLong(stat.mtimeMs), numberToLong(stat.atimeMs));
179
+ return new FileMetadata((numberToInt(stat.mode) & this.p3v_1) === this.q3v_1, (numberToInt(stat.mode) & this.p3v_1) === this.r3v_1, symlinkTarget, numberToLong(stat.size), numberToLong(stat.birthtimeMs), numberToLong(stat.mtimeMs), numberToLong(stat.atimeMs));
180
180
  };
181
- protoOf(NodeJsFileSystem).y42 = function (file) {
181
+ protoOf(NodeJsFileSystem).s3t = function (file) {
182
182
  var fd = openFd(this, file, 'r');
183
183
  return new FileSource(fd);
184
184
  };
185
- protoOf(NodeJsFileSystem).z42 = function (file, mustCreate) {
185
+ protoOf(NodeJsFileSystem).t3t = function (file, mustCreate) {
186
186
  var fd = openFd(this, file, mustCreate ? 'wx' : 'w');
187
187
  return new FileSink(fd);
188
188
  };
189
- protoOf(NodeJsFileSystem).a43 = function (file, mustExist) {
190
- if (mustExist && !this.x42(file))
189
+ protoOf(NodeJsFileSystem).u3t = function (file, mustExist) {
190
+ if (mustExist && !this.r3t(file))
191
191
  throw IOException_init_$Create$(file.toString() + " doesn't exist.");
192
192
  var fd = openFd(this, file, 'a');
193
193
  return new FileSink(fd);