@carllee1983/dbcli 1.56.0 → 1.57.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/.cursor/rules/dbcli.mdc +13 -0
- package/.cursor/skills/dbcli/reference.md +41 -0
- package/.github/skills/dbcli/SKILL.md +13 -0
- package/.github/skills/dbcli/reference.md +41 -0
- package/CHANGELOG.md +16 -0
- package/assets/SKILL.md +13 -0
- package/assets/SKILL.zh-TW.md +11 -0
- package/assets/reference.md +41 -0
- package/dist/cli-runtime.mjs +344 -44
- package/dist/cli.mjs +1 -1
- package/dist/core.d.ts +144 -122
- package/dist/core.mjs +175 -37
- package/package.json +1 -1
- package/plugins/dbcli-agent/skills/dbcli/SKILL.md +13 -0
- package/plugins/dbcli-agent/skills/dbcli/reference.md +41 -0
- package/skills/dbcli/SKILL.md +13 -0
- package/skills/dbcli/reference.md +41 -0
package/dist/core.d.ts
CHANGED
|
@@ -843,6 +843,9 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
843
843
|
}>
|
|
844
844
|
]>;
|
|
845
845
|
}, "strip", z.ZodTypeAny, {
|
|
846
|
+
password: string | {
|
|
847
|
+
$env: string;
|
|
848
|
+
};
|
|
846
849
|
system: "postgresql" | "mysql" | "mariadb";
|
|
847
850
|
host: string | {
|
|
848
851
|
$env: string;
|
|
@@ -853,9 +856,6 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
853
856
|
user: string | {
|
|
854
857
|
$env: string;
|
|
855
858
|
};
|
|
856
|
-
password: string | {
|
|
857
|
-
$env: string;
|
|
858
|
-
};
|
|
859
859
|
database: string | {
|
|
860
860
|
$env: string;
|
|
861
861
|
};
|
|
@@ -968,6 +968,9 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
968
968
|
tls: z.ZodOptional<z.ZodBoolean>;
|
|
969
969
|
srv: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
970
970
|
}, "strip", z.ZodTypeAny, {
|
|
971
|
+
password: string | {
|
|
972
|
+
$env: string;
|
|
973
|
+
};
|
|
971
974
|
system: "mongodb";
|
|
972
975
|
host: string | {
|
|
973
976
|
$env: string;
|
|
@@ -978,9 +981,6 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
978
981
|
user: string | {
|
|
979
982
|
$env: string;
|
|
980
983
|
};
|
|
981
|
-
password: string | {
|
|
982
|
-
$env: string;
|
|
983
|
-
};
|
|
984
984
|
database: string | {
|
|
985
985
|
$env: string;
|
|
986
986
|
};
|
|
@@ -999,6 +999,9 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
999
999
|
statementTimeout?: number | undefined;
|
|
1000
1000
|
}, {
|
|
1001
1001
|
system: "mongodb";
|
|
1002
|
+
password?: string | {
|
|
1003
|
+
$env: string;
|
|
1004
|
+
} | undefined;
|
|
1002
1005
|
host?: string | {
|
|
1003
1006
|
$env: string;
|
|
1004
1007
|
} | undefined;
|
|
@@ -1008,9 +1011,6 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1008
1011
|
user?: string | {
|
|
1009
1012
|
$env: string;
|
|
1010
1013
|
} | undefined;
|
|
1011
|
-
password?: string | {
|
|
1012
|
-
$env: string;
|
|
1013
|
-
} | undefined;
|
|
1014
1014
|
database?: string | {
|
|
1015
1015
|
$env: string;
|
|
1016
1016
|
} | undefined;
|
|
@@ -1083,6 +1083,9 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1083
1083
|
}>
|
|
1084
1084
|
]>>>;
|
|
1085
1085
|
}, "strip", z.ZodTypeAny, {
|
|
1086
|
+
password: string | {
|
|
1087
|
+
$env: string;
|
|
1088
|
+
};
|
|
1086
1089
|
system: "redis";
|
|
1087
1090
|
host: string | {
|
|
1088
1091
|
$env: string;
|
|
@@ -1093,9 +1096,6 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1093
1096
|
user: string | {
|
|
1094
1097
|
$env: string;
|
|
1095
1098
|
};
|
|
1096
|
-
password: string | {
|
|
1097
|
-
$env: string;
|
|
1098
|
-
};
|
|
1099
1099
|
database: string | {
|
|
1100
1100
|
$env: string;
|
|
1101
1101
|
};
|
|
@@ -1109,10 +1109,10 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1109
1109
|
port: number | {
|
|
1110
1110
|
$env: string;
|
|
1111
1111
|
};
|
|
1112
|
-
|
|
1112
|
+
password?: string | {
|
|
1113
1113
|
$env: string;
|
|
1114
1114
|
} | undefined;
|
|
1115
|
-
|
|
1115
|
+
user?: string | {
|
|
1116
1116
|
$env: string;
|
|
1117
1117
|
} | undefined;
|
|
1118
1118
|
database?: string | {
|
|
@@ -1203,6 +1203,9 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1203
1203
|
caPath: z.ZodOptional<z.ZodString>;
|
|
1204
1204
|
rejectUnauthorized: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1205
1205
|
}, "strip", z.ZodTypeAny, {
|
|
1206
|
+
password: string | {
|
|
1207
|
+
$env: string;
|
|
1208
|
+
};
|
|
1206
1209
|
system: "elasticsearch";
|
|
1207
1210
|
host: string | {
|
|
1208
1211
|
$env: string;
|
|
@@ -1213,9 +1216,6 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1213
1216
|
user: string | {
|
|
1214
1217
|
$env: string;
|
|
1215
1218
|
};
|
|
1216
|
-
password: string | {
|
|
1217
|
-
$env: string;
|
|
1218
|
-
};
|
|
1219
1219
|
database: string | {
|
|
1220
1220
|
$env: string;
|
|
1221
1221
|
};
|
|
@@ -1233,6 +1233,9 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1233
1233
|
caPath?: string | undefined;
|
|
1234
1234
|
}, {
|
|
1235
1235
|
system: "elasticsearch";
|
|
1236
|
+
password?: string | {
|
|
1237
|
+
$env: string;
|
|
1238
|
+
} | undefined;
|
|
1236
1239
|
host?: string | {
|
|
1237
1240
|
$env: string;
|
|
1238
1241
|
} | undefined;
|
|
@@ -1242,9 +1245,6 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1242
1245
|
user?: string | {
|
|
1243
1246
|
$env: string;
|
|
1244
1247
|
} | undefined;
|
|
1245
|
-
password?: string | {
|
|
1246
|
-
$env: string;
|
|
1247
|
-
} | undefined;
|
|
1248
1248
|
database?: string | {
|
|
1249
1249
|
$env: string;
|
|
1250
1250
|
} | undefined;
|
|
@@ -1356,6 +1356,9 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1356
1356
|
};
|
|
1357
1357
|
};
|
|
1358
1358
|
connection: {
|
|
1359
|
+
password: string | {
|
|
1360
|
+
$env: string;
|
|
1361
|
+
};
|
|
1359
1362
|
system: "mongodb";
|
|
1360
1363
|
host: string | {
|
|
1361
1364
|
$env: string;
|
|
@@ -1366,9 +1369,6 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1366
1369
|
user: string | {
|
|
1367
1370
|
$env: string;
|
|
1368
1371
|
};
|
|
1369
|
-
password: string | {
|
|
1370
|
-
$env: string;
|
|
1371
|
-
};
|
|
1372
1372
|
database: string | {
|
|
1373
1373
|
$env: string;
|
|
1374
1374
|
};
|
|
@@ -1386,6 +1386,9 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1386
1386
|
timeout?: number | undefined;
|
|
1387
1387
|
statementTimeout?: number | undefined;
|
|
1388
1388
|
} | {
|
|
1389
|
+
password: string | {
|
|
1390
|
+
$env: string;
|
|
1391
|
+
};
|
|
1389
1392
|
system: "postgresql" | "mysql" | "mariadb";
|
|
1390
1393
|
host: string | {
|
|
1391
1394
|
$env: string;
|
|
@@ -1396,15 +1399,15 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1396
1399
|
user: string | {
|
|
1397
1400
|
$env: string;
|
|
1398
1401
|
};
|
|
1399
|
-
password: string | {
|
|
1400
|
-
$env: string;
|
|
1401
|
-
};
|
|
1402
1402
|
database: string | {
|
|
1403
1403
|
$env: string;
|
|
1404
1404
|
};
|
|
1405
1405
|
timeout?: number | undefined;
|
|
1406
1406
|
statementTimeout?: number | undefined;
|
|
1407
1407
|
} | {
|
|
1408
|
+
password: string | {
|
|
1409
|
+
$env: string;
|
|
1410
|
+
};
|
|
1408
1411
|
system: "redis";
|
|
1409
1412
|
host: string | {
|
|
1410
1413
|
$env: string;
|
|
@@ -1415,15 +1418,15 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1415
1418
|
user: string | {
|
|
1416
1419
|
$env: string;
|
|
1417
1420
|
};
|
|
1418
|
-
password: string | {
|
|
1419
|
-
$env: string;
|
|
1420
|
-
};
|
|
1421
1421
|
database: string | {
|
|
1422
1422
|
$env: string;
|
|
1423
1423
|
};
|
|
1424
1424
|
timeout?: number | undefined;
|
|
1425
1425
|
statementTimeout?: number | undefined;
|
|
1426
1426
|
} | {
|
|
1427
|
+
password: string | {
|
|
1428
|
+
$env: string;
|
|
1429
|
+
};
|
|
1427
1430
|
system: "elasticsearch";
|
|
1428
1431
|
host: string | {
|
|
1429
1432
|
$env: string;
|
|
@@ -1434,9 +1437,6 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1434
1437
|
user: string | {
|
|
1435
1438
|
$env: string;
|
|
1436
1439
|
};
|
|
1437
|
-
password: string | {
|
|
1438
|
-
$env: string;
|
|
1439
|
-
};
|
|
1440
1440
|
database: string | {
|
|
1441
1441
|
$env: string;
|
|
1442
1442
|
};
|
|
@@ -1469,6 +1469,9 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1469
1469
|
}, {
|
|
1470
1470
|
connection: {
|
|
1471
1471
|
system: "mongodb";
|
|
1472
|
+
password?: string | {
|
|
1473
|
+
$env: string;
|
|
1474
|
+
} | undefined;
|
|
1472
1475
|
host?: string | {
|
|
1473
1476
|
$env: string;
|
|
1474
1477
|
} | undefined;
|
|
@@ -1478,9 +1481,6 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1478
1481
|
user?: string | {
|
|
1479
1482
|
$env: string;
|
|
1480
1483
|
} | undefined;
|
|
1481
|
-
password?: string | {
|
|
1482
|
-
$env: string;
|
|
1483
|
-
} | undefined;
|
|
1484
1484
|
database?: string | {
|
|
1485
1485
|
$env: string;
|
|
1486
1486
|
} | undefined;
|
|
@@ -1524,10 +1524,10 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1524
1524
|
port: number | {
|
|
1525
1525
|
$env: string;
|
|
1526
1526
|
};
|
|
1527
|
-
|
|
1527
|
+
password?: string | {
|
|
1528
1528
|
$env: string;
|
|
1529
1529
|
} | undefined;
|
|
1530
|
-
|
|
1530
|
+
user?: string | {
|
|
1531
1531
|
$env: string;
|
|
1532
1532
|
} | undefined;
|
|
1533
1533
|
database?: string | {
|
|
@@ -1537,6 +1537,9 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1537
1537
|
statementTimeout?: number | undefined;
|
|
1538
1538
|
} | {
|
|
1539
1539
|
system: "elasticsearch";
|
|
1540
|
+
password?: string | {
|
|
1541
|
+
$env: string;
|
|
1542
|
+
} | undefined;
|
|
1540
1543
|
host?: string | {
|
|
1541
1544
|
$env: string;
|
|
1542
1545
|
} | undefined;
|
|
@@ -1546,9 +1549,6 @@ declare const DbcliConfigSchema: z.ZodObject<{
|
|
|
1546
1549
|
user?: string | {
|
|
1547
1550
|
$env: string;
|
|
1548
1551
|
} | undefined;
|
|
1549
|
-
password?: string | {
|
|
1550
|
-
$env: string;
|
|
1551
|
-
} | undefined;
|
|
1552
1552
|
database?: string | {
|
|
1553
1553
|
$env: string;
|
|
1554
1554
|
} | undefined;
|
|
@@ -1667,6 +1667,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
1667
1667
|
envFile: z.ZodOptional<z.ZodString>;
|
|
1668
1668
|
environment: z.ZodOptional<z.ZodEffects<z.ZodString, string | undefined, string>>;
|
|
1669
1669
|
}, "strip", z.ZodTypeAny, {
|
|
1670
|
+
password: string | {
|
|
1671
|
+
$env: string;
|
|
1672
|
+
};
|
|
1670
1673
|
system: "postgresql" | "mysql" | "mariadb";
|
|
1671
1674
|
host: string | {
|
|
1672
1675
|
$env: string;
|
|
@@ -1677,9 +1680,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
1677
1680
|
user: string | {
|
|
1678
1681
|
$env: string;
|
|
1679
1682
|
};
|
|
1680
|
-
password: string | {
|
|
1681
|
-
$env: string;
|
|
1682
|
-
};
|
|
1683
1683
|
database: string | {
|
|
1684
1684
|
$env: string;
|
|
1685
1685
|
};
|
|
@@ -1807,6 +1807,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
1807
1807
|
envFile: z.ZodOptional<z.ZodString>;
|
|
1808
1808
|
environment: z.ZodOptional<z.ZodEffects<z.ZodString, string | undefined, string>>;
|
|
1809
1809
|
}, "strip", z.ZodTypeAny, {
|
|
1810
|
+
password: string | {
|
|
1811
|
+
$env: string;
|
|
1812
|
+
};
|
|
1810
1813
|
system: "mongodb";
|
|
1811
1814
|
host: string | {
|
|
1812
1815
|
$env: string;
|
|
@@ -1817,9 +1820,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
1817
1820
|
user: string | {
|
|
1818
1821
|
$env: string;
|
|
1819
1822
|
};
|
|
1820
|
-
password: string | {
|
|
1821
|
-
$env: string;
|
|
1822
|
-
};
|
|
1823
1823
|
database: string | {
|
|
1824
1824
|
$env: string;
|
|
1825
1825
|
};
|
|
@@ -1841,6 +1841,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
1841
1841
|
environment?: string | undefined;
|
|
1842
1842
|
}, {
|
|
1843
1843
|
system: "mongodb";
|
|
1844
|
+
password?: string | {
|
|
1845
|
+
$env: string;
|
|
1846
|
+
} | undefined;
|
|
1844
1847
|
host?: string | {
|
|
1845
1848
|
$env: string;
|
|
1846
1849
|
} | undefined;
|
|
@@ -1850,9 +1853,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
1850
1853
|
user?: string | {
|
|
1851
1854
|
$env: string;
|
|
1852
1855
|
} | undefined;
|
|
1853
|
-
password?: string | {
|
|
1854
|
-
$env: string;
|
|
1855
|
-
} | undefined;
|
|
1856
1856
|
database?: string | {
|
|
1857
1857
|
$env: string;
|
|
1858
1858
|
} | undefined;
|
|
@@ -1937,6 +1937,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
1937
1937
|
envFile: z.ZodOptional<z.ZodString>;
|
|
1938
1938
|
environment: z.ZodOptional<z.ZodEffects<z.ZodString, string | undefined, string>>;
|
|
1939
1939
|
}, "strip", z.ZodTypeAny, {
|
|
1940
|
+
password: string | {
|
|
1941
|
+
$env: string;
|
|
1942
|
+
};
|
|
1940
1943
|
system: "redis";
|
|
1941
1944
|
host: string | {
|
|
1942
1945
|
$env: string;
|
|
@@ -1947,9 +1950,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
1947
1950
|
user: string | {
|
|
1948
1951
|
$env: string;
|
|
1949
1952
|
};
|
|
1950
|
-
password: string | {
|
|
1951
|
-
$env: string;
|
|
1952
|
-
};
|
|
1953
1953
|
database: string | {
|
|
1954
1954
|
$env: string;
|
|
1955
1955
|
};
|
|
@@ -1966,10 +1966,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
1966
1966
|
port: number | {
|
|
1967
1967
|
$env: string;
|
|
1968
1968
|
};
|
|
1969
|
-
|
|
1969
|
+
password?: string | {
|
|
1970
1970
|
$env: string;
|
|
1971
1971
|
} | undefined;
|
|
1972
|
-
|
|
1972
|
+
user?: string | {
|
|
1973
1973
|
$env: string;
|
|
1974
1974
|
} | undefined;
|
|
1975
1975
|
database?: string | {
|
|
@@ -2072,6 +2072,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2072
2072
|
envFile: z.ZodOptional<z.ZodString>;
|
|
2073
2073
|
environment: z.ZodOptional<z.ZodEffects<z.ZodString, string | undefined, string>>;
|
|
2074
2074
|
}, "strip", z.ZodTypeAny, {
|
|
2075
|
+
password: string | {
|
|
2076
|
+
$env: string;
|
|
2077
|
+
};
|
|
2075
2078
|
system: "elasticsearch";
|
|
2076
2079
|
host: string | {
|
|
2077
2080
|
$env: string;
|
|
@@ -2082,9 +2085,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2082
2085
|
user: string | {
|
|
2083
2086
|
$env: string;
|
|
2084
2087
|
};
|
|
2085
|
-
password: string | {
|
|
2086
|
-
$env: string;
|
|
2087
|
-
};
|
|
2088
2088
|
database: string | {
|
|
2089
2089
|
$env: string;
|
|
2090
2090
|
};
|
|
@@ -2105,6 +2105,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2105
2105
|
environment?: string | undefined;
|
|
2106
2106
|
}, {
|
|
2107
2107
|
system: "elasticsearch";
|
|
2108
|
+
password?: string | {
|
|
2109
|
+
$env: string;
|
|
2110
|
+
} | undefined;
|
|
2108
2111
|
host?: string | {
|
|
2109
2112
|
$env: string;
|
|
2110
2113
|
} | undefined;
|
|
@@ -2114,9 +2117,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2114
2117
|
user?: string | {
|
|
2115
2118
|
$env: string;
|
|
2116
2119
|
} | undefined;
|
|
2117
|
-
password?: string | {
|
|
2118
|
-
$env: string;
|
|
2119
|
-
} | undefined;
|
|
2120
2120
|
database?: string | {
|
|
2121
2121
|
$env: string;
|
|
2122
2122
|
} | undefined;
|
|
@@ -2137,6 +2137,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2137
2137
|
environment?: string | undefined;
|
|
2138
2138
|
}>
|
|
2139
2139
|
]>>, Record<string, {
|
|
2140
|
+
password: string | {
|
|
2141
|
+
$env: string;
|
|
2142
|
+
};
|
|
2140
2143
|
system: "postgresql" | "mysql" | "mariadb";
|
|
2141
2144
|
host: string | {
|
|
2142
2145
|
$env: string;
|
|
@@ -2147,9 +2150,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2147
2150
|
user: string | {
|
|
2148
2151
|
$env: string;
|
|
2149
2152
|
};
|
|
2150
|
-
password: string | {
|
|
2151
|
-
$env: string;
|
|
2152
|
-
};
|
|
2153
2153
|
database: string | {
|
|
2154
2154
|
$env: string;
|
|
2155
2155
|
};
|
|
@@ -2159,6 +2159,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2159
2159
|
envFile?: string | undefined;
|
|
2160
2160
|
environment?: string | undefined;
|
|
2161
2161
|
} | {
|
|
2162
|
+
password: string | {
|
|
2163
|
+
$env: string;
|
|
2164
|
+
};
|
|
2162
2165
|
system: "mongodb";
|
|
2163
2166
|
host: string | {
|
|
2164
2167
|
$env: string;
|
|
@@ -2169,9 +2172,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2169
2172
|
user: string | {
|
|
2170
2173
|
$env: string;
|
|
2171
2174
|
};
|
|
2172
|
-
password: string | {
|
|
2173
|
-
$env: string;
|
|
2174
|
-
};
|
|
2175
2175
|
database: string | {
|
|
2176
2176
|
$env: string;
|
|
2177
2177
|
};
|
|
@@ -2192,6 +2192,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2192
2192
|
envFile?: string | undefined;
|
|
2193
2193
|
environment?: string | undefined;
|
|
2194
2194
|
} | {
|
|
2195
|
+
password: string | {
|
|
2196
|
+
$env: string;
|
|
2197
|
+
};
|
|
2195
2198
|
system: "redis";
|
|
2196
2199
|
host: string | {
|
|
2197
2200
|
$env: string;
|
|
@@ -2202,9 +2205,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2202
2205
|
user: string | {
|
|
2203
2206
|
$env: string;
|
|
2204
2207
|
};
|
|
2205
|
-
password: string | {
|
|
2206
|
-
$env: string;
|
|
2207
|
-
};
|
|
2208
2208
|
database: string | {
|
|
2209
2209
|
$env: string;
|
|
2210
2210
|
};
|
|
@@ -2214,6 +2214,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2214
2214
|
envFile?: string | undefined;
|
|
2215
2215
|
environment?: string | undefined;
|
|
2216
2216
|
} | {
|
|
2217
|
+
password: string | {
|
|
2218
|
+
$env: string;
|
|
2219
|
+
};
|
|
2217
2220
|
system: "elasticsearch";
|
|
2218
2221
|
host: string | {
|
|
2219
2222
|
$env: string;
|
|
@@ -2224,9 +2227,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2224
2227
|
user: string | {
|
|
2225
2228
|
$env: string;
|
|
2226
2229
|
};
|
|
2227
|
-
password: string | {
|
|
2228
|
-
$env: string;
|
|
2229
|
-
};
|
|
2230
2230
|
database: string | {
|
|
2231
2231
|
$env: string;
|
|
2232
2232
|
};
|
|
@@ -2269,6 +2269,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2269
2269
|
environment?: string | undefined;
|
|
2270
2270
|
} | {
|
|
2271
2271
|
system: "mongodb";
|
|
2272
|
+
password?: string | {
|
|
2273
|
+
$env: string;
|
|
2274
|
+
} | undefined;
|
|
2272
2275
|
host?: string | {
|
|
2273
2276
|
$env: string;
|
|
2274
2277
|
} | undefined;
|
|
@@ -2278,9 +2281,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2278
2281
|
user?: string | {
|
|
2279
2282
|
$env: string;
|
|
2280
2283
|
} | undefined;
|
|
2281
|
-
password?: string | {
|
|
2282
|
-
$env: string;
|
|
2283
|
-
} | undefined;
|
|
2284
2284
|
database?: string | {
|
|
2285
2285
|
$env: string;
|
|
2286
2286
|
} | undefined;
|
|
@@ -2308,10 +2308,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2308
2308
|
port: number | {
|
|
2309
2309
|
$env: string;
|
|
2310
2310
|
};
|
|
2311
|
-
|
|
2311
|
+
password?: string | {
|
|
2312
2312
|
$env: string;
|
|
2313
2313
|
} | undefined;
|
|
2314
|
-
|
|
2314
|
+
user?: string | {
|
|
2315
2315
|
$env: string;
|
|
2316
2316
|
} | undefined;
|
|
2317
2317
|
database?: string | {
|
|
@@ -2324,6 +2324,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2324
2324
|
environment?: string | undefined;
|
|
2325
2325
|
} | {
|
|
2326
2326
|
system: "elasticsearch";
|
|
2327
|
+
password?: string | {
|
|
2328
|
+
$env: string;
|
|
2329
|
+
} | undefined;
|
|
2327
2330
|
host?: string | {
|
|
2328
2331
|
$env: string;
|
|
2329
2332
|
} | undefined;
|
|
@@ -2333,9 +2336,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2333
2336
|
user?: string | {
|
|
2334
2337
|
$env: string;
|
|
2335
2338
|
} | undefined;
|
|
2336
|
-
password?: string | {
|
|
2337
|
-
$env: string;
|
|
2338
|
-
} | undefined;
|
|
2339
2339
|
database?: string | {
|
|
2340
2340
|
$env: string;
|
|
2341
2341
|
} | undefined;
|
|
@@ -2452,6 +2452,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2452
2452
|
schemaTableCount?: number | undefined;
|
|
2453
2453
|
};
|
|
2454
2454
|
connections: Record<string, {
|
|
2455
|
+
password: string | {
|
|
2456
|
+
$env: string;
|
|
2457
|
+
};
|
|
2455
2458
|
system: "postgresql" | "mysql" | "mariadb";
|
|
2456
2459
|
host: string | {
|
|
2457
2460
|
$env: string;
|
|
@@ -2462,9 +2465,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2462
2465
|
user: string | {
|
|
2463
2466
|
$env: string;
|
|
2464
2467
|
};
|
|
2465
|
-
password: string | {
|
|
2466
|
-
$env: string;
|
|
2467
|
-
};
|
|
2468
2468
|
database: string | {
|
|
2469
2469
|
$env: string;
|
|
2470
2470
|
};
|
|
@@ -2474,6 +2474,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2474
2474
|
envFile?: string | undefined;
|
|
2475
2475
|
environment?: string | undefined;
|
|
2476
2476
|
} | {
|
|
2477
|
+
password: string | {
|
|
2478
|
+
$env: string;
|
|
2479
|
+
};
|
|
2477
2480
|
system: "mongodb";
|
|
2478
2481
|
host: string | {
|
|
2479
2482
|
$env: string;
|
|
@@ -2484,9 +2487,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2484
2487
|
user: string | {
|
|
2485
2488
|
$env: string;
|
|
2486
2489
|
};
|
|
2487
|
-
password: string | {
|
|
2488
|
-
$env: string;
|
|
2489
|
-
};
|
|
2490
2490
|
database: string | {
|
|
2491
2491
|
$env: string;
|
|
2492
2492
|
};
|
|
@@ -2507,6 +2507,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2507
2507
|
envFile?: string | undefined;
|
|
2508
2508
|
environment?: string | undefined;
|
|
2509
2509
|
} | {
|
|
2510
|
+
password: string | {
|
|
2511
|
+
$env: string;
|
|
2512
|
+
};
|
|
2510
2513
|
system: "redis";
|
|
2511
2514
|
host: string | {
|
|
2512
2515
|
$env: string;
|
|
@@ -2517,9 +2520,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2517
2520
|
user: string | {
|
|
2518
2521
|
$env: string;
|
|
2519
2522
|
};
|
|
2520
|
-
password: string | {
|
|
2521
|
-
$env: string;
|
|
2522
|
-
};
|
|
2523
2523
|
database: string | {
|
|
2524
2524
|
$env: string;
|
|
2525
2525
|
};
|
|
@@ -2529,6 +2529,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2529
2529
|
envFile?: string | undefined;
|
|
2530
2530
|
environment?: string | undefined;
|
|
2531
2531
|
} | {
|
|
2532
|
+
password: string | {
|
|
2533
|
+
$env: string;
|
|
2534
|
+
};
|
|
2532
2535
|
system: "elasticsearch";
|
|
2533
2536
|
host: string | {
|
|
2534
2537
|
$env: string;
|
|
@@ -2539,9 +2542,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2539
2542
|
user: string | {
|
|
2540
2543
|
$env: string;
|
|
2541
2544
|
};
|
|
2542
|
-
password: string | {
|
|
2543
|
-
$env: string;
|
|
2544
|
-
};
|
|
2545
2545
|
database: string | {
|
|
2546
2546
|
$env: string;
|
|
2547
2547
|
};
|
|
@@ -2595,6 +2595,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2595
2595
|
environment?: string | undefined;
|
|
2596
2596
|
} | {
|
|
2597
2597
|
system: "mongodb";
|
|
2598
|
+
password?: string | {
|
|
2599
|
+
$env: string;
|
|
2600
|
+
} | undefined;
|
|
2598
2601
|
host?: string | {
|
|
2599
2602
|
$env: string;
|
|
2600
2603
|
} | undefined;
|
|
@@ -2604,9 +2607,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2604
2607
|
user?: string | {
|
|
2605
2608
|
$env: string;
|
|
2606
2609
|
} | undefined;
|
|
2607
|
-
password?: string | {
|
|
2608
|
-
$env: string;
|
|
2609
|
-
} | undefined;
|
|
2610
2610
|
database?: string | {
|
|
2611
2611
|
$env: string;
|
|
2612
2612
|
} | undefined;
|
|
@@ -2634,10 +2634,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2634
2634
|
port: number | {
|
|
2635
2635
|
$env: string;
|
|
2636
2636
|
};
|
|
2637
|
-
|
|
2637
|
+
password?: string | {
|
|
2638
2638
|
$env: string;
|
|
2639
2639
|
} | undefined;
|
|
2640
|
-
|
|
2640
|
+
user?: string | {
|
|
2641
2641
|
$env: string;
|
|
2642
2642
|
} | undefined;
|
|
2643
2643
|
database?: string | {
|
|
@@ -2650,6 +2650,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2650
2650
|
environment?: string | undefined;
|
|
2651
2651
|
} | {
|
|
2652
2652
|
system: "elasticsearch";
|
|
2653
|
+
password?: string | {
|
|
2654
|
+
$env: string;
|
|
2655
|
+
} | undefined;
|
|
2653
2656
|
host?: string | {
|
|
2654
2657
|
$env: string;
|
|
2655
2658
|
} | undefined;
|
|
@@ -2659,9 +2662,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2659
2662
|
user?: string | {
|
|
2660
2663
|
$env: string;
|
|
2661
2664
|
} | undefined;
|
|
2662
|
-
password?: string | {
|
|
2663
|
-
$env: string;
|
|
2664
|
-
} | undefined;
|
|
2665
2665
|
database?: string | {
|
|
2666
2666
|
$env: string;
|
|
2667
2667
|
} | undefined;
|
|
@@ -2728,6 +2728,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2728
2728
|
schemaTableCount?: number | undefined;
|
|
2729
2729
|
};
|
|
2730
2730
|
connections: Record<string, {
|
|
2731
|
+
password: string | {
|
|
2732
|
+
$env: string;
|
|
2733
|
+
};
|
|
2731
2734
|
system: "postgresql" | "mysql" | "mariadb";
|
|
2732
2735
|
host: string | {
|
|
2733
2736
|
$env: string;
|
|
@@ -2738,9 +2741,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2738
2741
|
user: string | {
|
|
2739
2742
|
$env: string;
|
|
2740
2743
|
};
|
|
2741
|
-
password: string | {
|
|
2742
|
-
$env: string;
|
|
2743
|
-
};
|
|
2744
2744
|
database: string | {
|
|
2745
2745
|
$env: string;
|
|
2746
2746
|
};
|
|
@@ -2750,6 +2750,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2750
2750
|
envFile?: string | undefined;
|
|
2751
2751
|
environment?: string | undefined;
|
|
2752
2752
|
} | {
|
|
2753
|
+
password: string | {
|
|
2754
|
+
$env: string;
|
|
2755
|
+
};
|
|
2753
2756
|
system: "mongodb";
|
|
2754
2757
|
host: string | {
|
|
2755
2758
|
$env: string;
|
|
@@ -2760,9 +2763,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2760
2763
|
user: string | {
|
|
2761
2764
|
$env: string;
|
|
2762
2765
|
};
|
|
2763
|
-
password: string | {
|
|
2764
|
-
$env: string;
|
|
2765
|
-
};
|
|
2766
2766
|
database: string | {
|
|
2767
2767
|
$env: string;
|
|
2768
2768
|
};
|
|
@@ -2783,6 +2783,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2783
2783
|
envFile?: string | undefined;
|
|
2784
2784
|
environment?: string | undefined;
|
|
2785
2785
|
} | {
|
|
2786
|
+
password: string | {
|
|
2787
|
+
$env: string;
|
|
2788
|
+
};
|
|
2786
2789
|
system: "redis";
|
|
2787
2790
|
host: string | {
|
|
2788
2791
|
$env: string;
|
|
@@ -2793,9 +2796,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2793
2796
|
user: string | {
|
|
2794
2797
|
$env: string;
|
|
2795
2798
|
};
|
|
2796
|
-
password: string | {
|
|
2797
|
-
$env: string;
|
|
2798
|
-
};
|
|
2799
2799
|
database: string | {
|
|
2800
2800
|
$env: string;
|
|
2801
2801
|
};
|
|
@@ -2805,6 +2805,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2805
2805
|
envFile?: string | undefined;
|
|
2806
2806
|
environment?: string | undefined;
|
|
2807
2807
|
} | {
|
|
2808
|
+
password: string | {
|
|
2809
|
+
$env: string;
|
|
2810
|
+
};
|
|
2808
2811
|
system: "elasticsearch";
|
|
2809
2812
|
host: string | {
|
|
2810
2813
|
$env: string;
|
|
@@ -2815,9 +2818,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2815
2818
|
user: string | {
|
|
2816
2819
|
$env: string;
|
|
2817
2820
|
};
|
|
2818
|
-
password: string | {
|
|
2819
|
-
$env: string;
|
|
2820
|
-
};
|
|
2821
2821
|
database: string | {
|
|
2822
2822
|
$env: string;
|
|
2823
2823
|
};
|
|
@@ -2871,6 +2871,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2871
2871
|
environment?: string | undefined;
|
|
2872
2872
|
} | {
|
|
2873
2873
|
system: "mongodb";
|
|
2874
|
+
password?: string | {
|
|
2875
|
+
$env: string;
|
|
2876
|
+
} | undefined;
|
|
2874
2877
|
host?: string | {
|
|
2875
2878
|
$env: string;
|
|
2876
2879
|
} | undefined;
|
|
@@ -2880,9 +2883,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2880
2883
|
user?: string | {
|
|
2881
2884
|
$env: string;
|
|
2882
2885
|
} | undefined;
|
|
2883
|
-
password?: string | {
|
|
2884
|
-
$env: string;
|
|
2885
|
-
} | undefined;
|
|
2886
2886
|
database?: string | {
|
|
2887
2887
|
$env: string;
|
|
2888
2888
|
} | undefined;
|
|
@@ -2910,10 +2910,10 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2910
2910
|
port: number | {
|
|
2911
2911
|
$env: string;
|
|
2912
2912
|
};
|
|
2913
|
-
|
|
2913
|
+
password?: string | {
|
|
2914
2914
|
$env: string;
|
|
2915
2915
|
} | undefined;
|
|
2916
|
-
|
|
2916
|
+
user?: string | {
|
|
2917
2917
|
$env: string;
|
|
2918
2918
|
} | undefined;
|
|
2919
2919
|
database?: string | {
|
|
@@ -2926,6 +2926,9 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2926
2926
|
environment?: string | undefined;
|
|
2927
2927
|
} | {
|
|
2928
2928
|
system: "elasticsearch";
|
|
2929
|
+
password?: string | {
|
|
2930
|
+
$env: string;
|
|
2931
|
+
} | undefined;
|
|
2929
2932
|
host?: string | {
|
|
2930
2933
|
$env: string;
|
|
2931
2934
|
} | undefined;
|
|
@@ -2935,9 +2938,6 @@ declare const DbcliConfigV2Schema: z.ZodEffects<z.ZodObject<{
|
|
|
2935
2938
|
user?: string | {
|
|
2936
2939
|
$env: string;
|
|
2937
2940
|
} | undefined;
|
|
2938
|
-
password?: string | {
|
|
2939
|
-
$env: string;
|
|
2940
|
-
} | undefined;
|
|
2941
2941
|
database?: string | {
|
|
2942
2942
|
$env: string;
|
|
2943
2943
|
} | undefined;
|
|
@@ -3372,8 +3372,6 @@ export type SqlSystem = "postgresql" | "mysql" | "mariadb";
|
|
|
3372
3372
|
* 且 loadEnvFile 不覆寫既有 key——若兩連線都用 DB_PASSWORD 會撞名取到對方的值。
|
|
3373
3373
|
*/
|
|
3374
3374
|
export declare function envVarNameFor(connName: string, field: "password"): string;
|
|
3375
|
-
/** 把 secret 寫進該連線的 envFile(KEY=VALUE);既有同名 key 就地覆寫,否則追加。 */
|
|
3376
|
-
export declare function writeConnectionSecret(projectPath: string, connName: string, field: "password", value: string): Promise<void>;
|
|
3377
3375
|
export interface ConnectionInput {
|
|
3378
3376
|
name: string;
|
|
3379
3377
|
system: SqlSystem;
|
|
@@ -3395,6 +3393,30 @@ export declare function migrateV1ToV2(v1: DbcliConfig$1): DbcliConfigV2;
|
|
|
3395
3393
|
/** 新增或就地覆寫同名連線(immutable)。非機密欄存字面值,password 存 {$env} 參照 +
|
|
3396
3394
|
* per-connection envFile。編輯時保留既有 permission;新建預設 'query-only'。 */
|
|
3397
3395
|
export declare function upsertConnection(config: DbcliConfigV2, input: ConnectionInput): DbcliConfigV2;
|
|
3396
|
+
/**
|
|
3397
|
+
* 單一連線的密碼輪替:只動該連線的密碼,其餘設定原封不動。
|
|
3398
|
+
*
|
|
3399
|
+
* 密碼實際落在哪裡由 config 決定,不是靠命名規則猜的——
|
|
3400
|
+
* 連線若已用 `{ $env: NAME }`,就改寫 NAME 這個 key;若還是明文,
|
|
3401
|
+
* 先把 config 轉成 env 參照再寫檔,之後的輪替就不必再碰 config.json。
|
|
3402
|
+
*/
|
|
3403
|
+
export interface PasswordTarget {
|
|
3404
|
+
/** 被更新的連線名稱 */
|
|
3405
|
+
connection: string;
|
|
3406
|
+
/** 密碼寫入的 env 檔(相對於 config storage 目錄) */
|
|
3407
|
+
envFile: string;
|
|
3408
|
+
/** 寫入的環境變數名稱 */
|
|
3409
|
+
varName: string;
|
|
3410
|
+
/** 這次是否需要把 config 裡的明文密碼轉成 $env 參照 */
|
|
3411
|
+
convertedToEnvRef: boolean;
|
|
3412
|
+
}
|
|
3413
|
+
/**
|
|
3414
|
+
* 查出「這條連線的密碼該寫到哪個 env 檔的哪個 key」,不寫入任何檔案。
|
|
3415
|
+
*
|
|
3416
|
+
* 驗證新密碼時得先知道 key 名稱才能注入,所以查詢與寫入分開。
|
|
3417
|
+
*/
|
|
3418
|
+
export declare function resolvePasswordTarget(projectPath: string, connectionName?: string): Promise<PasswordTarget>;
|
|
3419
|
+
export declare function setConnectionPassword(projectPath: string, connectionName: string | undefined, password: string): Promise<PasswordTarget>;
|
|
3398
3420
|
/**
|
|
3399
3421
|
* Resolve the per-user dbcli root lazily so embedders and tests can provide an
|
|
3400
3422
|
* isolated config home without reloading the module. `DBCLI_CONFIG_HOME` is a
|