Skip to content

Commit

Permalink
fix(conflict): conflict resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
vicente1992 committed Dec 15, 2022
2 parents 438607c + 5433610 commit 71d43b5
Show file tree
Hide file tree
Showing 111 changed files with 3,704 additions and 1,382 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages/docs/*
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ module.exports = {
parserOptions: {
ecmaVersion: 'latest',
},
rules: {},
rules: {
'no-unsafe-negation': 'off',
'no-prototype-builtins': 'off',
'no-useless-escape': 'off',
},
}
9 changes: 9 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: leifermendez
open_collective: bot-whatsapp
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
custom: https://www.buymeacoffee.com/leifermendez
62 changes: 47 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,58 @@
name: Test / Coverage
name: BotWhatsapp Build-Test

on:
push:
branches: [dev]
pull_request:
branches: [main]
branches:
- dev

jobs:
build:
############ BUILD PACKAGE ############
build-package:
name: Build Package
runs-on: ubuntu-latest
needs:
- test-unit
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
registry-url: https://registry.npmjs.org/

- run: corepack enable

- name: Install NPM Dependencies
run: yarn install --immutable --network-timeout 300000

strategy:
matrix:
node-version: [16.x]
- name: Build Package
run: yarn build

- name: Build Eslint rules
run: yarn lint:fix

############ UNIT TEST ############
test-unit:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build --if-present
- run: npm run test.unit
- run: npm run test.coverage
node-version: 16.x
cache: 'yarn'
registry-url: https://registry.npmjs.org/

- run: corepack enable

- name: Install NPM Dependencies
run: yarn install --immutable --network-timeout 300000

- name: Unit Tests
run: yarn test
9 changes: 4 additions & 5 deletions .github/workflows/contributors.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Add contributors
on:
schedule:
- cron: '20 20 * * *'
push:
branches: [dev]
pull_request:
branches: [main, dev]
branches:
- dev
- main
types: [closed]

jobs:
contrib-readme-job:
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/releases-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: BotWhatsapp Releases(DEV)

on:
push:
branches:
- next-release

jobs:
############ RELEASE ############
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
persist-credentials: false
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
registry-url: https://registry.npmjs.org/

- run: corepack enable

- name: Install NPM Dependencies
run: yarn install --immutable --network-timeout 300000

- name: Build Package
run: yarn build

- name: Release @bot-whatsapp/bot
run: yarn node ./scripts/release.js --name=bot --version= --token="${{ secrets.NPM_TOKEN }}"

- name: Release @bot-whatsapp/cli
run: yarn node ./scripts/release.js --name=cli --version= --token="${{ secrets.NPM_TOKEN }}"

- name: Release @bot-whatsapp/create-bot-whatsapp
run: yarn node ./scripts/release.js --name=create-bot-whatsapp --version= --token="${{ secrets.NPM_TOKEN }}"

- name: Release @bot-whatsapp/database
run: yarn node ./scripts/release.js --name=database --version= --token="${{ secrets.NPM_TOKEN }}"

- name: Release @bot-whatsapp/provider
run: yarn node ./scripts/release.js --name=provider --version= --token="${{ secrets.NPM_TOKEN }}"

- name: Commit Versioning & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'ci(version): :zap: automatic - "${date}" updated versions every packages'
branch: 'dev'
60 changes: 60 additions & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: BotWhatsapp Releases(Prod)

on:
push:
tags:
- 'v*.*.*'

jobs:
############ RELEASE ############
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
persist-credentials: false
fetch-depth: 0

- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
registry-url: https://registry.npmjs.org/

- run: corepack enable

- name: Install NPM Dependencies
run: yarn install --immutable --network-timeout 300000

- name: Build Package
run: yarn build

- name: Release @bot-whatsapp/bot
run: yarn node ./scripts/release.js --name=bot --version="${{ steps.vars.outputs.tag }}" --token="${{ secrets.NPM_TOKEN }}"

- name: Release @bot-whatsapp/cli
run: yarn node ./scripts/release.js --name=cli --version="${{ steps.vars.outputs.tag }}" --token="${{ secrets.NPM_TOKEN }}"

- name: Release @bot-whatsapp/create-bot-whatsapp
run: yarn node ./scripts/release.js --name=create-bot-whatsapp --version="${{ steps.vars.outputs.tag }}" --token="${{ secrets.NPM_TOKEN }}"

- name: Release @bot-whatsapp/database
run: yarn node ./scripts/release.js --name=database --version="${{ steps.vars.outputs.tag }}" --token="${{ secrets.NPM_TOKEN }}"

- name: Release @bot-whatsapp/provider
run: yarn node ./scripts/release.js --name=provider --version="${{ steps.vars.outputs.tag }}" --token="${{ secrets.NPM_TOKEN }}"

- name: Commit Versioning & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'ci(version): :zap: automatic - "${date}" updated versions every packages'
branch: 'dev'
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/node_modules
/packages/*/starters
/packages/*/node_modules
/packages/*/dist
/packages/*/docs/dist
/packages/provider/src/venom/tokens
session.json
chats/*
!chats/.gitkeep
Expand All @@ -20,13 +22,17 @@ coverage/
log
log/*
*.log
*.tgz
lib
tmp/
.yarn/*
!.yarn/releases
!.yarn/plugins/@yarnpkg/plugin-postinstall.cjs
.fleet/
example-app*/
base-*/
!starters/apps/base-*/
qr.svg
package-lock.json
yarn-error.log
yarn-error.log
.npmrc
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
packages/**/lib
packages/docs
packages/docs/*.json
**/.git
**/.svn
**/.hg
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"cli",
"bot",
"provider",
"adapter"
"adapter",
"ci",
"starters",
"conflict"
]
}

0 comments on commit 71d43b5

Please sign in to comment.