Skip to content

Commit

Permalink
chore: rename module to pg-typegen
Browse files Browse the repository at this point in the history
  • Loading branch information
aldis-ameriks committed Oct 27, 2020
1 parent 4f71742 commit fb2acd3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const postgres = require('./lib/postgres')

const program = new Command()
program
.name('schema-typegen')
.name('pg-typegen')
.version(`v${packageJson.version}`)
.arguments('<connection>')
.option('-f, --suffix <suffix>', 'suffix to append to generated table type, e.g. item -> ItemEntity', 'Entity')
Expand All @@ -29,7 +29,7 @@ program
program.on('--help', () => {
console.log('')
console.log('Example:')
console.log(' $ schema-typegen -o ./entities.ts postgres://username:password@localhost:5432/database')
console.log(' $ pg-typegen -o ./entities.ts postgres://username:password@localhost:5432/database')
})

function parseArray (value) {
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "schema-typegen",
"version": "2.8.0",
"description": "Generate TypeScript type definitions from database schema",
"name": "pg-typegen",
"version": "3.0.0",
"description": "Generate TypeScript type definitions from Postgres database",
"main": "index.js",
"bin": {
"schema-typegen": "index.js"
"pg-typegen": "index.js"
},
"scripts": {
"test": "tap test/*.js --100 --before=test/helpers/setup-postgres.js",
Expand All @@ -23,11 +23,11 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/aldis-ameriks/schema-typegen.git"
"url": "git+https://github.com/aldis-ameriks/pg-typegen.git"
},
"homepage": "https://github.com/aldis-ameriks/schema-typegen#readme",
"homepage": "https://github.com/aldis-ameriks/pg-typegen#readme",
"bugs": {
"url": "https://github.com/aldis-ameriks/schema-typegen/issues"
"url": "https://github.com/aldis-ameriks/pg-typegen/issues"
},
"license": "MIT",
"dependencies": {
Expand Down
8 changes: 4 additions & 4 deletions tap-snapshots/test-cli.js-TAP.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ export type TypeEntity = {
`

exports['test/cli.js TAP help > must match snapshot 1'] = `
Usage: schema-typegen [options] <connection>
Usage: pg-typegen [options] <connection>
Options:
-V, --version output the version number
Expand All @@ -1296,12 +1296,12 @@ Options:
--help display help for command
Example:
$ schema-typegen -o ./entities.ts postgres://username:password@localhost:5432/database
$ pg-typegen -o ./entities.ts postgres://username:password@localhost:5432/database
`

exports['test/cli.js TAP missing connection string > must match snapshot 1'] = `
Usage: schema-typegen [options] <connection>
Usage: pg-typegen [options] <connection>
Options:
-V, --version output the version number
Expand All @@ -1327,7 +1327,7 @@ Options:
--help display help for command
Example:
$ schema-typegen -o ./entities.ts postgres://username:password@localhost:5432/database
$ pg-typegen -o ./entities.ts postgres://username:password@localhost:5432/database
`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
exports['test/schema-typegen.js TAP generates types as return value > must match snapshot 1'] = `
exports['test/pg-typegen.js TAP generates types as return value > must match snapshot 1'] = `
export enum DeliciousKebab {
'big-mix' = 'big-mix',
mix = 'mix',
Expand Down Expand Up @@ -157,7 +157,7 @@ export interface TypeEntity {
`

exports['test/schema-typegen.js TAP generates types to file > must match snapshot 1'] = `
exports['test/pg-typegen.js TAP generates types to file > must match snapshot 1'] = `
export enum DeliciousKebab {
'big-mix' = 'big-mix',
mix = 'mix',
Expand Down Expand Up @@ -309,12 +309,12 @@ export interface TypeEntity {
`

exports['test/schema-typegen.js TAP generates types to file > must match snapshot 2'] = `
exports['test/pg-typegen.js TAP generates types to file > must match snapshot 2'] = `
✔ Generated types from 6 tables and 3 enums
`

exports['test/schema-typegen.js TAP returns help when missing connection > must match snapshot 1'] = `
Usage: schema-typegen [options] <connection>
exports['test/pg-typegen.js TAP returns help when missing connection > must match snapshot 1'] = `
Usage: pg-typegen [options] <connection>
Options:
-V, --version output the version number
Expand All @@ -341,8 +341,8 @@ Options:
`

exports['test/schema-typegen.js TAP returns help when missing connection > must match snapshot 2'] = `
Usage: schema-typegen [options] <connection>
exports['test/pg-typegen.js TAP returns help when missing connection > must match snapshot 2'] = `
Usage: pg-typegen [options] <connection>
Options:
-V, --version output the version number
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit fb2acd3

Please sign in to comment.