diff options
| author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2019-01-30 11:51:29 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-01-30 11:51:29 +0900 |
| commit | 5bbf4187e662e33ab8cdd72f8bf7cd1fb7f84b6d (patch) | |
| tree | d3eba5237f7ba3e893f7a8d7231345be766cf23e | |
| parent | Merge pull request #4020 from syuilo/l10n_develop (diff) | |
| download | sharkey-5bbf4187e662e33ab8cdd72f8bf7cd1fb7f84b6d.tar.gz sharkey-5bbf4187e662e33ab8cdd72f8bf7cd1fb7f84b6d.tar.bz2 sharkey-5bbf4187e662e33ab8cdd72f8bf7cd1fb7f84b6d.zip | |
Module 'crypto' as import syntax (#4011)
| -rw-r--r-- | src/client/app/common/scripts/get-md5.ts | 2 | ||||
| -rw-r--r-- | src/remote/activitypub/request.ts | 2 | ||||
| -rw-r--r-- | src/server/api/endpoints/auth/accept.ts | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/client/app/common/scripts/get-md5.ts b/src/client/app/common/scripts/get-md5.ts index b78a598118..b002d762b1 100644 --- a/src/client/app/common/scripts/get-md5.ts +++ b/src/client/app/common/scripts/get-md5.ts @@ -1,5 +1,5 @@ // スクリプトサイズがデカい -//const crypto = require('crypto'); +//import * as crypto from 'crypto'; export default (data: ArrayBuffer) => { //const buf = new Buffer(data); diff --git a/src/remote/activitypub/request.ts b/src/remote/activitypub/request.ts index d98e36b3d7..0ac64fc387 100644 --- a/src/remote/activitypub/request.ts +++ b/src/remote/activitypub/request.ts @@ -2,7 +2,7 @@ import { request } from 'https'; const { sign } = require('http-signature'); import { URL } from 'url'; import * as debug from 'debug'; -const crypto = require('crypto'); +import * as crypto from 'crypto'; const { lookup } = require('lookup-dns-cache'); const promiseAny = require('promise-any'); diff --git a/src/server/api/endpoints/auth/accept.ts b/src/server/api/endpoints/auth/accept.ts index b7e11bd463..3e45a2801f 100644 --- a/src/server/api/endpoints/auth/accept.ts +++ b/src/server/api/endpoints/auth/accept.ts @@ -1,5 +1,5 @@ import rndstr from 'rndstr'; -const crypto = require('crypto'); +import * as crypto from 'crypto'; import $ from 'cafy'; import App from '../../../../models/app'; import AuthSess from '../../../../models/auth-session'; |