mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
refactor: ts and composition api on more elements
This commit is contained in:
@ -1,22 +1,24 @@
|
||||
import formatter from 'pg-connection-string'; // parses a connection string
|
||||
import { ConnectionParams } from 'common/interfaces/antares';
|
||||
import * as formatter from 'pg-connection-string'; // parses a connection string
|
||||
|
||||
const formatHost = host => {
|
||||
const formatHost = (host: string) => {
|
||||
const results = host === 'localhost' ? '127.0.0.1' : host;
|
||||
return results;
|
||||
};
|
||||
|
||||
const checkForSSl = conn => {
|
||||
const checkForSSl = (conn: string) => {
|
||||
return conn.includes('ssl=true');
|
||||
};
|
||||
|
||||
const connStringConstruct = (args) => {
|
||||
const connStringConstruct = (args: ConnectionParams & { pgConnString: string }): ConnectionParams => {
|
||||
if (!args.pgConnString)
|
||||
return args;
|
||||
|
||||
if (typeof args.pgConnString !== 'string')
|
||||
return args;
|
||||
|
||||
const stringArgs = formatter.parse(args.pgConnString);
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const stringArgs: any = formatter.parse(args.pgConnString);
|
||||
|
||||
const client = args.client || 'pg';
|
||||
|
@ -1,14 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
/* eslint-disable @typescript-eslint/no-empty-function */
|
||||
/* eslint-disable @typescript-eslint/no-this-alias */
|
||||
/* eslint-disable no-labels */
|
||||
/* eslint-disable no-return-assign */
|
||||
/* eslint-disable no-cond-assign */
|
||||
/* eslint-disable no-prototype-builtins */
|
||||
/* eslint-disable no-mixed-operators */
|
||||
/* eslint-disable */
|
||||
/*
|
||||
Got from 'ace-builds/src-noconflict/ext-language_tools' and edited to support icons.
|
||||
I'm not responsible of this crazy code.
|
||||
I'm not responsible of this crazy code 🤯.
|
||||
*/
|
||||
|
||||
ace.define('ace/snippets', ['require', 'exports', 'module', 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/lib/lang', 'ace/range', 'ace/range_list', 'ace/keyboard/hash_handler', 'ace/tokenizer', 'ace/clipboard', 'ace/lib/dom', 'ace/editor'], function (require, exports, module) {
|
||||
|
Reference in New Issue
Block a user