mirror of
https://github.com/wechaty/getting-started.git
synced 2026-10-17 05:20:49 +08:00
merge
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "21:00"
|
||||
open-pull-requests-limit: 10
|
||||
ignore:
|
||||
- dependency-name: "@chatie/tsconfig"
|
||||
versions:
|
||||
- 0.14.1
|
||||
@@ -76,4 +76,5 @@ examples/.pki
|
||||
log
|
||||
/*.jpg
|
||||
.env
|
||||
.env.*
|
||||
data/
|
||||
|
||||
@@ -236,9 +236,11 @@ Learn more about Wechaty Puppet from our documentation at [Wechaty Puppet](https
|
||||
|
||||
## History
|
||||
|
||||
### master v0.13
|
||||
### master v1.0 (Oct 30, 2021)
|
||||
|
||||
1. Enable ESM (ES Module) support ([chatie/tsconfig#16](https://github.com/Chatie/tsconfig/issues/16))
|
||||
Release v1.0 of Wechaty.
|
||||
|
||||
1. v0.13: Enable ESM (ES Module) support ([chatie/tsconfig#16](https://github.com/Chatie/tsconfig/issues/16))
|
||||
|
||||
### v0.8 (Feb 20, 2021)
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
* Wechaty - Conversational RPA SDK for Chatbot Makers.
|
||||
* - https://github.com/wechaty/wechaty
|
||||
*/
|
||||
import {
|
||||
Wechaty,
|
||||
import 'dotenv/config.js'
|
||||
|
||||
import {
|
||||
WechatyBuilder,
|
||||
ScanStatus,
|
||||
log,
|
||||
} from 'wechaty'
|
||||
|
||||
} from 'wechaty'
|
||||
import qrcodeTerminal from 'qrcode-terminal'
|
||||
import 'dotenv/config.js'
|
||||
|
||||
function onScan (qrcode, status) {
|
||||
if (status === ScanStatus.Waiting || status === ScanStatus.Timeout) {
|
||||
@@ -43,7 +43,7 @@ async function onMessage (msg) {
|
||||
}
|
||||
}
|
||||
|
||||
const bot = new Wechaty({
|
||||
const bot = WechatyBuilder.build({
|
||||
name: 'ding-dong-bot',
|
||||
/**
|
||||
* How to set Wechaty Puppet Provider:
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
* Wechaty - Conversational RPA SDK for Chatbot Makers.
|
||||
* - https://github.com/wechaty/wechaty
|
||||
*/
|
||||
// https://stackoverflow.com/a/42817956/1123955
|
||||
// https://github.com/motdotla/dotenv/issues/89#issuecomment-587753552
|
||||
import 'dotenv/config.js'
|
||||
|
||||
import {
|
||||
Contact,
|
||||
Message,
|
||||
ScanStatus,
|
||||
Wechaty,
|
||||
WechatyBuilder,
|
||||
log,
|
||||
} from 'wechaty'
|
||||
|
||||
import qrcodeTerminal from 'qrcode-terminal'
|
||||
|
||||
// https://stackoverflow.com/a/42817956/1123955
|
||||
// https://github.com/motdotla/dotenv/issues/89#issuecomment-587753552
|
||||
import 'dotenv/config.js'
|
||||
|
||||
function onLogout (user: Contact) {
|
||||
log.info('StarterBot', '%s logout', user)
|
||||
}
|
||||
@@ -48,7 +48,7 @@ async function onMessage (msg: Message) {
|
||||
}
|
||||
}
|
||||
|
||||
const bot = new Wechaty({
|
||||
const bot = WechatyBuilder.build({
|
||||
name: 'ding-dong-bot',
|
||||
/**
|
||||
* How to set Wechaty Puppet Provider:
|
||||
|
||||
@@ -37,14 +37,22 @@ Continue on to the **Next** step to start setting up your chatbot.
|
||||
## Setting up developing environments
|
||||
|
||||
1. Install [Node.js](https://nodejs.org) v16+
|
||||
1. Git clone [wechaty-getting-started](https://github.com/wechaty/getting-started) repo
|
||||
1. Git clone [wechaty/getting-started](https://github.com/wechaty/getting-started) repo
|
||||
1. Install system dependency packages
|
||||
|
||||
### 1. Install Node.js
|
||||
|
||||
Node.js has been pre-installed in Google Cloud Shell already.
|
||||
Node.js has been pre-installed in Google Cloud Shell.
|
||||
|
||||
### 2. Git clone `wechaty-getting-started` repo
|
||||
However, we need to upgrade Node.js to version 16+
|
||||
|
||||
```sh
|
||||
nvm install 16
|
||||
```
|
||||
|
||||
You should get a `v16.13.0` output by running command `node --version`
|
||||
|
||||
### 2. Git clone `wechaty/getting-started` repo
|
||||
|
||||
Git Repo has been already cloned in Google Cloud Shell already.
|
||||
|
||||
|
||||
+13
-17
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"name": "wechaty-getting-started",
|
||||
"version": "0.13.20",
|
||||
"version": "1.0.1",
|
||||
"description": "Wechaty conversational SDK getting start template & examples",
|
||||
"type": "module",
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
"node": ">=16",
|
||||
"npm": ">=7"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint \"examples/*.ts\" \"tests/*.ts\"",
|
||||
@@ -15,7 +16,7 @@
|
||||
"start:wechat:padlocal": "cross-env WECHATY_LOG=verbose WECHATY_PUPPET=wechaty-puppet-padlocal npm start",
|
||||
"start:whatsapp:web": "cross-env WECHATY_LOG=verbose WECHATY_PUPPET=wechaty-puppet-whatsapp npm start",
|
||||
"test": "npm-run-all lint test:version test:smoke",
|
||||
"test:smoke": "tap --node-arg=--loader=ts-node/esm --node-arg=--no-warnings \"tests/**/*.spec.ts\"",
|
||||
"test:smoke": "cross-env NODE_OPTIONS=\"--no-warnings --loader=ts-node/esm\" tap \"tests/**/*.spec.ts\"",
|
||||
"test:version": "check-node-version --node \">= 16\""
|
||||
},
|
||||
"repository": {
|
||||
@@ -32,25 +33,20 @@
|
||||
"dependencies": {
|
||||
"dotenv": "^10.0.0",
|
||||
"qrcode-terminal": "^0.12.0",
|
||||
"wechaty": "^0.73.8",
|
||||
"wechaty-plugin-contrib": "^0.14.23",
|
||||
"wechaty-puppet-mock": "^0.31.3",
|
||||
"wechaty-puppet-oicq": "^0.1.6",
|
||||
"wechaty-puppet-padlocal": "^0.4.2",
|
||||
"wechaty-puppet-wechat": "^0.30.1",
|
||||
"wechaty-puppet-wechat4u": "^0.19.3",
|
||||
"wechaty-puppet-whatsapp": "^0.3.3",
|
||||
"wechaty-puppet-xp": "^0.7.2"
|
||||
"wechaty": "^1.0.4",
|
||||
"wechaty-plugin-contrib": "^1.0.13",
|
||||
"wechaty-puppet-oicq": "^1.0.0",
|
||||
"wechaty-puppet-wechat": "^1.0.1",
|
||||
"wechaty-puppet-wechat4u": "^1.0.1",
|
||||
"wechaty-puppet-whatsapp": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@chatie/eslint-config": "^0.14.1",
|
||||
"@chatie/eslint-config": "^1.0.4",
|
||||
"@chatie/git-scripts": "^0.6.2",
|
||||
"@chatie/tsconfig": "^0.20.2",
|
||||
"@chatie/tsconfig": "^1.0.2",
|
||||
"check-node-version": "^4.1.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"is-pr": "^2.0.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"tstest": "^0.7.2"
|
||||
"wechaty-puppet-mock": "^1.0.2"
|
||||
},
|
||||
"git": {
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user