@platformatic/sql-json-schema-mapper 1.53.3 → 2.0.0-alpha.10

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.
@@ -0,0 +1,3 @@
1
+ 'use strict'
2
+
3
+ module.exports = require('neostandard')({ ts: true })
package/index.js CHANGED
@@ -76,13 +76,13 @@ function mapSQLEntityToJSONSchema (entity, ignore = {}, noRequired = false) {
76
76
  properties[field.camelcase] = {
77
77
  type: 'array',
78
78
  items: {
79
- type
80
- }
79
+ type,
80
+ },
81
81
  }
82
82
  } else if (field.sqlType === 'json' || field.sqlType === 'jsonb') {
83
83
  properties[field.camelcase] = {
84
84
  type: 'object',
85
- additionalProperties: true
85
+ additionalProperties: true,
86
86
  }
87
87
  } else {
88
88
  properties[field.camelcase] = { type }
@@ -109,7 +109,7 @@ function mapSQLEntityToJSONSchema (entity, ignore = {}, noRequired = false) {
109
109
  description: `A ${entity.name}`,
110
110
  type: 'object',
111
111
  properties,
112
- additionalProperties: false
112
+ additionalProperties: false,
113
113
  }
114
114
 
115
115
  if (required.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/sql-json-schema-mapper",
3
- "version": "1.53.3",
3
+ "version": "2.0.0-alpha.10",
4
4
  "description": "Map SQL entity to JSON schema",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -14,25 +14,26 @@
14
14
  },
15
15
  "homepage": "https://github.com/platformatic/platformatic#readme",
16
16
  "devDependencies": {
17
- "borp": "^0.16.0",
18
- "dtsgenerator": "^3.19.2",
19
- "fastify": "^4.28.1",
20
- "snazzy": "^9.0.0",
21
- "standard": "^17.1.0",
22
- "why-is-node-running": "^2.3.0",
23
- "@platformatic/sql-mapper": "1.53.3"
17
+ "borp": "^0.17.0",
18
+ "dtsgenerator": "^3.19.1",
19
+ "eslint": "9",
20
+ "fastify": "5.0.0-alpha.4",
21
+ "neostandard": "^0.11.1",
22
+ "typescript": "^5.5.4",
23
+ "why-is-node-running": "^2.2.2",
24
+ "@platformatic/sql-mapper": "2.0.0-alpha.10"
24
25
  },
25
26
  "dependencies": {
26
- "code-block-writer": "^13.0.2",
27
+ "code-block-writer": "^13.0.1",
27
28
  "safe-identifier": "^0.4.2"
28
29
  },
29
30
  "scripts": {
30
- "lint": "standard | snazzy",
31
+ "lint": "eslint",
31
32
  "test": "npm run lint && npm run test:postgresql && npm run test:mariadb && npm run test:mysql && npm run test:mysql8 && npm run test:sqlite",
32
- "test:postgresql": "DB=postgresql borp test/*.test.js",
33
- "test:mariadb": "DB=mariadb borp test/*.test.js",
34
- "test:mysql": "DB=mysql borp test/*.test.js",
35
- "test:mysql8": "DB=mysql8 borp test/*.test.js",
36
- "test:sqlite": "DB=sqlite borp test/*.test.js"
33
+ "test:postgresql": "DB=postgresql borp --timeout=180000 test/*.test.js",
34
+ "test:mariadb": "DB=mariadb borp --timeout=180000 test/*.test.js",
35
+ "test:mysql": "DB=mysql borp --timeout=180000 test/*.test.js",
36
+ "test:mysql8": "DB=mysql8 borp --timeout=180000 test/*.test.js",
37
+ "test:sqlite": "DB=sqlite borp --timeout=180000 test/*.test.js"
37
38
  }
38
39
  }