@odda-studio/cms-models
Advanced tools
+15
-17
@@ -1,17 +0,15 @@ | ||
| // const tsj = require('ts-json-schema-generator'); | ||
| // const fs = require('fs'); | ||
| // | ||
| // /** @type {import('ts-json-schema-generator/dist/src/Config').Config} */ | ||
| // const config = { | ||
| // path: __dirname + '/schema-def.ts', | ||
| // tsconfig: __dirname + '/tsconfig.json', | ||
| // type: '*', // Or <type-name> if you want to generate schema for that one type only | ||
| // }; | ||
| // | ||
| // const output_path = 'schema.json'; | ||
| // | ||
| // const schema = tsj.createGenerator(config).createSchema(config.type); | ||
| // const schemaString = JSON.stringify(schema, null, 2); | ||
| // fs.writeFile(output_path, schemaString, (err) => { | ||
| // if (err) throw err; | ||
| // }); | ||
| const tsj = require('ts-json-schema-generator'); | ||
| const fs = require('fs'); | ||
| /** @type {import('ts-json-schema-generator/dist/src/Config').Config} */ | ||
| const config = { | ||
| path: __dirname + '/schema-def.ts', | ||
| tsconfig: __dirname + '/tsconfig.json', | ||
| type: '*', // Or <type-name> if you want to generate schema for that one type only | ||
| }; | ||
| const output_path = 'schema.json'; | ||
| const schema = tsj.createGenerator(config).createSchema(config.type); | ||
| const schemaString = JSON.stringify(schema, null, 2); | ||
| fs.writeFile(output_path, schemaString, (err) => { | ||
| if (err) | ||
| throw err; | ||
| }); |
+4
-0
@@ -383,2 +383,6 @@ import { ColumnType } from './column-type'; | ||
| }>; | ||
| /** | ||
| * if set on true, when calling create/replace method field will be omitted | ||
| */ | ||
| ignoreCreateOrReplace?: boolean; | ||
| } | ||
@@ -385,0 +389,0 @@ export interface EntitySchemaRelationOptions { |
+2
-0
@@ -230,2 +230,3 @@ "use strict"; | ||
| 'nullable', | ||
| 'ignoreCreateOrReplace', | ||
| ]; | ||
@@ -280,2 +281,3 @@ keys.forEach((key) => { | ||
| 'required', | ||
| 'ignoreCreateOrReplace', | ||
| ]; | ||
@@ -282,0 +284,0 @@ keys.forEach((key) => delete res[key]); |
+1
-1
| { | ||
| "name": "@odda-studio/cms-models", | ||
| "version": "1.0.34", | ||
| "version": "1.0.35", | ||
| "description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+2
-2
| import { IApplication } from './models'; | ||
| import { EntitySchemaColumnOptions, EntitySchemaConfiguration } from './model'; | ||
| export interface EntitiesConfiguration { | ||
| application: IApplication; | ||
| application?: IApplication; | ||
| defaultColumns?: { | ||
| [key: string]: EntitySchemaColumnOptions; | ||
| }; | ||
| tables: { | ||
| tables?: { | ||
| [key: string]: EntitySchemaConfiguration; | ||
| }; | ||
| } |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
48870
0.99%1278
1.19%2
100%