@sap/cds-dk
Advanced tools
Comparing version 6.0.2 to 6.0.3
@@ -70,4 +70,8 @@ #!/usr/bin/env node | ||
function _local (id) { | ||
return require.resolve (id, {paths:[process.cwd(), __dirname]}) | ||
function _local (id, _else) { | ||
try { return require.resolve (id, {paths:[process.cwd(), __dirname]}) } | ||
catch(e) { | ||
if (_else) return _else(e) | ||
else throw e | ||
} | ||
} | ||
@@ -84,3 +88,3 @@ | ||
// IMPORTANT: have a separate env here, so that the normal one is not initialized before `cds_cli.args` above | ||
const env = require (_local('@sap/cds/lib/env')).for('cds') | ||
const env = require (_local('@sap/cds/lib/env/cds-env', ()=>_local('@sap/cds/lib/env'))).for('cds') | ||
const cds = require (_local('@sap/cds')) | ||
@@ -87,0 +91,0 @@ return !!cds.resolve(argv,{env,cache:{}}) |
module.exports = Object.assign(deploy, { | ||
options: ['--to', '--tunnel-address'], | ||
options: ['--to', '--tunnel-address', '--vcap-file'], | ||
flags: [ '--no-save', '--auto-undeploy', '--dry', '--with-mocks', '--store-credentials', '--bind' ], | ||
@@ -45,2 +45,8 @@ shortcuts: ['-2'], | ||
*--vcap-file* (beta feature) | ||
Use credentials from the given file when deploying to *SAP HANA*, instead of | ||
creating new credentials. File must be in *default-env.json* format, with a root | ||
node *VCAP_SERVICES*. | ||
*--store-credentials* (only in combination with *--to hana*) | ||
@@ -47,0 +53,0 @@ |
@@ -9,2 +9,17 @@ # Change Log | ||
## Version 6.0.3 - 2022-07-14 | ||
### Changed | ||
- `cds init` uses latest Maven Java archetype version 1.26.0 for creating Java projects. | ||
- `cds init` now creates Node.js projects with version 6 of `@sap/cds` | ||
### Fixed | ||
- `--vcap-file` parameter of `cds deploy` is available again (removed in 6.0.0) | ||
- `cds add helm:connectivity`: `connectivity.configMapName` was not used for the `connectivity-proxy-info`. | ||
- `cds add helm:connectivity`: Environment variables added for connectivity service for Java. | ||
- `cds add helm`: Generation of `xs-security.json` file works on Windows now (`cds compile srv -2 xsuaa` command failed). | ||
## Version 6.0.2 - 2022-07-06 | ||
@@ -11,0 +26,0 @@ |
@@ -1,2 +0,1 @@ | ||
const Config = require('@sap/cds/lib/env') | ||
const cds = require('../cds') | ||
@@ -8,3 +7,3 @@ const LOG = cds.log('bind'); | ||
function getUnresolvedBindings({cwd = process.cwd(), env}) { | ||
if (!env) env = Config.for('cds', cwd) | ||
if (!env) env = cds.env.for('cds', cwd) | ||
if (feature(env) === false || feature(env) === "false") return {} | ||
@@ -11,0 +10,0 @@ |
const os = require('os'); | ||
const MAVEN_ARCHETYPE_VERSION = '1.25.0'; | ||
const MAVEN_ARCHETYPE_VERSION = '1.26.0'; | ||
@@ -5,0 +5,0 @@ const constants = { |
@@ -11,3 +11,3 @@ const os = require("os"); | ||
const { OPTION_LINT_DEV, OPTION_LINT_GLOBAL } = require("../../constants"); | ||
const { mkdirp, fs } = require("@sap/cds/lib/utils"); | ||
const { mkdirp, fs } = require("@sap/cds").utils; | ||
const { getConfigPath, getFileExtensions } = require("@sap/eslint-plugin-cds/lib/api"); | ||
@@ -14,0 +14,0 @@ const generators = require("../../../lint/generators"); |
@@ -0,3 +1,3 @@ | ||
const cds = require('@sap/cds'); | ||
const path = require('path'); | ||
const Config = require('@sap/cds/lib/env'); | ||
@@ -62,3 +62,3 @@ const TemplateUtil = require('../util/templateUtil'); | ||
return Config.for('cds', projectPath); | ||
return cds.env.for('cds', projectPath); | ||
} | ||
@@ -65,0 +65,0 @@ |
const path = require('path') | ||
const { nullLogger } = require('../util/logger') | ||
const { BuildTaskFactory } = require('@sap/cds/bin/build') | ||
const { fs } = require('@sap/cds/lib/utils') | ||
const { fs } = require('@sap/cds').utils | ||
const P_LANGUAGE_JAVA = 'java' | ||
@@ -6,0 +6,0 @@ const P_LANGUAGE_NODEJS = 'nodejs' |
@@ -8,2 +8,8 @@ const wrapFeature = require('../wrapFeature'); | ||
deployment.env = { | ||
...(deployment.env || {}), | ||
CDS_ENVIRONMENT_K8S_SERVICEBINDINGS_CONNECTIVITY_SECRETSPATH: '/bindings/connectivity', | ||
CDS_ENVIRONMENT_K8S_SERVICEBINDINGS_CONNECTIVITY_SERVICE: 'connectivity' | ||
}; | ||
deployment.additionalVolumes = deployment.additionalVolumes || []; | ||
@@ -10,0 +16,0 @@ deployment.additionalVolumes.push( |
@@ -1,10 +0,13 @@ | ||
const { exec } = require("../../util/exec"); | ||
const cds = require('../../compile') | ||
const Path = require('path'); | ||
async function renderXsSecurityJson(projectPath) { | ||
const result = await exec({ | ||
cwd: projectPath, | ||
stdio: ["inherit", "pipe", "inherit"], | ||
})`cds compile srv -2 xsuaa`; | ||
const xsSecurityJson = result.stdout; | ||
return xsSecurityJson; | ||
const xsSecurityJson = await(async () => { | ||
try { | ||
const models = await cds.load(Path.join(projectPath, cds.env.folders.srv)) | ||
return cds.compile.to.xsuaa(models) | ||
} catch (error) { /* ignore */ } | ||
})() || { scopes: [], attributes: [], 'role-templates': [], 'authorities-inheritance': false } | ||
return JSON.stringify(xsSecurityJson, null, 2); | ||
} | ||
@@ -11,0 +14,0 @@ |
@@ -5,3 +5,3 @@ const fs = require("fs"); | ||
const path = require("path"); | ||
const { mkdirp } = require("@sap/cds/lib/utils"); | ||
const { mkdirp } = require("@sap/cds").utils; | ||
const term = require("../util/term"); | ||
@@ -8,0 +8,0 @@ |
{ | ||
"name": "@sap/cds-dk", | ||
"version": "6.0.2", | ||
"version": "6.0.3", | ||
"description": "Command line client and development toolkit for the SAP Cloud Application Programming Model", | ||
@@ -19,3 +19,3 @@ "homepage": "https://cap.cloud.sap/", | ||
"dependencies": { | ||
"@sap/cds": "^6.0.2", | ||
"@sap/cds": "^6.0.3", | ||
"@sap/cds-foss": "^4", | ||
@@ -22,0 +22,0 @@ "@sap/eslint-plugin-cds": "^2.3.3", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
1235077
27498
+ Added@sap/cds@6.0.3(transitive)
+ Addedbig.js@6.2.1(transitive)
- Removed@sap/cds@6.0.2(transitive)
- Removedbig.js@6.2.0(transitive)
Updated@sap/cds@^6.0.3