testcontainers 12.0.2 → 12.0.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.
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.GenericContainer = void 0;
|
|
7
|
-
const archiver_1 = require("archiver");
|
|
7
|
+
const archiver_1 = __importDefault(require("archiver"));
|
|
8
8
|
const async_lock_1 = __importDefault(require("async-lock"));
|
|
9
9
|
const fs_1 = require("fs");
|
|
10
10
|
const common_1 = require("../common");
|
|
@@ -186,7 +186,7 @@ class GenericContainer {
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
async createArchiveToCopyToContainer() {
|
|
189
|
-
const tar =
|
|
189
|
+
const tar = (0, archiver_1.default)("tar");
|
|
190
190
|
const filesToCopyWithStats = await Promise.all(this.filesToCopy.map(async (fileToCopy) => ({
|
|
191
191
|
...fileToCopy,
|
|
192
192
|
stats: await fs_1.promises.stat(fileToCopy.source),
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.StartedGenericContainer = void 0;
|
|
7
|
-
const archiver_1 = require("archiver");
|
|
7
|
+
const archiver_1 = __importDefault(require("archiver"));
|
|
8
8
|
const async_lock_1 = __importDefault(require("async-lock"));
|
|
9
9
|
const fs_1 = require("fs");
|
|
10
10
|
const common_1 = require("../common");
|
|
@@ -151,7 +151,7 @@ class StartedGenericContainer {
|
|
|
151
151
|
async copyFilesToContainer(filesToCopy) {
|
|
152
152
|
common_1.log.debug(`Copying files to container...`, { containerId: this.container.id });
|
|
153
153
|
const client = await (0, container_runtime_1.getContainerRuntimeClient)();
|
|
154
|
-
const tar =
|
|
154
|
+
const tar = (0, archiver_1.default)("tar");
|
|
155
155
|
const filesToCopyWithStats = await Promise.all(filesToCopy.map(async (fileToCopy) => ({
|
|
156
156
|
...fileToCopy,
|
|
157
157
|
stats: await fs_1.promises.stat(fileToCopy.source),
|
|
@@ -164,7 +164,7 @@ class StartedGenericContainer {
|
|
|
164
164
|
async copyDirectoriesToContainer(directoriesToCopy) {
|
|
165
165
|
common_1.log.debug(`Copying directories to container...`, { containerId: this.container.id });
|
|
166
166
|
const client = await (0, container_runtime_1.getContainerRuntimeClient)();
|
|
167
|
-
const tar =
|
|
167
|
+
const tar = (0, archiver_1.default)("tar");
|
|
168
168
|
directoriesToCopy.forEach(({ source, target }) => tar.directory(source, target));
|
|
169
169
|
tar.finalize();
|
|
170
170
|
await client.container.putArchive(this.container, tar, "/");
|
|
@@ -173,7 +173,7 @@ class StartedGenericContainer {
|
|
|
173
173
|
async copyContentToContainer(contentsToCopy) {
|
|
174
174
|
common_1.log.debug(`Copying content to container...`, { containerId: this.container.id });
|
|
175
175
|
const client = await (0, container_runtime_1.getContainerRuntimeClient)();
|
|
176
|
-
const tar =
|
|
176
|
+
const tar = (0, archiver_1.default)("tar");
|
|
177
177
|
contentsToCopy.forEach(({ content, target, mode }) => tar.append(content, { name: target, mode: mode }));
|
|
178
178
|
tar.finalize();
|
|
179
179
|
await client.container.putArchive(this.container, tar, "/");
|
|
@@ -9,7 +9,7 @@ const reaper_1 = require("../reaper/reaper");
|
|
|
9
9
|
const labels_1 = require("../utils/labels");
|
|
10
10
|
exports.SSHD_IMAGE = process.env["SSHD_CONTAINER_IMAGE"]
|
|
11
11
|
? container_runtime_1.ImageName.fromString(process.env["SSHD_CONTAINER_IMAGE"]).string
|
|
12
|
-
: container_runtime_1.ImageName.fromString("testcontainers/sshd:1.
|
|
12
|
+
: container_runtime_1.ImageName.fromString("testcontainers/sshd:1.4.0").string;
|
|
13
13
|
class PortForwarder {
|
|
14
14
|
sshConnection;
|
|
15
15
|
containerId;
|
package/build/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "12.0.
|
|
1
|
+
export declare const LIB_VERSION = "12.0.3";
|
package/build/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testcontainers",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.3",
|
|
4
4
|
"author": "Cristian Greco",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@balena/dockerignore": "^1.0.2",
|
|
34
34
|
"@types/dockerode": "^4.0.1",
|
|
35
|
-
"archiver": "^
|
|
35
|
+
"archiver": "^7.0.1",
|
|
36
36
|
"async-lock": "^1.4.1",
|
|
37
37
|
"byline": "^5.0.0",
|
|
38
38
|
"debug": "^4.4.3",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"undici": "^8.3.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@types/archiver": "^
|
|
50
|
+
"@types/archiver": "^7.0.0",
|
|
51
51
|
"@types/async-lock": "^1.4.2",
|
|
52
52
|
"@types/byline": "^4.2.36",
|
|
53
53
|
"@types/debug": "^4.1.13",
|