Skip to content

Conversation

malexanderlim
Copy link
Contributor

@malexanderlim malexanderlim commented Dec 4, 2024

Reverts #14818 - need to land client change first, then the original PR.

Copy link

vercel bot commented Dec 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Dec 4, 2024 4:08am
pipedream-docs ⬜️ Ignored (Inspect) Dec 4, 2024 4:08am
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Dec 4, 2024 4:08am

Copy link
Contributor

coderabbitai bot commented Dec 4, 2024

Walkthrough

The pull request introduces a significant update to the Webflow integration by downgrading the version of the @pipedream/webflow component and introducing a new versioned component @pipedream/webflow_v2. Key changes include updates to dependency versions, modifications to method signatures, and the introduction of a new application module webflow_v2.app.mjs. The changes affect various action modules, updating their keys, descriptions, and import paths while maintaining core functionalities.

Changes

File Path Change Summary
components/webflow/package.json Version downgraded to 0.4.6, dependencies updated, new field gitHead added.
components/webflow/webflow.app.mjs Updated Webflow API client integration, refactored methods to use _createApiClient(), method names changed from list* to get*.
components/webflow_v2/actions/* Import path updated to webflow_v2.app.mjs, keys changed to include _v2, version downgraded to 0.0.1, descriptions updated.
components/webflow_v2/package.json New package created for @pipedream/webflow_v2, main entry point defined, dependencies specified.
components/webflow_v2/sources/* Keys updated to include _v2, descriptions modified, version downgraded to 0.0.1.
components/webflow_v2/webflow_v2.app.mjs New application module created with comprehensive methods for managing Webflow API interactions.

Poem

In the garden of code, we hop and play,
With Webflow's new version, bright as the day.
Keys change their names, and links find their way,
A dance of updates, in a whimsical ballet.
Hooray for the changes, let’s jump and say,
"To integration we go, hip-hip-hooray!" 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Outside diff range and nitpick comments (6)
components/webflow_v2/actions/get-item-inventory/get-item-inventory.mjs (1)

4-4: Review version numbering strategy.

The version has been set to 0.0.1 which typically indicates an initial development phase. Given this is a v2 of an existing component:

  1. Consider starting with 2.0.0 to reflect it's a major version upgrade
  2. Ensure the documentation link points to the correct version of the API docs

Consider adopting semantic versioning (SemVer) starting at 2.0.0 to better reflect this is a v2 component. This helps users understand the relationship between versions and potential breaking changes.

Also applies to: 6-7

components/webflow_v2/actions/update-item-inventory/update-item-inventory.mjs (2)

Line range hint 9-47: Add validation for mutually exclusive quantity props

The quantity and updateQuantity props are documented as mutually exclusive, but there's no runtime validation to prevent using both. Consider adding validation in the run method.

 async run({ $ }) {
   const {
     app,
     // eslint-disable-next-line no-unused-vars
     siteId,
     collectionId,
     itemId,
+    quantity,
+    updateQuantity,
     ...data
   } = this;
+
+  if (quantity !== undefined && updateQuantity !== undefined) {
+    throw new Error("Cannot specify both 'quantity' and 'updateQuantity'");
+  }

   const response = await app.updateCollectionItemInventory(collectionId, itemId, data);

Line range hint 48-65: Enhance error handling and success message

Consider the following improvements:

  1. Add try-catch block for better error handling
  2. Include itemId in the success message for better traceability
 async run({ $ }) {
   const {
     app,
     // eslint-disable-next-line no-unused-vars
     siteId,
     collectionId,
     itemId,
     ...data
   } = this;

+  try {
     const response = await app.updateCollectionItemInventory(collectionId, itemId, data);
-    $.export("$summary", "Successfully updated item inventory");
+    $.export("$summary", `Successfully updated inventory for item ${itemId}`);
     return response;
+  } catch (error) {
+    throw new Error(`Failed to update inventory: ${error.message}`);
+  }
 },
components/webflow_v2/sources/new-form-submission/new-form-submission.mjs (1)

8-8: Consider using more specific documentation link

The documentation link has been changed to a more generic section (#trigger-types) instead of the form-submission specific documentation. This might make it harder for users to find relevant information.

Consider reverting to the more specific documentation link:

-  description: "Emit new event when a form is submitted. [See the docs here](https://developers.webflow.com/#trigger-types)",
+  description: "Emit new event when a form is submitted. [See the documentation](https://developers.webflow.com/data/reference/webhooks/events/form-submission)",
components/webflow/webflow.app.mjs (1)

36-36: Fix grammatical error in 'description' of 'collections' propDefinition

The description should read "The list of collections of a site" instead of "The list of collection of a site."

Apply this diff:

  description: "The list of collection of a site",
+ description: "The list of collections of a site",
components/webflow_v2/sources/changed-collection-item/changed-collection-item.mjs (1)

7-7: Review documentation link format

The documentation link format (#model16) appears to be inconsistent with other files that use more descriptive anchors. Consider updating to match the pattern used in other files (e.g., #item-model).

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 2e50568 and f78b906.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (31)
  • components/webflow/package.json (2 hunks)
  • components/webflow/webflow.app.mjs (2 hunks)
  • components/webflow_v2/actions/create-collection-item/create-collection-item.mjs (1 hunks)
  • components/webflow_v2/actions/delete-collection-item/delete-collection-item.mjs (1 hunks)
  • components/webflow_v2/actions/fulfill-order/fulfill-order.mjs (1 hunks)
  • components/webflow_v2/actions/get-collection-item/get-collection-item.mjs (1 hunks)
  • components/webflow_v2/actions/get-collection/get-collection.mjs (1 hunks)
  • components/webflow_v2/actions/get-item-inventory/get-item-inventory.mjs (1 hunks)
  • components/webflow_v2/actions/get-order/get-order.mjs (1 hunks)
  • components/webflow_v2/actions/get-site/get-site.mjs (1 hunks)
  • components/webflow_v2/actions/list-collection-items/list-collection-items.mjs (1 hunks)
  • components/webflow_v2/actions/list-collections/list-collections.mjs (1 hunks)
  • components/webflow_v2/actions/list-orders/list-orders.mjs (1 hunks)
  • components/webflow_v2/actions/list-sites/list-sites.mjs (1 hunks)
  • components/webflow_v2/actions/publish-site/publish-site.mjs (1 hunks)
  • components/webflow_v2/actions/refund-order/refund-order.mjs (1 hunks)
  • components/webflow_v2/actions/unfulfill-order/unfulfill-order.mjs (1 hunks)
  • components/webflow_v2/actions/update-collection-item/update-collection-item.mjs (1 hunks)
  • components/webflow_v2/actions/update-item-inventory/update-item-inventory.mjs (1 hunks)
  • components/webflow_v2/actions/update-order/update-order.mjs (1 hunks)
  • components/webflow_v2/package.json (1 hunks)
  • components/webflow_v2/sources/changed-collection-item/changed-collection-item.mjs (1 hunks)
  • components/webflow_v2/sources/changed-ecommerce-inventory/changed-ecommerce-inventory.mjs (1 hunks)
  • components/webflow_v2/sources/changed-ecommerce-order/changed-ecommerce-order.mjs (1 hunks)
  • components/webflow_v2/sources/common/common.mjs (1 hunks)
  • components/webflow_v2/sources/new-collection-item/new-collection-item.mjs (1 hunks)
  • components/webflow_v2/sources/new-deleted-collection-item/new-deleted-collection-item.mjs (1 hunks)
  • components/webflow_v2/sources/new-ecommerce-order/new-ecommerce-order.mjs (1 hunks)
  • components/webflow_v2/sources/new-form-submission/new-form-submission.mjs (1 hunks)
  • components/webflow_v2/sources/new-site-published/new-site-published.mjs (1 hunks)
  • components/webflow_v2/webflow_v2.app.mjs (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • components/webflow_v2/sources/common/common.mjs
  • components/webflow_v2/package.json
🧰 Additional context used
🪛 GitHub Check: Lint Code Base
components/webflow_v2/sources/changed-ecommerce-inventory/changed-ecommerce-inventory.mjs

[warning] 6-6:
Source names should start with "New". See https://pipedream.com/docs/components/guidelines/#source-name

components/webflow_v2/sources/changed-ecommerce-order/changed-ecommerce-order.mjs

[warning] 6-6:
Source names should start with "New". See https://pipedream.com/docs/components/guidelines/#source-name

components/webflow_v2/sources/new-site-published/new-site-published.mjs

[warning] 6-6:
Source names should start with "New". See https://pipedream.com/docs/components/guidelines/#source-name

components/webflow_v2/sources/changed-collection-item/changed-collection-item.mjs

[warning] 6-6:
Source names should start with "New". See https://pipedream.com/docs/components/guidelines/#source-name

components/webflow_v2/sources/new-deleted-collection-item/new-deleted-collection-item.mjs

[warning] 6-6:
Source names should start with "New". See https://pipedream.com/docs/components/guidelines/#source-name

🔇 Additional comments (45)
components/webflow_v2/actions/get-item-inventory/get-item-inventory.mjs (2)

Line range hint 10-42: LGTM! Core functionality preserved.

The props structure and run method remain unchanged, which is good for maintaining API compatibility while transitioning to the v2 component.


1-1: Verify the import path change impact.

The import path has been updated to use the new webflow_v2.app.mjs. Let's verify that this new module exists and contains all required methods.

✅ Verification successful

Import path change is valid and functional

The verification confirms that:

  • The file components/webflow_v2/webflow_v2.app.mjs exists
  • It contains the required getCollectionItemInventory method
  • The method is properly used in the action file
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and content of webflow_v2.app.mjs

# Check if the file exists and contains the required method
ast-grep --pattern 'export default {
  $$$
  getCollectionItemInventory($$$) {
    $$$
  }
  $$$
}' components/webflow_v2/webflow_v2.app.mjs

Length of output: 142


Script:

#!/bin/bash
# Let's first check if the file exists and see its content
fd "webflow_v2.app.mjs" --type f

# Let's also check for any references to getCollectionItemInventory in the codebase
rg "getCollectionItemInventory" -A 2

Length of output: 750

components/webflow_v2/sources/changed-ecommerce-inventory/changed-ecommerce-inventory.mjs (2)

7-7: Documentation link update looks good

The documentation link has been updated to point to the correct section in the Webflow API docs. The description remains clear and informative.


5-5: Verify version downgrade impact

The component has been downgraded to version 0.0.1 as part of the v2 migration. The key has been updated to include the v2 suffix, which is consistent with the versioning strategy.

Also applies to: 8-8

✅ Verification successful

Version downgrade is consistent with other components

The version downgrade to 0.0.1 in the changed-ecommerce-inventory component is correct and consistent with all other webflow_v2 source components, which are also at version 0.0.1. While the package.json shows version 0.1.0, this is expected as it represents the overall package version. No remaining v1 references were found in the codebase that would need updating.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining v1 references that might need updating
# and verify the version consistency across webflow_v2 components

# Check for any remaining v1 references
rg -g '!*.{lock,md}' "webflow-changed-ecommerce-inventory"

# Check versions of all webflow_v2 components for consistency
fd -e mjs -e json . components/webflow_v2 -x grep -l "version"

Length of output: 1996


Script:

#!/bin/bash
# Let's check the version numbers in webflow_v2 components to verify consistency
# and ensure proper versioning across the components

# Check version numbers in package.json
echo "Package version:"
cat components/webflow_v2/package.json | grep '"version":'

# Check version numbers in source files
echo -e "\nComponent versions:"
fd . components/webflow_v2/sources -e mjs -x grep -l "version" | while read -r file; do
  echo "=== $file ==="
  grep "version:" "$file" -A 1
done

Length of output: 2924

components/webflow_v2/actions/list-sites/list-sites.mjs (3)

Line range hint 1-19: LGTM - Structure maintains backward compatibility

The changes maintain the core functionality while properly implementing the versioning strategy:

  • Import path correctly updated to webflow_v2
  • Component key properly versioned
  • Core functionality remains unchanged

6-6: Verify documentation link validity

The documentation link has been updated. Let's ensure the new link is correct and accessible.


7-7: Verify version downgrade impact

The version has been significantly downgraded from 1.0.0 to 0.0.1. While this aligns with the revert PR's intention, we should verify this doesn't cause dependency conflicts.

✅ Verification successful

Version change is consistent with component structure

The version downgrade to "0.0.1" is actually correct and consistent with the entire webflow_v2 component structure. All actions and sources in the webflow_v2 component (except update-item-inventory) use version "0.0.1", which indicates this is an intentional versioning strategy for the new v2 component. The package.json shows this is part of a new "@pipedream/webflow_v2" package with its own semantic versioning (0.1.0).

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any version dependencies or references
rg -l "0.0.1|1.0.0" --type js components/webflow_v2/

Length of output: 54


Script:

#!/bin/bash
# Let's try a broader search to understand version patterns in the component
fd . components/webflow_v2/ -e mjs -x grep -l "version:"

# Also check for any package.json or similar files that might reference versions
fd package.json components/webflow_v2/

# Check for any version-related imports or dependencies
rg "require|import.*webflow" components/webflow_v2/

Length of output: 4198


Script:

#!/bin/bash
# Let's check the actual version numbers in these files
fd . components/webflow_v2/ -e mjs -x grep -H "version:"

# Also check the package.json content
cat components/webflow_v2/package.json

Length of output: 2925

components/webflow_v2/actions/unfulfill-order/unfulfill-order.mjs (3)

Line range hint 9-33: Implementation logic remains correct

The core functionality for unfulfilling orders is preserved with no changes to the implementation logic, which is appropriate for this revert.


1-1: Verify the import path across all Webflow components

Since this is a revert PR, we should ensure that all related components are consistently using the correct import path.

✅ Verification successful

Let me verify the import paths in more detail to ensure consistency with the revert.


Import paths are consistent across Webflow v2 components

All components under webflow_v2 consistently use the correct import path webflow_v2.app.mjs. No old version imports were found, and the current import in unfulfill-order.mjs follows the correct pattern. The versioned import path aligns with the component's location in the webflow_v2 directory.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistency in Webflow import paths
# Expected: All files should use the same version of imports

# Check for any mixed usage of webflow.app.mjs and webflow_v2.app.mjs
echo "Checking for webflow import paths..."
rg -l "import.*from.*webflow.*\.app\.mjs" components/webflow* | sort

Length of output: 1424


Script:

#!/bin/bash
# Check the actual import statements to verify they're all using webflow_v2.app.mjs
echo "Checking specific import statements..."
rg "import.*from.*webflow.*\.app\.mjs" components/webflow_v2/actions/unfulfill-order/unfulfill-order.mjs -A 1

# Also check if there are any remaining old version imports
echo -e "\nChecking for any old version imports..."
rg "import.*from.*webflow\.app\.mjs" components/webflow*

# Look at git history for the specific file to understand the revert
echo -e "\nChecking recent changes to the file..."
git log -n 2 --oneline components/webflow_v2/actions/unfulfill-order/unfulfill-order.mjs

Length of output: 511


4-7: Review version downgrade implications

The version has been downgraded from 1.0.0 to 0.0.1 and the component key now includes a _v2 suffix. Since this is a revert PR:

  1. Confirm if this version change is intentional
  2. Ensure this won't break existing workflows using the previous version
✅ Verification successful

Version change appears consistent with v2 components

The version change to 0.0.1 aligns with most other webflow_v2 components, which also use version 0.0.1. Only one component (update-item-inventory) uses a different version (0.0.5). Since this is part of the webflow_v2 namespace and most components are consistently versioned at 0.0.1, this change appears intentional and correct.

  • Consider updating update-item-inventory component (version 0.0.5) to match the consistent 0.0.1 versioning across other v2 components
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check version consistency across Webflow v2 components
# Expected: All v2 components should have consistent versioning

echo "Checking component versions..."
rg -l "version: \"0.0.1\"" components/webflow_v2/actions/*/

