profile
viewpoint
王子亭 jysperm @leancloud China 苏州 https://jysperm.me @nodejs server-side developer, work with @docker; @atom user, admin of @atom-china; Interested in @gpg and @bitcoin; @cat-pidan and @cat-doufu are my cats

HackPlan/RootPanel 147

A pluggable PaaS service development framework.

HackPlan/github-commit-ical 68

View your commit history in Calendar

jysperm/elecpass 62

A password manager based on GPG and Git compatible with pass

jysperm/hexo-theme-simpleblock 58

Hexo theme of jysperm's blog.

jysperm/blog 55

Source code of my blog

jysperm/LightPHP 24

A Light PHP Library

jysperm/china-id-card-validator 15

Validator for China's ID Card.

HackPlan/NodeMonitor 14

Status Monitor of Linux Server

jysperm/Cichorium 14

Routing framework based on Promise using CoffeeScript

HackPlan/pomo-mailer 13

Mail Renderer, Mail Queue, Task Manager

issue commentleancloud/lean-cli

升级提醒信息应该输出到 stderr

确实,我们下个版本改掉

Ma233

comment created time in a day

PR merged leancloud/lean-cli

🔖 Release 0.23.0
  • lean logs supports UTC timestamp in addition to YYYY-MM-DD.
  • lean cache Use db0 by default, use --db <index> to use other db.
  • Allow users to disable GA via an env var(NO_ANALYTICS).
  • Fix meaningless error message during deploy(exit status 128)
  • Internal HTTP API changes(related to LeanCache).
  • Internal dependency and testing improvements.

lean-macos-x64.zip lean-windows-x64.exe.zip

+5 -5

0 comment

5 changed files

jysperm

pr closed time in 2 days

push eventleancloud/lean-cli

jysperm

commit sha 2411413991de11964ce13e3194353843b1b1dd03

:bookmark: Release 0.23.0

view details

push time in 2 days

created tagleancloud/lean-cli

tagv0.23.0

LeanEngine Command Line Tool

created time in 2 days

PR opened leancloud/lean-cli

Reviewers
🔖 Release 0.23.0
  • lean logs supports UTC timestamp in addition to YYYY-MM-DD.
  • lean cache Use db0 by default, use --db <index> to use other db.
  • Allow users to disable GA via an env var(NO_ANALYTICS).
  • Fix meaningless error message during deploy(exit status 128)
  • Internal HTTP API changes(related to LeanCache).
  • Internal dependency and testing improvements.

lean-macos-x64.zip lean-windows-x64.exe.zip

+5 -5

0 comment

5 changed files

pr created time in 2 days

create barnchleancloud/lean-cli

branch : release-0.23

created branch time in 2 days

push eventleancloud/lean-cli

Mason Zhang

commit sha 202ea1471c9e9d35b3ba36a561960557f8152633

test: add new cli test

view details

Mason Zhang

commit sha c7f87e80cf2493ea76f02c0a69942a132ac03b61

build: add dependencies for ci

view details

Mason Zhang

commit sha c7f08dee3c03d132347b0a3a8d24c3bed512ddf6

fix: git lookpath

view details

Mason Zhang

commit sha f8c93bc8655b9637e94b2cdf5cf47d24ff9182b0

build: import secrets to env

view details

Mason Zhang

commit sha a0b322b182a85179cba1eafd6e9078b6297d69b3

build: add public params

view details

王子亭

commit sha c5876eea4b6b09b52361c27030e1fe367f3cb097

:twisted_rightwards_arrows: Merge pull request #447 from leancloud/test test: add new cli test

view details

push time in 2 days

PR merged leancloud/lean-cli

test: add new cli test
+79 -34

0 comment

4 changed files

soasurs

pr closed time in 2 days

push eventleancloud/lean-cli

Jang Rush

commit sha 1217a30497c55a1885e9632d00354d8b6c2c9f9e

feat: logs from/to support more accurate interval `lean logs --from --to` now supports UTC timestamp, e.g. 2006-01-02T15:04:05.999999999Z, in addition to YYYY-MM-DD. related support ticket: 21117

view details

Jang Rush

commit sha b9a6e788a6078733a8220e46f322fc26a0704186

docs: clarify logs --from/to timezone info

view details

Jang Rush

commit sha 8c13b9e784a598bab0675f32593595dd3abd8b2d

docs: logs --from/to use +08:00 example

view details

王子亭

commit sha 09f4f5ced7a48f26d80a45067d170a79ffe3a315

:twisted_rightwards_arrows: Merge pull request #441 from weakish/from-to-utcstamp feat: logs from/to support more accurate interval (rebased)

view details

push time in 3 days

push eventleancloud/lean-cli

Mason Zhang

commit sha f1e21c4832547dd7aa4cb829b31aa58da86a3678

fix: error "exit status 128"

view details

Mason Zhang

commit sha 572dfa64f4d79117a07db1ca437a6794cbc63381

