@wps365-open/comate-cli 0.0.18 → 0.0.20
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/dist/commands/auth/login.js +1 -1
- package/dist/commands/auth/logout.js +1 -1
- package/dist/commands/auth/status.js +1 -1
- package/dist/commands/code/config.js +1 -0
- package/dist/commands/code/create.js +1 -1
- package/dist/commands/code/deploy.js +1 -1
- package/dist/commands/code/download.js +1 -0
- package/dist/commands/code/fetch-html.js +1 -0
- package/dist/commands/code/files.js +1 -1
- package/dist/commands/code/lookup.js +1 -1
- package/dist/commands/code/publish.js +1 -1
- package/dist/commands/code/recall.js +1 -1
- package/dist/commands/code/resume.js +1 -1
- package/dist/commands/code/send.js +1 -1
- package/dist/commands/code/status.js +1 -1
- package/dist/commands/code/upload.js +1 -1
- package/dist/commands/update.js +1 -1
- package/dist/hooks/init/logger.js +1 -1
- package/dist/hooks/prerun/update-checker.js +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/account/login-service.js +1 -1
- package/dist/lib/config/constants.js +1 -1
- package/dist/lib/config/manager.js +1 -1
- package/dist/lib/extends/command.js +1 -1
- package/dist/lib/http/auth-headers.js +1 -1
- package/dist/lib/http/client.js +1 -1
- package/dist/lib/log/logger.js +1 -1
- package/dist/lib/service/auth.js +1 -1
- package/dist/lib/service/cloud-agent.js +1 -1
- package/dist/lib/service/cloud-publish.js +1 -1
- package/dist/lib/service/manage.js +1 -1
- package/dist/lib/service/project-context.js +1 -1
- package/oclif.manifest.json +153 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1ddc88,_0xfca07b){const _0x3b7f5c=a31_0x29a2,_0x176e40=_0x1ddc88();while(!![]){try{const _0x1fb701=parseInt(_0x3b7f5c(0x1bc))/0x1*(parseInt(_0x3b7f5c(0x1b7))/0x2)+parseInt(_0x3b7f5c(0x1d8))/0x3*(-parseInt(_0x3b7f5c(0x1b3))/0x4)+parseInt(_0x3b7f5c(0x1c2))/0x5*(parseInt(_0x3b7f5c(0x1ba))/0x6)+parseInt(_0x3b7f5c(0x1b5))/0x7+parseInt(_0x3b7f5c(0x1bf))/0x8*(parseInt(_0x3b7f5c(0x1b1))/0x9)+-parseInt(_0x3b7f5c(0x1c7))/0xa*(-parseInt(_0x3b7f5c(0x1b8))/0xb)+parseInt(_0x3b7f5c(0x1b2))/0xc*(-parseInt(_0x3b7f5c(0x1ce))/0xd);if(_0x1fb701===_0xfca07b)break;else _0x176e40['push'](_0x176e40['shift']());}catch(_0x3515cd){_0x176e40['push'](_0x176e40['shift']());}}}(a31_0x4069,0x37354));function a31_0x29a2(_0x2e3ff4,_0x36d8b7){_0x2e3ff4=_0x2e3ff4-0x1b0;const _0x406919=a31_0x4069();let _0x29a29c=_0x406919[_0x2e3ff4];return _0x29a29c;}import{getThreadState}from'./cloud-agent.js';import{getBuildStatus}from'./cloud-publish.js';import{getProjectVersions}from'./manage.js';function extractDescription(_0x2d67a3){const _0x452a2a=a31_0x29a2;if(typeof _0x2d67a3==='string')return _0x2d67a3;if(!_0x2d67a3||typeof _0x2d67a3!==_0x452a2a(0x1c9))return null;const _0x291388=_0x2d67a3;return _0x291388[_0x452a2a(0x1b9)]??_0x291388['message']??_0x291388[_0x452a2a(0x1b0)]??null;}function extractInterrupt(_0x277866){const _0x402477=a31_0x29a2;for(const _0x575bee of _0x277866){const _0x2797f2=_0x575bee,_0x252fd5=_0x2797f2[_0x402477(0x1bd)];if(_0x252fd5?.[_0x402477(0x1b6)]){const _0x12dc0f=_0x252fd5[0x0],_0x46fd41=_0x12dc0f[_0x402477(0x1cb)];return{'waiting':!![],'description':extractDescription(_0x46fd41),'value':_0x46fd41};}}return{'waiting':![]};}function settled(_0x4d1b3c){const _0x207ecf=a31_0x29a2;return _0x4d1b3c[_0x207ecf(0x1d4)]===_0x207ecf(0x1bb)?_0x4d1b3c['value']:null;}function buildAgentBlock(_0x34936e){const _0x25e865=a31_0x29a2;if(!_0x34936e)return{'messages_count':0x0,'file_count':0x0,'has_todos':![],'tasks_count':0x0};const _0x55dc65=_0x34936e[_0x25e865(0x1d3)]?.[_0x25e865(0x1d2)],_0xd871a9=_0x34936e['values']?.['files'],_0x1607e9=_0x34936e[_0x25e865(0x1d3)]?.[_0x25e865(0x1d6)];let _0x44e8f8=0x0;return _0xd871a9&&typeof _0xd871a9===_0x25e865(0x1c9)&&(_0x44e8f8=Object[_0x25e865(0x1be)](_0xd871a9)[_0x25e865(0x1b6)]),{'messages_count':Array[_0x25e865(0x1c6)](_0x55dc65)?_0x55dc65['length']:0x0,'file_count':_0x44e8f8,'has_todos':Array['isArray'](_0x1607e9)?_0x1607e9[_0x25e865(0x1b6)]>0x0:![],'tasks_count':Array[_0x25e865(0x1c6)](_0x34936e[_0x25e865(0x1ca)])?_0x34936e['tasks'][_0x25e865(0x1b6)]:0x0};}function buildBuildBlock(_0x164d4c){const _0x3683a9=a31_0x29a2;if(!_0x164d4c)return{'phase':_0x3683a9(0x1cd),'message':''};return{'phase':_0x164d4c['phase'],'message':_0x164d4c['message']};}function buildDeployBlock(_0x54cf87){const _0x5cfc1e=a31_0x29a2;if(!_0x54cf87)return{'status':'none','access_url':null,'short_url':null};const _0xe26999=_0x54cf87['result']?.[_0x5cfc1e(0x1d0)];if(!_0xe26999)return{'status':_0x5cfc1e(0x1cd),'access_url':null,'short_url':null};const _0x363763={'deployed':_0x5cfc1e(0x1c5),'deploying':_0x5cfc1e(0x1c0),'failed':_0x5cfc1e(0x1c8)};return{'status':_0x363763[_0xe26999[_0x5cfc1e(0x1c1)]??'']??_0x5cfc1e(0x1cd),'access_url':_0xe26999[_0x5cfc1e(0x1d7)]||null,'short_url':_0xe26999[_0x5cfc1e(0x1d1)]||null};}function buildProjectBlock(_0x1b8240,_0x669525){const _0x133d7b=a31_0x29a2;if(!_0x669525)return{'id':_0x1b8240,'name':null,'versions_count':0x0,'latest_version':null};const _0x4659ea=[..._0x669525][_0x133d7b(0x1c4)]((_0x39c669,_0xf0b75)=>_0xf0b75[_0x133d7b(0x1d5)]-_0x39c669[_0x133d7b(0x1d5)]);return{'id':_0x1b8240,'name':null,'versions_count':_0x669525['length'],'latest_version':_0x4659ea[0x0]?.[_0x133d7b(0x1c3)]??null};}export async function getProjectContext(_0x32a3ef,_0x1dfe4a){const _0x2d67f9=a31_0x29a2,[_0x390e48,_0x39b3e7,_0x289fdb]=await Promise[_0x2d67f9(0x1b4)]([getThreadState(_0x32a3ef),getBuildStatus(_0x32a3ef),_0x1dfe4a?getProjectVersions(_0x1dfe4a):Promise[_0x2d67f9(0x1cc)](null)]),_0x3c26f2=settled(_0x390e48),_0x3e3312=settled(_0x39b3e7),_0x24fb55=settled(_0x289fdb),_0x4c3d15=buildDeployBlock(_0x3e3312),_0x378f1a=buildAgentBlock(_0x3c26f2),_0x345588=_0x3c26f2?(_0x3c26f2[_0x2d67f9(0x1cf)]?.[_0x2d67f9(0x1b6)]??0x0)>0x0:![];return{'thread_id':_0x32a3ef,'agent':{..._0x378f1a,'running':_0x345588},'interrupt':extractInterrupt(_0x3c26f2?.['tasks']??[]),'build':buildBuildBlock(_0x3e3312),'deploy':_0x4c3d15,'project':_0x1dfe4a!=null?buildProjectBlock(_0x1dfe4a,_0x24fb55):null,'urls':{'runtime':_0x4c3d15[_0x2d67f9(0x1d1)]||_0x4c3d15['access_url'],'short_url':_0x4c3d15[_0x2d67f9(0x1d1)]}};}function a31_0x4069(){const _0x2ae7d5=['528143LkTEUR','length','820xYeNIK','1276lcchrQ','description','12cadFmG','fulfilled','360xlgwxA','interrupts','keys','8Roazxs','deploying','deploy_status','528240VVCjSg','version_number','sort','deployed','isArray','32380amnOnt','failed','object','tasks','value','resolve','none','3506165YvSWxN','next','publishResponse','short_url','messages','values','status','created_at','todos','access_url','9441JsyrYR','type','3075597zVYHCT','36TislPb','148gyAIZF','allSettled'];a31_0x4069=function(){return _0x2ae7d5;};return a31_0x4069();}
|
package/oclif.manifest.json
CHANGED
|
@@ -128,6 +128,55 @@
|
|
|
128
128
|
"status.js"
|
|
129
129
|
]
|
|
130
130
|
},
|
|
131
|
+
"code:config": {
|
|
132
|
+
"aliases": [],
|
|
133
|
+
"args": {},
|
|
134
|
+
"description": "读写项目配置(session_id、task_type 等),用于追踪会话上下文",
|
|
135
|
+
"examples": [
|
|
136
|
+
"<%= config.bin %> code config --project-id 206 --json",
|
|
137
|
+
"<%= config.bin %> code config --project-id 206 --set session_id=thread_xxx --set task_type=cloud --json",
|
|
138
|
+
"<%= config.bin %> code config --project-id 206 --set session_id=1388246512-b7aa-... --set task_type=local --json"
|
|
139
|
+
],
|
|
140
|
+
"flags": {
|
|
141
|
+
"json": {
|
|
142
|
+
"description": "Format output as json.",
|
|
143
|
+
"helpGroup": "GLOBAL",
|
|
144
|
+
"name": "json",
|
|
145
|
+
"allowNo": false,
|
|
146
|
+
"type": "boolean"
|
|
147
|
+
},
|
|
148
|
+
"project-id": {
|
|
149
|
+
"description": "项目 ID(必填)",
|
|
150
|
+
"name": "project-id",
|
|
151
|
+
"required": true,
|
|
152
|
+
"hasDynamicHelp": false,
|
|
153
|
+
"multiple": false,
|
|
154
|
+
"type": "option"
|
|
155
|
+
},
|
|
156
|
+
"set": {
|
|
157
|
+
"description": "设置配置项(格式: key=value,可多次使用)",
|
|
158
|
+
"name": "set",
|
|
159
|
+
"hasDynamicHelp": false,
|
|
160
|
+
"multiple": true,
|
|
161
|
+
"type": "option"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"hasDynamicHelp": false,
|
|
165
|
+
"hiddenAliases": [],
|
|
166
|
+
"id": "code:config",
|
|
167
|
+
"pluginAlias": "@wps365-open/comate-cli",
|
|
168
|
+
"pluginName": "@wps365-open/comate-cli",
|
|
169
|
+
"pluginType": "core",
|
|
170
|
+
"strict": true,
|
|
171
|
+
"enableJsonFlag": true,
|
|
172
|
+
"isESM": true,
|
|
173
|
+
"relativePath": [
|
|
174
|
+
"dist",
|
|
175
|
+
"commands",
|
|
176
|
+
"code",
|
|
177
|
+
"config.js"
|
|
178
|
+
]
|
|
179
|
+
},
|
|
131
180
|
"code:create": {
|
|
132
181
|
"aliases": [],
|
|
133
182
|
"args": {},
|
|
@@ -270,6 +319,109 @@
|
|
|
270
319
|
"deploy.js"
|
|
271
320
|
]
|
|
272
321
|
},
|
|
322
|
+
"code:download": {
|
|
323
|
+
"aliases": [],
|
|
324
|
+
"args": {},
|
|
325
|
+
"description": "下载已部署应用的前端构建产物(通过短链或 project-id + version-id),解压到本地目录供编辑",
|
|
326
|
+
"examples": [
|
|
327
|
+
"<%= config.bin %> code download --url https://o.wpsgo.com/app/41000207/rmFkBq1nbMEO/ --json",
|
|
328
|
+
"<%= config.bin %> code download --project-id 477 --version-id 864 --json",
|
|
329
|
+
"<%= config.bin %> code download --url https://o.wpsgo.com/app/41000207/rmFkBq1nbMEO/ --output-dir ./my-app --json"
|
|
330
|
+
],
|
|
331
|
+
"flags": {
|
|
332
|
+
"json": {
|
|
333
|
+
"description": "Format output as json.",
|
|
334
|
+
"helpGroup": "GLOBAL",
|
|
335
|
+
"name": "json",
|
|
336
|
+
"allowNo": false,
|
|
337
|
+
"type": "boolean"
|
|
338
|
+
},
|
|
339
|
+
"url": {
|
|
340
|
+
"description": "应用短链 URL(与 --project-id + --version-id 二选一)",
|
|
341
|
+
"name": "url",
|
|
342
|
+
"hasDynamicHelp": false,
|
|
343
|
+
"multiple": false,
|
|
344
|
+
"type": "option"
|
|
345
|
+
},
|
|
346
|
+
"project-id": {
|
|
347
|
+
"description": "项目 ID(与 --url 二选一)",
|
|
348
|
+
"name": "project-id",
|
|
349
|
+
"hasDynamicHelp": false,
|
|
350
|
+
"multiple": false,
|
|
351
|
+
"type": "option"
|
|
352
|
+
},
|
|
353
|
+
"version-id": {
|
|
354
|
+
"description": "版本 ID(与 --url 二选一,需配合 --project-id)",
|
|
355
|
+
"name": "version-id",
|
|
356
|
+
"hasDynamicHelp": false,
|
|
357
|
+
"multiple": false,
|
|
358
|
+
"type": "option"
|
|
359
|
+
},
|
|
360
|
+
"output-dir": {
|
|
361
|
+
"char": "o",
|
|
362
|
+
"description": "解压目标目录(默认: ./<short_slug> 或 ./download-<project_id>)",
|
|
363
|
+
"name": "output-dir",
|
|
364
|
+
"hasDynamicHelp": false,
|
|
365
|
+
"multiple": false,
|
|
366
|
+
"type": "option"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"hasDynamicHelp": false,
|
|
370
|
+
"hiddenAliases": [],
|
|
371
|
+
"id": "code:download",
|
|
372
|
+
"pluginAlias": "@wps365-open/comate-cli",
|
|
373
|
+
"pluginName": "@wps365-open/comate-cli",
|
|
374
|
+
"pluginType": "core",
|
|
375
|
+
"strict": true,
|
|
376
|
+
"enableJsonFlag": true,
|
|
377
|
+
"isESM": true,
|
|
378
|
+
"relativePath": [
|
|
379
|
+
"dist",
|
|
380
|
+
"commands",
|
|
381
|
+
"code",
|
|
382
|
+
"download.js"
|
|
383
|
+
]
|
|
384
|
+
},
|
|
385
|
+
"code:fetch-html": {
|
|
386
|
+
"aliases": [],
|
|
387
|
+
"args": {},
|
|
388
|
+
"description": "获取已部署应用的 HTML 页面内容,分析静态资源(仅允许 o.wpsgo.com 应用地址)",
|
|
389
|
+
"examples": [
|
|
390
|
+
"<%= config.bin %> code fetch-html --url https://o.wpsgo.com/app/41000207/6Ne2UkWT3ytn/ --json"
|
|
391
|
+
],
|
|
392
|
+
"flags": {
|
|
393
|
+
"json": {
|
|
394
|
+
"description": "Format output as json.",
|
|
395
|
+
"helpGroup": "GLOBAL",
|
|
396
|
+
"name": "json",
|
|
397
|
+
"allowNo": false,
|
|
398
|
+
"type": "boolean"
|
|
399
|
+
},
|
|
400
|
+
"url": {
|
|
401
|
+
"description": "应用 URL(格式: https://o.wpsgo.com/app/<company_id>/<short_slug>/)",
|
|
402
|
+
"name": "url",
|
|
403
|
+
"required": true,
|
|
404
|
+
"hasDynamicHelp": false,
|
|
405
|
+
"multiple": false,
|
|
406
|
+
"type": "option"
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
"hasDynamicHelp": false,
|
|
410
|
+
"hiddenAliases": [],
|
|
411
|
+
"id": "code:fetch-html",
|
|
412
|
+
"pluginAlias": "@wps365-open/comate-cli",
|
|
413
|
+
"pluginName": "@wps365-open/comate-cli",
|
|
414
|
+
"pluginType": "core",
|
|
415
|
+
"strict": true,
|
|
416
|
+
"enableJsonFlag": true,
|
|
417
|
+
"isESM": true,
|
|
418
|
+
"relativePath": [
|
|
419
|
+
"dist",
|
|
420
|
+
"commands",
|
|
421
|
+
"code",
|
|
422
|
+
"fetch-html.js"
|
|
423
|
+
]
|
|
424
|
+
},
|
|
273
425
|
"code:files": {
|
|
274
426
|
"aliases": [],
|
|
275
427
|
"args": {},
|
|
@@ -725,5 +877,5 @@
|
|
|
725
877
|
]
|
|
726
878
|
}
|
|
727
879
|
},
|
|
728
|
-
"version": "0.0.
|
|
880
|
+
"version": "0.0.20"
|
|
729
881
|
}
|