Length of output: 2112


Script:

#!/bin/bash
# Check if there are any components with version 1.0.0 in webflow_v2
echo "Checking for version 1.0.0..."
rg "version: \"1.0.0\"" components/webflow_v2/actions/*/

# Check if there are any other version numbers
echo -e "\nChecking for other versions..."
rg "version: \"\d+\.\d+\.\d+\"" components/webflow_v2/actions/*/ | grep -v "0.0.1"

# Check git history for version changes
echo -e "\nChecking recent version changes..."
git log -p --no-merges -G "version: \"\d+\.\d+\.\d+\"" -- components/webflow_v2/actions/ | head -n 50

Length of output: 2182

components/webflow_v2/actions/get-order/get-order.mjs (3)

4-4: Version and naming conventions are consistent

The changes follow good practices for component versioning:

  • Component key includes the version suffix
  • Version reset to 0.0.1 for the new major version
  • Documentation link is updated appropriately

Also applies to: 6-7


1-1: Verify the import path resolution

The import path has been updated to reference the v2 version of the Webflow app module.

Let's verify the existence and exports of the referenced module:

✅ Verification successful

Import path is valid and module exports are verified

The webflow_v2.app.mjs module exists at the correct location and exports the necessary functionality, including the getOrder method required by the importing file. The import path ../../webflow_v2.app.mjs correctly resolves to the app module from the action's location.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the imported module exists and verify its exports
fd --type f "webflow_v2.app.mjs" components/
ast-grep --pattern 'export default {
  $$$
}'