fix: report errors accurately

view details

王子亭

commit sha 72dcdd0e6a8c291f4ca29bd38142f564cedc77fb

:twisted_rightwards_arrows: Merge pull request #446 from leancloud/comments-error fix: error "exit status 128"

view details

push time in 3 days

PR merged leancloud/lean-cli

Reviewers
fix: error "exit status 128"
+10 -9

0 comment

1 changed file

soasurs

pr closed time in 3 days

push eventleancloud/lean-cli

oneRain

commit sha e10f1f6cd3dbbb524378fef93d0714ce5d3f8b70

chore: lean cache db defaults to 0.

view details

oneRain

commit sha e3886b46b053756630caa9bf9c945f609bdd5cc5

feat: lean cache supports new api.

view details

oneRain

commit sha b459c2cd8bd13bc5c5a7b30f7a0d5b596d5cca75

chore

view details

oneRain

commit sha 370c25cbf614cd4e8f4b63e12f7c3fe84133b344

rename

view details

王子亭

commit sha 1ddc6bd61905f2607fbf9beeb1f3a22d019925ea

:twisted_rightwards_arrows: Merge pull request #443 from onerain88/lean_cache Lean cache 支持 LeanDB

view details

push time in 3 days

PR merged leancloud/lean-cli

Reviewers
Lean cache 支持 LeanDB

相关 issue

https://github.com/leancloud/cloud-code/issues/1700

实现方式

  1. 在 api/leancache.go 中增加了 LeanDB 接口实现
  2. 复制 commands/cache_action.go 的 cacheAction 流程,根据 /1.1/leandb/apps/{appId}/clusters 返回结果确定版本分支流程,一支走 LeanCache 流程;一支走 LeanDB 流程(目前流程一致)
  3. commands/cache_list_action.go 与 commands/cache_action.go 修改逻辑一致

测试

手动测试

  • lean cache
  • lean cache --name=xx --eval=ping
+238 -2

2 comments

4 changed files

onerain88

pr closed time in 3 days

pull request commentleancloud/lean-cli

Lean cache 支持 LeanDB

502 是受美国区迁移的影响,现在已经恢复了

onerain88

comment created time in 3 days

Pull request review commentleancloud/lean-cli

