Skip to content

Added support for preview token and optimize the create method #367

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

Merged
merged 3 commits into from
Jun 3, 2025

Conversation

sunil-lakshman
Copy link
Contributor

No description provided.

@sunil-lakshman sunil-lakshman requested a review from a team as a code owner June 2, 2025 12:34
Copy link

github-actions bot commented Jun 2, 2025

Coverage report for commit: b70d2e4
File: coverage/clover.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  10% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  20% │ ██░░░░░░░░░░░░░░░░░░░░░ │  2.3%
  30% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  40% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  50% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  60% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  70% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  80% │ ██████████░░░░░░░░░░░░░ │ 18.2%
  90% │ ███████████████████████ │ 43.2%
 100% │ ████████████████████░░░ │ 36.4%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: 88.70% | Methods: 97.67% | Branches: 73.16%
FilesLinesMethodsBranches
lib
   contentstack.js83.33%100.00%84.62%
   contentstackClient.js80.85%92.86%64.15%
   contentstackCollection.js94.12%100.00%86.67%
   entity.js81.82%100.00%65.13%
lib/core
   Util.js96.36%100.00%83.64%
   concurrency-queue.js86.22%87.18%76.62%
   contentstackError.js100.00%100.00%100.00%
   contentstackHTTPClient.js96.77%100.00%93.65%
   oauthHandler.js92.54%100.00%70.07%
lib/organization
   index.js81.82%100.00%60.49%
lib/organization/teams
   index.js92.11%100.00%68.42%
lib/organization/teams/stackRoleMappings
   index.js89.29%100.00%58.14%
lib/organization/teams/teamUsers
   index.js100.00%100.00%93.75%
lib/query
   index.js80.43%100.00%67.27%
lib/stack/asset/folders
   index.js100.00%100.00%100.00%
lib/stack/asset
   index.js93.06%100.00%81.18%
lib/stack/auditlog
   index.js95.83%100.00%75.00%
lib/stack/branch
   compare.js81.82%100.00%71.88%
   index.js97.44%100.00%80.56%
   mergeQueue.js100.00%100.00%73.68%
lib/stack/branchAlias
   index.js86.21%100.00%65.85%
lib/stack/contentType/entry
   index.js88.39%100.00%64.60%
lib/stack/contentType/entry/variants
   index.js86.21%100.00%68.57%
lib/stack/contentType
   index.js89.23%100.00%74.03%
lib/stack/deliveryToken
   index.js95.24%80.00%89.47%
lib/stack/deliveryToken/previewToken
   index.js21.43%25.00%14.29%
lib/stack/environment
   index.js100.00%100.00%100.00%
lib/stack/extension
   index.js95.92%100.00%87.76%
lib/stack/globalField
   index.js94.44%100.00%84.31%
lib/stack
   index.js84.43%92.86%73.19%
lib/stack/label
   index.js100.00%100.00%100.00%
lib/stack/locale
   index.js100.00%100.00%100.00%
lib/stack/managementToken
   index.js100.00%100.00%94.44%
lib/stack/release
   index.js91.11%100.00%72.34%
lib/stack/roles
   index.js100.00%100.00%100.00%
lib/stack/taxonomy
   index.js88.00%100.00%64.52%
lib/stack/taxonomy/terms
   index.js92.31%100.00%72.55%
lib/stack/variantGroup
   index.js86.84%100.00%65.12%
lib/stack/variantGroup/variants
   index.js85.00%100.00%60.78%
lib/stack/variants
   index.js84.21%100.00%59.57%
lib/stack/webhook
   index.js89.66%100.00%72.88%
lib/stack/workflow
   index.js89.09%100.00%72.31%
lib/stack/workflow/publishRules
   index.js100.00%100.00%100.00%
lib/user
   index.js94.29%100.00%82.14%

🤖 comment via lucassabreu/comment-coverage-clover

Copy link
Contributor

@nadeem-cs nadeem-cs left a comment

Choose a reason for hiding this comment

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

Hey @sunil-lakshman , this PR looks good for creating preview token seperately. But it seems like the functionality for creating preview token when creating deliverytoken is removed. How are we planning to add it back again?

@sunil-lakshman
Copy link
Contributor Author

Hey @sunil-lakshman , this PR looks good for creating preview token seperately. But it seems like the functionality for creating preview token when creating deliverytoken is removed. How are we planning to add it back again?

@nadeem-cs Thanks for pointing that out. I checked with the CMA team, and the create_with_preview_token: true setting was mainly used by the UI operations, not the API. So we're not actually removing any API functionality. We'll also make sure to include the proper steps for creating preview tokens in our official docs soon.

@sunil-lakshman
Copy link
Contributor Author

Hey @sunil-lakshman , this PR looks good for creating preview token seperately. But it seems like the functionality for creating preview token when creating deliverytoken is removed. How are we planning to add it back again?

@nadeem-cs Thanks for pointing that out. I checked with the CMA team, and the create_with_preview_token: true setting was mainly used by the UI operations, not the API. So we're not actually removing any API functionality. We'll also make sure to include the proper steps for creating preview tokens in our official docs soon.

@nadeem-cs As discussed removed the default param create_with_preview_token: true from delivery token module and provided an option to pass the param from the user end.

@sunil-lakshman sunil-lakshman merged commit c41c8f9 into development Jun 3, 2025
21 checks passed
@sunil-lakshman sunil-lakshman deleted the enh/dx-3027 branch June 3, 2025 09:32
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