Length of output: 68870


Script:

#!/bin/bash
# Let's verify the existence and exports of the webflow_v2 app module specifically
fd --type f "webflow_v2.app.mjs" components/webflow_v2/
ast-grep --pattern 'export default {
  $$$
}' components/webflow_v2/webflow_v2.app.mjs

Length of output: 12690


Line range hint 10-33: Core functionality remains unchanged

The props configuration and implementation logic are preserved, maintaining backward compatibility while allowing for the version transition.

Let's verify that the method signatures in the new app module match the usage:

✅ Verification successful

From the search results, I found the implementation of getOrder method in components/webflow_v2/webflow_v2.app.mjs:

async getOrder(siteId, orderId) {
  return this.webflowClient().orders.get(siteId, orderId);
}

The method signature matches exactly with how it's being used in the action component:

const response = await this.app.getOrder(this.siteId, this.orderId);

Core functionality is correctly preserved

The method signature and implementation in the v2 app module matches the usage in the action component, accepting siteId and orderId parameters in the same order. The functionality remains backward compatible.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the getOrder method signature in the v2 app module
ast-grep --pattern 'getOrder($site, $order) {
  $$$
}'

Length of output: 56


Script:

#!/bin/bash
# Let's try a broader search to find the getOrder method implementation
rg "getOrder" -A 5

