@pipedream/google_drive 1.7.0 → 1.7.1
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.
|
@@ -5,8 +5,8 @@ import googleDrive from "../../google_drive.app.mjs";
|
|
|
5
5
|
export default {
|
|
6
6
|
key: "google_drive-find-file",
|
|
7
7
|
name: "Find File",
|
|
8
|
-
description: "Search for a specific file by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
|
|
9
|
-
version: "0.1.
|
|
8
|
+
description: "Search for a specific file by name. The `Search Name` field uses Google Drive's tokenized full-text matching — pass a distinctive word or short phrase rather than the full title when the name contains special characters like `&` or `'`. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
|
|
9
|
+
version: "0.1.21",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
|
12
12
|
openWorldHint: true,
|
|
@@ -6,8 +6,8 @@ import { GOOGLE_DRIVE_FOLDER_MIME_TYPE } from "../../common/constants.mjs";
|
|
|
6
6
|
export default {
|
|
7
7
|
key: "google_drive-find-folder",
|
|
8
8
|
name: "Find Folder",
|
|
9
|
-
description: "Search for a specific folder by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
|
|
10
|
-
version: "0.1.
|
|
9
|
+
description: "Search for a specific folder by name. The `Search Name` field uses Google Drive's tokenized full-text matching — pass a distinctive word or short phrase rather than the full title when the name contains special characters like `&` or `'`. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
|
|
10
|
+
version: "0.1.21",
|
|
11
11
|
annotations: {
|
|
12
12
|
destructiveHint: false,
|
|
13
13
|
openWorldHint: true,
|
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
},
|
|
40
40
|
},
|
|
41
41
|
async run({ $ }) {
|
|
42
|
-
const escapedSearchTerm = this.nameSearchTerm?.replace(/'/g, "\\'") || "";
|
|
42
|
+
const escapedSearchTerm = this.nameSearchTerm?.replace(/\\/g, "\\\\").replace(/'/g, "\\'") || "";
|
|
43
43
|
let q = `mimeType = '${GOOGLE_DRIVE_FOLDER_MIME_TYPE}' and name contains '${escapedSearchTerm}'`.trim();
|
|
44
44
|
if (!this.includeTrashed) {
|
|
45
45
|
q += " and trashed=false";
|
|
@@ -5,8 +5,8 @@ import googleDrive from "../../google_drive.app.mjs";
|
|
|
5
5
|
export default {
|
|
6
6
|
key: "google_drive-find-forms",
|
|
7
7
|
name: "Find Forms",
|
|
8
|
-
description: "List Google Form documents or search for a Form by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
|
|
9
|
-
version: "0.0.
|
|
8
|
+
description: "List Google Form documents or search for a Form by name. The `Search Name` field uses Google Drive's tokenized full-text matching — pass a distinctive word or short phrase rather than the full title when the name contains special characters like `&` or `'`. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
|
|
9
|
+
version: "0.0.22",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
|
12
12
|
openWorldHint: true,
|
|
@@ -5,8 +5,8 @@ import googleDrive from "../../google_drive.app.mjs";
|
|
|
5
5
|
export default {
|
|
6
6
|
key: "google_drive-find-spreadsheets",
|
|
7
7
|
name: "Find Spreadsheets",
|
|
8
|
-
description: "Search for a specific spreadsheet by name. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
|
|
9
|
-
version: "0.1.
|
|
8
|
+
description: "Search for a specific spreadsheet by name. The `Search Name` field uses Google Drive's tokenized full-text matching — pass a distinctive word or short phrase rather than the full title when the name contains special characters like `&` or `'`. [See the documentation](https://developers.google.com/drive/api/v3/search-files) for more information",
|
|
9
|
+
version: "0.1.21",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
|
12
12
|
openWorldHint: true,
|
|
@@ -19,7 +19,8 @@ export default {
|
|
|
19
19
|
: `${q} and ${searchQuery}`;
|
|
20
20
|
} else {
|
|
21
21
|
if (nameSearchTerm) {
|
|
22
|
-
const
|
|
22
|
+
const escapedTerm = nameSearchTerm.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
|
|
23
|
+
const nameQuery = `name contains '${escapedTerm}'`;
|
|
23
24
|
q = q
|
|
24
25
|
? `${q} and ${nameQuery}`
|
|
25
26
|
: nameQuery;
|