diff --git a/package-lock.json b/package-lock.json index 1f36e78..6d9fa11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "kickstart-fastify", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "kickstart-fastify", - "version": "1.0.1", + "version": "1.0.2", "license": "MIT", "dependencies": { "@fastify/auth": "^4.2.0", diff --git a/package.json b/package.json index 2a8d5bc..135b18d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kickstart-fastify", - "version": "1.0.1", + "version": "1.0.2", "description": "", "main": "index.js", "_moduleAliases": { @@ -13,8 +13,8 @@ "lint": "eslint --fix ./", "migrate": "prisma migrate dev", "seed": "prisma db seed", - "keygen": "tsc && node ./dist/scripts/keygen.js", - "sdkgen": "tsc && node ./dist/scripts/sdkgen.js" + "keygen": "ts-node ./scripts/keygen.ts", + "sdkgen": "ts-node ./scripts/sdkgen.ts" }, "repository": { "type": "git", diff --git a/scripts/keygen.ts b/scripts/keygen.ts index 06c03e6..5dbc20e 100644 --- a/scripts/keygen.ts +++ b/scripts/keygen.ts @@ -1,8 +1,10 @@ +import 'module-alias/register' + import { randomBytes } from 'crypto' import { existsSync, mkdirSync, writeFileSync } from 'fs' import path from 'path' -const outputFolder = path.join(__dirname, '../../keys') +const outputFolder = path.join(__dirname, '../keys') const main = () => { if (!existsSync(outputFolder)) { diff --git a/scripts/sdkgen.ts b/scripts/sdkgen.ts index 3003d3c..c1d0cf6 100644 --- a/scripts/sdkgen.ts +++ b/scripts/sdkgen.ts @@ -1,11 +1,13 @@ +import 'module-alias/register' + import { existsSync, mkdirSync } from 'fs' import path from 'path' import { generateApi } from 'swagger-typescript-api' -import build from '../src/app' -import { SYS_CONSTANTS } from '../src/constants/systemConstants' +import build from '@/app' +import { SYS_CONSTANTS } from '@/constants/systemConstants' -const outputFolder = path.join(__dirname, '../../sdk') +const outputFolder = path.join(__dirname, '../sdk') const main = async () => { if (!existsSync(outputFolder)) {