Length of output: 44649

components/webflow_v2/actions/publish-site/publish-site.mjs (3)

Line range hint 1-35: LGTM: Core functionality remains unchanged

The core functionality of the component (props structure and run method) remains intact, which is appropriate for a version migration where only metadata changes are needed.


1-1: Verify the import path exists in the codebase

Let's ensure the new import path is valid and consistent with the component structure.

✅ Verification successful

Import path is valid and properly structured

The import path ../../webflow_v2.app.mjs is correct and points to a valid, well-structured app file that exists at components/webflow_v2/webflow_v2.app.mjs. The app file contains all the necessary exports and methods required for the Webflow v2 integration, including the publishSite method which is relevant to this component.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and usage of webflow_v2.app.mjs

# Check if the imported file exists
fd --type f "webflow_v2.app.mjs$" components/

# Check for consistent import patterns across other v2 components
rg --type js "import .* from .*webflow_v2.app.mjs" components/

Length of output: 153


Script:

#!/bin/bash
# Let's verify the import patterns in other files within webflow_v2
rg --type js "import .* from ['\"].*webflow_v2\.app" components/webflow_v2/ -A 2

# Check if there are any other files importing from this component
rg --type js "import .* from ['\"].*webflow_v2" components/ -A 2

# Let's also check the content of the app file to ensure it's properly structured
cat components/webflow_v2/webflow_v2.app.mjs

Length of output: 5386


4-4: Review versioning strategy

The component has been updated with v2-specific identifiers and version reset to 0.0.1, which is consistent with introducing a new major version. However, since this is a revert PR, we should verify if this aligns with the intended state.

A few observations:

  1. Key changed to include _v2 prefix
  2. Version reset to 0.0.1
  3. Documentation link remains unchanged

Also applies to: 6-7

✅ Verification successful

Version and key patterns are consistent with v2 migration

The versioning strategy is correctly implemented:

  • Package version is set to 0.1.0 in package.json
  • Individual components are consistently versioned at 0.0.1
  • All components use the webflow_v2- prefix in their keys
  • Documentation links are properly maintained

This aligns with the expected state for a v2 migration, where components start with a fresh version while the package itself maintains a higher version number.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent versioning across v2 components

# Check version numbers in other v2 components
rg --type js '"version":\s*"0.0.1"' components/webflow_v2/

# Check component key naming pattern
rg --type js '"key":\s*"webflow_v2-' components/webflow_v2/

Length of output: 122


Script:

#!/bin/bash
# Let's try a different approach to verify versioning and key patterns

# Check all version fields in v2 components
rg --type js '"version":\s*"[^"]+"' components/webflow_v2/

# Check all key fields in v2 components
rg --type js '"key":\s*"[^"]+"' components/webflow_v2/

# List all files in webflow_v2 directory to ensure we're searching in the right place
fd . components/webflow_v2/ -t f

Length of output: 2275


Script:

#!/bin/bash
# Let's check the package.json and a few component files to verify versioning and key patterns

# Check package.json content
cat components/webflow_v2/package.json

# Sample a few component files to check their version and key
cat components/webflow_v2/actions/publish-site/publish-site.mjs
cat components/webflow_v2/actions/get-site/get-site.mjs
cat components/webflow_v2/sources/new-site-published/new-site-published.mjs

Length of output: 2557

components/webflow_v2/actions/update-item-inventory/update-item-inventory.mjs (1)

1-8: Verify component version and documentation URL

The component version is set to 0.0.5 which seems low for a production component. Additionally, the documentation URL format has changed. Please ensure:

  1. The version number aligns with the intended component versioning strategy
  2. The new documentation URL is correct and accessible
✅ Verification successful

Version and documentation URL are valid

The version number 0.0.5 appears to be a common version across multiple production components in the repository, suggesting this is a valid versioning pattern. The documentation URL is accessible and returns a 200 status code.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check component version history and documentation URL

# Check if this version exists in other components
echo "Checking for components with similar version..."
rg '"version":\s*"0.0.5"' --type json

# Verify documentation URL
echo "Verifying documentation URL..."
curl -s -I "https://developers.webflow.com/#update-item-inventory" | head -n 1

Length of output: 1911

components/webflow_v2/actions/list-collections/list-collections.mjs (2)

Line range hint 1-24: Code implementation appears sound despite revert concerns

The actual implementation of the list collections functionality is well-structured and follows good practices:

  • Clear property definitions
  • Proper error handling through the app client
  • Appropriate summary export for operation feedback

1-1: Verify the import path change impact

The import path has been updated to use webflow_v2.app.mjs. Since this is part of a revert PR, we should verify if this change aligns with the revert intention.

✅ Verification successful

Import path change is correct and intentional

The import path change from webflow.app.mjs to webflow_v2.app.mjs is correct and justified. The codebase contains two distinct Webflow integrations:

  1. webflow.app.mjs - Uses Webflow API v1.3.1
  2. webflow_v2.app.mjs - Uses the latest Webflow API version

The import change is part of a necessary separation between the two versions, as evidenced by the different API client implementations and version-specific features in both files. This is not a regression but rather a proper versioning strategy.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the history and current state of webflow imports
# Expected: Find evidence of the previous import path if this is truly a revert

# Check for the existence of both app files
fd -e mjs -E node_modules "webflow\.app\.mjs|webflow_v2\.app\.mjs"

