component-shipinlv 1.1.26 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. package/dist/VideoPublish/account-manage/home.js +24 -4
  2. package/dist/VideoPublish/account-manage/list.d.ts +1 -0
  3. package/dist/VideoPublish/account-manage/list.js +68 -24
  4. package/dist/VideoPublish/account-manage/setting/index.js +43 -4
  5. package/dist/VideoPublish/log/index.js +90 -44
  6. package/dist/VideoPublish/log/index.less +1 -1
  7. package/dist/VideoPublish/publish-task-plan/index.js +14 -2
  8. package/dist/VideoPublish/publish-task-plan/tool-bak.txt +219 -0
  9. package/dist/VideoPublish/publish-task-plan/tool.d.ts +14 -4
  10. package/dist/VideoPublish/publish-task-plan/tool.js +301 -83
  11. package/dist/VideoPublish/video-account/index.js +5 -2
  12. package/dist/active-code/index.d.ts +1 -0
  13. package/dist/active-code/index.js +5 -2
  14. package/dist/base/folderCreate.d.ts +2 -0
  15. package/dist/base/folderCreate.js +56 -0
  16. package/dist/component/folder-select.d.ts +1 -0
  17. package/dist/component/folder-select.js +46 -12
  18. package/dist/component/param.d.ts +5 -0
  19. package/dist/component/param.js +9 -0
  20. package/dist/component/sse.d.ts +11 -0
  21. package/dist/component/sse.js +66 -0
  22. package/dist/lib/Tool.d.ts +1 -1
  23. package/dist/lib/Tool.js +2 -2
  24. package/dist/lib/accountManageSettingConfig.js +3 -1
  25. package/dist/lib/event.js +2 -2
  26. package/dist/lib/getApiUrl.d.ts +1 -0
  27. package/dist/lib/getApiUrl.js +9 -1
  28. package/dist/lib/openChrome.d.ts +2 -0
  29. package/dist/lib/openChrome.js +115 -0
  30. package/dist/lib/request.js +1 -1
  31. package/dist/lib/user-agent.d.ts +2 -0
  32. package/dist/lib/user-agent.js +10 -0
  33. package/dist/lib/video-api/open-chrome.d.ts +2 -0
  34. package/dist/lib/video-api/open-chrome.js +49 -0
  35. package/dist/renewal-vip/index.d.ts +1 -1
  36. package/dist/renewal-vip/index.js +6 -4
  37. package/dist/service/local/FileController.d.ts +3 -0
  38. package/dist/service/local/FileController.js +59 -32
  39. package/dist/service/video-api/VideoApiOpenChromeController.d.ts +1 -0
  40. package/dist/service/video-api/VideoApiOpenChromeController.js +27 -0
  41. package/dist/types/ApiLocal.d.ts +19 -0
  42. package/dist/types/ApiLocal.js +0 -0
  43. package/dist/types/OpenChrome.d.ts +16 -0
  44. package/dist/types/OpenChrome.js +0 -0
  45. package/dist/types/PublishTaskPlan.d.ts +7 -1
  46. package/dist/types/PublishVideo.d.ts +11 -0
  47. package/dist/types/PublishVideo.js +0 -0
  48. package/dist/types/VideoPublishLog.d.ts +4 -1
  49. package/dist/typings/LocalFile.d.ts +3 -0
  50. package/dist/typings/VideoPublishAccountManageSetting.d.ts +1 -0
  51. package/dist/typings/VideoPublishVideoAccount.d.ts +3 -0
  52. package/dist/window.d.ts +1 -0
  53. package/package.json +1 -1
@@ -79,19 +79,19 @@ function _folderSelect() {
79
79
  }));
80
80
  return _folderSelect.apply(this, arguments);
81
81
  }
