@testcontainers/couchdb 11.7.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/LICENSE +21 -0
- package/README.md +29 -0
- package/build/couchdb-container.d.ts +18 -0
- package/build/couchdb-container.js +54 -0
- package/build/couchdb-container.js.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +7 -0
- package/build/index.js.map +1 -0
- package/package.json +37 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 - 2025 Cristian Greco
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Testcontainers
|
|
2
|
+
|
|
3
|
+
[](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=116414510&machine=standardLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=EastUs)
|
|
4
|
+
|
|
5
|
+
[](https://github.com/testcontainers/testcontainers-node/actions/workflows/checks.yml)
|
|
6
|
+
[](https://www.npmjs.com/package/testcontainers)
|
|
7
|
+
[](https://www.npmjs.com/package/testcontainers)
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
## [📖 Documentation](https://node.testcontainers.org/)
|
|
12
|
+
|
|
13
|
+
## License
|
|
14
|
+
|
|
15
|
+
See [LICENSE](https://github.com/testcontainers/testcontainers-node/blob/main/LICENSE).
|
|
16
|
+
|
|
17
|
+
## Copyright
|
|
18
|
+
|
|
19
|
+
Copyright (c) 2018 - 2025 Cristian Greco and other authors.
|
|
20
|
+
|
|
21
|
+
## Contributing
|
|
22
|
+
|
|
23
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for how to contribute to this repo.
|
|
24
|
+
|
|
25
|
+
See [contributors](https://github.com/testcontainers/testcontainers-node/graphs/contributors/) for all contributors.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
Join our [Slack workspace](https://slack.testcontainers.org/) | [Testcontainers OSS](https://java.testcontainers.org/) | [Testcontainers Cloud](https://www.testcontainers.cloud/)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AbstractStartedContainer, GenericContainer, StartedTestContainer } from "testcontainers";
|
|
2
|
+
export declare class CouchDBContainer extends GenericContainer {
|
|
3
|
+
private username;
|
|
4
|
+
private password;
|
|
5
|
+
constructor(image: string);
|
|
6
|
+
withUsername(username: string): this;
|
|
7
|
+
withPassword(password: string): this;
|
|
8
|
+
start(): Promise<StartedCouchDBContainer>;
|
|
9
|
+
}
|
|
10
|
+
export declare class StartedCouchDBContainer extends AbstractStartedContainer {
|
|
11
|
+
private readonly username;
|
|
12
|
+
private readonly password;
|
|
13
|
+
constructor(startedTestContainer: StartedTestContainer, username: string, password: string);
|
|
14
|
+
getPort(): number;
|
|
15
|
+
getUsername(): string;
|
|
16
|
+
getPassword(): string;
|
|
17
|
+
getUrl(): string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StartedCouchDBContainer = exports.CouchDBContainer = void 0;
|
|
4
|
+
const testcontainers_1 = require("testcontainers");
|
|
5
|
+
const COUCHDB_PORT = 5984;
|
|
6
|
+
class CouchDBContainer extends testcontainers_1.GenericContainer {
|
|
7
|
+
username = "root";
|
|
8
|
+
password = "root";
|
|
9
|
+
constructor(image) {
|
|
10
|
+
super(image);
|
|
11
|
+
this.withExposedPorts(COUCHDB_PORT)
|
|
12
|
+
.withStartupTimeout(120_000)
|
|
13
|
+
.withWaitStrategy(testcontainers_1.Wait.forHttp("/_up", COUCHDB_PORT).forStatusCode(200).withStartupTimeout(60_000));
|
|
14
|
+
}
|
|
15
|
+
withUsername(username) {
|
|
16
|
+
this.username = username;
|
|
17
|
+
return this;
|
|
18
|
+
}
|
|
19
|
+
withPassword(password) {
|
|
20
|
+
this.password = password;
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
async start() {
|
|
24
|
+
this.withEnvironment({
|
|
25
|
+
COUCHDB_USER: this.username,
|
|
26
|
+
COUCHDB_PASSWORD: this.password,
|
|
27
|
+
});
|
|
28
|
+
return new StartedCouchDBContainer(await super.start(), this.username, this.password);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.CouchDBContainer = CouchDBContainer;
|
|
32
|
+
class StartedCouchDBContainer extends testcontainers_1.AbstractStartedContainer {
|
|
33
|
+
username;
|
|
34
|
+
password;
|
|
35
|
+
constructor(startedTestContainer, username, password) {
|
|
36
|
+
super(startedTestContainer);
|
|
37
|
+
this.username = username;
|
|
38
|
+
this.password = password;
|
|
39
|
+
}
|
|
40
|
+
getPort() {
|
|
41
|
+
return this.getMappedPort(COUCHDB_PORT);
|
|
42
|
+
}
|
|
43
|
+
getUsername() {
|
|
44
|
+
return this.username;
|
|
45
|
+
}
|
|
46
|
+
getPassword() {
|
|
47
|
+
return this.password;
|
|
48
|
+
}
|
|
49
|
+
getUrl() {
|
|
50
|
+
return `http://${this.username}:${this.password}@${this.getHost()}:${this.getPort()}`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.StartedCouchDBContainer = StartedCouchDBContainer;
|
|
54
|
+
//# sourceMappingURL=couchdb-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"couchdb-container.js","sourceRoot":"","sources":["../src/couchdb-container.ts"],"names":[],"mappings":";;;AAAA,mDAAwG;AAExG,MAAM,YAAY,GAAG,IAAI,CAAC;AAE1B,MAAa,gBAAiB,SAAQ,iCAAgB;IAC5C,QAAQ,GAAW,MAAM,CAAC;IAC1B,QAAQ,GAAW,MAAM,CAAC;IAElC,YAAY,KAAa;QACvB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;aAChC,kBAAkB,CAAC,OAAO,CAAC;aAC3B,gBAAgB,CAAC,qBAAI,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;IACxG,CAAC;IAEM,YAAY,CAAC,QAAgB;QAClC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,YAAY,CAAC,QAAgB;QAClC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAEe,KAAK,CAAC,KAAK;QACzB,IAAI,CAAC,eAAe,CAAC;YACnB,YAAY,EAAE,IAAI,CAAC,QAAQ;YAC3B,gBAAgB,EAAE,IAAI,CAAC,QAAQ;SAChC,CAAC,CAAC;QACH,OAAO,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxF,CAAC;CACF;AA5BD,4CA4BC;AAED,MAAa,uBAAwB,SAAQ,yCAAwB;IAGhD;IACA;IAHnB,YACE,oBAA0C,EACzB,QAAgB,EAChB,QAAgB;QAEjC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAHX,aAAQ,GAAR,QAAQ,CAAQ;QAChB,aAAQ,GAAR,QAAQ,CAAQ;IAGnC,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAC1C,CAAC;IAEM,WAAW;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAEM,WAAW;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAEM,MAAM;QACX,OAAO,UAAU,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;IACxF,CAAC;CACF;AAxBD,0DAwBC"}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CouchDBContainer, StartedCouchDBContainer } from "./couchdb-container";
|
package/build/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StartedCouchDBContainer = exports.CouchDBContainer = void 0;
|
|
4
|
+
var couchdb_container_1 = require("./couchdb-container");
|
|
5
|
+
Object.defineProperty(exports, "CouchDBContainer", { enumerable: true, get: function () { return couchdb_container_1.CouchDBContainer; } });
|
|
6
|
+
Object.defineProperty(exports, "StartedCouchDBContainer", { enumerable: true, get: function () { return couchdb_container_1.StartedCouchDBContainer; } });
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yDAAgF;AAAvE,qHAAA,gBAAgB,OAAA;AAAE,4HAAA,uBAAuB,OAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@testcontainers/couchdb",
|
|
3
|
+
"version": "11.7.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"couchdb",
|
|
7
|
+
"testing",
|
|
8
|
+
"docker",
|
|
9
|
+
"testcontainers"
|
|
10
|
+
],
|
|
11
|
+
"description": "CouchDB module for Testcontainers",
|
|
12
|
+
"homepage": "https://github.com/testcontainers/testcontainers-node#readme",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/testcontainers/testcontainers-node.git"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/testcontainers/testcontainers-node/issues"
|
|
19
|
+
},
|
|
20
|
+
"main": "build/index.js",
|
|
21
|
+
"files": [
|
|
22
|
+
"build"
|
|
23
|
+
],
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"prepack": "shx cp ../../../README.md . && shx cp ../../../LICENSE .",
|
|
29
|
+
"build": "tsc --project tsconfig.build.json"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"testcontainers": "^11.7.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"nano": "^11.0.1"
|
|
36
|
+
}
|
|
37
|
+
}
|