# Look for other files that might be importing these modules
rg "import.*webflow.*\.app\.mjs" -t js

Length of output: 185


Script:

#!/bin/bash
# Let's check the content of both app files and their imports
echo "=== Content of webflow_v2.app.mjs ==="
cat components/webflow_v2/webflow_v2.app.mjs

echo -e "\n=== Content of webflow.app.mjs ==="
cat components/webflow/webflow.app.mjs

# Let's also check for all files importing from webflow modules
echo -e "\n=== Files importing from webflow modules ==="
rg "from ['\"].*webflow" -t js

Length of output: 11573

components/webflow_v2/actions/get-site/get-site.mjs (2)

Line range hint 9-24: Implementation looks good

The core functionality remains unchanged and properly aligned with the Webflow API documentation.


1-1: Verify the import path consistency across the codebase

The import path has been updated to use the v2 module. Let's ensure this is consistent across all related files.

✅ Verification successful

Let me verify if all files in the webflow_v2 directory are consistently using the correct import path.


Import paths are consistent across the webflow_v2 component

All files in the webflow_v2 component are using the correct import paths:

  • Actions consistently import from "../../webflow_v2.app.mjs"
  • Sources consistently import from common module, which in turn imports from "../../webflow_v2.app.mjs"
  • The webflow_v2.app.mjs file exists at the correct location
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any inconsistent import paths
# Expect: All imports in webflow_v2 components should use webflow_v2.app.mjs

# Check for any potential inconsistent imports
rg -g 'components/webflow_v2/**/*.mjs' -l 'from.*webflow\.app\.mjs'

# Verify the new app module exists
fd -g 'webflow_v2.app.mjs' components/

Length of output: 149


Script:

#!/bin/bash
# Check all imports in webflow_v2 components
rg -g 'components/webflow_v2/**/*.mjs' '^import.*from' -A 1

# List all .mjs files in webflow_v2 to ensure we're not missing any
fd -e mjs components/webflow_v2/

Length of output: 6178

components/webflow_v2/actions/refund-order/refund-order.mjs (3)

1-1: Verify the existence of the new import path

The import path has been updated to reference the v2 app module.

Let's verify the existence and content of the imported module:

✅ Verification successful

Import path is correctly configured and functional

The verification confirms that:

  1. The webflow_v2.app.mjs module exists and exports the necessary functionality
  2. The import path in refund-order.mjs correctly references this module using a relative path
  3. No references to the old webflow.app.mjs path were found in the codebase
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and exports of the webflow_v2 app module

# Check if the file exists and show its exports
fd --type f "webflow_v2.app.mjs" --exec cat {}

# Verify no references to the old path remain
rg -l "webflow.app.mjs" components/webflow_v2/

Length of output: 5281


Script:

#!/bin/bash
# Let's verify if the import path is correctly used in the refund-order.mjs file
cat components/webflow_v2/actions/refund-order/refund-order.mjs

# Also check if there are any other files still using the old import path
rg "from.*webflow\.app\.mjs" --type js

Length of output: 745


Line range hint 1-31: Verify the revert effectiveness

The overall structure and functionality remain unchanged, with updates focused on versioning and imports.

Let's verify this matches the state before the changes that are being reverted:

✅ Verification successful

Changes in the revert match the original state with minor differences

The revert shows expected differences from the original version:

  • Import path changed from webflow.app.mjs to webflow_v2.app.mjs
  • Component key changed from webflow-refund-order to webflow_v2-refund-order
  • Documentation URL updated to a newer format
  • Version reset from 1.0.0 to 0.0.1

These changes are consistent with the migration to webflow_v2 while maintaining the same core functionality.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Compare with the state before the changes being reverted

# Get the commit hash being reverted
gh pr view 14818 --json mergeCommit --jq .mergeCommit.oid | xargs -I {} \
  git show {}:components/webflow/actions/refund-order/refund-order.mjs 2>/dev/null || \
  echo "Previous version not found"

Length of output: 808


4-4: Review version downgrade and component identification changes

The changes include:

  1. Component key updated to include v2 prefix
  2. Version downgraded from 1.0.0 to 0.0.1
  3. Documentation link format modified

These changes align with the versioning strategy mentioned in the AI summary, but the version downgrade warrants attention.

Let's verify the consistency of these changes across other v2 components:

Also applies to: 6-7

✅ Verification successful

Version consistency verified across webflow_v2 components

All webflow_v2 components follow the same pattern:

  • Keys consistently prefixed with "webflow_v2-"
  • Version set to "0.0.1" across all components except "update-item-inventory" (0.0.5)

The changes in the refund-order component align with the overall versioning pattern in the webflow_v2 directory.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check version consistency across v2 components

# Find all v2 component files and grep for their version and key
fd --type f "\.mjs$" components/webflow_v2/ --exec grep -H "version\|key:" {}

Length of output: 5305

components/webflow_v2/sources/new-form-submission/new-form-submission.mjs (2)

6-6: LGTM: Component key update

The key update to include the v2 prefix is consistent with the versioning strategy and follows the pattern across other Webflow components.


9-9: Verify the version downgrade impact

The version has been significantly downgraded from "1.0.0" to "0.0.1". While this aligns with the v2 migration, ensure this doesn't affect any version-dependent features or integrations.

✅ Verification successful

Version downgrade is consistent with component versioning patterns

The version change from "1.0.0" to "0.0.1" aligns with the versioning patterns observed across other form submission components, where versions commonly start at "0.0.1" or use similar early-stage versioning (0.x.x). This appears to be a deliberate reset for the v2 migration, following established versioning practices in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any version-dependent imports or references
rg -l "require.*webflow.*1\.0\.0" || rg -l "from.*webflow.*1\.0\.0"

# Check package.json for any version constraints
fd -g "package.json" --exec grep -l "webflow.*1\.0\.0" {} \;

Length of output: 132


Script:

#!/bin/bash
# Let's check for any version references in webflow components
fd -g "*.{mjs,js}" -p "components/webflow" --exec grep -l "version.*[0-9]" {} \;

