miqro 6.2.3 → 6.2.4
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/build/esm/src/common/arguments.js +25 -15
- package/package.json +1 -1
- package/src/common/arguments.ts +23 -15
|
@@ -111,13 +111,15 @@ export function parseArguments() {
|
|
|
111
111
|
console.error(usage);
|
|
112
112
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
if (typeof cPath !== "string") {
|
|
114
|
+
if (typeof args[i + 1] !== "string") {
|
|
116
115
|
console.error("bad arguments. --config must be a string.");
|
|
117
116
|
console.error(usage);
|
|
118
117
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
119
118
|
}
|
|
120
|
-
|
|
119
|
+
else {
|
|
120
|
+
const cPath = String(args[i + 1]);
|
|
121
|
+
flags.miqroJSONPath = cPath;
|
|
122
|
+
}
|
|
121
123
|
i++;
|
|
122
124
|
continue;
|
|
123
125
|
case "--install-tsconfig":
|
|
@@ -195,13 +197,15 @@ export function parseArguments() {
|
|
|
195
197
|
console.error(usage);
|
|
196
198
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
197
199
|
}
|
|
198
|
-
|
|
199
|
-
if (typeof cPort !== "string") {
|
|
200
|
+
if (typeof args[i + 1] !== "string") {
|
|
200
201
|
console.error("bad arguments. --port must be a string.");
|
|
201
202
|
console.error(usage);
|
|
202
203
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
203
204
|
}
|
|
204
|
-
|
|
205
|
+
else {
|
|
206
|
+
const cPort = String(args[i + 1]);
|
|
207
|
+
flags.port = cPort;
|
|
208
|
+
}
|
|
205
209
|
i++;
|
|
206
210
|
continue;
|
|
207
211
|
case "--name":
|
|
@@ -210,13 +214,15 @@ export function parseArguments() {
|
|
|
210
214
|
console.error(usage);
|
|
211
215
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
212
216
|
}
|
|
213
|
-
|
|
214
|
-
if (typeof cName !== "string") {
|
|
217
|
+
if (typeof args[i + 1] !== "string") {
|
|
215
218
|
console.error("bad arguments. --port must be a string.");
|
|
216
219
|
console.error(usage);
|
|
217
220
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
218
221
|
}
|
|
219
|
-
|
|
222
|
+
else {
|
|
223
|
+
const cName = String(args[i + 1]).toUpperCase();
|
|
224
|
+
flags.name = cName;
|
|
225
|
+
}
|
|
220
226
|
i++;
|
|
221
227
|
continue;
|
|
222
228
|
case "--log-file":
|
|
@@ -225,13 +231,15 @@ export function parseArguments() {
|
|
|
225
231
|
console.error(usage);
|
|
226
232
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
227
233
|
}
|
|
228
|
-
|
|
229
|
-
if (typeof cLofFile !== "string") {
|
|
234
|
+
if (typeof args[i + 1] !== "string") {
|
|
230
235
|
console.error("bad arguments. --port must be a string.");
|
|
231
236
|
console.error(usage);
|
|
232
237
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
233
238
|
}
|
|
234
|
-
|
|
239
|
+
else {
|
|
240
|
+
const cLofFile = String(args[i + 1]);
|
|
241
|
+
flags.logFile = cLofFile;
|
|
242
|
+
}
|
|
235
243
|
i++;
|
|
236
244
|
continue;
|
|
237
245
|
case "--browser":
|
|
@@ -240,13 +248,15 @@ export function parseArguments() {
|
|
|
240
248
|
console.error(usage);
|
|
241
249
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
242
250
|
}
|
|
243
|
-
|
|
244
|
-
if (typeof cBrowser !== "string") {
|
|
251
|
+
if (typeof args[i + 1] !== "string") {
|
|
245
252
|
console.error("bad arguments. --port must be a string.");
|
|
246
253
|
console.error(usage);
|
|
247
254
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
248
255
|
}
|
|
249
|
-
|
|
256
|
+
else {
|
|
257
|
+
const cBrowser = String(args[i + 1]);
|
|
258
|
+
flags.browser = cBrowser;
|
|
259
|
+
}
|
|
250
260
|
i++;
|
|
251
261
|
continue;
|
|
252
262
|
case "--generate-doc":
|
package/package.json
CHANGED
package/src/common/arguments.ts
CHANGED
|
@@ -187,13 +187,14 @@ export function parseArguments(): Arguments {
|
|
|
187
187
|
console.error(usage);
|
|
188
188
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
if (typeof cPath !== "string") {
|
|
190
|
+
if (typeof args[i + 1] !== "string") {
|
|
192
191
|
console.error("bad arguments. --config must be a string.");
|
|
193
192
|
console.error(usage);
|
|
194
193
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
194
|
+
} else {
|
|
195
|
+
const cPath = String(args[i + 1]) as any;
|
|
196
|
+
flags.miqroJSONPath = cPath;
|
|
195
197
|
}
|
|
196
|
-
flags.miqroJSONPath = cPath;
|
|
197
198
|
i++;
|
|
198
199
|
continue;
|
|
199
200
|
case "--install-tsconfig":
|
|
@@ -271,13 +272,14 @@ export function parseArguments(): Arguments {
|
|
|
271
272
|
console.error(usage);
|
|
272
273
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
273
274
|
}
|
|
274
|
-
|
|
275
|
-
if (typeof cPort !== "string") {
|
|
275
|
+
if (typeof args[i + 1] !== "string") {
|
|
276
276
|
console.error("bad arguments. --port must be a string.");
|
|
277
277
|
console.error(usage);
|
|
278
278
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
279
|
+
} else {
|
|
280
|
+
const cPort = String(args[i + 1]) as any;
|
|
281
|
+
flags.port = cPort;
|
|
279
282
|
}
|
|
280
|
-
flags.port = cPort;
|
|
281
283
|
i++;
|
|
282
284
|
continue;
|
|
283
285
|
case "--name":
|
|
@@ -286,13 +288,15 @@ export function parseArguments(): Arguments {
|
|
|
286
288
|
console.error(usage);
|
|
287
289
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
288
290
|
}
|
|
289
|
-
|
|
290
|
-
if (typeof cName !== "string") {
|
|
291
|
+
if (typeof args[i + 1] !== "string") {
|
|
291
292
|
console.error("bad arguments. --port must be a string.");
|
|
292
293
|
console.error(usage);
|
|
293
294
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
295
|
+
} else {
|
|
296
|
+
const cName = String(args[i + 1]).toUpperCase() as any;
|
|
297
|
+
flags.name = cName;
|
|
294
298
|
}
|
|
295
|
-
|
|
299
|
+
|
|
296
300
|
i++;
|
|
297
301
|
continue;
|
|
298
302
|
case "--log-file":
|
|
@@ -301,13 +305,15 @@ export function parseArguments(): Arguments {
|
|
|
301
305
|
console.error(usage);
|
|
302
306
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
303
307
|
}
|
|
304
|
-
|
|
305
|
-
if (typeof
|
|
308
|
+
|
|
309
|
+
if (typeof args[i + 1] !== "string") {
|
|
306
310
|
console.error("bad arguments. --port must be a string.");
|
|
307
311
|
console.error(usage);
|
|
308
312
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
313
|
+
} else {
|
|
314
|
+
const cLofFile = String(args[i + 1]) as any;
|
|
315
|
+
flags.logFile = cLofFile;
|
|
309
316
|
}
|
|
310
|
-
flags.logFile = cLofFile;
|
|
311
317
|
i++;
|
|
312
318
|
continue;
|
|
313
319
|
case "--browser":
|
|
@@ -316,13 +322,15 @@ export function parseArguments(): Arguments {
|
|
|
316
322
|
console.error(usage);
|
|
317
323
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
318
324
|
}
|
|
319
|
-
|
|
320
|
-
if (typeof
|
|
325
|
+
|
|
326
|
+
if (typeof args[i + 1] !== "string") {
|
|
321
327
|
console.error("bad arguments. --port must be a string.");
|
|
322
328
|
console.error(usage);
|
|
323
329
|
process.exit(EXIT_CODES.BAD_ARGUMENTS);
|
|
330
|
+
} else {
|
|
331
|
+
const cBrowser = String(args[i + 1]) as any;
|
|
332
|
+
flags.browser = cBrowser;
|
|
324
333
|
}
|
|
325
|
-
flags.browser = cBrowser;
|
|
326
334
|
i++;
|
|
327
335
|
continue;
|
|
328
336
|
case "--generate-doc":
|