@sap/cds-compiler
Advanced tools
Comparing version 4.7.4 to 4.7.6
@@ -83,6 +83,21 @@ 'use strict'; | ||
// Nothing to do if already draft-enabled (composition traversal may have circles) | ||
if (filterDict[artifactName]) | ||
if ((artifact['@Common.DraftRoot.PreparationAction'] || artifact['@Common.DraftNode.PreparationAction']) && | ||
artifact.actions && artifact.actions.draftPrepare) | ||
return; | ||
const draftPrepare = createAction('draftPrepare', artifactName, 'SideEffectsQualifier', 'cds.String'); | ||
assignAction(draftPrepare, artifact); | ||
// Generate the actions into the draft-enabled artifact (only draft roots can be activated/edited) | ||
// action draftPrepare (SideEffectsQualifier: String) return <artifact>; | ||
if (artifact === rootArtifact) { | ||
// action draftActivate() return <artifact>; | ||
const draftActivate = createAction('draftActivate', artifactName); | ||
assignAction(draftActivate, artifact); | ||
// action draftEdit (PreserveChanges: Boolean) return <artifact>; | ||
const draftEdit = createAction('draftEdit', artifactName, 'PreserveChanges', 'cds.Boolean'); | ||
assignAction(draftEdit, artifact); | ||
} | ||
// Generate the DraftAdministrativeData projection into the service, unless there is already one | ||
@@ -199,18 +214,2 @@ // @ts-ignore | ||
} | ||
// Generate the actions into the draft-enabled artifact (only draft roots can be activated/edited) | ||
// action draftPrepare (SideEffectsQualifier: String) return <artifact>; | ||
const draftPrepare = createAction('draftPrepare', artifactName, 'SideEffectsQualifier', 'cds.String'); | ||
assignAction(draftPrepare, artifact); | ||
if (artifact === rootArtifact) { | ||
// action draftActivate() return <artifact>; | ||
const draftActivate = createAction('draftActivate', artifactName); | ||
assignAction(draftActivate, artifact); | ||
// action draftEdit (PreserveChanges: Boolean) return <artifact>; | ||
const draftEdit = createAction('draftEdit', artifactName, 'PreserveChanges', 'cds.Boolean'); | ||
assignAction(draftEdit, artifact); | ||
} | ||
} | ||
@@ -217,0 +216,0 @@ } |
{ | ||
"name": "@sap/cds-compiler", | ||
"version": "4.7.4", | ||
"version": "4.7.6", | ||
"description": "CDS (Core Data Services) compiler and backends", | ||
@@ -5,0 +5,0 @@ "homepage": "https://cap.cloud.sap/", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4824446
98922