Use WHATWG API
> New application code should use the WHATWG API.
This commit is contained in:
		@@ -3,7 +3,6 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import * as fs from 'fs';
 | 
					import * as fs from 'fs';
 | 
				
			||||||
import { URL } from 'url';
 | 
					 | 
				
			||||||
import * as yaml from 'js-yaml';
 | 
					import * as yaml from 'js-yaml';
 | 
				
			||||||
import { Source, Mixin } from './types';
 | 
					import { Source, Mixin } from './types';
 | 
				
			||||||
import * as pkg from '../../package.json';
 | 
					import * as pkg from '../../package.json';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,4 @@
 | 
				
			|||||||
import { parseFragment, DefaultTreeDocumentFragment } from 'parse5';
 | 
					import { parseFragment, DefaultTreeDocumentFragment } from 'parse5';
 | 
				
			||||||
import { URL } from 'url';
 | 
					 | 
				
			||||||
import { urlRegex } from './prelude';
 | 
					import { urlRegex } from './prelude';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function fromHtml(html: string): string {
 | 
					export function fromHtml(html: string): string {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,5 @@
 | 
				
			|||||||
import config from '../config';
 | 
					import config from '../config';
 | 
				
			||||||
import { toASCII } from 'punycode';
 | 
					import { toASCII } from 'punycode';
 | 
				
			||||||
import { URL } from 'url';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function getFullApAccount(username: string, host: string | null) {
 | 
					export function getFullApAccount(username: string, host: string | null) {
 | 
				
			||||||
	return host ? `${username}@${toPuny(host)}` : `${username}@${toPuny(config.host)}`;
 | 
						return host ? `${username}@${toPuny(host)}` : `${username}@${toPuny(config.host)}`;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,6 @@ import * as httpSignature from 'http-signature';
 | 
				
			|||||||
import { IRemoteUser } from '../../models/entities/user';
 | 
					import { IRemoteUser } from '../../models/entities/user';
 | 
				
			||||||
import perform from '../../remote/activitypub/perform';
 | 
					import perform from '../../remote/activitypub/perform';
 | 
				
			||||||
import { resolvePerson, updatePerson } from '../../remote/activitypub/models/person';
 | 
					import { resolvePerson, updatePerson } from '../../remote/activitypub/models/person';
 | 
				
			||||||
import { URL } from 'url';
 | 
					 | 
				
			||||||
import { publishApLogStream } from '../../services/stream';
 | 
					import { publishApLogStream } from '../../services/stream';
 | 
				
			||||||
import Logger from '../../services/logger';
 | 
					import Logger from '../../services/logger';
 | 
				
			||||||
import { registerOrFetchInstanceDoc } from '../../services/register-or-fetch-instance-doc';
 | 
					import { registerOrFetchInstanceDoc } from '../../services/register-or-fetch-instance-doc';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,6 @@ import { resolveImage } from './image';
 | 
				
			|||||||
import { isCollectionOrOrderedCollection, isCollection, IPerson } from '../type';
 | 
					import { isCollectionOrOrderedCollection, isCollection, IPerson } from '../type';
 | 
				
			||||||
import { DriveFile } from '../../../models/entities/drive-file';
 | 
					import { DriveFile } from '../../../models/entities/drive-file';
 | 
				
			||||||
import { fromHtml } from '../../../mfm/fromHtml';
 | 
					import { fromHtml } from '../../../mfm/fromHtml';
 | 
				
			||||||
import { URL } from 'url';
 | 
					 | 
				
			||||||
import { resolveNote, extractEmojis } from './note';
 | 
					import { resolveNote, extractEmojis } from './note';
 | 
				
			||||||
import { registerOrFetchInstanceDoc } from '../../../services/register-or-fetch-instance-doc';
 | 
					import { registerOrFetchInstanceDoc } from '../../../services/register-or-fetch-instance-doc';
 | 
				
			||||||
import { ITag, extractHashtags } from './tag';
 | 
					import { ITag, extractHashtags } from './tag';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,5 @@
 | 
				
			|||||||
import { request } from 'https';
 | 
					import { request } from 'https';
 | 
				
			||||||
import { sign } from 'http-signature';
 | 
					import { sign } from 'http-signature';
 | 
				
			||||||
import { URL } from 'url';
 | 
					 | 
				
			||||||
import * as crypto from 'crypto';
 | 
					import * as crypto from 'crypto';
 | 
				
			||||||
import { lookup, IRunOptions } from 'lookup-dns-cache';
 | 
					import { lookup, IRunOptions } from 'lookup-dns-cache';
 | 
				
			||||||
import * as promiseAny from 'promise-any';
 | 
					import * as promiseAny from 'promise-any';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,6 @@
 | 
				
			|||||||
import webFinger from './webfinger';
 | 
					import webFinger from './webfinger';
 | 
				
			||||||
import config from '../config';
 | 
					import config from '../config';
 | 
				
			||||||
import { createPerson, updatePerson } from './activitypub/models/person';
 | 
					import { createPerson, updatePerson } from './activitypub/models/person';
 | 
				
			||||||
import { URL } from 'url';
 | 
					 | 
				
			||||||
import { remoteLogger } from './logger';
 | 
					import { remoteLogger } from './logger';
 | 
				
			||||||
import chalk from 'chalk';
 | 
					import chalk from 'chalk';
 | 
				
			||||||
import { User, IRemoteUser } from '../models/entities/user';
 | 
					import { User, IRemoteUser } from '../models/entities/user';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,5 @@
 | 
				
			|||||||
import config from '../config';
 | 
					import config from '../config';
 | 
				
			||||||
import * as request from 'request-promise-native';
 | 
					import * as request from 'request-promise-native';
 | 
				
			||||||
import { URL } from 'url';
 | 
					 | 
				
			||||||
import { query as urlQuery } from '../prelude/url';
 | 
					import { query as urlQuery } from '../prelude/url';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type ILink = {
 | 
					type ILink = {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user