feat: Convert all app files to JS

This commit is contained in:
Faruk AYDIN
2024-01-05 17:44:21 +01:00
parent b95478b635
commit 43dba351c3
1030 changed files with 5114 additions and 6436 deletions

View File

@@ -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: 'host',
label: 'Host',
type: 'string' as const,
type: 'string',
required: true,
readOnly: false,
value: null,
@@ -18,7 +18,7 @@ export default {
{
key: 'username',
label: 'Email/Username',
type: 'string' as const,
type: 'string',
required: true,
readOnly: false,
value: null,
@@ -30,7 +30,7 @@ export default {
{
key: 'password',
label: 'Password',
type: 'string' as const,
type: 'string',
required: true,
readOnly: false,
value: null,
@@ -42,7 +42,7 @@ export default {
{
key: 'useTls',
label: 'Use TLS?',
type: 'dropdown' as const,
type: 'dropdown',
required: false,
readOnly: false,
value: false,
@@ -64,7 +64,7 @@ export default {
{
key: 'port',
label: 'Port',
type: 'string' as const,
type: 'string',
required: false,
readOnly: false,
value: '25',
@@ -76,7 +76,7 @@ export default {
{
key: 'fromEmail',
label: 'From Email',
type: 'string' as const,
type: 'string',
required: false,
readOnly: false,
value: null,

View File

@@ -0,0 +1,8 @@
import verifyCredentials from './verify-credentials.js';
const isStillVerified = async ($) => {
await verifyCredentials($);
return true;
};
export default isStillVerified;

View File

@@ -1,9 +0,0 @@
import { IGlobalVariable } from '@automatisch/types';
import verifyCredentials from './verify-credentials';
const isStillVerified = async ($: IGlobalVariable) => {
await verifyCredentials($);
return true;
};
export default isStillVerified;

View File

@@ -0,0 +1,11 @@
import transporter from '../common/transporter.js';
const verifyCredentials = async ($) => {
await transporter($).verify();
await $.auth.set({
screenName: $.auth.data.username,
});
};
export default verifyCredentials;

View File

@@ -1,12 +0,0 @@
import { IGlobalVariable } from '@automatisch/types';
import transporter from '../common/transporter';
const verifyCredentials = async ($: IGlobalVariable) => {
await transporter($).verify();
await $.auth.set({
screenName: $.auth.data.username,
});
};
export default verifyCredentials;