# Check for any imports or dependencies on webflow components
rg -l "webflow.*new-form-submission"

# Check package versioning pattern in similar components
fd -g "new-form-submission.{mjs,js}" --exec grep "version:" {} \;

Length of output: 406

components/webflow/webflow.app.mjs (1)

87-96: ⚠️ Potential issue

Correct documentation for '_createApiClient' method

The documentation comment for the _createApiClient method incorrectly describes it as "Get the auth access token." It should describe the creation of the Webflow API client.

Apply this diff to fix the documentation:

 /**
- * Get the auth access token;
+ * Create a Webflow API client.
 *
- * @returns {string} The base auth access token.
+ * @returns {Object} The Webflow API client instance.
 */

Likely invalid or redundant comment.

components/webflow/package.json (1)

13-14: Verify security implications of downgrading 'webflow-api' dependency

Downgrading the webflow-api package from version 2.4.2 to 1.3.1 may introduce security vulnerabilities or incompatibilities. Please ensure that version 1.3.1 is free of known vulnerabilities.

Run the following script to check for security advisories on webflow-api version 1.3.1:

components/webflow_v2/sources/changed-ecommerce-order/changed-ecommerce-order.mjs (1)

5-8: Verify the documentation link accessibility

The documentation link has been updated to point to a more general section. Please verify that the new link (https://developers.webflow.com/#order-model) is accessible and contains the relevant information about order change events.

The version downgrade to 0.0.1 and component renaming are consistent with the revert changes.

🧰 Tools
🪛 GitHub Check: Lint Code Base

[warning] 6-6:
Source names should start with "New". See https://pipedream.com/docs/components/guidelines/#source-name

components/webflow_v2/sources/new-collection-item/new-collection-item.mjs (1)

5-8: LGTM - Changes align with revert pattern

The changes (version downgrade, component renaming, and documentation update) are consistent with the revert pattern seen across other files. The core functionality remains unchanged.

components/webflow_v2/sources/changed-collection-item/changed-collection-item.mjs (1)

5-5: LGTM - Changes align with revert pattern

The version downgrade and component renaming are consistent with the revert changes across other files.

Also applies to: 8-8

components/webflow_v2/actions/get-collection/get-collection.mjs (1)

1-1: LGTM - Changes align with revert requirements

The modifications correctly revert to the v2 implementation:

  • Import path updated to webflow_v2
  • Component key includes v2 suffix
  • Version reset to 0.0.1
  • Documentation link points to the appropriate v2 API reference

Also applies to: 4-4, 6-7

components/webflow_v2/sources/new-ecommerce-order/new-ecommerce-order.mjs (1)

5-5: LGTM - Source component correctly reverted

The changes appropriately revert the source component to v2:

  • Component key includes v2 suffix
  • Version reset to 0.0.1
  • Documentation link updated to v2 API reference

Also applies to: 8-9

components/webflow_v2/actions/fulfill-order/fulfill-order.mjs (2)

1-1: LGTM - Action component properly reverted

The changes correctly revert the fulfill-order action to v2:

  • Import path updated to webflow_v2
  • Component key includes v2 suffix
  • Version reset to 0.0.1
  • Documentation link points to v2 API reference

Also applies to: 4-4, 6-7


1-1: Verify complete reversion of Webflow components

Let's ensure all Webflow components are properly reverted to v2.

✅ Verification successful

All Webflow components properly configured for v2

The verification shows proper v2 configuration across the codebase:

  • Package.json correctly specifies webflow_v2 with proper dependencies
  • App.mjs uses the v2 client library (webflow-api v2.4.2)
  • No v1 API endpoints found in the codebase
  • The import in question (import app from "../../webflow_v2.app.mjs") is correct and consistent with the v2 implementation
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining v1 references and verify consistent versioning

# Check for any remaining v1 references in webflow components
echo "Checking for v1 references..."
rg -l "webflow[^_]" components/webflow_v2/

# Verify all component versions are set to 0.0.1
echo "Checking component versions..."
rg '"version":\s*"[^0]' components/webflow_v2/

# Verify all component keys include _v2
echo "Checking component keys..."
rg '"key":\s*"(?!.*_v2)' components/webflow_v2/

Length of output: 2495


Script:

#!/bin/bash
# Let's check the content of package.json and a few key files to verify proper v2 configuration

# Check package.json for version and key configuration
echo "Checking package.json configuration..."
cat components/webflow_v2/package.json

# Sample check of app.mjs to verify proper v2 setup
echo -e "\nChecking app.mjs configuration..."
cat components/webflow_v2/webflow_v2.app.mjs

# Check for any v1 imports or references in the codebase
echo -e "\nChecking for potential v1 imports..."
rg -l "from.*webflow[^_v2]" components/webflow_v2/

# Check for any v1 API endpoints or URLs
echo -e "\nChecking for v1 API references..."
rg "api.webflow.com/v1" components/webflow_v2/

Length of output: 6224

components/webflow_v2/actions/get-collection-item/get-collection-item.mjs (1)

1-1: LGTM - Changes align with revert objectives

The modifications to import path, component key, version, and documentation link are consistent with the revert of PR #14818. The core functionality remains intact.

Also applies to: 4-4, 6-7

components/webflow_v2/actions/delete-collection-item/delete-collection-item.mjs (1)

1-1: LGTM - Changes follow revert pattern

The modifications mirror the pattern seen in other files, maintaining consistency in the revert process.

Also applies to: 4-4, 6-7

components/webflow_v2/actions/update-order/update-order.mjs (1)

1-1: LGTM - Changes consistent with revert

The modifications follow the established pattern for the revert. However, let's verify the API endpoint compatibility.

Also applies to: 4-4, 6-7

✅ Verification successful

LGTM - API endpoint implementation matches documentation

The implementation in webflow_v2.app.mjs correctly uses the Webflow API client's orders.update method to update orders, which aligns with the documentation link referenced in the component's description. The import change is part of a consistent revert pattern and doesn't introduce any compatibility issues.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the Webflow API endpoint for updating orders
# Check if the implementation matches the documentation

# Search for updateOrder method implementation
ast-grep --pattern 'updateOrder($$$) {
  $$$
}'

