triangle-utils 1.4.153 → 1.4.155

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.
@@ -168,7 +168,6 @@ export class UtilsRDS {
168
168
  const sql = "INSERT INTO " + table_id + " (" + attribute_names.join(", ") + ")" + " VALUES " + items.slice(i, i + batch_num_items).map(item => "(" + attribute_names.map(attribute_name => convert_rds_input(item[attribute_name])).join(", ") + ")").join(", ") + " ON CONFLICT ON CONSTRAINT " + table_id + "_pkey DO NOTHING;";
169
169
  try {
170
170
  await this.exec(sql, options);
171
- return;
172
171
  }
173
172
  catch (error) {
174
173
  console.log(error.stack);
@@ -187,7 +187,7 @@ export class UtilsS3 {
187
187
  }
188
188
  const command = new GetObjectCommand({
189
189
  ...s3_input,
190
- ResponseContentDisposition: name !== undefined ? ("attachment; filename = \"" + name + "\"") : undefined
190
+ ResponseContentDisposition: name !== undefined ? ("filename = \"" + name + "\"") : undefined
191
191
  });
192
192
  const url = await getSignedUrl(this.s3, command);
193
193
  return url;
package/dist/src/f.js CHANGED
@@ -81,3 +81,5 @@ const utils = new TriangleUtils(config);
81
81
  // .then(user => console.log(user))
82
82
  // await utils.bedrock.cohere_invoke("cohere.embed-v4", "yyyyyuuuuuurrrrr")
83
83
  // .then(response => console.log(response))
84
+ await utils.s3.get_download_url("s3://triangle-675045717295-us-east-1-an/tenant_documents/a3a9627f-a94d-4d47-a110-307a6f5563af/a146d789-da40-4e3c-a132-8b7110f3f7df.pdf", { name: "hye.pdf" })
85
+ .then(response => console.log(response));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-utils",
3
- "version": "1.4.153",
3
+ "version": "1.4.155",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
package/src/UtilsRDS.ts CHANGED
@@ -235,7 +235,6 @@ export class UtilsRDS {
235
235
  const sql = "INSERT INTO " + table_id + " (" + attribute_names.join(", ") + ")" + " VALUES " + items.slice(i, i + batch_num_items).map(item => "(" + attribute_names.map(attribute_name => convert_rds_input(item[attribute_name])).join(", ") + ")").join(", ") + " ON CONFLICT ON CONSTRAINT " + table_id + "_pkey DO NOTHING;"
236
236
  try {
237
237
  await this.exec(sql, options)
238
- return
239
238
  } catch (error : any) {
240
239
  console.log(error.stack)
241
240
  console.log(sql)
package/src/UtilsS3.ts CHANGED
@@ -208,7 +208,7 @@ export class UtilsS3 {
208
208
  }
209
209
  const command = new GetObjectCommand({
210
210
  ...s3_input,
211
- ResponseContentDisposition: name !== undefined ? ("attachment; filename = \"" + name + "\"") : undefined
211
+ ResponseContentDisposition: name !== undefined ? ("filename = \"" + name + "\"") : undefined
212
212
  })
213
213
  const url = await getSignedUrl(this.s3, command)
214
214
  return url
package/src/f.ts CHANGED
@@ -101,4 +101,7 @@ const utils = new TriangleUtils(config)
101
101
  // .then(user => console.log(user))
102
102
 
103
103
  // await utils.bedrock.cohere_invoke("cohere.embed-v4", "yyyyyuuuuuurrrrr")
104
- // .then(response => console.log(response))
104
+ // .then(response => console.log(response))
105
+
106
+ await utils.s3.get_download_url("s3://triangle-675045717295-us-east-1-an/tenant_documents/a3a9627f-a94d-4d47-a110-307a6f5563af/a146d789-da40-4e3c-a132-8b7110f3f7df.pdf", { name : "hye.pdf" })
107
+ .then(response => console.log(response))