82
- export function openInFolder(_x7, _x8) {
83
- return _openInFolder.apply(this, arguments);
82
+ export function folderCreate(_x7, _x8) {
83
+ return _folderCreate.apply(this, arguments);
84
84
  }
85
- function _openInFolder() {
86
- _openInFolder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(body, optionsQuery) {
85
+ function _folderCreate() {
86
+ _folderCreate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(body, optionsQuery) {
87
87
  var options;
88
88
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
89
89
  while (1) switch (_context4.prev = _context4.next) {
90
90
  case 0:
91
91
  options = _objectSpread(_objectSpread({}, optionsQuery), {}, {
92
- timeout: 120e3
92
+ timeout: 10e3
93
93
  });
94
- return _context4.abrupt("return", request("_main/file/openInFolder", _objectSpread({
94
+ return _context4.abrupt("return", request("_main/file/folderCreate", _objectSpread({
95
95
  method: 'POST',
96
96
  headers: {
97
97
  'Content-Type': 'application/json'
@@ -104,13 +104,13 @@ function _openInFolder() {
104
104
  }
105
105
  }, _callee4);
106
106
  }));
107
- return _openInFolder.apply(this, arguments);
107
+ return _folderCreate.apply(this, arguments);
108
108
  }
109
- export function folderOpen(_x9, _x10) {
110
- return _folderOpen.apply(this, arguments);
109
+ export function openInFolder(_x9, _x10) {
110
+ return _openInFolder.apply(this, arguments);
111
111
  }
112
- function _folderOpen() {
113
- _folderOpen = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(body, optionsQuery) {
112
+ function _openInFolder() {
113
+ _openInFolder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(body, optionsQuery) {
114
114
  var options;
115
115
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
116
116
  while (1) switch (_context5.prev = _context5.next) {
@@ -118,7 +118,7 @@ function _folderOpen() {
118
118
  options = _objectSpread(_objectSpread({}, optionsQuery), {}, {
119
119
  timeout: 120e3
120
120
  });
121
- return _context5.abrupt("return", request("_main/file/folderOpen", _objectSpread({
121
+ return _context5.abrupt("return", request("_main/file/openInFolder", _objectSpread({
122
122
  method: 'POST',
123
123
  headers: {
124
124
  'Content-Type': 'application/json'
@@ -131,13 +131,13 @@ function _folderOpen() {
131
131
  }
132
132
  }, _callee5);
133
133
  }));
134
- return _folderOpen.apply(this, arguments);
134
+ return _openInFolder.apply(this, arguments);
135
135
  }
136
- export function fileListContent(_x11, _x12) {
137
- return _fileListContent.apply(this, arguments);
136
+ export function folderOpen(_x11, _x12) {
137
+ return _folderOpen.apply(this, arguments);
138
138
  }
139
- function _fileListContent() {
140
- _fileListContent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(body, optionsQuery) {
139
+ function _folderOpen() {
140
+ _folderOpen = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(body, optionsQuery) {
141
141
  var options;
142
142
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
143
143
  while (1) switch (_context6.prev = _context6.next) {
@@ -145,7 +145,7 @@ function _fileListContent() {
145
145
  options = _objectSpread(_objectSpread({}, optionsQuery), {}, {
146
146
  timeout: 120e3
147
147
  });
148
- return _context6.abrupt("return", request("_main/file/fileListContent", _objectSpread({
148
+ return _context6.abrupt("return", request("_main/file/folderOpen", _objectSpread({
149
149
  method: 'POST',
150
150
  headers: {
151
151
  'Content-Type': 'application/json'
@@ -158,23 +158,50 @@ function _fileListContent() {
158
158
  }
159
159
  }, _callee6);
160
160
  }));
161
+ return _folderOpen.apply(this, arguments);
162
+ }
163
+ export function fileListContent(_x13, _x14) {
164
+ return _fileListContent.apply(this, arguments);
165
+ }
166
+ function _fileListContent() {
167
+ _fileListContent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(body, optionsQuery) {
168
+ var options;
169
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
170
+ while (1) switch (_context7.prev = _context7.next) {
171
+ case 0:
172
+ options = _objectSpread(_objectSpread({}, optionsQuery), {}, {
173
+ timeout: 120e3
174
+ });
175
+ return _context7.abrupt("return", request("_main/file/fileListContent", _objectSpread({
176
+ method: 'POST',
177
+ headers: {
178
+ 'Content-Type': 'application/json'
179
+ },
180
+ data: body
181
+ }, options || {})));
182
+ case 2:
183
+ case "end":
184
+ return _context7.stop();
185
+ }
186
+ }, _callee7);
187
+ }));
161
188
  return _fileListContent.apply(this, arguments);
162
189
  }
163
- export function soundInfo(_x13, _x14) {
190
+ export function soundInfo(_x15, _x16) {
164
191
  return _soundInfo.apply(this, arguments);
165
192
  }
166
193
 
167
194
  // 相对粗糙,假设文件都不大;
168
195
  function _soundInfo() {
169
- _soundInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(body, optionsQuery) {
196
+ _soundInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(body, optionsQuery) {
170
197
  var options;
171
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
172
- while (1) switch (_context7.prev = _context7.next) {
198
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
199
+ while (1) switch (_context8.prev = _context8.next) {
173
200
  case 0:
174
201
  options = _objectSpread(_objectSpread({}, optionsQuery), {}, {
175
202
  timeout: 120e3
176
203
  });
177
- return _context7.abrupt("return", request("_main/sound/info", _objectSpread({
204
+ return _context8.abrupt("return", request("_main/sound/info", _objectSpread({
178
205
  method: 'POST',
179
206
  headers: {
180
207
  'Content-Type': 'application/json'
@@ -183,26 +210,26 @@ function _soundInfo() {
183
210
  }, options || {})));
184
211
  case 2:
185
212
  case "end":
186
- return _context7.stop();
213
+ return _context8.stop();
187
214
  }
188
- }, _callee7);
215
+ }, _callee8);
189
216
  }));
190
217
  return _soundInfo.apply(this, arguments);
191
218
  }
192
- export function downUrl(_x15, _x16) {
219
+ export function downUrl(_x17, _x18) {
193
220
  return _downUrl.apply(this, arguments);
194
221
  }
195
222
  function _downUrl() {
196
- _downUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(body, options) {
197
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
198
- while (1) switch (_context8.prev = _context8.next) {
223
+ _downUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(body, options) {
224
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
225
+ while (1) switch (_context9.prev = _context9.next) {
199
226
  case 0:
200
227
  if (body.savePath) {
201
228
  if (!/\/$/.test(body.savePath)) {
202
229
  body.savePath += '/';
203
230
  }
204
231
  }
205
- return _context8.abrupt("return", request("_local/file/downUrl", _objectSpread({
232
+ return _context9.abrupt("return", request("_local/file/downUrl", _objectSpread({
206
233
  method: 'POST',
207
234
  headers: {
208
235
  'Content-Type': 'application/json'
@@ -214,9 +241,9 @@ function _downUrl() {
214
241
  }))));
215
242
  case 2:
216
243
  case "end":
217
- return _context8.stop();
244
+ return _context9.stop();
218
245
  }
219
- }, _callee8);
246
+ }, _callee9);
220
247
  }));
221
248
  return _downUrl.apply(this, arguments);
222
249
  }
@@ -0,0 +1 @@
1
+ export declare function openChrome(body: OpenChrome.OnOpenChromeRun, options?: ServicesApi.RequestOptions): Promise<boolean>;
@@ -0,0 +1,27 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
+ import request from "../../lib/request";
5
+ export function openChrome(_x, _x2) {
6
+ return _openChrome.apply(this, arguments);
7
+ }
8
+ function _openChrome() {
9
+ _openChrome = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(body, options) {
10
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
11
+ while (1) switch (_context.prev = _context.next) {
12
+ case 0:
13
+ return _context.abrupt("return", request("_video-api/chrome/chromeOpen", _objectSpread({
14
+ method: 'POST',
15
+ headers: {
16
+ 'Content-Type': 'application/json'
17
+ },
18
+ data: body
19
+ }, options || {})));
20
+ case 1:
21
+ case "end":
22
+ return _context.stop();
23
+ }
24
+ }, _callee);
25
+ }));
26
+ return _openChrome.apply(this, arguments);
27
+ }
@@ -0,0 +1,19 @@
1
+ declare namespace ApiLocal {
2
+ interface DataFlowResult<T> {
3
+ success: boolean;
4
+ data: T;
5
+ dataType: string;
6
+ message: string;
7
+ }
8
+ type LogStatus = 'wait' | 'info' | 'warn' | 'fail' | 'success';
9
+ interface DataFlowResultLogData {
10
+ taskId: number;
11
+ id: string;
12
+ logStatus: '' | LogStatus;
13
+ content: string;
14
+ created: number;
15
+ }
16
+ interface LogStatusDict {
17
+ [status: string]: string;
18
+ }
19
+ }
File without changes
@@ -0,0 +1,16 @@
1
+ declare namespace OpenChrome {
2
+ interface PropsQuery {
3
+ action: 'view' | 'publish' | 'add-account';
4
+ platform: Global.VideoPlatformKind;
5
+ platformAccountId: string;
6
+ nickname: string;
7
+ chromePath?: string;
8
+ chromeProfileName: string;
9
+ url?: string;
10
+ proxyInfo?: Global.ProxyInfo;
11
+ isOpen: boolean;
12
+ }
13
+ interface OnOpenChromeRun {
14
+ commandList: string[];
15
+ }
16
+ }
File without changes
@@ -5,6 +5,8 @@ declare namespace PublishTaskPlan {
5
5
  emptyLoopTimeSecond: number;
6
6
  platformVideoAccountId: string;
7
7
  platform: Global.VideoPlatformKind;
8
+ nickname: string;
9
+ chromeProfileName: string;
8
10
  taskInfo: TaskInfo;
9
11
  proxyInfo: Global.ProxyInfo;
10
12
  }
@@ -33,12 +35,16 @@ declare namespace PublishTaskPlan {
33
35
  }
34
36
  interface ReportTaskQuery extends ReportTaskQueryBaseInfo {
35
37
  success: boolean;
38
+ code: string;
36
39
  message: string;
37
40
  }
38
41
  interface ReportTaskQueryBaseInfo {
39
- taskType: TaskType;
42
+ taskType: TaskType | '';
40
43
  taskId: number;
41
44
  platform: Global.VideoPlatformKind;
42
45
  platformAccountId: string;
43
46
  }
47
+ interface Options {
48
+ onLog: (query: VideoPublishLog.Receive) => void;
49
+ }
44
50
  }
@@ -0,0 +1,11 @@
1
+ declare namespace PublishVideo {
2
+ interface PublishVideoLog {
3
+ "code": string;
4
+ "message": string;
5
+ "platform": Global.VideoPlatformKind;
6
+ "status": VideoPublishLog.Status;
7
+ taskType: PublishTaskPlan.TaskType | '';
8
+ "taskId": number;
9
+ logKey?: string;
10
+ }
11
+ }
File without changes
@@ -5,8 +5,10 @@ declare namespace VideoPublishLog {
5
5
  platformAccountId: string;
6
6
  code: string;
7
7
  message: string;
8
- status: Status;
8
+ nickname: string;
9
+ status: '' | Status;
9
10
  taskId: number;
11
+ logKey?: string;
10
12
  eventType: string;
11
13
  }
12
14
  interface Result {
@@ -22,6 +24,7 @@ declare namespace VideoPublishLog {
22
24
  taskId: number;
23
25
  platform: Global.VideoPlatformKind;
24
26
  platformAccountId: string;
27
+ nickname: string;
25
28
  logStatus: '' | Status;
26
29
  content: string;
27
30
  created: number;
@@ -17,4 +17,7 @@ declare namespace LocalFile {
17
17
  artist: string;
18
18
  coverUrl: string;
19
19
  }
20
+ interface FileCreate {
21
+ folderPath: string;
22
+ }
20
23
  }
@@ -3,5 +3,6 @@ declare namespace VideoPublishAccountManageSetting {
3
3
  isChromeOpen: boolean;
4
4
  disabledApplyTask: boolean;
5
5
  chromePath: string;
6
+ chromeUserDataDir: string;
6
7
  }
7
8
  }
@@ -16,9 +16,11 @@ declare namespace VideoPublishVideoAccount {
16
16
  platform: Global.VideoPlatformKind;
17
17
  subPlatform: string;
18
18
  totalVideoCount: number;
19
+ chromeProfileName: string;
19
20
  }
20
21
  interface SaveLoginStatus {
21
22
  clientIdentity: string;
23
+ taskId: number;
22
24
  platformVideoAccountId: string;
23
25
  platform: string;
24
26
  isLogin: boolean;
@@ -48,6 +50,7 @@ declare namespace VideoPublishVideoAccount {
48
50
  videoCount: number;
49
51
  created: number;
50
52
  updated: number;
53
+ chromeProfileName: string;
51
54
  proxyInfo: Global.ProxyInfo;
52
55
  }
53
56
  interface Detail {
package/dist/window.d.ts CHANGED
@@ -6,6 +6,7 @@ declare interface Window{
6
6
  __wxjs_environment: string;
7
7
  __recordError: any;
8
8
  __ShipinlvMainPort: number;
9
+ __ShipinlvLocalServerPort: number;
9
10
  __events: {
10
11
  name: string;
11
12
  fn: ( data?: any ) => void
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "1.1.26",
3
+ "version": "1.3.0",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",