@testcontainers/chromadb 10.8.2
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 +30 -0
- package/build/chromadb-container.d.ts +10 -0
- package/build/chromadb-container.js +29 -0
- package/build/chromadb-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 - 2023 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,30 @@
|
|
|
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/test.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 - 2023 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
|
+
|
|
30
|
+
Join our [Slack workspace](https://slack.testcontainers.org/) | [Testcontainers OSS](https://java.testcontainers.org/) | [Testcontainers Cloud](https://www.testcontainers.cloud/)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AbstractStartedContainer, GenericContainer, StartedTestContainer } from "testcontainers";
|
|
2
|
+
export declare class ChromaDBContainer extends GenericContainer {
|
|
3
|
+
constructor(image?: string);
|
|
4
|
+
start(): Promise<StartedChromaDBContainer>;
|
|
5
|
+
}
|
|
6
|
+
export declare class StartedChromaDBContainer extends AbstractStartedContainer {
|
|
7
|
+
private readonly host;
|
|
8
|
+
constructor(startedTestContainer: StartedTestContainer);
|
|
9
|
+
getHttpUrl(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StartedChromaDBContainer = exports.ChromaDBContainer = void 0;
|
|
4
|
+
const testcontainers_1 = require("testcontainers");
|
|
5
|
+
const CHROMADB_PORT = 8000;
|
|
6
|
+
class ChromaDBContainer extends testcontainers_1.GenericContainer {
|
|
7
|
+
constructor(image = "chromadb/chroma:0.4.22") {
|
|
8
|
+
super(image);
|
|
9
|
+
this.withExposedPorts(CHROMADB_PORT)
|
|
10
|
+
.withWaitStrategy(testcontainers_1.Wait.forHttp("/api/v1/heartbeat", CHROMADB_PORT))
|
|
11
|
+
.withStartupTimeout(120000);
|
|
12
|
+
}
|
|
13
|
+
async start() {
|
|
14
|
+
return new StartedChromaDBContainer(await super.start());
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ChromaDBContainer = ChromaDBContainer;
|
|
18
|
+
class StartedChromaDBContainer extends testcontainers_1.AbstractStartedContainer {
|
|
19
|
+
host;
|
|
20
|
+
constructor(startedTestContainer) {
|
|
21
|
+
super(startedTestContainer);
|
|
22
|
+
this.host = this.startedTestContainer.getHost();
|
|
23
|
+
}
|
|
24
|
+
getHttpUrl() {
|
|
25
|
+
return `http://${this.host}:${this.startedTestContainer.getMappedPort(CHROMADB_PORT)}`;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.StartedChromaDBContainer = StartedChromaDBContainer;
|
|
29
|
+
//# sourceMappingURL=chromadb-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chromadb-container.js","sourceRoot":"","sources":["../src/chromadb-container.ts"],"names":[],"mappings":";;;AAAA,mDAAwG;AAExG,MAAM,aAAa,GAAG,IAAI,CAAC;AAE3B,MAAa,iBAAkB,SAAQ,iCAAgB;IACrD,YAAY,KAAK,GAAG,wBAAwB;QAC1C,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC;aACjC,gBAAgB,CAAC,qBAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;aAClE,kBAAkB,CAAC,MAAO,CAAC,CAAC;IACjC,CAAC;IAEe,KAAK,CAAC,KAAK;QACzB,OAAO,IAAI,wBAAwB,CAAC,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;IAC3D,CAAC;CACF;AAXD,8CAWC;AAED,MAAa,wBAAyB,SAAQ,yCAAwB;IACnD,IAAI,CAAS;IAE9B,YAAY,oBAA0C;QACpD,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,CAAC;IAClD,CAAC;IAEM,UAAU;QACf,OAAO,UAAU,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,CAAC;IACzF,CAAC;CACF;AAXD,4DAWC"}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChromaDBContainer, StartedChromaDBContainer } from "./chromadb-container";
|
package/build/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StartedChromaDBContainer = exports.ChromaDBContainer = void 0;
|
|
4
|
+
var chromadb_container_1 = require("./chromadb-container");
|
|
5
|
+
Object.defineProperty(exports, "ChromaDBContainer", { enumerable: true, get: function () { return chromadb_container_1.ChromaDBContainer; } });
|
|
6
|
+
Object.defineProperty(exports, "StartedChromaDBContainer", { enumerable: true, get: function () { return chromadb_container_1.StartedChromaDBContainer; } });
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2DAAmF;AAA1E,uHAAA,iBAAiB,OAAA;AAAE,8HAAA,wBAAwB,OAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@testcontainers/chromadb",
|
|
3
|
+
"version": "10.8.2",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"chromadb",
|
|
7
|
+
"testing",
|
|
8
|
+
"docker",
|
|
9
|
+
"testcontainers"
|
|
10
|
+
],
|
|
11
|
+
"description": "ChromaDB module for Testcontainers",
|
|
12
|
+
"homepage": "https://github.com/testcontainers/testcontainers-node#readme",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/testcontainers/testcontainers-node"
|
|
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
|
+
"devDependencies": {
|
|
32
|
+
"chromadb": "^1.8.1"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"testcontainers": "^10.8.2"
|
|
36
|
+
}
|
|
37
|
+
}
|