# Search for any API endpoint URLs in the codebase
rg -i 'webflow.*api.*order.*update'

Length of output: 87


Script:

#!/bin/bash
# Let's try a different approach to find the implementation and API endpoint

# Find the update-order file and show its content
fd "update-order.mjs" --exec cat {}

# Search for any order-related URLs or endpoints in the app file
fd "webflow_v2.app.mjs" --exec cat {}

Length of output: 27684

components/webflow_v2/actions/create-collection-item/create-collection-item.mjs (1)

1-1: LGTM! Version and path changes are consistent.

The changes align with the revert PR objectives:

  • Import path updated to use the new v2 module
  • Component key updated with v2 suffix
  • Version reset to 0.0.1 for the new component

Also applies to: 4-4, 6-7

components/webflow_v2/actions/update-collection-item/update-collection-item.mjs (1)

1-1: LGTM! Changes are consistent with the v2 component pattern.

The changes align with the revert PR objectives and maintain consistency with other v2 components:

  • Import path updated to use the new v2 module
  • Component key updated with v2 suffix
  • Version reset to 0.0.1 for the new component

Let's verify consistency across all webflow components:

Also applies to: 4-4, 7-8

✅ Verification successful

Changes are consistent across all webflow v2 components

The verification confirms complete consistency across the webflow v2 components:

  • All components use the correct import path ../../webflow_v2.app.mjs
  • All component keys follow the webflow_v2-* naming pattern
  • All components are versioned at 0.0.1
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent versioning and naming across webflow v2 components

# Check for consistent import paths
echo "Checking import paths..."
rg "import.*from.*webflow.*\.app\.mjs" components/webflow_v2/

# Check for consistent component keys
echo "Checking component keys..."
rg "key:.*webflow" components/webflow_v2/

# Check for consistent versions
echo "Checking versions..."
rg "version:.*0\.0\.1" components/webflow_v2/

Length of output: 7540

components/webflow_v2/actions/list-orders/list-orders.mjs (2)

1-1: Verify the new import path and module compatibility

The import path has been updated to use the new versioned component. Let's verify the existence and compatibility of the new module.

✅ Verification successful

The previous output was truncated and didn't show the webflow_v2 app module. Let's verify its existence and structure to ensure API compatibility with the import in list-orders.mjs.


Import path is valid and module is compatible

The webflow_v2.app.mjs module exists and provides all the necessary functionality, including the listOrders method required by the list-orders.mjs component. The import path is correctly updated as part of the versioned component structure.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of the new app module and check for API compatibility

# Check if the new app module exists
fd --type f "webflow_v2.app.mjs" components/

# Compare the exports between old and new versions
ast-grep --pattern 'export default {
  $$$
  type: "app",
  $$$
}'

Length of output: 65723


Script:

#!/bin/bash
# Let's verify the webflow_v2 app module and its exports
ast-grep --pattern 'export default {
  $$$
  type: "app",
  $$$
}' components/webflow_v2/webflow_v2.app.mjs

# Also check if there are any references to this module in other files
rg -l "webflow_v2.app.mjs" components/webflow_v2/

Length of output: 13949


Line range hint 11-38: Verify API compatibility with Webflow endpoints

While the core logic remains unchanged, we should ensure the API endpoints and response structure are compatible with the current version.

components/webflow_v2/actions/list-collection-items/list-collection-items.mjs (3)

Line range hint 9-35: Implementation remains stable

The core functionality, including props configuration and the run method, remains unchanged, which is good for maintaining stability during the version transition.


1-1: Verify the webflow_v2.app.mjs module compatibility

The import path has been updated to use the v2 version of the Webflow app module.

Let's verify the module exists and exports the required interface:

✅ Verification successful

Let me gather more information about the exports to ensure compatibility.


Let me check one final thing to verify the method implementation in the app file.


Let me try one last search with a different pattern to locate the method.


Import path change to webflow_v2.app.mjs is correct and compatible

The verification confirms that:

  • The webflow_v2.app.mjs module exists in the expected location
  • It exports the required listCollectionItems method with the correct signature
  • The method implementation matches the usage in the component, accepting page and collectionId parameters
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and exports of webflow_v2.app.mjs

# Check if the file exists
fd -e mjs "webflow_v2.app.mjs$" components/

# Check the exports used by this component
ast-grep --pattern 'export default {
  $$$
  listCollectionItems($$$) {
    $$$
  }
  $$$
}' components/webflow_v2/webflow_v2.app.mjs

Length of output: 222


Script:

#!/bin/bash
# Let's examine the actual content of both files to verify interface compatibility

# Check the content of webflow_v2.app.mjs
echo "=== webflow_v2.app.mjs content ==="
rg -A 5 "export default" components/webflow_v2/webflow_v2.app.mjs

# Check how listCollectionItems is used in the component
echo -e "\n=== list-collection-items.mjs usage ==="
rg -A 5 "listCollectionItems" components/webflow_v2/actions/list-collection-items/list-collection-items.mjs

Length of output: 647


Script:

#!/bin/bash
# Let's check the implementation of listCollectionItems in the app file
ast-grep --pattern 'listCollectionItems($$$) {
  $$$
}' components/webflow_v2/webflow_v2.app.mjs

Length of output: 98


Script:

#!/bin/bash
# Search for listCollectionItems in the app file with surrounding context
rg -B 2 -A 5 "listCollectionItems" components/webflow_v2/webflow_v2.app.mjs

Length of output: 616


4-4: Version downgrade requires attention

The version has been significantly downgraded from 1.0.0 to 0.0.1, which could impact dependent components. Also, the documentation link has been updated to point to a different API endpoint.

Let's check for any dependencies on this component's version:

Also applies to: 6-7

Comment on lines +4 to +7
key: "webflow_v2-get-site",
name: "Get Site",
description: "Get a site. [See the documentation](https://developers.webflow.com/data/reference/sites/get)",
version: "1.0.0",
description: "Get a site. [See the docs here](https://developers.webflow.com/#get-specific-site)",
version: "0.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Version inconsistency found in webflow_v2 components

