zmp-cli 3.15.2-beta.0 → 3.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/login/index.js +8 -2
- package/package.json +1 -5
package/login/index.js
CHANGED
|
@@ -10,6 +10,7 @@ const envUtils = require('../utils/env');
|
|
|
10
10
|
const log = require('../utils/log');
|
|
11
11
|
const zaloLogin = require('./utils/zalo-login');
|
|
12
12
|
const { axiosClient } = require('../utils/axios');
|
|
13
|
+
const qs = require('qs');
|
|
13
14
|
|
|
14
15
|
const waitText = chalk.gray('Login...');
|
|
15
16
|
const spinner = ora(waitText);
|
|
@@ -123,11 +124,16 @@ module.exports = async (options = {}, logger, { exitOnError = true } = {}) => {
|
|
|
123
124
|
} else {
|
|
124
125
|
await new Promise((resolve, reject) => {
|
|
125
126
|
axiosClient({
|
|
126
|
-
|
|
127
|
-
|
|
127
|
+
url: apiLogin,
|
|
128
|
+
method: 'POST',
|
|
128
129
|
headers: {
|
|
129
130
|
'cache-control': 'no-cache',
|
|
131
|
+
'content-type': 'application/x-www-form-urlencoded',
|
|
130
132
|
},
|
|
133
|
+
data: qs.stringify({
|
|
134
|
+
accessToken: token,
|
|
135
|
+
appId: appId,
|
|
136
|
+
}),
|
|
131
137
|
withCredentials: true,
|
|
132
138
|
})
|
|
133
139
|
.then(function (response) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zmp-cli",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.3",
|
|
4
4
|
"description": "ZMP command line utility (CLI)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -11,10 +11,6 @@
|
|
|
11
11
|
"release": "node scripts/release.js",
|
|
12
12
|
"lint": "eslint ."
|
|
13
13
|
},
|
|
14
|
-
"repository": {
|
|
15
|
-
"type": "git",
|
|
16
|
-
"url": "https://zalogit2.zing.vn/ZaloMiniApps/zmp-cli.git"
|
|
17
|
-
},
|
|
18
14
|
"keywords": [
|
|
19
15
|
"zmp",
|
|
20
16
|
"cli",
|