fix(core): update
This commit is contained in:
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartmail',
|
||||
version: '1.0.19',
|
||||
description: 'a unified format for representing and dealing with mails'
|
||||
}
|
@ -1,2 +1,2 @@
|
||||
export * from './smartmail.classes.smartmail';
|
||||
export * from './smartmail.classes.emailaddressvalidator';
|
||||
export * from './smartmail.classes.smartmail.js';
|
||||
export * from './smartmail.classes.emailaddressvalidator.js';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as plugins from './smartmail.plugins';
|
||||
import * as paths from './smartmail.paths';
|
||||
import * as plugins from './smartmail.plugins.js';
|
||||
import * as paths from './smartmail.paths.js';
|
||||
|
||||
export interface IEmailValidationResult {
|
||||
valid: boolean;
|
||||
@ -9,7 +9,7 @@ export interface IEmailValidationResult {
|
||||
}
|
||||
|
||||
export class EmailAddressValidator {
|
||||
public domainMap: { [key: string]: 'disposable' | 'freemail'};
|
||||
public domainMap: { [key: string]: 'disposable' | 'freemail' };
|
||||
|
||||
public smartdns = new plugins.smartdns.Smartdns({});
|
||||
|
||||
@ -23,7 +23,7 @@ export class EmailAddressValidator {
|
||||
valid: !!result,
|
||||
reason: 'todo',
|
||||
disposable: this.domainMap[emailArray[1]] === 'disposable',
|
||||
freemail: this.domainMap[emailArray[1]] === 'freemail'
|
||||
freemail: this.domainMap[emailArray[1]] === 'freemail',
|
||||
};
|
||||
}
|
||||
|
||||
@ -34,7 +34,6 @@ export class EmailAddressValidator {
|
||||
);
|
||||
const localFileObject = JSON.parse(localFileString);
|
||||
|
||||
|
||||
let onlineFileObject: any;
|
||||
try {
|
||||
onlineFileObject = (
|
||||
@ -49,9 +48,7 @@ export class EmailAddressValidator {
|
||||
} catch (e) {
|
||||
this.domainMap = localFileObject;
|
||||
console.log(e);
|
||||
console.log(
|
||||
'smartmail EmailAddressValidator: Using local email list for email validation'
|
||||
);
|
||||
console.log('smartmail EmailAddressValidator: Using local email list for email validation');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as plugins from './smartmail.plugins';
|
||||
import * as plugins from './smartmail.plugins.js';
|
||||
|
||||
export interface ISmartmailOptions<T> {
|
||||
from: string;
|
||||
|
@ -1,4 +1,7 @@
|
||||
import * as plugins from './smartmail.plugins';
|
||||
import * as plugins from './smartmail.plugins.js';
|
||||
|
||||
export const packageDir = plugins.path.join(__dirname, '../');
|
||||
export const packageDir = plugins.path.join(
|
||||
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
|
||||
'../'
|
||||
);
|
||||
export const assetDir = plugins.path.join(packageDir, './assets');
|
||||
|
@ -1,14 +1,13 @@
|
||||
// node native scope
|
||||
import * as path from 'path';
|
||||
|
||||
export {
|
||||
path
|
||||
};
|
||||
export { path };
|
||||
|
||||
// pushrocks scope
|
||||
import * as smartdns from '@pushrocks/smartdns';
|
||||
import * as smartfile from '@pushrocks/smartfile';
|
||||
import * as smartmustache from '@pushrocks/smartmustache';
|
||||
import * as smartpath from '@pushrocks/smartpath';
|
||||
import * as smartrequest from '@pushrocks/smartrequest';
|
||||
|
||||
export { smartdns, smartfile, smartmustache, smartrequest };
|
||||
export { smartdns, smartfile, smartmustache, smartpath, smartrequest };
|
||||
|
Reference in New Issue
Block a user