@procedures/docker 0.33.0 → 0.34.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/CHANGELOG.md +26 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +51 -51
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
- package/src/module.ts +51 -51
package/src/module.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
import { createProcedure,
|
|
14
|
+
import { createProcedure, defineModule, type FsRootRules, type ProcedureModule, PROCEDURE_REGISTRY, registerModules, type ProcedureRegistry } from "@procedures/client";
|
|
15
15
|
import shellModule from "@procedures/shell/module";
|
|
16
16
|
import {
|
|
17
17
|
dockerRun,
|
|
@@ -166,8 +166,8 @@ const COMPOSE_UNDER_A_ROOT: FsRootRules = {
|
|
|
166
166
|
|
|
167
167
|
const dockerRunProcedure = createProcedure()
|
|
168
168
|
.path(["docker", "run"])
|
|
169
|
-
.input(
|
|
170
|
-
.output(
|
|
169
|
+
.input(DockerRunInputSchema)
|
|
170
|
+
.output(DockerCommandOutputSchema)
|
|
171
171
|
.meta({
|
|
172
172
|
description: "Run a Docker container",
|
|
173
173
|
calls: ["shell.run"],
|
|
@@ -186,8 +186,8 @@ const dockerRunProcedure = createProcedure()
|
|
|
186
186
|
|
|
187
187
|
const dockerBuildProcedure = createProcedure()
|
|
188
188
|
.path(["docker", "build"])
|
|
189
|
-
.input(
|
|
190
|
-
.output(
|
|
189
|
+
.input(DockerBuildInputSchema)
|
|
190
|
+
.output(DockerCommandOutputSchema)
|
|
191
191
|
.meta({
|
|
192
192
|
description: "Build a Docker image",
|
|
193
193
|
calls: ["shell.run"],
|
|
@@ -206,8 +206,8 @@ const dockerBuildProcedure = createProcedure()
|
|
|
206
206
|
|
|
207
207
|
const dockerPullProcedure = createProcedure()
|
|
208
208
|
.path(["docker", "pull"])
|
|
209
|
-
.input(
|
|
210
|
-
.output(
|
|
209
|
+
.input(DockerPullInputSchema)
|
|
210
|
+
.output(DockerCommandOutputSchema)
|
|
211
211
|
.meta({
|
|
212
212
|
description: "Pull a Docker image",
|
|
213
213
|
calls: ["shell.run"],
|
|
@@ -223,8 +223,8 @@ const dockerPullProcedure = createProcedure()
|
|
|
223
223
|
|
|
224
224
|
const dockerExecProcedure = createProcedure()
|
|
225
225
|
.path(["docker", "exec"])
|
|
226
|
-
.input(
|
|
227
|
-
.output(
|
|
226
|
+
.input(DockerExecInputSchema)
|
|
227
|
+
.output(DockerCommandOutputSchema)
|
|
228
228
|
.meta({
|
|
229
229
|
description: "Execute command in a running container",
|
|
230
230
|
calls: ["shell.run"],
|
|
@@ -242,8 +242,8 @@ const dockerExecProcedure = createProcedure()
|
|
|
242
242
|
|
|
243
243
|
const dockerStopProcedure = createProcedure()
|
|
244
244
|
.path(["docker", "stop"])
|
|
245
|
-
.input(
|
|
246
|
-
.output(
|
|
245
|
+
.input(DockerStopInputSchema)
|
|
246
|
+
.output(DockerCommandOutputSchema)
|
|
247
247
|
.meta({
|
|
248
248
|
description: "Stop running container(s)",
|
|
249
249
|
calls: ["shell.run"],
|
|
@@ -261,8 +261,8 @@ const dockerStopProcedure = createProcedure()
|
|
|
261
261
|
|
|
262
262
|
const dockerRmProcedure = createProcedure()
|
|
263
263
|
.path(["docker", "rm"])
|
|
264
|
-
.input(
|
|
265
|
-
.output(
|
|
264
|
+
.input(DockerRmInputSchema)
|
|
265
|
+
.output(DockerCommandOutputSchema)
|
|
266
266
|
.meta({
|
|
267
267
|
description: "Remove container(s)",
|
|
268
268
|
calls: ["shell.run"],
|
|
@@ -279,8 +279,8 @@ const dockerRmProcedure = createProcedure()
|
|
|
279
279
|
|
|
280
280
|
const dockerPsProcedure = createProcedure()
|
|
281
281
|
.path(["docker", "ps"])
|
|
282
|
-
.input(
|
|
283
|
-
.output(
|
|
282
|
+
.input(DockerPsInputSchema)
|
|
283
|
+
.output(DockerCommandOutputSchema)
|
|
284
284
|
.meta({
|
|
285
285
|
description: "List containers",
|
|
286
286
|
calls: ["shell.run"],
|
|
@@ -296,9 +296,9 @@ const dockerPsProcedure = createProcedure()
|
|
|
296
296
|
|
|
297
297
|
const dockerLogsProcedure = createProcedure()
|
|
298
298
|
.path(["docker", "logs"])
|
|
299
|
-
.input(
|
|
299
|
+
.input(DockerLogsInputSchema)
|
|
300
300
|
// One value, or with follow one item for each log line (a stream)
|
|
301
|
-
.output(
|
|
301
|
+
.output(DockerLogsOutputSchema)
|
|
302
302
|
.meta({
|
|
303
303
|
description: "Get container logs",
|
|
304
304
|
calls: ["shell.run", "shell.stream"],
|
|
@@ -319,8 +319,8 @@ const dockerLogsProcedure = createProcedure()
|
|
|
319
319
|
|
|
320
320
|
const dockerComposeUpProcedure = createProcedure()
|
|
321
321
|
.path(["docker", "compose", "up"])
|
|
322
|
-
.input(
|
|
323
|
-
.output(
|
|
322
|
+
.input(DockerComposeUpInputSchema)
|
|
323
|
+
.output(DockerCommandOutputSchema)
|
|
324
324
|
.meta({
|
|
325
325
|
description: "Start services with docker compose",
|
|
326
326
|
calls: ["shell.run"],
|
|
@@ -338,8 +338,8 @@ const dockerComposeUpProcedure = createProcedure()
|
|
|
338
338
|
|
|
339
339
|
const dockerComposeDownProcedure = createProcedure()
|
|
340
340
|
.path(["docker", "compose", "down"])
|
|
341
|
-
.input(
|
|
342
|
-
.output(
|
|
341
|
+
.input(DockerComposeDownInputSchema)
|
|
342
|
+
.output(DockerCommandOutputSchema)
|
|
343
343
|
.meta({
|
|
344
344
|
description: "Stop services with docker compose",
|
|
345
345
|
calls: ["shell.run"],
|
|
@@ -361,8 +361,8 @@ const dockerComposeDownProcedure = createProcedure()
|
|
|
361
361
|
|
|
362
362
|
const dockerComposePsProcedure = createProcedure()
|
|
363
363
|
.path(["docker", "compose", "ps"])
|
|
364
|
-
.input(
|
|
365
|
-
.output(
|
|
364
|
+
.input(DockerComposePsInputSchema)
|
|
365
|
+
.output(DockerComposePsOutputSchema)
|
|
366
366
|
.meta({
|
|
367
367
|
description: "List the containers of a compose project",
|
|
368
368
|
calls: ["shell.run"],
|
|
@@ -378,8 +378,8 @@ const dockerComposePsProcedure = createProcedure()
|
|
|
378
378
|
|
|
379
379
|
const dockerComposeLogsProcedure = createProcedure()
|
|
380
380
|
.path(["docker", "compose", "logs"])
|
|
381
|
-
.input(
|
|
382
|
-
.output(
|
|
381
|
+
.input(DockerComposeLogsInputSchema)
|
|
382
|
+
.output(DockerComposeLogsOutputSchema)
|
|
383
383
|
.meta({
|
|
384
384
|
description: "Get the logs of the services of a compose project (without follow)",
|
|
385
385
|
calls: ["shell.run"],
|
|
@@ -394,8 +394,8 @@ const dockerComposeLogsProcedure = createProcedure()
|
|
|
394
394
|
|
|
395
395
|
const dockerComposeBuildProcedure = createProcedure()
|
|
396
396
|
.path(["docker", "compose", "build"])
|
|
397
|
-
.input(
|
|
398
|
-
.output(
|
|
397
|
+
.input(DockerComposeBuildInputSchema)
|
|
398
|
+
.output(DockerComposeBuildOutputSchema)
|
|
399
399
|
.meta({
|
|
400
400
|
description: "Build the images of the services of a compose project",
|
|
401
401
|
calls: ["shell.run"],
|
|
@@ -412,8 +412,8 @@ const dockerComposeBuildProcedure = createProcedure()
|
|
|
412
412
|
|
|
413
413
|
const dockerComposeRestartProcedure = createProcedure()
|
|
414
414
|
.path(["docker", "compose", "restart"])
|
|
415
|
-
.input(
|
|
416
|
-
.output(
|
|
415
|
+
.input(DockerComposeRestartInputSchema)
|
|
416
|
+
.output(DockerComposeRestartOutputSchema)
|
|
417
417
|
.meta({
|
|
418
418
|
description: "Restart the services of a compose project",
|
|
419
419
|
calls: ["shell.run"],
|
|
@@ -429,8 +429,8 @@ const dockerComposeRestartProcedure = createProcedure()
|
|
|
429
429
|
|
|
430
430
|
const dockerImagesProcedure = createProcedure()
|
|
431
431
|
.path(["docker", "images"])
|
|
432
|
-
.input(
|
|
433
|
-
.output(
|
|
432
|
+
.input(DockerImagesInputSchema)
|
|
433
|
+
.output(DockerImagesOutputSchema)
|
|
434
434
|
.meta({
|
|
435
435
|
description: "List images",
|
|
436
436
|
calls: ["shell.run"],
|
|
@@ -445,8 +445,8 @@ const dockerImagesProcedure = createProcedure()
|
|
|
445
445
|
|
|
446
446
|
const dockerInspectProcedure = createProcedure()
|
|
447
447
|
.path(["docker", "inspect"])
|
|
448
|
-
.input(
|
|
449
|
-
.output(
|
|
448
|
+
.input(DockerInspectInputSchema)
|
|
449
|
+
.output(DockerInspectOutputSchema)
|
|
450
450
|
.meta({
|
|
451
451
|
description: "Give the details of containers, images, volumes or networks: data has the JSON of docker",
|
|
452
452
|
calls: ["shell.run"],
|
|
@@ -461,8 +461,8 @@ const dockerInspectProcedure = createProcedure()
|
|
|
461
461
|
|
|
462
462
|
const dockerVolumeListProcedure = createProcedure()
|
|
463
463
|
.path(["docker", "volume", "list"])
|
|
464
|
-
.input(
|
|
465
|
-
.output(
|
|
464
|
+
.input(DockerVolumeListInputSchema)
|
|
465
|
+
.output(DockerVolumeListOutputSchema)
|
|
466
466
|
.meta({
|
|
467
467
|
description: "List volumes",
|
|
468
468
|
calls: ["shell.run"],
|
|
@@ -476,8 +476,8 @@ const dockerVolumeListProcedure = createProcedure()
|
|
|
476
476
|
|
|
477
477
|
const dockerVolumeCreateProcedure = createProcedure()
|
|
478
478
|
.path(["docker", "volume", "create"])
|
|
479
|
-
.input(
|
|
480
|
-
.output(
|
|
479
|
+
.input(DockerVolumeCreateInputSchema)
|
|
480
|
+
.output(DockerVolumeCreateOutputSchema)
|
|
481
481
|
.meta({
|
|
482
482
|
description: "Create a volume. A volume that exists stays as it is",
|
|
483
483
|
calls: ["shell.run"],
|
|
@@ -492,8 +492,8 @@ const dockerVolumeCreateProcedure = createProcedure()
|
|
|
492
492
|
|
|
493
493
|
const dockerVolumeRemoveProcedure = createProcedure()
|
|
494
494
|
.path(["docker", "volume", "remove"])
|
|
495
|
-
.input(
|
|
496
|
-
.output(
|
|
495
|
+
.input(DockerVolumeRemoveInputSchema)
|
|
496
|
+
.output(DockerVolumeRemoveOutputSchema)
|
|
497
497
|
.meta({
|
|
498
498
|
description: "Remove volumes. Their data is lost",
|
|
499
499
|
calls: ["shell.run"],
|
|
@@ -508,8 +508,8 @@ const dockerVolumeRemoveProcedure = createProcedure()
|
|
|
508
508
|
|
|
509
509
|
const dockerNetworkListProcedure = createProcedure()
|
|
510
510
|
.path(["docker", "network", "list"])
|
|
511
|
-
.input(
|
|
512
|
-
.output(
|
|
511
|
+
.input(DockerNetworkListInputSchema)
|
|
512
|
+
.output(DockerNetworkListOutputSchema)
|
|
513
513
|
.meta({
|
|
514
514
|
description: "List networks",
|
|
515
515
|
calls: ["shell.run"],
|
|
@@ -523,8 +523,8 @@ const dockerNetworkListProcedure = createProcedure()
|
|
|
523
523
|
|
|
524
524
|
const dockerNetworkCreateProcedure = createProcedure()
|
|
525
525
|
.path(["docker", "network", "create"])
|
|
526
|
-
.input(
|
|
527
|
-
.output(
|
|
526
|
+
.input(DockerNetworkCreateInputSchema)
|
|
527
|
+
.output(DockerNetworkCreateOutputSchema)
|
|
528
528
|
.meta({
|
|
529
529
|
description: "Create a network. A name that exists is an error",
|
|
530
530
|
calls: ["shell.run"],
|
|
@@ -539,8 +539,8 @@ const dockerNetworkCreateProcedure = createProcedure()
|
|
|
539
539
|
|
|
540
540
|
const dockerNetworkRemoveProcedure = createProcedure()
|
|
541
541
|
.path(["docker", "network", "remove"])
|
|
542
|
-
.input(
|
|
543
|
-
.output(
|
|
542
|
+
.input(DockerNetworkRemoveInputSchema)
|
|
543
|
+
.output(DockerNetworkRemoveOutputSchema)
|
|
544
544
|
.meta({
|
|
545
545
|
description: "Remove networks",
|
|
546
546
|
calls: ["shell.run"],
|
|
@@ -554,8 +554,8 @@ const dockerNetworkRemoveProcedure = createProcedure()
|
|
|
554
554
|
|
|
555
555
|
const dockerTagProcedure = createProcedure()
|
|
556
556
|
.path(["docker", "tag"])
|
|
557
|
-
.input(
|
|
558
|
-
.output(
|
|
557
|
+
.input(DockerTagInputSchema)
|
|
558
|
+
.output(DockerTagOutputSchema)
|
|
559
559
|
.meta({
|
|
560
560
|
description: "Give an image another name. An image that had the name loses it",
|
|
561
561
|
calls: ["shell.run"],
|
|
@@ -570,8 +570,8 @@ const dockerTagProcedure = createProcedure()
|
|
|
570
570
|
|
|
571
571
|
const dockerPushProcedure = createProcedure()
|
|
572
572
|
.path(["docker", "push"])
|
|
573
|
-
.input(
|
|
574
|
-
.output(
|
|
573
|
+
.input(DockerPushInputSchema)
|
|
574
|
+
.output(DockerPushOutputSchema)
|
|
575
575
|
.meta({
|
|
576
576
|
description: "Push an image to a registry. The registry replaces an image with the same tag",
|
|
577
577
|
calls: ["shell.run"],
|
|
@@ -587,8 +587,8 @@ const dockerPushProcedure = createProcedure()
|
|
|
587
587
|
|
|
588
588
|
const dockerPruneProcedure = createProcedure()
|
|
589
589
|
.path(["docker", "prune"])
|
|
590
|
-
.input(
|
|
591
|
-
.output(
|
|
590
|
+
.input(DockerPruneInputSchema)
|
|
591
|
+
.output(DockerPruneOutputSchema)
|
|
592
592
|
.meta({
|
|
593
593
|
description: "Remove unused containers, images, volumes, networks or build cache. It needs confirm: true",
|
|
594
594
|
calls: ["shell.run"],
|