Skip to content

feat: use default options from dk#33

Closed
SirSimon04 wants to merge 3 commits intomainfrom
feat-use-new-dk
Closed

feat: use default options from dk#33
SirSimon04 wants to merge 3 commits intomainfrom
feat-use-new-dk

Conversation

@SirSimon04
Copy link
Contributor

@SirSimon04 SirSimon04 commented Mar 11, 2026

New cds-dk (9.8) has support for default options for import

Writing to package json is done automitacally by dk

@SirSimon04 SirSimon04 requested a review from a team as a code owner March 11, 2026 12:55
@hyperspace-insights
Copy link
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:


Use Default Import Options from cds-dk

New Feature

✨ Leverages the new default options support introduced in cds-dk 9.8 for the cds import --from process command. This removes the need to manually register services in package.json during import, as the default options (no_copy: true, as: 'cds', config: 'kind=rest') are now set via cds.import.options.

Changes

  • cds-plugin.ts: Registers default import options (no_copy: true, as: 'cds', config: 'kind=rest') on cds.import.options.process, delegating configuration to cds-dk instead of handling it manually.
  • lib/processImport.ts: Removed the manual addServiceToPackageJson calls and the associated getModelPathFromFilePath helper function, as well as the entire PACKAGE.JSON UPDATE section. These responsibilities are now handled by cds-dk's default options mechanism.
  • tests/bookshop/package.json: Updated the service kind from "external" to "rest" to align with the new default import configuration.
  • tests/bookshop/srv/external/...shipmentHandler.cds: Updated checksum, made shipmentProcessResultOutput output field optional (removed not null), added a new ProcessInstanceStatus type, and updated the getInstancesByBusinessKey function to use the new ProcessInstanceStatus type instead of many String.

  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.18 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Correlation ID: 90de9380-1d49-11f1-8385-1f8e96505e34
  • Summary Prompt: Default Prompt
  • LLM: anthropic--claude-4.6-sonnet
  • Output Template: Default Template
  • Event Trigger: pull_request.opened

💌 Have ideas or want to contribute? Create an issue and share your thoughts with us!
📑 Check out the documentation for more information.
📬 Subscribe to the Hyperspace PR Bot DL to get the latest announcements and pilot features!

Made with ❤️ by Hyperspace.

Copy link
Contributor

@hyperspace-insights hyperspace-insights bot left a comment

Choose a reason for hiding this comment

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

The PR introduces default import options via the new cds-dk 9.8 API, removes the now-redundant package.json mutation logic, and updates the test fixture accordingly. One substantive issue was found: the process options entry uses plain assignment instead of ??=, which would silently overwrite any user-configured options, inconsistent with the defensive ??= pattern used throughout the rest of the registration code.

PR Bot Information

Version: 1.18 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • LLM: anthropic--claude-4.6-sonnet
  • Correlation ID: 90de9380-1d49-11f1-8385-1f8e96505e34
  • Event Trigger: pull_request.opened

@SirSimon04 SirSimon04 marked this pull request as draft March 11, 2026 12:58
@SirSimon04
Copy link
Contributor Author

Somebody please fix the typescript ***

@SirSimon04
Copy link
Contributor Author

overruled by #36

@SirSimon04 SirSimon04 closed this Mar 12, 2026
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.

1 participant