All webflow_v2 components are using version "0.0.1" except for update-item-inventory which is using version "0.0.5". This inconsistency should be addressed.

  • components/webflow_v2/actions/update-item-inventory/update-item-inventory.mjs needs to be downgraded to version "0.0.1" to maintain consistency with other v2 components
🔗 Analysis chain

Verify version consistency across v2 components

The component has been downgraded to version 0.0.1 as part of the v2 migration. Let's ensure this version is consistent across all v2 components.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for version consistency across v2 components
# Expect: All webflow_v2 components should use version 0.0.1

# Search for version declarations in v2 components
rg -g 'components/webflow_v2/**/*.mjs' 'version:.*"[0-9]+\.[0-9]+\.[0-9]+"'

Length of output: 2437

Comment on lines +73 to +74
return items.map((item) => item.orderId);
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Ensure consistent return structure in orders options

The orders propDefinition should return an array of objects with label and value keys for consistency with other propDefinitions.

Apply this diff to fix the issue:

  return items.map((item) => 
-   item.orderId
+   ({
+     label: `Order ${item.orderId}`,
+     value: item.orderId,
+   })
  );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
return items.map((item) => item.orderId);
},
return items.map((item) => ({
label: `Order ${item.orderId}`,
value: item.orderId,
}));
},

Comment on lines +12 to +18
async options({ siteId }) {
const domains = await this.listDomains(siteId);
return domains.map((id, url) => ({
label: url,
id,
}));
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix incorrect parameters in domains mapping function

In the domains propDefinition, the map function parameters are incorrect. The map method should take a single parameter representing each domain object. This ensures proper access to the domain properties.

Apply this diff to fix the issue:

  async options({ siteId }) {
    const domains = await this.listDomains(siteId);
-   return domains.map((id, url) => ({
-     label: url,
-     id,
+   return domains.map((domain) => ({
+     label: domain.name,
+     id: domain._id,
    }));
  },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
async options({ siteId }) {
const domains = await this.listDomains(siteId);
return domains.map((id, url) => ({
label: url,
id,
}));
},
async options({ siteId }) {
const domains = await this.listDomains(siteId);
return domains.map((domain) => ({
label: domain.name,
id: domain._id,
}));
},

name: "Collection Item Deleted",
description: "Emit new event when a collection item is deleted. [See the documentation](https://developers.webflow.com/data/reference/webhooks/events/collection-item-deleted)",
version: "1.0.0",
description: "Emit new event when a collection item is deleted. [See the docs here](https://developers.webflow.com/#item-model)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Update source name to start with 'New'

Per Pipedream's component guidelines, source names should start with "New." Please update the name property to "New Collection Item Deleted."

Apply this diff:

  name: "Collection Item Deleted",
+ name: "New Collection Item Deleted",

Committable suggestion skipped: line range outside the PR's diff.

name: "Site Published",
description: "Emit new event when a site is published. [See the documentation](https://developers.webflow.com/data/reference/webhooks/events/site-publish)",
version: "1.0.0",
description: "Emit new event when a site is published. [See the docs here](https://developers.webflow.com/#trigger-types)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Update source name to start with 'New'

According to Pipedream's component guidelines, source names should start with "New." Please update the name property to "New Site Published."

Apply this diff:

  name: "Site Published",
+ name: "New Site Published",

Committable suggestion skipped: line range outside the PR's diff.

Comment on lines +5 to +8
key: "webflow_v2-list-orders",
name: "List Orders",
description: "List orders. [See the documentation](https://developers.webflow.com/data/reference/ecommerce/orders/list)",
version: "1.0.0",
description: "List orders. [See the docs here](https://developers.webflow.com/#get-all-orders)",
version: "0.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Version inconsistency found in webflow_v2 components

Most components are at version "0.0.1" as expected, but there's an inconsistency:

  • update-item-inventory is at version "0.0.5"

All components consistently:

  • Use the webflow_v2- prefix in their keys
  • Include documentation links to developers.webflow.com
🔗 Analysis chain

Verify consistent versioning across components

The component has been updated with v2 prefix and version reset to 0.0.1. Let's verify this pattern across other components.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistency in component versioning and documentation

# Check for consistent version numbers across v2 components
fd --type f "*.mjs" components/webflow_v2/actions -x rg -A 2 'version: "0.0.1"'

# Check for consistent component key prefixes
fd --type f "*.mjs" components/webflow_v2/actions -x rg 'key: "webflow_v2-'

# Check for consistent documentation links
fd --type f "*.mjs" components/webflow_v2/actions -x rg 'See the docs here.*developers.webflow.com'

Length of output: 1116


Script:

#!/bin/bash
# Description: Check for consistency in component versioning and documentation using fixed strings

# Check for consistent version numbers across v2 components
fd -e mjs --glob "**/webflow_v2/actions/**" -x rg -A 2 'version: "0.0.1"'

# Check for consistent component key prefixes
fd -e mjs --glob "**/webflow_v2/actions/**" -x rg 'key: "webflow_v2-'

# Check for consistent documentation links
fd -e mjs --glob "**/webflow_v2/actions/**" -x rg 'See the docs here.*developers.webflow.com'

Length of output: 243


Script:

#!/bin/bash
# Let's try a simpler approach using direct ripgrep on the components directory

# Check versions in webflow_v2 actions
rg -A 3 'version:' components/webflow_v2/actions/

# Check component keys in webflow_v2 actions
rg 'key:' components/webflow_v2/actions/

# Check documentation links in webflow_v2 actions
rg 'description:' components/webflow_v2/actions/

Length of output: 12483

@malexanderlim malexanderlim merged commit fe7b4bb into master Dec 4, 2024
11 checks passed
@malexanderlim malexanderlim deleted the revert-14818-webflow-migration-followup branch December 4, 2024 04:21
malexanderlim added a commit that referenced this pull request Dec 4, 2024
malexanderlim added a commit that referenced this pull request Dec 4, 2024
malexanderlim added a commit that referenced this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants