Skip to content

Commit d8bae00

Browse files
fix(confluence): handle relative paths when extracting cursor from link (#17910)
* fix(confluence): handle relative paths when extracting cursor from link * bump versions --------- Co-authored-by: Andrew Chuang <[email protected]>
1 parent c376b6c commit d8bae00

File tree

10 files changed

+18
-10
lines changed

10 files changed

+18
-10
lines changed

components/confluence/actions/create-page/create-page.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "confluence-create-page",
55
name: "Create Page",
66
description: "Creates a new page in the space. [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-post)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
confluence,

components/confluence/actions/create-post/create-post.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "confluence-create-post",
55
name: "Create Post",
66
description: "Creates a new page or blog post on Confluence. [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-blog-post/#api-blogposts-post)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
type: "action",
99
props: {
1010
confluence,

components/confluence/actions/delete-post/delete-post.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "confluence-delete-post",
55
name: "Delete Post",
66
description: "Removes a blog post from Confluence by its ID. Use with caution, the action is irreversible. [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-blog-post/#api-blogposts-id-delete)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
type: "action",
99
props: {
1010
confluence,

components/confluence/actions/search-content/search-content.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "confluence-search-content",
55
name: "Search Content",
66
description: "Searches for content using the Confluence Query Language (CQL). [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search#api-wiki-rest-api-search-get)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
type: "action",
99
props: {
1010
confluence,

components/confluence/actions/update-post/update-post.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "confluence-update-post",
66
name: "Update a Post",
77
description: "Updates a page or blog post on Confluence by its ID. [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-blog-post/#api-blogposts-id-put)",
8-
version: "0.0.3",
8+
version: "0.0.4",
99
type: "action",
1010
props: {
1111
confluence,

components/confluence/confluence.app.mjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,15 @@ export default {
146146
_extractCursorFromLink(link) {
147147
if (!link) return null;
148148
try {
149-
const url = new URL(link);
149+
// Handle cases where link might be just a path or relative URL
150+
let url;
151+
if (link.startsWith("http")) {
152+
url = new URL(link);
153+
} else {
154+
// If it's a path or relative URL, construct a full URL
155+
const baseUrl = "https://api.atlassian.com";
156+
url = new URL(link, baseUrl);
157+
}
150158
return url.searchParams.get("cursor");
151159
} catch (e) {
152160
console.log("Error extracting cursor from link:", e);

components/confluence/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/confluence",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Pipedream Confluence Components",
55
"main": "confluence.app.mjs",
66
"keywords": [

components/confluence/sources/new-page-or-blog-post/new-page-or-blog-post.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "confluence-new-page-or-blog-post",
77
name: "New Page or Blog Post",
88
description: "Emit new event whenever a new page or blog post is created in a specified space",
9-
version: "0.0.3",
9+
version: "0.0.4",
1010
type: "source",
1111
dedupe: "unique",
1212
props: {

components/confluence/sources/watch-blog-posts/watch-blog-posts.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "confluence-watch-blog-posts",
77
name: "Watch Blog Posts",
88
description: "Emit new event when a blog post is created or updated",
9-
version: "0.0.3",
9+
version: "0.0.4",
1010
type: "source",
1111
dedupe: "unique",
1212
methods: {

components/confluence/sources/watch-pages/watch-pages.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "confluence-watch-pages",
77
name: "Watch Pages",
88
description: "Emit new event when a page is created or updated in Confluence",
9-
version: "0.0.3",
9+
version: "0.0.4",
1010
type: "source",
1111
dedupe: "unique",
1212
methods: {

0 commit comments

Comments
 (0)