Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do 92 #4

Open
wants to merge 1,379 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1379 commits
Select commit Hold shift + click to select a range
dfc030b
fix: NaN last seen
adiwajshing Jun 23, 2022
9d6dfbf
chore: update package version
adiwajshing Jun 24, 2022
ee7ed1d
feat: include last message in chat
adiwajshing Jun 24, 2022
4ff858a
chore: increase app state sync timeout
adiwajshing Jun 24, 2022
92960bb
fix: set default status code
adiwajshing Jun 24, 2022
baa3919
chore: add back "messages" to chat
adiwajshing Jun 24, 2022
66f49e0
fix: correctly set reaction msg key
adiwajshing Jun 25, 2022
fd80448
feat: handle verified name in message
adiwajshing Jun 26, 2022
7421f55
feat: implement event buffer for offline msgs
adiwajshing Jun 27, 2022
eaf0f37
refactor: use event-buffer for state sync resyncs
adiwajshing Jun 27, 2022
2c03802
chore: use "null" to signify removal of mute
adiwajshing Jun 27, 2022
d00aed7
chore: timeout awaitNextMessage
adiwajshing Jun 27, 2022
a2054d8
Change profile status for yourself (#1796)
barkerpedro Jul 1, 2022
200b75d
fix: add `senderTimestampMs` automatically in reactMessage (#1845)
zennn08 Jul 2, 2022
de95694
fix: use correct status code for throwing media error
adiwajshing Jul 4, 2022
5cc58d4
feat: add bulk "process" capability to BaileysBufferableEventEmitter
adiwajshing Jul 4, 2022
189b740
chore: remove "treatCiphertextMessagesAsReal" flag
adiwajshing Jul 4, 2022
adc2c9c
docs: add a bit more info about events
adiwajshing Jul 4, 2022
f7b723f
feat: fire "receivedPendingNotifications" after flush
adiwajshing Jul 4, 2022
7968abb
chore: log all messages.upsert
adiwajshing Jul 4, 2022
f13bd1f
whatsapp web version (#1868)
ravindu01manoj Jul 6, 2022
41ca76a
fix: chats.delete patch on sync
adiwajshing Jul 6, 2022
d143ef0
feat: handle delete events accurately
adiwajshing Jul 6, 2022
4c800b9
fix: only fire valid events
adiwajshing Jul 7, 2022
7426b7a
chore: update version (#1883)
xxirfanx Jul 9, 2022
40a1e26
feat: add "strictNullChecks"
adiwajshing Jul 8, 2022
8fc1c10
fix: always send key bundle with retry receipt
adiwajshing Jul 13, 2022
f5af502
Revert "fix: always send key bundle with retry receipt"
adiwajshing Jul 13, 2022
4c60e31
feat: correctly send retry messages w count
adiwajshing Jul 13, 2022
8742bc2
fix: isLatest flag
adiwajshing Jul 13, 2022
729f19e
fix: participant count
adiwajshing Jul 13, 2022
c982d8c
fix: dup close events
adiwajshing Jul 14, 2022
7b8390f
fix: delete chat + star message actions not syncing
adiwajshing Jul 14, 2022
ba486f9
feat: include chats.delete in example
adiwajshing Jul 14, 2022
fae4aaf
fix: validateConnection mutating account
adiwajshing Jul 14, 2022
33851cd
feat: force include identity when enc is missing
adiwajshing Jul 14, 2022
1c36d57
chore: do not log reg ID
adiwajshing Jul 14, 2022
fda266f
fix: acc signature
adiwajshing Jul 14, 2022
3df9688
chore: update proto
adiwajshing Jul 15, 2022
af1d5f6
feat: use store.loadMessage for getMessage in example
adiwajshing Jul 16, 2022
4e85a10
fix: reaction sender map
adiwajshing Jul 17, 2022
fad63f1
fix: do not send accountSignatureKey in retry
adiwajshing Jul 19, 2022
55997da
Made readme more clear and fixed grammar (#1929)
SmolParascythe Jul 20, 2022
3c15e21
chore: update version (#1934)
xxirfanx Jul 21, 2022
847a1dd
fix: detectLinks was not being used as described in docs (#1922)
fadiinho Jul 21, 2022
b42be6b
Change profile name for yourself (#1913)
LeonardoBein Jul 21, 2022
8f9e46f
chore: update package version
adiwajshing Jul 22, 2022
665e461
feat: absorb existing message updates into upsert
adiwajshing Jul 22, 2022
7f7565b
feat: move upsertMessage in processingMutex
adiwajshing Jul 22, 2022
54a3bae
chore: update version (#1941)
xxirfanx Jul 24, 2022
9aa9006
chore: more logging
adiwajshing Jul 24, 2022
d04718e
feat: add desktop + full history sync opts
adiwajshing Jul 26, 2022
9e096c7
feat: add reaction update to the store
fadiinho Jul 25, 2022
34f2095
feat: add check WA business account
adiwajshing Jul 27, 2022
f2917f0
feat: add option to set timeout between each qr generation
fadiinho Jul 30, 2022
9c83cd9
chore: update version
xxirfanx Jul 27, 2022
2549d10
feat: update proto
adiwajshing Aug 1, 2022
a4208a4
fix: exclude emails from URL gen
adiwajshing Aug 2, 2022
b528d7a
chore: update version
xxirfanx Aug 2, 2022
fdb1b9e
Implementing Delete messages for everyone (group)
PurpShell Aug 1, 2022
abd0711
fixes
PurpShell Aug 1, 2022
a6a2cd9
estlint :D
PurpShell Aug 1, 2022
8805d75
using isJidGroup
PurpShell Aug 2, 2022
99517d0
eslint
PurpShell Aug 2, 2022
9f3b00d
fix: temp patch for button/list messages
adiwajshing Aug 4, 2022
bed9e38
feat: added played receipt
adiwajshing Aug 4, 2022
d5b857a
fix: possible ack issue
adiwajshing Aug 7, 2022
31b54ec
fix: include accountSignatureKey in retry requests
adiwajshing Aug 7, 2022
8a234e1
feat: implement product message sending
adiwajshing Aug 8, 2022
1550fc5
fix: error in type
adiwajshing Aug 8, 2022
f9e5aed
switch to discussion
frmdeveloper Aug 9, 2022
6fbca92
Discord
frmdeveloper Aug 10, 2022
50fa5c5
I forgot something
frmdeveloper Aug 10, 2022
0b3cfb9
Update and rename feature-requests-questions.md to feature-requests.md
frmdeveloper Aug 10, 2022
19484e5
fix: fire init queries toggle
adiwajshing Aug 12, 2022
dc07d31
fix: correctly handle deleteMessageFromMe
adiwajshing Aug 17, 2022
8d6e00e
fix: handle when buffered tasks fail
adiwajshing Aug 18, 2022
c591736
chore: add stronger lint rules
adiwajshing Aug 18, 2022
3131f2a
fix: correctly create product
adiwajshing Aug 18, 2022
ebd92e0
fix: correctly fire product edit
adiwajshing Aug 18, 2022
c76c2af
feat: add "receivedInitialSync" connection update
adiwajshing Aug 19, 2022
4f1d949
Changed concat to push
Aug 20, 2022
5446bdb
chore: update package version
souravkl11 Aug 20, 2022
57267a6
docs: add how to pin and delete a chat
fadiinho Aug 10, 2022
e2c3d36
docs: remove extra braces
fadiinho Aug 10, 2022
696fe0d
fix: correctly check isLatest
adiwajshing Sep 1, 2022
c6b7801
docs: How to send disappearing messages
zennn08 Aug 23, 2022
9e581f5
update WA version
bluej4ker Aug 22, 2022
765dcc1
fix: upload for product
adiwajshing Sep 2, 2022
14def12
fix: use direct path in product img
adiwajshing Sep 2, 2022
f11c8c4
Fixed chats recent message
azudindaem Sep 5, 2022
c20865d
fix: correctly set latest message in chat + lastMsgRecvTimestamp
adiwajshing Sep 11, 2022
64f3f08
feat: log thumb gen errors
adiwajshing Sep 12, 2022
35b7a31
fix: correctly check for image processing lib
adiwajshing Sep 12, 2022
749e293
added rejectCall function
RahulKasireddy Aug 9, 2022
570f5e5
Update messages-recv.ts
RahulKasireddy Aug 9, 2022
25950f1
Update messages-recv.ts
RahulKasireddy Aug 10, 2022
3164a8c
Update messages-recv.ts
RahulKasireddy Aug 10, 2022
ba3db3e
Update messages-recv.ts
RahulKasireddy Aug 10, 2022
c113e68
Update messages-recv.ts
RahulKasireddy Aug 14, 2022
d05f40b
Update messages-recv.ts
RahulKasireddy Aug 14, 2022
ea84142
Update messages-recv.ts
RahulKasireddy Aug 23, 2022
1b71072
feat: logout if myAppStateKeyId not present
adiwajshing Sep 14, 2022
952813d
lint: resolve lint problems
adiwajshing Sep 15, 2022
48f8b30
fix getImageProcessingLibrary
kaatt Sep 14, 2022
0f98975
actually fix
kaatt Sep 14, 2022
b05ce25
fix: do not add default check for sharp
adiwajshing Sep 15, 2022
3a891e0
feat: map all WA media types
adiwajshing Sep 15, 2022
561163c
feat: allow downloading extendedTextMessage thumbs
adiwajshing Sep 15, 2022
864a01f
feat: return og dimensions when generating thumb
adiwajshing Sep 15, 2022
f0bdb12
feat: generate high quality thumbs on link preview
adiwajshing Sep 15, 2022
733345b
fix: jimp thumb gen
adiwajshing Sep 15, 2022
b988f42
fix: remove redundant console
adiwajshing Sep 15, 2022
586db48
feat: pass original thumbnail url in WAUrlInfo
adiwajshing Sep 15, 2022
d73585e
chore: update proto
adiwajshing Sep 17, 2022
e7f6838
chore: remove legacy code
adiwajshing Sep 19, 2022
1a69eff
chore: update package
adiwajshing Sep 19, 2022
5c48cc8
docs: update for legacy code removal
adiwajshing Sep 19, 2022
116b30d
feat: expose axios options
adiwajshing Sep 19, 2022
ae3ac78
feat: pass axios config to all axios instances
adiwajshing Sep 19, 2022
f8fd5ec
feat: copy in axios options headers to WebSocket
adiwajshing Sep 20, 2022
5aaefa9
chore: remove single file auth state
adiwajshing Sep 20, 2022
7d72498
fix: example TypeError
adiwajshing Sep 20, 2022
28afa96
chore: make arg optional in fetchLatestBaileysVersion
adiwajshing Sep 20, 2022
6735263
feat: add makeCacheableSignalKeyStore util
adiwajshing Sep 20, 2022
6c90241
feat: add proto-extract script
adiwajshing Sep 24, 2022
58b5df4
feat: add notification node type `picture`
Sep 26, 2022
da359aa
refactor: handle group stuff in a separate function
adiwajshing Sep 27, 2022
b329c73
feat: handle picture change events
adiwajshing Sep 27, 2022
b0a7561
fix: jidNormalizedUser should not throw TypeError
adiwajshing Sep 27, 2022
f01f5df
chore: remove redundant Buffer.from
adiwajshing Sep 28, 2022
bb983cd
chore: reduce logging
adiwajshing Sep 28, 2022
e08dd10
refactor!: use proto.Conversation's own chat mutation fields instead …
adiwajshing Sep 29, 2022
d0330d1
refactor!: cleaner message history sync
adiwajshing Sep 29, 2022
eb2590b
Update history.ts (#2212)
azudindaem Oct 1, 2022
7736114
chore: remove pre-fetch from transaction store
adiwajshing Oct 9, 2022
6c3958b
fix: desc for groups
adiwajshing Oct 9, 2022
376df2f
chore: update proto
adiwajshing Oct 12, 2022
9eea8e4
chore: update package scripts
adiwajshing Oct 12, 2022
6663357
feat: handle default disappearing mode change notifications
adiwajshing Oct 12, 2022
a85698b
feat: log updated disappearing mode
adiwajshing Oct 13, 2022
3977444
fix: handle errors in validateconnection
adiwajshing Oct 16, 2022
e710ed9
fix: unarchive chats if reaction to my message
adiwajshing Oct 17, 2022
c59952f
fix extractImageThumb threw with webpack (#2266)
kaatt Oct 18, 2022
1ad65c5
chore: update version
adiwajshing Oct 18, 2022
2b854b3
fix: file not found in `unlink`
LeonardoBein Oct 13, 2022
9c28dde
chore: call processInBuffer for all msg handling
adiwajshing Oct 18, 2022
1e24a08
chore: remove legacy example
adiwajshing Oct 19, 2022
8a17b37
chore: update version
adiwajshing Oct 23, 2022
53e204c
chore: update proto
adiwajshing Oct 23, 2022
48abf73
chore: export process-message utils
adiwajshing Oct 23, 2022
b9d13a5
feat: update real msg logic
adiwajshing Oct 23, 2022
070e24e
fix: tsc issue
adiwajshing Oct 24, 2022
f1635e2
chore: update URL regex
adiwajshing Oct 24, 2022
5e28d23
fix: msgs not appearing in chat
adiwajshing Nov 3, 2022
115073e
chore: update proto
adiwajshing Nov 6, 2022
2a8ce56
chore: remove redundant newMutations log
adiwajshing Nov 6, 2022
4352a84
chore: log app state key recv
adiwajshing Nov 6, 2022
154926e
chore: correctly throw app state key not found
adiwajshing Nov 6, 2022
a4a48a1
feat: expose isBuffering
adiwajshing Nov 7, 2022
02f9df5
fix: check for content in "isRealMessage"
adiwajshing Nov 7, 2022
9e3c208
fix: deadlock on processNodeWithBuffer
adiwajshing Nov 7, 2022
211fd04
chore: add preBufferTraces for logging
adiwajshing Nov 7, 2022
e547310
fix: add history msg to creds.update to prevent race condition
adiwajshing Nov 7, 2022
05d1fc9
chore: handle irrecoverable error
adiwajshing Nov 7, 2022
e1fc22b
feat: handle delayed myAppStateKeyId
adiwajshing Nov 7, 2022
f892a1e
fix: duplicate mutation release on failed patch
adiwajshing Nov 8, 2022
4aadc9d
fix: add option for appStateMacVerification
adiwajshing Nov 8, 2022
10d61d0
chore: expose uploadPreKeysToServerIfRequired
adiwajshing Nov 10, 2022
a58b73f
feat: allow ignoring jids
adiwajshing Nov 11, 2022
190e6d6
chore: ignore presence updates as well
adiwajshing Nov 11, 2022
b2aa51a
feat: add custom patchMsg function + remove patch for btns
adiwajshing Nov 12, 2022
01a641d
fix: decrypt race condition
adiwajshing Nov 13, 2022
2f73344
chore: update proto + version
adiwajshing Nov 13, 2022
47900ea
feat: add listReply
adiwajshing Nov 13, 2022
5c950da
fix getImageProcessingLibrary usage
kaatt Nov 13, 2022
cd9441f
Update messages-media.ts
kaatt Nov 13, 2022
00d8cf4
chore: mutex upsertMessage call from sendMessage
adiwajshing Nov 14, 2022
b33c753
feat: add url options to link preview gen
adiwajshing Nov 17, 2022
26828d3
fix: do not generate preview if title not present
adiwajshing Nov 17, 2022
7923233
chore: upgrade link-preview dep
adiwajshing Nov 17, 2022
704aa1e
feat: Add notification group: change inviteCode
LeonardoBein Nov 14, 2022
7f2384a
feat: support caption in document
adiwajshing Nov 22, 2022
f1ca770
chore: add "documentWithCaptionMessage" to normalise msg
adiwajshing Nov 23, 2022
b20a3b9
chore: add timeout to log when buffer takes v long
adiwajshing Nov 25, 2022
2e6343f
chore: catch errors in example
adiwajshing Nov 25, 2022
b141ac2
chore: only buffer if logged in
adiwajshing Nov 25, 2022
bcf33d7
chore: log mutex deadlocks
adiwajshing Nov 25, 2022
a589e88
fix: do not add to pre-buffer if waiting for end
adiwajshing Nov 25, 2022
b520d81
test: deadlock in event buffer
adiwajshing Nov 25, 2022
30e2cb5
refactor: impl counter based event buffer
adiwajshing Dec 2, 2022
c96a765
feat: add nextPageCursor
adiwajshing Dec 8, 2022
bed4f7f
chore: add GetCatalogOptions type
adiwajshing Dec 8, 2022
a5d263d
fix: correctly sync app state
adiwajshing Dec 9, 2022
572d0f1
feat: implement tc token handling
adiwajshing Dec 11, 2022
02e05ab
improve normalizeMessageContent
kaatt Dec 21, 2022
004bb98
remove console.log
kaatt Dec 21, 2022
39bd5b1
fix
kaatt Dec 21, 2022
fb1d39e
Update messages.ts
kaatt Dec 21, 2022
474dc78
add viewOnceMessageV2
kaatt Dec 23, 2022
5041be7
feat: handle futureproofmessage
adiwajshing Dec 23, 2022
78f04d8
wip
moskoweb Jan 12, 2023
5efb0eb
chore: remove mutex-start log
adiwajshing Jan 13, 2023
f54e8f8
chore(deps): bump json5 from 2.2.1 to 2.2.3
dependabot[bot] Jan 8, 2023
c398aa3
Merge branch 'master' into poll
moskoweb Jan 16, 2023
05dd53e
wip
moskoweb Jan 17, 2023
0d53fbe
Update make-mutex.ts
moskoweb Jan 17, 2023
9c71267
Update messages.ts
moskoweb Jan 17, 2023
c24ffc1
feat: better mapping for WS errors
adiwajshing Jan 17, 2023
4f27a2b
feat: add "decodeMessageNode" util
adiwajshing Jan 18, 2023
9591a02
feat: getChatId for broadcasts
adiwajshing Jan 18, 2023
41851d9
fix: getChatId
adiwajshing Jan 18, 2023
b2c1cfb
fix: timeout send call
adiwajshing Feb 1, 2023
f013b61
chore: update axios
adiwajshing Feb 18, 2023
ca24608
chore: pass axios options to downloading remote media
adiwajshing Feb 18, 2023
4ba8283
feat: handle maxContentLength in downloading media
adiwajshing Feb 18, 2023
cc1fc9a
fix: delete tmp file if failed enc
adiwajshing Feb 20, 2023
5fb9f12
chore: use cache instead of permanent maps
adiwajshing Feb 21, 2023
80b9e74
fix: example
adiwajshing Feb 21, 2023
090c916
feat: define DEFAULT_CACHE_TTLS
adiwajshing Feb 21, 2023
971ce91
refactor: use NodeCache arg in cacheable signal store
adiwajshing Feb 21, 2023
34f8f60
chore: lint
adiwajshing Feb 21, 2023
30328ee
chore: cleaner user device cache check
adiwajshing Feb 21, 2023
79aa2e5
feat: narrower definition of cachestore
adiwajshing Feb 21, 2023
e58d6c9
chore: default delete keys on expire
adiwajshing Feb 28, 2023
74bd2f5
chore: update version
adiwajshing Feb 28, 2023
06f2d35
chore: lint files
adiwajshing Mar 2, 2023
3052398
Merge branch 'master' into pr/2472
adiwajshing Mar 2, 2023
36d6cfd
refactor: poll decryption
adiwajshing Mar 2, 2023
7d5aca5
chore: lint
adiwajshing Mar 2, 2023
cd42881
feat: allow messageSecret as param to poll create
adiwajshing Mar 2, 2023
d98d415
feat: utility functions for poll updates
adiwajshing Mar 2, 2023
bda2bb4
feat: allow meId in getKeyAuthor
adiwajshing Mar 2, 2023
9d8aa67
feat: process pollupdate automatically
adiwajshing Mar 2, 2023
893fb61
chore: update example
adiwajshing Mar 2, 2023
d25bd45
Merge pull request #2472 from moskoweb/poll
adiwajshing Mar 2, 2023
7e9b9b7
fix: stream errors not being handled
adiwajshing Mar 3, 2023
bd17f37
fix: stream destroy
adiwajshing Mar 3, 2023
bbe9b3c
chore: update proto
adiwajshing Mar 9, 2023
a4ecac7
feat: handle failed msgs
adiwajshing Mar 9, 2023
2eea17f
fix: group cipher signatures
adiwajshing Mar 18, 2023
fe1d064
feat: add signal repository + tests
adiwajshing Mar 18, 2023
5a3ef65
fix: pub key type is buffer
adiwajshing Mar 18, 2023
5b2b037
chore: log full decrypt trace
adiwajshing Mar 18, 2023
bb27e58
test: override session
adiwajshing Mar 18, 2023
6bced98
fix: tsc error
adiwajshing Mar 18, 2023
aef45e6
Merge pull request #2637 from adiwajshing/libsignal-update
adiwajshing Mar 19, 2023
a8e26c6
refactor: store w transaction
adiwajshing Apr 3, 2023
1802da1
fix: auth store transactions + tests
adiwajshing Apr 3, 2023
da67e14
up
Jun 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Ignore artifacts:
lib
coverage
*.lock
.eslintrc.json
src/WABinary/index.ts
WAProto
WASignalGroup
Example/test.ts
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@adiwajshing"
}
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help improve the library
title: "[BUG]"
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Created a new connection
2. Closed & used saved credentials to log back in
3. Etc.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Environment (please complete the following information):**
- Is this on a server?
- What do your `connectOptions` look like?
- Do you have multiple clients on the same IP?
- Are you using a proxy?

**Additional context**
Add any other context about the problem here.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
contact_links:
- name: Discussion
about: Discuss your problem here
url: https://github.com/adiwajshing/Baileys/discussions/new
- name: Discord
about: Join our discord to discuss together
url: https://discord.gg/WeJM5FP9GG
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-requests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Feature Requests
about: Template for general issues/feature requests
title: ''
labels: ''
assignees: ''

---

**Before adding this issue, make sure you do the following to make sure this is not a duplicate:**
1. Search through the repo's previous issues
2. Read through the readme at least once
3. Search the docs for the feature you're looking for

**Just describe the feature**
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check PR health

on: [pull_request]

jobs:
check-lint:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v2

- name: Install Node
uses: actions/setup-node@v1
with:
node-version: 16.x

- name: Install packages
run: yarn

- name: Check linting
run: yarn lint
83 changes: 83 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Publish Release

on: "workflow_dispatch"

jobs:

# Test:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout Commit
# uses: actions/checkout@v2
#
# - name: Setup Node.js environment
# uses: actions/setup-node@v2.1.1
#
# - name: Install Dependencies
# run: npm install
#
# - name: Run Tests
# run: npm run test
Build:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout Commit
uses: actions/checkout@v2

- name: Parsing Package Info
id: packageInfo
run: |
echo "::set-output name=package-name::$(jq -r .name package.json)"
echo "::set-output name=package-version::$(jq -r .version package.json)"
echo "::set-output name=commit-msg::$(git log -1 --pretty=%B)"

- name: Setup Node.js environment
uses: actions/setup-node@v2.1.1

- name: Install Dependencies
run: yarn

- name: Build
run: yarn run build:tsc

- name: Create Release
id: releaseCreate
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# The name of the tag. This should come from the webhook payload, `github.GITHUB_REF` when a user pushes a new tag
tag_name: v${{ steps.packageInfo.outputs.package-version }}
# The name of the release. For example, `Release v1.0.1`
release_name: v${{ steps.packageInfo.outputs.package-version }}
# Text describing the contents of the tag.
body: ${{steps.packageInfo.outputs.commit-msg}}
# `true` to create a draft (unpublished) release, `false` to create a published one. Default: `false`
draft: false
# `true` to identify the release as a prerelease. `false` to identify the release as a full release. Default: `false`
prerelease: false

- name: Make Package
run: npm pack

- name: Rename Pack
run: mv *.tgz npmPackage.tgz

- name: Git Release
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# The URL for uploading assets to the release
upload_url: ${{steps.releaseCreate.outputs.upload_url}}
# The path to the asset you want to upload
asset_path: npmPackage.tgz
asset_name: npmPackage.tgz
# The content-type of the asset you want to upload. See the supported Media Types here: https://www.iana.org/assignments/media-types/media-types.xhtml for more information
asset_content_type: application/x-compressed-tar

- name: NPM Publish
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: "30 1 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 6 days with no activity. Remove the stale label or comment or this will be closed in 2 days'
stale-pr-message: 'This PR is stale because it has been open 6 days with no activity. Remove the stale label or comment or this will be closed in 2 days'
days-before-stale: 6
days-before-close: 2
41 changes: 41 additions & 0 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Update Docs

on:
push:
branches:
- master
jobs:
Build:
runs-on: ubuntu-latest
outputs:
package-name: ${{ steps.packageInfo.outputs.package-name }}
package-version: ${{ steps.packageInfo.outputs.package-version }}
commit-msg: ${{ steps.packageInfo.outputs.commit-msg }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout Commit
uses: actions/checkout@v2

- name: Parsing Package Info
id: packageInfo
run: |
echo "::set-output name=package-name::$(jq -r .name package.json)"
echo "::set-output name=package-version::$(jq -r .version package.json)"
echo "::set-output name=commit-msg::$(git log -1 --pretty=%B)"

- name: Setup Node.js environment
uses: actions/setup-node@v2.1.1

- name: Install Dependencies
run: yarn

- name: Build
run: yarn run build:all

- name: Publish to Pages
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
node_modules
auth_info.json
test_pvt.js
auth_info*.json
baileys_auth_info*
baileys_store*.json
output.csv
*/.DS_Store
.DS_Store
.env
browser-messages.json
decoded-ws.json
lib
docs
browser-token.json
Proxy
messages*.json
test.ts
TestData
Loading