oh-my-spreadsheets
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -5,6 +5,7 @@ import type { Columns, Field, Filterable, RowValues, Values } from './types/table'; | ||
private options; | ||
private client; | ||
private readonly client; | ||
private initiated; | ||
private gsapi; | ||
private __invertedScheme; | ||
private readonly __invertedScheme; | ||
private readonly __schemaKeys; | ||
constructor(scheme: T, options: { | ||
@@ -11,0 +12,0 @@ spreadsheetID: string; |
@@ -17,2 +17,3 @@ "use strict"; | ||
}, {}); | ||
this.__schemaKeys = Object.keys(this.__invertedScheme).filter((key) => key !== '__tableRowIndex'); | ||
this.client = new googleapis_1.google.auth.JWT(this.options.email, undefined, this.options.privateKey, ['https://www.googleapis.com/auth/spreadsheets']); | ||
@@ -113,6 +114,5 @@ } | ||
getCellsForUpdate(rows, updateData) { | ||
return rows.reduce((acc, row) => { | ||
const updatableD = rows.reduce((acc, row) => { | ||
const rowIndex = row.__tableRowIndex; | ||
const keys = Object.keys(row).filter((k) => k !== '__tableRowIndex'); | ||
keys | ||
this.__schemaKeys | ||
.map((k) => [`${this.__invertedScheme[k]}${rowIndex}`, updateData[k]]) | ||
@@ -124,2 +124,3 @@ .forEach((kv) => { | ||
}, {}); | ||
return updatableD; | ||
} | ||
@@ -179,3 +180,3 @@ filterData(options) { | ||
sheetId: sheetID, | ||
dimension: "ROWS", | ||
dimension: 'ROWS', | ||
startIndex: index, | ||
@@ -182,0 +183,0 @@ endIndex: index + 1, |
{ | ||
"name": "oh-my-spreadsheets", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Library for conveniently performing CRUD (Create, Read, Update, Delete) operations on data in Google Sheets.", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
236554
13
485
3