mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
JS compatibility
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@ package-lock.json
|
|||||||
*/.DS_Store
|
*/.DS_Store
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.env
|
.env
|
||||||
|
lib
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { MessageType, HKDFInfoKeys, MessageOptions, MessageStubTypes } from './Constants'
|
import { MessageType, HKDFInfoKeys, MessageOptions, MessageStubTypes } from './Constants'
|
||||||
import * as sharp from 'sharp'
|
import sharp from 'sharp'
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import fetch from 'node-fetch'
|
import fetch from 'node-fetch'
|
||||||
import { WAMessage, WAMessageContent } from '../WAConnection/Constants'
|
import { WAMessage, WAMessageContent } from '../WAConnection/Constants'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as QR from 'qrcode-terminal'
|
import * as QR from 'qrcode-terminal'
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import * as WS from 'ws'
|
import WS from 'ws'
|
||||||
import * as Utils from './Utils'
|
import * as Utils from './Utils'
|
||||||
import Encoder from '../Binary/Encoder'
|
import Encoder from '../Binary/Encoder'
|
||||||
import Decoder from '../Binary/Decoder'
|
import Decoder from '../Binary/Decoder'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import * as WS from 'ws'
|
import WS from 'ws'
|
||||||
import * as Utils from './Utils'
|
import * as Utils from './Utils'
|
||||||
import { AuthenticationCredentialsBase64, UserMetaData, WAMessage, WAChat, WAContact, MessageLogLevel } from './Constants'
|
import { AuthenticationCredentialsBase64, UserMetaData, WAMessage, WAChat, WAContact, MessageLogLevel } from './Constants'
|
||||||
import WAConnectionValidator from './Validation'
|
import WAConnectionValidator from './Validation'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as Crypto from 'crypto'
|
import * as Crypto from 'crypto'
|
||||||
import * as HKDF from 'futoin-hkdf'
|
import HKDF from 'futoin-hkdf'
|
||||||
|
|
||||||
/** decrypt AES 256 CBC; where the IV is prefixed to the buffer */
|
/** decrypt AES 256 CBC; where the IV is prefixed to the buffer */
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "@adiwajshing/baileys",
|
"name": "@adiwajshing/baileys",
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"description": "WhatsApp Web API",
|
"description": "WhatsApp Web API",
|
||||||
"main": "WAClient/WAClient.ts",
|
"main": "lib/WAClient/WAClient.js",
|
||||||
"homepage": "https://github.com/adiwajshing/Baileys",
|
"homepage": "https://github.com/adiwajshing/Baileys",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"module": "es2015",
|
"module": "commonjs",
|
||||||
|
"moduleResolution": "node",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"checkJs": false,
|
"checkJs": false,
|
||||||
"outDir": "build/",
|
"outDir": "lib/",
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"noImplicitThis": true,
|
"noImplicitThis": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"resolveJsonModule": true
|
"resolveJsonModule": true
|
||||||
},
|
},
|
||||||
"include": ["*.ts"],
|
"include": ["*/*.ts"],
|
||||||
"exclude": ["node_modules", "*/Tests.ts"]
|
"exclude": ["node_modules", "*/Tests.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user