fix: error "exit status 128"

 func getCommentMessage(message string) string { 		_, err := exec.LookPath("git")  		if err == nil {-			messageBuf, err := exec.Command("git", "log", "-1", "--no-color", "--pretty=%B").CombinedOutput()-			messageStr := string(messageBuf)--			if err != nil && strings.Contains(messageStr, "Not a git repository") {-				// Ignore-			} else if err != nil {-				logp.Error(err)-			} else {-				message = "WIP on: " + strings.TrimSpace(messageStr)+			if _, err := os.Stat("./.git"); !os.IsNotExist(err) {+				messageBuf, err := exec.Command("git", "log", "-1", "--no-color", "--pretty=%B").CombinedOutput()+				messageStr := string(messageBuf)++				if err != nil {+					logp.Error(err)
					logp.Error("failed to load git message: ", err)

以便以后能找到是哪打印出来的错误 ....

soasurs

comment created time in 4 days

issue commentleancloud/lean-cli

LeanCache 相关操作使用 cookies 鉴权

已在 https://github.com/leancloud/lean-cli/pull/443 实现

aisk

comment created time in 4 days

push eventleancloud/lean-cli

jysperm

commit sha 7a1d47dbb5c1bfd2bb0612e563525ac02417ad67

:bug: Add missing declaration

view details

push time in 4 days

push eventleancloud/lean-cli

Jang Rush

commit sha e64f55d05268c821d562f52c1e3b5fd8b45d8d75

docs: typo in README

view details

Jang Rush

commit sha e2faa936b158f88e10b585a2f143995149de56bd

feat: allow users to disable GA via an env var close #435

view details

Jang Rush

commit sha f9eb75458c3dbdb5f3b52185a51ba19b6b9dc1e2

fix(stats): handle err of grequests.Post in Collect() close #434

view details

Jang Rush

commit sha ba94807bed41ddee62070948af9c395950ada3be

refactor: disableGA in commands/app.go instead of main.go

view details

Mason Zhang

commit sha b4c4dc4261547bb06250af05a2df444dd9b08d0a

fix: unexpected command executing

view details

王子亭

commit sha 1af4f2eb2a8181001bade6e5041165dd5d5a0af4

:twisted_rightwards_arrows: Merge pull request #436 from leancloud/disable-ga provide an environment variable to disable GA

view details

push time in 4 days

PR merged leancloud/lean-cli

Reviewers
provide an environment variable to disable GA
+16 -6

0 comment

3 changed files

weakish

pr closed time in 4 days

push eventleancloud/lean-cli

王子亭

commit sha fcfd2bc2d54d934a56cfc69754d98faaade87275

:construction_worker: Fix action triggers

view details

push time in 5 days

push eventleancloud/lean-cli

Mason Zhang

commit sha 77b98eb42e63570581279c053dfb361c5cf47001

build: replace Travis with Actions

view details

Mason Zhang

commit sha 876702b14cdb31e7b2f31671699aa1d7507dec1f

build: rename go.yml to test.yml

view details

Mason Zhang

commit sha 8d5fbf6db971a759eb58c0b1267cd1e565efa7d6

build: rename workflow's name

view details

王子亭

commit sha 4a686fb2fa73adb991cf91f7ecbacc6d974de9bc

Merge pull request #445 from leancloud/ci build: replace Travis with Actions

view details

push time in 5 days

PR merged leancloud/lean-cli

build: replace Travis with Actions
+27 -14

1 comment

2 changed files

soasurs

pr closed time in 5 days

pull request commentleancloud/lean-cli

build: replace dep with go mod

还有个需要注意的事情是不要破坏 homebrew 那边的构建 https://github.com/Homebrew/homebrew-core/blob/master/Formula/lean-cli.rb

soasurs

comment created time in 5 days

Pull request review commentleancloud/lean-cli

build: replace Travis with Actions

+name: lean-cli-co++on:+  push:+    branches: [$default-branch]+  pull_request:+    branches: [$default-branch]++jobs:+  build:+    name: Build+    runs-on: ubuntu-20.04+    steps:+      - name: Setup Go 1.9+        uses: actions/setup-go@v2+        with:+          go-version: ^1.9+        id: go++      - name: Check out code into the Go module directory+        uses: actions/checkout@v2+      +      - name: Get dependencies

用了 go mod 的话这一步还有必要么,我看 go build 的时候就会自动下依赖

soasurs

comment created time in 5 days

Pull request review commentleancloud/lean-cli

build: replace Travis with Actions

+name: lean-cli-co++on:+  push:+    branches: [$default-branch]+  pull_request:+    branches: [$default-branch]++jobs:+  build:+    name: Build+    runs-on: ubuntu-20.04+    steps:+      - name: Setup Go 1.9+        uses: actions/setup-go@v2+        with:+          go-version: ^1.9+        id: go++      - name: Check out code into the Go module directory+        uses: actions/checkout@v2+      +      - name: Get dependencies+        run: |+          go get -v -t -d ./...+          if [ -f Gopkg.toml ]; then+            curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh+            dep ensure+          fi+      - name: Build

这行前面少了一个空行

soasurs

comment created time in 5 days

Pull request review commentleancloud/lean-cli

build: replace Travis with Actions

+name: lean-cli-co

就叫 Test 吧,文件名改成 test.yml

soasurs

comment created time in 5 days

Pull request review commentleancloud/lean-cli

build: replace Travis with Actions

+name: lean-cli-co++on:+  push:+    branches: [$default-branch]+  pull_request:+    branches: [$default-branch]++jobs:+  build:+    name: Build+    runs-on: ubuntu-20.04+    steps:+      - name: Setup Go 1.9+        uses: actions/setup-go@v2+        with:+          go-version: ^1.9

要不就不考虑之前 dep 的版本了吧,直接最新,这个项目我们并不需要保证代码的兼容性,反正都是我们编译出来给用户用。

soasurs

comment created time in 5 days

push eventjysperm/passwords

jysperm

commit sha 382e1d02f3cc9059a1467a72872c34661e2a5cf7

Edit password for Apple-CN using vi.

view details

jysperm

commit sha 2118a96b4843e992d6b1c7e39a21f46009f316ce

Edit password for Steam using vi.

view details

jysperm

commit sha 90d59d5bff54018aa28299074d1a441880137ad5

Remove Mobile/Jingdong/17091927884

view details

push time in 7 days

Pull request review commentleancloud/lean-cli

Lean cache 支持 LeanDB

 func ExecuteCacheCommand(appID string, instance string, db int, command string)  	return result, err }++// LeanCacheInstance is structure of LeanCache DB instannce+type LeanCacheInstance struct {+	ID        int    `json:"id"`+	Name      string `json:"name"`+	Runtime   string `json:"runtime"`+	NodeQuota string `json:"nodeQuota"`+}++// GetInstanceList returns current app's LeanCache instances (NEW)+func GetInstanceList(appID string) ([]*LeanCacheInstance, error) {+	client := NewClientByApp(appID)++	opts, err := client.options()

如果不需要修改 opts 的话不需要这么做,直接在 client.get 的第二个参数传 nil 即可(后面 ExecuteInstanceCommand 里还有一处)

onerain88

comment created time in 8 days

Pull request review commentleancloud/lean-cli

Lean cache 支持 LeanDB

 func ExecuteCacheCommand(appID string, instance string, db int, command string)  	return result, err }++// LeanCacheInstance is structure of LeanCache DB instannce+type LeanCacheInstance struct {+	ID        int    `json:"id"`+	Name      string `json:"name"`+	Runtime   string `json:"runtime"`+	NodeQuota string `json:"nodeQuota"`+}++// GetInstanceList returns current app's LeanCache instances (NEW)+func GetInstanceList(appID string) ([]*LeanCacheInstance, error) {

按照 LeanDB 里的概念应该叫 GetClusterList,其他 LeanDB 相关的代码也可以改一下(Instance -> Cluster)。

onerain88

comment created time in 8 days

starteddirenv/direnv

started time in 20 days

issue openedleancloud/lean-cli

pack-scaffold 合并到 releases.leanapp.cn

pack-scaffold 是一个用来将云引擎项目脚手架打包到七牛供命令行下载的一个小项目,一直无人维护很久了。按照目前的情况,这个功能应该被合并到 github-releases 里,然后修改 lean-cli 使用 github-releases。

created time in a month

Pull request review commentleancloud/leanengine-nodejs-demos

feat: login by app sample

+const AV = require("leanengine");+const { redisClient } = require("./redis");+const { nanoid } = require("nanoid");+

前面可以加一段对整个过程的描述的注释,比如解释一下这个需求是要在网站上显示一个二维码、已登录的移动端扫描、然后网站变为登录状态。不然下面直接看到「网站」这个词有点不太明白。

weakish

comment created time in a month

Pull request review commentleancloud/leanengine-nodejs-demos

feat: login by app sample

+const AV = require("leanengine");+const { redisClient } = require("./redis");+const { nanoid } = require("nanoid");

没加到 package.json 里

weakish

comment created time in a month

push eventleancloud/leanengine-nodejs-demos

Jang Rush

commit sha 4586e5ca6f2c03b2cd86db4a445d33d94c3ab5ca

docs: describe right mark and star icon

view details

王子亭

commit sha f9890d72d3e5d533021049483aacc834dbbb37e7

:twisted_rightwards_arrows: Merge pull request #18 from weakish/doc-star-right-mark docs: describe right mark and star icon

view details

push time in a month

issue commentleancloud/lean-cli

提供一个命令来检查 _File 表的重复文件

这个需求的原因是什么来着?

ym

comment created time in a month

issue closedleancloud/lean-cli

显示日志的接口需切换

关于 https://restful.leanapp.cn/leanengine.html#logs_get 的问题:

  • 「请求」中的 groupName 参数的含义是什么? 我理解在 lean init --group 时就确定了分组。显示日志时需要支持这个参数吗?

  • 「请求」 中的 stream 参数的含义是什么? 我理解 response 中的 stream 等同于之前的 level,表示日志级别。请求里为啥需要这个参数?

  • 「应答」中的参数名有些出入,以哪个为准?如 group,instance

文档:

{
    "time": "2020-03-12T16:37:48.012Z",
    "group": 'web',
    "prod": 1,
    "instance": 'web1',
    "stream": "stderr",
    "content": "Error: undefined is not a valid value"
}

实际:

{
    "time":"2020-05-29T03:29:59.321306400Z",
    "groupName":"web",
    "prod":1,
    "instanceName":"web1",
    "stream":"stderr",
    "type":"app",
    "content":"LeanEngine: /rpcLCObject: 404: CloudError: No such cloud function 'rpcLCObject'",
    "id":"1590722999321306400"
}

closed time in a month

onerain88

issue commentleancloud/lean-cli

显示日志的接口需切换

已发布 0.22

onerain88

comment created time in a month

starteddocker/swarmkit

started time in a month

release leancloud/lean-cli

v0.22.0

released time in 2 months

created tagleancloud/lean-cli

tagv0.22.0

LeanEngine Command Line Tool

created time in 2 months

push eventleancloud/lean-cli

jysperm

commit sha 543e9777826b15769b282b3e1ae2d6d5fdf16410

:bookmark: Release 0.22.0

view details

王子亭

commit sha 0aa399a8666e5471f53a24985367a14373c0d0f3

:twisted_rightwards_arrows: Merge pull request #440 from leancloud/release-0.22 🔖 Release 0.22.0

view details

push time in 2 months

PR merged leancloud/lean-cli

🔖 Release 0.22.0
  • (Python) No longer use cmd from leanengine.yaml (used on cloud only).
  • (Python) No longer detect python version from runtime.txt (use .python-version instead).
  • (Python) Use python instead of python2.7 by default.
  • Error message and docs improvements.
  • Internal HTTP API changes (Move to new logs API).

lean-macos-x64.zip

+5 -5

0 comment

5 changed files

jysperm

pr closed time in 2 months

issue closedleancloud/lean-cli

云引擎读取中文文件时获取文件名乱码

关联工单:3574

var studentFolder = require("path").join(__dirname, './cloudFuncs/score')
var fs = require('fs')

fs.readdir(studentFolder, (err, files) => {
  files.forEach(function(file) {
    if (file.indexOf('.json') !== -1) {
      console.log('school name: ', file)
    }
  })
})

如果score中的文件名为中文:测试.json,console.log()出为乱码

closed time in 2 months

aisk

issue commentleancloud/lean-cli

云引擎读取中文文件时获取文件名乱码

看起来 archivex 已经被换掉了

aisk

comment created time in 2 months

issue closedleancloud/lean-cli

Ubuntu / Debian / Fedora / CentOS 源

既然 homebrew / aur 都有了 ... 要不也来做一个 Debian 系 / RHEL 系的官方仓库吧?

closed time in 2 months

ym

issue commentleancloud/lean-cli

Ubuntu / Debian / Fedora / CentOS 源

目前看起来没啥必要,关掉了

ym

comment created time in 2 months

PR opened leancloud/lean-cli

Reviewers
🔖 Release 0.22.0
  • (Python) No longer use cmd from leanengine.yaml (used on cloud only).
  • (Python) No longer detect python version from runtime.txt (use .python-version instead).
  • (Python) Use python instead of python2.7 by default.
  • Error message and docs improvements.
  • Internal HTTP API changes (Move to new logs API).

lean-macos-x64.zip

+5 -5

0 comment

5 changed files

pr created time in 2 months

create barnchleancloud/lean-cli

branch : release-0.22

created branch time in 2 months

push eventleancloud/lean-cli

oneRain

commit sha 79284a2c5b9b17aa479a0bcb7760971b3eb8e6a7

chore: 调整 logs 请求接口

view details

oneRain

commit sha 862e5c2062e918ea551a5acdb70b269f1a4868d7

chore

view details

oneRain

commit sha 02e59902395e6f893653db343d2aa23650da31a9

chore: 安全参数

view details

oneRain

commit sha 6c653a9fc880f0c390ae3fabd6ff111f9b1ed5ac

chore: 调整 group 命名

view details

oneRain

commit sha 2314a67074a50b2feeac2fe55c290dc63472f3a1

chore: limit log

view details

oneRain

commit sha fc32e7b8f6a2b52a12769861ecf1c39c6a5f76d0

chore: rename

view details

oneRain

commit sha af6562e93248419af497021755fe6700e13bdfaa

chore: log range

view details

oneRain

commit sha 1ef54592792a69557562befae7d5c18ce13d1da2

chore

view details

oneRain

commit sha 59e8dd0d09076f2f2e4d535a03f6920d048b1a99

chore

view details

oneRain

commit sha fac85ad6657b0d85f94e574e53d9f29b61e31bf7

chore: 分页查询日志

view details

oneRain

commit sha a2e5cc92d13c0fc3c832390d14efffcebf075d7d

chore: 简化边界判断

view details

oneRain

commit sha 10a6cd14fcede86cf1960b1598b8e9f566a6fba8

chore: 保持与现有逻辑一致

view details

jysperm

commit sha 8671d98ea02dd25284b2a776a1b1e96257207ac9

:twisted_rightwards_arrows: Merge branch 'onerain88-logs'

view details

push time in 2 months

PR merged leancloud/lean-cli

Move to new logs API
+60 -48

2 comments

2 changed files

onerain88

pr closed time in 2 months

push eventleancloud/lean-cli

Jang Rush

commit sha e13219098913f168c90be77e529b2875bdb077ad

feat: simplify local python version detection 1. Do not detect `leanengine.yaml` (intended to be used on cloud). 2. Do not detect `runtime.txt` (outdated, unsupported by cloud now). 3. Defaults to `python` instead of `python2.7` (EOL of py is coming).

view details

Jang Rush

commit sha f4c512132dcdee00ade6f75891ea4ee2467ee797

feat: detect more accurate python version `python` may point to 2 or 3 on different systems. To address such issues, we allow user to specify accurate python version in `.python-version` even when the user is not using `pyenv`.

view details

王子亭

commit sha aa52ac387864feba923dcf02b53985cd94c3ab91

:twisted_rightwards_arrows: Merge pull request #422 from weakish/detect-python-version feat: simplify local python version detection

view details

push time in 2 months

PR merged leancloud/lean-cli

feat: simplify local python version detection
  1. Do not detect leanengine.yaml (intended to be used on cloud).
  2. Do not detect runtime.txt (outdated, unsupported by cloud now).
  3. Defaults to python instead of python2.7 (EOL of py is coming).
+24 -59

2 comments

1 changed file

weakish

pr closed time in 2 months

PR merged leancloud/lean-cli

docs: getSystemLanguage: friendlier locale error

Previously, getSystemLanguage directly throws error message of jibber_jabber.DetectLanguage(), which is typically "Could not detect Language" on systems with misconfigured locale. This may confuse users that lean-cli cannot detect runtime (programming) language correctly. This commit added a prefix ("unsupported locale setting") to the error message.

related issue: #426 related ticket: 20742

+1 -1

2 comments

1 changed file

weakish

pr closed time in 2 months

push eventleancloud/lean-cli

Jang Rush

commit sha 101bce874c1a2722e754adfe1553b13ac5b97852

docs: getSystemLanguage: friendlier locale error Previously, getSystemLanguage directly throws error message of jibber_jabber.DetectLanguage(), which is typically "Could not detect Language" on systems with misconfigured locale. This may confuse users that lean-cli cannot detect runtime (programming) language correctly. This commit added a prefix ("unsupported locale setting") to the error message. related issue: #426 related ticket: 20742

view details

jysperm

commit sha 88598d6ca344be5ef665da9e8d3e350e1cbedfe3

Merge branch 'weakish-getSystemLanguage-error-msg'

view details

push time in 2 months

Pull request review commentleancloud/lean-cli

provide an environment variable to disable GA

 import (  func run() { 	if len(os.Args) >= 2 && os.Args[1] == "--_collect-stats" {-		if err := stats.Init(); err != nil {-			raven.CaptureError(err, nil, nil)-		}+		disableGA, ok := os.LookupEnv("NO_ANALYTICS")+		if !ok || disableGA == "false" {

不如放在 https://github.com/leancloud/lean-cli/blob/17db8a214190341c3b4fb2327195ac4f4f8044b5/commands/app.go#L329-L333

weakish

comment created time in 2 months

push eventleancloud/lean-cli

Jang Rush

commit sha 4a5f12fe8f0ccb398b8ee8daed4b1d3a94dd4019

docs: warn cql is deprecated

view details

王子亭

commit sha 17db8a214190341c3b4fb2327195ac4f4f8044b5

:twisted_rightwards_arrows: Merge pull request #428 from weakish/deprecate-cql docs: warn cql is deprecated

view details

push time in 2 months

PR merged leancloud/lean-cli

Reviewers
docs: warn cql is deprecated
+1 -1

0 comment

1 changed file

weakish

pr closed time in 2 months

push eventjysperm/passwords

jysperm

commit sha bf2153bab18112a61ba0400d58ca98cb8d6cd9f8

Rename Alipay to Alipay.com.

view details

jysperm

commit sha d688b93f5b06f7134cf2aba7919c9e34e3b3a4c4

Remove Financials/BMQB/18501537884

view details

jysperm

commit sha e72629b14efb3fdebb608dd861ab937ea1590e43

Rename Telegram to Telegram.org.

view details

push time in 2 months

release leancloud/leanengine-node-sdk

v3.7.0

released time in 2 months

created tagleancloud/leanengine-node-sdk

tagv3.7.0

LeanEngine Node.js SDK

created time in 2 months

push eventleancloud/leanengine-node-sdk

jysperm

commit sha f0167fa510a2f3602d40f7dace1dad89571b3b12

:pencil: Update CHANGELOG

view details

push time in 2 months

pull request commentleancloud/leanengine-node-sdk

feat: https redirect with avosapps.us

https://github.com/leancloud/leanengine-node-sdk/pull/150

weakish

comment created time in 2 months

push eventleancloud/leanengine-node-sdk

Jang Rush

commit sha 04b05751d9c22b2bbe0eb20d395323dffeda786a

feat: onIMMessageUpdate

view details

王子亭

commit sha 5777d3156649e9911abad4129dd8c3a32c4e440c

:twisted_rightwards_arrows: Merge pull request #151 from weakish/on-msg-update feat: onIMMessageUpdate

view details

push time in 2 months

PR merged leancloud/leanengine-node-sdk

Reviewers
Forwarded

这个 PR 会替代 https://github.com/leancloud/leanengine-node-sdk/pull/149/files

相关的 Issue:

  • https://github.com/leancloud/uluru-platform/issues/6100
  • https://github.com/leancloud/uluru-nginx/pull/307
  • https://github.com/leancloud/rfcs/issues/1061

对于 Forwarded 的信任:

从右往左逐个判断,如果客户端地址是内网或本地环回的话,认为它是一个可信任的内网代理,继续向左找,直到第一个外网地址或最后一个地址。

修改后的行为:

  • req.meta.remoteAddress 优先从 Forwarded 获取客户端 IP;如果没有 Forwarded 行为不变
  • AV.Cloud.HttpsRedirect 优先从 Forwarded 获取协议,如果请求来自外网且是 http 就重定向;如果没有 Forwarded 行为不变

HttpsRedirect 需要修改是因为之前我们为了避免内网请求(Hook)被重定向,内部约定内网请求都发 X-Forwarded-Proto: https,但其实这是不符合实际情况,会造成一些混乱,现在 Forwarded 可以彻底解决这个问题。

尚存的一些问题:

  • 还未向网站托管的代码提供从 Forwarded 读取客户端信息的工具函数
  • 还需要把这个机制更新到 https://github.com/leancloud/rfcs/wiki/LeanEngine-Runtime-SDK-Specification 并要求其他 SDK 修改
  • 后续是否要去除对 X-Real-IP、X-Forwarded-For、X-Forwarded-Proto 的支持,虽然 Forwarded 已纳入标准且扩展性较好,但配套并不完善,如 Nginx 和 express 都没有自带对 Forwarded 支持。
+159 -30

0 comment

8 changed files

jysperm

pr closed time in 2 months

push eventleancloud/leanengine-node-sdk

jysperm

commit sha a100dda1ca3e64439294c5bce078a6674a632758

:iphone: Get remoteAddress from Forwarded header

view details

jysperm

commit sha dd45525009f438ad079946aba1f002b122c43b02

:iphone: Get proto from Forwarded header

view details

jysperm

commit sha d8a221e7fd421e212ff7247def1a075e4e8f7bf2

:bookmark: Prepare 3.7.0

view details

jysperm

commit sha 145ee312c96a387acb1ff6e048ca3ac35de3ccbb

:arrow_up: Upgrade dependencies

view details

push time in 2 months

push eventleancloud/leanengine-node-sdk

jysperm

commit sha 145ee312c96a387acb1ff6e048ca3ac35de3ccbb

:arrow_up: Upgrade dependencies

view details

push time in 2 months

Pull request review commentleancloud/lean-cli

Logs

 func ReceiveLogsByLimit(printer LogReceiver, appID string, masterKey string, isP // ReceiveLogsByRange will poll the leanengine's log and print it to the giver io.Writer func ReceiveLogsByRange(printer LogReceiver, appID string, masterKey string, isProd bool, group string, from time.Time, to time.Time) error { 	params := map[string]string{-		"ascend":     "true",-		"since":      from.UTC().Format("2006-01-02T15:04:05.000000000Z"),-		"production": "0",-		"group":      group,-		"limit":      "1000",+		"prod":      "0",+		"groupName": group,+		"limit":     "1000", 	}+ 	if isProd {-		params["production"] = "1"+		params["prod"] = "1" 	} -	for {

旧版这里是有一个循环不断地查询日志,直到达到 to 所代表的时间,但修改后的代码只会查询一次日志。

这样的话文档里的 lean logs --from=2017-07-01 --to=2017-07-07 这种用法(查询最近七天的所有日志)就用不了了。

https://leancloud.cn/docs/leanengine_cli.html#hash822470872

onerain88

comment created time in 2 months

issue closedleancloud/leanengine-node-sdk

云引擎中设置 serverUrl 不起作用

代码如下:

const AV = require('leanengine');
AV.init({appId: process.env.LC_APP_ID,
appKey: process.env.LC_APP_KEY,
masterKey: process.env.LC_APP_MASTER_KEY,
serverURLs: "http://localhost:8080"});

最终还是请求到了公有云。

closed time in 2 months

jwfing

issue commentleancloud/leanengine-node-sdk

云引擎中设置 serverUrl 不起作用

没有后续了,没有发现类似问题,关掉了

jwfing

comment created time in 2 months

startedsyuilo/misskey

started time in 2 months

issue commentleancloud/lean-cli

显示日志的接口需切换

(提醒一下这个仓库是公开的)

onerain88

comment created time in 2 months

pull request commentleancloud/lean-cli

Logs

这个错误为啥一直保留着?

从我接手之后就一直没跑过测试 ..... 是应该把测试给修好

onerain88

comment created time in 2 months

Pull request review commentleancloud/lean-cli

Logs

 func ReceiveLogsByLimit(printer LogReceiver, appID string, masterKey string, isP // ReceiveLogsByRange will poll the leanengine's log and print it to the giver io.Writer func ReceiveLogsByRange(printer LogReceiver, appID string, masterKey string, isProd bool, group string, from time.Time, to time.Time) error { 	params := map[string]string{-		"ascend":     "true",-		"since":      from.UTC().Format("2006-01-02T15:04:05.000000000Z"),-		"production": "0",-		"group":      group,-		"limit":      "1000",+		"ascend": "true",+		"since":  from.UTC().Format("2006-01-02T15:04:05.000000000Z"),

新版改用 from 和 to 指定时间范围和方向,详见 https://github.com/leancloud/rfcs/issues/1062 (在 HTTP API 文档上也有链接)

onerain88

comment created time in 2 months

Pull request review commentleancloud/lean-cli

Logs

 type LogReceiver func(*Log) error // ReceiveLogsByLimit will poll the leanengine's log and print it to the giver io.Writer func ReceiveLogsByLimit(printer LogReceiver, appID string, masterKey string, isProd bool, group string, limit int, follow bool) error { 	params := map[string]string{-		"limit":      strconv.Itoa(limit),-		"production": "0",-		"group":      group,+		"limit": strconv.Itoa(limit),+		"prod":  "0",+		"group": group,

按照 https://restful.leanapp.cn/leanengine.html 这个参数被改成了 groupName(后面还有一处)

onerain88

comment created time in 2 months

issue commentleancloud/lean-cli

显示日志的接口需切换

clientCookie 和 appMasterKey 两者是任选其一的(你上面发了 master key),不过新的代码应该用 clientCookie 的方式(lean-cli 里的 api/client 就会自动发 Cookie)。

onerain88

comment created time in 2 months

issue commentleancloud/lean-cli

显示日志的接口需切换

groupName 就是分组名,在 lean-cli 里可以用 apps.GetCurrentGroup 来获取到当前关联的分组。

stream 就等于 level,lean-cli 目前应该是不支持筛选这个字段,所以也不需要传(大多筛选参数不传就表示返回所有)

以实际为准吧,文档里的例子需要改一下(在 https://github.com/leancloud/cloud-code/blob/master/restful/leanengine.raml )

onerain88

comment created time in 2 months

push eventjysperm/blog

jysperm

commit sha 4dc8f8854ad91cb58ec876ece1ac156fe1403899

:page_facing_up: Use CC BY-NC-ND

view details

push time in 2 months

push eventjysperm/environments

jysperm

commit sha a52fb5d42f3adf4577acd363c40ad43d01c1f690

:bento: Sync RIME userdb with MacBook Pro 15

view details

push time in 2 months

push eventjysperm/environments

jysperm

commit sha dc73a4e3e50b82682074e66c357bb22b4f30c901

:arrow_up: Upgrade brew cask packages

view details

jysperm

commit sha 8293960f53bb9868439aa7717baf058dcf73b90d

:arrow_up: Update brew packages

view details

jysperm

commit sha 9921b1c80c3e570737c87d3f52522809eace5e51

:sparkles: Add remote-rotuer script

view details

push time in 2 months

push eventjysperm/passwords

jysperm

commit sha e6f1deb2c994e8edd7cd6f5c2334552215947a03

Update Firefox.com

view details

jysperm

commit sha 2fa095e6023fafe0c8e4c6510114db76fd90447d

Update WorldCommunityGrid.org

view details

push time in 3 months

Pull request review commentleancloud/docs

rtm hooks

 Cloud::define('_messageSent', function($params, $user) {  这个 hook 不会对返回值进行检查。 +示例代码:++```js+AV.Cloud.onIMConversationAdded((request) => {+  let params = request.params;+  console.log('params:', params);++  // params: {

这里的注释也应该提取成参数示例。

weakish

comment created time in 3 months

Pull request review commentleancloud/docs

rtm hooks

 def _messageSent(**params):     print('params:', params)     print('_messageSent end')     return {}--# 在云引擎中打印的日志如下:-# _messageSent start-# params: {'__sign': '1472703266575,30e1c9b325410f96c804f737035a0f6a2d86d711',-#  'bin': False,-#  'content': '12345678',-#  'convId': '5789a33a1b8694ad267d8040',-#  'fromPeer': 'Tom',-#  'msgId': 'fptKnuYYQMGdiSt_Zs7zDA',-#  'offlinePeers': ['Jerry'],-#  'onlinePeers': [],-#  'receipt': False,-#  'sourceIP': '114.219.127.186',-#  'timestamp': 1472703266522,-#  'transient': False}-# _messageSent end ``` ```php Cloud::define('_messageSent', function($params, $user) {     error_log('_messageSent start');     error_log('params' . json_encode($params));     return array();--    // 在云引擎中打印的日志如下:-    // _messageSent start-    // params { fromPeer: 'Tom',-    //   receipt: false,-    //   onlinePeers: [],-    //   content: '12345678',-    //   convId: '5789a33a1b8694ad267d8040',-    //   msgId: 'fptKnuYYQMGdiSt_Zs7zDA',-    //   __sign: '1472703266575,30e1c9b325410f96c804f737035a0f6a2d86d711',-    //   bin: false,-    //   transient: false,-    //   sourceIP: '114.219.127.186',-    //   offlinePeers: [ 'Jerry' ],-    //   timestamp: 1472703266522 } }); ``` ```java @IMHook(type = IMHookType.messageSent)   public static Map<String, Object> onMessageSent(Map<String, Object> params) {     System.out.println(params);     Map<String, Object> result = new HashMap<String, Object>();-    // ...     return result; } ``` +在云引擎中打印的日志如下:

这个部分不如写成参数示例,毕竟每个语言打印出来的格式其实都不一样,也没必要挨个列举。

weakish

comment created time in 3 months

Pull request review commentleancloud/docs

rtm hooks

 Hook 也可以称为「钩子」,是一种特殊的消息处理机制,与 Wi `system` | 是否属于系统对话消息。 `sourceIP` | 消息发送者的 IP。 +参数示例:++```

这个部分按说是语言无关的(包括后面的参数示例),所以这里用 JSON 比较合适,所以应该去掉末尾的分号,然后字符串改成双引号。不过这样 content 内容里的引号就需要转义了 .... 要不要改呢

weakish

comment created time in 3 months

push eventleancloud/leancloud-status

jysperm

commit sha 3b10d071ee2d85439b994d0b58f6b19629291890

:alien: Add User-Agent

view details

push time in 3 months

more