@tsed/cli-core 3.20.4 → 3.20.7
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/lib/index.js +33 -6
- package/lib/index.js.map +1 -1
- package/lib/index.modern.js +33 -6
- package/lib/index.modern.js.map +1 -1
- package/package.json +1 -1
package/lib/index.modern.js
CHANGED
|
@@ -3552,11 +3552,13 @@ let CliDockerComposeYaml = class CliDockerComposeYaml {
|
|
|
3552
3552
|
const dockerCompose = await this.read();
|
|
3553
3553
|
|
|
3554
3554
|
if (dockerCompose) {
|
|
3555
|
+
let value;
|
|
3556
|
+
|
|
3555
3557
|
switch (database) {
|
|
3556
3558
|
case "mysql":
|
|
3557
3559
|
case "mariadb":
|
|
3558
|
-
|
|
3559
|
-
image: database === "mysql" ? "mysql:
|
|
3560
|
+
value = {
|
|
3561
|
+
image: database === "mysql" ? "mysql:8.0.28-oracle" : "mariadb:10.7.3",
|
|
3560
3562
|
ports: ["3306:3306"],
|
|
3561
3563
|
environment: {
|
|
3562
3564
|
MYSQL_ROOT_PASSWORD: "admin",
|
|
@@ -3568,7 +3570,7 @@ let CliDockerComposeYaml = class CliDockerComposeYaml {
|
|
|
3568
3570
|
break;
|
|
3569
3571
|
|
|
3570
3572
|
case "postgres":
|
|
3571
|
-
|
|
3573
|
+
value = {
|
|
3572
3574
|
image: "postgres:9.6.1",
|
|
3573
3575
|
ports: ["5432:5432"],
|
|
3574
3576
|
environment: {
|
|
@@ -3580,7 +3582,7 @@ let CliDockerComposeYaml = class CliDockerComposeYaml {
|
|
|
3580
3582
|
break;
|
|
3581
3583
|
|
|
3582
3584
|
case "cockroachdb":
|
|
3583
|
-
|
|
3585
|
+
value = {
|
|
3584
3586
|
image: "cockroachdb/cockroach:v2.1.4",
|
|
3585
3587
|
command: "start --insecure",
|
|
3586
3588
|
ports: ["26257:26257"]
|
|
@@ -3588,7 +3590,7 @@ let CliDockerComposeYaml = class CliDockerComposeYaml {
|
|
|
3588
3590
|
break;
|
|
3589
3591
|
|
|
3590
3592
|
case "mssql":
|
|
3591
|
-
|
|
3593
|
+
value = {
|
|
3592
3594
|
image: "mcr.microsoft.com/mssql/server:2017-latest",
|
|
3593
3595
|
command: "start --insecure",
|
|
3594
3596
|
ports: ["1433:1433"],
|
|
@@ -3600,13 +3602,14 @@ let CliDockerComposeYaml = class CliDockerComposeYaml {
|
|
|
3600
3602
|
break;
|
|
3601
3603
|
|
|
3602
3604
|
case "mongodb":
|
|
3603
|
-
|
|
3605
|
+
value = {
|
|
3604
3606
|
image: "mongo:4.1",
|
|
3605
3607
|
ports: ["27017:27017"]
|
|
3606
3608
|
};
|
|
3607
3609
|
break;
|
|
3608
3610
|
}
|
|
3609
3611
|
|
|
3612
|
+
setValue(dockerCompose, `services.${snakeCase(name)}`, value);
|
|
3610
3613
|
await this.write(dockerCompose);
|
|
3611
3614
|
}
|
|
3612
3615
|
}
|
|
@@ -3716,6 +3719,30 @@ CliCore = CliCore_1 = __decorate([Module({
|
|
|
3716
3719
|
imports: [CliPackageJson, ProjectPackageJson, CliService, CliConfiguration]
|
|
3717
3720
|
})], CliCore);
|
|
3718
3721
|
|
|
3722
|
+
function at(n) {
|
|
3723
|
+
// ToInteger() abstract op
|
|
3724
|
+
n = Math.trunc(n) || 0; // Allow negative indexing from the end
|
|
3725
|
+
|
|
3726
|
+
if (n < 0) n += this.length; // OOB access is guaranteed to return undefined
|
|
3727
|
+
|
|
3728
|
+
if (n < 0 || n >= this.length) return undefined; // Otherwise, this is just normal property access
|
|
3729
|
+
|
|
3730
|
+
return this[n];
|
|
3731
|
+
}
|
|
3732
|
+
|
|
3733
|
+
const TypedArray = Reflect.getPrototypeOf(Int8Array);
|
|
3734
|
+
|
|
3735
|
+
for (const C of [Array, String, TypedArray]) {
|
|
3736
|
+
if (C) {
|
|
3737
|
+
Object.defineProperty(C.prototype, "at", {
|
|
3738
|
+
value: at,
|
|
3739
|
+
writable: true,
|
|
3740
|
+
enumerable: false,
|
|
3741
|
+
configurable: true
|
|
3742
|
+
});
|
|
3743
|
+
}
|
|
3744
|
+
}
|
|
3745
|
+
|
|
3719
3746
|
const helpInformation = Command$1.prototype.helpInformation;
|
|
3720
3747
|
|
|
3721
3748
|
function colorizeSection(str, section) {
|