From 4bfc1b335234582f1a27e2dd829ad3c425c4b27e Mon Sep 17 00:00:00 2001 From: Aldis Ameriks Date: Sat, 12 Aug 2023 16:32:04 +0300 Subject: [PATCH] refactor: replace commander with built-in node parseArgs --- README.md | 2 +- cjs/src/index.js | 157 +- cjs/test/cli.js | 34 +- cjs/test/pg-typegen.js | 20 +- cjs/test/postgres.js | 14 +- cjs/test/typescript.js | 22 +- src/index.js | 157 +- tap-snapshots/cjs/test/cli.js.test.cjs | 2870 ++++++++--------- tap-snapshots/cjs/test/pg-typegen.js.test.cjs | 2412 +++++++------- tap-snapshots/test/cli.js.test.cjs | 2870 ++++++++--------- tap-snapshots/test/pg-typegen.js.test.cjs | 2412 +++++++------- test/cli.js | 34 +- test/pg-typegen.js | 20 +- test/postgres.js | 14 +- test/typescript.js | 22 +- 15 files changed, 5507 insertions(+), 5553 deletions(-) diff --git a/README.md b/README.md index c6783d0..5a2a102 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Options: -o, --output file output path (default: "stdout") -e, --exclude excluded tables and enums as comma separated string e.g. knex_migrations,knex_migrations_lock (default: []) --type use type definitions instead of interfaces in generated output (default: false) - --noSemi, --no-semicolons omit semicolons in generated types + --noSemi, --no-semicolons omit semicolons in generated types (default: false) --ssl use ssl (default: false) --optionals use optionals "?" instead of null (default: false) --comments generate table and column comments (default: false) diff --git a/cjs/src/index.js b/cjs/src/index.js index f22add8..67cc87f 100644 --- a/cjs/src/index.js +++ b/cjs/src/index.js @@ -1,59 +1,85 @@ #! /usr/bin/env node const fs = require('node:fs') -const { Command } = require('commander') +const { parseArgs } = require('node:util') const typescript = require('./typescript.js') const postgres = require('./postgres.js') const packageJson = require('../../package.json') -const program = new Command() -program - .name('pg-typegen') - .version(`v${packageJson.version}`) - .arguments('') - .option('-f, --suffix ', 'suffix to append to generated table type, e.g. item -> ItemEntity', 'Entity') - .option('-s, --schema ', 'schema', 'public') - .option('-h, --header
', 'header content', '') - .option('-o, --output ', 'file output path', 'stdout') - .option('-e, --exclude ', 'excluded tables and enums as comma separated string e.g. knex_migrations,knex_migrations_lock', parseArray, []) - .option('--type', 'use type definitions instead of interfaces in generated output', false) - .option('--noSemi, --no-semicolons', 'omit semicolons in generated types', false) - .option('--ssl', 'use ssl', false) - .option('--optionals', 'use optionals "?" instead of null', false) - .option('--comments', 'generate table and column comments', false) - .option('--pascal-enums', 'transform enum keys to pascal case', false) - .option('--bigint', 'use bigint for int8 types instead of strings', false) - .option('--date-as-string', 'use string for date types instead of javascript Date object', false) - .option('--insert-types', 'generate separate insert types with optional fields for columns allowing NULL value or having default values', false) - .option('--table-names', 'generate string literal type with all table names', false) - -program.on('--help', () => { - console.log('') - console.log('Example:') - console.log(' $ pg-typegen -o ./entities.ts postgres://username:password@localhost:5432/database') -}) - -function parseArray (value) { - return value.split(',') +const options = { + version: { type: 'boolean', short: 'V' }, + help: { type: 'boolean' }, + suffix: { type: 'string', short: 'f' }, + schema: { type: 'string', short: 's' }, + header: { type: 'string', short: 'h' }, + output: { type: 'string', short: 'o' }, + exclude: { type: 'string', short: 'e' }, + type: { type: 'boolean' }, + ssl: { type: 'boolean' }, + optionals: { type: 'boolean' }, + comments: { type: 'boolean' }, + bigint: { type: 'boolean' }, + noSemi: { type: 'boolean' }, + 'no-semicolons': { type: 'boolean' }, + 'pascal-enums': { type: 'boolean' }, + 'date-as-string': { type: 'boolean' }, + 'insert-types': { type: 'boolean' }, + 'table-names': { type: 'boolean' } } -async function generateSchema (opts) { - let argv = process.argv - if (process.argv.length === 2) { - // Starting from commander v8, arguments are mandatory. - // We're adding placeholder argument to be able to parse and get the default args. - argv = [...process.argv, ''] - } - const defaultOpts = program.parse(argv).opts() - opts = { ...defaultOpts, ...opts } +const defaultOptions = { + suffix: 'Entity', + schema: 'public', + header: '', + output: 'stdout', + exclude: [], + type: false, + semicolons: true, + ssl: false, + optionals: false, + comments: false, + pascalEnums: false, + bigint: false, + dateAsString: false, + insertTypes: false, + tableNames: false, + help: false, + version: false +} - if (!opts.connection) { - const help = program.helpInformation() +const help = `Usage: pg-typegen [options] + +Options: + -V, --version output the version number + -f, --suffix suffix to append to generated table type, e.g. item -> ItemEntity (default: "Entity") + -s, --schema schema (default: "public") + -h, --header
header content (default: "") + -o, --output file output path (default: "stdout") + -e, --exclude excluded tables and enums as comma separated string e.g. knex_migrations,knex_migrations_lock (default: []) + --type use type definitions instead of interfaces in generated output (default: false) + --noSemi, --no-semicolons omit semicolons in generated types (default: false) + --ssl use ssl (default: false) + --optionals use optionals "?" instead of null (default: false) + --comments generate table and column comments (default: false) + --pascal-enums transform enum keys to pascal case (default: false) + --bigint use bigint for int8 types instead of strings (default: false) + --date-as-string use string for date types instead of javascript Date object (default: false) + --insert-types generate separate insert types with optional fields for columns allowing NULL value or having default values (default: false) + --table-names generate string literal type with all table names (default: false) + --help display help for command + +Example: + $ pg-typegen -o ./entities.ts postgres://username:password@localhost:5432/database` + +async function generateSchema (opts) { + if (!opts || !opts.connection) { console.log(help) - return help + return } + opts = { ...defaultOptions, ...opts } + const schema = await postgres(opts) if (opts.onSchema) { @@ -81,16 +107,51 @@ if (require.main === module) { (async () => { if (process.argv.length === 2) { // Calling script without any arguments, so we're showing help and exiting. - program.help() + console.log(help) + return } - const command = program.parse(process.argv) - const opts = command.opts() - const args = command.args + const parsedArgs = parseArgs({ options, allowPositionals: true, args: process.argv }) + const opts = parsedArgs.values + opts.connection = parsedArgs.positionals[2] + + const parsedOpts = { + suffix: opts.suffix, + schema: opts.schema, + header: opts.header, + output: opts.output, + exclude: opts.exclude ? opts.exclude.split(',').map(e => e.trim()).filter(Boolean) : [], + type: opts.type, + semicolons: !(opts.noSemi === true || opts['no-semicolons'] === true), + ssl: opts.ssl, + optionals: opts.optionals, + comments: opts.comments, + pascalEnums: opts['pascal-enums'], + bigint: opts.bigint, + dateAsString: opts['date-as-string'], + insertTypes: opts['insert-types'], + tableNames: opts['table-names'], + help: opts.help, + version: opts.version, + connection: opts.connection + } + + const optsWithDefaults = { + ...defaultOptions, + ...Object.fromEntries(Object.entries(parsedOpts).filter(([, value]) => value !== undefined)) + } - opts.connection = args[0] + if (optsWithDefaults.help) { + console.log(help) + return + } + + if (optsWithDefaults.version) { + console.log(`v${packageJson.version}`) + return + } - const result = await generateSchema(opts) + const result = await generateSchema(optsWithDefaults) console.log(result) })() } diff --git a/cjs/test/cli.js b/cjs/test/cli.js index 71a3036..e8c6e2a 100644 --- a/cjs/test/cli.js +++ b/cjs/test/cli.js @@ -1,13 +1,13 @@ const childProcess = require('node:child_process') const fs = require('node:fs') const path = require('node:path') -const { test, only } = require('tap') +const t = require('tap') const { getTestPostgresConnectionString } = require('./helpers/setup-postgres.js') const connection = getTestPostgresConnectionString() const ssl = process.env.DATABASE_SSL_ENABLED === 'true' -test('help', t => { +t.test('help', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), '--help'], { @@ -27,7 +27,7 @@ test('help', t => { }) }) -test('version', t => { +t.test('version', t => { t.plan(1) t.cleanSnapshot = s => s.replace(/v[0-9.]+/g, 'v{v}') @@ -49,7 +49,7 @@ test('version', t => { }) }) -test('missing connection string', t => { +t.test('missing connection string', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js')], { @@ -69,7 +69,7 @@ test('missing connection string', t => { }) }) -test('generates types stdout', t => { +t.test('generates types stdout', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : ''], { @@ -89,7 +89,7 @@ test('generates types stdout', t => { }) }) -only('generates types to file', t => { +t.test('generates types to file', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), '-o', './entities.ts', connection, ssl ? '--ssl' : ''], { @@ -107,7 +107,7 @@ only('generates types to file', t => { }) }) -test('reports success to stdout', t => { +t.test('reports success to stdout', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), '-o', './entities.ts', connection, ssl ? '--ssl' : ''], { @@ -127,7 +127,7 @@ test('reports success to stdout', t => { }) }) -test('generates types with exclusion', t => { +t.test('generates types with exclusion', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '-e', 'types,snake_test'], { @@ -147,7 +147,7 @@ test('generates types with exclusion', t => { }) }) -test('generates types with header', t => { +t.test('generates types with header', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '-h', '/* eslint-disable */'], { @@ -167,7 +167,7 @@ test('generates types with header', t => { }) }) -test('generates types with pascal case enums', t => { +t.test('generates types with pascal case enums', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '--pascal-enums'], { @@ -187,7 +187,7 @@ test('generates types with pascal case enums', t => { }) }) -test('generates types with noSemi option', t => { +t.test('generates types with noSemi option', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '--noSemi'], { @@ -207,7 +207,7 @@ test('generates types with noSemi option', t => { }) }) -test('generates types with no-semicolons option', t => { +t.test('generates types with no-semicolons option', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '--no-semicolons'], { @@ -227,7 +227,7 @@ test('generates types with no-semicolons option', t => { }) }) -test('generates types with bigint option', t => { +t.test('generates types with bigint option', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '--bigint'], { @@ -247,7 +247,7 @@ test('generates types with bigint option', t => { }) }) -test('generates types with types option', t => { +t.test('generates types with types option', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '--type'], { @@ -267,7 +267,7 @@ test('generates types with types option', t => { }) }) -test('generates types with insert types', t => { +t.test('generates types with insert types', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '--insert-types'], { @@ -287,7 +287,7 @@ test('generates types with insert types', t => { }) }) -test('generates table names', t => { +t.test('generates table names', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '--table-names'], { @@ -307,7 +307,7 @@ test('generates table names', t => { }) }) -test('sends error to stderr', t => { +t.test('sends error to stderr', t => { t.plan(1) const invalidConnection = 'postgres://postgres:postgres@0.0.0.0:1/test_db' const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), '-o', './entities.ts', invalidConnection, ssl ? '--ssl' : ''], { diff --git a/cjs/test/pg-typegen.js b/cjs/test/pg-typegen.js index 61b5808..a3608cc 100644 --- a/cjs/test/pg-typegen.js +++ b/cjs/test/pg-typegen.js @@ -1,4 +1,4 @@ -const { test } = require('tap') +const t = require('tap') const fs = require('node:fs') const path = require('node:path') @@ -8,27 +8,27 @@ const { getTestPostgresConnectionString } = require('./helpers/setup-postgres.js const connection = getTestPostgresConnectionString() const ssl = process.env.DATABASE_SSL_ENABLED === 'true' -test('generates types as return value', async (t) => { +t.test('generates types as return value', async (t) => { const result = await generate({ connection, ssl }) t.matchSnapshot(result) }) -test('generates types with insert types', async (t) => { +t.test('generates types with insert types', async (t) => { const result = await generate({ connection, ssl, insertTypes: true }) t.matchSnapshot(result) }) -test('generates types with comments', async (t) => { +t.test('generates types with comments', async (t) => { const result = await generate({ connection, ssl, comments: true }) t.matchSnapshot(result) }) -test('generates types with comments and insert types', async (t) => { +t.test('generates types with comments and insert types', async (t) => { const result = await generate({ connection, ssl, comments: true, insertTypes: true }) t.matchSnapshot(result) }) -test('generates types to file', async (t) => { +t.test('generates types to file', async (t) => { const outputPath = path.join(__dirname, './test-entities.ts') const result = await generate({ connection, ssl, output: outputPath }) const content = fs.readFileSync(outputPath, 'utf8') @@ -37,17 +37,17 @@ test('generates types to file', async (t) => { fs.unlinkSync(outputPath) }) -test('returns help when missing connection', async (t) => { +t.test('returns help when missing connection', async (t) => { const result = await generate() t.matchSnapshot(result) }) -test('returns help when missing connection', async (t) => { +t.test('returns help when missing connection', async (t) => { const result = await generate({}) t.matchSnapshot(result) }) -test('allows hooking into schema result', async (t) => { +t.test('allows hooking into schema result', async (t) => { let result await generate({ connection, @@ -59,7 +59,7 @@ test('allows hooking into schema result', async (t) => { t.matchSnapshot(result) }) -test('allows hooking into type result', async (t) => { +t.test('allows hooking into type result', async (t) => { let result await generate({ connection, diff --git a/cjs/test/postgres.js b/cjs/test/postgres.js index 28b0b57..ea4c091 100644 --- a/cjs/test/postgres.js +++ b/cjs/test/postgres.js @@ -1,8 +1,8 @@ -const { test } = require('tap') +const t = require('tap') const getSchemaDefinition = require('../src/postgres.js') const { getTestPostgresConnectionString } = require('./helpers/setup-postgres.js') -test('retrieves database schema', async t => { +t.test('retrieves database schema', async t => { t.plan(1) const connection = getTestPostgresConnectionString() @@ -13,7 +13,7 @@ test('retrieves database schema', async t => { t.matchSnapshot(result) }) -test('returns typeMapping with int8 to string mapping', async t => { +t.test('returns typeMapping with int8 to string mapping', async t => { t.plan(1) const connection = getTestPostgresConnectionString() @@ -24,7 +24,7 @@ test('returns typeMapping with int8 to string mapping', async t => { t.matchSnapshot(result) }) -test('returns typeMapping with int8 to bigint mapping', async t => { +t.test('returns typeMapping with int8 to bigint mapping', async t => { t.plan(1) const connection = getTestPostgresConnectionString() @@ -35,7 +35,7 @@ test('returns typeMapping with int8 to bigint mapping', async t => { t.matchSnapshot(result) }) -test('returns typeMapping with date to javascript Date mapping', async t => { +t.test('returns typeMapping with date to javascript Date mapping', async t => { t.plan(1) const connection = getTestPostgresConnectionString() @@ -46,7 +46,7 @@ test('returns typeMapping with date to javascript Date mapping', async t => { t.matchSnapshot(result) }) -test('returns typeMapping with date to string mapping', async t => { +t.test('returns typeMapping with date to string mapping', async t => { t.plan(1) const connection = getTestPostgresConnectionString() @@ -57,7 +57,7 @@ test('returns typeMapping with date to string mapping', async t => { t.matchSnapshot(result) }) -test('uses correct postgres opts', t => { +t.test('uses correct postgres opts', t => { t.plan(3) let result = getSchemaDefinition.getPostgresOpts({}) diff --git a/cjs/test/typescript.js b/cjs/test/typescript.js index 29f6efa..932f3b3 100644 --- a/cjs/test/typescript.js +++ b/cjs/test/typescript.js @@ -1,4 +1,4 @@ -const { test } = require('tap') +const t = require('tap') const typescript = require('../src/typescript.js') const tables = [ @@ -102,7 +102,7 @@ const opts = { semicolons: true } -test('using types', t => { +t.test('using types', t => { t.plan(2) let result = typescript({ ...opts, type: true, semicolons: true }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) @@ -111,7 +111,7 @@ test('using types', t => { t.matchSnapshot(result.types) }) -test('using interfaces', t => { +t.test('using interfaces', t => { t.plan(2) let result = typescript({ ...opts, type: false, semicolons: true }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) @@ -120,49 +120,49 @@ test('using interfaces', t => { t.matchSnapshot(result.types) }) -test('with custom suffix', t => { +t.test('with custom suffix', t => { t.plan(1) const result = typescript({ ...opts, suffix: 'Record' }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) }) -test('with header', t => { +t.test('with header', t => { t.plan(1) const result = typescript({ ...opts, header: '/* eslint-disable */' }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) }) -test('with optionals', t => { +t.test('with optionals', t => { t.plan(1) const result = typescript({ ...opts, optionals: true }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) }) -test('without enums', t => { +t.test('without enums', t => { t.plan(1) const result = typescript({ ...opts, optionals: true }, { tables, typeMapping, enums: [] }) t.matchSnapshot(result.types) }) -test('with pascal case enums', t => { +t.test('with pascal case enums', t => { t.plan(1) const result = typescript({ ...opts, pascalEnums: true }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) }) -test('with generated insert types', t => { +t.test('with generated insert types', t => { t.plan(1) const result = typescript({ ...opts, insertTypes: true }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) }) -test('with generated insert types with optionals', t => { +t.test('with generated insert types with optionals', t => { t.plan(1) const result = typescript({ ...opts, insertTypes: true, optionals: true }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) }) -test('with table string literal', t => { +t.test('with table string literal', t => { t.plan(1) const result = typescript({ ...opts, tableNames: true }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) diff --git a/src/index.js b/src/index.js index a16aeb8..dbe112a 100755 --- a/src/index.js +++ b/src/index.js @@ -1,60 +1,86 @@ #! /usr/bin/env node import fs from 'node:fs' +import { parseArgs } from 'node:util' import { pathToFileURL } from 'node:url' -import { Command } from 'commander' import typescript from './typescript.js' import postgres from './postgres.js' const packageJson = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url))) -const program = new Command() -program - .name('pg-typegen') - .version(`v${packageJson.version}`) - .arguments('') - .option('-f, --suffix ', 'suffix to append to generated table type, e.g. item -> ItemEntity', 'Entity') - .option('-s, --schema ', 'schema', 'public') - .option('-h, --header
', 'header content', '') - .option('-o, --output ', 'file output path', 'stdout') - .option('-e, --exclude ', 'excluded tables and enums as comma separated string e.g. knex_migrations,knex_migrations_lock', parseArray, []) - .option('--type', 'use type definitions instead of interfaces in generated output', false) - .option('--noSemi, --no-semicolons', 'omit semicolons in generated types', false) - .option('--ssl', 'use ssl', false) - .option('--optionals', 'use optionals "?" instead of null', false) - .option('--comments', 'generate table and column comments', false) - .option('--pascal-enums', 'transform enum keys to pascal case', false) - .option('--bigint', 'use bigint for int8 types instead of strings', false) - .option('--date-as-string', 'use string for date types instead of javascript Date object', false) - .option('--insert-types', 'generate separate insert types with optional fields for columns allowing NULL value or having default values', false) - .option('--table-names', 'generate string literal type with all table names', false) - -program.on('--help', () => { - console.log('') - console.log('Example:') - console.log(' $ pg-typegen -o ./entities.ts postgres://username:password@localhost:5432/database') -}) - -function parseArray (value) { - return value.split(',') +const options = { + version: { type: 'boolean', short: 'V' }, + help: { type: 'boolean' }, + suffix: { type: 'string', short: 'f' }, + schema: { type: 'string', short: 's' }, + header: { type: 'string', short: 'h' }, + output: { type: 'string', short: 'o' }, + exclude: { type: 'string', short: 'e' }, + type: { type: 'boolean' }, + ssl: { type: 'boolean' }, + optionals: { type: 'boolean' }, + comments: { type: 'boolean' }, + bigint: { type: 'boolean' }, + noSemi: { type: 'boolean' }, + 'no-semicolons': { type: 'boolean' }, + 'pascal-enums': { type: 'boolean' }, + 'date-as-string': { type: 'boolean' }, + 'insert-types': { type: 'boolean' }, + 'table-names': { type: 'boolean' } } -async function generateSchema (opts) { - let argv = process.argv - if (process.argv.length === 2) { - // Starting from commander v8, arguments are mandatory. - // We're adding placeholder argument to be able to parse and get the default args. - argv = [...process.argv, ''] - } - const defaultOpts = program.parse(argv).opts() - opts = { ...defaultOpts, ...opts } +const defaultOptions = { + suffix: 'Entity', + schema: 'public', + header: '', + output: 'stdout', + exclude: [], + type: false, + semicolons: true, + ssl: false, + optionals: false, + comments: false, + pascalEnums: false, + bigint: false, + dateAsString: false, + insertTypes: false, + tableNames: false, + help: false, + version: false +} - if (!opts.connection) { - const help = program.helpInformation() +const help = `Usage: pg-typegen [options] + +Options: + -V, --version output the version number + -f, --suffix suffix to append to generated table type, e.g. item -> ItemEntity (default: "Entity") + -s, --schema schema (default: "public") + -h, --header
header content (default: "") + -o, --output file output path (default: "stdout") + -e, --exclude excluded tables and enums as comma separated string e.g. knex_migrations,knex_migrations_lock (default: []) + --type use type definitions instead of interfaces in generated output (default: false) + --noSemi, --no-semicolons omit semicolons in generated types (default: false) + --ssl use ssl (default: false) + --optionals use optionals "?" instead of null (default: false) + --comments generate table and column comments (default: false) + --pascal-enums transform enum keys to pascal case (default: false) + --bigint use bigint for int8 types instead of strings (default: false) + --date-as-string use string for date types instead of javascript Date object (default: false) + --insert-types generate separate insert types with optional fields for columns allowing NULL value or having default values (default: false) + --table-names generate string literal type with all table names (default: false) + --help display help for command + +Example: + $ pg-typegen -o ./entities.ts postgres://username:password@localhost:5432/database` + +async function generateSchema (opts) { + if (!opts || !opts.connection) { console.log(help) - return help + return } + opts = { ...defaultOptions, ...opts } + const schema = await postgres(opts) if (opts.onSchema) { @@ -82,16 +108,51 @@ if (import.meta.url === pathToFileURL(process.argv[1]).href) { (async () => { if (process.argv.length === 2) { // Calling script without any arguments, so we're showing help and exiting. - program.help() + console.log(help) + return } - const command = program.parse(process.argv) - const opts = command.opts() - const args = command.args + const parsedArgs = parseArgs({ options, allowPositionals: true, args: process.argv }) + const opts = parsedArgs.values + opts.connection = parsedArgs.positionals[2] + + const parsedOpts = { + suffix: opts.suffix, + schema: opts.schema, + header: opts.header, + output: opts.output, + exclude: opts.exclude ? opts.exclude.split(',').map(e => e.trim()).filter(Boolean) : [], + type: opts.type, + semicolons: !(opts.noSemi === true || opts['no-semicolons'] === true), + ssl: opts.ssl, + optionals: opts.optionals, + comments: opts.comments, + pascalEnums: opts['pascal-enums'], + bigint: opts.bigint, + dateAsString: opts['date-as-string'], + insertTypes: opts['insert-types'], + tableNames: opts['table-names'], + help: opts.help, + version: opts.version, + connection: opts.connection + } + + const optsWithDefaults = { + ...defaultOptions, + ...Object.fromEntries(Object.entries(parsedOpts).filter(([, value]) => value !== undefined)) + } - opts.connection = args[0] + if (optsWithDefaults.help) { + console.log(help) + return + } + + if (optsWithDefaults.version) { + console.log(`v${packageJson.version}`) + return + } - const result = await generateSchema(opts) + const result = await generateSchema(optsWithDefaults) console.log(result) })() } diff --git a/tap-snapshots/cjs/test/cli.js.test.cjs b/tap-snapshots/cjs/test/cli.js.test.cjs index 46c7da8..f866cda 100644 --- a/tap-snapshots/cjs/test/cli.js.test.cjs +++ b/tap-snapshots/cjs/test/cli.js.test.cjs @@ -6,7 +6,7 @@ */ 'use strict' exports['cjs/test/cli.js TAP generates table names > must match snapshot 1'] = ` -export type Tables = 'address' | 'histories' | 'kebab-test' | 'snake_test' | 'types' | 'users' +export type Tables = 'address' | 'histories' | 'kebab-test' | 'snake_test' | 'types' | 'users'; export enum DeliciousKebab { 'big-mix' = 'big-mix', @@ -24,156 +24,156 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface SnakeTestEntity { - id: number -} + id: number; +}; export interface SomeViewEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; ` @@ -195,161 +195,502 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface SnakeTestEntity { - id: number + id: number; +}; + +export interface SomeViewEntity { + test: number | null; + test_text: string | null; +}; + +export interface TypeEntity { + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; + +export interface UserEntity { + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; + + +` + +exports['cjs/test/cli.js TAP generates types to file > must match snapshot 1'] = ` +export enum DeliciousKebab { + 'big-mix' = 'big-mix', + mix = 'mix', +} + +export enum Fruits { + apple = 'apple', + banana = 'banana', + orange = 'orange', +} + +export enum SnakesOn { + a_plane = 'a_plane', } +export interface AddressEntity { + id: number; +}; + +export interface HistoryEntity { + id: number; +}; + +export interface KebabTestEntity { + id: number; +}; + +export interface MaterializedItemEntity { + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; + +export interface MaterializedOtherItemEntity { + test: number | null; + test_text: string | null; +}; + +export interface SnakeTestEntity { + id: number; +}; + export interface SomeViewEntity { - test: number | null - test_text: string | null + test: number | null; + test_text: string | null; +}; + +export interface TypeEntity { + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; + +export interface UserEntity { + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; + +` + +exports['cjs/test/cli.js TAP generates types with bigint option > must match snapshot 1'] = ` +export enum DeliciousKebab { + 'big-mix' = 'big-mix', + mix = 'mix', +} + +export enum Fruits { + apple = 'apple', + banana = 'banana', + orange = 'orange', +} + +export enum SnakesOn { + a_plane = 'a_plane', } +export interface AddressEntity { + id: number; +}; + +export interface HistoryEntity { + id: number; +}; + +export interface KebabTestEntity { + id: number; +}; + +export interface MaterializedItemEntity { + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; + +export interface MaterializedOtherItemEntity { + test: number | null; + test_text: string | null; +}; + +export interface SnakeTestEntity { + id: number; +}; + +export interface SomeViewEntity { + test: number | null; + test_text: string | null; +}; + export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: bigint | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: bigint; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; ` -exports['cjs/test/cli.js TAP generates types to file > must match snapshot 1'] = ` +exports['cjs/test/cli.js TAP generates types with exclusion > must match snapshot 1'] = ` export enum DeliciousKebab { 'big-mix' = 'big-mix', mix = 'mix', @@ -366,160 +707,49 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} - -export interface SnakeTestEntity { - id: number -} + test: number | null; + test_text: string | null; +}; export interface SomeViewEntity { - test: number | null - test_text: string | null -} - -export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + test: number | null; + test_text: string | null; +}; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; + ` -exports['cjs/test/cli.js TAP generates types with bigint option > must match snapshot 1'] = ` +exports['cjs/test/cli.js TAP generates types with header > must match snapshot 1'] = ` +/* eslint-disable */ + export enum DeliciousKebab { 'big-mix' = 'big-mix', mix = 'mix', @@ -535,869 +765,468 @@ export enum SnakesOn { a_plane = 'a_plane', } -export interface AddressEntity { - id: number -} - -export interface HistoryEntity { - id: number -} - -export interface KebabTestEntity { - id: number -} - -export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} - -export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} - -export interface SnakeTestEntity { - id: number -} - -export interface SomeViewEntity { - test: number | null - test_text: string | null -} - -export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: bigint | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: bigint - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} - -export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} - - -` - -exports['cjs/test/cli.js TAP generates types with exclusion > must match snapshot 1'] = ` -export enum DeliciousKebab { - 'big-mix' = 'big-mix', - mix = 'mix', -} - -export enum Fruits { - apple = 'apple', - banana = 'banana', - orange = 'orange', -} - -export enum SnakesOn { - a_plane = 'a_plane', -} - -export interface AddressEntity { - id: number -} - -export interface HistoryEntity { - id: number -} - -export interface KebabTestEntity { - id: number -} - -export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} - -export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} - -export interface SomeViewEntity { - test: number | null - test_text: string | null -} - -export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} - - -` - -exports['cjs/test/cli.js TAP generates types with header > must match snapshot 1'] = ` -/* eslint-disable */ - -export enum DeliciousKebab { - 'big-mix' = 'big-mix', - mix = 'mix', -} - -export enum Fruits { - apple = 'apple', - banana = 'banana', - orange = 'orange', -} - -export enum SnakesOn { - a_plane = 'a_plane', -} - -export interface AddressEntity { - id: number -} - -export interface HistoryEntity { - id: number -} - -export interface KebabTestEntity { - id: number -} - -export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} - -export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} - -export interface SnakeTestEntity { - id: number -} - -export interface SomeViewEntity { - test: number | null - test_text: string | null -} - -export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} - -export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} - - -` - -exports['cjs/test/cli.js TAP generates types with insert types > must match snapshot 1'] = ` -export enum DeliciousKebab { - 'big-mix' = 'big-mix', - mix = 'mix', -} - -export enum Fruits { - apple = 'apple', - banana = 'banana', - orange = 'orange', -} - -export enum SnakesOn { - a_plane = 'a_plane', -} - -export interface AddressEntity { - id: number -} - -export interface AddressInsertEntity { - id: number -} - -export interface HistoryEntity { - id: number -} - -export interface HistoryInsertEntity { - id: number -} - -export interface KebabTestEntity { - id: number -} - -export interface KebabTestInsertEntity { - id: number -} - -export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} - -export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} - -export interface SnakeTestEntity { - id: number -} - -export interface SnakeTestInsertEntity { - id: number -} - -export interface SomeViewEntity { - test: number | null - test_text: string | null -} - -export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} - -export interface TypeInsertEntity { - avatar_darren?: Array | null - avatar_ernestina: string - avatar_mark?: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase?: boolean | null - category_amari: string - category_april: Array - category_buddy?: Array | null - category_clementine?: number | null - category_marcelle?: Date | null - category_roberta?: boolean | null - category_trent?: any | null - category_viola: string - comment_cali: string - comment_delilah?: Array | null - comment_easter?: Date | null - comment_ella: string - comment_myles: string - comment_rocio?: string | null - createdat_hulda: any - createdat_pansy?: Array | null - email_andres: Date - email_cleveland?: string | null - email_keaton?: Array | null - email_lucio?: string | null - email_paris: string - email_paula?: string | null - email_ressie: string - fruit_a?: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe?: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices?: Array | null - id_gay: string - id_hailee: any - id_helen?: Array | null - id_ike: Array - id_joan?: Array | null - id_karelle?: string | null - id_lavern: Date - id_margarita?: string | null - id_maximilian: Array - id_william: Array - id_wilmer?: Array | null - 'kebab-a'?: DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara?: string | null - name_brionna: number - name_enoch: string - name_jermain?: Array | null - name_marielle?: string | null - name_myrtle?: Array | null - name_santos: Array - name_skye?: string | null - name_stephanie: boolean - password_alessia?: Array | null - password_camylle: Array - password_elenora?: number | null - password_felton?: Array | null - password_korey: number - password_murphy?: Array | null - password_vladimir?: number | null - phone_angelo: string - phone_colten: number - phone_erling?: Array | null - phone_johanna?: Array | null - phone_kendall: Array - phone_keyshawn?: string | null - phone_maryam?: string | null - phone_osvaldo: Array - phone_rupert?: any | null - snakes_on_a?: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica?: Array | null - status_cade: Array - status_lori?: string | null - status_ricky: number - status_sid?: Array | null - title_aidan?: Date | null - title_alexzander: string - title_haylee?: Array | null - title_ilene: Array - title_vicenta?: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna?: Array | null - token_rubye: string - token_ryley?: string | null - token_zora: Array - updatedat_aaliyah?: number | null - updatedat_abe?: Array | null - updatedat_brett?: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura?: Array | null - updatedat_melody: Array - updatedat_rossie?: number | null -} - -export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} - -export interface UserInsertEntity { - id?: number - name?: string | null - name2?: string - name3: string - other_id?: number - other_primary_id?: number -} - - -` - -exports['cjs/test/cli.js TAP generates types with no-semicolons option > must match snapshot 1'] = ` -export enum DeliciousKebab { - 'big-mix' = 'big-mix', - mix = 'mix', -} - -export enum Fruits { - apple = 'apple', - banana = 'banana', - orange = 'orange', -} - -export enum SnakesOn { - a_plane = 'a_plane', -} - -export interface AddressEntity { - id: number -} - -export interface HistoryEntity { - id: number -} - -export interface KebabTestEntity { - id: number -} - -export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} - -export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} - -export interface SnakeTestEntity { - id: number -} - -export interface SomeViewEntity { - test: number | null - test_text: string | null -} - -export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} +export interface AddressEntity { + id: number; +}; + +export interface HistoryEntity { + id: number; +}; + +export interface KebabTestEntity { + id: number; +}; + +export interface MaterializedItemEntity { + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; + +export interface MaterializedOtherItemEntity { + test: number | null; + test_text: string | null; +}; + +export interface SnakeTestEntity { + id: number; +}; + +export interface SomeViewEntity { + test: number | null; + test_text: string | null; +}; + +export interface TypeEntity { + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; + + +` + +exports['cjs/test/cli.js TAP generates types with insert types > must match snapshot 1'] = ` +export enum DeliciousKebab { + 'big-mix' = 'big-mix', + mix = 'mix', +} + +export enum Fruits { + apple = 'apple', + banana = 'banana', + orange = 'orange', +} + +export enum SnakesOn { + a_plane = 'a_plane', } +export interface AddressEntity { + id: number; +}; + +export interface AddressInsertEntity { + id: number; +}; + +export interface HistoryEntity { + id: number; +}; + +export interface HistoryInsertEntity { + id: number; +}; + +export interface KebabTestEntity { + id: number; +}; + +export interface KebabTestInsertEntity { + id: number; +}; + +export interface MaterializedItemEntity { + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; + +export interface MaterializedOtherItemEntity { + test: number | null; + test_text: string | null; +}; + +export interface SnakeTestEntity { + id: number; +}; + +export interface SnakeTestInsertEntity { + id: number; +}; + +export interface SomeViewEntity { + test: number | null; + test_text: string | null; +}; + +export interface TypeEntity { + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; + +export interface TypeInsertEntity { + avatar_darren?: Array | null; + avatar_ernestina: string; + avatar_mark?: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase?: boolean | null; + category_amari: string; + category_april: Array; + category_buddy?: Array | null; + category_clementine?: number | null; + category_marcelle?: Date | null; + category_roberta?: boolean | null; + category_trent?: any | null; + category_viola: string; + comment_cali: string; + comment_delilah?: Array | null; + comment_easter?: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio?: string | null; + createdat_hulda: any; + createdat_pansy?: Array | null; + email_andres: Date; + email_cleveland?: string | null; + email_keaton?: Array | null; + email_lucio?: string | null; + email_paris: string; + email_paula?: string | null; + email_ressie: string; + fruit_a?: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe?: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices?: Array | null; + id_gay: string; + id_hailee: any; + id_helen?: Array | null; + id_ike: Array; + id_joan?: Array | null; + id_karelle?: string | null; + id_lavern: Date; + id_margarita?: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer?: Array | null; + 'kebab-a'?: DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara?: string | null; + name_brionna: number; + name_enoch: string; + name_jermain?: Array | null; + name_marielle?: string | null; + name_myrtle?: Array | null; + name_santos: Array; + name_skye?: string | null; + name_stephanie: boolean; + password_alessia?: Array | null; + password_camylle: Array; + password_elenora?: number | null; + password_felton?: Array | null; + password_korey: number; + password_murphy?: Array | null; + password_vladimir?: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling?: Array | null; + phone_johanna?: Array | null; + phone_kendall: Array; + phone_keyshawn?: string | null; + phone_maryam?: string | null; + phone_osvaldo: Array; + phone_rupert?: any | null; + snakes_on_a?: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica?: Array | null; + status_cade: Array; + status_lori?: string | null; + status_ricky: number; + status_sid?: Array | null; + title_aidan?: Date | null; + title_alexzander: string; + title_haylee?: Array | null; + title_ilene: Array; + title_vicenta?: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna?: Array | null; + token_rubye: string; + token_ryley?: string | null; + token_zora: Array; + updatedat_aaliyah?: number | null; + updatedat_abe?: Array | null; + updatedat_brett?: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura?: Array | null; + updatedat_melody: Array; + updatedat_rossie?: number | null; +}; + +export interface UserEntity { + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; + +export interface UserInsertEntity { + id?: number; + name?: string | null; + name2?: string; + name3: string; + other_id?: number; + other_primary_id?: number; +}; + ` -exports['cjs/test/cli.js TAP generates types with noSemi option > must match snapshot 1'] = ` +exports['cjs/test/cli.js TAP generates types with no-semicolons option > must match snapshot 1'] = ` export enum DeliciousKebab { 'big-mix' = 'big-mix', mix = 'mix', @@ -1568,20 +1397,20 @@ export interface UserEntity { ` -exports['cjs/test/cli.js TAP generates types with pascal case enums > must match snapshot 1'] = ` +exports['cjs/test/cli.js TAP generates types with noSemi option > must match snapshot 1'] = ` export enum DeliciousKebab { - BigMix = 'big-mix', - Mix = 'mix', + 'big-mix' = 'big-mix', + mix = 'mix', } export enum Fruits { - Apple = 'apple', - Banana = 'banana', - Orange = 'orange', + apple = 'apple', + banana = 'banana', + orange = 'orange', } export enum SnakesOn { - APlane = 'a_plane', + a_plane = 'a_plane', } export interface AddressEntity { @@ -1737,6 +1566,177 @@ export interface UserEntity { } +` + +exports['cjs/test/cli.js TAP generates types with pascal case enums > must match snapshot 1'] = ` +export enum DeliciousKebab { + BigMix = 'big-mix', + Mix = 'mix', +} + +export enum Fruits { + Apple = 'apple', + Banana = 'banana', + Orange = 'orange', +} + +export enum SnakesOn { + APlane = 'a_plane', +} + +export interface AddressEntity { + id: number; +}; + +export interface HistoryEntity { + id: number; +}; + +export interface KebabTestEntity { + id: number; +}; + +export interface MaterializedItemEntity { + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; + +export interface MaterializedOtherItemEntity { + test: number | null; + test_text: string | null; +}; + +export interface SnakeTestEntity { + id: number; +}; + +export interface SomeViewEntity { + test: number | null; + test_text: string | null; +}; + +export interface TypeEntity { + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; + +export interface UserEntity { + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; + + ` exports['cjs/test/cli.js TAP generates types with types option > must match snapshot 1'] = ` @@ -1756,156 +1756,156 @@ export enum SnakesOn { } export type AddressEntity = { - id: number -} + id: number; +}; export type HistoryEntity = { - id: number -} + id: number; +}; export type KebabTestEntity = { - id: number -} + id: number; +}; export type MaterializedItemEntity = { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export type MaterializedOtherItemEntity = { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export type SnakeTestEntity = { - id: number -} + id: number; +}; export type SomeViewEntity = { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export type TypeEntity = { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export type UserEntity = { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; ` @@ -1915,32 +1915,21 @@ Usage: pg-typegen [options] Options: -V, --version output the version number - -f, --suffix suffix to append to generated table type, e.g. - item -> ItemEntity (default: "Entity") + -f, --suffix suffix to append to generated table type, e.g. item -> ItemEntity (default: "Entity") -s, --schema schema (default: "public") -h, --header
header content (default: "") -o, --output file output path (default: "stdout") - -e, --exclude excluded tables and enums as comma separated - string e.g. knex_migrations,knex_migrations_lock - (default: []) - --type use type definitions instead of interfaces in - generated output (default: false) - --noSemi, --no-semicolons omit semicolons in generated types + -e, --exclude excluded tables and enums as comma separated string e.g. knex_migrations,knex_migrations_lock (default: []) + --type use type definitions instead of interfaces in generated output (default: false) + --noSemi, --no-semicolons omit semicolons in generated types (default: false) --ssl use ssl (default: false) --optionals use optionals "?" instead of null (default: false) - --comments generate table and column comments (default: - false) - --pascal-enums transform enum keys to pascal case (default: - false) - --bigint use bigint for int8 types instead of strings - (default: false) - --date-as-string use string for date types instead of javascript - Date object (default: false) - --insert-types generate separate insert types with optional - fields for columns allowing NULL value or having - default values (default: false) - --table-names generate string literal type with all table names - (default: false) + --comments generate table and column comments (default: false) + --pascal-enums transform enum keys to pascal case (default: false) + --bigint use bigint for int8 types instead of strings (default: false) + --date-as-string use string for date types instead of javascript Date object (default: false) + --insert-types generate separate insert types with optional fields for columns allowing NULL value or having default values (default: false) + --table-names generate string literal type with all table names (default: false) --help display help for command Example: @@ -1953,32 +1942,21 @@ Usage: pg-typegen [options] Options: -V, --version output the version number - -f, --suffix suffix to append to generated table type, e.g. - item -> ItemEntity (default: "Entity") + -f, --suffix suffix to append to generated table type, e.g. item -> ItemEntity (default: "Entity") -s, --schema schema (default: "public") -h, --header
header content (default: "") -o, --output file output path (default: "stdout") - -e, --exclude excluded tables and enums as comma separated - string e.g. knex_migrations,knex_migrations_lock - (default: []) - --type use type definitions instead of interfaces in - generated output (default: false) - --noSemi, --no-semicolons omit semicolons in generated types + -e, --exclude excluded tables and enums as comma separated string e.g. knex_migrations,knex_migrations_lock (default: []) + --type use type definitions instead of interfaces in generated output (default: false) + --noSemi, --no-semicolons omit semicolons in generated types (default: false) --ssl use ssl (default: false) --optionals use optionals "?" instead of null (default: false) - --comments generate table and column comments (default: - false) - --pascal-enums transform enum keys to pascal case (default: - false) - --bigint use bigint for int8 types instead of strings - (default: false) - --date-as-string use string for date types instead of javascript - Date object (default: false) - --insert-types generate separate insert types with optional - fields for columns allowing NULL value or having - default values (default: false) - --table-names generate string literal type with all table names - (default: false) + --comments generate table and column comments (default: false) + --pascal-enums transform enum keys to pascal case (default: false) + --bigint use bigint for int8 types instead of strings (default: false) + --date-as-string use string for date types instead of javascript Date object (default: false) + --insert-types generate separate insert types with optional fields for columns allowing NULL value or having default values (default: false) + --table-names generate string literal type with all table names (default: false) --help display help for command Example: diff --git a/tap-snapshots/cjs/test/pg-typegen.js.test.cjs b/tap-snapshots/cjs/test/pg-typegen.js.test.cjs index a451822..0557357 100644 --- a/tap-snapshots/cjs/test/pg-typegen.js.test.cjs +++ b/tap-snapshots/cjs/test/pg-typegen.js.test.cjs @@ -1357,291 +1357,291 @@ Object { } export interface AddressEntity { - id: number - } + id: number; + }; export interface AddressInsertEntity { - id: number - } + id: number; + }; export interface HistoryEntity { - id: number - } + id: number; + }; export interface HistoryInsertEntity { - id: number - } + id: number; + }; export interface KebabTestEntity { - id: number - } + id: number; + }; export interface KebabTestInsertEntity { - id: number - } + id: number; + }; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null - } + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; + }; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null - } + test: number | null; + test_text: string | null; + }; export interface SnakeTestEntity { - id: number - } + id: number; + }; export interface SnakeTestInsertEntity { - id: number - } + id: number; + }; export interface SomeViewEntity { - test: number | null - test_text: string | null - } + test: number | null; + test_text: string | null; + }; export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null - } + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; + }; export interface TypeInsertEntity { - avatar_darren?: Array | null - avatar_ernestina: string - avatar_mark?: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase?: boolean | null - category_amari: string - category_april: Array - category_buddy?: Array | null - category_clementine?: number | null - category_marcelle?: Date | null - category_roberta?: boolean | null - category_trent?: any | null - category_viola: string - comment_cali: string - comment_delilah?: Array | null - comment_easter?: Date | null - comment_ella: string - comment_myles: string - comment_rocio?: string | null - createdat_hulda: any - createdat_pansy?: Array | null - email_andres: Date - email_cleveland?: string | null - email_keaton?: Array | null - email_lucio?: string | null - email_paris: string - email_paula?: string | null - email_ressie: string - fruit_a?: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe?: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices?: Array | null - id_gay: string - id_hailee: any - id_helen?: Array | null - id_ike: Array - id_joan?: Array | null - id_karelle?: string | null - id_lavern: Date - id_margarita?: string | null - id_maximilian: Array - id_william: Array - id_wilmer?: Array | null - 'kebab-a'?: DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara?: string | null - name_brionna: number - name_enoch: string - name_jermain?: Array | null - name_marielle?: string | null - name_myrtle?: Array | null - name_santos: Array - name_skye?: string | null - name_stephanie: boolean - password_alessia?: Array | null - password_camylle: Array - password_elenora?: number | null - password_felton?: Array | null - password_korey: number - password_murphy?: Array | null - password_vladimir?: number | null - phone_angelo: string - phone_colten: number - phone_erling?: Array | null - phone_johanna?: Array | null - phone_kendall: Array - phone_keyshawn?: string | null - phone_maryam?: string | null - phone_osvaldo: Array - phone_rupert?: any | null - snakes_on_a?: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica?: Array | null - status_cade: Array - status_lori?: string | null - status_ricky: number - status_sid?: Array | null - title_aidan?: Date | null - title_alexzander: string - title_haylee?: Array | null - title_ilene: Array - title_vicenta?: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna?: Array | null - token_rubye: string - token_ryley?: string | null - token_zora: Array - updatedat_aaliyah?: number | null - updatedat_abe?: Array | null - updatedat_brett?: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura?: Array | null - updatedat_melody: Array - updatedat_rossie?: number | null - } + avatar_darren?: Array | null; + avatar_ernestina: string; + avatar_mark?: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase?: boolean | null; + category_amari: string; + category_april: Array; + category_buddy?: Array | null; + category_clementine?: number | null; + category_marcelle?: Date | null; + category_roberta?: boolean | null; + category_trent?: any | null; + category_viola: string; + comment_cali: string; + comment_delilah?: Array | null; + comment_easter?: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio?: string | null; + createdat_hulda: any; + createdat_pansy?: Array | null; + email_andres: Date; + email_cleveland?: string | null; + email_keaton?: Array | null; + email_lucio?: string | null; + email_paris: string; + email_paula?: string | null; + email_ressie: string; + fruit_a?: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe?: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices?: Array | null; + id_gay: string; + id_hailee: any; + id_helen?: Array | null; + id_ike: Array; + id_joan?: Array | null; + id_karelle?: string | null; + id_lavern: Date; + id_margarita?: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer?: Array | null; + 'kebab-a'?: DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara?: string | null; + name_brionna: number; + name_enoch: string; + name_jermain?: Array | null; + name_marielle?: string | null; + name_myrtle?: Array | null; + name_santos: Array; + name_skye?: string | null; + name_stephanie: boolean; + password_alessia?: Array | null; + password_camylle: Array; + password_elenora?: number | null; + password_felton?: Array | null; + password_korey: number; + password_murphy?: Array | null; + password_vladimir?: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling?: Array | null; + phone_johanna?: Array | null; + phone_kendall: Array; + phone_keyshawn?: string | null; + phone_maryam?: string | null; + phone_osvaldo: Array; + phone_rupert?: any | null; + snakes_on_a?: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica?: Array | null; + status_cade: Array; + status_lori?: string | null; + status_ricky: number; + status_sid?: Array | null; + title_aidan?: Date | null; + title_alexzander: string; + title_haylee?: Array | null; + title_ilene: Array; + title_vicenta?: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna?: Array | null; + token_rubye: string; + token_ryley?: string | null; + token_zora: Array; + updatedat_aaliyah?: number | null; + updatedat_abe?: Array | null; + updatedat_brett?: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura?: Array | null; + updatedat_melody: Array; + updatedat_rossie?: number | null; + }; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number - } + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; + }; export interface UserInsertEntity { - id?: number - name?: string | null - name2?: string - name3: string - other_id?: number - other_primary_id?: number - } + id?: number; + name?: string | null; + name2?: string; + name3: string; + other_id?: number; + other_primary_id?: number; + }; ), } @@ -1664,156 +1664,156 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface SnakeTestEntity { - id: number -} + id: number; +}; export interface SomeViewEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; ` @@ -1834,156 +1834,156 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface SnakeTestEntity { - id: number -} + id: number; +}; export interface SomeViewEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; ` @@ -2008,169 +2008,169 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface SnakeTestEntity { /** * PRIMARY KEY */ - id: number -} + id: number; +}; export interface SomeViewEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; /** * this is the users table */ export interface UserEntity { - id: number + id: number; /** * Very long long long long long long long long long long long long long long long long long long long long long comment */ - name: string | null - name2: string - name3: string - other_id: number + name: string | null; + name2: string; + name3: string; + other_id: number; /** * This is the user identifier number * PRIMARY KEY */ - other_primary_id: number -} + other_primary_id: number; +}; ` @@ -2191,317 +2191,317 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface AddressInsertEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface HistoryInsertEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface KebabTestInsertEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface SnakeTestEntity { /** * PRIMARY KEY */ - id: number -} + id: number; +}; export interface SnakeTestInsertEntity { /** * PRIMARY KEY */ - id: number -} + id: number; +}; export interface SomeViewEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export interface TypeInsertEntity { - avatar_darren?: Array | null - avatar_ernestina: string - avatar_mark?: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase?: boolean | null - category_amari: string - category_april: Array - category_buddy?: Array | null - category_clementine?: number | null - category_marcelle?: Date | null - category_roberta?: boolean | null - category_trent?: any | null - category_viola: string - comment_cali: string - comment_delilah?: Array | null - comment_easter?: Date | null - comment_ella: string - comment_myles: string - comment_rocio?: string | null - createdat_hulda: any - createdat_pansy?: Array | null - email_andres: Date - email_cleveland?: string | null - email_keaton?: Array | null - email_lucio?: string | null - email_paris: string - email_paula?: string | null - email_ressie: string - fruit_a?: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe?: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices?: Array | null - id_gay: string - id_hailee: any - id_helen?: Array | null - id_ike: Array - id_joan?: Array | null - id_karelle?: string | null - id_lavern: Date - id_margarita?: string | null - id_maximilian: Array - id_william: Array - id_wilmer?: Array | null - 'kebab-a'?: DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara?: string | null - name_brionna: number - name_enoch: string - name_jermain?: Array | null - name_marielle?: string | null - name_myrtle?: Array | null - name_santos: Array - name_skye?: string | null - name_stephanie: boolean - password_alessia?: Array | null - password_camylle: Array - password_elenora?: number | null - password_felton?: Array | null - password_korey: number - password_murphy?: Array | null - password_vladimir?: number | null - phone_angelo: string - phone_colten: number - phone_erling?: Array | null - phone_johanna?: Array | null - phone_kendall: Array - phone_keyshawn?: string | null - phone_maryam?: string | null - phone_osvaldo: Array - phone_rupert?: any | null - snakes_on_a?: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica?: Array | null - status_cade: Array - status_lori?: string | null - status_ricky: number - status_sid?: Array | null - title_aidan?: Date | null - title_alexzander: string - title_haylee?: Array | null - title_ilene: Array - title_vicenta?: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna?: Array | null - token_rubye: string - token_ryley?: string | null - token_zora: Array - updatedat_aaliyah?: number | null - updatedat_abe?: Array | null - updatedat_brett?: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura?: Array | null - updatedat_melody: Array - updatedat_rossie?: number | null -} + avatar_darren?: Array | null; + avatar_ernestina: string; + avatar_mark?: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase?: boolean | null; + category_amari: string; + category_april: Array; + category_buddy?: Array | null; + category_clementine?: number | null; + category_marcelle?: Date | null; + category_roberta?: boolean | null; + category_trent?: any | null; + category_viola: string; + comment_cali: string; + comment_delilah?: Array | null; + comment_easter?: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio?: string | null; + createdat_hulda: any; + createdat_pansy?: Array | null; + email_andres: Date; + email_cleveland?: string | null; + email_keaton?: Array | null; + email_lucio?: string | null; + email_paris: string; + email_paula?: string | null; + email_ressie: string; + fruit_a?: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe?: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices?: Array | null; + id_gay: string; + id_hailee: any; + id_helen?: Array | null; + id_ike: Array; + id_joan?: Array | null; + id_karelle?: string | null; + id_lavern: Date; + id_margarita?: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer?: Array | null; + 'kebab-a'?: DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara?: string | null; + name_brionna: number; + name_enoch: string; + name_jermain?: Array | null; + name_marielle?: string | null; + name_myrtle?: Array | null; + name_santos: Array; + name_skye?: string | null; + name_stephanie: boolean; + password_alessia?: Array | null; + password_camylle: Array; + password_elenora?: number | null; + password_felton?: Array | null; + password_korey: number; + password_murphy?: Array | null; + password_vladimir?: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling?: Array | null; + phone_johanna?: Array | null; + phone_kendall: Array; + phone_keyshawn?: string | null; + phone_maryam?: string | null; + phone_osvaldo: Array; + phone_rupert?: any | null; + snakes_on_a?: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica?: Array | null; + status_cade: Array; + status_lori?: string | null; + status_ricky: number; + status_sid?: Array | null; + title_aidan?: Date | null; + title_alexzander: string; + title_haylee?: Array | null; + title_ilene: Array; + title_vicenta?: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna?: Array | null; + token_rubye: string; + token_ryley?: string | null; + token_zora: Array; + updatedat_aaliyah?: number | null; + updatedat_abe?: Array | null; + updatedat_brett?: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura?: Array | null; + updatedat_melody: Array; + updatedat_rossie?: number | null; +}; /** * this is the users table */ export interface UserEntity { - id: number + id: number; /** * Very long long long long long long long long long long long long long long long long long long long long long comment */ - name: string | null - name2: string - name3: string - other_id: number + name: string | null; + name2: string; + name3: string; + other_id: number; /** * This is the user identifier number * PRIMARY KEY */ - other_primary_id: number -} + other_primary_id: number; +}; /** * this is the users table */ export interface UserInsertEntity { - id?: number + id?: number; /** * Very long long long long long long long long long long long long long long long long long long long long long comment */ - name?: string | null - name2?: string - name3: string - other_id?: number + name?: string | null; + name2?: string; + name3: string; + other_id?: number; /** * This is the user identifier number * PRIMARY KEY */ - other_primary_id?: number -} + other_primary_id?: number; +}; ` @@ -2522,360 +2522,298 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface AddressInsertEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface HistoryInsertEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface KebabTestInsertEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface SnakeTestEntity { - id: number -} + id: number; +}; export interface SnakeTestInsertEntity { - id: number -} + id: number; +}; export interface SomeViewEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export interface TypeInsertEntity { - avatar_darren?: Array | null - avatar_ernestina: string - avatar_mark?: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase?: boolean | null - category_amari: string - category_april: Array - category_buddy?: Array | null - category_clementine?: number | null - category_marcelle?: Date | null - category_roberta?: boolean | null - category_trent?: any | null - category_viola: string - comment_cali: string - comment_delilah?: Array | null - comment_easter?: Date | null - comment_ella: string - comment_myles: string - comment_rocio?: string | null - createdat_hulda: any - createdat_pansy?: Array | null - email_andres: Date - email_cleveland?: string | null - email_keaton?: Array | null - email_lucio?: string | null - email_paris: string - email_paula?: string | null - email_ressie: string - fruit_a?: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe?: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices?: Array | null - id_gay: string - id_hailee: any - id_helen?: Array | null - id_ike: Array - id_joan?: Array | null - id_karelle?: string | null - id_lavern: Date - id_margarita?: string | null - id_maximilian: Array - id_william: Array - id_wilmer?: Array | null - 'kebab-a'?: DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara?: string | null - name_brionna: number - name_enoch: string - name_jermain?: Array | null - name_marielle?: string | null - name_myrtle?: Array | null - name_santos: Array - name_skye?: string | null - name_stephanie: boolean - password_alessia?: Array | null - password_camylle: Array - password_elenora?: number | null - password_felton?: Array | null - password_korey: number - password_murphy?: Array | null - password_vladimir?: number | null - phone_angelo: string - phone_colten: number - phone_erling?: Array | null - phone_johanna?: Array | null - phone_kendall: Array - phone_keyshawn?: string | null - phone_maryam?: string | null - phone_osvaldo: Array - phone_rupert?: any | null - snakes_on_a?: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica?: Array | null - status_cade: Array - status_lori?: string | null - status_ricky: number - status_sid?: Array | null - title_aidan?: Date | null - title_alexzander: string - title_haylee?: Array | null - title_ilene: Array - title_vicenta?: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna?: Array | null - token_rubye: string - token_ryley?: string | null - token_zora: Array - updatedat_aaliyah?: number | null - updatedat_abe?: Array | null - updatedat_brett?: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura?: Array | null - updatedat_melody: Array - updatedat_rossie?: number | null -} + avatar_darren?: Array | null; + avatar_ernestina: string; + avatar_mark?: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase?: boolean | null; + category_amari: string; + category_april: Array; + category_buddy?: Array | null; + category_clementine?: number | null; + category_marcelle?: Date | null; + category_roberta?: boolean | null; + category_trent?: any | null; + category_viola: string; + comment_cali: string; + comment_delilah?: Array | null; + comment_easter?: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio?: string | null; + createdat_hulda: any; + createdat_pansy?: Array | null; + email_andres: Date; + email_cleveland?: string | null; + email_keaton?: Array | null; + email_lucio?: string | null; + email_paris: string; + email_paula?: string | null; + email_ressie: string; + fruit_a?: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe?: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices?: Array | null; + id_gay: string; + id_hailee: any; + id_helen?: Array | null; + id_ike: Array; + id_joan?: Array | null; + id_karelle?: string | null; + id_lavern: Date; + id_margarita?: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer?: Array | null; + 'kebab-a'?: DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara?: string | null; + name_brionna: number; + name_enoch: string; + name_jermain?: Array | null; + name_marielle?: string | null; + name_myrtle?: Array | null; + name_santos: Array; + name_skye?: string | null; + name_stephanie: boolean; + password_alessia?: Array | null; + password_camylle: Array; + password_elenora?: number | null; + password_felton?: Array | null; + password_korey: number; + password_murphy?: Array | null; + password_vladimir?: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling?: Array | null; + phone_johanna?: Array | null; + phone_kendall: Array; + phone_keyshawn?: string | null; + phone_maryam?: string | null; + phone_osvaldo: Array; + phone_rupert?: any | null; + snakes_on_a?: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica?: Array | null; + status_cade: Array; + status_lori?: string | null; + status_ricky: number; + status_sid?: Array | null; + title_aidan?: Date | null; + title_alexzander: string; + title_haylee?: Array | null; + title_ilene: Array; + title_vicenta?: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna?: Array | null; + token_rubye: string; + token_ryley?: string | null; + token_zora: Array; + updatedat_aaliyah?: number | null; + updatedat_abe?: Array | null; + updatedat_brett?: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura?: Array | null; + updatedat_melody: Array; + updatedat_rossie?: number | null; +}; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; export interface UserInsertEntity { - id?: number - name?: string | null - name2?: string - name3: string - other_id?: number - other_primary_id?: number -} + id?: number; + name?: string | null; + name2?: string; + name3: string; + other_id?: number; + other_primary_id?: number; +}; ` exports['cjs/test/pg-typegen.js TAP returns help when missing connection > must match snapshot 1'] = ` -Usage: pg-typegen [options] - -Options: - -V, --version output the version number - -f, --suffix suffix to append to generated table type, e.g. - item -> ItemEntity (default: "Entity") - -s, --schema schema (default: "public") - -h, --header
header content (default: "") - -o, --output file output path (default: "stdout") - -e, --exclude excluded tables and enums as comma separated - string e.g. knex_migrations,knex_migrations_lock - (default: []) - --type use type definitions instead of interfaces in - generated output (default: false) - --noSemi, --no-semicolons omit semicolons in generated types - --ssl use ssl (default: false) - --optionals use optionals "?" instead of null (default: false) - --comments generate table and column comments (default: - false) - --pascal-enums transform enum keys to pascal case (default: - false) - --bigint use bigint for int8 types instead of strings - (default: false) - --date-as-string use string for date types instead of javascript - Date object (default: false) - --insert-types generate separate insert types with optional - fields for columns allowing NULL value or having - default values (default: false) - --table-names generate string literal type with all table names - (default: false) - --help display help for command - +undefined ` exports['cjs/test/pg-typegen.js TAP returns help when missing connection > must match snapshot 2'] = ` -Usage: pg-typegen [options] - -Options: - -V, --version output the version number - -f, --suffix suffix to append to generated table type, e.g. - item -> ItemEntity (default: "Entity") - -s, --schema schema (default: "public") - -h, --header
header content (default: "") - -o, --output file output path (default: "stdout") - -e, --exclude excluded tables and enums as comma separated - string e.g. knex_migrations,knex_migrations_lock - (default: []) - --type use type definitions instead of interfaces in - generated output (default: false) - --noSemi, --no-semicolons omit semicolons in generated types - --ssl use ssl (default: false) - --optionals use optionals "?" instead of null (default: false) - --comments generate table and column comments (default: - false) - --pascal-enums transform enum keys to pascal case (default: - false) - --bigint use bigint for int8 types instead of strings - (default: false) - --date-as-string use string for date types instead of javascript - Date object (default: false) - --insert-types generate separate insert types with optional - fields for columns allowing NULL value or having - default values (default: false) - --table-names generate string literal type with all table names - (default: false) - --help display help for command - +undefined ` diff --git a/tap-snapshots/test/cli.js.test.cjs b/tap-snapshots/test/cli.js.test.cjs index 12534a7..d07850a 100644 --- a/tap-snapshots/test/cli.js.test.cjs +++ b/tap-snapshots/test/cli.js.test.cjs @@ -6,7 +6,7 @@ */ 'use strict' exports['test/cli.js TAP generates table names > must match snapshot 1'] = ` -export type Tables = 'address' | 'histories' | 'kebab-test' | 'snake_test' | 'types' | 'users' +export type Tables = 'address' | 'histories' | 'kebab-test' | 'snake_test' | 'types' | 'users'; export enum DeliciousKebab { 'big-mix' = 'big-mix', @@ -24,156 +24,156 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface SnakeTestEntity { - id: number -} + id: number; +}; export interface SomeViewEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; ` @@ -195,161 +195,502 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface SnakeTestEntity { - id: number + id: number; +}; + +export interface SomeViewEntity { + test: number | null; + test_text: string | null; +}; + +export interface TypeEntity { + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; + +export interface UserEntity { + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; + + +` + +exports['test/cli.js TAP generates types to file > must match snapshot 1'] = ` +export enum DeliciousKebab { + 'big-mix' = 'big-mix', + mix = 'mix', +} + +export enum Fruits { + apple = 'apple', + banana = 'banana', + orange = 'orange', +} + +export enum SnakesOn { + a_plane = 'a_plane', } +export interface AddressEntity { + id: number; +}; + +export interface HistoryEntity { + id: number; +}; + +export interface KebabTestEntity { + id: number; +}; + +export interface MaterializedItemEntity { + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; + +export interface MaterializedOtherItemEntity { + test: number | null; + test_text: string | null; +}; + +export interface SnakeTestEntity { + id: number; +}; + export interface SomeViewEntity { - test: number | null - test_text: string | null + test: number | null; + test_text: string | null; +}; + +export interface TypeEntity { + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; + +export interface UserEntity { + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; + +` + +exports['test/cli.js TAP generates types with bigint option > must match snapshot 1'] = ` +export enum DeliciousKebab { + 'big-mix' = 'big-mix', + mix = 'mix', +} + +export enum Fruits { + apple = 'apple', + banana = 'banana', + orange = 'orange', +} + +export enum SnakesOn { + a_plane = 'a_plane', } +export interface AddressEntity { + id: number; +}; + +export interface HistoryEntity { + id: number; +}; + +export interface KebabTestEntity { + id: number; +}; + +export interface MaterializedItemEntity { + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; + +export interface MaterializedOtherItemEntity { + test: number | null; + test_text: string | null; +}; + +export interface SnakeTestEntity { + id: number; +}; + +export interface SomeViewEntity { + test: number | null; + test_text: string | null; +}; + export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: bigint | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: bigint; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; ` -exports['test/cli.js TAP generates types to file > must match snapshot 1'] = ` +exports['test/cli.js TAP generates types with exclusion > must match snapshot 1'] = ` export enum DeliciousKebab { 'big-mix' = 'big-mix', mix = 'mix', @@ -366,160 +707,49 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} - -export interface SnakeTestEntity { - id: number -} + test: number | null; + test_text: string | null; +}; export interface SomeViewEntity { - test: number | null - test_text: string | null -} - -export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + test: number | null; + test_text: string | null; +}; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; + ` -exports['test/cli.js TAP generates types with bigint option > must match snapshot 1'] = ` +exports['test/cli.js TAP generates types with header > must match snapshot 1'] = ` +/* eslint-disable */ + export enum DeliciousKebab { 'big-mix' = 'big-mix', mix = 'mix', @@ -535,869 +765,468 @@ export enum SnakesOn { a_plane = 'a_plane', } -export interface AddressEntity { - id: number -} - -export interface HistoryEntity { - id: number -} - -export interface KebabTestEntity { - id: number -} - -export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} - -export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} - -export interface SnakeTestEntity { - id: number -} - -export interface SomeViewEntity { - test: number | null - test_text: string | null -} - -export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: bigint | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: bigint - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} - -export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} - - -` - -exports['test/cli.js TAP generates types with exclusion > must match snapshot 1'] = ` -export enum DeliciousKebab { - 'big-mix' = 'big-mix', - mix = 'mix', -} - -export enum Fruits { - apple = 'apple', - banana = 'banana', - orange = 'orange', -} - -export enum SnakesOn { - a_plane = 'a_plane', -} - -export interface AddressEntity { - id: number -} - -export interface HistoryEntity { - id: number -} - -export interface KebabTestEntity { - id: number -} - -export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} - -export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} - -export interface SomeViewEntity { - test: number | null - test_text: string | null -} - -export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} - - -` - -exports['test/cli.js TAP generates types with header > must match snapshot 1'] = ` -/* eslint-disable */ - -export enum DeliciousKebab { - 'big-mix' = 'big-mix', - mix = 'mix', -} - -export enum Fruits { - apple = 'apple', - banana = 'banana', - orange = 'orange', -} - -export enum SnakesOn { - a_plane = 'a_plane', -} - -export interface AddressEntity { - id: number -} - -export interface HistoryEntity { - id: number -} - -export interface KebabTestEntity { - id: number -} - -export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} - -export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} - -export interface SnakeTestEntity { - id: number -} - -export interface SomeViewEntity { - test: number | null - test_text: string | null -} - -export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} - -export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} - - -` - -exports['test/cli.js TAP generates types with insert types > must match snapshot 1'] = ` -export enum DeliciousKebab { - 'big-mix' = 'big-mix', - mix = 'mix', -} - -export enum Fruits { - apple = 'apple', - banana = 'banana', - orange = 'orange', -} - -export enum SnakesOn { - a_plane = 'a_plane', -} - -export interface AddressEntity { - id: number -} - -export interface AddressInsertEntity { - id: number -} - -export interface HistoryEntity { - id: number -} - -export interface HistoryInsertEntity { - id: number -} - -export interface KebabTestEntity { - id: number -} - -export interface KebabTestInsertEntity { - id: number -} - -export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} - -export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} - -export interface SnakeTestEntity { - id: number -} - -export interface SnakeTestInsertEntity { - id: number -} - -export interface SomeViewEntity { - test: number | null - test_text: string | null -} - -export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} - -export interface TypeInsertEntity { - avatar_darren?: Array | null - avatar_ernestina: string - avatar_mark?: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase?: boolean | null - category_amari: string - category_april: Array - category_buddy?: Array | null - category_clementine?: number | null - category_marcelle?: Date | null - category_roberta?: boolean | null - category_trent?: any | null - category_viola: string - comment_cali: string - comment_delilah?: Array | null - comment_easter?: Date | null - comment_ella: string - comment_myles: string - comment_rocio?: string | null - createdat_hulda: any - createdat_pansy?: Array | null - email_andres: Date - email_cleveland?: string | null - email_keaton?: Array | null - email_lucio?: string | null - email_paris: string - email_paula?: string | null - email_ressie: string - fruit_a?: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe?: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices?: Array | null - id_gay: string - id_hailee: any - id_helen?: Array | null - id_ike: Array - id_joan?: Array | null - id_karelle?: string | null - id_lavern: Date - id_margarita?: string | null - id_maximilian: Array - id_william: Array - id_wilmer?: Array | null - 'kebab-a'?: DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara?: string | null - name_brionna: number - name_enoch: string - name_jermain?: Array | null - name_marielle?: string | null - name_myrtle?: Array | null - name_santos: Array - name_skye?: string | null - name_stephanie: boolean - password_alessia?: Array | null - password_camylle: Array - password_elenora?: number | null - password_felton?: Array | null - password_korey: number - password_murphy?: Array | null - password_vladimir?: number | null - phone_angelo: string - phone_colten: number - phone_erling?: Array | null - phone_johanna?: Array | null - phone_kendall: Array - phone_keyshawn?: string | null - phone_maryam?: string | null - phone_osvaldo: Array - phone_rupert?: any | null - snakes_on_a?: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica?: Array | null - status_cade: Array - status_lori?: string | null - status_ricky: number - status_sid?: Array | null - title_aidan?: Date | null - title_alexzander: string - title_haylee?: Array | null - title_ilene: Array - title_vicenta?: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna?: Array | null - token_rubye: string - token_ryley?: string | null - token_zora: Array - updatedat_aaliyah?: number | null - updatedat_abe?: Array | null - updatedat_brett?: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura?: Array | null - updatedat_melody: Array - updatedat_rossie?: number | null -} - -export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} - -export interface UserInsertEntity { - id?: number - name?: string | null - name2?: string - name3: string - other_id?: number - other_primary_id?: number -} - - -` - -exports['test/cli.js TAP generates types with no-semicolons option > must match snapshot 1'] = ` -export enum DeliciousKebab { - 'big-mix' = 'big-mix', - mix = 'mix', -} - -export enum Fruits { - apple = 'apple', - banana = 'banana', - orange = 'orange', -} - -export enum SnakesOn { - a_plane = 'a_plane', -} - -export interface AddressEntity { - id: number -} - -export interface HistoryEntity { - id: number -} - -export interface KebabTestEntity { - id: number -} - -export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} - -export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} - -export interface SnakeTestEntity { - id: number -} - -export interface SomeViewEntity { - test: number | null - test_text: string | null -} - -export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} +export interface AddressEntity { + id: number; +}; + +export interface HistoryEntity { + id: number; +}; + +export interface KebabTestEntity { + id: number; +}; + +export interface MaterializedItemEntity { + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; + +export interface MaterializedOtherItemEntity { + test: number | null; + test_text: string | null; +}; + +export interface SnakeTestEntity { + id: number; +}; + +export interface SomeViewEntity { + test: number | null; + test_text: string | null; +}; + +export interface TypeEntity { + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; + + +` + +exports['test/cli.js TAP generates types with insert types > must match snapshot 1'] = ` +export enum DeliciousKebab { + 'big-mix' = 'big-mix', + mix = 'mix', +} + +export enum Fruits { + apple = 'apple', + banana = 'banana', + orange = 'orange', +} + +export enum SnakesOn { + a_plane = 'a_plane', } +export interface AddressEntity { + id: number; +}; + +export interface AddressInsertEntity { + id: number; +}; + +export interface HistoryEntity { + id: number; +}; + +export interface HistoryInsertEntity { + id: number; +}; + +export interface KebabTestEntity { + id: number; +}; + +export interface KebabTestInsertEntity { + id: number; +}; + +export interface MaterializedItemEntity { + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; + +export interface MaterializedOtherItemEntity { + test: number | null; + test_text: string | null; +}; + +export interface SnakeTestEntity { + id: number; +}; + +export interface SnakeTestInsertEntity { + id: number; +}; + +export interface SomeViewEntity { + test: number | null; + test_text: string | null; +}; + +export interface TypeEntity { + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; + +export interface TypeInsertEntity { + avatar_darren?: Array | null; + avatar_ernestina: string; + avatar_mark?: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase?: boolean | null; + category_amari: string; + category_april: Array; + category_buddy?: Array | null; + category_clementine?: number | null; + category_marcelle?: Date | null; + category_roberta?: boolean | null; + category_trent?: any | null; + category_viola: string; + comment_cali: string; + comment_delilah?: Array | null; + comment_easter?: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio?: string | null; + createdat_hulda: any; + createdat_pansy?: Array | null; + email_andres: Date; + email_cleveland?: string | null; + email_keaton?: Array | null; + email_lucio?: string | null; + email_paris: string; + email_paula?: string | null; + email_ressie: string; + fruit_a?: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe?: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices?: Array | null; + id_gay: string; + id_hailee: any; + id_helen?: Array | null; + id_ike: Array; + id_joan?: Array | null; + id_karelle?: string | null; + id_lavern: Date; + id_margarita?: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer?: Array | null; + 'kebab-a'?: DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara?: string | null; + name_brionna: number; + name_enoch: string; + name_jermain?: Array | null; + name_marielle?: string | null; + name_myrtle?: Array | null; + name_santos: Array; + name_skye?: string | null; + name_stephanie: boolean; + password_alessia?: Array | null; + password_camylle: Array; + password_elenora?: number | null; + password_felton?: Array | null; + password_korey: number; + password_murphy?: Array | null; + password_vladimir?: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling?: Array | null; + phone_johanna?: Array | null; + phone_kendall: Array; + phone_keyshawn?: string | null; + phone_maryam?: string | null; + phone_osvaldo: Array; + phone_rupert?: any | null; + snakes_on_a?: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica?: Array | null; + status_cade: Array; + status_lori?: string | null; + status_ricky: number; + status_sid?: Array | null; + title_aidan?: Date | null; + title_alexzander: string; + title_haylee?: Array | null; + title_ilene: Array; + title_vicenta?: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna?: Array | null; + token_rubye: string; + token_ryley?: string | null; + token_zora: Array; + updatedat_aaliyah?: number | null; + updatedat_abe?: Array | null; + updatedat_brett?: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura?: Array | null; + updatedat_melody: Array; + updatedat_rossie?: number | null; +}; + +export interface UserEntity { + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; + +export interface UserInsertEntity { + id?: number; + name?: string | null; + name2?: string; + name3: string; + other_id?: number; + other_primary_id?: number; +}; + ` -exports['test/cli.js TAP generates types with noSemi option > must match snapshot 1'] = ` +exports['test/cli.js TAP generates types with no-semicolons option > must match snapshot 1'] = ` export enum DeliciousKebab { 'big-mix' = 'big-mix', mix = 'mix', @@ -1568,20 +1397,20 @@ export interface UserEntity { ` -exports['test/cli.js TAP generates types with pascal case enums > must match snapshot 1'] = ` +exports['test/cli.js TAP generates types with noSemi option > must match snapshot 1'] = ` export enum DeliciousKebab { - BigMix = 'big-mix', - Mix = 'mix', + 'big-mix' = 'big-mix', + mix = 'mix', } export enum Fruits { - Apple = 'apple', - Banana = 'banana', - Orange = 'orange', + apple = 'apple', + banana = 'banana', + orange = 'orange', } export enum SnakesOn { - APlane = 'a_plane', + a_plane = 'a_plane', } export interface AddressEntity { @@ -1737,6 +1566,177 @@ export interface UserEntity { } +` + +exports['test/cli.js TAP generates types with pascal case enums > must match snapshot 1'] = ` +export enum DeliciousKebab { + BigMix = 'big-mix', + Mix = 'mix', +} + +export enum Fruits { + Apple = 'apple', + Banana = 'banana', + Orange = 'orange', +} + +export enum SnakesOn { + APlane = 'a_plane', +} + +export interface AddressEntity { + id: number; +}; + +export interface HistoryEntity { + id: number; +}; + +export interface KebabTestEntity { + id: number; +}; + +export interface MaterializedItemEntity { + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; + +export interface MaterializedOtherItemEntity { + test: number | null; + test_text: string | null; +}; + +export interface SnakeTestEntity { + id: number; +}; + +export interface SomeViewEntity { + test: number | null; + test_text: string | null; +}; + +export interface TypeEntity { + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; + +export interface UserEntity { + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; + + ` exports['test/cli.js TAP generates types with types option > must match snapshot 1'] = ` @@ -1756,156 +1756,156 @@ export enum SnakesOn { } export type AddressEntity = { - id: number -} + id: number; +}; export type HistoryEntity = { - id: number -} + id: number; +}; export type KebabTestEntity = { - id: number -} + id: number; +}; export type MaterializedItemEntity = { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export type MaterializedOtherItemEntity = { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export type SnakeTestEntity = { - id: number -} + id: number; +}; export type SomeViewEntity = { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export type TypeEntity = { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export type UserEntity = { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; ` @@ -1915,32 +1915,21 @@ Usage: pg-typegen [options] Options: -V, --version output the version number - -f, --suffix suffix to append to generated table type, e.g. - item -> ItemEntity (default: "Entity") + -f, --suffix suffix to append to generated table type, e.g. item -> ItemEntity (default: "Entity") -s, --schema schema (default: "public") -h, --header
header content (default: "") -o, --output file output path (default: "stdout") - -e, --exclude excluded tables and enums as comma separated - string e.g. knex_migrations,knex_migrations_lock - (default: []) - --type use type definitions instead of interfaces in - generated output (default: false) - --noSemi, --no-semicolons omit semicolons in generated types + -e, --exclude excluded tables and enums as comma separated string e.g. knex_migrations,knex_migrations_lock (default: []) + --type use type definitions instead of interfaces in generated output (default: false) + --noSemi, --no-semicolons omit semicolons in generated types (default: false) --ssl use ssl (default: false) --optionals use optionals "?" instead of null (default: false) - --comments generate table and column comments (default: - false) - --pascal-enums transform enum keys to pascal case (default: - false) - --bigint use bigint for int8 types instead of strings - (default: false) - --date-as-string use string for date types instead of javascript - Date object (default: false) - --insert-types generate separate insert types with optional - fields for columns allowing NULL value or having - default values (default: false) - --table-names generate string literal type with all table names - (default: false) + --comments generate table and column comments (default: false) + --pascal-enums transform enum keys to pascal case (default: false) + --bigint use bigint for int8 types instead of strings (default: false) + --date-as-string use string for date types instead of javascript Date object (default: false) + --insert-types generate separate insert types with optional fields for columns allowing NULL value or having default values (default: false) + --table-names generate string literal type with all table names (default: false) --help display help for command Example: @@ -1953,32 +1942,21 @@ Usage: pg-typegen [options] Options: -V, --version output the version number - -f, --suffix suffix to append to generated table type, e.g. - item -> ItemEntity (default: "Entity") + -f, --suffix suffix to append to generated table type, e.g. item -> ItemEntity (default: "Entity") -s, --schema schema (default: "public") -h, --header
header content (default: "") -o, --output file output path (default: "stdout") - -e, --exclude excluded tables and enums as comma separated - string e.g. knex_migrations,knex_migrations_lock - (default: []) - --type use type definitions instead of interfaces in - generated output (default: false) - --noSemi, --no-semicolons omit semicolons in generated types + -e, --exclude excluded tables and enums as comma separated string e.g. knex_migrations,knex_migrations_lock (default: []) + --type use type definitions instead of interfaces in generated output (default: false) + --noSemi, --no-semicolons omit semicolons in generated types (default: false) --ssl use ssl (default: false) --optionals use optionals "?" instead of null (default: false) - --comments generate table and column comments (default: - false) - --pascal-enums transform enum keys to pascal case (default: - false) - --bigint use bigint for int8 types instead of strings - (default: false) - --date-as-string use string for date types instead of javascript - Date object (default: false) - --insert-types generate separate insert types with optional - fields for columns allowing NULL value or having - default values (default: false) - --table-names generate string literal type with all table names - (default: false) + --comments generate table and column comments (default: false) + --pascal-enums transform enum keys to pascal case (default: false) + --bigint use bigint for int8 types instead of strings (default: false) + --date-as-string use string for date types instead of javascript Date object (default: false) + --insert-types generate separate insert types with optional fields for columns allowing NULL value or having default values (default: false) + --table-names generate string literal type with all table names (default: false) --help display help for command Example: diff --git a/tap-snapshots/test/pg-typegen.js.test.cjs b/tap-snapshots/test/pg-typegen.js.test.cjs index 260a227..3449681 100644 --- a/tap-snapshots/test/pg-typegen.js.test.cjs +++ b/tap-snapshots/test/pg-typegen.js.test.cjs @@ -1357,291 +1357,291 @@ Object { } export interface AddressEntity { - id: number - } + id: number; + }; export interface AddressInsertEntity { - id: number - } + id: number; + }; export interface HistoryEntity { - id: number - } + id: number; + }; export interface HistoryInsertEntity { - id: number - } + id: number; + }; export interface KebabTestEntity { - id: number - } + id: number; + }; export interface KebabTestInsertEntity { - id: number - } + id: number; + }; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null - } + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; + }; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null - } + test: number | null; + test_text: string | null; + }; export interface SnakeTestEntity { - id: number - } + id: number; + }; export interface SnakeTestInsertEntity { - id: number - } + id: number; + }; export interface SomeViewEntity { - test: number | null - test_text: string | null - } + test: number | null; + test_text: string | null; + }; export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null - } + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; + }; export interface TypeInsertEntity { - avatar_darren?: Array | null - avatar_ernestina: string - avatar_mark?: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase?: boolean | null - category_amari: string - category_april: Array - category_buddy?: Array | null - category_clementine?: number | null - category_marcelle?: Date | null - category_roberta?: boolean | null - category_trent?: any | null - category_viola: string - comment_cali: string - comment_delilah?: Array | null - comment_easter?: Date | null - comment_ella: string - comment_myles: string - comment_rocio?: string | null - createdat_hulda: any - createdat_pansy?: Array | null - email_andres: Date - email_cleveland?: string | null - email_keaton?: Array | null - email_lucio?: string | null - email_paris: string - email_paula?: string | null - email_ressie: string - fruit_a?: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe?: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices?: Array | null - id_gay: string - id_hailee: any - id_helen?: Array | null - id_ike: Array - id_joan?: Array | null - id_karelle?: string | null - id_lavern: Date - id_margarita?: string | null - id_maximilian: Array - id_william: Array - id_wilmer?: Array | null - 'kebab-a'?: DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara?: string | null - name_brionna: number - name_enoch: string - name_jermain?: Array | null - name_marielle?: string | null - name_myrtle?: Array | null - name_santos: Array - name_skye?: string | null - name_stephanie: boolean - password_alessia?: Array | null - password_camylle: Array - password_elenora?: number | null - password_felton?: Array | null - password_korey: number - password_murphy?: Array | null - password_vladimir?: number | null - phone_angelo: string - phone_colten: number - phone_erling?: Array | null - phone_johanna?: Array | null - phone_kendall: Array - phone_keyshawn?: string | null - phone_maryam?: string | null - phone_osvaldo: Array - phone_rupert?: any | null - snakes_on_a?: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica?: Array | null - status_cade: Array - status_lori?: string | null - status_ricky: number - status_sid?: Array | null - title_aidan?: Date | null - title_alexzander: string - title_haylee?: Array | null - title_ilene: Array - title_vicenta?: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna?: Array | null - token_rubye: string - token_ryley?: string | null - token_zora: Array - updatedat_aaliyah?: number | null - updatedat_abe?: Array | null - updatedat_brett?: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura?: Array | null - updatedat_melody: Array - updatedat_rossie?: number | null - } + avatar_darren?: Array | null; + avatar_ernestina: string; + avatar_mark?: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase?: boolean | null; + category_amari: string; + category_april: Array; + category_buddy?: Array | null; + category_clementine?: number | null; + category_marcelle?: Date | null; + category_roberta?: boolean | null; + category_trent?: any | null; + category_viola: string; + comment_cali: string; + comment_delilah?: Array | null; + comment_easter?: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio?: string | null; + createdat_hulda: any; + createdat_pansy?: Array | null; + email_andres: Date; + email_cleveland?: string | null; + email_keaton?: Array | null; + email_lucio?: string | null; + email_paris: string; + email_paula?: string | null; + email_ressie: string; + fruit_a?: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe?: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices?: Array | null; + id_gay: string; + id_hailee: any; + id_helen?: Array | null; + id_ike: Array; + id_joan?: Array | null; + id_karelle?: string | null; + id_lavern: Date; + id_margarita?: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer?: Array | null; + 'kebab-a'?: DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara?: string | null; + name_brionna: number; + name_enoch: string; + name_jermain?: Array | null; + name_marielle?: string | null; + name_myrtle?: Array | null; + name_santos: Array; + name_skye?: string | null; + name_stephanie: boolean; + password_alessia?: Array | null; + password_camylle: Array; + password_elenora?: number | null; + password_felton?: Array | null; + password_korey: number; + password_murphy?: Array | null; + password_vladimir?: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling?: Array | null; + phone_johanna?: Array | null; + phone_kendall: Array; + phone_keyshawn?: string | null; + phone_maryam?: string | null; + phone_osvaldo: Array; + phone_rupert?: any | null; + snakes_on_a?: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica?: Array | null; + status_cade: Array; + status_lori?: string | null; + status_ricky: number; + status_sid?: Array | null; + title_aidan?: Date | null; + title_alexzander: string; + title_haylee?: Array | null; + title_ilene: Array; + title_vicenta?: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna?: Array | null; + token_rubye: string; + token_ryley?: string | null; + token_zora: Array; + updatedat_aaliyah?: number | null; + updatedat_abe?: Array | null; + updatedat_brett?: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura?: Array | null; + updatedat_melody: Array; + updatedat_rossie?: number | null; + }; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number - } + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; + }; export interface UserInsertEntity { - id?: number - name?: string | null - name2?: string - name3: string - other_id?: number - other_primary_id?: number - } + id?: number; + name?: string | null; + name2?: string; + name3: string; + other_id?: number; + other_primary_id?: number; + }; ), } @@ -1664,156 +1664,156 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface SnakeTestEntity { - id: number -} + id: number; +}; export interface SomeViewEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; ` @@ -1834,156 +1834,156 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface SnakeTestEntity { - id: number -} + id: number; +}; export interface SomeViewEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; ` @@ -2008,169 +2008,169 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface SnakeTestEntity { /** * PRIMARY KEY */ - id: number -} + id: number; +}; export interface SomeViewEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; /** * this is the users table */ export interface UserEntity { - id: number + id: number; /** * Very long long long long long long long long long long long long long long long long long long long long long comment */ - name: string | null - name2: string - name3: string - other_id: number + name: string | null; + name2: string; + name3: string; + other_id: number; /** * This is the user identifier number * PRIMARY KEY */ - other_primary_id: number -} + other_primary_id: number; +}; ` @@ -2191,317 +2191,317 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface AddressInsertEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface HistoryInsertEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface KebabTestInsertEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface SnakeTestEntity { /** * PRIMARY KEY */ - id: number -} + id: number; +}; export interface SnakeTestInsertEntity { /** * PRIMARY KEY */ - id: number -} + id: number; +}; export interface SomeViewEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export interface TypeInsertEntity { - avatar_darren?: Array | null - avatar_ernestina: string - avatar_mark?: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase?: boolean | null - category_amari: string - category_april: Array - category_buddy?: Array | null - category_clementine?: number | null - category_marcelle?: Date | null - category_roberta?: boolean | null - category_trent?: any | null - category_viola: string - comment_cali: string - comment_delilah?: Array | null - comment_easter?: Date | null - comment_ella: string - comment_myles: string - comment_rocio?: string | null - createdat_hulda: any - createdat_pansy?: Array | null - email_andres: Date - email_cleveland?: string | null - email_keaton?: Array | null - email_lucio?: string | null - email_paris: string - email_paula?: string | null - email_ressie: string - fruit_a?: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe?: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices?: Array | null - id_gay: string - id_hailee: any - id_helen?: Array | null - id_ike: Array - id_joan?: Array | null - id_karelle?: string | null - id_lavern: Date - id_margarita?: string | null - id_maximilian: Array - id_william: Array - id_wilmer?: Array | null - 'kebab-a'?: DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara?: string | null - name_brionna: number - name_enoch: string - name_jermain?: Array | null - name_marielle?: string | null - name_myrtle?: Array | null - name_santos: Array - name_skye?: string | null - name_stephanie: boolean - password_alessia?: Array | null - password_camylle: Array - password_elenora?: number | null - password_felton?: Array | null - password_korey: number - password_murphy?: Array | null - password_vladimir?: number | null - phone_angelo: string - phone_colten: number - phone_erling?: Array | null - phone_johanna?: Array | null - phone_kendall: Array - phone_keyshawn?: string | null - phone_maryam?: string | null - phone_osvaldo: Array - phone_rupert?: any | null - snakes_on_a?: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica?: Array | null - status_cade: Array - status_lori?: string | null - status_ricky: number - status_sid?: Array | null - title_aidan?: Date | null - title_alexzander: string - title_haylee?: Array | null - title_ilene: Array - title_vicenta?: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna?: Array | null - token_rubye: string - token_ryley?: string | null - token_zora: Array - updatedat_aaliyah?: number | null - updatedat_abe?: Array | null - updatedat_brett?: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura?: Array | null - updatedat_melody: Array - updatedat_rossie?: number | null -} + avatar_darren?: Array | null; + avatar_ernestina: string; + avatar_mark?: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase?: boolean | null; + category_amari: string; + category_april: Array; + category_buddy?: Array | null; + category_clementine?: number | null; + category_marcelle?: Date | null; + category_roberta?: boolean | null; + category_trent?: any | null; + category_viola: string; + comment_cali: string; + comment_delilah?: Array | null; + comment_easter?: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio?: string | null; + createdat_hulda: any; + createdat_pansy?: Array | null; + email_andres: Date; + email_cleveland?: string | null; + email_keaton?: Array | null; + email_lucio?: string | null; + email_paris: string; + email_paula?: string | null; + email_ressie: string; + fruit_a?: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe?: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices?: Array | null; + id_gay: string; + id_hailee: any; + id_helen?: Array | null; + id_ike: Array; + id_joan?: Array | null; + id_karelle?: string | null; + id_lavern: Date; + id_margarita?: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer?: Array | null; + 'kebab-a'?: DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara?: string | null; + name_brionna: number; + name_enoch: string; + name_jermain?: Array | null; + name_marielle?: string | null; + name_myrtle?: Array | null; + name_santos: Array; + name_skye?: string | null; + name_stephanie: boolean; + password_alessia?: Array | null; + password_camylle: Array; + password_elenora?: number | null; + password_felton?: Array | null; + password_korey: number; + password_murphy?: Array | null; + password_vladimir?: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling?: Array | null; + phone_johanna?: Array | null; + phone_kendall: Array; + phone_keyshawn?: string | null; + phone_maryam?: string | null; + phone_osvaldo: Array; + phone_rupert?: any | null; + snakes_on_a?: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica?: Array | null; + status_cade: Array; + status_lori?: string | null; + status_ricky: number; + status_sid?: Array | null; + title_aidan?: Date | null; + title_alexzander: string; + title_haylee?: Array | null; + title_ilene: Array; + title_vicenta?: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna?: Array | null; + token_rubye: string; + token_ryley?: string | null; + token_zora: Array; + updatedat_aaliyah?: number | null; + updatedat_abe?: Array | null; + updatedat_brett?: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura?: Array | null; + updatedat_melody: Array; + updatedat_rossie?: number | null; +}; /** * this is the users table */ export interface UserEntity { - id: number + id: number; /** * Very long long long long long long long long long long long long long long long long long long long long long comment */ - name: string | null - name2: string - name3: string - other_id: number + name: string | null; + name2: string; + name3: string; + other_id: number; /** * This is the user identifier number * PRIMARY KEY */ - other_primary_id: number -} + other_primary_id: number; +}; /** * this is the users table */ export interface UserInsertEntity { - id?: number + id?: number; /** * Very long long long long long long long long long long long long long long long long long long long long long comment */ - name?: string | null - name2?: string - name3: string - other_id?: number + name?: string | null; + name2?: string; + name3: string; + other_id?: number; /** * This is the user identifier number * PRIMARY KEY */ - other_primary_id?: number -} + other_primary_id?: number; +}; ` @@ -2522,360 +2522,298 @@ export enum SnakesOn { } export interface AddressEntity { - id: number -} + id: number; +}; export interface AddressInsertEntity { - id: number -} + id: number; +}; export interface HistoryEntity { - id: number -} + id: number; +}; export interface HistoryInsertEntity { - id: number -} + id: number; +}; export interface KebabTestEntity { - id: number -} + id: number; +}; export interface KebabTestInsertEntity { - id: number -} + id: number; +}; export interface MaterializedItemEntity { - test: number | null - test_array: Array | null - test_text: string | null - test_timestamp: Date | null -} + test: number | null; + test_array: Array | null; + test_text: string | null; + test_timestamp: Date | null; +}; export interface MaterializedOtherItemEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface SnakeTestEntity { - id: number -} + id: number; +}; export interface SnakeTestInsertEntity { - id: number -} + id: number; +}; export interface SomeViewEntity { - test: number | null - test_text: string | null -} + test: number | null; + test_text: string | null; +}; export interface TypeEntity { - avatar_darren: Array | null - avatar_ernestina: string - avatar_mark: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase: boolean | null - category_amari: string - category_april: Array - category_buddy: Array | null - category_clementine: number | null - category_marcelle: Date | null - category_roberta: boolean | null - category_trent: any | null - category_viola: string - comment_cali: string - comment_delilah: Array | null - comment_easter: Date | null - comment_ella: string - comment_myles: string - comment_rocio: string | null - createdat_hulda: any - createdat_pansy: Array | null - email_andres: Date - email_cleveland: string | null - email_keaton: Array | null - email_lucio: string | null - email_paris: string - email_paula: string | null - email_ressie: string - fruit_a: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices: Array | null - id_gay: string - id_hailee: any - id_helen: Array | null - id_ike: Array - id_joan: Array | null - id_karelle: string | null - id_lavern: Date - id_margarita: string | null - id_maximilian: Array - id_william: Array - id_wilmer: Array | null - 'kebab-a': DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara: string | null - name_brionna: number - name_enoch: string - name_jermain: Array | null - name_marielle: string | null - name_myrtle: Array | null - name_santos: Array - name_skye: string | null - name_stephanie: boolean - password_alessia: Array | null - password_camylle: Array - password_elenora: number | null - password_felton: Array | null - password_korey: number - password_murphy: Array | null - password_vladimir: number | null - phone_angelo: string - phone_colten: number - phone_erling: Array | null - phone_johanna: Array | null - phone_kendall: Array - phone_keyshawn: string | null - phone_maryam: string | null - phone_osvaldo: Array - phone_rupert: any | null - snakes_on_a: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica: Array | null - status_cade: Array - status_lori: string | null - status_ricky: number - status_sid: Array | null - title_aidan: Date | null - title_alexzander: string - title_haylee: Array | null - title_ilene: Array - title_vicenta: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna: Array | null - token_rubye: string - token_ryley: string | null - token_zora: Array - updatedat_aaliyah: number | null - updatedat_abe: Array | null - updatedat_brett: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura: Array | null - updatedat_melody: Array - updatedat_rossie: number | null -} + avatar_darren: Array | null; + avatar_ernestina: string; + avatar_mark: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase: boolean | null; + category_amari: string; + category_april: Array; + category_buddy: Array | null; + category_clementine: number | null; + category_marcelle: Date | null; + category_roberta: boolean | null; + category_trent: any | null; + category_viola: string; + comment_cali: string; + comment_delilah: Array | null; + comment_easter: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio: string | null; + createdat_hulda: any; + createdat_pansy: Array | null; + email_andres: Date; + email_cleveland: string | null; + email_keaton: Array | null; + email_lucio: string | null; + email_paris: string; + email_paula: string | null; + email_ressie: string; + fruit_a: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices: Array | null; + id_gay: string; + id_hailee: any; + id_helen: Array | null; + id_ike: Array; + id_joan: Array | null; + id_karelle: string | null; + id_lavern: Date; + id_margarita: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer: Array | null; + 'kebab-a': DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara: string | null; + name_brionna: number; + name_enoch: string; + name_jermain: Array | null; + name_marielle: string | null; + name_myrtle: Array | null; + name_santos: Array; + name_skye: string | null; + name_stephanie: boolean; + password_alessia: Array | null; + password_camylle: Array; + password_elenora: number | null; + password_felton: Array | null; + password_korey: number; + password_murphy: Array | null; + password_vladimir: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling: Array | null; + phone_johanna: Array | null; + phone_kendall: Array; + phone_keyshawn: string | null; + phone_maryam: string | null; + phone_osvaldo: Array; + phone_rupert: any | null; + snakes_on_a: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica: Array | null; + status_cade: Array; + status_lori: string | null; + status_ricky: number; + status_sid: Array | null; + title_aidan: Date | null; + title_alexzander: string; + title_haylee: Array | null; + title_ilene: Array; + title_vicenta: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna: Array | null; + token_rubye: string; + token_ryley: string | null; + token_zora: Array; + updatedat_aaliyah: number | null; + updatedat_abe: Array | null; + updatedat_brett: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura: Array | null; + updatedat_melody: Array; + updatedat_rossie: number | null; +}; export interface TypeInsertEntity { - avatar_darren?: Array | null - avatar_ernestina: string - avatar_mark?: Array | null - avatar_myah: Array - avatar_rozella: Array - camelCase?: boolean | null - category_amari: string - category_april: Array - category_buddy?: Array | null - category_clementine?: number | null - category_marcelle?: Date | null - category_roberta?: boolean | null - category_trent?: any | null - category_viola: string - comment_cali: string - comment_delilah?: Array | null - comment_easter?: Date | null - comment_ella: string - comment_myles: string - comment_rocio?: string | null - createdat_hulda: any - createdat_pansy?: Array | null - email_andres: Date - email_cleveland?: string | null - email_keaton?: Array | null - email_lucio?: string | null - email_paris: string - email_paula?: string | null - email_ressie: string - fruit_a?: Fruits | null - fruit_b: Fruits - group_abigayle: Array - group_gabe?: Array | null - group_jay: Array - group_jedediah: Array - group_shanny: Date - group_toby: string - group_ulices?: Array | null - id_gay: string - id_hailee: any - id_helen?: Array | null - id_ike: Array - id_joan?: Array | null - id_karelle?: string | null - id_lavern: Date - id_margarita?: string | null - id_maximilian: Array - id_william: Array - id_wilmer?: Array | null - 'kebab-a'?: DeliciousKebab | null - 'kebab-b': DeliciousKebab - name_amara?: string | null - name_brionna: number - name_enoch: string - name_jermain?: Array | null - name_marielle?: string | null - name_myrtle?: Array | null - name_santos: Array - name_skye?: string | null - name_stephanie: boolean - password_alessia?: Array | null - password_camylle: Array - password_elenora?: number | null - password_felton?: Array | null - password_korey: number - password_murphy?: Array | null - password_vladimir?: number | null - phone_angelo: string - phone_colten: number - phone_erling?: Array | null - phone_johanna?: Array | null - phone_kendall: Array - phone_keyshawn?: string | null - phone_maryam?: string | null - phone_osvaldo: Array - phone_rupert?: any | null - snakes_on_a?: SnakesOn | null - snakes_on_b: SnakesOn - status_amalia: number - status_angelica?: Array | null - status_cade: Array - status_lori?: string | null - status_ricky: number - status_sid?: Array | null - title_aidan?: Date | null - title_alexzander: string - title_haylee?: Array | null - title_ilene: Array - title_vicenta?: string | null - title_vivienne: Array - token_adella: Array - token_hermann: Array - token_kenyon: Array - token_marianna?: Array | null - token_rubye: string - token_ryley?: string | null - token_zora: Array - updatedat_aaliyah?: number | null - updatedat_abe?: Array | null - updatedat_brett?: Array | null - updatedat_cedrick: Array - updatedat_derick: Array - updatedat_eli: Array - updatedat_ewell: Array - updatedat_laura?: Array | null - updatedat_melody: Array - updatedat_rossie?: number | null -} + avatar_darren?: Array | null; + avatar_ernestina: string; + avatar_mark?: Array | null; + avatar_myah: Array; + avatar_rozella: Array; + camelCase?: boolean | null; + category_amari: string; + category_april: Array; + category_buddy?: Array | null; + category_clementine?: number | null; + category_marcelle?: Date | null; + category_roberta?: boolean | null; + category_trent?: any | null; + category_viola: string; + comment_cali: string; + comment_delilah?: Array | null; + comment_easter?: Date | null; + comment_ella: string; + comment_myles: string; + comment_rocio?: string | null; + createdat_hulda: any; + createdat_pansy?: Array | null; + email_andres: Date; + email_cleveland?: string | null; + email_keaton?: Array | null; + email_lucio?: string | null; + email_paris: string; + email_paula?: string | null; + email_ressie: string; + fruit_a?: Fruits | null; + fruit_b: Fruits; + group_abigayle: Array; + group_gabe?: Array | null; + group_jay: Array; + group_jedediah: Array; + group_shanny: Date; + group_toby: string; + group_ulices?: Array | null; + id_gay: string; + id_hailee: any; + id_helen?: Array | null; + id_ike: Array; + id_joan?: Array | null; + id_karelle?: string | null; + id_lavern: Date; + id_margarita?: string | null; + id_maximilian: Array; + id_william: Array; + id_wilmer?: Array | null; + 'kebab-a'?: DeliciousKebab | null; + 'kebab-b': DeliciousKebab; + name_amara?: string | null; + name_brionna: number; + name_enoch: string; + name_jermain?: Array | null; + name_marielle?: string | null; + name_myrtle?: Array | null; + name_santos: Array; + name_skye?: string | null; + name_stephanie: boolean; + password_alessia?: Array | null; + password_camylle: Array; + password_elenora?: number | null; + password_felton?: Array | null; + password_korey: number; + password_murphy?: Array | null; + password_vladimir?: number | null; + phone_angelo: string; + phone_colten: number; + phone_erling?: Array | null; + phone_johanna?: Array | null; + phone_kendall: Array; + phone_keyshawn?: string | null; + phone_maryam?: string | null; + phone_osvaldo: Array; + phone_rupert?: any | null; + snakes_on_a?: SnakesOn | null; + snakes_on_b: SnakesOn; + status_amalia: number; + status_angelica?: Array | null; + status_cade: Array; + status_lori?: string | null; + status_ricky: number; + status_sid?: Array | null; + title_aidan?: Date | null; + title_alexzander: string; + title_haylee?: Array | null; + title_ilene: Array; + title_vicenta?: string | null; + title_vivienne: Array; + token_adella: Array; + token_hermann: Array; + token_kenyon: Array; + token_marianna?: Array | null; + token_rubye: string; + token_ryley?: string | null; + token_zora: Array; + updatedat_aaliyah?: number | null; + updatedat_abe?: Array | null; + updatedat_brett?: Array | null; + updatedat_cedrick: Array; + updatedat_derick: Array; + updatedat_eli: Array; + updatedat_ewell: Array; + updatedat_laura?: Array | null; + updatedat_melody: Array; + updatedat_rossie?: number | null; +}; export interface UserEntity { - id: number - name: string | null - name2: string - name3: string - other_id: number - other_primary_id: number -} + id: number; + name: string | null; + name2: string; + name3: string; + other_id: number; + other_primary_id: number; +}; export interface UserInsertEntity { - id?: number - name?: string | null - name2?: string - name3: string - other_id?: number - other_primary_id?: number -} + id?: number; + name?: string | null; + name2?: string; + name3: string; + other_id?: number; + other_primary_id?: number; +}; ` exports['test/pg-typegen.js TAP returns help when missing connection > must match snapshot 1'] = ` -Usage: pg-typegen [options] - -Options: - -V, --version output the version number - -f, --suffix suffix to append to generated table type, e.g. - item -> ItemEntity (default: "Entity") - -s, --schema schema (default: "public") - -h, --header
header content (default: "") - -o, --output file output path (default: "stdout") - -e, --exclude excluded tables and enums as comma separated - string e.g. knex_migrations,knex_migrations_lock - (default: []) - --type use type definitions instead of interfaces in - generated output (default: false) - --noSemi, --no-semicolons omit semicolons in generated types - --ssl use ssl (default: false) - --optionals use optionals "?" instead of null (default: false) - --comments generate table and column comments (default: - false) - --pascal-enums transform enum keys to pascal case (default: - false) - --bigint use bigint for int8 types instead of strings - (default: false) - --date-as-string use string for date types instead of javascript - Date object (default: false) - --insert-types generate separate insert types with optional - fields for columns allowing NULL value or having - default values (default: false) - --table-names generate string literal type with all table names - (default: false) - --help display help for command - +undefined ` exports['test/pg-typegen.js TAP returns help when missing connection > must match snapshot 2'] = ` -Usage: pg-typegen [options] - -Options: - -V, --version output the version number - -f, --suffix suffix to append to generated table type, e.g. - item -> ItemEntity (default: "Entity") - -s, --schema schema (default: "public") - -h, --header
header content (default: "") - -o, --output file output path (default: "stdout") - -e, --exclude excluded tables and enums as comma separated - string e.g. knex_migrations,knex_migrations_lock - (default: []) - --type use type definitions instead of interfaces in - generated output (default: false) - --noSemi, --no-semicolons omit semicolons in generated types - --ssl use ssl (default: false) - --optionals use optionals "?" instead of null (default: false) - --comments generate table and column comments (default: - false) - --pascal-enums transform enum keys to pascal case (default: - false) - --bigint use bigint for int8 types instead of strings - (default: false) - --date-as-string use string for date types instead of javascript - Date object (default: false) - --insert-types generate separate insert types with optional - fields for columns allowing NULL value or having - default values (default: false) - --table-names generate string literal type with all table names - (default: false) - --help display help for command - +undefined ` diff --git a/test/cli.js b/test/cli.js index 8ac8878..53173c0 100644 --- a/test/cli.js +++ b/test/cli.js @@ -2,7 +2,7 @@ import childProcess from 'node:child_process' import fs from 'node:fs' import url from 'node:url' import path from 'node:path' -import { test, only } from 'tap' +import t from 'tap' import { getTestPostgresConnectionString } from './helpers/setup-postgres.js' const connection = getTestPostgresConnectionString() @@ -10,7 +10,7 @@ const ssl = process.env.DATABASE_SSL_ENABLED === 'true' const __dirname = url.fileURLToPath(new URL('.', import.meta.url)) -test('help', t => { +t.test('help', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), '--help'], { @@ -30,7 +30,7 @@ test('help', t => { }) }) -test('version', t => { +t.test('version', t => { t.plan(1) t.cleanSnapshot = s => s.replace(/v[0-9.]+/g, 'v{v}') @@ -52,7 +52,7 @@ test('version', t => { }) }) -test('missing connection string', t => { +t.test('missing connection string', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js')], { @@ -72,7 +72,7 @@ test('missing connection string', t => { }) }) -test('generates types stdout', t => { +t.test('generates types stdout', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : ''], { @@ -92,7 +92,7 @@ test('generates types stdout', t => { }) }) -only('generates types to file', t => { +t.test('generates types to file', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), '-o', './entities.ts', connection, ssl ? '--ssl' : ''], { @@ -110,7 +110,7 @@ only('generates types to file', t => { }) }) -test('reports success to stdout', t => { +t.test('reports success to stdout', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), '-o', './entities.ts', connection, ssl ? '--ssl' : ''], { @@ -130,7 +130,7 @@ test('reports success to stdout', t => { }) }) -test('generates types with exclusion', t => { +t.test('generates types with exclusion', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '-e', 'types,snake_test'], { @@ -150,7 +150,7 @@ test('generates types with exclusion', t => { }) }) -test('generates types with header', t => { +t.test('generates types with header', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '-h', '/* eslint-disable */'], { @@ -170,7 +170,7 @@ test('generates types with header', t => { }) }) -test('generates types with pascal case enums', t => { +t.test('generates types with pascal case enums', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '--pascal-enums'], { @@ -190,7 +190,7 @@ test('generates types with pascal case enums', t => { }) }) -test('generates types with noSemi option', t => { +t.test('generates types with noSemi option', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '--noSemi'], { @@ -210,7 +210,7 @@ test('generates types with noSemi option', t => { }) }) -test('generates types with no-semicolons option', t => { +t.test('generates types with no-semicolons option', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '--no-semicolons'], { @@ -230,7 +230,7 @@ test('generates types with no-semicolons option', t => { }) }) -test('generates types with bigint option', t => { +t.test('generates types with bigint option', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '--bigint'], { @@ -250,7 +250,7 @@ test('generates types with bigint option', t => { }) }) -test('generates types with types option', t => { +t.test('generates types with types option', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '--type'], { @@ -270,7 +270,7 @@ test('generates types with types option', t => { }) }) -test('generates types with insert types', t => { +t.test('generates types with insert types', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '--insert-types'], { @@ -290,7 +290,7 @@ test('generates types with insert types', t => { }) }) -test('generates table names', t => { +t.test('generates table names', t => { t.plan(1) const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), connection, ssl ? '--ssl' : '', '--table-names'], { @@ -310,7 +310,7 @@ test('generates table names', t => { }) }) -test('sends error to stderr', t => { +t.test('sends error to stderr', t => { t.plan(1) const invalidConnection = 'postgres://postgres:postgres@0.0.0.0:1/test_db' const child = childProcess.spawn(process.execPath, [path.join(__dirname, '..', 'src', 'index.js'), '-o', './entities.ts', invalidConnection, ssl ? '--ssl' : ''], { diff --git a/test/pg-typegen.js b/test/pg-typegen.js index 31e5b8a..260ed64 100644 --- a/test/pg-typegen.js +++ b/test/pg-typegen.js @@ -1,4 +1,4 @@ -import { test } from 'tap' +import t from 'tap' import fs from 'node:fs' import path from 'node:path' import url from 'node:url' @@ -9,27 +9,27 @@ import { getTestPostgresConnectionString } from './helpers/setup-postgres.js' const connection = getTestPostgresConnectionString() const ssl = process.env.DATABASE_SSL_ENABLED === 'true' -test('generates types as return value', async (t) => { +t.test('generates types as return value', async (t) => { const result = await generate({ connection, ssl }) t.matchSnapshot(result) }) -test('generates types with insert types', async (t) => { +t.test('generates types with insert types', async (t) => { const result = await generate({ connection, ssl, insertTypes: true }) t.matchSnapshot(result) }) -test('generates types with comments', async (t) => { +t.test('generates types with comments', async (t) => { const result = await generate({ connection, ssl, comments: true }) t.matchSnapshot(result) }) -test('generates types with comments and insert types', async (t) => { +t.test('generates types with comments and insert types', async (t) => { const result = await generate({ connection, ssl, comments: true, insertTypes: true }) t.matchSnapshot(result) }) -test('generates types to file', async (t) => { +t.test('generates types to file', async (t) => { const outputPath = path.join(url.fileURLToPath(new URL('.', import.meta.url)), './test-entities.ts') const result = await generate({ connection, ssl, output: outputPath }) const content = fs.readFileSync(outputPath, 'utf8') @@ -38,17 +38,17 @@ test('generates types to file', async (t) => { fs.unlinkSync(outputPath) }) -test('returns help when missing connection', async (t) => { +t.test('returns help when missing connection', async (t) => { const result = await generate() t.matchSnapshot(result) }) -test('returns help when missing connection', async (t) => { +t.test('returns help when missing connection', async (t) => { const result = await generate({}) t.matchSnapshot(result) }) -test('allows hooking into schema result', async (t) => { +t.test('allows hooking into schema result', async (t) => { let result await generate({ connection, @@ -60,7 +60,7 @@ test('allows hooking into schema result', async (t) => { t.matchSnapshot(result) }) -test('allows hooking into type result', async (t) => { +t.test('allows hooking into type result', async (t) => { let result await generate({ connection, diff --git a/test/postgres.js b/test/postgres.js index 6125126..dfcee29 100644 --- a/test/postgres.js +++ b/test/postgres.js @@ -1,8 +1,8 @@ -import { test } from 'tap' +import t from 'tap' import getSchemaDefinition, { getPostgresOpts } from '../src/postgres.js' import { getTestPostgresConnectionString } from './helpers/setup-postgres.js' -test('retrieves database schema', async t => { +t.test('retrieves database schema', async t => { t.plan(1) const connection = getTestPostgresConnectionString() @@ -13,7 +13,7 @@ test('retrieves database schema', async t => { t.matchSnapshot(result) }) -test('returns typeMapping with int8 to string mapping', async t => { +t.test('returns typeMapping with int8 to string mapping', async t => { t.plan(1) const connection = getTestPostgresConnectionString() @@ -24,7 +24,7 @@ test('returns typeMapping with int8 to string mapping', async t => { t.matchSnapshot(result) }) -test('returns typeMapping with int8 to bigint mapping', async t => { +t.test('returns typeMapping with int8 to bigint mapping', async t => { t.plan(1) const connection = getTestPostgresConnectionString() @@ -35,7 +35,7 @@ test('returns typeMapping with int8 to bigint mapping', async t => { t.matchSnapshot(result) }) -test('returns typeMapping with date to javascript Date mapping', async t => { +t.test('returns typeMapping with date to javascript Date mapping', async t => { t.plan(1) const connection = getTestPostgresConnectionString() @@ -46,7 +46,7 @@ test('returns typeMapping with date to javascript Date mapping', async t => { t.matchSnapshot(result) }) -test('returns typeMapping with date to string mapping', async t => { +t.test('returns typeMapping with date to string mapping', async t => { t.plan(1) const connection = getTestPostgresConnectionString() @@ -57,7 +57,7 @@ test('returns typeMapping with date to string mapping', async t => { t.matchSnapshot(result) }) -test('uses correct postgres opts', t => { +t.test('uses correct postgres opts', t => { t.plan(3) let result = getPostgresOpts({}) diff --git a/test/typescript.js b/test/typescript.js index db95e2e..3bbdf6a 100644 --- a/test/typescript.js +++ b/test/typescript.js @@ -1,4 +1,4 @@ -import { test } from 'tap' +import t from 'tap' import typescript from '../src/typescript.js' const tables = [ @@ -102,7 +102,7 @@ const opts = { semicolons: true } -test('using types', t => { +t.test('using types', t => { t.plan(2) let result = typescript({ ...opts, type: true, semicolons: true }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) @@ -111,7 +111,7 @@ test('using types', t => { t.matchSnapshot(result.types) }) -test('using interfaces', t => { +t.test('using interfaces', t => { t.plan(2) let result = typescript({ ...opts, type: false, semicolons: true }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) @@ -120,49 +120,49 @@ test('using interfaces', t => { t.matchSnapshot(result.types) }) -test('with custom suffix', t => { +t.test('with custom suffix', t => { t.plan(1) const result = typescript({ ...opts, suffix: 'Record' }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) }) -test('with header', t => { +t.test('with header', t => { t.plan(1) const result = typescript({ ...opts, header: '/* eslint-disable */' }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) }) -test('with optionals', t => { +t.test('with optionals', t => { t.plan(1) const result = typescript({ ...opts, optionals: true }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) }) -test('without enums', t => { +t.test('without enums', t => { t.plan(1) const result = typescript({ ...opts, optionals: true }, { tables, typeMapping, enums: [] }) t.matchSnapshot(result.types) }) -test('with pascal case enums', t => { +t.test('with pascal case enums', t => { t.plan(1) const result = typescript({ ...opts, pascalEnums: true }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) }) -test('with generated insert types', t => { +t.test('with generated insert types', t => { t.plan(1) const result = typescript({ ...opts, insertTypes: true }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) }) -test('with generated insert types with optionals', t => { +t.test('with generated insert types with optionals', t => { t.plan(1) const result = typescript({ ...opts, insertTypes: true, optionals: true }, { tables, typeMapping, enums }) t.matchSnapshot(result.types) }) -test('with table string literal', t => { +t.test('with table string literal', t => { t.plan(1) const result = typescript({ ...opts, tableNames: true }, { tables, typeMapping, enums }) t.matchSnapshot(result.types)