feat: Convert package scripts to work with JS
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Client } from 'pg';
|
||||
import pg from 'pg';
|
||||
|
||||
const client = new Client({
|
||||
const client = new pg.Client({
|
||||
host: 'localhost',
|
||||
user: 'postgres',
|
||||
port: 5432,
|
||||
|
@@ -1,3 +1,3 @@
|
||||
import { createDatabaseAndUser } from './utils';
|
||||
import { createDatabaseAndUser } from './utils.js';
|
||||
|
||||
createDatabaseAndUser();
|
||||
|
@@ -1,3 +1,3 @@
|
||||
import { dropDatabase } from './utils';
|
||||
import { dropDatabase } from './utils.js';
|
||||
|
||||
dropDatabase();
|
||||
|
@@ -1,3 +1,3 @@
|
||||
import { createUser } from './utils';
|
||||
import { createUser } from './utils.js';
|
||||
|
||||
createUser();
|
||||
|
@@ -1,9 +1,9 @@
|
||||
import appConfig from '../../src/config/app';
|
||||
import logger from '../../src/helpers/logger';
|
||||
import client from './client';
|
||||
import User from '../../src/models/user';
|
||||
import Role from '../../src/models/role';
|
||||
import '../../src/config/orm';
|
||||
import appConfig from '../../src/config/app.js';
|
||||
import logger from '../../src/helpers/logger.js';
|
||||
import client from './client.js';
|
||||
import User from '../../src/models/user.js';
|
||||
import Role from '../../src/models/role.js';
|
||||
import '../../src/config/orm.js';
|
||||
|
||||
async function fetchAdminRole() {
|
||||
const role = await Role.query()
|
||||
|
Reference in New Issue
Block a user