podman 0.1.5 → 0.2.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.
@@ -0,0 +1,79 @@
1
+ type PodmanMachine = {
2
+ Name: string;
3
+ Default: boolean;
4
+ Created: string;
5
+ Running: boolean;
6
+ Starting: boolean;
7
+ LastUp: string;
8
+ Stream: string;
9
+ VMType: string;
10
+ CPUs: number;
11
+ Memory: string;
12
+ Swap: string;
13
+ DiskSize: string;
14
+ Port: number;
15
+ RemoteUsername: string;
16
+ IdentityPath: string;
17
+ UserModeNetworking: boolean;
18
+ };
19
+ /**
20
+ * Lists Podman machines from `podman machine list --format json`.
21
+ *
22
+ * @returns Resolves with the list of machines.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * import {listMachines} from 'podman'
27
+ *
28
+ * const machines = await listMachines()
29
+ * console.log(machines.map((machine) => machine.Name))
30
+ * ```
31
+ */
32
+ export declare function listMachines(): Promise<PodmanMachine[]>;
33
+ /**
34
+ * Checks whether a Podman machine is currently running.
35
+ *
36
+ * @param machineName Name of the Podman machine to inspect.
37
+ * @returns Resolves to true when the machine is running.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * import {isMachineRunning} from 'podman'
42
+ *
43
+ * const running = await isMachineRunning()
44
+ * console.log('Machine running:', running)
45
+ * ```
46
+ */
47
+ export declare function isMachineRunning(machineName?: string): Promise<boolean>;
48
+ /**
49
+ * Starts a Podman machine.
50
+ *
51
+ * @param machineName Name of the Podman machine to start.
52
+ * @returns Resolves when the start command completes.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * import {startMachine} from 'podman'
57
+ *
58
+ * await startMachine('podman-machine-default')
59
+ * ```
60
+ */
61
+ export declare function startMachine(machineName?: string): Promise<void>;
62
+ /**
63
+ * Starts a Podman machine, ignoring the "already running" error.
64
+ *
65
+ * @param machineName Name of the Podman machine to start.
66
+ * @returns Resolves to true when a start was triggered, or false when it was already running.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * import {forceStartMachine} from 'podman'
71
+ *
72
+ * const started = await forceStartMachine()
73
+ * if (started) {
74
+ * console.log('Podman machine booted.')
75
+ * }
76
+ * ```
77
+ */
78
+ export declare function forceStartMachine(machineName?: string): Promise<boolean>;
79
+ export {};
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Adds one or more additional names to a local image.
3
+ *
4
+ * @param image Image ID or name to tag.
5
+ * @param targetNames One or more target names (including optional registry/namespace).
6
+ * @returns Resolves when the tag operation succeeds.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import {tag} from 'podman'
11
+ *
12
+ * await tag('0e3bbc2', 'fedora:latest')
13
+ * ```
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * import {tag} from 'podman'
18
+ *
19
+ * await tag('imageID:latest', 'myNewImage:newTag')
20
+ * ```
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * import {tag} from 'podman'
25
+ *
26
+ * await tag('httpd', 'myregistryhost:5000/fedora/httpd:v2')
27
+ * ```
28
+ */
29
+ export declare function tag(image: string, targetNames: string | string[]): Promise<void>;