@testcontainers/weaviate 10.8.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 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,25 @@
1
+ # Testcontainers
2
+
3
+ [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=116414510&machine=standardLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=EastUs)
4
+
5
+ [![Test](https://github.com/testcontainers/testcontainers-node/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/testcontainers/testcontainers-node/actions/workflows/test.yml)
6
+ [![npm version](https://badge.fury.io/js/testcontainers.svg)](https://www.npmjs.com/package/testcontainers)
7
+ [![npm version](https://img.shields.io/npm/dm/testcontainers.svg)](https://www.npmjs.com/package/testcontainers)
8
+
9
+ ![Testcontainers Banner](https://github.com/testcontainers/testcontainers-node/raw/main/docs/site/logo.png)
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
+ See [contributors](https://github.com/testcontainers/testcontainers-node/graphs/contributors/) for all contributors.
22
+
23
+ ----
24
+
25
+ Join our [Slack workspace](https://slack.testcontainers.org/) | [Testcontainers OSS](https://java.testcontainers.org/) | [Testcontainers Cloud](https://www.testcontainers.cloud/)
@@ -0,0 +1 @@
1
+ export { WeaviateContainer, StartedWeaviateContainer } from "./weaviate-container";
package/build/index.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StartedWeaviateContainer = exports.WeaviateContainer = void 0;
4
+ var weaviate_container_1 = require("./weaviate-container");
5
+ Object.defineProperty(exports, "WeaviateContainer", { enumerable: true, get: function () { return weaviate_container_1.WeaviateContainer; } });
6
+ Object.defineProperty(exports, "StartedWeaviateContainer", { enumerable: true, get: function () { return weaviate_container_1.StartedWeaviateContainer; } });
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"}
@@ -0,0 +1,10 @@
1
+ import { AbstractStartedContainer, GenericContainer, StartedTestContainer } from "testcontainers";
2
+ export declare class WeaviateContainer extends GenericContainer {
3
+ constructor(image?: string);
4
+ start(): Promise<StartedWeaviateContainer>;
5
+ }
6
+ export declare class StartedWeaviateContainer extends AbstractStartedContainer {
7
+ constructor(startedTestContainer: StartedTestContainer);
8
+ getHttpHostAddress(): string;
9
+ getGrpcHostAddress(): string;
10
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StartedWeaviateContainer = exports.WeaviateContainer = void 0;
4
+ const testcontainers_1 = require("testcontainers");
5
+ const WEAVIATE_HTTP_PORT = 8080;
6
+ const WEAVIATE_GRPC_PORT = 50051;
7
+ class WeaviateContainer extends testcontainers_1.GenericContainer {
8
+ constructor(image = "semitechnologies/weaviate:1.24.5") {
9
+ super(image);
10
+ this.withCommand(["--host", "0.0.0.0", "--scheme", "http", "--port", `${WEAVIATE_HTTP_PORT}`]);
11
+ this.withExposedPorts(WEAVIATE_HTTP_PORT, WEAVIATE_GRPC_PORT);
12
+ this.withEnvironment({
13
+ AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: "true",
14
+ PERSISTENCE_DATA_PATH: "/var/lib/weaviate",
15
+ });
16
+ this.withWaitStrategy(testcontainers_1.Wait.forAll([
17
+ testcontainers_1.Wait.forListeningPorts(),
18
+ testcontainers_1.Wait.forHttp("/v1/.well-known/ready", WEAVIATE_HTTP_PORT),
19
+ ]).withStartupTimeout(5000));
20
+ }
21
+ async start() {
22
+ return new StartedWeaviateContainer(await super.start());
23
+ }
24
+ }
25
+ exports.WeaviateContainer = WeaviateContainer;
26
+ class StartedWeaviateContainer extends testcontainers_1.AbstractStartedContainer {
27
+ constructor(startedTestContainer) {
28
+ super(startedTestContainer);
29
+ }
30
+ getHttpHostAddress() {
31
+ return `${this.getHost()}:${this.getMappedPort(WEAVIATE_HTTP_PORT)}`;
32
+ }
33
+ getGrpcHostAddress() {
34
+ return `${this.getHost()}:${this.getMappedPort(WEAVIATE_GRPC_PORT)}`;
35
+ }
36
+ }
37
+ exports.StartedWeaviateContainer = StartedWeaviateContainer;
38
+ //# sourceMappingURL=weaviate-container.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weaviate-container.js","sourceR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AAC,EAAE,CAAC;IACvE,CAAC;CACF;AAZD,4DAYC"}
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@testcontainers/weaviate",
3
+ "version": "10.8.0",
4
+ "license": "MIT",
5
+ "keywords": [
6
+ "weaviate",
7
+ "testing",
8
+ "docker",
9
+ "testcontainers"
10
+ ],
11
+ "description": "Weaviate 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
+ "weaviate-ts-client": "^2.1.0"
33
+ },
34
+ "dependencies": {
35
+ "testcontainers": "^10.8.0"
36
+ }
37
+ }