@enspirit/emb 0.23.0 → 0.24.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/README.md +42 -42
- package/dist/src/cli/abstract/KubernetesCommand.d.ts +5 -1
- package/dist/src/cli/abstract/KubernetesCommand.js +11 -2
- package/dist/src/cli/commands/kubernetes/logs.js +7 -12
- package/dist/src/cli/commands/kubernetes/ps.js +2 -1
- package/dist/src/cli/commands/kubernetes/restart.js +2 -1
- package/dist/src/cli/commands/kubernetes/shell.js +7 -10
- package/dist/src/config/schema.d.ts +33 -1
- package/dist/src/config/schema.json +42 -1
- package/dist/src/docker/compose/client.js +2 -2
- package/dist/src/docker/compose/operations/ComposeLogsArchiveOperation.d.ts +1 -1
- package/dist/src/kubernetes/index.d.ts +1 -0
- package/dist/src/kubernetes/index.js +1 -0
- package/dist/src/kubernetes/operations/GetComponentPodOperation.d.ts +17 -0
- package/dist/src/kubernetes/operations/GetComponentPodOperation.js +77 -0
- package/dist/src/kubernetes/operations/GetDeploymentPodsOperation.js +3 -2
- package/dist/src/kubernetes/operations/PodExecOperation.d.ts +20 -0
- package/dist/src/kubernetes/operations/PodExecOperation.js +158 -0
- package/dist/src/kubernetes/operations/index.d.ts +3 -0
- package/dist/src/kubernetes/operations/index.js +3 -0
- package/dist/src/kubernetes/utils/index.d.ts +1 -0
- package/dist/src/kubernetes/utils/index.js +1 -0
- package/dist/src/kubernetes/utils/resolveNamespace.d.ts +13 -0
- package/dist/src/kubernetes/utils/resolveNamespace.js +12 -0
- package/dist/src/monorepo/operations/tasks/RunTasksOperation.d.ts +2 -0
- package/dist/src/monorepo/operations/tasks/RunTasksOperation.js +43 -3
- package/oclif.manifest.json +142 -145
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -928,20 +928,30 @@
|
|
|
928
928
|
"push.js"
|
|
929
929
|
]
|
|
930
930
|
},
|
|
931
|
-
"
|
|
931
|
+
"logs:archive": {
|
|
932
932
|
"aliases": [],
|
|
933
933
|
"args": {
|
|
934
|
-
"
|
|
935
|
-
"description": "The
|
|
936
|
-
"name": "
|
|
937
|
-
"required":
|
|
934
|
+
"service": {
|
|
935
|
+
"description": "The service(s) to archive logs for (all if omitted)",
|
|
936
|
+
"name": "service",
|
|
937
|
+
"required": false
|
|
938
938
|
}
|
|
939
939
|
},
|
|
940
|
-
"description": "
|
|
940
|
+
"description": "Archive docker compose logs to files (one file per service).",
|
|
941
941
|
"examples": [
|
|
942
|
-
"<%= config.bin %> <%= command.id %>"
|
|
942
|
+
"<%= config.bin %> <%= command.id %>",
|
|
943
|
+
"<%= config.bin %> <%= command.id %> backend frontend",
|
|
944
|
+
"<%= config.bin %> <%= command.id %> --timestamps",
|
|
945
|
+
"<%= config.bin %> <%= command.id %> --tail 1000"
|
|
943
946
|
],
|
|
944
947
|
"flags": {
|
|
948
|
+
"json": {
|
|
949
|
+
"description": "Format output as json.",
|
|
950
|
+
"helpGroup": "GLOBAL",
|
|
951
|
+
"name": "json",
|
|
952
|
+
"allowNo": false,
|
|
953
|
+
"type": "boolean"
|
|
954
|
+
},
|
|
945
955
|
"verbose": {
|
|
946
956
|
"name": "verbose",
|
|
947
957
|
"allowNo": true,
|
|
@@ -956,51 +966,62 @@
|
|
|
956
966
|
"multiple": false,
|
|
957
967
|
"type": "option"
|
|
958
968
|
},
|
|
959
|
-
"
|
|
960
|
-
"
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
"
|
|
964
|
-
"
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
"
|
|
969
|
+
"timestamps": {
|
|
970
|
+
"char": "t",
|
|
971
|
+
"description": "Include timestamps in logs",
|
|
972
|
+
"name": "timestamps",
|
|
973
|
+
"allowNo": false,
|
|
974
|
+
"type": "boolean"
|
|
975
|
+
},
|
|
976
|
+
"tail": {
|
|
977
|
+
"description": "Number of lines to show from the end of the logs",
|
|
978
|
+
"name": "tail",
|
|
968
979
|
"hasDynamicHelp": false,
|
|
969
980
|
"multiple": false,
|
|
970
981
|
"type": "option"
|
|
971
982
|
},
|
|
972
|
-
"
|
|
973
|
-
"char": "
|
|
974
|
-
"description": "
|
|
975
|
-
"name": "
|
|
976
|
-
"
|
|
977
|
-
"
|
|
983
|
+
"output": {
|
|
984
|
+
"char": "o",
|
|
985
|
+
"description": "Output directory for log files (defaults to .emb/<flavor>/logs/docker/compose)",
|
|
986
|
+
"name": "output",
|
|
987
|
+
"hasDynamicHelp": false,
|
|
988
|
+
"multiple": false,
|
|
989
|
+
"type": "option"
|
|
978
990
|
}
|
|
979
991
|
},
|
|
980
992
|
"hasDynamicHelp": false,
|
|
981
993
|
"hiddenAliases": [],
|
|
982
|
-
"id": "
|
|
994
|
+
"id": "logs:archive",
|
|
983
995
|
"pluginAlias": "@enspirit/emb",
|
|
984
996
|
"pluginName": "@enspirit/emb",
|
|
985
997
|
"pluginType": "core",
|
|
986
|
-
"strict":
|
|
987
|
-
"enableJsonFlag":
|
|
998
|
+
"strict": false,
|
|
999
|
+
"enableJsonFlag": true,
|
|
988
1000
|
"isESM": true,
|
|
989
1001
|
"relativePath": [
|
|
990
1002
|
"dist",
|
|
991
1003
|
"src",
|
|
992
1004
|
"cli",
|
|
993
1005
|
"commands",
|
|
994
|
-
"
|
|
995
|
-
"
|
|
1006
|
+
"logs",
|
|
1007
|
+
"archive.js"
|
|
996
1008
|
]
|
|
997
1009
|
},
|
|
998
|
-
"
|
|
1010
|
+
"logs": {
|
|
999
1011
|
"aliases": [],
|
|
1000
|
-
"args": {
|
|
1001
|
-
|
|
1012
|
+
"args": {
|
|
1013
|
+
"service": {
|
|
1014
|
+
"description": "The service(s) you want to see the logs of (all if omitted)",
|
|
1015
|
+
"name": "service",
|
|
1016
|
+
"required": false
|
|
1017
|
+
}
|
|
1018
|
+
},
|
|
1019
|
+
"description": "Get service logs.",
|
|
1002
1020
|
"examples": [
|
|
1003
|
-
"<%= config.bin %> <%= command.id %>"
|
|
1021
|
+
"<%= config.bin %> <%= command.id %>",
|
|
1022
|
+
"<%= config.bin %> <%= command.id %> backend",
|
|
1023
|
+
"<%= config.bin %> <%= command.id %> backend frontend",
|
|
1024
|
+
"<%= config.bin %> <%= command.id %> --no-follow backend"
|
|
1004
1025
|
],
|
|
1005
1026
|
"flags": {
|
|
1006
1027
|
"verbose": {
|
|
@@ -1017,28 +1038,17 @@
|
|
|
1017
1038
|
"multiple": false,
|
|
1018
1039
|
"type": "option"
|
|
1019
1040
|
},
|
|
1020
|
-
"
|
|
1021
|
-
"
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
"char": "n",
|
|
1025
|
-
"description": "The Kubernetes namespace to target",
|
|
1026
|
-
"env": "K8S_NAMESPACE",
|
|
1027
|
-
"name": "namespace",
|
|
1028
|
-
"required": true,
|
|
1029
|
-
"hasDynamicHelp": false,
|
|
1030
|
-
"multiple": false,
|
|
1031
|
-
"type": "option"
|
|
1032
|
-
},
|
|
1033
|
-
"watch": {
|
|
1034
|
-
"name": "watch",
|
|
1041
|
+
"follow": {
|
|
1042
|
+
"char": "f",
|
|
1043
|
+
"description": "Follow log output",
|
|
1044
|
+
"name": "follow",
|
|
1035
1045
|
"allowNo": true,
|
|
1036
1046
|
"type": "boolean"
|
|
1037
1047
|
}
|
|
1038
1048
|
},
|
|
1039
1049
|
"hasDynamicHelp": false,
|
|
1040
1050
|
"hiddenAliases": [],
|
|
1041
|
-
"id": "
|
|
1051
|
+
"id": "logs",
|
|
1042
1052
|
"pluginAlias": "@enspirit/emb",
|
|
1043
1053
|
"pluginName": "@enspirit/emb",
|
|
1044
1054
|
"pluginType": "core",
|
|
@@ -1050,19 +1060,20 @@
|
|
|
1050
1060
|
"src",
|
|
1051
1061
|
"cli",
|
|
1052
1062
|
"commands",
|
|
1053
|
-
"
|
|
1054
|
-
"
|
|
1063
|
+
"logs",
|
|
1064
|
+
"index.js"
|
|
1055
1065
|
]
|
|
1056
1066
|
},
|
|
1057
|
-
"kubernetes:
|
|
1067
|
+
"kubernetes:logs": {
|
|
1058
1068
|
"aliases": [],
|
|
1059
1069
|
"args": {
|
|
1060
|
-
"
|
|
1061
|
-
"description": "The
|
|
1062
|
-
"name": "
|
|
1070
|
+
"component": {
|
|
1071
|
+
"description": "The component you want to see the logs of",
|
|
1072
|
+
"name": "component",
|
|
1073
|
+
"required": true
|
|
1063
1074
|
}
|
|
1064
1075
|
},
|
|
1065
|
-
"description": "
|
|
1076
|
+
"description": "Follow kubernetes logs.",
|
|
1066
1077
|
"examples": [
|
|
1067
1078
|
"<%= config.bin %> <%= command.id %>"
|
|
1068
1079
|
],
|
|
@@ -1087,21 +1098,27 @@
|
|
|
1087
1098
|
],
|
|
1088
1099
|
"char": "n",
|
|
1089
1100
|
"description": "The Kubernetes namespace to target",
|
|
1090
|
-
"env": "K8S_NAMESPACE",
|
|
1091
1101
|
"name": "namespace",
|
|
1092
|
-
"required":
|
|
1102
|
+
"required": false,
|
|
1093
1103
|
"hasDynamicHelp": false,
|
|
1094
1104
|
"multiple": false,
|
|
1095
1105
|
"type": "option"
|
|
1106
|
+
},
|
|
1107
|
+
"follow": {
|
|
1108
|
+
"char": "f",
|
|
1109
|
+
"description": "Follow log output",
|
|
1110
|
+
"name": "follow",
|
|
1111
|
+
"allowNo": true,
|
|
1112
|
+
"type": "boolean"
|
|
1096
1113
|
}
|
|
1097
1114
|
},
|
|
1098
1115
|
"hasDynamicHelp": false,
|
|
1099
1116
|
"hiddenAliases": [],
|
|
1100
|
-
"id": "kubernetes:
|
|
1117
|
+
"id": "kubernetes:logs",
|
|
1101
1118
|
"pluginAlias": "@enspirit/emb",
|
|
1102
1119
|
"pluginName": "@enspirit/emb",
|
|
1103
1120
|
"pluginType": "core",
|
|
1104
|
-
"strict":
|
|
1121
|
+
"strict": true,
|
|
1105
1122
|
"enableJsonFlag": false,
|
|
1106
1123
|
"isESM": true,
|
|
1107
1124
|
"relativePath": [
|
|
@@ -1110,21 +1127,13 @@
|
|
|
1110
1127
|
"cli",
|
|
1111
1128
|
"commands",
|
|
1112
1129
|
"kubernetes",
|
|
1113
|
-
"
|
|
1130
|
+
"logs.js"
|
|
1114
1131
|
]
|
|
1115
1132
|
},
|
|
1116
|
-
"kubernetes:
|
|
1117
|
-
"aliases": [
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
"args": {
|
|
1121
|
-
"component": {
|
|
1122
|
-
"description": "The component you want to get a shell on",
|
|
1123
|
-
"name": "component",
|
|
1124
|
-
"required": true
|
|
1125
|
-
}
|
|
1126
|
-
},
|
|
1127
|
-
"description": "Get a shell on a deployed component.",
|
|
1133
|
+
"kubernetes:ps": {
|
|
1134
|
+
"aliases": [],
|
|
1135
|
+
"args": {},
|
|
1136
|
+
"description": "Show running pods.",
|
|
1128
1137
|
"examples": [
|
|
1129
1138
|
"<%= config.bin %> <%= command.id %>"
|
|
1130
1139
|
],
|
|
@@ -1149,30 +1158,25 @@
|
|
|
1149
1158
|
],
|
|
1150
1159
|
"char": "n",
|
|
1151
1160
|
"description": "The Kubernetes namespace to target",
|
|
1152
|
-
"env": "K8S_NAMESPACE",
|
|
1153
1161
|
"name": "namespace",
|
|
1154
|
-
"required":
|
|
1162
|
+
"required": false,
|
|
1155
1163
|
"hasDynamicHelp": false,
|
|
1156
1164
|
"multiple": false,
|
|
1157
1165
|
"type": "option"
|
|
1158
1166
|
},
|
|
1159
|
-
"
|
|
1160
|
-
"
|
|
1161
|
-
"
|
|
1162
|
-
"
|
|
1163
|
-
"default": "bash",
|
|
1164
|
-
"hasDynamicHelp": false,
|
|
1165
|
-
"multiple": false,
|
|
1166
|
-
"type": "option"
|
|
1167
|
+
"watch": {
|
|
1168
|
+
"name": "watch",
|
|
1169
|
+
"allowNo": true,
|
|
1170
|
+
"type": "boolean"
|
|
1167
1171
|
}
|
|
1168
1172
|
},
|
|
1169
1173
|
"hasDynamicHelp": false,
|
|
1170
1174
|
"hiddenAliases": [],
|
|
1171
|
-
"id": "kubernetes:
|
|
1175
|
+
"id": "kubernetes:ps",
|
|
1172
1176
|
"pluginAlias": "@enspirit/emb",
|
|
1173
1177
|
"pluginName": "@enspirit/emb",
|
|
1174
1178
|
"pluginType": "core",
|
|
1175
|
-
"strict":
|
|
1179
|
+
"strict": false,
|
|
1176
1180
|
"enableJsonFlag": false,
|
|
1177
1181
|
"isESM": true,
|
|
1178
1182
|
"relativePath": [
|
|
@@ -1181,33 +1185,22 @@
|
|
|
1181
1185
|
"cli",
|
|
1182
1186
|
"commands",
|
|
1183
1187
|
"kubernetes",
|
|
1184
|
-
"
|
|
1188
|
+
"ps.js"
|
|
1185
1189
|
]
|
|
1186
1190
|
},
|
|
1187
|
-
"
|
|
1191
|
+
"kubernetes:restart": {
|
|
1188
1192
|
"aliases": [],
|
|
1189
1193
|
"args": {
|
|
1190
|
-
"
|
|
1191
|
-
"description": "The
|
|
1192
|
-
"name": "
|
|
1193
|
-
"required": false
|
|
1194
|
+
"deployment": {
|
|
1195
|
+
"description": "The deployment(s) to restart",
|
|
1196
|
+
"name": "deployment"
|
|
1194
1197
|
}
|
|
1195
1198
|
},
|
|
1196
|
-
"description": "
|
|
1199
|
+
"description": "Restart pods of an instance.",
|
|
1197
1200
|
"examples": [
|
|
1198
|
-
"<%= config.bin %> <%= command.id %>"
|
|
1199
|
-
"<%= config.bin %> <%= command.id %> backend frontend",
|
|
1200
|
-
"<%= config.bin %> <%= command.id %> --timestamps",
|
|
1201
|
-
"<%= config.bin %> <%= command.id %> --tail 1000"
|
|
1201
|
+
"<%= config.bin %> <%= command.id %>"
|
|
1202
1202
|
],
|
|
1203
1203
|
"flags": {
|
|
1204
|
-
"json": {
|
|
1205
|
-
"description": "Format output as json.",
|
|
1206
|
-
"helpGroup": "GLOBAL",
|
|
1207
|
-
"name": "json",
|
|
1208
|
-
"allowNo": false,
|
|
1209
|
-
"type": "boolean"
|
|
1210
|
-
},
|
|
1211
1204
|
"verbose": {
|
|
1212
1205
|
"name": "verbose",
|
|
1213
1206
|
"allowNo": true,
|
|
@@ -1222,24 +1215,14 @@
|
|
|
1222
1215
|
"multiple": false,
|
|
1223
1216
|
"type": "option"
|
|
1224
1217
|
},
|
|
1225
|
-
"
|
|
1226
|
-
"
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
"
|
|
1230
|
-
"
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
"description": "Number of lines to show from the end of the logs",
|
|
1234
|
-
"name": "tail",
|
|
1235
|
-
"hasDynamicHelp": false,
|
|
1236
|
-
"multiple": false,
|
|
1237
|
-
"type": "option"
|
|
1238
|
-
},
|
|
1239
|
-
"output": {
|
|
1240
|
-
"char": "o",
|
|
1241
|
-
"description": "Output directory for log files (defaults to .emb/<flavor>/logs/docker/compose)",
|
|
1242
|
-
"name": "output",
|
|
1218
|
+
"namespace": {
|
|
1219
|
+
"aliases": [
|
|
1220
|
+
"ns"
|
|
1221
|
+
],
|
|
1222
|
+
"char": "n",
|
|
1223
|
+
"description": "The Kubernetes namespace to target",
|
|
1224
|
+
"name": "namespace",
|
|
1225
|
+
"required": false,
|
|
1243
1226
|
"hasDynamicHelp": false,
|
|
1244
1227
|
"multiple": false,
|
|
1245
1228
|
"type": "option"
|
|
@@ -1247,37 +1230,36 @@
|
|
|
1247
1230
|
},
|
|
1248
1231
|
"hasDynamicHelp": false,
|
|
1249
1232
|
"hiddenAliases": [],
|
|
1250
|
-
"id": "
|
|
1233
|
+
"id": "kubernetes:restart",
|
|
1251
1234
|
"pluginAlias": "@enspirit/emb",
|
|
1252
1235
|
"pluginName": "@enspirit/emb",
|
|
1253
1236
|
"pluginType": "core",
|
|
1254
1237
|
"strict": false,
|
|
1255
|
-
"enableJsonFlag":
|
|
1238
|
+
"enableJsonFlag": false,
|
|
1256
1239
|
"isESM": true,
|
|
1257
1240
|
"relativePath": [
|
|
1258
1241
|
"dist",
|
|
1259
1242
|
"src",
|
|
1260
1243
|
"cli",
|
|
1261
1244
|
"commands",
|
|
1262
|
-
"
|
|
1263
|
-
"
|
|
1245
|
+
"kubernetes",
|
|
1246
|
+
"restart.js"
|
|
1264
1247
|
]
|
|
1265
1248
|
},
|
|
1266
|
-
"
|
|
1267
|
-
"aliases": [
|
|
1249
|
+
"kubernetes:shell": {
|
|
1250
|
+
"aliases": [
|
|
1251
|
+
"shell"
|
|
1252
|
+
],
|
|
1268
1253
|
"args": {
|
|
1269
|
-
"
|
|
1270
|
-
"description": "The
|
|
1271
|
-
"name": "
|
|
1272
|
-
"required":
|
|
1254
|
+
"component": {
|
|
1255
|
+
"description": "The component you want to get a shell on",
|
|
1256
|
+
"name": "component",
|
|
1257
|
+
"required": true
|
|
1273
1258
|
}
|
|
1274
1259
|
},
|
|
1275
|
-
"description": "Get
|
|
1260
|
+
"description": "Get a shell on a deployed component.",
|
|
1276
1261
|
"examples": [
|
|
1277
|
-
"<%= config.bin %> <%= command.id %>"
|
|
1278
|
-
"<%= config.bin %> <%= command.id %> backend",
|
|
1279
|
-
"<%= config.bin %> <%= command.id %> backend frontend",
|
|
1280
|
-
"<%= config.bin %> <%= command.id %> --no-follow backend"
|
|
1262
|
+
"<%= config.bin %> <%= command.id %>"
|
|
1281
1263
|
],
|
|
1282
1264
|
"flags": {
|
|
1283
1265
|
"verbose": {
|
|
@@ -1294,21 +1276,35 @@
|
|
|
1294
1276
|
"multiple": false,
|
|
1295
1277
|
"type": "option"
|
|
1296
1278
|
},
|
|
1297
|
-
"
|
|
1298
|
-
"
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
"
|
|
1302
|
-
"
|
|
1279
|
+
"namespace": {
|
|
1280
|
+
"aliases": [
|
|
1281
|
+
"ns"
|
|
1282
|
+
],
|
|
1283
|
+
"char": "n",
|
|
1284
|
+
"description": "The Kubernetes namespace to target",
|
|
1285
|
+
"name": "namespace",
|
|
1286
|
+
"required": false,
|
|
1287
|
+
"hasDynamicHelp": false,
|
|
1288
|
+
"multiple": false,
|
|
1289
|
+
"type": "option"
|
|
1290
|
+
},
|
|
1291
|
+
"shell": {
|
|
1292
|
+
"char": "s",
|
|
1293
|
+
"description": "The shell to run",
|
|
1294
|
+
"name": "shell",
|
|
1295
|
+
"default": "bash",
|
|
1296
|
+
"hasDynamicHelp": false,
|
|
1297
|
+
"multiple": false,
|
|
1298
|
+
"type": "option"
|
|
1303
1299
|
}
|
|
1304
1300
|
},
|
|
1305
1301
|
"hasDynamicHelp": false,
|
|
1306
1302
|
"hiddenAliases": [],
|
|
1307
|
-
"id": "
|
|
1303
|
+
"id": "kubernetes:shell",
|
|
1308
1304
|
"pluginAlias": "@enspirit/emb",
|
|
1309
1305
|
"pluginName": "@enspirit/emb",
|
|
1310
1306
|
"pluginType": "core",
|
|
1311
|
-
"strict":
|
|
1307
|
+
"strict": true,
|
|
1312
1308
|
"enableJsonFlag": false,
|
|
1313
1309
|
"isESM": true,
|
|
1314
1310
|
"relativePath": [
|
|
@@ -1316,8 +1312,8 @@
|
|
|
1316
1312
|
"src",
|
|
1317
1313
|
"cli",
|
|
1318
1314
|
"commands",
|
|
1319
|
-
"
|
|
1320
|
-
"
|
|
1315
|
+
"kubernetes",
|
|
1316
|
+
"shell.js"
|
|
1321
1317
|
]
|
|
1322
1318
|
},
|
|
1323
1319
|
"secrets": {
|
|
@@ -1723,6 +1719,7 @@
|
|
|
1723
1719
|
"multiple": false,
|
|
1724
1720
|
"options": [
|
|
1725
1721
|
"container",
|
|
1722
|
+
"kubernetes",
|
|
1726
1723
|
"local"
|
|
1727
1724
|
],
|
|
1728
1725
|
"type": "option"
|
|
@@ -1754,5 +1751,5 @@
|
|
|
1754
1751
|
]
|
|
1755
1752
|
}
|
|
1756
1753
|
},
|
|
1757
|
-
"version": "0.
|
|
1754
|
+
"version": "0.24.0"
|
|
1758
1755
|
}
|