@sap/cds-mtxs
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -9,2 +9,6 @@ # Change Log | ||
## Version 2.0.3 - 2024-07-19 | ||
- `cdsc` options from the main application are not propagated to the t0 tenant any longer. | ||
## Version 2.0.2 - 2024-07-11 | ||
@@ -11,0 +15,0 @@ |
{ | ||
"name": "@sap/cds-mtxs", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "SAP Cloud Application Programming Model - Multitenancy library", | ||
@@ -5,0 +5,0 @@ "homepage": "https://cap.cloud.sap/", |
@@ -183,6 +183,6 @@ const cds = require('@sap/cds/lib'), {db} = cds.env.requires | ||
async function build (outRoot, csn, updateCsvs) { | ||
async function build (outRoot, csn, updateCsvs, tenant) { | ||
const out = await fs.mkdirp(outRoot,'src','gen'), gen = [] | ||
const hanaArtifacts = _compileToHana(csn) | ||
const hanaArtifacts = _compileToHana(csn, tenant) | ||
@@ -263,3 +263,3 @@ const { getArtifactCdsPersistenceName } = cds.compiler | ||
if (csn) try { | ||
await build(out, csn, updateCsvs) | ||
await build(out, csn, updateCsvs, tenant) | ||
DEBUG?.('finished HANA build') | ||
@@ -319,5 +319,5 @@ } catch (e) { | ||
function _compileToHana(csn) { | ||
cds.env.cdsc = main.env.cdsc // add cdsc options from main | ||
function _compileToHana(csn, tenant) { | ||
const options = { messages: [], sql_mapping: cds.env.sql.names, assertIntegrity: false } | ||
if (tenant !== t0) Object.assign(options, main.env.cdsc); | ||
let definitions = [] | ||
@@ -324,0 +324,0 @@ |
@@ -6,2 +6,3 @@ const cds = require('@sap/cds/lib'), {db} = cds.requires, {fs, rimraf, path} = cds.utils | ||
const { readData } = require('../extensibility/utils') | ||
const main = require('../config') | ||
@@ -35,2 +36,4 @@ exports.activated = (db?.kind in { 'sqlite':1, 'better-sqlite':2 }) && 'SQLite database' | ||
const deployOptions = cds.requires.extensibility ? { schema_evolution: 'auto' } : {} | ||
const t0 = cds.requires.multitenancy?.t0 ?? 't0' | ||
if (t !== t0) Object.assign(deployOptions, main.env.cdsc) | ||
@@ -37,0 +40,0 @@ const extCsvs = await _readExtCsvs(t) |
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
252071
4670