@langchain/google-cloud-sql-pg 0.0.1 → 0.0.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.
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.jsonFormatter = exports.yamlFormatter = exports.csvFormatter = exports.textFormatter = exports.customZip = exports.getIAMPrincipalEmail = void 0;
3
+ exports.customZip = exports.getIAMPrincipalEmail = void 0;
4
+ exports.textFormatter = textFormatter;
5
+ exports.csvFormatter = csvFormatter;
6
+ exports.yamlFormatter = yamlFormatter;
7
+ exports.jsonFormatter = jsonFormatter;
4
8
  /**
5
9
  * Get email address associated with current authenticated IAM principal.
6
10
  * Email will be used for automatic IAM database authentication to Cloud SQL.
@@ -48,7 +52,6 @@ function textFormatter(row, content_columns) {
48
52
  .map((column) => String(row[column]))
49
53
  .join(" ");
50
54
  }
51
- exports.textFormatter = textFormatter;
52
55
  // CSV document formatter.
53
56
  function csvFormatter(row, content_columns) {
54
57
  return content_columns
@@ -56,7 +59,6 @@ function csvFormatter(row, content_columns) {
56
59
  .map((column) => String(row[column]))
57
60
  .join(", ");
58
61
  }
59
- exports.csvFormatter = csvFormatter;
60
62
  // YAML document formatter
61
63
  function yamlFormatter(row, content_columns) {
62
64
  return content_columns
@@ -64,7 +66,6 @@ function yamlFormatter(row, content_columns) {
64
66
  .map((column) => `${column}: ${String(row[column])}`)
65
67
  .join("\n");
66
68
  }
67
- exports.yamlFormatter = yamlFormatter;
68
69
  // JSON document formatter
69
70
  function jsonFormatter(row, content_columns) {
70
71
  const dictionary = {};
@@ -75,4 +76,3 @@ function jsonFormatter(row, content_columns) {
75
76
  }
76
77
  return JSON.stringify(dictionary);
77
78
  }
78
- exports.jsonFormatter = jsonFormatter;
@@ -330,6 +330,13 @@ class PostgresVectorStore extends vectorstores_1.VectorStore {
330
330
  delete allColumns[embeddingColumn];
331
331
  allMetadataColumns = Object.keys(allColumns);
332
332
  }
333
+ else {
334
+ for (const column of metadataColumns) {
335
+ if (Object.prototype.hasOwnProperty.call(allColumns, column)) {
336
+ allMetadataColumns.push(column);
337
+ }
338
+ }
339
+ }
333
340
  return new PostgresVectorStore(embeddings, {
334
341
  engine,
335
342
  tableName,
@@ -327,6 +327,13 @@ export class PostgresVectorStore extends VectorStore {
327
327
  delete allColumns[embeddingColumn];
328
328
  allMetadataColumns = Object.keys(allColumns);
329
329
  }
330
+ else {
331
+ for (const column of metadataColumns) {
332
+ if (Object.prototype.hasOwnProperty.call(allColumns, column)) {
333
+ allMetadataColumns.push(column);
334
+ }
335
+ }
336
+ }
330
337
  return new PostgresVectorStore(embeddings, {
331
338
  engine,
332
339
  tableName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/google-cloud-sql-pg",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "LangChain.js integrations for Google Cloud SQL for PostgreSQL",
5
5
  "type": "module",
6
6
  "engines": {
@@ -17,7 +17,7 @@
17
17
  "build": "yarn turbo:command build:internal --filter=@langchain/google-cloud-sql-pg",
18
18
  "build:internal": "yarn lc_build --create-entrypoints --pre --tree-shaking",
19
19
  "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/",
20
- "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
20
+ "lint:dpdm": "dpdm --skip-dynamic-imports circular --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
21
21
  "lint": "yarn lint:eslint && yarn lint:dpdm",
22
22
  "lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
23
23
  "clean": "rm -rf .turbo dist/",
@@ -50,7 +50,7 @@
50
50
  "@typescript-eslint/eslint-plugin": "^6.12.0",
51
51
  "@typescript-eslint/parser": "^6.12.0",
52
52
  "dotenv": "^16.3.1",
53
- "dpdm": "^3.12.0",
53
+ "dpdm": "^3.14.0",
54
54
  "eslint": "^8.33.0",
55
55
  "eslint-config-airbnb-base": "^15.0.0",
56
56
  "eslint-config-prettier": "^8.6.0",
@@ -61,11 +61,11 @@
61
61
  "jest-environment-node": "^29.6.4",
62
62
  "pg": "^8.14.1",
63
63
  "prettier": "^2.8.3",
64
- "release-it": "^15.10.1",
64
+ "release-it": "^18.1.2",
65
65
  "rollup": "^4.5.2",
66
66
  "testcontainers": "^10.23.0",
67
67
  "ts-jest": "^29.1.0",
68
- "typescript": "<5.2.0"
68
+ "typescript": "~5.8.3"
69
69
  },
70
70
  "publishConfig": {
71
71
  "access": "public"