feat: Convert all app files to JS
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import verifyCredentials from './verify-credentials';
|
||||
import isStillVerified from './is-still-verified';
|
||||
import verifyCredentials from './verify-credentials.js';
|
||||
import isStillVerified from './is-still-verified.js';
|
||||
|
||||
export default {
|
||||
fields: [
|
||||
{
|
||||
key: 'version',
|
||||
label: 'PostgreSQL version',
|
||||
type: 'string' as const,
|
||||
type: 'string',
|
||||
required: true,
|
||||
readOnly: false,
|
||||
value: null,
|
||||
@@ -18,7 +18,7 @@ export default {
|
||||
{
|
||||
key: 'host',
|
||||
label: 'Host',
|
||||
type: 'string' as const,
|
||||
type: 'string',
|
||||
required: true,
|
||||
readOnly: false,
|
||||
value: '127.0.0.1',
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
{
|
||||
key: 'port',
|
||||
label: 'Port',
|
||||
type: 'string' as const,
|
||||
type: 'string',
|
||||
required: true,
|
||||
readOnly: false,
|
||||
value: '5432',
|
||||
@@ -40,7 +40,7 @@ export default {
|
||||
{
|
||||
key: 'enableSsl',
|
||||
label: 'Enable SSL',
|
||||
type: 'dropdown' as const,
|
||||
type: 'dropdown',
|
||||
required: true,
|
||||
readOnly: false,
|
||||
value: 'false',
|
||||
@@ -61,7 +61,7 @@ export default {
|
||||
{
|
||||
key: 'database',
|
||||
label: 'Database name',
|
||||
type: 'string' as const,
|
||||
type: 'string',
|
||||
required: true,
|
||||
readOnly: false,
|
||||
value: null,
|
||||
@@ -72,7 +72,7 @@ export default {
|
||||
{
|
||||
key: 'user',
|
||||
label: 'Database username',
|
||||
type: 'string' as const,
|
||||
type: 'string',
|
||||
required: true,
|
||||
readOnly: false,
|
||||
value: null,
|
||||
@@ -83,7 +83,7 @@ export default {
|
||||
{
|
||||
key: 'password',
|
||||
label: 'Password',
|
||||
type: 'string' as const,
|
||||
type: 'string',
|
||||
required: true,
|
||||
readOnly: false,
|
||||
value: null,
|
@@ -0,0 +1,9 @@
|
||||
import verifyCredentials from './verify-credentials.js';
|
||||
|
||||
const isStillVerified = async ($) => {
|
||||
await verifyCredentials($);
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
export default isStillVerified;
|
@@ -1,10 +0,0 @@
|
||||
import { IGlobalVariable } from '@automatisch/types';
|
||||
import verifyCredentials from './verify-credentials';
|
||||
|
||||
const isStillVerified = async ($: IGlobalVariable) => {
|
||||
await verifyCredentials($);
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
export default isStillVerified;
|
@@ -1,8 +1,7 @@
|
||||
import { IGlobalVariable } from '@automatisch/types';
|
||||
import logger from '../../../helpers/logger';
|
||||
import getClient from '../common/postgres-client';
|
||||
import logger from '../../../helpers/logger.js';
|
||||
import getClient from '../common/postgres-client.js';
|
||||
|
||||
const verifyCredentials = async ($: IGlobalVariable) => {
|
||||
const verifyCredentials = async ($) => {
|
||||
const client = getClient($);
|
||||
const checkConnection = await client.raw('SELECT 1');
|
||||
client.destroy();
|
Reference in New Issue
Block a user