genlayer 0.4.0 → 0.5.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +71 -0
- package/CHANGELOG.md +14 -0
- package/dist/index.js +1372 -412
- package/docker-compose.yml +144 -0
- package/package.json +4 -2
- package/scripts/postinstall.js +18 -0
- package/src/commands/general/index.ts +0 -4
- package/src/commands/general/init.ts +6 -43
- package/src/commands/general/start.ts +3 -16
- package/src/lib/config/simulator.ts +5 -6
- package/src/lib/interfaces/ISimulatorService.ts +2 -8
- package/src/lib/services/simulator.ts +57 -90
- package/tests/actions/init.test.ts +25 -84
- package/tests/actions/start.test.ts +2 -17
- package/tests/commands/init.test.ts +0 -17
- package/tests/commands/up.test.ts +1 -13
- package/tests/services/simulator.test.ts +159 -65
- package/vitest.config.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -59,7 +59,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
59
59
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
60
60
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
61
61
|
var __async = (__this, __arguments, generator) => {
|
|
62
|
-
return new Promise((
|
|
62
|
+
return new Promise((resolve2, reject) => {
|
|
63
63
|
var fulfilled = (value) => {
|
|
64
64
|
try {
|
|
65
65
|
step(generator.next(value));
|
|
@@ -74,7 +74,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
74
74
|
reject(e);
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
var step = (x) => x.done ?
|
|
77
|
+
var step = (x) => x.done ? resolve2(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
78
78
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
79
79
|
});
|
|
80
80
|
};
|
|
@@ -4588,14 +4588,14 @@ var require_async_iterator = __commonJS({
|
|
|
4588
4588
|
};
|
|
4589
4589
|
}
|
|
4590
4590
|
function readAndResolve(iter) {
|
|
4591
|
-
var
|
|
4592
|
-
if (
|
|
4591
|
+
var resolve2 = iter[kLastResolve];
|
|
4592
|
+
if (resolve2 !== null) {
|
|
4593
4593
|
var data = iter[kStream].read();
|
|
4594
4594
|
if (data !== null) {
|
|
4595
4595
|
iter[kLastPromise] = null;
|
|
4596
4596
|
iter[kLastResolve] = null;
|
|
4597
4597
|
iter[kLastReject] = null;
|
|
4598
|
-
|
|
4598
|
+
resolve2(createIterResult(data, false));
|
|
4599
4599
|
}
|
|
4600
4600
|
}
|
|
4601
4601
|
}
|
|
@@ -4603,13 +4603,13 @@ var require_async_iterator = __commonJS({
|
|
|
4603
4603
|
process.nextTick(readAndResolve, iter);
|
|
4604
4604
|
}
|
|
4605
4605
|
function wrapForNext(lastPromise, iter) {
|
|
4606
|
-
return function(
|
|
4606
|
+
return function(resolve2, reject) {
|
|
4607
4607
|
lastPromise.then(function() {
|
|
4608
4608
|
if (iter[kEnded]) {
|
|
4609
|
-
|
|
4609
|
+
resolve2(createIterResult(void 0, true));
|
|
4610
4610
|
return;
|
|
4611
4611
|
}
|
|
4612
|
-
iter[kHandlePromise](
|
|
4612
|
+
iter[kHandlePromise](resolve2, reject);
|
|
4613
4613
|
}, reject);
|
|
4614
4614
|
};
|
|
4615
4615
|
}
|
|
@@ -4629,12 +4629,12 @@ var require_async_iterator = __commonJS({
|
|
|
4629
4629
|
return Promise.resolve(createIterResult(void 0, true));
|
|
4630
4630
|
}
|
|
4631
4631
|
if (this[kStream].destroyed) {
|
|
4632
|
-
return new Promise(function(
|
|
4632
|
+
return new Promise(function(resolve2, reject) {
|
|
4633
4633
|
process.nextTick(function() {
|
|
4634
4634
|
if (_this[kError]) {
|
|
4635
4635
|
reject(_this[kError]);
|
|
4636
4636
|
} else {
|
|
4637
|
-
|
|
4637
|
+
resolve2(createIterResult(void 0, true));
|
|
4638
4638
|
}
|
|
4639
4639
|
});
|
|
4640
4640
|
});
|
|
@@ -4657,13 +4657,13 @@ var require_async_iterator = __commonJS({
|
|
|
4657
4657
|
return this;
|
|
4658
4658
|
}), _defineProperty(_Object$setPrototypeO, "return", function _return() {
|
|
4659
4659
|
var _this2 = this;
|
|
4660
|
-
return new Promise(function(
|
|
4660
|
+
return new Promise(function(resolve2, reject) {
|
|
4661
4661
|
_this2[kStream].destroy(null, function(err) {
|
|
4662
4662
|
if (err) {
|
|
4663
4663
|
reject(err);
|
|
4664
4664
|
return;
|
|
4665
4665
|
}
|
|
4666
|
-
|
|
4666
|
+
resolve2(createIterResult(void 0, true));
|
|
4667
4667
|
});
|
|
4668
4668
|
});
|
|
4669
4669
|
}), _Object$setPrototypeO), AsyncIteratorPrototype);
|
|
@@ -4685,15 +4685,15 @@ var require_async_iterator = __commonJS({
|
|
|
4685
4685
|
value: stream._readableState.endEmitted,
|
|
4686
4686
|
writable: true
|
|
4687
4687
|
}), _defineProperty(_Object$create, kHandlePromise, {
|
|
4688
|
-
value: function value(
|
|
4688
|
+
value: function value(resolve2, reject) {
|
|
4689
4689
|
var data = iterator[kStream].read();
|
|
4690
4690
|
if (data) {
|
|
4691
4691
|
iterator[kLastPromise] = null;
|
|
4692
4692
|
iterator[kLastResolve] = null;
|
|
4693
4693
|
iterator[kLastReject] = null;
|
|
4694
|
-
|
|
4694
|
+
resolve2(createIterResult(data, false));
|
|
4695
4695
|
} else {
|
|
4696
|
-
iterator[kLastResolve] =
|
|
4696
|
+
iterator[kLastResolve] = resolve2;
|
|
4697
4697
|
iterator[kLastReject] = reject;
|
|
4698
4698
|
}
|
|
4699
4699
|
},
|
|
@@ -4712,12 +4712,12 @@ var require_async_iterator = __commonJS({
|
|
|
4712
4712
|
iterator[kError] = err;
|
|
4713
4713
|
return;
|
|
4714
4714
|
}
|
|
4715
|
-
var
|
|
4716
|
-
if (
|
|
4715
|
+
var resolve2 = iterator[kLastResolve];
|
|
4716
|
+
if (resolve2 !== null) {
|
|
4717
4717
|
iterator[kLastPromise] = null;
|
|
4718
4718
|
iterator[kLastResolve] = null;
|
|
4719
4719
|
iterator[kLastReject] = null;
|
|
4720
|
-
|
|
4720
|
+
resolve2(createIterResult(void 0, true));
|
|
4721
4721
|
}
|
|
4722
4722
|
iterator[kEnded] = true;
|
|
4723
4723
|
});
|
|
@@ -4732,7 +4732,7 @@ var require_async_iterator = __commonJS({
|
|
|
4732
4732
|
var require_from = __commonJS({
|
|
4733
4733
|
"node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) {
|
|
4734
4734
|
"use strict";
|
|
4735
|
-
function asyncGeneratorStep(gen,
|
|
4735
|
+
function asyncGeneratorStep(gen, resolve2, reject, _next, _throw, key, arg) {
|
|
4736
4736
|
try {
|
|
4737
4737
|
var info = gen[key](arg);
|
|
4738
4738
|
var value = info.value;
|
|
@@ -4741,7 +4741,7 @@ var require_from = __commonJS({
|
|
|
4741
4741
|
return;
|
|
4742
4742
|
}
|
|
4743
4743
|
if (info.done) {
|
|
4744
|
-
|
|
4744
|
+
resolve2(value);
|
|
4745
4745
|
} else {
|
|
4746
4746
|
Promise.resolve(value).then(_next, _throw);
|
|
4747
4747
|
}
|
|
@@ -4749,13 +4749,13 @@ var require_from = __commonJS({
|
|
|
4749
4749
|
function _asyncToGenerator(fn) {
|
|
4750
4750
|
return function() {
|
|
4751
4751
|
var self2 = this, args = arguments;
|
|
4752
|
-
return new Promise(function(
|
|
4752
|
+
return new Promise(function(resolve2, reject) {
|
|
4753
4753
|
var gen = fn.apply(self2, args);
|
|
4754
4754
|
function _next(value) {
|
|
4755
|
-
asyncGeneratorStep(gen,
|
|
4755
|
+
asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "next", value);
|
|
4756
4756
|
}
|
|
4757
4757
|
function _throw(err) {
|
|
4758
|
-
asyncGeneratorStep(gen,
|
|
4758
|
+
asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "throw", err);
|
|
4759
4759
|
}
|
|
4760
4760
|
_next(void 0);
|
|
4761
4761
|
});
|
|
@@ -6710,11 +6710,11 @@ var require_modem = __commonJS({
|
|
|
6710
6710
|
return opts;
|
|
6711
6711
|
};
|
|
6712
6712
|
var findDefaultUnixSocket = function() {
|
|
6713
|
-
return new Promise(function(
|
|
6713
|
+
return new Promise(function(resolve2) {
|
|
6714
6714
|
var userDockerSocket = path3.join(os3.homedir(), ".docker", "run", "docker.sock");
|
|
6715
6715
|
fs6.access(userDockerSocket, function(err) {
|
|
6716
|
-
if (err)
|
|
6717
|
-
else
|
|
6716
|
+
if (err) resolve2("/var/run/docker.sock");
|
|
6717
|
+
else resolve2(userDockerSocket);
|
|
6718
6718
|
});
|
|
6719
6719
|
});
|
|
6720
6720
|
};
|
|
@@ -9235,12 +9235,12 @@ var require_exec = __commonJS({
|
|
|
9235
9235
|
options: args.opts
|
|
9236
9236
|
};
|
|
9237
9237
|
if (args.callback === void 0) {
|
|
9238
|
-
return new this.modem.Promise(function(
|
|
9238
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9239
9239
|
self2.modem.dial(optsf, function(err, data) {
|
|
9240
9240
|
if (err) {
|
|
9241
9241
|
return reject(err);
|
|
9242
9242
|
}
|
|
9243
|
-
|
|
9243
|
+
resolve2(data);
|
|
9244
9244
|
});
|
|
9245
9245
|
});
|
|
9246
9246
|
} else {
|
|
@@ -9265,12 +9265,12 @@ var require_exec = __commonJS({
|
|
|
9265
9265
|
options: args.opts
|
|
9266
9266
|
};
|
|
9267
9267
|
if (args.callback === void 0) {
|
|
9268
|
-
return new this.modem.Promise(function(
|
|
9268
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9269
9269
|
self2.modem.dial(optsf, function(err, data) {
|
|
9270
9270
|
if (err) {
|
|
9271
9271
|
return reject(err);
|
|
9272
9272
|
}
|
|
9273
|
-
|
|
9273
|
+
resolve2(data);
|
|
9274
9274
|
});
|
|
9275
9275
|
});
|
|
9276
9276
|
} else {
|
|
@@ -9294,12 +9294,12 @@ var require_exec = __commonJS({
|
|
|
9294
9294
|
}
|
|
9295
9295
|
};
|
|
9296
9296
|
if (args.callback === void 0) {
|
|
9297
|
-
return new this.modem.Promise(function(
|
|
9297
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9298
9298
|
self2.modem.dial(optsf, function(err, data) {
|
|
9299
9299
|
if (err) {
|
|
9300
9300
|
return reject(err);
|
|
9301
9301
|
}
|
|
9302
|
-
|
|
9302
|
+
resolve2(data);
|
|
9303
9303
|
});
|
|
9304
9304
|
});
|
|
9305
9305
|
} else {
|
|
@@ -9365,12 +9365,12 @@ var require_container = __commonJS({
|
|
|
9365
9365
|
}
|
|
9366
9366
|
};
|
|
9367
9367
|
if (args.callback === void 0) {
|
|
9368
|
-
return new this.modem.Promise(function(
|
|
9368
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9369
9369
|
self2.modem.dial(optsf, function(err, data) {
|
|
9370
9370
|
if (err) {
|
|
9371
9371
|
return reject(err);
|
|
9372
9372
|
}
|
|
9373
|
-
|
|
9373
|
+
resolve2(data);
|
|
9374
9374
|
});
|
|
9375
9375
|
});
|
|
9376
9376
|
} else {
|
|
@@ -9395,12 +9395,12 @@ var require_container = __commonJS({
|
|
|
9395
9395
|
options: args.opts
|
|
9396
9396
|
};
|
|
9397
9397
|
if (args.callback === void 0) {
|
|
9398
|
-
return new this.modem.Promise(function(
|
|
9398
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9399
9399
|
self2.modem.dial(optsf, function(err, data) {
|
|
9400
9400
|
if (err) {
|
|
9401
9401
|
return reject(err);
|
|
9402
9402
|
}
|
|
9403
|
-
|
|
9403
|
+
resolve2(data);
|
|
9404
9404
|
});
|
|
9405
9405
|
});
|
|
9406
9406
|
} else {
|
|
@@ -9426,12 +9426,12 @@ var require_container = __commonJS({
|
|
|
9426
9426
|
options: args.opts
|
|
9427
9427
|
};
|
|
9428
9428
|
if (args.callback === void 0) {
|
|
9429
|
-
return new this.modem.Promise(function(
|
|
9429
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9430
9430
|
self2.modem.dial(optsf, function(err, data) {
|
|
9431
9431
|
if (err) {
|
|
9432
9432
|
return reject(err);
|
|
9433
9433
|
}
|
|
9434
|
-
|
|
9434
|
+
resolve2(data);
|
|
9435
9435
|
});
|
|
9436
9436
|
});
|
|
9437
9437
|
} else {
|
|
@@ -9455,12 +9455,12 @@ var require_container = __commonJS({
|
|
|
9455
9455
|
options: args.opts
|
|
9456
9456
|
};
|
|
9457
9457
|
if (args.callback === void 0) {
|
|
9458
|
-
return new this.modem.Promise(function(
|
|
9458
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9459
9459
|
self2.modem.dial(optsf, function(err, data) {
|
|
9460
9460
|
if (err) {
|
|
9461
9461
|
return reject(err);
|
|
9462
9462
|
}
|
|
9463
|
-
|
|
9463
|
+
resolve2(data);
|
|
9464
9464
|
});
|
|
9465
9465
|
});
|
|
9466
9466
|
} else {
|
|
@@ -9483,12 +9483,12 @@ var require_container = __commonJS({
|
|
|
9483
9483
|
}
|
|
9484
9484
|
};
|
|
9485
9485
|
if (args.callback === void 0) {
|
|
9486
|
-
return new this.modem.Promise(function(
|
|
9486
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9487
9487
|
self2.modem.dial(optsf, function(err, data) {
|
|
9488
9488
|
if (err) {
|
|
9489
9489
|
return reject(err);
|
|
9490
9490
|
}
|
|
9491
|
-
|
|
9491
|
+
resolve2(data);
|
|
9492
9492
|
});
|
|
9493
9493
|
});
|
|
9494
9494
|
} else {
|
|
@@ -9512,12 +9512,12 @@ var require_container = __commonJS({
|
|
|
9512
9512
|
options: args.opts
|
|
9513
9513
|
};
|
|
9514
9514
|
if (args.callback === void 0) {
|
|
9515
|
-
return new this.modem.Promise(function(
|
|
9515
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9516
9516
|
self2.modem.dial(optsf, function(err, data) {
|
|
9517
9517
|
if (err) {
|
|
9518
9518
|
return reject(err);
|
|
9519
9519
|
}
|
|
9520
|
-
|
|
9520
|
+
resolve2(data);
|
|
9521
9521
|
});
|
|
9522
9522
|
});
|
|
9523
9523
|
} else {
|
|
@@ -9543,12 +9543,12 @@ var require_container = __commonJS({
|
|
|
9543
9543
|
options: args.opts
|
|
9544
9544
|
};
|
|
9545
9545
|
if (args.callback === void 0) {
|
|
9546
|
-
return new this.modem.Promise(function(
|
|
9546
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9547
9547
|
self2.modem.dial(optsf, function(err, data) {
|
|
9548
9548
|
if (err) {
|
|
9549
9549
|
return reject(err);
|
|
9550
9550
|
}
|
|
9551
|
-
|
|
9551
|
+
resolve2(data);
|
|
9552
9552
|
});
|
|
9553
9553
|
});
|
|
9554
9554
|
} else {
|
|
@@ -9576,12 +9576,12 @@ var require_container = __commonJS({
|
|
|
9576
9576
|
options: args.opts
|
|
9577
9577
|
};
|
|
9578
9578
|
if (args.callback === void 0) {
|
|
9579
|
-
return new this.modem.Promise(function(
|
|
9579
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9580
9580
|
self2.modem.dial(optsf, function(err, data) {
|
|
9581
9581
|
if (err) {
|
|
9582
9582
|
return reject(err);
|
|
9583
9583
|
}
|
|
9584
|
-
|
|
9584
|
+
resolve2(data);
|
|
9585
9585
|
});
|
|
9586
9586
|
});
|
|
9587
9587
|
} else {
|
|
@@ -9605,12 +9605,12 @@ var require_container = __commonJS({
|
|
|
9605
9605
|
}
|
|
9606
9606
|
};
|
|
9607
9607
|
if (args.callback === void 0) {
|
|
9608
|
-
return new this.modem.Promise(function(
|
|
9608
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9609
9609
|
self2.modem.dial(optsf, function(err, data) {
|
|
9610
9610
|
if (err) {
|
|
9611
9611
|
return reject(err);
|
|
9612
9612
|
}
|
|
9613
|
-
|
|
9613
|
+
resolve2(data);
|
|
9614
9614
|
});
|
|
9615
9615
|
});
|
|
9616
9616
|
} else {
|
|
@@ -9637,12 +9637,12 @@ var require_container = __commonJS({
|
|
|
9637
9637
|
options: args.opts
|
|
9638
9638
|
};
|
|
9639
9639
|
if (args.callback === void 0) {
|
|
9640
|
-
return new this.modem.Promise(function(
|
|
9640
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9641
9641
|
self2.modem.dial(optsf, function(err, data) {
|
|
9642
9642
|
if (err) {
|
|
9643
9643
|
return reject(err);
|
|
9644
9644
|
}
|
|
9645
|
-
|
|
9645
|
+
resolve2(data);
|
|
9646
9646
|
});
|
|
9647
9647
|
});
|
|
9648
9648
|
} else {
|
|
@@ -9667,12 +9667,12 @@ var require_container = __commonJS({
|
|
|
9667
9667
|
options: args.opts
|
|
9668
9668
|
};
|
|
9669
9669
|
if (args.callback === void 0) {
|
|
9670
|
-
return new this.modem.Promise(function(
|
|
9670
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9671
9671
|
self2.modem.dial(optsf, function(err, data) {
|
|
9672
9672
|
if (err) {
|
|
9673
9673
|
return reject(err);
|
|
9674
9674
|
}
|
|
9675
|
-
|
|
9675
|
+
resolve2(data);
|
|
9676
9676
|
});
|
|
9677
9677
|
});
|
|
9678
9678
|
} else {
|
|
@@ -9698,12 +9698,12 @@ var require_container = __commonJS({
|
|
|
9698
9698
|
options: args.opts
|
|
9699
9699
|
};
|
|
9700
9700
|
if (args.callback === void 0) {
|
|
9701
|
-
return new this.modem.Promise(function(
|
|
9701
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9702
9702
|
self2.modem.dial(optsf, function(err, data) {
|
|
9703
9703
|
if (err) {
|
|
9704
9704
|
return reject(err);
|
|
9705
9705
|
}
|
|
9706
|
-
|
|
9706
|
+
resolve2(data);
|
|
9707
9707
|
});
|
|
9708
9708
|
});
|
|
9709
9709
|
} else {
|
|
@@ -9730,12 +9730,12 @@ var require_container = __commonJS({
|
|
|
9730
9730
|
options: args.opts
|
|
9731
9731
|
};
|
|
9732
9732
|
if (args.callback === void 0) {
|
|
9733
|
-
return new this.modem.Promise(function(
|
|
9733
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9734
9734
|
self2.modem.dial(optsf, function(err, data) {
|
|
9735
9735
|
if (err) {
|
|
9736
9736
|
return reject(err);
|
|
9737
9737
|
}
|
|
9738
|
-
|
|
9738
|
+
resolve2(new Exec(self2.modem, data.Id));
|
|
9739
9739
|
});
|
|
9740
9740
|
});
|
|
9741
9741
|
} else {
|
|
@@ -9763,12 +9763,12 @@ var require_container = __commonJS({
|
|
|
9763
9763
|
options: args.opts
|
|
9764
9764
|
};
|
|
9765
9765
|
if (args.callback === void 0) {
|
|
9766
|
-
return new this.modem.Promise(function(
|
|
9766
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9767
9767
|
self2.modem.dial(optsf, function(err, data) {
|
|
9768
9768
|
if (err) {
|
|
9769
9769
|
return reject(err);
|
|
9770
9770
|
}
|
|
9771
|
-
|
|
9771
|
+
resolve2(data);
|
|
9772
9772
|
});
|
|
9773
9773
|
});
|
|
9774
9774
|
} else {
|
|
@@ -9795,12 +9795,12 @@ var require_container = __commonJS({
|
|
|
9795
9795
|
options: args.opts
|
|
9796
9796
|
};
|
|
9797
9797
|
if (args.callback === void 0) {
|
|
9798
|
-
return new this.modem.Promise(function(
|
|
9798
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9799
9799
|
self2.modem.dial(optsf, function(err, data) {
|
|
9800
9800
|
if (err) {
|
|
9801
9801
|
return reject(err);
|
|
9802
9802
|
}
|
|
9803
|
-
|
|
9803
|
+
resolve2(data);
|
|
9804
9804
|
});
|
|
9805
9805
|
});
|
|
9806
9806
|
} else {
|
|
@@ -9826,12 +9826,12 @@ var require_container = __commonJS({
|
|
|
9826
9826
|
options: args.opts
|
|
9827
9827
|
};
|
|
9828
9828
|
if (args.callback === void 0) {
|
|
9829
|
-
return new this.modem.Promise(function(
|
|
9829
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9830
9830
|
self2.modem.dial(optsf, function(err, data) {
|
|
9831
9831
|
if (err) {
|
|
9832
9832
|
return reject(err);
|
|
9833
9833
|
}
|
|
9834
|
-
|
|
9834
|
+
resolve2(data);
|
|
9835
9835
|
});
|
|
9836
9836
|
});
|
|
9837
9837
|
} else {
|
|
@@ -9857,12 +9857,12 @@ var require_container = __commonJS({
|
|
|
9857
9857
|
options: args.opts
|
|
9858
9858
|
};
|
|
9859
9859
|
if (args.callback === void 0) {
|
|
9860
|
-
return new this.modem.Promise(function(
|
|
9860
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9861
9861
|
self2.modem.dial(optsf, function(err, data) {
|
|
9862
9862
|
if (err) {
|
|
9863
9863
|
return reject(err);
|
|
9864
9864
|
}
|
|
9865
|
-
|
|
9865
|
+
resolve2(data);
|
|
9866
9866
|
});
|
|
9867
9867
|
});
|
|
9868
9868
|
} else {
|
|
@@ -9887,12 +9887,12 @@ var require_container = __commonJS({
|
|
|
9887
9887
|
options: args.opts
|
|
9888
9888
|
};
|
|
9889
9889
|
if (args.callback === void 0) {
|
|
9890
|
-
return new this.modem.Promise(function(
|
|
9890
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9891
9891
|
self2.modem.dial(optsf, function(err, data) {
|
|
9892
9892
|
if (err) {
|
|
9893
9893
|
return reject(err);
|
|
9894
9894
|
}
|
|
9895
|
-
|
|
9895
|
+
resolve2(data);
|
|
9896
9896
|
});
|
|
9897
9897
|
});
|
|
9898
9898
|
} else {
|
|
@@ -9919,12 +9919,12 @@ var require_container = __commonJS({
|
|
|
9919
9919
|
options: args.opts
|
|
9920
9920
|
};
|
|
9921
9921
|
if (args.callback === void 0) {
|
|
9922
|
-
return new this.modem.Promise(function(
|
|
9922
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9923
9923
|
self2.modem.dial(optsf, function(err, stream) {
|
|
9924
9924
|
if (err) {
|
|
9925
9925
|
return reject(err);
|
|
9926
9926
|
}
|
|
9927
|
-
|
|
9927
|
+
resolve2(stream);
|
|
9928
9928
|
});
|
|
9929
9929
|
});
|
|
9930
9930
|
} else {
|
|
@@ -9949,12 +9949,12 @@ var require_container = __commonJS({
|
|
|
9949
9949
|
options: args.opts
|
|
9950
9950
|
};
|
|
9951
9951
|
if (args.callback === void 0) {
|
|
9952
|
-
return new this.modem.Promise(function(
|
|
9952
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9953
9953
|
self2.modem.dial(optsf, function(err, data) {
|
|
9954
9954
|
if (err) {
|
|
9955
9955
|
return reject(err);
|
|
9956
9956
|
}
|
|
9957
|
-
|
|
9957
|
+
resolve2(data);
|
|
9958
9958
|
});
|
|
9959
9959
|
});
|
|
9960
9960
|
} else {
|
|
@@ -9981,12 +9981,12 @@ var require_container = __commonJS({
|
|
|
9981
9981
|
options: args.opts
|
|
9982
9982
|
};
|
|
9983
9983
|
if (args.callback === void 0) {
|
|
9984
|
-
return new this.modem.Promise(function(
|
|
9984
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
9985
9985
|
self2.modem.dial(optsf, function(err, data) {
|
|
9986
9986
|
if (err) {
|
|
9987
9987
|
return reject(err);
|
|
9988
9988
|
}
|
|
9989
|
-
|
|
9989
|
+
resolve2(data);
|
|
9990
9990
|
});
|
|
9991
9991
|
});
|
|
9992
9992
|
} else {
|
|
@@ -10012,12 +10012,12 @@ var require_container = __commonJS({
|
|
|
10012
10012
|
options: args.opts
|
|
10013
10013
|
};
|
|
10014
10014
|
if (args.callback === void 0) {
|
|
10015
|
-
return new this.modem.Promise(function(
|
|
10015
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10016
10016
|
self2.modem.dial(optsf, function(err, data) {
|
|
10017
10017
|
if (err) {
|
|
10018
10018
|
return reject(err);
|
|
10019
10019
|
}
|
|
10020
|
-
|
|
10020
|
+
resolve2(data);
|
|
10021
10021
|
});
|
|
10022
10022
|
});
|
|
10023
10023
|
} else {
|
|
@@ -10043,12 +10043,12 @@ var require_container = __commonJS({
|
|
|
10043
10043
|
options: args.opts
|
|
10044
10044
|
};
|
|
10045
10045
|
if (args.callback === void 0) {
|
|
10046
|
-
return new this.modem.Promise(function(
|
|
10046
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10047
10047
|
self2.modem.dial(optsf, function(err, data) {
|
|
10048
10048
|
if (err) {
|
|
10049
10049
|
return reject(err);
|
|
10050
10050
|
}
|
|
10051
|
-
|
|
10051
|
+
resolve2(data);
|
|
10052
10052
|
});
|
|
10053
10053
|
});
|
|
10054
10054
|
} else {
|
|
@@ -10074,12 +10074,12 @@ var require_container = __commonJS({
|
|
|
10074
10074
|
options: args.opts
|
|
10075
10075
|
};
|
|
10076
10076
|
if (args.callback === void 0) {
|
|
10077
|
-
return new this.modem.Promise(function(
|
|
10077
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10078
10078
|
self2.modem.dial(optsf, function(err, data) {
|
|
10079
10079
|
if (err) {
|
|
10080
10080
|
return reject(err);
|
|
10081
10081
|
}
|
|
10082
|
-
|
|
10082
|
+
resolve2(data);
|
|
10083
10083
|
});
|
|
10084
10084
|
});
|
|
10085
10085
|
} else {
|
|
@@ -10106,12 +10106,12 @@ var require_container = __commonJS({
|
|
|
10106
10106
|
options: args.opts
|
|
10107
10107
|
};
|
|
10108
10108
|
if (args.callback === void 0) {
|
|
10109
|
-
return new this.modem.Promise(function(
|
|
10109
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10110
10110
|
self2.modem.dial(optsf, function(err, data) {
|
|
10111
10111
|
if (err) {
|
|
10112
10112
|
return reject(err);
|
|
10113
10113
|
}
|
|
10114
|
-
|
|
10114
|
+
resolve2(data);
|
|
10115
10115
|
});
|
|
10116
10116
|
});
|
|
10117
10117
|
} else {
|
|
@@ -10136,12 +10136,12 @@ var require_container = __commonJS({
|
|
|
10136
10136
|
options: args.opts
|
|
10137
10137
|
};
|
|
10138
10138
|
if (args.callback === void 0) {
|
|
10139
|
-
return new this.modem.Promise(function(
|
|
10139
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10140
10140
|
self2.modem.dial(optsf, function(err, data) {
|
|
10141
10141
|
if (err) {
|
|
10142
10142
|
return reject(err);
|
|
10143
10143
|
}
|
|
10144
|
-
|
|
10144
|
+
resolve2(data);
|
|
10145
10145
|
});
|
|
10146
10146
|
});
|
|
10147
10147
|
} else {
|
|
@@ -10170,12 +10170,12 @@ var require_container = __commonJS({
|
|
|
10170
10170
|
options: args.opts
|
|
10171
10171
|
};
|
|
10172
10172
|
if (args.callback === void 0) {
|
|
10173
|
-
return new this.modem.Promise(function(
|
|
10173
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10174
10174
|
self2.modem.dial(optsf, function(err, data) {
|
|
10175
10175
|
if (err) {
|
|
10176
10176
|
return reject(err);
|
|
10177
10177
|
}
|
|
10178
|
-
|
|
10178
|
+
resolve2(data);
|
|
10179
10179
|
});
|
|
10180
10180
|
});
|
|
10181
10181
|
} else {
|
|
@@ -10212,12 +10212,12 @@ var require_image = __commonJS({
|
|
|
10212
10212
|
}
|
|
10213
10213
|
};
|
|
10214
10214
|
if (callback === void 0) {
|
|
10215
|
-
return new this.modem.Promise(function(
|
|
10215
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10216
10216
|
self2.modem.dial(opts, function(err, data) {
|
|
10217
10217
|
if (err) {
|
|
10218
10218
|
return reject(err);
|
|
10219
10219
|
}
|
|
10220
|
-
|
|
10220
|
+
resolve2(data);
|
|
10221
10221
|
});
|
|
10222
10222
|
});
|
|
10223
10223
|
} else {
|
|
@@ -10241,12 +10241,12 @@ var require_image = __commonJS({
|
|
|
10241
10241
|
authconfig: args.opts ? args.opts.authconfig : void 0
|
|
10242
10242
|
};
|
|
10243
10243
|
if (args.callback === void 0) {
|
|
10244
|
-
return new this.modem.Promise(function(
|
|
10244
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10245
10245
|
self2.modem.dial(fopts, function(err, data) {
|
|
10246
10246
|
if (err) {
|
|
10247
10247
|
return reject(err);
|
|
10248
10248
|
}
|
|
10249
|
-
|
|
10249
|
+
resolve2(data);
|
|
10250
10250
|
});
|
|
10251
10251
|
});
|
|
10252
10252
|
} else {
|
|
@@ -10268,12 +10268,12 @@ var require_image = __commonJS({
|
|
|
10268
10268
|
}
|
|
10269
10269
|
};
|
|
10270
10270
|
if (callback === void 0) {
|
|
10271
|
-
return new this.modem.Promise(function(
|
|
10271
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10272
10272
|
self2.modem.dial(opts, function(err, data) {
|
|
10273
10273
|
if (err) {
|
|
10274
10274
|
return reject(err);
|
|
10275
10275
|
}
|
|
10276
|
-
|
|
10276
|
+
resolve2(data);
|
|
10277
10277
|
});
|
|
10278
10278
|
});
|
|
10279
10279
|
} else {
|
|
@@ -10295,12 +10295,12 @@ var require_image = __commonJS({
|
|
|
10295
10295
|
}
|
|
10296
10296
|
};
|
|
10297
10297
|
if (callback === void 0) {
|
|
10298
|
-
return new this.modem.Promise(function(
|
|
10298
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10299
10299
|
self2.modem.dial(opts, function(err, data) {
|
|
10300
10300
|
if (err) {
|
|
10301
10301
|
return reject(err);
|
|
10302
10302
|
}
|
|
10303
|
-
|
|
10303
|
+
resolve2(data);
|
|
10304
10304
|
});
|
|
10305
10305
|
});
|
|
10306
10306
|
} else {
|
|
@@ -10332,12 +10332,12 @@ var require_image = __commonJS({
|
|
|
10332
10332
|
};
|
|
10333
10333
|
delete optsf.options.authconfig;
|
|
10334
10334
|
if (callback === void 0) {
|
|
10335
|
-
return new this.modem.Promise(function(
|
|
10335
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10336
10336
|
self2.modem.dial(optsf, function(err, data) {
|
|
10337
10337
|
if (err) {
|
|
10338
10338
|
return reject(err);
|
|
10339
10339
|
}
|
|
10340
|
-
|
|
10340
|
+
resolve2(data);
|
|
10341
10341
|
});
|
|
10342
10342
|
});
|
|
10343
10343
|
} else {
|
|
@@ -10364,12 +10364,12 @@ var require_image = __commonJS({
|
|
|
10364
10364
|
}
|
|
10365
10365
|
};
|
|
10366
10366
|
if (callback === void 0) {
|
|
10367
|
-
return new this.modem.Promise(function(
|
|
10367
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10368
10368
|
self2.modem.dial(optsf, function(err, data) {
|
|
10369
10369
|
if (err) {
|
|
10370
10370
|
return reject(err);
|
|
10371
10371
|
}
|
|
10372
|
-
|
|
10372
|
+
resolve2(data);
|
|
10373
10373
|
});
|
|
10374
10374
|
});
|
|
10375
10375
|
} else {
|
|
@@ -10394,12 +10394,12 @@ var require_image = __commonJS({
|
|
|
10394
10394
|
options: args.opts
|
|
10395
10395
|
};
|
|
10396
10396
|
if (args.callback === void 0) {
|
|
10397
|
-
return new this.modem.Promise(function(
|
|
10397
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10398
10398
|
self2.modem.dial(optsf, function(err, data) {
|
|
10399
10399
|
if (err) {
|
|
10400
10400
|
return reject(err);
|
|
10401
10401
|
}
|
|
10402
|
-
|
|
10402
|
+
resolve2(data);
|
|
10403
10403
|
});
|
|
10404
10404
|
});
|
|
10405
10405
|
} else {
|
|
@@ -10438,12 +10438,12 @@ var require_volume = __commonJS({
|
|
|
10438
10438
|
}
|
|
10439
10439
|
};
|
|
10440
10440
|
if (args.callback === void 0) {
|
|
10441
|
-
return new this.modem.Promise(function(
|
|
10441
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10442
10442
|
self2.modem.dial(optsf, function(err, data) {
|
|
10443
10443
|
if (err) {
|
|
10444
10444
|
return reject(err);
|
|
10445
10445
|
}
|
|
10446
|
-
|
|
10446
|
+
resolve2(data);
|
|
10447
10447
|
});
|
|
10448
10448
|
});
|
|
10449
10449
|
} else {
|
|
@@ -10468,12 +10468,12 @@ var require_volume = __commonJS({
|
|
|
10468
10468
|
options: args.opts
|
|
10469
10469
|
};
|
|
10470
10470
|
if (args.callback === void 0) {
|
|
10471
|
-
return new this.modem.Promise(function(
|
|
10471
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10472
10472
|
self2.modem.dial(optsf, function(err, data) {
|
|
10473
10473
|
if (err) {
|
|
10474
10474
|
return reject(err);
|
|
10475
10475
|
}
|
|
10476
|
-
|
|
10476
|
+
resolve2(data);
|
|
10477
10477
|
});
|
|
10478
10478
|
});
|
|
10479
10479
|
} else {
|
|
@@ -10512,12 +10512,12 @@ var require_network = __commonJS({
|
|
|
10512
10512
|
options: args.opts
|
|
10513
10513
|
};
|
|
10514
10514
|
if (args.callback === void 0) {
|
|
10515
|
-
return new this.modem.Promise(function(
|
|
10515
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10516
10516
|
self2.modem.dial(opts, function(err, data) {
|
|
10517
10517
|
if (err) {
|
|
10518
10518
|
return reject(err);
|
|
10519
10519
|
}
|
|
10520
|
-
|
|
10520
|
+
resolve2(data);
|
|
10521
10521
|
});
|
|
10522
10522
|
});
|
|
10523
10523
|
} else {
|
|
@@ -10543,12 +10543,12 @@ var require_network = __commonJS({
|
|
|
10543
10543
|
options: args.opts
|
|
10544
10544
|
};
|
|
10545
10545
|
if (args.callback === void 0) {
|
|
10546
|
-
return new this.modem.Promise(function(
|
|
10546
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10547
10547
|
self2.modem.dial(optsf, function(err, data) {
|
|
10548
10548
|
if (err) {
|
|
10549
10549
|
return reject(err);
|
|
10550
10550
|
}
|
|
10551
|
-
|
|
10551
|
+
resolve2(data);
|
|
10552
10552
|
});
|
|
10553
10553
|
});
|
|
10554
10554
|
} else {
|
|
@@ -10573,12 +10573,12 @@ var require_network = __commonJS({
|
|
|
10573
10573
|
options: args.opts
|
|
10574
10574
|
};
|
|
10575
10575
|
if (args.callback === void 0) {
|
|
10576
|
-
return new this.modem.Promise(function(
|
|
10576
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10577
10577
|
self2.modem.dial(optsf, function(err, data) {
|
|
10578
10578
|
if (err) {
|
|
10579
10579
|
return reject(err);
|
|
10580
10580
|
}
|
|
10581
|
-
|
|
10581
|
+
resolve2(data);
|
|
10582
10582
|
});
|
|
10583
10583
|
});
|
|
10584
10584
|
} else {
|
|
@@ -10603,12 +10603,12 @@ var require_network = __commonJS({
|
|
|
10603
10603
|
options: args.opts
|
|
10604
10604
|
};
|
|
10605
10605
|
if (args.callback === void 0) {
|
|
10606
|
-
return new this.modem.Promise(function(
|
|
10606
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10607
10607
|
self2.modem.dial(optsf, function(err, data) {
|
|
10608
10608
|
if (err) {
|
|
10609
10609
|
return reject(err);
|
|
10610
10610
|
}
|
|
10611
|
-
|
|
10611
|
+
resolve2(data);
|
|
10612
10612
|
});
|
|
10613
10613
|
});
|
|
10614
10614
|
} else {
|
|
@@ -10647,12 +10647,12 @@ var require_service = __commonJS({
|
|
|
10647
10647
|
}
|
|
10648
10648
|
};
|
|
10649
10649
|
if (args.callback === void 0) {
|
|
10650
|
-
return new this.modem.Promise(function(
|
|
10650
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10651
10651
|
self2.modem.dial(optsf, function(err, data) {
|
|
10652
10652
|
if (err) {
|
|
10653
10653
|
return reject(err);
|
|
10654
10654
|
}
|
|
10655
|
-
|
|
10655
|
+
resolve2(data);
|
|
10656
10656
|
});
|
|
10657
10657
|
});
|
|
10658
10658
|
} else {
|
|
@@ -10676,12 +10676,12 @@ var require_service = __commonJS({
|
|
|
10676
10676
|
}
|
|
10677
10677
|
};
|
|
10678
10678
|
if (args.callback === void 0) {
|
|
10679
|
-
return new this.modem.Promise(function(
|
|
10679
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10680
10680
|
self2.modem.dial(optsf, function(err, data) {
|
|
10681
10681
|
if (err) {
|
|
10682
10682
|
return reject(err);
|
|
10683
10683
|
}
|
|
10684
|
-
|
|
10684
|
+
resolve2(data);
|
|
10685
10685
|
});
|
|
10686
10686
|
});
|
|
10687
10687
|
} else {
|
|
@@ -10716,12 +10716,12 @@ var require_service = __commonJS({
|
|
|
10716
10716
|
options: opts
|
|
10717
10717
|
};
|
|
10718
10718
|
if (callback === void 0) {
|
|
10719
|
-
return new this.modem.Promise(function(
|
|
10719
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10720
10720
|
self2.modem.dial(optsf, function(err, data) {
|
|
10721
10721
|
if (err) {
|
|
10722
10722
|
return reject(err);
|
|
10723
10723
|
}
|
|
10724
|
-
|
|
10724
|
+
resolve2(data);
|
|
10725
10725
|
});
|
|
10726
10726
|
});
|
|
10727
10727
|
} else {
|
|
@@ -10747,12 +10747,12 @@ var require_service = __commonJS({
|
|
|
10747
10747
|
options: args.opts
|
|
10748
10748
|
};
|
|
10749
10749
|
if (args.callback === void 0) {
|
|
10750
|
-
return new this.modem.Promise(function(
|
|
10750
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10751
10751
|
self2.modem.dial(optsf, function(err, data) {
|
|
10752
10752
|
if (err) {
|
|
10753
10753
|
return reject(err);
|
|
10754
10754
|
}
|
|
10755
|
-
|
|
10755
|
+
resolve2(data);
|
|
10756
10756
|
});
|
|
10757
10757
|
});
|
|
10758
10758
|
} else {
|
|
@@ -10792,12 +10792,12 @@ var require_plugin = __commonJS({
|
|
|
10792
10792
|
}
|
|
10793
10793
|
};
|
|
10794
10794
|
if (args.callback === void 0) {
|
|
10795
|
-
return new this.modem.Promise(function(
|
|
10795
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10796
10796
|
self2.modem.dial(optsf, function(err, data) {
|
|
10797
10797
|
if (err) {
|
|
10798
10798
|
return reject(err);
|
|
10799
10799
|
}
|
|
10800
|
-
|
|
10800
|
+
resolve2(data);
|
|
10801
10801
|
});
|
|
10802
10802
|
});
|
|
10803
10803
|
} else {
|
|
@@ -10821,12 +10821,12 @@ var require_plugin = __commonJS({
|
|
|
10821
10821
|
options: args.opts
|
|
10822
10822
|
};
|
|
10823
10823
|
if (args.callback === void 0) {
|
|
10824
|
-
return new this.modem.Promise(function(
|
|
10824
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10825
10825
|
self2.modem.dial(optsf, function(err, data) {
|
|
10826
10826
|
if (err) {
|
|
10827
10827
|
return reject(err);
|
|
10828
10828
|
}
|
|
10829
|
-
|
|
10829
|
+
resolve2(data);
|
|
10830
10830
|
});
|
|
10831
10831
|
});
|
|
10832
10832
|
} else {
|
|
@@ -10852,12 +10852,12 @@ var require_plugin = __commonJS({
|
|
|
10852
10852
|
}
|
|
10853
10853
|
};
|
|
10854
10854
|
if (args.callback === void 0) {
|
|
10855
|
-
return new this.modem.Promise(function(
|
|
10855
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10856
10856
|
self2.modem.dial(optsf, function(err, data) {
|
|
10857
10857
|
if (err) {
|
|
10858
10858
|
return reject(err);
|
|
10859
10859
|
}
|
|
10860
|
-
|
|
10860
|
+
resolve2(data);
|
|
10861
10861
|
});
|
|
10862
10862
|
});
|
|
10863
10863
|
} else {
|
|
@@ -10889,12 +10889,12 @@ var require_plugin = __commonJS({
|
|
|
10889
10889
|
}
|
|
10890
10890
|
};
|
|
10891
10891
|
if (args.callback === void 0) {
|
|
10892
|
-
return new this.modem.Promise(function(
|
|
10892
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10893
10893
|
self2.modem.dial(optsf, function(err, data) {
|
|
10894
10894
|
if (err) {
|
|
10895
10895
|
return reject(err);
|
|
10896
10896
|
}
|
|
10897
|
-
|
|
10897
|
+
resolve2(data);
|
|
10898
10898
|
});
|
|
10899
10899
|
});
|
|
10900
10900
|
} else {
|
|
@@ -10917,12 +10917,12 @@ var require_plugin = __commonJS({
|
|
|
10917
10917
|
options: args.opts
|
|
10918
10918
|
};
|
|
10919
10919
|
if (args.callback === void 0) {
|
|
10920
|
-
return new this.modem.Promise(function(
|
|
10920
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10921
10921
|
self2.modem.dial(optsf, function(err, data) {
|
|
10922
10922
|
if (err) {
|
|
10923
10923
|
return reject(err);
|
|
10924
10924
|
}
|
|
10925
|
-
|
|
10925
|
+
resolve2(data);
|
|
10926
10926
|
});
|
|
10927
10927
|
});
|
|
10928
10928
|
} else {
|
|
@@ -10945,12 +10945,12 @@ var require_plugin = __commonJS({
|
|
|
10945
10945
|
options: args.opts
|
|
10946
10946
|
};
|
|
10947
10947
|
if (args.callback === void 0) {
|
|
10948
|
-
return new this.modem.Promise(function(
|
|
10948
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10949
10949
|
self2.modem.dial(optsf, function(err, data) {
|
|
10950
10950
|
if (err) {
|
|
10951
10951
|
return reject(err);
|
|
10952
10952
|
}
|
|
10953
|
-
|
|
10953
|
+
resolve2(data);
|
|
10954
10954
|
});
|
|
10955
10955
|
});
|
|
10956
10956
|
} else {
|
|
@@ -10974,12 +10974,12 @@ var require_plugin = __commonJS({
|
|
|
10974
10974
|
options: args.opts
|
|
10975
10975
|
};
|
|
10976
10976
|
if (args.callback === void 0) {
|
|
10977
|
-
return new this.modem.Promise(function(
|
|
10977
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
10978
10978
|
self2.modem.dial(optsf, function(err, data) {
|
|
10979
10979
|
if (err) {
|
|
10980
10980
|
return reject(err);
|
|
10981
10981
|
}
|
|
10982
|
-
|
|
10982
|
+
resolve2(data);
|
|
10983
10983
|
});
|
|
10984
10984
|
});
|
|
10985
10985
|
} else {
|
|
@@ -11003,12 +11003,12 @@ var require_plugin = __commonJS({
|
|
|
11003
11003
|
options: args.opts
|
|
11004
11004
|
};
|
|
11005
11005
|
if (args.callback === void 0) {
|
|
11006
|
-
return new this.modem.Promise(function(
|
|
11006
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11007
11007
|
self2.modem.dial(optsf, function(err, data) {
|
|
11008
11008
|
if (err) {
|
|
11009
11009
|
return reject(err);
|
|
11010
11010
|
}
|
|
11011
|
-
|
|
11011
|
+
resolve2(data);
|
|
11012
11012
|
});
|
|
11013
11013
|
});
|
|
11014
11014
|
} else {
|
|
@@ -11038,12 +11038,12 @@ var require_plugin = __commonJS({
|
|
|
11038
11038
|
options: opts
|
|
11039
11039
|
};
|
|
11040
11040
|
if (callback === void 0) {
|
|
11041
|
-
return new this.modem.Promise(function(
|
|
11041
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11042
11042
|
self2.modem.dial(optsf, function(err, data) {
|
|
11043
11043
|
if (err) {
|
|
11044
11044
|
return reject(err);
|
|
11045
11045
|
}
|
|
11046
|
-
|
|
11046
|
+
resolve2(data);
|
|
11047
11047
|
});
|
|
11048
11048
|
});
|
|
11049
11049
|
} else {
|
|
@@ -11083,12 +11083,12 @@ var require_secret = __commonJS({
|
|
|
11083
11083
|
}
|
|
11084
11084
|
};
|
|
11085
11085
|
if (args.callback === void 0) {
|
|
11086
|
-
return new this.modem.Promise(function(
|
|
11086
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11087
11087
|
self2.modem.dial(optsf, function(err, data) {
|
|
11088
11088
|
if (err) {
|
|
11089
11089
|
return reject(err);
|
|
11090
11090
|
}
|
|
11091
|
-
|
|
11091
|
+
resolve2(data);
|
|
11092
11092
|
});
|
|
11093
11093
|
});
|
|
11094
11094
|
} else {
|
|
@@ -11114,12 +11114,12 @@ var require_secret = __commonJS({
|
|
|
11114
11114
|
options: opts
|
|
11115
11115
|
};
|
|
11116
11116
|
if (callback === void 0) {
|
|
11117
|
-
return new this.modem.Promise(function(
|
|
11117
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11118
11118
|
self2.modem.dial(optsf, function(err, data) {
|
|
11119
11119
|
if (err) {
|
|
11120
11120
|
return reject(err);
|
|
11121
11121
|
}
|
|
11122
|
-
|
|
11122
|
+
resolve2(data);
|
|
11123
11123
|
});
|
|
11124
11124
|
});
|
|
11125
11125
|
} else {
|
|
@@ -11144,12 +11144,12 @@ var require_secret = __commonJS({
|
|
|
11144
11144
|
options: args.opts
|
|
11145
11145
|
};
|
|
11146
11146
|
if (args.callback === void 0) {
|
|
11147
|
-
return new this.modem.Promise(function(
|
|
11147
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11148
11148
|
self2.modem.dial(optsf, function(err, data) {
|
|
11149
11149
|
if (err) {
|
|
11150
11150
|
return reject(err);
|
|
11151
11151
|
}
|
|
11152
|
-
|
|
11152
|
+
resolve2(data);
|
|
11153
11153
|
});
|
|
11154
11154
|
});
|
|
11155
11155
|
} else {
|
|
@@ -11189,12 +11189,12 @@ var require_config = __commonJS({
|
|
|
11189
11189
|
}
|
|
11190
11190
|
};
|
|
11191
11191
|
if (args.callback === void 0) {
|
|
11192
|
-
return new this.modem.Promise(function(
|
|
11192
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11193
11193
|
self2.modem.dial(optsf, function(err, data) {
|
|
11194
11194
|
if (err) {
|
|
11195
11195
|
return reject(err);
|
|
11196
11196
|
}
|
|
11197
|
-
|
|
11197
|
+
resolve2(data);
|
|
11198
11198
|
});
|
|
11199
11199
|
});
|
|
11200
11200
|
} else {
|
|
@@ -11219,12 +11219,12 @@ var require_config = __commonJS({
|
|
|
11219
11219
|
options: args.opts
|
|
11220
11220
|
};
|
|
11221
11221
|
if (args.callback === void 0) {
|
|
11222
|
-
return new this.modem.Promise(function(
|
|
11222
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11223
11223
|
self2.modem.dial(optsf, function(err, data) {
|
|
11224
11224
|
if (err) {
|
|
11225
11225
|
return reject(err);
|
|
11226
11226
|
}
|
|
11227
|
-
|
|
11227
|
+
resolve2(data);
|
|
11228
11228
|
});
|
|
11229
11229
|
});
|
|
11230
11230
|
} else {
|
|
@@ -11250,12 +11250,12 @@ var require_config = __commonJS({
|
|
|
11250
11250
|
options: args.opts
|
|
11251
11251
|
};
|
|
11252
11252
|
if (args.callback === void 0) {
|
|
11253
|
-
return new this.modem.Promise(function(
|
|
11253
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11254
11254
|
self2.modem.dial(optsf, function(err, data) {
|
|
11255
11255
|
if (err) {
|
|
11256
11256
|
return reject(err);
|
|
11257
11257
|
}
|
|
11258
|
-
|
|
11258
|
+
resolve2(data);
|
|
11259
11259
|
});
|
|
11260
11260
|
});
|
|
11261
11261
|
} else {
|
|
@@ -11297,12 +11297,12 @@ var require_task = __commonJS({
|
|
|
11297
11297
|
}
|
|
11298
11298
|
};
|
|
11299
11299
|
if (args.callback === void 0) {
|
|
11300
|
-
return new this.modem.Promise(function(
|
|
11300
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11301
11301
|
self2.modem.dial(optsf, function(err, data) {
|
|
11302
11302
|
if (err) {
|
|
11303
11303
|
return reject(err);
|
|
11304
11304
|
}
|
|
11305
|
-
|
|
11305
|
+
resolve2(data);
|
|
11306
11306
|
});
|
|
11307
11307
|
});
|
|
11308
11308
|
} else {
|
|
@@ -11329,12 +11329,12 @@ var require_task = __commonJS({
|
|
|
11329
11329
|
options: args.opts
|
|
11330
11330
|
};
|
|
11331
11331
|
if (args.callback === void 0) {
|
|
11332
|
-
return new this.modem.Promise(function(
|
|
11332
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11333
11333
|
self2.modem.dial(optsf, function(err, data) {
|
|
11334
11334
|
if (err) {
|
|
11335
11335
|
return reject(err);
|
|
11336
11336
|
}
|
|
11337
|
-
|
|
11337
|
+
resolve2(data);
|
|
11338
11338
|
});
|
|
11339
11339
|
});
|
|
11340
11340
|
} else {
|
|
@@ -11373,12 +11373,12 @@ var require_node3 = __commonJS({
|
|
|
11373
11373
|
}
|
|
11374
11374
|
};
|
|
11375
11375
|
if (args.callback === void 0) {
|
|
11376
|
-
return new this.modem.Promise(function(
|
|
11376
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11377
11377
|
self2.modem.dial(optsf, function(err, data) {
|
|
11378
11378
|
if (err) {
|
|
11379
11379
|
return reject(err);
|
|
11380
11380
|
}
|
|
11381
|
-
|
|
11381
|
+
resolve2(data);
|
|
11382
11382
|
});
|
|
11383
11383
|
});
|
|
11384
11384
|
} else {
|
|
@@ -11405,12 +11405,12 @@ var require_node3 = __commonJS({
|
|
|
11405
11405
|
options: opts
|
|
11406
11406
|
};
|
|
11407
11407
|
if (callback === void 0) {
|
|
11408
|
-
return new this.modem.Promise(function(
|
|
11408
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11409
11409
|
self2.modem.dial(optsf, function(err, data) {
|
|
11410
11410
|
if (err) {
|
|
11411
11411
|
return reject(err);
|
|
11412
11412
|
}
|
|
11413
|
-
|
|
11413
|
+
resolve2(data);
|
|
11414
11414
|
});
|
|
11415
11415
|
});
|
|
11416
11416
|
} else {
|
|
@@ -11434,12 +11434,12 @@ var require_node3 = __commonJS({
|
|
|
11434
11434
|
options: args.opts
|
|
11435
11435
|
};
|
|
11436
11436
|
if (args.callback === void 0) {
|
|
11437
|
-
return new this.modem.Promise(function(
|
|
11437
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11438
11438
|
self2.modem.dial(optsf, function(err, data) {
|
|
11439
11439
|
if (err) {
|
|
11440
11440
|
return reject(err);
|
|
11441
11441
|
}
|
|
11442
|
-
|
|
11442
|
+
resolve2(data);
|
|
11443
11443
|
});
|
|
11444
11444
|
});
|
|
11445
11445
|
} else {
|
|
@@ -11507,12 +11507,12 @@ var require_docker = __commonJS({
|
|
|
11507
11507
|
};
|
|
11508
11508
|
delete opts.authconfig;
|
|
11509
11509
|
if (callback === void 0) {
|
|
11510
|
-
return new this.modem.Promise(function(
|
|
11510
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11511
11511
|
self2.modem.dial(optsf, function(err, data) {
|
|
11512
11512
|
if (err) {
|
|
11513
11513
|
return reject(err);
|
|
11514
11514
|
}
|
|
11515
|
-
|
|
11515
|
+
resolve2(self2.getContainer(data.Id));
|
|
11516
11516
|
});
|
|
11517
11517
|
});
|
|
11518
11518
|
} else {
|
|
@@ -11545,12 +11545,12 @@ var require_docker = __commonJS({
|
|
|
11545
11545
|
}
|
|
11546
11546
|
};
|
|
11547
11547
|
if (callback === void 0) {
|
|
11548
|
-
return new this.modem.Promise(function(
|
|
11548
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11549
11549
|
self2.modem.dial(optsf, function(err, data) {
|
|
11550
11550
|
if (err) {
|
|
11551
11551
|
return reject(err);
|
|
11552
11552
|
}
|
|
11553
|
-
|
|
11553
|
+
resolve2(data);
|
|
11554
11554
|
});
|
|
11555
11555
|
});
|
|
11556
11556
|
} else {
|
|
@@ -11578,12 +11578,12 @@ var require_docker = __commonJS({
|
|
|
11578
11578
|
}
|
|
11579
11579
|
};
|
|
11580
11580
|
if (callback === void 0) {
|
|
11581
|
-
return new this.modem.Promise(function(
|
|
11581
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11582
11582
|
self2.modem.dial(optsf, function(err, data) {
|
|
11583
11583
|
if (err) {
|
|
11584
11584
|
return reject(err);
|
|
11585
11585
|
}
|
|
11586
|
-
|
|
11586
|
+
resolve2(data);
|
|
11587
11587
|
});
|
|
11588
11588
|
});
|
|
11589
11589
|
} else {
|
|
@@ -11614,12 +11614,12 @@ var require_docker = __commonJS({
|
|
|
11614
11614
|
}
|
|
11615
11615
|
};
|
|
11616
11616
|
if (callback === void 0) {
|
|
11617
|
-
return new this.modem.Promise(function(
|
|
11617
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11618
11618
|
self2.modem.dial(optsf, function(err, data) {
|
|
11619
11619
|
if (err) {
|
|
11620
11620
|
return reject(err);
|
|
11621
11621
|
}
|
|
11622
|
-
|
|
11622
|
+
resolve2(data);
|
|
11623
11623
|
});
|
|
11624
11624
|
});
|
|
11625
11625
|
} else {
|
|
@@ -11642,12 +11642,12 @@ var require_docker = __commonJS({
|
|
|
11642
11642
|
}
|
|
11643
11643
|
};
|
|
11644
11644
|
if (callback === void 0) {
|
|
11645
|
-
return new this.modem.Promise(function(
|
|
11645
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11646
11646
|
self2.modem.dial(optsf, function(err, data) {
|
|
11647
11647
|
if (err) {
|
|
11648
11648
|
return reject(err);
|
|
11649
11649
|
}
|
|
11650
|
-
|
|
11650
|
+
resolve2(data);
|
|
11651
11651
|
});
|
|
11652
11652
|
});
|
|
11653
11653
|
} else {
|
|
@@ -11685,14 +11685,14 @@ var require_docker = __commonJS({
|
|
|
11685
11685
|
}
|
|
11686
11686
|
}
|
|
11687
11687
|
if (callback === void 0) {
|
|
11688
|
-
return new self2.modem.Promise(function(
|
|
11688
|
+
return new self2.modem.Promise(function(resolve2, reject) {
|
|
11689
11689
|
util2.prepareBuildContext(file, (ctx) => {
|
|
11690
11690
|
optsf.file = ctx;
|
|
11691
11691
|
self2.modem.dial(optsf, function(err, data) {
|
|
11692
11692
|
if (err) {
|
|
11693
11693
|
return reject(err);
|
|
11694
11694
|
}
|
|
11695
|
-
|
|
11695
|
+
resolve2(data);
|
|
11696
11696
|
});
|
|
11697
11697
|
});
|
|
11698
11698
|
});
|
|
@@ -11753,12 +11753,12 @@ var require_docker = __commonJS({
|
|
|
11753
11753
|
}
|
|
11754
11754
|
};
|
|
11755
11755
|
if (args.callback === void 0) {
|
|
11756
|
-
return new this.modem.Promise(function(
|
|
11756
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11757
11757
|
self2.modem.dial(optsf, function(err, data) {
|
|
11758
11758
|
if (err) {
|
|
11759
11759
|
return reject(err);
|
|
11760
11760
|
}
|
|
11761
|
-
|
|
11761
|
+
resolve2(data);
|
|
11762
11762
|
});
|
|
11763
11763
|
});
|
|
11764
11764
|
} else {
|
|
@@ -11782,12 +11782,12 @@ var require_docker = __commonJS({
|
|
|
11782
11782
|
}
|
|
11783
11783
|
};
|
|
11784
11784
|
if (args.callback === void 0) {
|
|
11785
|
-
return new this.modem.Promise(function(
|
|
11785
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11786
11786
|
self2.modem.dial(optsf, function(err, data) {
|
|
11787
11787
|
if (err) {
|
|
11788
11788
|
return reject(err);
|
|
11789
11789
|
}
|
|
11790
|
-
|
|
11790
|
+
resolve2(data);
|
|
11791
11791
|
});
|
|
11792
11792
|
});
|
|
11793
11793
|
} else {
|
|
@@ -11812,12 +11812,12 @@ var require_docker = __commonJS({
|
|
|
11812
11812
|
}
|
|
11813
11813
|
};
|
|
11814
11814
|
if (args.callback === void 0) {
|
|
11815
|
-
return new this.modem.Promise(function(
|
|
11815
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11816
11816
|
self2.modem.dial(optsf, function(err, data) {
|
|
11817
11817
|
if (err) {
|
|
11818
11818
|
return reject(err);
|
|
11819
11819
|
}
|
|
11820
|
-
|
|
11820
|
+
resolve2(data);
|
|
11821
11821
|
});
|
|
11822
11822
|
});
|
|
11823
11823
|
} else {
|
|
@@ -11840,12 +11840,12 @@ var require_docker = __commonJS({
|
|
|
11840
11840
|
}
|
|
11841
11841
|
};
|
|
11842
11842
|
if (args.callback === void 0) {
|
|
11843
|
-
return new this.modem.Promise(function(
|
|
11843
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11844
11844
|
self2.modem.dial(optsf, function(err, data) {
|
|
11845
11845
|
if (err) {
|
|
11846
11846
|
return reject(err);
|
|
11847
11847
|
}
|
|
11848
|
-
|
|
11848
|
+
resolve2(data);
|
|
11849
11849
|
});
|
|
11850
11850
|
});
|
|
11851
11851
|
} else {
|
|
@@ -11871,12 +11871,12 @@ var require_docker = __commonJS({
|
|
|
11871
11871
|
}
|
|
11872
11872
|
};
|
|
11873
11873
|
if (args.callback === void 0) {
|
|
11874
|
-
return new this.modem.Promise(function(
|
|
11874
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11875
11875
|
self2.modem.dial(optsf, function(err, data) {
|
|
11876
11876
|
if (err) {
|
|
11877
11877
|
return reject(err);
|
|
11878
11878
|
}
|
|
11879
|
-
|
|
11879
|
+
resolve2(data);
|
|
11880
11880
|
});
|
|
11881
11881
|
});
|
|
11882
11882
|
} else {
|
|
@@ -11899,12 +11899,12 @@ var require_docker = __commonJS({
|
|
|
11899
11899
|
}
|
|
11900
11900
|
};
|
|
11901
11901
|
if (args.callback === void 0) {
|
|
11902
|
-
return new this.modem.Promise(function(
|
|
11902
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11903
11903
|
self2.modem.dial(optsf, function(err, data) {
|
|
11904
11904
|
if (err) {
|
|
11905
11905
|
return reject(err);
|
|
11906
11906
|
}
|
|
11907
|
-
|
|
11907
|
+
resolve2(data);
|
|
11908
11908
|
});
|
|
11909
11909
|
});
|
|
11910
11910
|
} else {
|
|
@@ -11931,12 +11931,12 @@ var require_docker = __commonJS({
|
|
|
11931
11931
|
}
|
|
11932
11932
|
};
|
|
11933
11933
|
if (args.callback === void 0) {
|
|
11934
|
-
return new this.modem.Promise(function(
|
|
11934
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11935
11935
|
self2.modem.dial(optsf, function(err, data) {
|
|
11936
11936
|
if (err) {
|
|
11937
11937
|
return reject(err);
|
|
11938
11938
|
}
|
|
11939
|
-
|
|
11939
|
+
resolve2(self2.getSecret(data.ID));
|
|
11940
11940
|
});
|
|
11941
11941
|
});
|
|
11942
11942
|
} else {
|
|
@@ -11964,12 +11964,12 @@ var require_docker = __commonJS({
|
|
|
11964
11964
|
}
|
|
11965
11965
|
};
|
|
11966
11966
|
if (args.callback === void 0) {
|
|
11967
|
-
return new this.modem.Promise(function(
|
|
11967
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11968
11968
|
self2.modem.dial(optsf, function(err, data) {
|
|
11969
11969
|
if (err) {
|
|
11970
11970
|
return reject(err);
|
|
11971
11971
|
}
|
|
11972
|
-
|
|
11972
|
+
resolve2(self2.getConfig(data.ID));
|
|
11973
11973
|
});
|
|
11974
11974
|
});
|
|
11975
11975
|
} else {
|
|
@@ -11993,12 +11993,12 @@ var require_docker = __commonJS({
|
|
|
11993
11993
|
}
|
|
11994
11994
|
};
|
|
11995
11995
|
if (args.callback === void 0) {
|
|
11996
|
-
return new this.modem.Promise(function(
|
|
11996
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
11997
11997
|
self2.modem.dial(optsf, function(err, data) {
|
|
11998
11998
|
if (err) {
|
|
11999
11999
|
return reject(err);
|
|
12000
12000
|
}
|
|
12001
|
-
|
|
12001
|
+
resolve2(data);
|
|
12002
12002
|
});
|
|
12003
12003
|
});
|
|
12004
12004
|
} else {
|
|
@@ -12021,12 +12021,12 @@ var require_docker = __commonJS({
|
|
|
12021
12021
|
}
|
|
12022
12022
|
};
|
|
12023
12023
|
if (args.callback === void 0) {
|
|
12024
|
-
return new this.modem.Promise(function(
|
|
12024
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12025
12025
|
self2.modem.dial(optsf, function(err, data) {
|
|
12026
12026
|
if (err) {
|
|
12027
12027
|
return reject(err);
|
|
12028
12028
|
}
|
|
12029
|
-
|
|
12029
|
+
resolve2(data);
|
|
12030
12030
|
});
|
|
12031
12031
|
});
|
|
12032
12032
|
} else {
|
|
@@ -12051,12 +12051,12 @@ var require_docker = __commonJS({
|
|
|
12051
12051
|
}
|
|
12052
12052
|
};
|
|
12053
12053
|
if (args.callback === void 0) {
|
|
12054
|
-
return new this.modem.Promise(function(
|
|
12054
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12055
12055
|
self2.modem.dial(optsf, function(err, data) {
|
|
12056
12056
|
if (err) {
|
|
12057
12057
|
return reject(err);
|
|
12058
12058
|
}
|
|
12059
|
-
|
|
12059
|
+
resolve2(self2.getPlugin(args.opts.name));
|
|
12060
12060
|
});
|
|
12061
12061
|
});
|
|
12062
12062
|
} else {
|
|
@@ -12080,12 +12080,12 @@ var require_docker = __commonJS({
|
|
|
12080
12080
|
}
|
|
12081
12081
|
};
|
|
12082
12082
|
if (args.callback === void 0) {
|
|
12083
|
-
return new this.modem.Promise(function(
|
|
12083
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12084
12084
|
self2.modem.dial(optsf, function(err, data) {
|
|
12085
12085
|
if (err) {
|
|
12086
12086
|
return reject(err);
|
|
12087
12087
|
}
|
|
12088
|
-
|
|
12088
|
+
resolve2(data);
|
|
12089
12089
|
});
|
|
12090
12090
|
});
|
|
12091
12091
|
} else {
|
|
@@ -12108,12 +12108,12 @@ var require_docker = __commonJS({
|
|
|
12108
12108
|
}
|
|
12109
12109
|
};
|
|
12110
12110
|
if (args.callback === void 0) {
|
|
12111
|
-
return new this.modem.Promise(function(
|
|
12111
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12112
12112
|
self2.modem.dial(optsf, function(err, data) {
|
|
12113
12113
|
if (err) {
|
|
12114
12114
|
return reject(err);
|
|
12115
12115
|
}
|
|
12116
|
-
|
|
12116
|
+
resolve2(data);
|
|
12117
12117
|
});
|
|
12118
12118
|
});
|
|
12119
12119
|
} else {
|
|
@@ -12135,12 +12135,12 @@ var require_docker = __commonJS({
|
|
|
12135
12135
|
}
|
|
12136
12136
|
};
|
|
12137
12137
|
if (args.callback === void 0) {
|
|
12138
|
-
return new this.modem.Promise(function(
|
|
12138
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12139
12139
|
self2.modem.dial(optsf, function(err, data) {
|
|
12140
12140
|
if (err) {
|
|
12141
12141
|
return reject(err);
|
|
12142
12142
|
}
|
|
12143
|
-
|
|
12143
|
+
resolve2(data);
|
|
12144
12144
|
});
|
|
12145
12145
|
});
|
|
12146
12146
|
} else {
|
|
@@ -12163,12 +12163,12 @@ var require_docker = __commonJS({
|
|
|
12163
12163
|
}
|
|
12164
12164
|
};
|
|
12165
12165
|
if (args.callback === void 0) {
|
|
12166
|
-
return new this.modem.Promise(function(
|
|
12166
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12167
12167
|
self2.modem.dial(optsf, function(err, data) {
|
|
12168
12168
|
if (err) {
|
|
12169
12169
|
return reject(err);
|
|
12170
12170
|
}
|
|
12171
|
-
|
|
12171
|
+
resolve2(data);
|
|
12172
12172
|
});
|
|
12173
12173
|
});
|
|
12174
12174
|
} else {
|
|
@@ -12191,12 +12191,12 @@ var require_docker = __commonJS({
|
|
|
12191
12191
|
}
|
|
12192
12192
|
};
|
|
12193
12193
|
if (args.callback === void 0) {
|
|
12194
|
-
return new this.modem.Promise(function(
|
|
12194
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12195
12195
|
self2.modem.dial(optsf, function(err, data) {
|
|
12196
12196
|
if (err) {
|
|
12197
12197
|
return reject(err);
|
|
12198
12198
|
}
|
|
12199
|
-
|
|
12199
|
+
resolve2(data);
|
|
12200
12200
|
});
|
|
12201
12201
|
});
|
|
12202
12202
|
} else {
|
|
@@ -12219,12 +12219,12 @@ var require_docker = __commonJS({
|
|
|
12219
12219
|
}
|
|
12220
12220
|
};
|
|
12221
12221
|
if (args.callback === void 0) {
|
|
12222
|
-
return new this.modem.Promise(function(
|
|
12222
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12223
12223
|
self2.modem.dial(optsf, function(err, data) {
|
|
12224
12224
|
if (err) {
|
|
12225
12225
|
return reject(err);
|
|
12226
12226
|
}
|
|
12227
|
-
|
|
12227
|
+
resolve2(data);
|
|
12228
12228
|
});
|
|
12229
12229
|
});
|
|
12230
12230
|
} else {
|
|
@@ -12250,12 +12250,12 @@ var require_docker = __commonJS({
|
|
|
12250
12250
|
}
|
|
12251
12251
|
};
|
|
12252
12252
|
if (args.callback === void 0) {
|
|
12253
|
-
return new this.modem.Promise(function(
|
|
12253
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12254
12254
|
self2.modem.dial(optsf, function(err, data) {
|
|
12255
12255
|
if (err) {
|
|
12256
12256
|
return reject(err);
|
|
12257
12257
|
}
|
|
12258
|
-
|
|
12258
|
+
resolve2(self2.getVolume(data.Name));
|
|
12259
12259
|
});
|
|
12260
12260
|
});
|
|
12261
12261
|
} else {
|
|
@@ -12287,12 +12287,12 @@ var require_docker = __commonJS({
|
|
|
12287
12287
|
}
|
|
12288
12288
|
};
|
|
12289
12289
|
if (callback === void 0) {
|
|
12290
|
-
return new this.modem.Promise(function(
|
|
12290
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12291
12291
|
self2.modem.dial(optsf, function(err, data) {
|
|
12292
12292
|
if (err) {
|
|
12293
12293
|
return reject(err);
|
|
12294
12294
|
}
|
|
12295
|
-
|
|
12295
|
+
resolve2(self2.getService(data.ID || data.Id));
|
|
12296
12296
|
});
|
|
12297
12297
|
});
|
|
12298
12298
|
} else {
|
|
@@ -12317,12 +12317,12 @@ var require_docker = __commonJS({
|
|
|
12317
12317
|
}
|
|
12318
12318
|
};
|
|
12319
12319
|
if (args.callback === void 0) {
|
|
12320
|
-
return new this.modem.Promise(function(
|
|
12320
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12321
12321
|
self2.modem.dial(optsf, function(err, data) {
|
|
12322
12322
|
if (err) {
|
|
12323
12323
|
return reject(err);
|
|
12324
12324
|
}
|
|
12325
|
-
|
|
12325
|
+
resolve2(data);
|
|
12326
12326
|
});
|
|
12327
12327
|
});
|
|
12328
12328
|
} else {
|
|
@@ -12348,12 +12348,12 @@ var require_docker = __commonJS({
|
|
|
12348
12348
|
}
|
|
12349
12349
|
};
|
|
12350
12350
|
if (args.callback === void 0) {
|
|
12351
|
-
return new this.modem.Promise(function(
|
|
12351
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12352
12352
|
self2.modem.dial(optsf, function(err, data) {
|
|
12353
12353
|
if (err) {
|
|
12354
12354
|
return reject(err);
|
|
12355
12355
|
}
|
|
12356
|
-
|
|
12356
|
+
resolve2(self2.getNetwork(data.Id));
|
|
12357
12357
|
});
|
|
12358
12358
|
});
|
|
12359
12359
|
} else {
|
|
@@ -12378,12 +12378,12 @@ var require_docker = __commonJS({
|
|
|
12378
12378
|
}
|
|
12379
12379
|
};
|
|
12380
12380
|
if (args.callback === void 0) {
|
|
12381
|
-
return new this.modem.Promise(function(
|
|
12381
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12382
12382
|
self2.modem.dial(optsf, function(err, data) {
|
|
12383
12383
|
if (err) {
|
|
12384
12384
|
return reject(err);
|
|
12385
12385
|
}
|
|
12386
|
-
|
|
12386
|
+
resolve2(data);
|
|
12387
12387
|
});
|
|
12388
12388
|
});
|
|
12389
12389
|
} else {
|
|
@@ -12406,12 +12406,12 @@ var require_docker = __commonJS({
|
|
|
12406
12406
|
}
|
|
12407
12407
|
};
|
|
12408
12408
|
if (callback === void 0) {
|
|
12409
|
-
return new this.modem.Promise(function(
|
|
12409
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12410
12410
|
self2.modem.dial(optsf, function(err, data) {
|
|
12411
12411
|
if (err) {
|
|
12412
12412
|
return reject(err);
|
|
12413
12413
|
}
|
|
12414
|
-
|
|
12414
|
+
resolve2(data);
|
|
12415
12415
|
});
|
|
12416
12416
|
});
|
|
12417
12417
|
} else {
|
|
@@ -12433,12 +12433,12 @@ var require_docker = __commonJS({
|
|
|
12433
12433
|
}
|
|
12434
12434
|
};
|
|
12435
12435
|
if (args.callback === void 0) {
|
|
12436
|
-
return new this.modem.Promise(function(
|
|
12436
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12437
12437
|
self2.modem.dial(opts, function(err, data) {
|
|
12438
12438
|
if (err) {
|
|
12439
12439
|
return reject(err);
|
|
12440
12440
|
}
|
|
12441
|
-
|
|
12441
|
+
resolve2(data);
|
|
12442
12442
|
});
|
|
12443
12443
|
});
|
|
12444
12444
|
} else {
|
|
@@ -12460,12 +12460,12 @@ var require_docker = __commonJS({
|
|
|
12460
12460
|
}
|
|
12461
12461
|
};
|
|
12462
12462
|
if (args.callback === void 0) {
|
|
12463
|
-
return new this.modem.Promise(function(
|
|
12463
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12464
12464
|
self2.modem.dial(opts, function(err, data) {
|
|
12465
12465
|
if (err) {
|
|
12466
12466
|
return reject(err);
|
|
12467
12467
|
}
|
|
12468
|
-
|
|
12468
|
+
resolve2(data);
|
|
12469
12469
|
});
|
|
12470
12470
|
});
|
|
12471
12471
|
} else {
|
|
@@ -12487,12 +12487,12 @@ var require_docker = __commonJS({
|
|
|
12487
12487
|
}
|
|
12488
12488
|
};
|
|
12489
12489
|
if (args.callback === void 0) {
|
|
12490
|
-
return new this.modem.Promise(function(
|
|
12490
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12491
12491
|
self2.modem.dial(optsf, function(err, data) {
|
|
12492
12492
|
if (err) {
|
|
12493
12493
|
return reject(err);
|
|
12494
12494
|
}
|
|
12495
|
-
|
|
12495
|
+
resolve2(data);
|
|
12496
12496
|
});
|
|
12497
12497
|
});
|
|
12498
12498
|
} else {
|
|
@@ -12514,12 +12514,12 @@ var require_docker = __commonJS({
|
|
|
12514
12514
|
}
|
|
12515
12515
|
};
|
|
12516
12516
|
if (args.callback === void 0) {
|
|
12517
|
-
return new this.modem.Promise(function(
|
|
12517
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12518
12518
|
self2.modem.dial(optsf, function(err, data) {
|
|
12519
12519
|
if (err) {
|
|
12520
12520
|
return reject(err);
|
|
12521
12521
|
}
|
|
12522
|
-
|
|
12522
|
+
resolve2(data);
|
|
12523
12523
|
});
|
|
12524
12524
|
});
|
|
12525
12525
|
} else {
|
|
@@ -12543,12 +12543,12 @@ var require_docker = __commonJS({
|
|
|
12543
12543
|
}
|
|
12544
12544
|
};
|
|
12545
12545
|
if (args.callback === void 0) {
|
|
12546
|
-
return new this.modem.Promise(function(
|
|
12546
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12547
12547
|
self2.modem.dial(optsf, function(err, data) {
|
|
12548
12548
|
if (err) {
|
|
12549
12549
|
return reject(err);
|
|
12550
12550
|
}
|
|
12551
|
-
|
|
12551
|
+
resolve2(data);
|
|
12552
12552
|
});
|
|
12553
12553
|
});
|
|
12554
12554
|
} else {
|
|
@@ -12665,7 +12665,7 @@ var require_docker = __commonJS({
|
|
|
12665
12665
|
};
|
|
12666
12666
|
extend(optsc, createOptions);
|
|
12667
12667
|
var containero;
|
|
12668
|
-
return new this.modem.Promise(function(
|
|
12668
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12669
12669
|
self2.createContainer(optsc).then(function(container) {
|
|
12670
12670
|
containero = container;
|
|
12671
12671
|
return container.attach({
|
|
@@ -12698,7 +12698,7 @@ var require_docker = __commonJS({
|
|
|
12698
12698
|
}).then(function(data) {
|
|
12699
12699
|
return containero.wait();
|
|
12700
12700
|
}).then(function(data) {
|
|
12701
|
-
|
|
12701
|
+
resolve2([data, containero]);
|
|
12702
12702
|
}).catch(function(err) {
|
|
12703
12703
|
reject(err);
|
|
12704
12704
|
});
|
|
@@ -12719,12 +12719,12 @@ var require_docker = __commonJS({
|
|
|
12719
12719
|
options: args.opts
|
|
12720
12720
|
};
|
|
12721
12721
|
if (args.callback === void 0) {
|
|
12722
|
-
return new this.modem.Promise(function(
|
|
12722
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12723
12723
|
self2.modem.dial(optsf, function(err, data) {
|
|
12724
12724
|
if (err) {
|
|
12725
12725
|
return reject(err);
|
|
12726
12726
|
}
|
|
12727
|
-
|
|
12727
|
+
resolve2(data);
|
|
12728
12728
|
});
|
|
12729
12729
|
});
|
|
12730
12730
|
} else {
|
|
@@ -12748,12 +12748,12 @@ var require_docker = __commonJS({
|
|
|
12748
12748
|
options: args.opts
|
|
12749
12749
|
};
|
|
12750
12750
|
if (args.callback === void 0) {
|
|
12751
|
-
return new this.modem.Promise(function(
|
|
12751
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12752
12752
|
self2.modem.dial(optsf, function(err, data) {
|
|
12753
12753
|
if (err) {
|
|
12754
12754
|
return reject(err);
|
|
12755
12755
|
}
|
|
12756
|
-
|
|
12756
|
+
resolve2(data);
|
|
12757
12757
|
});
|
|
12758
12758
|
});
|
|
12759
12759
|
} else {
|
|
@@ -12776,12 +12776,12 @@ var require_docker = __commonJS({
|
|
|
12776
12776
|
options: args.opts
|
|
12777
12777
|
};
|
|
12778
12778
|
if (args.callback === void 0) {
|
|
12779
|
-
return new this.modem.Promise(function(
|
|
12779
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12780
12780
|
self2.modem.dial(optsf, function(err, data) {
|
|
12781
12781
|
if (err) {
|
|
12782
12782
|
return reject(err);
|
|
12783
12783
|
}
|
|
12784
|
-
|
|
12784
|
+
resolve2(data);
|
|
12785
12785
|
});
|
|
12786
12786
|
});
|
|
12787
12787
|
} else {
|
|
@@ -12805,12 +12805,12 @@ var require_docker = __commonJS({
|
|
|
12805
12805
|
options: args.opts
|
|
12806
12806
|
};
|
|
12807
12807
|
if (args.callback === void 0) {
|
|
12808
|
-
return new this.modem.Promise(function(
|
|
12808
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12809
12809
|
self2.modem.dial(optsf, function(err, data) {
|
|
12810
12810
|
if (err) {
|
|
12811
12811
|
return reject(err);
|
|
12812
12812
|
}
|
|
12813
|
-
|
|
12813
|
+
resolve2(data);
|
|
12814
12814
|
});
|
|
12815
12815
|
});
|
|
12816
12816
|
} else {
|
|
@@ -12833,12 +12833,12 @@ var require_docker = __commonJS({
|
|
|
12833
12833
|
}
|
|
12834
12834
|
};
|
|
12835
12835
|
if (args.callback === void 0) {
|
|
12836
|
-
return new this.modem.Promise(function(
|
|
12836
|
+
return new this.modem.Promise(function(resolve2, reject) {
|
|
12837
12837
|
self2.modem.dial(optsf, function(err, data) {
|
|
12838
12838
|
if (err) {
|
|
12839
12839
|
return reject(err);
|
|
12840
12840
|
}
|
|
12841
|
-
|
|
12841
|
+
resolve2(data);
|
|
12842
12842
|
});
|
|
12843
12843
|
});
|
|
12844
12844
|
} else {
|
|
@@ -15689,6 +15689,944 @@ var require_semver2 = __commonJS({
|
|
|
15689
15689
|
}
|
|
15690
15690
|
});
|
|
15691
15691
|
|
|
15692
|
+
// node_modules/rc/node_modules/ini/ini.js
|
|
15693
|
+
var require_ini = __commonJS({
|
|
15694
|
+
"node_modules/rc/node_modules/ini/ini.js"(exports2) {
|
|
15695
|
+
"use strict";
|
|
15696
|
+
exports2.parse = exports2.decode = decode;
|
|
15697
|
+
exports2.stringify = exports2.encode = encode;
|
|
15698
|
+
exports2.safe = safe;
|
|
15699
|
+
exports2.unsafe = unsafe;
|
|
15700
|
+
var eol = typeof process !== "undefined" && process.platform === "win32" ? "\r\n" : "\n";
|
|
15701
|
+
function encode(obj, opt) {
|
|
15702
|
+
var children = [];
|
|
15703
|
+
var out = "";
|
|
15704
|
+
if (typeof opt === "string") {
|
|
15705
|
+
opt = {
|
|
15706
|
+
section: opt,
|
|
15707
|
+
whitespace: false
|
|
15708
|
+
};
|
|
15709
|
+
} else {
|
|
15710
|
+
opt = opt || {};
|
|
15711
|
+
opt.whitespace = opt.whitespace === true;
|
|
15712
|
+
}
|
|
15713
|
+
var separator = opt.whitespace ? " = " : "=";
|
|
15714
|
+
Object.keys(obj).forEach(function(k, _3, __) {
|
|
15715
|
+
var val = obj[k];
|
|
15716
|
+
if (val && Array.isArray(val)) {
|
|
15717
|
+
val.forEach(function(item) {
|
|
15718
|
+
out += safe(k + "[]") + separator + safe(item) + "\n";
|
|
15719
|
+
});
|
|
15720
|
+
} else if (val && typeof val === "object")
|
|
15721
|
+
children.push(k);
|
|
15722
|
+
else
|
|
15723
|
+
out += safe(k) + separator + safe(val) + eol;
|
|
15724
|
+
});
|
|
15725
|
+
if (opt.section && out.length)
|
|
15726
|
+
out = "[" + safe(opt.section) + "]" + eol + out;
|
|
15727
|
+
children.forEach(function(k, _3, __) {
|
|
15728
|
+
var nk = dotSplit(k).join("\\.");
|
|
15729
|
+
var section = (opt.section ? opt.section + "." : "") + nk;
|
|
15730
|
+
var child = encode(obj[k], {
|
|
15731
|
+
section,
|
|
15732
|
+
whitespace: opt.whitespace
|
|
15733
|
+
});
|
|
15734
|
+
if (out.length && child.length)
|
|
15735
|
+
out += eol;
|
|
15736
|
+
out += child;
|
|
15737
|
+
});
|
|
15738
|
+
return out;
|
|
15739
|
+
}
|
|
15740
|
+
function dotSplit(str) {
|
|
15741
|
+
return str.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map(function(part) {
|
|
15742
|
+
return part.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, "");
|
|
15743
|
+
});
|
|
15744
|
+
}
|
|
15745
|
+
function decode(str) {
|
|
15746
|
+
var out = {};
|
|
15747
|
+
var p = out;
|
|
15748
|
+
var section = null;
|
|
15749
|
+
var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;
|
|
15750
|
+
var lines = str.split(/[\r\n]+/g);
|
|
15751
|
+
lines.forEach(function(line, _3, __) {
|
|
15752
|
+
if (!line || line.match(/^\s*[;#]/))
|
|
15753
|
+
return;
|
|
15754
|
+
var match = line.match(re);
|
|
15755
|
+
if (!match)
|
|
15756
|
+
return;
|
|
15757
|
+
if (match[1] !== void 0) {
|
|
15758
|
+
section = unsafe(match[1]);
|
|
15759
|
+
if (section === "__proto__") {
|
|
15760
|
+
p = {};
|
|
15761
|
+
return;
|
|
15762
|
+
}
|
|
15763
|
+
p = out[section] = out[section] || {};
|
|
15764
|
+
return;
|
|
15765
|
+
}
|
|
15766
|
+
var key = unsafe(match[2]);
|
|
15767
|
+
if (key === "__proto__")
|
|
15768
|
+
return;
|
|
15769
|
+
var value = match[3] ? unsafe(match[4]) : true;
|
|
15770
|
+
switch (value) {
|
|
15771
|
+
case "true":
|
|
15772
|
+
case "false":
|
|
15773
|
+
case "null":
|
|
15774
|
+
value = JSON.parse(value);
|
|
15775
|
+
}
|
|
15776
|
+
if (key.length > 2 && key.slice(-2) === "[]") {
|
|
15777
|
+
key = key.substring(0, key.length - 2);
|
|
15778
|
+
if (key === "__proto__")
|
|
15779
|
+
return;
|
|
15780
|
+
if (!p[key])
|
|
15781
|
+
p[key] = [];
|
|
15782
|
+
else if (!Array.isArray(p[key]))
|
|
15783
|
+
p[key] = [p[key]];
|
|
15784
|
+
}
|
|
15785
|
+
if (Array.isArray(p[key]))
|
|
15786
|
+
p[key].push(value);
|
|
15787
|
+
else
|
|
15788
|
+
p[key] = value;
|
|
15789
|
+
});
|
|
15790
|
+
Object.keys(out).filter(function(k, _3, __) {
|
|
15791
|
+
if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k]))
|
|
15792
|
+
return false;
|
|
15793
|
+
var parts = dotSplit(k);
|
|
15794
|
+
var p2 = out;
|
|
15795
|
+
var l = parts.pop();
|
|
15796
|
+
var nl = l.replace(/\\\./g, ".");
|
|
15797
|
+
parts.forEach(function(part, _4, __2) {
|
|
15798
|
+
if (part === "__proto__")
|
|
15799
|
+
return;
|
|
15800
|
+
if (!p2[part] || typeof p2[part] !== "object")
|
|
15801
|
+
p2[part] = {};
|
|
15802
|
+
p2 = p2[part];
|
|
15803
|
+
});
|
|
15804
|
+
if (p2 === out && nl === l)
|
|
15805
|
+
return false;
|
|
15806
|
+
p2[nl] = out[k];
|
|
15807
|
+
return true;
|
|
15808
|
+
}).forEach(function(del, _3, __) {
|
|
15809
|
+
delete out[del];
|
|
15810
|
+
});
|
|
15811
|
+
return out;
|
|
15812
|
+
}
|
|
15813
|
+
function isQuoted(val) {
|
|
15814
|
+
return val.charAt(0) === '"' && val.slice(-1) === '"' || val.charAt(0) === "'" && val.slice(-1) === "'";
|
|
15815
|
+
}
|
|
15816
|
+
function safe(val) {
|
|
15817
|
+
return typeof val !== "string" || val.match(/[=\r\n]/) || val.match(/^\[/) || val.length > 1 && isQuoted(val) || val !== val.trim() ? JSON.stringify(val) : val.replace(/;/g, "\\;").replace(/#/g, "\\#");
|
|
15818
|
+
}
|
|
15819
|
+
function unsafe(val, doUnesc) {
|
|
15820
|
+
val = (val || "").trim();
|
|
15821
|
+
if (isQuoted(val)) {
|
|
15822
|
+
if (val.charAt(0) === "'")
|
|
15823
|
+
val = val.substr(1, val.length - 2);
|
|
15824
|
+
try {
|
|
15825
|
+
val = JSON.parse(val);
|
|
15826
|
+
} catch (_3) {
|
|
15827
|
+
}
|
|
15828
|
+
} else {
|
|
15829
|
+
var esc = false;
|
|
15830
|
+
var unesc = "";
|
|
15831
|
+
for (var i = 0, l = val.length; i < l; i++) {
|
|
15832
|
+
var c = val.charAt(i);
|
|
15833
|
+
if (esc) {
|
|
15834
|
+
if ("\\;#".indexOf(c) !== -1)
|
|
15835
|
+
unesc += c;
|
|
15836
|
+
else
|
|
15837
|
+
unesc += "\\" + c;
|
|
15838
|
+
esc = false;
|
|
15839
|
+
} else if (";#".indexOf(c) !== -1)
|
|
15840
|
+
break;
|
|
15841
|
+
else if (c === "\\")
|
|
15842
|
+
esc = true;
|
|
15843
|
+
else
|
|
15844
|
+
unesc += c;
|
|
15845
|
+
}
|
|
15846
|
+
if (esc)
|
|
15847
|
+
unesc += "\\";
|
|
15848
|
+
return unesc.trim();
|
|
15849
|
+
}
|
|
15850
|
+
return val;
|
|
15851
|
+
}
|
|
15852
|
+
}
|
|
15853
|
+
});
|
|
15854
|
+
|
|
15855
|
+
// node_modules/rc/node_modules/strip-json-comments/index.js
|
|
15856
|
+
var require_strip_json_comments = __commonJS({
|
|
15857
|
+
"node_modules/rc/node_modules/strip-json-comments/index.js"(exports2, module2) {
|
|
15858
|
+
"use strict";
|
|
15859
|
+
var singleComment = 1;
|
|
15860
|
+
var multiComment = 2;
|
|
15861
|
+
function stripWithoutWhitespace() {
|
|
15862
|
+
return "";
|
|
15863
|
+
}
|
|
15864
|
+
function stripWithWhitespace(str, start, end) {
|
|
15865
|
+
return str.slice(start, end).replace(/\S/g, " ");
|
|
15866
|
+
}
|
|
15867
|
+
module2.exports = function(str, opts) {
|
|
15868
|
+
opts = opts || {};
|
|
15869
|
+
var currentChar;
|
|
15870
|
+
var nextChar;
|
|
15871
|
+
var insideString = false;
|
|
15872
|
+
var insideComment = false;
|
|
15873
|
+
var offset = 0;
|
|
15874
|
+
var ret = "";
|
|
15875
|
+
var strip = opts.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace;
|
|
15876
|
+
for (var i = 0; i < str.length; i++) {
|
|
15877
|
+
currentChar = str[i];
|
|
15878
|
+
nextChar = str[i + 1];
|
|
15879
|
+
if (!insideComment && currentChar === '"') {
|
|
15880
|
+
var escaped = str[i - 1] === "\\" && str[i - 2] !== "\\";
|
|
15881
|
+
if (!escaped) {
|
|
15882
|
+
insideString = !insideString;
|
|
15883
|
+
}
|
|
15884
|
+
}
|
|
15885
|
+
if (insideString) {
|
|
15886
|
+
continue;
|
|
15887
|
+
}
|
|
15888
|
+
if (!insideComment && currentChar + nextChar === "//") {
|
|
15889
|
+
ret += str.slice(offset, i);
|
|
15890
|
+
offset = i;
|
|
15891
|
+
insideComment = singleComment;
|
|
15892
|
+
i++;
|
|
15893
|
+
} else if (insideComment === singleComment && currentChar + nextChar === "\r\n") {
|
|
15894
|
+
i++;
|
|
15895
|
+
insideComment = false;
|
|
15896
|
+
ret += strip(str, offset, i);
|
|
15897
|
+
offset = i;
|
|
15898
|
+
continue;
|
|
15899
|
+
} else if (insideComment === singleComment && currentChar === "\n") {
|
|
15900
|
+
insideComment = false;
|
|
15901
|
+
ret += strip(str, offset, i);
|
|
15902
|
+
offset = i;
|
|
15903
|
+
} else if (!insideComment && currentChar + nextChar === "/*") {
|
|
15904
|
+
ret += str.slice(offset, i);
|
|
15905
|
+
offset = i;
|
|
15906
|
+
insideComment = multiComment;
|
|
15907
|
+
i++;
|
|
15908
|
+
continue;
|
|
15909
|
+
} else if (insideComment === multiComment && currentChar + nextChar === "*/") {
|
|
15910
|
+
i++;
|
|
15911
|
+
insideComment = false;
|
|
15912
|
+
ret += strip(str, offset, i + 1);
|
|
15913
|
+
offset = i + 1;
|
|
15914
|
+
continue;
|
|
15915
|
+
}
|
|
15916
|
+
}
|
|
15917
|
+
return ret + (insideComment ? strip(str.substr(offset)) : str.substr(offset));
|
|
15918
|
+
};
|
|
15919
|
+
}
|
|
15920
|
+
});
|
|
15921
|
+
|
|
15922
|
+
// node_modules/rc/lib/utils.js
|
|
15923
|
+
var require_utils2 = __commonJS({
|
|
15924
|
+
"node_modules/rc/lib/utils.js"(exports2) {
|
|
15925
|
+
"use strict";
|
|
15926
|
+
var fs6 = require("fs");
|
|
15927
|
+
var ini = require_ini();
|
|
15928
|
+
var path3 = require("path");
|
|
15929
|
+
var stripJsonComments = require_strip_json_comments();
|
|
15930
|
+
var parse2 = exports2.parse = function(content) {
|
|
15931
|
+
if (/^\s*{/.test(content))
|
|
15932
|
+
return JSON.parse(stripJsonComments(content));
|
|
15933
|
+
return ini.parse(content);
|
|
15934
|
+
};
|
|
15935
|
+
var file = exports2.file = function() {
|
|
15936
|
+
var args = [].slice.call(arguments).filter(function(arg) {
|
|
15937
|
+
return arg != null;
|
|
15938
|
+
});
|
|
15939
|
+
for (var i in args)
|
|
15940
|
+
if ("string" !== typeof args[i])
|
|
15941
|
+
return;
|
|
15942
|
+
var file2 = path3.join.apply(null, args);
|
|
15943
|
+
var content;
|
|
15944
|
+
try {
|
|
15945
|
+
return fs6.readFileSync(file2, "utf-8");
|
|
15946
|
+
} catch (err) {
|
|
15947
|
+
return;
|
|
15948
|
+
}
|
|
15949
|
+
};
|
|
15950
|
+
var json = exports2.json = function() {
|
|
15951
|
+
var content = file.apply(null, arguments);
|
|
15952
|
+
return content ? parse2(content) : null;
|
|
15953
|
+
};
|
|
15954
|
+
var env2 = exports2.env = function(prefix, env3) {
|
|
15955
|
+
env3 = env3 || process.env;
|
|
15956
|
+
var obj = {};
|
|
15957
|
+
var l = prefix.length;
|
|
15958
|
+
for (var k in env3) {
|
|
15959
|
+
if (k.toLowerCase().indexOf(prefix.toLowerCase()) === 0) {
|
|
15960
|
+
var keypath = k.substring(l).split("__");
|
|
15961
|
+
var _emptyStringIndex;
|
|
15962
|
+
while ((_emptyStringIndex = keypath.indexOf("")) > -1) {
|
|
15963
|
+
keypath.splice(_emptyStringIndex, 1);
|
|
15964
|
+
}
|
|
15965
|
+
var cursor = obj;
|
|
15966
|
+
keypath.forEach(function _buildSubObj(_subkey, i) {
|
|
15967
|
+
if (!_subkey || typeof cursor !== "object")
|
|
15968
|
+
return;
|
|
15969
|
+
if (i === keypath.length - 1)
|
|
15970
|
+
cursor[_subkey] = env3[k];
|
|
15971
|
+
if (cursor[_subkey] === void 0)
|
|
15972
|
+
cursor[_subkey] = {};
|
|
15973
|
+
cursor = cursor[_subkey];
|
|
15974
|
+
});
|
|
15975
|
+
}
|
|
15976
|
+
}
|
|
15977
|
+
return obj;
|
|
15978
|
+
};
|
|
15979
|
+
var find = exports2.find = function() {
|
|
15980
|
+
var rel = path3.join.apply(null, [].slice.call(arguments));
|
|
15981
|
+
function find2(start, rel2) {
|
|
15982
|
+
var file2 = path3.join(start, rel2);
|
|
15983
|
+
try {
|
|
15984
|
+
fs6.statSync(file2);
|
|
15985
|
+
return file2;
|
|
15986
|
+
} catch (err) {
|
|
15987
|
+
if (path3.dirname(start) !== start)
|
|
15988
|
+
return find2(path3.dirname(start), rel2);
|
|
15989
|
+
}
|
|
15990
|
+
}
|
|
15991
|
+
return find2(process.cwd(), rel);
|
|
15992
|
+
};
|
|
15993
|
+
}
|
|
15994
|
+
});
|
|
15995
|
+
|
|
15996
|
+
// node_modules/deep-extend/lib/deep-extend.js
|
|
15997
|
+
var require_deep_extend = __commonJS({
|
|
15998
|
+
"node_modules/deep-extend/lib/deep-extend.js"(exports2, module2) {
|
|
15999
|
+
"use strict";
|
|
16000
|
+
function isSpecificValue(val) {
|
|
16001
|
+
return val instanceof Buffer || val instanceof Date || val instanceof RegExp ? true : false;
|
|
16002
|
+
}
|
|
16003
|
+
function cloneSpecificValue(val) {
|
|
16004
|
+
if (val instanceof Buffer) {
|
|
16005
|
+
var x = Buffer.alloc ? Buffer.alloc(val.length) : new Buffer(val.length);
|
|
16006
|
+
val.copy(x);
|
|
16007
|
+
return x;
|
|
16008
|
+
} else if (val instanceof Date) {
|
|
16009
|
+
return new Date(val.getTime());
|
|
16010
|
+
} else if (val instanceof RegExp) {
|
|
16011
|
+
return new RegExp(val);
|
|
16012
|
+
} else {
|
|
16013
|
+
throw new Error("Unexpected situation");
|
|
16014
|
+
}
|
|
16015
|
+
}
|
|
16016
|
+
function deepCloneArray(arr) {
|
|
16017
|
+
var clone2 = [];
|
|
16018
|
+
arr.forEach(function(item, index) {
|
|
16019
|
+
if (typeof item === "object" && item !== null) {
|
|
16020
|
+
if (Array.isArray(item)) {
|
|
16021
|
+
clone2[index] = deepCloneArray(item);
|
|
16022
|
+
} else if (isSpecificValue(item)) {
|
|
16023
|
+
clone2[index] = cloneSpecificValue(item);
|
|
16024
|
+
} else {
|
|
16025
|
+
clone2[index] = deepExtend({}, item);
|
|
16026
|
+
}
|
|
16027
|
+
} else {
|
|
16028
|
+
clone2[index] = item;
|
|
16029
|
+
}
|
|
16030
|
+
});
|
|
16031
|
+
return clone2;
|
|
16032
|
+
}
|
|
16033
|
+
function safeGetProperty(object, property) {
|
|
16034
|
+
return property === "__proto__" ? void 0 : object[property];
|
|
16035
|
+
}
|
|
16036
|
+
var deepExtend = module2.exports = function() {
|
|
16037
|
+
if (arguments.length < 1 || typeof arguments[0] !== "object") {
|
|
16038
|
+
return false;
|
|
16039
|
+
}
|
|
16040
|
+
if (arguments.length < 2) {
|
|
16041
|
+
return arguments[0];
|
|
16042
|
+
}
|
|
16043
|
+
var target = arguments[0];
|
|
16044
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
|
16045
|
+
var val, src, clone2;
|
|
16046
|
+
args.forEach(function(obj) {
|
|
16047
|
+
if (typeof obj !== "object" || obj === null || Array.isArray(obj)) {
|
|
16048
|
+
return;
|
|
16049
|
+
}
|
|
16050
|
+
Object.keys(obj).forEach(function(key) {
|
|
16051
|
+
src = safeGetProperty(target, key);
|
|
16052
|
+
val = safeGetProperty(obj, key);
|
|
16053
|
+
if (val === target) {
|
|
16054
|
+
return;
|
|
16055
|
+
} else if (typeof val !== "object" || val === null) {
|
|
16056
|
+
target[key] = val;
|
|
16057
|
+
return;
|
|
16058
|
+
} else if (Array.isArray(val)) {
|
|
16059
|
+
target[key] = deepCloneArray(val);
|
|
16060
|
+
return;
|
|
16061
|
+
} else if (isSpecificValue(val)) {
|
|
16062
|
+
target[key] = cloneSpecificValue(val);
|
|
16063
|
+
return;
|
|
16064
|
+
} else if (typeof src !== "object" || src === null || Array.isArray(src)) {
|
|
16065
|
+
target[key] = deepExtend({}, val);
|
|
16066
|
+
return;
|
|
16067
|
+
} else {
|
|
16068
|
+
target[key] = deepExtend(src, val);
|
|
16069
|
+
return;
|
|
16070
|
+
}
|
|
16071
|
+
});
|
|
16072
|
+
});
|
|
16073
|
+
return target;
|
|
16074
|
+
};
|
|
16075
|
+
}
|
|
16076
|
+
});
|
|
16077
|
+
|
|
16078
|
+
// node_modules/minimist/index.js
|
|
16079
|
+
var require_minimist = __commonJS({
|
|
16080
|
+
"node_modules/minimist/index.js"(exports2, module2) {
|
|
16081
|
+
"use strict";
|
|
16082
|
+
function hasKey(obj, keys) {
|
|
16083
|
+
var o = obj;
|
|
16084
|
+
keys.slice(0, -1).forEach(function(key2) {
|
|
16085
|
+
o = o[key2] || {};
|
|
16086
|
+
});
|
|
16087
|
+
var key = keys[keys.length - 1];
|
|
16088
|
+
return key in o;
|
|
16089
|
+
}
|
|
16090
|
+
function isNumber(x) {
|
|
16091
|
+
if (typeof x === "number") {
|
|
16092
|
+
return true;
|
|
16093
|
+
}
|
|
16094
|
+
if (/^0x[0-9a-f]+$/i.test(x)) {
|
|
16095
|
+
return true;
|
|
16096
|
+
}
|
|
16097
|
+
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
|
|
16098
|
+
}
|
|
16099
|
+
function isConstructorOrProto(obj, key) {
|
|
16100
|
+
return key === "constructor" && typeof obj[key] === "function" || key === "__proto__";
|
|
16101
|
+
}
|
|
16102
|
+
module2.exports = function(args, opts) {
|
|
16103
|
+
if (!opts) {
|
|
16104
|
+
opts = {};
|
|
16105
|
+
}
|
|
16106
|
+
var flags = {
|
|
16107
|
+
bools: {},
|
|
16108
|
+
strings: {},
|
|
16109
|
+
unknownFn: null
|
|
16110
|
+
};
|
|
16111
|
+
if (typeof opts.unknown === "function") {
|
|
16112
|
+
flags.unknownFn = opts.unknown;
|
|
16113
|
+
}
|
|
16114
|
+
if (typeof opts.boolean === "boolean" && opts.boolean) {
|
|
16115
|
+
flags.allBools = true;
|
|
16116
|
+
} else {
|
|
16117
|
+
[].concat(opts.boolean).filter(Boolean).forEach(function(key2) {
|
|
16118
|
+
flags.bools[key2] = true;
|
|
16119
|
+
});
|
|
16120
|
+
}
|
|
16121
|
+
var aliases = {};
|
|
16122
|
+
function aliasIsBoolean(key2) {
|
|
16123
|
+
return aliases[key2].some(function(x) {
|
|
16124
|
+
return flags.bools[x];
|
|
16125
|
+
});
|
|
16126
|
+
}
|
|
16127
|
+
Object.keys(opts.alias || {}).forEach(function(key2) {
|
|
16128
|
+
aliases[key2] = [].concat(opts.alias[key2]);
|
|
16129
|
+
aliases[key2].forEach(function(x) {
|
|
16130
|
+
aliases[x] = [key2].concat(aliases[key2].filter(function(y) {
|
|
16131
|
+
return x !== y;
|
|
16132
|
+
}));
|
|
16133
|
+
});
|
|
16134
|
+
});
|
|
16135
|
+
[].concat(opts.string).filter(Boolean).forEach(function(key2) {
|
|
16136
|
+
flags.strings[key2] = true;
|
|
16137
|
+
if (aliases[key2]) {
|
|
16138
|
+
[].concat(aliases[key2]).forEach(function(k) {
|
|
16139
|
+
flags.strings[k] = true;
|
|
16140
|
+
});
|
|
16141
|
+
}
|
|
16142
|
+
});
|
|
16143
|
+
var defaults2 = opts.default || {};
|
|
16144
|
+
var argv = { _: [] };
|
|
16145
|
+
function argDefined(key2, arg2) {
|
|
16146
|
+
return flags.allBools && /^--[^=]+$/.test(arg2) || flags.strings[key2] || flags.bools[key2] || aliases[key2];
|
|
16147
|
+
}
|
|
16148
|
+
function setKey(obj, keys, value2) {
|
|
16149
|
+
var o = obj;
|
|
16150
|
+
for (var i2 = 0; i2 < keys.length - 1; i2++) {
|
|
16151
|
+
var key2 = keys[i2];
|
|
16152
|
+
if (isConstructorOrProto(o, key2)) {
|
|
16153
|
+
return;
|
|
16154
|
+
}
|
|
16155
|
+
if (o[key2] === void 0) {
|
|
16156
|
+
o[key2] = {};
|
|
16157
|
+
}
|
|
16158
|
+
if (o[key2] === Object.prototype || o[key2] === Number.prototype || o[key2] === String.prototype) {
|
|
16159
|
+
o[key2] = {};
|
|
16160
|
+
}
|
|
16161
|
+
if (o[key2] === Array.prototype) {
|
|
16162
|
+
o[key2] = [];
|
|
16163
|
+
}
|
|
16164
|
+
o = o[key2];
|
|
16165
|
+
}
|
|
16166
|
+
var lastKey = keys[keys.length - 1];
|
|
16167
|
+
if (isConstructorOrProto(o, lastKey)) {
|
|
16168
|
+
return;
|
|
16169
|
+
}
|
|
16170
|
+
if (o === Object.prototype || o === Number.prototype || o === String.prototype) {
|
|
16171
|
+
o = {};
|
|
16172
|
+
}
|
|
16173
|
+
if (o === Array.prototype) {
|
|
16174
|
+
o = [];
|
|
16175
|
+
}
|
|
16176
|
+
if (o[lastKey] === void 0 || flags.bools[lastKey] || typeof o[lastKey] === "boolean") {
|
|
16177
|
+
o[lastKey] = value2;
|
|
16178
|
+
} else if (Array.isArray(o[lastKey])) {
|
|
16179
|
+
o[lastKey].push(value2);
|
|
16180
|
+
} else {
|
|
16181
|
+
o[lastKey] = [o[lastKey], value2];
|
|
16182
|
+
}
|
|
16183
|
+
}
|
|
16184
|
+
function setArg(key2, val, arg2) {
|
|
16185
|
+
if (arg2 && flags.unknownFn && !argDefined(key2, arg2)) {
|
|
16186
|
+
if (flags.unknownFn(arg2) === false) {
|
|
16187
|
+
return;
|
|
16188
|
+
}
|
|
16189
|
+
}
|
|
16190
|
+
var value2 = !flags.strings[key2] && isNumber(val) ? Number(val) : val;
|
|
16191
|
+
setKey(argv, key2.split("."), value2);
|
|
16192
|
+
(aliases[key2] || []).forEach(function(x) {
|
|
16193
|
+
setKey(argv, x.split("."), value2);
|
|
16194
|
+
});
|
|
16195
|
+
}
|
|
16196
|
+
Object.keys(flags.bools).forEach(function(key2) {
|
|
16197
|
+
setArg(key2, defaults2[key2] === void 0 ? false : defaults2[key2]);
|
|
16198
|
+
});
|
|
16199
|
+
var notFlags = [];
|
|
16200
|
+
if (args.indexOf("--") !== -1) {
|
|
16201
|
+
notFlags = args.slice(args.indexOf("--") + 1);
|
|
16202
|
+
args = args.slice(0, args.indexOf("--"));
|
|
16203
|
+
}
|
|
16204
|
+
for (var i = 0; i < args.length; i++) {
|
|
16205
|
+
var arg = args[i];
|
|
16206
|
+
var key;
|
|
16207
|
+
var next;
|
|
16208
|
+
if (/^--.+=/.test(arg)) {
|
|
16209
|
+
var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
|
|
16210
|
+
key = m[1];
|
|
16211
|
+
var value = m[2];
|
|
16212
|
+
if (flags.bools[key]) {
|
|
16213
|
+
value = value !== "false";
|
|
16214
|
+
}
|
|
16215
|
+
setArg(key, value, arg);
|
|
16216
|
+
} else if (/^--no-.+/.test(arg)) {
|
|
16217
|
+
key = arg.match(/^--no-(.+)/)[1];
|
|
16218
|
+
setArg(key, false, arg);
|
|
16219
|
+
} else if (/^--.+/.test(arg)) {
|
|
16220
|
+
key = arg.match(/^--(.+)/)[1];
|
|
16221
|
+
next = args[i + 1];
|
|
16222
|
+
if (next !== void 0 && !/^(-|--)[^-]/.test(next) && !flags.bools[key] && !flags.allBools && (aliases[key] ? !aliasIsBoolean(key) : true)) {
|
|
16223
|
+
setArg(key, next, arg);
|
|
16224
|
+
i += 1;
|
|
16225
|
+
} else if (/^(true|false)$/.test(next)) {
|
|
16226
|
+
setArg(key, next === "true", arg);
|
|
16227
|
+
i += 1;
|
|
16228
|
+
} else {
|
|
16229
|
+
setArg(key, flags.strings[key] ? "" : true, arg);
|
|
16230
|
+
}
|
|
16231
|
+
} else if (/^-[^-]+/.test(arg)) {
|
|
16232
|
+
var letters = arg.slice(1, -1).split("");
|
|
16233
|
+
var broken = false;
|
|
16234
|
+
for (var j = 0; j < letters.length; j++) {
|
|
16235
|
+
next = arg.slice(j + 2);
|
|
16236
|
+
if (next === "-") {
|
|
16237
|
+
setArg(letters[j], next, arg);
|
|
16238
|
+
continue;
|
|
16239
|
+
}
|
|
16240
|
+
if (/[A-Za-z]/.test(letters[j]) && next[0] === "=") {
|
|
16241
|
+
setArg(letters[j], next.slice(1), arg);
|
|
16242
|
+
broken = true;
|
|
16243
|
+
break;
|
|
16244
|
+
}
|
|
16245
|
+
if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
|
|
16246
|
+
setArg(letters[j], next, arg);
|
|
16247
|
+
broken = true;
|
|
16248
|
+
break;
|
|
16249
|
+
}
|
|
16250
|
+
if (letters[j + 1] && letters[j + 1].match(/\W/)) {
|
|
16251
|
+
setArg(letters[j], arg.slice(j + 2), arg);
|
|
16252
|
+
broken = true;
|
|
16253
|
+
break;
|
|
16254
|
+
} else {
|
|
16255
|
+
setArg(letters[j], flags.strings[letters[j]] ? "" : true, arg);
|
|
16256
|
+
}
|
|
16257
|
+
}
|
|
16258
|
+
key = arg.slice(-1)[0];
|
|
16259
|
+
if (!broken && key !== "-") {
|
|
16260
|
+
if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && !flags.bools[key] && (aliases[key] ? !aliasIsBoolean(key) : true)) {
|
|
16261
|
+
setArg(key, args[i + 1], arg);
|
|
16262
|
+
i += 1;
|
|
16263
|
+
} else if (args[i + 1] && /^(true|false)$/.test(args[i + 1])) {
|
|
16264
|
+
setArg(key, args[i + 1] === "true", arg);
|
|
16265
|
+
i += 1;
|
|
16266
|
+
} else {
|
|
16267
|
+
setArg(key, flags.strings[key] ? "" : true, arg);
|
|
16268
|
+
}
|
|
16269
|
+
}
|
|
16270
|
+
} else {
|
|
16271
|
+
if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
|
|
16272
|
+
argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg));
|
|
16273
|
+
}
|
|
16274
|
+
if (opts.stopEarly) {
|
|
16275
|
+
argv._.push.apply(argv._, args.slice(i + 1));
|
|
16276
|
+
break;
|
|
16277
|
+
}
|
|
16278
|
+
}
|
|
16279
|
+
}
|
|
16280
|
+
Object.keys(defaults2).forEach(function(k) {
|
|
16281
|
+
if (!hasKey(argv, k.split("."))) {
|
|
16282
|
+
setKey(argv, k.split("."), defaults2[k]);
|
|
16283
|
+
(aliases[k] || []).forEach(function(x) {
|
|
16284
|
+
setKey(argv, x.split("."), defaults2[k]);
|
|
16285
|
+
});
|
|
16286
|
+
}
|
|
16287
|
+
});
|
|
16288
|
+
if (opts["--"]) {
|
|
16289
|
+
argv["--"] = notFlags.slice();
|
|
16290
|
+
} else {
|
|
16291
|
+
notFlags.forEach(function(k) {
|
|
16292
|
+
argv._.push(k);
|
|
16293
|
+
});
|
|
16294
|
+
}
|
|
16295
|
+
return argv;
|
|
16296
|
+
};
|
|
16297
|
+
}
|
|
16298
|
+
});
|
|
16299
|
+
|
|
16300
|
+
// node_modules/rc/index.js
|
|
16301
|
+
var require_rc = __commonJS({
|
|
16302
|
+
"node_modules/rc/index.js"(exports2, module2) {
|
|
16303
|
+
"use strict";
|
|
16304
|
+
var cc = require_utils2();
|
|
16305
|
+
var join2 = require("path").join;
|
|
16306
|
+
var deepExtend = require_deep_extend();
|
|
16307
|
+
var etc = "/etc";
|
|
16308
|
+
var win = process.platform === "win32";
|
|
16309
|
+
var home = win ? process.env.USERPROFILE : process.env.HOME;
|
|
16310
|
+
module2.exports = function(name, defaults2, argv, parse2) {
|
|
16311
|
+
if ("string" !== typeof name)
|
|
16312
|
+
throw new Error("rc(name): name *must* be string");
|
|
16313
|
+
if (!argv)
|
|
16314
|
+
argv = require_minimist()(process.argv.slice(2));
|
|
16315
|
+
defaults2 = ("string" === typeof defaults2 ? cc.json(defaults2) : defaults2) || {};
|
|
16316
|
+
parse2 = parse2 || cc.parse;
|
|
16317
|
+
var env2 = cc.env(name + "_");
|
|
16318
|
+
var configs = [defaults2];
|
|
16319
|
+
var configFiles = [];
|
|
16320
|
+
function addConfigFile(file) {
|
|
16321
|
+
if (configFiles.indexOf(file) >= 0) return;
|
|
16322
|
+
var fileConfig = cc.file(file);
|
|
16323
|
+
if (fileConfig) {
|
|
16324
|
+
configs.push(parse2(fileConfig));
|
|
16325
|
+
configFiles.push(file);
|
|
16326
|
+
}
|
|
16327
|
+
}
|
|
16328
|
+
if (!win)
|
|
16329
|
+
[
|
|
16330
|
+
join2(etc, name, "config"),
|
|
16331
|
+
join2(etc, name + "rc")
|
|
16332
|
+
].forEach(addConfigFile);
|
|
16333
|
+
if (home)
|
|
16334
|
+
[
|
|
16335
|
+
join2(home, ".config", name, "config"),
|
|
16336
|
+
join2(home, ".config", name),
|
|
16337
|
+
join2(home, "." + name, "config"),
|
|
16338
|
+
join2(home, "." + name + "rc")
|
|
16339
|
+
].forEach(addConfigFile);
|
|
16340
|
+
addConfigFile(cc.find("." + name + "rc"));
|
|
16341
|
+
if (env2.config) addConfigFile(env2.config);
|
|
16342
|
+
if (argv.config) addConfigFile(argv.config);
|
|
16343
|
+
return deepExtend.apply(null, configs.concat([
|
|
16344
|
+
env2,
|
|
16345
|
+
argv,
|
|
16346
|
+
configFiles.length ? { configs: configFiles, config: configFiles[configFiles.length - 1] } : void 0
|
|
16347
|
+
]));
|
|
16348
|
+
};
|
|
16349
|
+
}
|
|
16350
|
+
});
|
|
16351
|
+
|
|
16352
|
+
// node_modules/update-check/node_modules/registry-url/index.js
|
|
16353
|
+
var require_registry_url = __commonJS({
|
|
16354
|
+
"node_modules/update-check/node_modules/registry-url/index.js"(exports2, module2) {
|
|
16355
|
+
"use strict";
|
|
16356
|
+
module2.exports = function(scope) {
|
|
16357
|
+
var rc = require_rc()("npm", { registry: "https://registry.npmjs.org/" });
|
|
16358
|
+
var url = rc[scope + ":registry"] || rc.registry;
|
|
16359
|
+
return url.slice(-1) === "/" ? url : url + "/";
|
|
16360
|
+
};
|
|
16361
|
+
}
|
|
16362
|
+
});
|
|
16363
|
+
|
|
16364
|
+
// node_modules/update-check/node_modules/registry-auth-token/base64.js
|
|
16365
|
+
var require_base64 = __commonJS({
|
|
16366
|
+
"node_modules/update-check/node_modules/registry-auth-token/base64.js"(exports2, module2) {
|
|
16367
|
+
"use strict";
|
|
16368
|
+
var safeBuffer = require_safe_buffer().Buffer;
|
|
16369
|
+
function decodeBase64(base64) {
|
|
16370
|
+
return safeBuffer.from(base64, "base64").toString("utf8");
|
|
16371
|
+
}
|
|
16372
|
+
function encodeBase64(string) {
|
|
16373
|
+
return safeBuffer.from(string, "utf8").toString("base64");
|
|
16374
|
+
}
|
|
16375
|
+
module2.exports = {
|
|
16376
|
+
decodeBase64,
|
|
16377
|
+
encodeBase64
|
|
16378
|
+
};
|
|
16379
|
+
}
|
|
16380
|
+
});
|
|
16381
|
+
|
|
16382
|
+
// node_modules/update-check/node_modules/registry-auth-token/index.js
|
|
16383
|
+
var require_registry_auth_token = __commonJS({
|
|
16384
|
+
"node_modules/update-check/node_modules/registry-auth-token/index.js"(exports2, module2) {
|
|
16385
|
+
"use strict";
|
|
16386
|
+
var url = require("url");
|
|
16387
|
+
var base64 = require_base64();
|
|
16388
|
+
var decodeBase64 = base64.decodeBase64;
|
|
16389
|
+
var encodeBase64 = base64.encodeBase64;
|
|
16390
|
+
var tokenKey = ":_authToken";
|
|
16391
|
+
var userKey = ":username";
|
|
16392
|
+
var passwordKey = ":_password";
|
|
16393
|
+
module2.exports = function() {
|
|
16394
|
+
var checkUrl;
|
|
16395
|
+
var options;
|
|
16396
|
+
if (arguments.length >= 2) {
|
|
16397
|
+
checkUrl = arguments[0];
|
|
16398
|
+
options = arguments[1];
|
|
16399
|
+
} else if (typeof arguments[0] === "string") {
|
|
16400
|
+
checkUrl = arguments[0];
|
|
16401
|
+
} else {
|
|
16402
|
+
options = arguments[0];
|
|
16403
|
+
}
|
|
16404
|
+
options = options || {};
|
|
16405
|
+
options.npmrc = options.npmrc || require_rc()("npm", { registry: "https://registry.npmjs.org/" });
|
|
16406
|
+
checkUrl = checkUrl || options.npmrc.registry;
|
|
16407
|
+
return getRegistryAuthInfo(checkUrl, options) || getLegacyAuthInfo(options.npmrc);
|
|
16408
|
+
};
|
|
16409
|
+
function getRegistryAuthInfo(checkUrl, options) {
|
|
16410
|
+
var parsed = url.parse(checkUrl, false, true);
|
|
16411
|
+
var pathname;
|
|
16412
|
+
while (pathname !== "/" && parsed.pathname !== pathname) {
|
|
16413
|
+
pathname = parsed.pathname || "/";
|
|
16414
|
+
var regUrl = "//" + parsed.host + pathname.replace(/\/$/, "");
|
|
16415
|
+
var authInfo = getAuthInfoForUrl(regUrl, options.npmrc);
|
|
16416
|
+
if (authInfo) {
|
|
16417
|
+
return authInfo;
|
|
16418
|
+
}
|
|
16419
|
+
if (!options.recursive) {
|
|
16420
|
+
return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(url.resolve(checkUrl, "."), options);
|
|
16421
|
+
}
|
|
16422
|
+
parsed.pathname = url.resolve(normalizePath(pathname), "..") || "/";
|
|
16423
|
+
}
|
|
16424
|
+
return void 0;
|
|
16425
|
+
}
|
|
16426
|
+
function getLegacyAuthInfo(npmrc) {
|
|
16427
|
+
if (npmrc._auth) {
|
|
16428
|
+
return { token: npmrc._auth, type: "Basic" };
|
|
16429
|
+
}
|
|
16430
|
+
return void 0;
|
|
16431
|
+
}
|
|
16432
|
+
function normalizePath(path3) {
|
|
16433
|
+
return path3[path3.length - 1] === "/" ? path3 : path3 + "/";
|
|
16434
|
+
}
|
|
16435
|
+
function getAuthInfoForUrl(regUrl, npmrc) {
|
|
16436
|
+
var bearerAuth = getBearerToken(npmrc[regUrl + tokenKey] || npmrc[regUrl + "/" + tokenKey]);
|
|
16437
|
+
if (bearerAuth) {
|
|
16438
|
+
return bearerAuth;
|
|
16439
|
+
}
|
|
16440
|
+
var username = npmrc[regUrl + userKey] || npmrc[regUrl + "/" + userKey];
|
|
16441
|
+
var password = npmrc[regUrl + passwordKey] || npmrc[regUrl + "/" + passwordKey];
|
|
16442
|
+
var basicAuth = getTokenForUsernameAndPassword(username, password);
|
|
16443
|
+
if (basicAuth) {
|
|
16444
|
+
return basicAuth;
|
|
16445
|
+
}
|
|
16446
|
+
return void 0;
|
|
16447
|
+
}
|
|
16448
|
+
function getBearerToken(tok) {
|
|
16449
|
+
if (!tok) {
|
|
16450
|
+
return void 0;
|
|
16451
|
+
}
|
|
16452
|
+
var token = tok.replace(/^\$\{?([^}]*)\}?$/, function(fullMatch, envVar) {
|
|
16453
|
+
return process.env[envVar];
|
|
16454
|
+
});
|
|
16455
|
+
return { token, type: "Bearer" };
|
|
16456
|
+
}
|
|
16457
|
+
function getTokenForUsernameAndPassword(username, password) {
|
|
16458
|
+
if (!username || !password) {
|
|
16459
|
+
return void 0;
|
|
16460
|
+
}
|
|
16461
|
+
var pass = decodeBase64(password.replace(/^\$\{?([^}]*)\}?$/, function(fullMatch, envVar) {
|
|
16462
|
+
return process.env[envVar];
|
|
16463
|
+
}));
|
|
16464
|
+
var token = encodeBase64(username + ":" + pass);
|
|
16465
|
+
return {
|
|
16466
|
+
token,
|
|
16467
|
+
type: "Basic",
|
|
16468
|
+
password: pass,
|
|
16469
|
+
username
|
|
16470
|
+
};
|
|
16471
|
+
}
|
|
16472
|
+
}
|
|
16473
|
+
});
|
|
16474
|
+
|
|
16475
|
+
// node_modules/update-check/index.js
|
|
16476
|
+
var require_update_check = __commonJS({
|
|
16477
|
+
"node_modules/update-check/index.js"(exports2, module2) {
|
|
16478
|
+
"use strict";
|
|
16479
|
+
var { URL: URL2 } = require("url");
|
|
16480
|
+
var { join: join2 } = require("path");
|
|
16481
|
+
var fs6 = require("fs");
|
|
16482
|
+
var { promisify: promisify5 } = require("util");
|
|
16483
|
+
var { tmpdir } = require("os");
|
|
16484
|
+
var registryUrl = require_registry_url();
|
|
16485
|
+
var writeFile = promisify5(fs6.writeFile);
|
|
16486
|
+
var mkdir = promisify5(fs6.mkdir);
|
|
16487
|
+
var readFile = promisify5(fs6.readFile);
|
|
16488
|
+
var compareVersions = (a, b) => a.localeCompare(b, "en-US", { numeric: true });
|
|
16489
|
+
var encode = (value) => encodeURIComponent(value).replace(/^%40/, "@");
|
|
16490
|
+
var getFile = (details, distTag) => __async(exports2, null, function* () {
|
|
16491
|
+
const rootDir = tmpdir();
|
|
16492
|
+
const subDir = join2(rootDir, "update-check");
|
|
16493
|
+
if (!fs6.existsSync(subDir)) {
|
|
16494
|
+
yield mkdir(subDir);
|
|
16495
|
+
}
|
|
16496
|
+
let name = `${details.name}-${distTag}.json`;
|
|
16497
|
+
if (details.scope) {
|
|
16498
|
+
name = `${details.scope}-${name}`;
|
|
16499
|
+
}
|
|
16500
|
+
return join2(subDir, name);
|
|
16501
|
+
});
|
|
16502
|
+
var evaluateCache = (file, time, interval) => __async(exports2, null, function* () {
|
|
16503
|
+
if (fs6.existsSync(file)) {
|
|
16504
|
+
const content = yield readFile(file, "utf8");
|
|
16505
|
+
const { lastUpdate, latest } = JSON.parse(content);
|
|
16506
|
+
const nextCheck = lastUpdate + interval;
|
|
16507
|
+
if (nextCheck > time) {
|
|
16508
|
+
return {
|
|
16509
|
+
shouldCheck: false,
|
|
16510
|
+
latest
|
|
16511
|
+
};
|
|
16512
|
+
}
|
|
16513
|
+
}
|
|
16514
|
+
return {
|
|
16515
|
+
shouldCheck: true,
|
|
16516
|
+
latest: null
|
|
16517
|
+
};
|
|
16518
|
+
});
|
|
16519
|
+
var updateCache = (file, latest, lastUpdate) => __async(exports2, null, function* () {
|
|
16520
|
+
const content = JSON.stringify({
|
|
16521
|
+
latest,
|
|
16522
|
+
lastUpdate
|
|
16523
|
+
});
|
|
16524
|
+
yield writeFile(file, content, "utf8");
|
|
16525
|
+
});
|
|
16526
|
+
var loadPackage = (url, authInfo) => new Promise((resolve2, reject) => {
|
|
16527
|
+
const options = {
|
|
16528
|
+
host: url.hostname,
|
|
16529
|
+
path: url.pathname,
|
|
16530
|
+
port: url.port,
|
|
16531
|
+
headers: {
|
|
16532
|
+
accept: "application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"
|
|
16533
|
+
},
|
|
16534
|
+
timeout: 2e3
|
|
16535
|
+
};
|
|
16536
|
+
if (authInfo) {
|
|
16537
|
+
options.headers.authorization = `${authInfo.type} ${authInfo.token}`;
|
|
16538
|
+
}
|
|
16539
|
+
const { get: get2 } = url.protocol === "https:" ? require("https") : require("http");
|
|
16540
|
+
get2(options, (response) => {
|
|
16541
|
+
const { statusCode } = response;
|
|
16542
|
+
if (statusCode !== 200) {
|
|
16543
|
+
const error = new Error(`Request failed with code ${statusCode}`);
|
|
16544
|
+
error.code = statusCode;
|
|
16545
|
+
reject(error);
|
|
16546
|
+
response.resume();
|
|
16547
|
+
return;
|
|
16548
|
+
}
|
|
16549
|
+
let rawData = "";
|
|
16550
|
+
response.setEncoding("utf8");
|
|
16551
|
+
response.on("data", (chunk) => {
|
|
16552
|
+
rawData += chunk;
|
|
16553
|
+
});
|
|
16554
|
+
response.on("end", () => {
|
|
16555
|
+
try {
|
|
16556
|
+
const parsedData = JSON.parse(rawData);
|
|
16557
|
+
resolve2(parsedData);
|
|
16558
|
+
} catch (e) {
|
|
16559
|
+
reject(e);
|
|
16560
|
+
}
|
|
16561
|
+
});
|
|
16562
|
+
}).on("error", reject).on("timeout", reject);
|
|
16563
|
+
});
|
|
16564
|
+
var getMostRecent = (_0, _1) => __async(exports2, [_0, _1], function* ({ full, scope }, distTag) {
|
|
16565
|
+
const regURL = registryUrl(scope);
|
|
16566
|
+
const url = new URL2(full, regURL);
|
|
16567
|
+
let spec = null;
|
|
16568
|
+
try {
|
|
16569
|
+
spec = yield loadPackage(url);
|
|
16570
|
+
} catch (err) {
|
|
16571
|
+
if (err.code && String(err.code).startsWith(4)) {
|
|
16572
|
+
const registryAuthToken = require_registry_auth_token();
|
|
16573
|
+
const authInfo = registryAuthToken(regURL, { recursive: true });
|
|
16574
|
+
spec = yield loadPackage(url, authInfo);
|
|
16575
|
+
} else {
|
|
16576
|
+
throw err;
|
|
16577
|
+
}
|
|
16578
|
+
}
|
|
16579
|
+
const version2 = spec["dist-tags"][distTag];
|
|
16580
|
+
if (!version2) {
|
|
16581
|
+
throw new Error(`Distribution tag ${distTag} is not available`);
|
|
16582
|
+
}
|
|
16583
|
+
return version2;
|
|
16584
|
+
});
|
|
16585
|
+
var defaultConfig = {
|
|
16586
|
+
interval: 36e5,
|
|
16587
|
+
distTag: "latest"
|
|
16588
|
+
};
|
|
16589
|
+
var getDetails = (name) => {
|
|
16590
|
+
const spec = {
|
|
16591
|
+
full: encode(name)
|
|
16592
|
+
};
|
|
16593
|
+
if (name.includes("/")) {
|
|
16594
|
+
const parts = name.split("/");
|
|
16595
|
+
spec.scope = parts[0];
|
|
16596
|
+
spec.name = parts[1];
|
|
16597
|
+
} else {
|
|
16598
|
+
spec.scope = null;
|
|
16599
|
+
spec.name = name;
|
|
16600
|
+
}
|
|
16601
|
+
return spec;
|
|
16602
|
+
};
|
|
16603
|
+
module2.exports = (pkg, config) => __async(exports2, null, function* () {
|
|
16604
|
+
if (typeof pkg !== "object") {
|
|
16605
|
+
throw new Error("The first parameter should be your package.json file content");
|
|
16606
|
+
}
|
|
16607
|
+
const details = getDetails(pkg.name);
|
|
16608
|
+
const time = Date.now();
|
|
16609
|
+
const { distTag, interval } = Object.assign({}, defaultConfig, config);
|
|
16610
|
+
const file = yield getFile(details, distTag);
|
|
16611
|
+
let latest = null;
|
|
16612
|
+
let shouldCheck = true;
|
|
16613
|
+
({ shouldCheck, latest } = yield evaluateCache(file, time, interval));
|
|
16614
|
+
if (shouldCheck) {
|
|
16615
|
+
latest = yield getMostRecent(details, distTag);
|
|
16616
|
+
yield updateCache(file, latest, time);
|
|
16617
|
+
}
|
|
16618
|
+
const comparision = compareVersions(pkg.version, latest);
|
|
16619
|
+
if (comparision === -1) {
|
|
16620
|
+
return {
|
|
16621
|
+
latest,
|
|
16622
|
+
fromCache: !shouldCheck
|
|
16623
|
+
};
|
|
16624
|
+
}
|
|
16625
|
+
return null;
|
|
16626
|
+
});
|
|
16627
|
+
}
|
|
16628
|
+
});
|
|
16629
|
+
|
|
15692
16630
|
// node_modules/webidl-conversions/lib/index.js
|
|
15693
16631
|
var require_lib = __commonJS({
|
|
15694
16632
|
"node_modules/webidl-conversions/lib/index.js"(exports2, module2) {
|
|
@@ -15843,7 +16781,7 @@ var require_lib = __commonJS({
|
|
|
15843
16781
|
});
|
|
15844
16782
|
|
|
15845
16783
|
// node_modules/whatwg-url/lib/utils.js
|
|
15846
|
-
var
|
|
16784
|
+
var require_utils3 = __commonJS({
|
|
15847
16785
|
"node_modules/whatwg-url/lib/utils.js"(exports2, module2) {
|
|
15848
16786
|
"use strict";
|
|
15849
16787
|
module2.exports.mixin = function mixin(target, source) {
|
|
@@ -17265,7 +18203,7 @@ var require_URL = __commonJS({
|
|
|
17265
18203
|
"node_modules/whatwg-url/lib/URL.js"(exports2, module2) {
|
|
17266
18204
|
"use strict";
|
|
17267
18205
|
var conversions = require_lib();
|
|
17268
|
-
var utils =
|
|
18206
|
+
var utils = require_utils3();
|
|
17269
18207
|
var Impl = require_URL_impl();
|
|
17270
18208
|
var impl = utils.implSymbol;
|
|
17271
18209
|
function URL2(url) {
|
|
@@ -17748,7 +18686,7 @@ var require_lib2 = __commonJS({
|
|
|
17748
18686
|
let accum = [];
|
|
17749
18687
|
let accumBytes = 0;
|
|
17750
18688
|
let abort = false;
|
|
17751
|
-
return new Body.Promise(function(
|
|
18689
|
+
return new Body.Promise(function(resolve2, reject) {
|
|
17752
18690
|
let resTimeout;
|
|
17753
18691
|
if (_this4.timeout) {
|
|
17754
18692
|
resTimeout = setTimeout(function() {
|
|
@@ -17782,7 +18720,7 @@ var require_lib2 = __commonJS({
|
|
|
17782
18720
|
}
|
|
17783
18721
|
clearTimeout(resTimeout);
|
|
17784
18722
|
try {
|
|
17785
|
-
|
|
18723
|
+
resolve2(Buffer.concat(accum, accumBytes));
|
|
17786
18724
|
} catch (err) {
|
|
17787
18725
|
reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, "system", err));
|
|
17788
18726
|
}
|
|
@@ -18457,7 +19395,7 @@ var require_lib2 = __commonJS({
|
|
|
18457
19395
|
throw new Error("native promise missing, set fetch.Promise to your favorite alternative");
|
|
18458
19396
|
}
|
|
18459
19397
|
Body.Promise = fetch2.Promise;
|
|
18460
|
-
return new fetch2.Promise(function(
|
|
19398
|
+
return new fetch2.Promise(function(resolve2, reject) {
|
|
18461
19399
|
const request = new Request(url, opts);
|
|
18462
19400
|
const options = getNodeRequestOptions(request);
|
|
18463
19401
|
const send = (options.protocol === "https:" ? https : http).request;
|
|
@@ -18590,7 +19528,7 @@ var require_lib2 = __commonJS({
|
|
|
18590
19528
|
requestOpts.body = void 0;
|
|
18591
19529
|
requestOpts.headers.delete("content-length");
|
|
18592
19530
|
}
|
|
18593
|
-
|
|
19531
|
+
resolve2(fetch2(new Request(locationURL, requestOpts)));
|
|
18594
19532
|
finalize();
|
|
18595
19533
|
return;
|
|
18596
19534
|
}
|
|
@@ -18611,7 +19549,7 @@ var require_lib2 = __commonJS({
|
|
|
18611
19549
|
const codings = headers.get("Content-Encoding");
|
|
18612
19550
|
if (!request.compress || request.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
|
|
18613
19551
|
response = new Response(body, response_options);
|
|
18614
|
-
|
|
19552
|
+
resolve2(response);
|
|
18615
19553
|
return;
|
|
18616
19554
|
}
|
|
18617
19555
|
const zlibOptions = {
|
|
@@ -18621,7 +19559,7 @@ var require_lib2 = __commonJS({
|
|
|
18621
19559
|
if (codings == "gzip" || codings == "x-gzip") {
|
|
18622
19560
|
body = body.pipe(zlib.createGunzip(zlibOptions));
|
|
18623
19561
|
response = new Response(body, response_options);
|
|
18624
|
-
|
|
19562
|
+
resolve2(response);
|
|
18625
19563
|
return;
|
|
18626
19564
|
}
|
|
18627
19565
|
if (codings == "deflate" || codings == "x-deflate") {
|
|
@@ -18633,12 +19571,12 @@ var require_lib2 = __commonJS({
|
|
|
18633
19571
|
body = body.pipe(zlib.createInflateRaw());
|
|
18634
19572
|
}
|
|
18635
19573
|
response = new Response(body, response_options);
|
|
18636
|
-
|
|
19574
|
+
resolve2(response);
|
|
18637
19575
|
});
|
|
18638
19576
|
raw.on("end", function() {
|
|
18639
19577
|
if (!response) {
|
|
18640
19578
|
response = new Response(body, response_options);
|
|
18641
|
-
|
|
19579
|
+
resolve2(response);
|
|
18642
19580
|
}
|
|
18643
19581
|
});
|
|
18644
19582
|
return;
|
|
@@ -18646,11 +19584,11 @@ var require_lib2 = __commonJS({
|
|
|
18646
19584
|
if (codings == "br" && typeof zlib.createBrotliDecompress === "function") {
|
|
18647
19585
|
body = body.pipe(zlib.createBrotliDecompress());
|
|
18648
19586
|
response = new Response(body, response_options);
|
|
18649
|
-
|
|
19587
|
+
resolve2(response);
|
|
18650
19588
|
return;
|
|
18651
19589
|
}
|
|
18652
19590
|
response = new Response(body, response_options);
|
|
18653
|
-
|
|
19591
|
+
resolve2(response);
|
|
18654
19592
|
});
|
|
18655
19593
|
writeToStream(req, request);
|
|
18656
19594
|
});
|
|
@@ -19013,14 +19951,14 @@ var require_run_async = __commonJS({
|
|
|
19013
19951
|
return function() {
|
|
19014
19952
|
var args = arguments;
|
|
19015
19953
|
var originalThis = this;
|
|
19016
|
-
var promise = new Promise(function(
|
|
19954
|
+
var promise = new Promise(function(resolve2, reject) {
|
|
19017
19955
|
var resolved = false;
|
|
19018
19956
|
const wrappedResolve = function(value) {
|
|
19019
19957
|
if (resolved) {
|
|
19020
19958
|
console.warn("Run-async promise already resolved.");
|
|
19021
19959
|
}
|
|
19022
19960
|
resolved = true;
|
|
19023
|
-
|
|
19961
|
+
resolve2(value);
|
|
19024
19962
|
};
|
|
19025
19963
|
var rejected = false;
|
|
19026
19964
|
const wrappedReject = function(value) {
|
|
@@ -19811,7 +20749,7 @@ var require_Observable = __commonJS({
|
|
|
19811
20749
|
Observable2.prototype.forEach = function(next, promiseCtor) {
|
|
19812
20750
|
var _this = this;
|
|
19813
20751
|
promiseCtor = getPromiseCtor(promiseCtor);
|
|
19814
|
-
return new promiseCtor(function(
|
|
20752
|
+
return new promiseCtor(function(resolve2, reject) {
|
|
19815
20753
|
var subscriber = new Subscriber_1.SafeSubscriber({
|
|
19816
20754
|
next: function(value) {
|
|
19817
20755
|
try {
|
|
@@ -19822,7 +20760,7 @@ var require_Observable = __commonJS({
|
|
|
19822
20760
|
}
|
|
19823
20761
|
},
|
|
19824
20762
|
error: reject,
|
|
19825
|
-
complete:
|
|
20763
|
+
complete: resolve2
|
|
19826
20764
|
});
|
|
19827
20765
|
_this.subscribe(subscriber);
|
|
19828
20766
|
});
|
|
@@ -19844,14 +20782,14 @@ var require_Observable = __commonJS({
|
|
|
19844
20782
|
Observable2.prototype.toPromise = function(promiseCtor) {
|
|
19845
20783
|
var _this = this;
|
|
19846
20784
|
promiseCtor = getPromiseCtor(promiseCtor);
|
|
19847
|
-
return new promiseCtor(function(
|
|
20785
|
+
return new promiseCtor(function(resolve2, reject) {
|
|
19848
20786
|
var value;
|
|
19849
20787
|
_this.subscribe(function(x) {
|
|
19850
20788
|
return value = x;
|
|
19851
20789
|
}, function(err) {
|
|
19852
20790
|
return reject(err);
|
|
19853
20791
|
}, function() {
|
|
19854
|
-
return
|
|
20792
|
+
return resolve2(value);
|
|
19855
20793
|
});
|
|
19856
20794
|
});
|
|
19857
20795
|
};
|
|
@@ -21942,11 +22880,11 @@ var require_innerFrom = __commonJS({
|
|
|
21942
22880
|
"use strict";
|
|
21943
22881
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
21944
22882
|
function adopt(value) {
|
|
21945
|
-
return value instanceof P ? value : new P(function(
|
|
21946
|
-
|
|
22883
|
+
return value instanceof P ? value : new P(function(resolve2) {
|
|
22884
|
+
resolve2(value);
|
|
21947
22885
|
});
|
|
21948
22886
|
}
|
|
21949
|
-
return new (P || (P = Promise))(function(
|
|
22887
|
+
return new (P || (P = Promise))(function(resolve2, reject) {
|
|
21950
22888
|
function fulfilled(value) {
|
|
21951
22889
|
try {
|
|
21952
22890
|
step(generator.next(value));
|
|
@@ -21962,7 +22900,7 @@ var require_innerFrom = __commonJS({
|
|
|
21962
22900
|
}
|
|
21963
22901
|
}
|
|
21964
22902
|
function step(result) {
|
|
21965
|
-
result.done ?
|
|
22903
|
+
result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
21966
22904
|
}
|
|
21967
22905
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21968
22906
|
});
|
|
@@ -22044,14 +22982,14 @@ var require_innerFrom = __commonJS({
|
|
|
22044
22982
|
}, i);
|
|
22045
22983
|
function verb(n) {
|
|
22046
22984
|
i[n] = o[n] && function(v) {
|
|
22047
|
-
return new Promise(function(
|
|
22048
|
-
v = o[n](v), settle(
|
|
22985
|
+
return new Promise(function(resolve2, reject) {
|
|
22986
|
+
v = o[n](v), settle(resolve2, reject, v.done, v.value);
|
|
22049
22987
|
});
|
|
22050
22988
|
};
|
|
22051
22989
|
}
|
|
22052
|
-
function settle(
|
|
22990
|
+
function settle(resolve2, reject, d, v) {
|
|
22053
22991
|
Promise.resolve(v).then(function(v2) {
|
|
22054
|
-
|
|
22992
|
+
resolve2({ value: v2, done: d });
|
|
22055
22993
|
}, reject);
|
|
22056
22994
|
}
|
|
22057
22995
|
};
|
|
@@ -22670,7 +23608,7 @@ var require_lastValueFrom = __commonJS({
|
|
|
22670
23608
|
var EmptyError_1 = require_EmptyError();
|
|
22671
23609
|
function lastValueFrom(source, config) {
|
|
22672
23610
|
var hasConfig = typeof config === "object";
|
|
22673
|
-
return new Promise(function(
|
|
23611
|
+
return new Promise(function(resolve2, reject) {
|
|
22674
23612
|
var _hasValue = false;
|
|
22675
23613
|
var _value;
|
|
22676
23614
|
source.subscribe({
|
|
@@ -22681,9 +23619,9 @@ var require_lastValueFrom = __commonJS({
|
|
|
22681
23619
|
error: reject,
|
|
22682
23620
|
complete: function() {
|
|
22683
23621
|
if (_hasValue) {
|
|
22684
|
-
|
|
23622
|
+
resolve2(_value);
|
|
22685
23623
|
} else if (hasConfig) {
|
|
22686
|
-
|
|
23624
|
+
resolve2(config.defaultValue);
|
|
22687
23625
|
} else {
|
|
22688
23626
|
reject(new EmptyError_1.EmptyError());
|
|
22689
23627
|
}
|
|
@@ -22705,16 +23643,16 @@ var require_firstValueFrom = __commonJS({
|
|
|
22705
23643
|
var Subscriber_1 = require_Subscriber();
|
|
22706
23644
|
function firstValueFrom(source, config) {
|
|
22707
23645
|
var hasConfig = typeof config === "object";
|
|
22708
|
-
return new Promise(function(
|
|
23646
|
+
return new Promise(function(resolve2, reject) {
|
|
22709
23647
|
var subscriber = new Subscriber_1.SafeSubscriber({
|
|
22710
23648
|
next: function(value) {
|
|
22711
|
-
|
|
23649
|
+
resolve2(value);
|
|
22712
23650
|
subscriber.unsubscribe();
|
|
22713
23651
|
},
|
|
22714
23652
|
error: reject,
|
|
22715
23653
|
complete: function() {
|
|
22716
23654
|
if (hasConfig) {
|
|
22717
|
-
|
|
23655
|
+
resolve2(config.defaultValue);
|
|
22718
23656
|
} else {
|
|
22719
23657
|
reject(new EmptyError_1.EmptyError());
|
|
22720
23658
|
}
|
|
@@ -46421,7 +47359,76 @@ var {
|
|
|
46421
47359
|
} = import_index.default;
|
|
46422
47360
|
|
|
46423
47361
|
// package.json
|
|
46424
|
-
var version = "0.
|
|
47362
|
+
var version = "0.5.1-beta.0";
|
|
47363
|
+
var package_default = {
|
|
47364
|
+
name: "genlayer",
|
|
47365
|
+
version,
|
|
47366
|
+
description: "GenLayer Command Line Tool",
|
|
47367
|
+
main: "src/index.ts",
|
|
47368
|
+
bin: {
|
|
47369
|
+
genlayer: "./dist/index.js"
|
|
47370
|
+
},
|
|
47371
|
+
scripts: {
|
|
47372
|
+
test: "vitest",
|
|
47373
|
+
"test:watch": "vitest --watch",
|
|
47374
|
+
"test:coverage": "vitest run --coverage",
|
|
47375
|
+
dev: "cross-env NODE_ENV=development node esbuild.config.js",
|
|
47376
|
+
build: "cross-env NODE_ENV=production node esbuild.config.js",
|
|
47377
|
+
release: "release-it --ci",
|
|
47378
|
+
"release-beta": "release-it --ci --preRelease=beta",
|
|
47379
|
+
postinstall: "node ./scripts/postinstall.js"
|
|
47380
|
+
},
|
|
47381
|
+
repository: {
|
|
47382
|
+
type: "git",
|
|
47383
|
+
url: "git+https://github.com/yeagerai/genlayer-cli.git"
|
|
47384
|
+
},
|
|
47385
|
+
keywords: [
|
|
47386
|
+
"genlayer",
|
|
47387
|
+
"intelligent",
|
|
47388
|
+
"contract",
|
|
47389
|
+
"simulator",
|
|
47390
|
+
"cli"
|
|
47391
|
+
],
|
|
47392
|
+
author: "GenLayer",
|
|
47393
|
+
license: "MIT",
|
|
47394
|
+
bugs: {
|
|
47395
|
+
url: "https://github.com/yeagerai/genlayer-cli/issues"
|
|
47396
|
+
},
|
|
47397
|
+
homepage: "https://github.com/yeagerai/genlayer-cli#readme",
|
|
47398
|
+
devDependencies: {
|
|
47399
|
+
"@release-it/conventional-changelog": "^8.0.1",
|
|
47400
|
+
"@types/dockerode": "^3.3.31",
|
|
47401
|
+
"@types/inquirer": "^9.0.7",
|
|
47402
|
+
"@types/node": "^20.12.7",
|
|
47403
|
+
"@types/sinon": "^17.0.3",
|
|
47404
|
+
"@types/uuid": "^9.0.8",
|
|
47405
|
+
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
|
47406
|
+
"@typescript-eslint/parser": "^7.7.0",
|
|
47407
|
+
"@vitest/coverage-v8": "^2.1.4",
|
|
47408
|
+
"cross-env": "^7.0.3",
|
|
47409
|
+
esbuild: "^0.24.0",
|
|
47410
|
+
eslint: "^8.57.0",
|
|
47411
|
+
"eslint-config-prettier": "^9.1.0",
|
|
47412
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
47413
|
+
"eslint-plugin-import": "^2.29.1",
|
|
47414
|
+
jsdom: "^25.0.1",
|
|
47415
|
+
prettier: "^3.2.5",
|
|
47416
|
+
"release-it": "^17.2.0",
|
|
47417
|
+
"ts-node": "^10.9.2",
|
|
47418
|
+
typescript: "^5.4.5"
|
|
47419
|
+
},
|
|
47420
|
+
dependencies: {
|
|
47421
|
+
commander: "^12.0.0",
|
|
47422
|
+
dockerode: "^4.0.2",
|
|
47423
|
+
dotenv: "^16.4.5",
|
|
47424
|
+
inquirer: "^9.2.19",
|
|
47425
|
+
"node-fetch": "^2.7.0",
|
|
47426
|
+
open: "^10.1.0",
|
|
47427
|
+
"update-check": "^1.5.4",
|
|
47428
|
+
uuid: "^9.0.1",
|
|
47429
|
+
vitest: "^2.1.4"
|
|
47430
|
+
}
|
|
47431
|
+
};
|
|
46425
47432
|
|
|
46426
47433
|
// src/lib/config/text.ts
|
|
46427
47434
|
var CLI_DESCRIPTION = "GenLayer CLI is a development environment for the GenLayer ecosystem. It allows developers to interact with the protocol by creating accounts, sending transactions, and working with Intelligent Contracts by testing, debugging, and deploying them.";
|
|
@@ -46432,6 +47439,7 @@ var fs5 = __toESM(require("fs"));
|
|
|
46432
47439
|
var dotenv = __toESM(require_main());
|
|
46433
47440
|
var path2 = __toESM(require("path"));
|
|
46434
47441
|
var semver = __toESM(require_semver2());
|
|
47442
|
+
var import_update_check = __toESM(require_update_check());
|
|
46435
47443
|
|
|
46436
47444
|
// src/lib/clients/jsonRpcClient.ts
|
|
46437
47445
|
var import_node_fetch = __toESM(require_lib2());
|
|
@@ -46485,12 +47493,11 @@ var v4_default = v4;
|
|
|
46485
47493
|
|
|
46486
47494
|
// src/lib/config/simulator.ts
|
|
46487
47495
|
var DEFAULT_JSON_RPC_URL = "http://localhost:4000/api";
|
|
46488
|
-
var
|
|
46489
|
-
var
|
|
46490
|
-
|
|
46491
|
-
|
|
46492
|
-
|
|
46493
|
-
linux: `nohup bash -c 'cd ${simulatorLocation} && docker compose build && docker compose up -d ${options}'`
|
|
47496
|
+
var DOCKER_IMAGES_AND_CONTAINERS_NAME_PREFIX = "/genlayer-cli-";
|
|
47497
|
+
var DEFAULT_RUN_SIMULATOR_COMMAND = (location, options) => ({
|
|
47498
|
+
darwin: `osascript -e 'tell application "Terminal" to do script "cd ${location} && docker compose build && docker compose up ${options}"'`,
|
|
47499
|
+
win32: `start cmd.exe /c "cd /d ${location} && docker compose build && docker compose up && pause ${options}"`,
|
|
47500
|
+
linux: `nohup bash -c 'cd ${location} && docker compose build && docker compose up -d ${options}'`
|
|
46494
47501
|
});
|
|
46495
47502
|
var DEFAULT_RUN_DOCKER_COMMAND = {
|
|
46496
47503
|
darwin: "open -a Docker",
|
|
@@ -46766,8 +47773,8 @@ function defaultBrowser2() {
|
|
|
46766
47773
|
}
|
|
46767
47774
|
|
|
46768
47775
|
// node_modules/open/index.js
|
|
46769
|
-
var
|
|
46770
|
-
var localXdgOpenPath = import_node_path.default.join(
|
|
47776
|
+
var __dirname2 = import_node_path.default.dirname((0, import_node_url.fileURLToPath)(_importMetaUrl));
|
|
47777
|
+
var localXdgOpenPath = import_node_path.default.join(__dirname2, "xdg-open");
|
|
46771
47778
|
var { platform, arch } = import_node_process5.default;
|
|
46772
47779
|
var getWslDrivesMountPoint = /* @__PURE__ */ (() => {
|
|
46773
47780
|
const defaultMountPoint = "/mnt/";
|
|
@@ -46913,7 +47920,7 @@ var baseOpen = (options) => __async(void 0, null, function* () {
|
|
|
46913
47920
|
if (app) {
|
|
46914
47921
|
command = app;
|
|
46915
47922
|
} else {
|
|
46916
|
-
const isBundled = !
|
|
47923
|
+
const isBundled = !__dirname2 || __dirname2 === "/";
|
|
46917
47924
|
let exeLocalXdgOpen = false;
|
|
46918
47925
|
try {
|
|
46919
47926
|
yield import_promises.default.access(localXdgOpenPath, import_promises.constants.X_OK);
|
|
@@ -46939,14 +47946,14 @@ var baseOpen = (options) => __async(void 0, null, function* () {
|
|
|
46939
47946
|
}
|
|
46940
47947
|
const subprocess = import_node_child_process5.default.spawn(command, cliArguments, childProcessOptions);
|
|
46941
47948
|
if (options.wait) {
|
|
46942
|
-
return new Promise((
|
|
47949
|
+
return new Promise((resolve2, reject) => {
|
|
46943
47950
|
subprocess.once("error", reject);
|
|
46944
47951
|
subprocess.once("close", (exitCode) => {
|
|
46945
47952
|
if (!options.allowNonzeroExitCode && exitCode > 0) {
|
|
46946
47953
|
reject(new Error(`Exited with code ${exitCode}`));
|
|
46947
47954
|
return;
|
|
46948
47955
|
}
|
|
46949
|
-
|
|
47956
|
+
resolve2(subprocess);
|
|
46950
47957
|
});
|
|
46951
47958
|
});
|
|
46952
47959
|
}
|
|
@@ -47086,22 +48093,28 @@ var VersionRequiredError = class extends Error {
|
|
|
47086
48093
|
|
|
47087
48094
|
// src/lib/services/simulator.ts
|
|
47088
48095
|
function sleep(millliseconds) {
|
|
47089
|
-
return new Promise((
|
|
48096
|
+
return new Promise((resolve2) => setTimeout(resolve2, millliseconds));
|
|
47090
48097
|
}
|
|
47091
48098
|
var SimulatorService = class {
|
|
47092
48099
|
constructor() {
|
|
47093
48100
|
__publicField(this, "composeOptions");
|
|
47094
48101
|
__publicField(this, "docker");
|
|
47095
|
-
__publicField(this, "
|
|
47096
|
-
this.
|
|
48102
|
+
__publicField(this, "location");
|
|
48103
|
+
this.location = path2.resolve(__dirname, "..");
|
|
47097
48104
|
this.composeOptions = "";
|
|
47098
48105
|
this.docker = new import_dockerode.default();
|
|
47099
48106
|
}
|
|
47100
|
-
|
|
47101
|
-
|
|
47102
|
-
|
|
47103
|
-
|
|
47104
|
-
|
|
48107
|
+
addConfigToEnvFile(newConfig) {
|
|
48108
|
+
const envFilePath = path2.join(this.location, ".env");
|
|
48109
|
+
fs5.writeFileSync(`${envFilePath}.bak`, fs5.readFileSync(envFilePath));
|
|
48110
|
+
const envConfig = dotenv.parse(fs5.readFileSync(envFilePath, "utf8"));
|
|
48111
|
+
Object.keys(newConfig).forEach((key) => {
|
|
48112
|
+
envConfig[key] = newConfig[key];
|
|
48113
|
+
});
|
|
48114
|
+
const updatedConfig = Object.keys(envConfig).map((key) => {
|
|
48115
|
+
return `${key}=${envConfig[key]}`;
|
|
48116
|
+
}).join("\n");
|
|
48117
|
+
fs5.writeFileSync(envFilePath, updatedConfig);
|
|
47105
48118
|
}
|
|
47106
48119
|
setComposeOptions(headless) {
|
|
47107
48120
|
this.composeOptions = headless ? "--scale frontend=0" : "";
|
|
@@ -47110,36 +48123,26 @@ var SimulatorService = class {
|
|
|
47110
48123
|
return this.composeOptions;
|
|
47111
48124
|
}
|
|
47112
48125
|
readEnvConfigValue(key) {
|
|
47113
|
-
const envFilePath = path2.join(this.
|
|
48126
|
+
const envFilePath = path2.join(this.location, ".env");
|
|
47114
48127
|
const envConfig = dotenv.parse(fs5.readFileSync(envFilePath, "utf8"));
|
|
47115
48128
|
return envConfig[key];
|
|
47116
48129
|
}
|
|
47117
|
-
|
|
47118
|
-
|
|
47119
|
-
|
|
47120
|
-
|
|
47121
|
-
|
|
47122
|
-
|
|
48130
|
+
checkCliVersion() {
|
|
48131
|
+
return __async(this, null, function* () {
|
|
48132
|
+
const update = yield (0, import_update_check.default)(package_default);
|
|
48133
|
+
if (update && update.latest !== package_default.version) {
|
|
48134
|
+
console.warn(`
|
|
48135
|
+
A new version (${update.latest}) is available! You're using version ${package_default.version}.
|
|
48136
|
+
Run npm install -g genlayer to update
|
|
48137
|
+
`);
|
|
48138
|
+
}
|
|
47123
48139
|
});
|
|
47124
|
-
const updatedConfig = Object.keys(envConfig).map((key) => {
|
|
47125
|
-
return `${key}=${envConfig[key]}`;
|
|
47126
|
-
}).join("\n");
|
|
47127
|
-
fs5.writeFileSync(envFilePath, updatedConfig);
|
|
47128
48140
|
}
|
|
47129
48141
|
checkInstallRequirements() {
|
|
47130
48142
|
return __async(this, null, function* () {
|
|
47131
48143
|
const requirementsInstalled = {
|
|
47132
|
-
git: false,
|
|
47133
48144
|
docker: false
|
|
47134
48145
|
};
|
|
47135
|
-
try {
|
|
47136
|
-
yield checkCommand("git --version", "git");
|
|
47137
|
-
requirementsInstalled.git = true;
|
|
47138
|
-
} catch (error) {
|
|
47139
|
-
if (!(error instanceof MissingRequirementError)) {
|
|
47140
|
-
throw error;
|
|
47141
|
-
}
|
|
47142
|
-
}
|
|
47143
48146
|
try {
|
|
47144
48147
|
yield checkCommand("docker --version", "docker");
|
|
47145
48148
|
requirementsInstalled.docker = true;
|
|
@@ -47191,63 +48194,33 @@ var SimulatorService = class {
|
|
|
47191
48194
|
}
|
|
47192
48195
|
});
|
|
47193
48196
|
}
|
|
47194
|
-
|
|
48197
|
+
pullOllamaModel() {
|
|
47195
48198
|
return __async(this, null, function* () {
|
|
47196
48199
|
try {
|
|
47197
|
-
const
|
|
47198
|
-
const
|
|
47199
|
-
|
|
48200
|
+
const ollamaContainer = this.docker.getContainer("ollama");
|
|
48201
|
+
const exec2 = yield ollamaContainer.exec({
|
|
48202
|
+
Cmd: ["ollama", "pull", "llama3"],
|
|
48203
|
+
AttachStdout: true,
|
|
48204
|
+
AttachStderr: true
|
|
48205
|
+
});
|
|
48206
|
+
const stream = yield exec2.start({ Detach: false, Tty: false });
|
|
48207
|
+
stream.on("data", (chunk) => {
|
|
48208
|
+
console.log(chunk.toString());
|
|
48209
|
+
});
|
|
48210
|
+
yield new Promise((resolve2, reject) => {
|
|
48211
|
+
stream.on("end", resolve2);
|
|
48212
|
+
stream.on("error", reject);
|
|
48213
|
+
});
|
|
48214
|
+
console.log("Command executed successfully");
|
|
48215
|
+
return true;
|
|
47200
48216
|
} catch (error) {
|
|
47201
|
-
|
|
47202
|
-
|
|
47203
|
-
return { wasInstalled: true };
|
|
47204
|
-
}
|
|
47205
|
-
throw error;
|
|
48217
|
+
console.error("Error executing ollama pull llama3:", error);
|
|
48218
|
+
return false;
|
|
47206
48219
|
}
|
|
47207
|
-
return { wasInstalled: false };
|
|
47208
|
-
});
|
|
47209
|
-
}
|
|
47210
|
-
updateSimulator(branch = "main") {
|
|
47211
|
-
return __async(this, null, function* () {
|
|
47212
|
-
const gitCleanCommand = `git -C "${this.simulatorLocation}" clean -f`;
|
|
47213
|
-
const cleanCmdsByPlatform = { darwin: gitCleanCommand, win32: gitCleanCommand, linux: gitCleanCommand };
|
|
47214
|
-
yield executeCommand(cleanCmdsByPlatform, "git");
|
|
47215
|
-
const gitFetchCommand = `git -C "${this.simulatorLocation}" fetch`;
|
|
47216
|
-
const fetchCmdsByPlatform = { darwin: gitFetchCommand, win32: gitFetchCommand, linux: gitFetchCommand };
|
|
47217
|
-
yield executeCommand(fetchCmdsByPlatform, "git");
|
|
47218
|
-
const gitCheckoutCommand = `git -C "${this.simulatorLocation}" checkout ${branch}`;
|
|
47219
|
-
const checkoutCmdsByPlatform = {
|
|
47220
|
-
darwin: gitCheckoutCommand,
|
|
47221
|
-
win32: gitCheckoutCommand,
|
|
47222
|
-
linux: gitCheckoutCommand
|
|
47223
|
-
};
|
|
47224
|
-
yield executeCommand(checkoutCmdsByPlatform, "git");
|
|
47225
|
-
const gitPullCommand = `git -C "${this.simulatorLocation}" pull`;
|
|
47226
|
-
const pullCmdsByPlatform = { darwin: gitPullCommand, win32: gitPullCommand, linux: gitPullCommand };
|
|
47227
|
-
yield executeCommand(pullCmdsByPlatform, "git");
|
|
47228
|
-
return true;
|
|
47229
|
-
});
|
|
47230
|
-
}
|
|
47231
|
-
pullOllamaModel() {
|
|
47232
|
-
return __async(this, null, function* () {
|
|
47233
|
-
const ollamaContainer = this.docker.getContainer("ollama");
|
|
47234
|
-
yield ollamaContainer.exec({
|
|
47235
|
-
Cmd: ["ollama", "pull", "llama3"]
|
|
47236
|
-
});
|
|
47237
|
-
return true;
|
|
47238
|
-
});
|
|
47239
|
-
}
|
|
47240
|
-
configSimulator(newConfig) {
|
|
47241
|
-
return __async(this, null, function* () {
|
|
47242
|
-
const envExample = path2.join(this.simulatorLocation, ".env.example");
|
|
47243
|
-
const envFilePath = path2.join(this.simulatorLocation, ".env");
|
|
47244
|
-
fs5.copyFileSync(envExample, envFilePath);
|
|
47245
|
-
this.addConfigToEnvFile(newConfig);
|
|
47246
|
-
return true;
|
|
47247
48220
|
});
|
|
47248
48221
|
}
|
|
47249
48222
|
runSimulator() {
|
|
47250
|
-
const commandsByPlatform = DEFAULT_RUN_SIMULATOR_COMMAND(this.
|
|
48223
|
+
const commandsByPlatform = DEFAULT_RUN_SIMULATOR_COMMAND(this.location, this.getComposeOptions());
|
|
47251
48224
|
return executeCommand(commandsByPlatform);
|
|
47252
48225
|
}
|
|
47253
48226
|
waitForSimulatorToBeReady() {
|
|
@@ -48554,9 +49527,9 @@ var Prompt = class {
|
|
|
48554
49527
|
* @return {Promise}
|
|
48555
49528
|
*/
|
|
48556
49529
|
run() {
|
|
48557
|
-
return new Promise((
|
|
49530
|
+
return new Promise((resolve2, reject) => {
|
|
48558
49531
|
this._run(
|
|
48559
|
-
(value) =>
|
|
49532
|
+
(value) => resolve2(value),
|
|
48560
49533
|
(error) => reject(error)
|
|
48561
49534
|
);
|
|
48562
49535
|
});
|
|
@@ -49933,13 +50906,7 @@ var inquirer = {
|
|
|
49933
50906
|
var inquirer_default = inquirer;
|
|
49934
50907
|
|
|
49935
50908
|
// src/commands/general/init.ts
|
|
49936
|
-
function getRequirementsErrorMessage({
|
|
49937
|
-
if (!git && !docker) {
|
|
49938
|
-
return "Git and Docker are not installed. Please install them and try again.\n";
|
|
49939
|
-
}
|
|
49940
|
-
if (!git) {
|
|
49941
|
-
return "Git is not installed. Please install Git and try again.\n";
|
|
49942
|
-
}
|
|
50909
|
+
function getRequirementsErrorMessage({ docker }) {
|
|
49943
50910
|
if (!docker) {
|
|
49944
50911
|
return "Docker is not installed. Please install Docker and try again.\n";
|
|
49945
50912
|
}
|
|
@@ -49959,8 +50926,8 @@ function getVersionErrorMessage({ docker, node }) {
|
|
|
49959
50926
|
}
|
|
49960
50927
|
function initAction(options, simulatorService) {
|
|
49961
50928
|
return __async(this, null, function* () {
|
|
49962
|
-
simulatorService.setSimulatorLocation(options.location);
|
|
49963
50929
|
simulatorService.setComposeOptions(options.headless);
|
|
50930
|
+
yield simulatorService.checkCliVersion();
|
|
49964
50931
|
try {
|
|
49965
50932
|
const requirementsInstalled = yield simulatorService.checkInstallRequirements();
|
|
49966
50933
|
const requirementErrorMessage = getRequirementsErrorMessage(requirementsInstalled);
|
|
@@ -50004,28 +50971,6 @@ function initAction(options, simulatorService) {
|
|
|
50004
50971
|
console.error(error);
|
|
50005
50972
|
return;
|
|
50006
50973
|
}
|
|
50007
|
-
const answers = yield inquirer_default.prompt([
|
|
50008
|
-
{
|
|
50009
|
-
type: "confirm",
|
|
50010
|
-
name: "confirmDownload",
|
|
50011
|
-
message: `This action is going to download the GenLayer Simulator from GitHub (branch ${options.branch}) into "${simulatorService.getSimulatorLocation()}". Do you want to continue?`,
|
|
50012
|
-
default: true
|
|
50013
|
-
}
|
|
50014
|
-
]);
|
|
50015
|
-
if (!answers.confirmDownload) {
|
|
50016
|
-
console.log("Aborted!");
|
|
50017
|
-
return;
|
|
50018
|
-
}
|
|
50019
|
-
console.log(`Downloading GenLayer Simulator from GitHub...`);
|
|
50020
|
-
try {
|
|
50021
|
-
const { wasInstalled } = yield simulatorService.downloadSimulator(options.branch);
|
|
50022
|
-
if (wasInstalled) {
|
|
50023
|
-
yield simulatorService.updateSimulator(options.branch);
|
|
50024
|
-
}
|
|
50025
|
-
} catch (error) {
|
|
50026
|
-
console.error(error);
|
|
50027
|
-
return;
|
|
50028
|
-
}
|
|
50029
50974
|
const questions = [
|
|
50030
50975
|
{
|
|
50031
50976
|
type: "checkbox",
|
|
@@ -50066,12 +51011,7 @@ function initAction(options, simulatorService) {
|
|
|
50066
51011
|
aiProvidersEnvVars[providerConfig.envVar] = apiKeyAnswer[providerConfig.cliOptionValue];
|
|
50067
51012
|
}
|
|
50068
51013
|
console.log("Configuring GenLayer Simulator environment...");
|
|
50069
|
-
|
|
50070
|
-
yield simulatorService.configSimulator(aiProvidersEnvVars);
|
|
50071
|
-
} catch (error) {
|
|
50072
|
-
console.error(error);
|
|
50073
|
-
return;
|
|
50074
|
-
}
|
|
51014
|
+
simulatorService.addConfigToEnvFile(aiProvidersEnvVars);
|
|
50075
51015
|
console.log("Running the GenLayer Simulator...");
|
|
50076
51016
|
try {
|
|
50077
51017
|
yield simulatorService.runSimulator();
|
|
@@ -50129,19 +51069,11 @@ function initAction(options, simulatorService) {
|
|
|
50129
51069
|
// src/commands/general/start.ts
|
|
50130
51070
|
function startAction(options, simulatorService) {
|
|
50131
51071
|
return __async(this, null, function* () {
|
|
50132
|
-
const { resetValidators, numValidators,
|
|
51072
|
+
const { resetValidators, numValidators, headless, resetDb } = options;
|
|
50133
51073
|
simulatorService.setComposeOptions(headless);
|
|
50134
|
-
simulatorService.
|
|
51074
|
+
yield simulatorService.checkCliVersion();
|
|
50135
51075
|
const restartValidatorsHintText = resetValidators ? `creating new ${numValidators} random validators` : "keeping the existing validators";
|
|
50136
51076
|
console.log(`Starting GenLayer simulator ${restartValidatorsHintText}`);
|
|
50137
|
-
console.log(`Updating GenLayer Simulator...`);
|
|
50138
|
-
try {
|
|
50139
|
-
yield simulatorService.updateSimulator(branch);
|
|
50140
|
-
} catch (error) {
|
|
50141
|
-
console.error(error);
|
|
50142
|
-
return;
|
|
50143
|
-
}
|
|
50144
|
-
console.log("Running the GenLayer Simulator...");
|
|
50145
51077
|
try {
|
|
50146
51078
|
yield simulatorService.runSimulator();
|
|
50147
51079
|
} catch (error) {
|
|
@@ -50214,8 +51146,8 @@ function startAction(options, simulatorService) {
|
|
|
50214
51146
|
|
|
50215
51147
|
// src/commands/general/index.ts
|
|
50216
51148
|
function initializeGeneralCommands(program2) {
|
|
50217
|
-
program2.command("init").description("Initialize the GenLayer Environment").option("--numValidators <numValidators>", "Number of validators", "5").option("--
|
|
50218
|
-
program2.command("up").description("Starts GenLayer's simulator").option("--reset-validators", "Remove all current validators and create new random ones", false).option("--numValidators <numValidators>", "Number of validators", "5").option("--
|
|
51149
|
+
program2.command("init").description("Initialize the GenLayer Environment").option("--numValidators <numValidators>", "Number of validators", "5").option("--headless", "Headless mode", false).option("--reset-db", "Reset Database", false).action((options) => initAction(options, simulator_default));
|
|
51150
|
+
program2.command("up").description("Starts GenLayer's simulator").option("--reset-validators", "Remove all current validators and create new random ones", false).option("--numValidators <numValidators>", "Number of validators", "5").option("--headless", "Headless mode", false).option("--reset-db", "Reset Database", false).action((options) => startAction(options, simulator_default));
|
|
50219
51151
|
return program2;
|
|
50220
51152
|
}
|
|
50221
51153
|
|
|
@@ -50260,6 +51192,34 @@ safe-buffer/index.js:
|
|
|
50260
51192
|
* ------------------------------------------------------------------------
|
|
50261
51193
|
*)
|
|
50262
51194
|
|
|
51195
|
+
deep-extend/lib/deep-extend.js:
|
|
51196
|
+
(*!
|
|
51197
|
+
* @description Recursive object extending
|
|
51198
|
+
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
|
51199
|
+
* @license MIT
|
|
51200
|
+
*
|
|
51201
|
+
* The MIT License (MIT)
|
|
51202
|
+
*
|
|
51203
|
+
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
|
|
51204
|
+
*
|
|
51205
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
51206
|
+
* this software and associated documentation files (the "Software"), to deal in
|
|
51207
|
+
* the Software without restriction, including without limitation the rights to
|
|
51208
|
+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
51209
|
+
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
51210
|
+
* subject to the following conditions:
|
|
51211
|
+
*
|
|
51212
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
51213
|
+
* copies or substantial portions of the Software.
|
|
51214
|
+
*
|
|
51215
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
51216
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
51217
|
+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
51218
|
+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
51219
|
+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
51220
|
+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
51221
|
+
*)
|
|
51222
|
+
|
|
50263
51223
|
tmp/lib/tmp.js:
|
|
50264
51224
|
(*!
|
|
50265
51225
|
* Tmp
|