Skip to content

Commit 5cbe03a

Browse files
committed
Minor fixes: addressed CodeRabbit comments
1 parent 6b15621 commit 5cbe03a

File tree

7 files changed

+28
-25
lines changed

7 files changed

+28
-25
lines changed

components/google_search_console/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The Google Search Console API opens a treasure trove of data and insights about
1212

1313
## Available Actions
1414

15-
[Get Site Performance Data](components/google_search_console/actions/retrieve-site-performance-data/README.md)
16-
[Submit URL to Google Indexing API](components/google_search_console/actions/submit-url-for-indexing/README.md)
15+
[Retrieve Site Performance Data](./actions/retrieve-site-performance-data/README.md)
16+
[Submit URL for Indexing](./actions/submit-url-for-indexing/README.md)
17+
1718

components/google_search_console/actions/submit-url-for-indexing/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Use this action when:
2424

2525
## 🔐 Auth
2626

27-
Requires OAuth 2.0 with this scope: https://www.googleapis.com/auth/indexing
27+
+Requires OAuth 2.0 with [indexing](https://www.googleapis.com/auth/indexing) scope:
2828

2929
## 🔗 Endpoint
3030

31-
https://indexing.googleapis.com/v3/urlNotifications:publish
31+
[https://indexing.googleapis.com/v3/urlNotifications:publish](https://www.googleapis.com/auth/indexing)
Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
// Returns a new object containing only standard prop fields, removing any custom keys.
22
// Considered using JSON deep cloning, but opted for a manual approach to safely preserve functions or complex types in future data structures.
33
export function removeCustomPropFields(input) {
4-
const blacklist = ["extendedType", "postBody"];
5-
const clean = {};
6-
7-
for (const key in input) {
8-
const prop = input[key];
9-
const cloned = {};
10-
11-
for (const field in prop) {
12-
if (!blacklist.includes(field)) {
13-
cloned[field] = prop[field];
4+
const blacklist = new Set(["extendedType", "postBody"]);
5+
const clean = {};
6+
7+
for (const key of Object.keys(input)) {
8+
const prop = input[key];
9+
const cloned = {};
10+
11+
for (const field of Object.keys(prop)) {
12+
if (!blacklist.has(field)) {
13+
cloned[field] = prop[field];
14+
}
1415
}
15-
};
16+
17+
clean[key] = cloned;
18+
}
19+
20+
return clean;
21+
}
1622

17-
clean[key] = cloned;
18-
};
1923

20-
return clean;
21-
}
2224

23-
// return the rimmed string or input as is if its not a string
25+
// return the trimmed string or input as is if its not a string
2426
export function trimIfString(input) {
2527
return (typeof input === 'string') ? input.trim() : input;
2628
};

components/google_search_console/tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Local Tests Directory
1+
# Local Tests Directory
22

33
This folder contains **non-production test scripts** used for developing and validating Pipedream components locally.
44
**You can safely delete the entire folder** — it does not affect runtime or deployment.
55

66
---
77

8-
## Folder Structure
8+
## Folder Structure
99

1010
### `action-tests/`
1111
Component-level test runners that simulate a real Pipedream `$` context using `mockery-dollar.mjs`.

components/google_search_console/tests/methods/test-checkIfUrlValid.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import methods from "../../common/methods.mjs";
22
import bogus from "./bogus-data/bogus-data-url.mjs";
33

44

5-
// Any other case from bogus data shoul lead to throw
5+
// Any other case from bogus data should lead to throw
66
// Valid data : expected result;
77
const validCases = {
88

components/google_search_console/tests/methods/test-throwIfNotYMDDashDate.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const validCases = {
1212

1313

1414

15-
console.log("Running checkUrl() tests...");
15+
console.log("Running throwIfNotYMDDashDate() tests...");
1616

1717
let counterOfFails = 0;
1818

components/google_search_console/tests/mockery-dollar.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This is just mockery for test runs. Immitiates $ runtime.
1+
// This is just mockery for test runs. Imitates $ runtime.
22
export default {
33
$ : {
44
export : (a,b) => console.log(a,b),

0 commit comments

Comments
 (0)