@sap/cds-dk 6.2.1 → 6.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ This project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
8
  The format is based on [Keep a Changelog](http://keepachangelog.com/).
9
9
 
10
+ ## Version 6.2.2 - 2022-10-13
11
+
12
+ ### Added
13
+
14
+ - `cds deploy --to postgres --dry` to create drop/create DDL for PostgreSQL. Full deployment (w/o `--dry`) is not yet supported, though.
15
+
16
+ ### Fixed
17
+
18
+ - `cds deploy --to sql` now honors the `cds.sql.dialect` configuration to specify SQL dialects like `postgres`.
19
+
10
20
  ## Version 6.2.1 - 2022-10-10
11
21
 
12
22
  ### Fixed
@@ -0,0 +1,4 @@
1
+ exports.deploy = function deploy_to_sql (model, db, options) {
2
+ options.dialect = 'postgres'
3
+ return require('./to-sql') .deploy (model, db, options)
4
+ }
@@ -5,8 +5,13 @@ exports.deploy = function deploy_to_sqlite (_model, _db, options) {
5
5
  const fts = cds.env.features.folders
6
6
  const model = _model || conf.model || cds.resolve(!fts ? '*' : ['*',fts], false)
7
7
  const file = _database4 (_db, _dbrl, conf)
8
+
8
9
  const dialect = _dbrl && _dbrl.match(/^(\w+)/) && RegExp.$1
9
- if (dialect) options.dialect = dialect === 'sql' ? conf.dialect || 'plain' : dialect
10
+ if (dialect) options.dialect = (dialect === 'sql')
11
+ ? conf.dialect || cds.env.sql.dialect
12
+ : dialect
13
+ if (options.dialect === 'postgres' && !options.dry) console.error('\nDeploying to PostgreSQL is not yet supported\n')
14
+
10
15
  return cds.deploy(model) .to ('sqlite:'+file, options)
11
16
  .then (db => db && db.disconnect()) // REVISIT: we should NOT require to disconnect explicitly
12
17
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "6.2.1",
3
+ "version": "6.2.2",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sap/cds-dk",
9
- "version": "6.2.1",
9
+ "version": "6.2.2",
10
10
  "license": "SEE LICENSE IN LICENSE",
11
11
  "dependencies": {
12
12
  "@sap/cds": "^6.2.0",
@@ -158,7 +158,7 @@
158
158
  }
159
159
  },
160
160
  "node_modules/@sap/cds": {
161
- "version": "6.2.1",
161
+ "version": "6.2.2",
162
162
  "license": "SEE LICENSE IN LICENSE",
163
163
  "dependencies": {
164
164
  "@sap/cds-compiler": "^3.2.0",
@@ -551,7 +551,7 @@
551
551
  "optional": true
552
552
  },
553
553
  "node_modules/@sap/instance-manager": {
554
- "version": "3.3.4",
554
+ "version": "3.3.5",
555
555
  "license": "SEE LICENSE IN LICENSE file",
556
556
  "optional": true,
557
557
  "dependencies": {
@@ -663,7 +663,7 @@
663
663
  }
664
664
  },
665
665
  "node_modules/@sap/instance-manager/node_modules/follow-redirects": {
666
- "version": "1.15.1",
666
+ "version": "1.15.2",
667
667
  "funding": [
668
668
  {
669
669
  "type": "individual",
@@ -3615,7 +3615,7 @@
3615
3615
  }
3616
3616
  },
3617
3617
  "@sap/cds": {
3618
- "version": "6.2.1",
3618
+ "version": "6.2.2",
3619
3619
  "requires": {
3620
3620
  "@sap/cds-compiler": "^3.2.0",
3621
3621
  "@sap/cds-foss": "^4"
@@ -3855,7 +3855,7 @@
3855
3855
  }
3856
3856
  },
3857
3857
  "@sap/instance-manager": {
3858
- "version": "3.3.4",
3858
+ "version": "3.3.5",
3859
3859
  "optional": true,
3860
3860
  "requires": {
3861
3861
  "@sap/xssec": "^3.2.13",
@@ -3931,7 +3931,7 @@
3931
3931
  }
3932
3932
  },
3933
3933
  "follow-redirects": {
3934
- "version": "1.15.1",
3934
+ "version": "1.15.2",
3935
3935
  "optional": true
3936
3936
  },
3937
3937
  "jsonwebtoken": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "6.2.1",
3
+ "version": "6.2.2",
4
4
  "description": "Command line client and development toolkit for the SAP Cloud Application Programming Model",
5
5
  "homepage": "https://cap.cloud.sap/",
6
6
  "keywords": [