docker-storage-gc 3.5.2 → 3.5.3

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.
@@ -1,3 +1,14 @@
1
+ - commits:
2
+ - subject: Add typings
3
+ hash: 15a645990da1f763088a843c9a8876b4b5cddff8
4
+ body: ""
5
+ footer:
6
+ Change-type: patch
7
+ change-type: patch
8
+ author: Pagan Gazzard
9
+ version: 3.5.3
10
+ title: ""
11
+ date: 2023-03-27T16:33:41.726Z
1
12
  - commits:
2
13
  - subject: Replace balenaCI with flowzone
3
14
  hash: 1f5029fed1b1d7713665274949f2c8badb6d4f0f
@@ -8,7 +19,7 @@
8
19
  author: Pagan Gazzard
9
20
  version: 3.5.2
10
21
  title: ""
11
- date: 2023-03-27T16:20:30.672Z
22
+ date: 2023-03-27T16:32:29.520Z
12
23
  - version: 3.5.1
13
24
  date: 2021-06-25T14:19:00Z
14
25
  commits:
package/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file
4
4
  automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
5
5
  This project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ # v3.5.3
8
+ ## (2023-03-27)
9
+
10
+ * Add typings [Pagan Gazzard]
11
+
7
12
  # v3.5.2
8
13
  ## (2023-03-27)
9
14
 
package/index.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ import type Dockerode = require('dockerode');
2
+ import type EventEmitter = require('eventemitter3');
3
+
4
+ interface Events {
5
+ numberImagesToRemove(n: number): void;
6
+ gcRunTime(duration: number): void;
7
+ imageRemoved(removalType: string): void;
8
+ spaceReclaimed(reclaimSpace: number): void;
9
+ imageRemovalError(statusCode: string): void;
10
+ }
11
+ declare class DockerGC {
12
+ setHostname(hostname: string): void;
13
+ setupMtimeStream(): Promise<void>;
14
+ setDocker(dockerOpts: Dockerode.DockerOptions): Promise<void>;
15
+ garbageCollect(reclaimSpace: number, attemptAll?: boolean): Promise<void>;
16
+ getDaemonFreeSpace(): Promise<{
17
+ used: number;
18
+ total: number;
19
+ free: number;
20
+ }>;
21
+ metrics: EventEmitter<Events>;
22
+ }
23
+ export = DockerGC;
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "docker-storage-gc",
3
- "version": "3.5.2",
3
+ "version": "3.5.3",
4
4
  "main": "build/index.js",
5
+ "types": "index.d.ts",
5
6
  "scripts": {
6
7
  "lint": "resin-lint lib test tools",
7
8
  "pretest": "npm run lint",
@@ -14,12 +15,13 @@
14
15
  "description": "Automatically cleanup unused images based on various cache replacement algorithms",
15
16
  "dependencies": {
16
17
  "@balena/node-metrics-gatherer": "^5.6.0",
17
- "JSONStream": "^1.0.7",
18
+ "@types/dockerode": "^2.5.34",
18
19
  "bluebird": "^3.7.2",
19
20
  "docker-progress": "^5.0.0",
20
21
  "dockerode": "^2.5.3",
21
22
  "event-stream": "^3.3.2",
22
23
  "eventemitter3": "^4.0.4",
24
+ "JSONStream": "^1.0.7",
23
25
  "lodash": "^4.17.5",
24
26
  "mz": "^2.6.0"
25
27
  },
@@ -31,6 +33,6 @@
31
33
  "timekeeper": "0.0.5"
32
34
  },
33
35
  "versionist": {
34
- "publishedAt": "2023-03-27T16:20:30.839Z"
36
+ "publishedAt": "2023-03-27T16:33:41.957Z"
35
37
  }
36
38
  }