-
Notifications
You must be signed in to change notification settings - Fork 386
fix(plugin-cc): import webex from @webex/plugin-cc using npm #4258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the 📝 WalkthroughWalkthroughThis set of changes updates the Possibly related PRs
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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)
Other keywords and placeholders
Documentation and Community
|
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/@webex/plugin-cc/src/webex-config.ts (1)
3-6: Deduplicate Hydra Service URL keys
BothhydraandhydraServiceUrlare set to the same value. Consider removing one key to avoid redundancy and potential confusion in downstream code.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (8)
packages/@webex/plugin-cc/babel.config.js(1 hunks)packages/@webex/plugin-cc/babel.config.json(0 hunks)packages/@webex/plugin-cc/package.json(2 hunks)packages/@webex/plugin-cc/src/webex-config.ts(1 hunks)packages/@webex/plugin-cc/src/webex.js(1 hunks)packages/webex/package.json(0 hunks)packages/webex/src/contact-center.js(0 hunks)webpack.config.js(1 hunks)
💤 Files with no reviewable changes (3)
- packages/@webex/plugin-cc/babel.config.json
- packages/webex/src/contact-center.js
- packages/webex/package.json
🧰 Additional context used
🧬 Code Graph Analysis (1)
webpack.config.js (1)
tooling/lib/build.js (1)
path(5-5)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: AWS Amplify Console Web Preview
🔇 Additional comments (6)
packages/@webex/plugin-cc/babel.config.js (1)
1-3: Legacy Babel Configuration Integration
The package now directly reuses the shared legacy Babel configuration, ensuring consistent transpilation settings with other Webex packages.webpack.config.js (1)
57-63: Update contact-center entry to use new plugin-cc module
The entry point forcontact-centernow correctly points topackages/@webex/plugin-cc/src/webex.js, reflecting the migration of contact-center functionality into its own scoped package.packages/@webex/plugin-cc/package.json (2)
16-20: Explicit exports field correctly exposes entry points
The newexportsmap cleanly delineates the package root, the standalone./webexentrypoint, andpackage.json, matching the refactored module layout.
45-51: Add necessary plugin dependencies and utility libraries
New internal plugin dependencies (@webex/internal-plugin-support,@webex/plugin-authorization,@webex/plugin-logger) andlodashfor deep-merging configuration have been added to support thewebex.jsimplementation.packages/@webex/plugin-cc/src/webex.js (2)
1-7: Avoid importing the package root within itself
Importing@webex/plugin-ccinside its own module may introduce circular dependencies. Verify that this is intentional (e.g., to register the plugin) and doesn’t lead to self-referencing issues. If not, switch to a relative import of the specific internal module.
16-19: Correct merging of configuration attributes
Theinitmethod properly creates a fresh config object by merging the default SDK type, local settings, and user overrides—preventing mutation of the imported config. Implementation looks solid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (3)
packages/@webex/plugin-cc/babel.config.js(1 hunks)packages/@webex/plugin-cc/jest.config.js(1 hunks)packages/@webex/plugin-cc/test/unit/spec/services/task/TaskManager.ts(0 hunks)
💤 Files with no reviewable changes (1)
- packages/@webex/plugin-cc/test/unit/spec/services/task/TaskManager.ts
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Initialize Project
- GitHub Check: AWS Amplify Console Web Preview
🔇 Additional comments (1)
packages/@webex/plugin-cc/babel.config.js (1)
1-14: LGTM: Babel configuration provides proper transpilation supportThis new Babel configuration replaces the previous JSON configuration and provides proper support for:
- Package version injection via custom plugin
- Modern JavaScript features through preset-env targeting current Node
- TypeScript transpilation
This aligns with the PR objective of restructuring imports to enable directly importing Webex from the @webex/plugin-cc package.
sreenara
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document the tests in the Test section apart from the vidcast.
Good to see this change.
We need to also have changes in the w4d-docs and beta instruction document. Do we have PRs for them?
mkesavan13
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for comments from Sreekanth, the code changes look good to me. However, here's my list:
- This is a breaking change PR for the widgets. So, we need to locally link and test the widgets first. A recording of it will be good
- We also need to have the PR ready on the widgets to quickly update this version, do a thorough testing in the PR amplify app of widgets and merge it in. This is because, if the widgets PR doesn't merge immediately, it is going to block all our SDK fixes from going into widgets
Or as another option, we can have a backward compatible change, take time to make changes in the widgets, test it out extensively, merge and come back here to remove the backward compatibility.
I have the changes ready in widgets with local SDK package linked. Vidcast has the recording for widgets testing also. I will go ahead and raise the PR in widgets the moment SDK version is released with this change. It's one line change in widget for import statement in store.ts file |
No we do not have PR for w4d-docs yet but let me get it ready. And update for beta doc also |
Comments are addressed and Kesava is on leave.
Shreyas281299
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
COMPLETES #https://jira-eng-sjc12.cisco.com/jira/browse/CAI-6482
This pull request addresses
Import webex from @webex/plugin-cc via NPM
by making the following changes
Moved the webex init and export logic within plugin-cc.
Change Type
The following scenarios were tested
Testcase 1: Tested contact-center-min.js by testing in SDK Kiichen Sink App
Testcase 2: Locally linked SDK in widgets repo, updated the import and dependency to use @webex/plugin-cc and tested in widgets react sample app.
Vidcast: https://app.vidcast.io/share/c734d2a1-8f5a-4fa1-9b17-7a1ac958f6d3
The GAI Coding Policy And Copyright Annotation Best Practices
I certified that
I have read and followed contributing guidelines
I discussed changes with code owners prior to submitting this pull request
I have not skipped any automated checks
All existing and new tests passed
I have updated the documentation accordingly
Make sure to have followed the contributing guidelines before submitting.