File size: 4,840 Bytes
287a0bc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
  "name": "chromadb",
  "version": "1.8.1",
  "description": "A JavaScript interface for chroma",
  "keywords": [],
  "author": "",
  "license": "Apache-2.0",
  "devDependencies": {
    "@openapi-generator-plus/typescript-fetch-client-generator": "^1.5.0",
    "@types/jest": "^29.5.0",
    "@types/node": "^20.8.10",
    "jest": "^29.5.0",
    "npm-run-all": "^4.1.5",
    "openapi-generator-plus": "^2.6.0",
    "openapi-types": "^12.1.3",
    "prettier": "2.8.7",
    "rimraf": "^5.0.0",
    "ts-jest": "^29.1.0",
    "ts-node": "^10.9.1",
    "tsd": "^0.28.1",
    "tsup": "^7.2.0",
    "typescript": "^5.0.4"
  },
  "type": "module",
  "main": "dist/cjs/chromadb.cjs",
  "module": "dist/chromadb.legacy-esm.js",
  "exports": {
    ".": {
      "import": {
        "types": "./dist/chromadb.d.ts",
        "default": "./dist/chromadb.mjs"
      },
      "require": {
        "types": "./dist/cjs/chromadb.d.cts",
        "default": "./dist/cjs/chromadb.cjs"
      }
    }
  },
  "files": [
    "src",
    "dist"
  ],
  "scripts": {
    "test": "run-s db:clean db:cleanauth db:run test:runfull db:clean test:runfull-authonly db:cleanauth",
    "testnoauth": "run-s db:clean db:run test:runfull db:clean",
    "testauth": "run-s db:cleanauth test:runfull-authonly db:cleanauth",
    "test:set-port": "cross-env URL=localhost:8001",
    "test:run": "jest --runInBand --testPathIgnorePatterns=test/auth.*.test.ts",
    "test:run-auth-basic": "jest --runInBand --testPathPattern=test/auth.basic.test.ts",
    "test:run-auth-token": "jest --runInBand --testPathPattern=test/auth.token.test.ts",
    "test:run-auth-xtoken": "XTOKEN_TEST=true jest --runInBand --testPathPattern=test/auth.token.test.ts",
    "test:runfull": "PORT=8001 jest --runInBand --testPathIgnorePatterns=test/auth.*.test.ts",
    "test:runfull-authonly": "run-s db:run-auth-basic test:runfull-authonly-basic db:clean db:run-auth-token test:runfull-authonly-token db:clean db:run-auth-xtoken test:runfull-authonly-xtoken db:clean",
    "test:runfull-authonly-basic": "PORT=8001 jest --runInBand --testPathPattern=test/auth.basic.test.ts",
    "test:runfull-authonly-token": "PORT=8001 jest --runInBand --testPathPattern=test/auth.token.test.ts",
    "test:runfull-authonly-xtoken": "PORT=8001 XTOKEN_TEST=true jest --runInBand --testPathPattern=test/auth.token.test.ts",
    "test:update": "run-s db:clean db:run && jest --runInBand --updateSnapshot && run-s db:clean",
    "db:clean": "cd ../.. && CHROMA_PORT=8001 docker-compose -f docker-compose.test.yml down --volumes",
    "db:cleanauth": "cd ../.. && CHROMA_PORT=8001 docker-compose -f docker-compose.test-auth.yml down --volumes",
    "db:run": "cd ../.. && CHROMA_PORT=8001 docker-compose -f docker-compose.test.yml up --detach && sleep 5",
    "db:run-auth-basic": "cd ../.. && docker run --rm --entrypoint htpasswd httpd:2 -Bbn admin admin > server.htpasswd && echo \"CHROMA_SERVER_AUTH_CREDENTIALS_FILE=/chroma/server.htpasswd\\nCHROMA_SERVER_AUTH_CREDENTIALS_PROVIDER=chromadb.auth.providers.HtpasswdFileServerAuthCredentialsProvider\\nCHROMA_SERVER_AUTH_PROVIDER=chromadb.auth.basic.BasicAuthServerProvider\\nCHROMA_PORT=8001\" > .chroma_env && docker-compose -f docker-compose.test-auth.yml --env-file ./.chroma_env up --detach && sleep 5",
    "db:run-auth-token": "cd ../.. && echo \"CHROMA_SERVER_AUTH_CREDENTIALS=test-token\nCHROMA_SERVER_AUTH_CREDENTIALS_PROVIDER=chromadb.auth.token.TokenConfigServerAuthCredentialsProvider\nCHROMA_SERVER_AUTH_PROVIDER=chromadb.auth.token.TokenAuthServerProvider\\nCHROMA_PORT=8001\" > .chroma_env && docker-compose -f docker-compose.test-auth.yml --env-file ./.chroma_env up --detach && sleep 5",
    "db:run-auth-xtoken": "cd ../.. && echo \"CHROMA_SERVER_AUTH_TOKEN_TRANSPORT_HEADER=X_CHROMA_TOKEN\nCHROMA_SERVER_AUTH_CREDENTIALS=test-token\nCHROMA_SERVER_AUTH_CREDENTIALS_PROVIDER=chromadb.auth.token.TokenConfigServerAuthCredentialsProvider\nCHROMA_SERVER_AUTH_PROVIDER=chromadb.auth.token.TokenAuthServerProvider\\nCHROMA_PORT=8001\" > .chroma_env && docker-compose -f docker-compose.test-auth.yml --env-file ./.chroma_env up --detach && sleep 5",
    "prebuild": "rimraf dist",
    "build": "tsup",
    "genapi": "./genapi.sh",
    "prettier": "prettier --write .",
    "release": "run-s build test:run && npm publish",
    "release_alpha": "run-s build test:run && npm publish --tag alpha"
  },
  "engines": {
    "node": ">=14.17.0"
  },
  "dependencies": {
    "isomorphic-fetch": "^3.0.0",
    "cliui": "^8.0.1"
  },
  "peerDependencies": {
    "@google/generative-ai": "^0.1.1",
    "cohere-ai": "^5.0.0 || ^6.0.0 || ^7.0.0",
    "openai": "^3.0.0 || ^4.0.0"
  },
  "peerDependenciesMeta": {
    "@google/generative-ai": {
      "optional": true
    },
    "cohere-ai": {
      "optional": true
    },
    "openai": {
      "optional": true
    }
  }
}