@lovrabet/rabetbase-cli 2.1.8 → 2.1.10-beta.0
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/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -0
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a70_0x3828(_0x292e4c,_0x2a64e6){_0x292e4c=_0x292e4c-0x165;const _0xfc7d29=a70_0xfc7d();let _0x382823=_0xfc7d29[_0x292e4c];return _0x382823;}(function(_0x19b0bf,_0x7dd53a){const _0x3851ce=a70_0x3828,_0x44c768=_0x19b0bf();while(!![]){try{const _0x5de324=parseInt(_0x3851ce(0x174))/0x1+-parseInt(_0x3851ce(0x176))/0x2+parseInt(_0x3851ce(0x17d))/0x3*(-parseInt(_0x3851ce(0x173))/0x4)+parseInt(_0x3851ce(0x17a))/0x5+-parseInt(_0x3851ce(0x16e))/0x6+parseInt(_0x3851ce(0x178))/0x7+parseInt(_0x3851ce(0x167))/0x8;if(_0x5de324===_0x7dd53a)break;else _0x44c768['push'](_0x44c768['shift']());}catch(_0x116a60){_0x44c768['push'](_0x44c768['shift']());}}}(a70_0xfc7d,0x1e879));import{getEnv,isDaily,normalizeEnv}from'../../constant/env.js';function shouldRedactKey(_0x2cd487){const _0x1bd922=a70_0x3828,_0x3c2a0c=_0x2cd487[_0x1bd922(0x17b)]();if(_0x3c2a0c===_0x1bd922(0x177)||_0x3c2a0c===_0x1bd922(0x166)||_0x3c2a0c===_0x1bd922(0x16f))return!![];if(_0x3c2a0c[_0x1bd922(0x165)](_0x1bd922(0x179))||_0x3c2a0c[_0x1bd922(0x165)](_0x1bd922(0x172))||_0x3c2a0c[_0x1bd922(0x165)]('credential'))return!![];if(_0x3c2a0c[_0x1bd922(0x165)](_0x1bd922(0x16a))||_0x3c2a0c[_0x1bd922(0x165)](_0x1bd922(0x171)))return!![];if(_0x3c2a0c==='authorization'||_0x3c2a0c==='connectionstring'||_0x3c2a0c===_0x1bd922(0x175))return!![];return![];}export function sanitizeDbLinkForOutput(_0x20bbf0){const _0x536ad6=a70_0x3828,_0x2ec1d1={..._0x20bbf0};for(const _0x20e06d of Object[_0x536ad6(0x168)](_0x2ec1d1)){if(!shouldRedactKey(_0x20e06d))continue;const _0x29231d=_0x2ec1d1[_0x20e06d];_0x29231d!=null&&String(_0x29231d)['length']>0x0&&(_0x2ec1d1[_0x20e06d]='[redacted]');}return _0x2ec1d1;}export function sanitizeDbLinkList(_0x315bd6){const _0x3b4d30=a70_0x3828;return _0x315bd6[_0x3b4d30(0x16c)](_0x429440=>sanitizeDbLinkForOutput(_0x429440));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x5e9565){const _0x39be13=a70_0x3828,_0x475792=_0x5e9565['trim']();if(!_0x475792)return![];return DB_URL_PATTERN[_0x39be13(0x17c)](_0x475792);}function a70_0xfc7d(){const _0x5b59ea=['1648689mohjff','secret','141220JYxrHO','toLowerCase','test','272571OeKFvF','includes','passwd','1669640rOtABc','keys','isFinite','privatekey','https://daily.lovrabet.com/web-app/app/','map','trim','788448QHbkDA','dbpassword','number','accesskey','token','8XrBgvl','188314pCvEeU','jdbcurl','445238tgFtNe','password'];a70_0xfc7d=function(){return _0x5b59ea;};return a70_0xfc7d();}export function buildDbPageLinks(_0x361340,_0x3fdb67){const _0x17fac6=a70_0x3828,_0x31c1e1=_0x361340?.[_0x17fac6(0x16d)]();if(!_0x31c1e1)return undefined;const _0x29b02e=typeof _0x3fdb67===_0x17fac6(0x170)?String(_0x3fdb67):String(_0x3fdb67??'')[_0x17fac6(0x16d)]();if(!_0x29b02e)return undefined;const _0x56fdb5=Number(_0x29b02e);if(!Number[_0x17fac6(0x169)](_0x56fdb5)||_0x56fdb5<=0x0)return undefined;const _0x57822f=isDaily(normalizeEnv(getEnv()))?_0x17fac6(0x16b)+encodeURIComponent(_0x31c1e1):'https://app.lovrabet.com/app/'+encodeURIComponent(_0x31c1e1),_0x3c8335=encodeURIComponent(String(_0x56fdb5));return{'databasePage':_0x57822f+'/data/database','erPage':_0x57822f+'/data/er?dbId='+_0x3c8335};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a71_0x5eb3(_0x48803f,_0xb9fd51){_0x48803f=_0x48803f-0x1bc;const _0x1eb22a=a71_0x1eb2();let _0x5eb3b0=_0x1eb22a[_0x48803f];return _0x5eb3b0;}const a71_0x5c2f7c=a71_0x5eb3;(function(_0x95853b,_0x3d0ead){const _0x2a3ea6=a71_0x5eb3,_0x44f30d=_0x95853b();while(!![]){try{const _0x402386=-parseInt(_0x2a3ea6(0x1c0))/0x1*(-parseInt(_0x2a3ea6(0x1c5))/0x2)+parseInt(_0x2a3ea6(0x1c6))/0x3+parseInt(_0x2a3ea6(0x1bc))/0x4*(-parseInt(_0x2a3ea6(0x1bd))/0x5)+-parseInt(_0x2a3ea6(0x1ca))/0x6+-parseInt(_0x2a3ea6(0x1bf))/0x7+-parseInt(_0x2a3ea6(0x1c8))/0x8+-parseInt(_0x2a3ea6(0x1c7))/0x9*(-parseInt(_0x2a3ea6(0x1c1))/0xa);if(_0x402386===_0x3d0ead)break;else _0x44f30d['push'](_0x44f30d['shift']());}catch(_0x1416da){_0x44f30d['push'](_0x44f30d['shift']());}}}(a71_0x1eb2,0x62671));function a71_0x1eb2(){const _0x2a664f=['4VrKlmq','1603150eLEcAP','appCode','4773216KXgQFB','25NhgnzU','530SlkFBH','read','tables','num','46918iEdxmi','1726092kdsyJd','81594Fwnpyj','1445200EFqEIR','length','336672evitwZ'];a71_0x1eb2=function(){return _0x2a664f;};return a71_0x1eb2();}import{getDbAllTableList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':a71_0x5c2f7c(0x1c3),'description':'List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','risk':a71_0x5c2f7c(0x1c2),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1c225d){const _0x14c783=a71_0x5c2f7c,_0x1d7ed6=_0x1c225d[_0x14c783(0x1c4)]('id'),_0x12e842=await getDbAllTableList(_0x1c225d[_0x14c783(0x1be)],_0x1d7ed6);return{'ok':!![],'data':{'dbLinkId':_0x1d7ed6,'total':_0x12e842['length'],'tables':_0x12e842},'message':_0x12e842[_0x14c783(0x1c9)]+'\x20table(s)\x20on\x20db\x20link\x20'+_0x1d7ed6};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x3d9b86=a72_0x1a91;(function(_0x205258,_0x1772f7){const _0x36b564=a72_0x1a91,_0x2e1ce3=_0x205258();while(!![]){try{const _0x49683a=-parseInt(_0x36b564(0x134))/0x1+-parseInt(_0x36b564(0x136))/0x2*(parseInt(_0x36b564(0x13e))/0x3)+-parseInt(_0x36b564(0x13d))/0x4*(parseInt(_0x36b564(0x13c))/0x5)+parseInt(_0x36b564(0x139))/0x6*(parseInt(_0x36b564(0x137))/0x7)+-parseInt(_0x36b564(0x130))/0x8+parseInt(_0x36b564(0x141))/0x9+parseInt(_0x36b564(0x12f))/0xa;if(_0x49683a===_0x1772f7)break;else _0x2e1ce3['push'](_0x2e1ce3['shift']());}catch(_0x1debd2){_0x2e1ce3['push'](_0x2e1ce3['shift']());}}}(a72_0x4397,0x80490));function a72_0x4397(){const _0x1bc930=['msg','18cqJoRj','error','code','5GJAwYi','3637768RWnxVa','436623cQSMNV','test','slice','588789bKqlPX','\x20(see\x20data.result)','keys','26530820FXJtBC','5975880qZCHlG','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','message','success','453838xGSISN','data','6iBbkjP','825629FqmEIx'];a72_0x4397=function(){return _0x1bc930;};return a72_0x4397();}import{testDbLinkConnect}from'../../core/api-client.js';function a72_0x1a91(_0x53cd86,_0x484345){_0x53cd86=_0x53cd86-0x12e;const _0x4397ad=a72_0x4397();let _0x1a9166=_0x4397ad[_0x53cd86];return _0x1a9166;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x2d796c){const _0x45be63=a72_0x1a91;if(_0x2d796c===!![]||_0x2d796c===![])return{'success':_0x2d796c};if(_0x2d796c===null||_0x2d796c===undefined)return{'type':typeof _0x2d796c};if(typeof _0x2d796c!=='object')return{'type':typeof _0x2d796c};const _0x83f873=_0x2d796c,_0xe9ff90=['success',_0x45be63(0x132),_0x45be63(0x13b),_0x45be63(0x13a),_0x45be63(0x138),_0x45be63(0x135)],_0x4ddbd1={};for(const _0x1cddfd of _0xe9ff90){if(_0x1cddfd in _0x83f873)_0x4ddbd1[_0x1cddfd]=_0x83f873[_0x1cddfd];}return Object[_0x45be63(0x12e)](_0x4ddbd1)['length']===0x0&&(_0x4ddbd1[_0x45be63(0x12e)]=Object[_0x45be63(0x12e)](_0x83f873)[_0x45be63(0x140)](0x0,0x14)),_0x4ddbd1;}export const dbTest={'service':'db','command':a72_0x3d9b86(0x13f),'description':a72_0x3d9b86(0x131),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4dcff8){const _0x394bb9=a72_0x3d9b86,_0x3a683a=_0x4dcff8['num']('id'),_0x1b546c=await testDbLinkConnect(_0x3a683a),_0x2f4f47=_0x1b546c===!![]||typeof _0x1b546c==='object'&&_0x1b546c!==null&&_0x1b546c[_0x394bb9(0x133)]===!![],_0x4c774d=summarizeTestConnectResult(_0x1b546c);return{'ok':!![],'data':{'id':_0x3a683a,'connected':Boolean(_0x2f4f47),'result':_0x4c774d},'message':_0x2f4f47?'Connection\x20OK\x20for\x20db\x20link\x20'+_0x3a683a:'Connection\x20check\x20finished\x20for\x20db\x20link\x20'+_0x3a683a+_0x394bb9(0x142)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a73_0x13e4(_0x31582b,_0x127be2){_0x31582b=_0x31582b-0xd4;const _0x47a2b1=a73_0x47a2();let _0x13e4a5=_0x47a2b1[_0x31582b];return _0x13e4a5;}const a73_0x3c6041=a73_0x13e4;(function(_0x3cc574,_0x1c5880){const _0x1fd053=a73_0x13e4,_0x2d6412=_0x3cc574();while(!![]){try{const _0x2a0cd8=-parseInt(_0x1fd053(0xd6))/0x1*(-parseInt(_0x1fd053(0xf6))/0x2)+parseInt(_0x1fd053(0xdc))/0x3+parseInt(_0x1fd053(0xf3))/0x4+parseInt(_0x1fd053(0xe7))/0x5*(parseInt(_0x1fd053(0xe2))/0x6)+-parseInt(_0x1fd053(0xef))/0x7*(-parseInt(_0x1fd053(0xd9))/0x8)+-parseInt(_0x1fd053(0xd8))/0x9*(-parseInt(_0x1fd053(0xd7))/0xa)+-parseInt(_0x1fd053(0xde))/0xb;if(_0x2a0cd8===_0x1c5880)break;else _0x2d6412['push'](_0x2d6412['shift']());}catch(_0x581a60){_0x2d6412['push'](_0x2d6412['shift']());}}}(a73_0x47a2,0x1c588));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a73_0x47a2(){const _0x522d3b=['dbUrl','string','7WHYYsC','dbname','num','dbdesc','719776BTjAAg','New\x20database\x20name','Updated\x20db\x20link\x20','194uiSVhj','dbParam','New\x20host:port','926HDgRNk','710AnLCNX','24147FcZrXj','376408KtXmXc','dbName','str','665796APfALo','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','7428806KcZTjR','dburl','write','dbDesc','6YepQza','dbparam','New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API','password','username','311040LYBzTq','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','update','POST','New\x20description','trim'];a73_0x47a2=function(){return _0x522d3b;};return a73_0x47a2();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbUpdate={'service':'db','command':a73_0x3c6041(0xe9),'description':a73_0x3c6041(0xdd),'risk':a73_0x3c6041(0xe0),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a73_0x3c6041(0xf0),'type':a73_0x3c6041(0xee),'description':a73_0x3c6041(0xf4)},{'name':a73_0x3c6041(0xdf),'type':a73_0x3c6041(0xee),'description':a73_0x3c6041(0xd5)},{'name':a73_0x3c6041(0xe6),'type':'string','description':'New\x20username'},{'name':a73_0x3c6041(0xe5),'type':'string','description':a73_0x3c6041(0xe4)},{'name':a73_0x3c6041(0xe3),'type':a73_0x3c6041(0xee),'description':'New\x20connection\x20parameter\x20string'},{'name':'dbdesc','type':a73_0x3c6041(0xee),'description':a73_0x3c6041(0xeb)}],async 'validate'(_0x2644bb){const _0x50ff3e=a73_0x3c6041,_0x2d9872=_0x2644bb[_0x50ff3e(0xdb)]('dburl');if(_0x2d9872&&!validateDbUrl(_0x2d9872[_0x50ff3e(0xec)]()))throw CliErrors['validation']('Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22'+_0x2d9872+'\x22');},async 'dryRun'(_0x201811){const _0x2ea61e=a73_0x3c6041,_0x1e26df=_0x201811[_0x2ea61e(0xf1)]('id'),_0x819343=await getDbLinkInfo(_0x1e26df),_0x4dce55={..._0x819343},_0x5820ea=_0x201811['str'](_0x2ea61e(0xf0));if(_0x5820ea)_0x4dce55[_0x2ea61e(0xda)]=_0x5820ea;const _0x142d92=_0x201811[_0x2ea61e(0xdb)]('dburl');if(_0x142d92)_0x4dce55[_0x2ea61e(0xed)]=_0x142d92[_0x2ea61e(0xec)]();const _0x5c4baf=_0x201811[_0x2ea61e(0xdb)](_0x2ea61e(0xe6));if(_0x5c4baf)_0x4dce55[_0x2ea61e(0xe6)]=_0x5c4baf;const _0x652a40=_0x201811['str'](_0x2ea61e(0xe5));if(_0x652a40)_0x4dce55['password']=_0x652a40;const _0x567e01=_0x201811[_0x2ea61e(0xdb)]('dbparam');if(_0x567e01)_0x4dce55[_0x2ea61e(0xd4)]=_0x567e01;const _0x4f3723=_0x201811[_0x2ea61e(0xdb)](_0x2ea61e(0xf2));if(_0x4f3723)_0x4dce55[_0x2ea61e(0xe1)]=_0x4f3723;const _0x5b1b1d=sanitizeDbLinkForOutput(_0x4dce55);return{'method':_0x2ea61e(0xea),'url':'/smartapi/dblink/update','body':_0x5b1b1d,'description':_0x2ea61e(0xe8)};},async 'execute'(_0x54350f){const _0x38864d=a73_0x3c6041,_0x1c6f47=_0x54350f[_0x38864d(0xf1)]('id'),_0x40b017=await getDbLinkInfo(_0x1c6f47),_0x583fe4={..._0x40b017},_0x544340=_0x54350f['str'](_0x38864d(0xf0));if(_0x544340)_0x583fe4[_0x38864d(0xda)]=_0x544340;const _0x3b1c6b=_0x54350f[_0x38864d(0xdb)](_0x38864d(0xdf));if(_0x3b1c6b)_0x583fe4[_0x38864d(0xed)]=_0x3b1c6b[_0x38864d(0xec)]();const _0x654a09=_0x54350f[_0x38864d(0xdb)](_0x38864d(0xe6));if(_0x654a09)_0x583fe4[_0x38864d(0xe6)]=_0x654a09;const _0x518a6f=_0x54350f['str'](_0x38864d(0xe5));if(_0x518a6f)_0x583fe4[_0x38864d(0xe5)]=_0x518a6f;const _0xec9fd5=_0x54350f[_0x38864d(0xdb)]('dbparam');if(_0xec9fd5)_0x583fe4[_0x38864d(0xd4)]=_0xec9fd5;const _0x4fd6ef=_0x54350f[_0x38864d(0xdb)](_0x38864d(0xf2));if(_0x4fd6ef)_0x583fe4[_0x38864d(0xe1)]=_0x4fd6ef;const {id:_0x4ba894,entity:_0x6f468}=normalizeEntityWithIdResponse(await updateDbLink(_0x583fe4));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x6f468),'message':_0x38864d(0xf5)+(_0x4ba894??_0x1c6f47)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a73_0x2546b3=a73_0x4e0e;function a73_0x4e0e(_0x2d92bd,_0x250ade){_0x2d92bd=_0x2d92bd-0x17a;const _0xe56d33=a73_0xe56d();let _0x4e0e3b=_0xe56d33[_0x2d92bd];return _0x4e0e3b;}(function(_0x38a6ad,_0x5366df){const _0x3c3f1c=a73_0x4e0e,_0x59a5e9=_0x38a6ad();while(!![]){try{const _0xc7e53f=-parseInt(_0x3c3f1c(0x17c))/0x1+parseInt(_0x3c3f1c(0x1bc))/0x2+parseInt(_0x3c3f1c(0x17e))/0x3*(-parseInt(_0x3c3f1c(0x18f))/0x4)+parseInt(_0x3c3f1c(0x1a8))/0x5*(-parseInt(_0x3c3f1c(0x1af))/0x6)+-parseInt(_0x3c3f1c(0x1c4))/0x7+-parseInt(_0x3c3f1c(0x1ba))/0x8*(parseInt(_0x3c3f1c(0x1d0))/0x9)+-parseInt(_0x3c3f1c(0x1d5))/0xa*(-parseInt(_0x3c3f1c(0x195))/0xb);if(_0xc7e53f===_0x5366df)break;else _0x59a5e9['push'](_0x59a5e9['shift']());}catch(_0x484144){_0x59a5e9['push'](_0x59a5e9['shift']());}}}(a73_0xe56d,0xb51bc));import a73_0x56e797 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';function a73_0xe56d(){const _0x112e13=['\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','source','log','1648eAUZLf','\x20\x20Auth','2014196JePtgu','\x20\x20Config\x20JSON','cookie','(default)','message','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','check','2289525gVhoxM','Global','riskLevel','apiDir','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','defaultApp','✓\x20Valid\x20JSON','doctor','\x20\x20Config\x20Files','slice','version','14607CdnWdQ','(default:\x20','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','empty','29439030Livdev','✗\x20Not\x20logged\x20in','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20\x20\x20accessKey:\x20\x20','928314kQyUZd','(none)','1437miAfpp','raw','yellow','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','status','platform','Project','\x20\x20API\x20Endpoints','env','gray','(missing)','locale','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2064gWpTAE','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20runtimeDomain:\x20\x20\x20','repeat','✗\x20Expired','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','11ZWQCEX','value','(not\x20set)','format','missing','green','bold','currentApp','(set,\x20length=','appcode','length','✗\x20Invalid\x20JSON','read','verbose','✓\x20Valid','unknown','arch','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','3070YLaLFH','(set\x20via\x20file,\x20length=','\x20\x20Apps','\x20(default)','red','appCode','keys','13410DDvHOP','apps','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)'];a73_0xe56d=function(){return _0x112e13;};return a73_0xe56d();}import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x55c723){const _0x58cb56=a73_0x4e0e,_0x2db180=GIT_COMMIT!==_0x58cb56(0x1a4)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x58cb56(0x1ce)](0x0,0xa)+')':VERSION,_0x2780d3=buildConfigFromFlags({}),_0x4feee0=getCookie();console['log'](),console['log'](a73_0x56e797['bold'](CLI_BIN_NAME+'\x20doctor')),console['log'](a73_0x56e797[_0x58cb56(0x189)]('─'[_0x58cb56(0x192)](0x32))),console[_0x58cb56(0x1b9)](_0x58cb56(0x1b3)+_0x2db180),console[_0x58cb56(0x1b9)](_0x58cb56(0x18e)+process[_0x58cb56(0x1cf)]),console['log'](_0x58cb56(0x1b5)+process[_0x58cb56(0x185)]+'\x20'+process[_0x58cb56(0x1a5)]),console[_0x58cb56(0x1b9)](),console[_0x58cb56(0x1b9)](a73_0x56e797['bold'](_0x58cb56(0x1cd))),console[_0x58cb56(0x1b9)](a73_0x56e797['gray'](_0x58cb56(0x1d3)[_0x58cb56(0x192)](0x1e)));const _0xac49f5=getGlobalConfigPath(),_0x3f3d29=getProjectConfigPath();console[_0x58cb56(0x1b9)](_0x58cb56(0x1d9)+(_0xac49f5||a73_0x56e797[_0x58cb56(0x189)](_0x58cb56(0x1b6)))),console['log']('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3f3d29||a73_0x56e797[_0x58cb56(0x189)](_0x58cb56(0x1b6)))),console[_0x58cb56(0x1b9)](),console[_0x58cb56(0x1b9)](a73_0x56e797[_0x58cb56(0x19b)](_0x58cb56(0x1bd))),console[_0x58cb56(0x1b9)](a73_0x56e797[_0x58cb56(0x189)](_0x58cb56(0x1d3)['repeat'](0x1e)));const _0xef25d5=(_0x153fb0,_0x20914d)=>{const _0x416734=_0x58cb56;if(!_0x20914d){console[_0x416734(0x1b9)]('\x20\x20'+_0x153fb0[_0x416734(0x182)](0x11)+'\x20'+a73_0x56e797[_0x416734(0x189)](_0x416734(0x1c2)));return;}const _0x16c7e7=inspectCliConfigJsonFile(_0x20914d);if(_0x16c7e7['status']==='ok')console[_0x416734(0x1b9)]('\x20\x20'+_0x153fb0['padEnd'](0x11)+'\x20'+a73_0x56e797[_0x416734(0x19a)](_0x416734(0x1cb)));else{if(_0x16c7e7[_0x416734(0x184)]===_0x416734(0x1d4))console[_0x416734(0x1b9)]('\x20\x20'+_0x153fb0[_0x416734(0x182)](0x11)+'\x20'+a73_0x56e797[_0x416734(0x180)](_0x416734(0x17a)));else _0x16c7e7[_0x416734(0x184)]===_0x416734(0x199)?console[_0x416734(0x1b9)]('\x20\x20'+_0x153fb0['padEnd'](0x11)+'\x20'+a73_0x56e797[_0x416734(0x189)](_0x416734(0x18a))):(console['log']('\x20\x20'+_0x153fb0[_0x416734(0x182)](0x11)+'\x20'+a73_0x56e797['red'](_0x416734(0x1a0))),console[_0x416734(0x1b9)]('\x20\x20'+''[_0x416734(0x182)](0x11)+'\x20'+a73_0x56e797[_0x416734(0x1ac)](_0x16c7e7[_0x416734(0x1c0)])));}};_0xef25d5(_0x58cb56(0x1c5),_0xac49f5),_0xef25d5(_0x58cb56(0x186),_0x3f3d29),console['log'](),console['log'](a73_0x56e797[_0x58cb56(0x19b)](_0x58cb56(0x18d))),console['log'](a73_0x56e797[_0x58cb56(0x189)](_0x58cb56(0x1d3)['repeat'](0x1e))),console[_0x58cb56(0x1b9)](_0x58cb56(0x18c)+(_0x2780d3[_0x58cb56(0x1ad)]||a73_0x56e797['red'](_0x58cb56(0x197)))),console['log'](_0x58cb56(0x1a6)+_0x2780d3['env']),console[_0x58cb56(0x1b9)](_0x58cb56(0x1c8)+_0x2780d3[_0x58cb56(0x18b)]),console['log'](_0x58cb56(0x1b4)+_0x2780d3[_0x58cb56(0x1c7)]),console[_0x58cb56(0x1b9)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x2780d3[_0x58cb56(0x1ca)]||a73_0x56e797[_0x58cb56(0x189)](_0x58cb56(0x17d)))),console[_0x58cb56(0x1b9)](_0x58cb56(0x1c9)+(_0x2780d3[_0x58cb56(0x19c)]||a73_0x56e797[_0x58cb56(0x189)](_0x58cb56(0x17d)))),console['log']('\x20\x20explicitAppName:\x20'+(_0x2780d3['explicitAppName']||a73_0x56e797['gray']('(none)'))),console[_0x58cb56(0x1b9)](_0x58cb56(0x181)+(_0x2780d3[_0x58cb56(0x198)]||a73_0x56e797[_0x58cb56(0x189)](_0x58cb56(0x1d1)+DEFAULT_CONFIG_VALUES[_0x58cb56(0x198)]+')'))),console[_0x58cb56(0x1b9)](_0x58cb56(0x194)+(_0x2780d3['pageSize']??a73_0x56e797[_0x58cb56(0x189)](_0x58cb56(0x1bf)))),console['log'](_0x58cb56(0x1b7)+_0x2780d3[_0x58cb56(0x1c6)]),console['log'](_0x58cb56(0x1d8)+_0x2780d3[_0x58cb56(0x1a2)]),console[_0x58cb56(0x1b9)](_0x58cb56(0x1b2)+(_0x2780d3[_0x58cb56(0x1be)]?a73_0x56e797['green'](_0x58cb56(0x19d)+_0x2780d3[_0x58cb56(0x1be)][_0x58cb56(0x19f)]+')'):_0x4feee0?a73_0x56e797[_0x58cb56(0x19a)](_0x58cb56(0x1a9)+_0x4feee0[_0x58cb56(0x19f)]+')'):a73_0x56e797[_0x58cb56(0x189)](_0x58cb56(0x17d))));const _0x53fab7=Object[_0x58cb56(0x1ae)](_0x2780d3[_0x58cb56(0x1b0)]);if(_0x53fab7[_0x58cb56(0x19f)]>0x0){console[_0x58cb56(0x1b9)](),console[_0x58cb56(0x1b9)](a73_0x56e797[_0x58cb56(0x19b)](_0x58cb56(0x1aa))),console[_0x58cb56(0x1b9)](a73_0x56e797['gray']('\x20\x20─'['repeat'](0x1e)));for(const _0xc77cf4 of _0x53fab7){const _0x6cf949=_0x2780d3['apps'][_0xc77cf4],_0x3a5dfd=_0xc77cf4===_0x2780d3[_0x58cb56(0x1ca)],_0xe84626=_0xc77cf4===_0x2780d3[_0x58cb56(0x19c)],_0x1ba5ee=_0xe84626?a73_0x56e797[_0x58cb56(0x19a)]('\x20←\x20current'):'',_0x46bbac=_0x3a5dfd?_0x58cb56(0x1ab):'';console['log']('\x20\x20'+_0xc77cf4+_0x46bbac+_0x1ba5ee),console[_0x58cb56(0x1b9)](_0x58cb56(0x183)+_0x6cf949[_0x58cb56(0x19e)]);const _0x4f5b34=buildAppDoctorFields(_0x6cf949,{'env':_0x2780d3['env'],'apiDir':_0x2780d3[_0x58cb56(0x17f)]['apiDir']||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x2780d3[_0x58cb56(0x1be)]||_0x4feee0||undefined,'accessKey':_0x2780d3['accessKey']});console['log'](_0x58cb56(0x1d2)+_0x4f5b34[_0x58cb56(0x188)][_0x58cb56(0x196)]+'\x20\x20'+a73_0x56e797[_0x58cb56(0x189)]('('+_0x4f5b34['env']['source']+')')),console[_0x58cb56(0x1b9)](_0x58cb56(0x1da)+_0x4f5b34[_0x58cb56(0x1c7)]['value']+'\x20\x20'+a73_0x56e797[_0x58cb56(0x189)]('('+_0x4f5b34[_0x58cb56(0x1c7)][_0x58cb56(0x1b8)]+')'));const _0xc90cef=_0x4f5b34[_0x58cb56(0x1be)][_0x58cb56(0x196)]?a73_0x56e797[_0x58cb56(0x19a)](_0x58cb56(0x19d)+_0x4f5b34['cookie']['value'][_0x58cb56(0x19f)]+')'):a73_0x56e797[_0x58cb56(0x189)](_0x58cb56(0x17d));console[_0x58cb56(0x1b9)]('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0xc90cef+'\x20\x20'+a73_0x56e797[_0x58cb56(0x189)]('('+_0x4f5b34[_0x58cb56(0x1be)]['source']+')'));const _0xaa81=_0x4f5b34[_0x58cb56(0x1a7)][_0x58cb56(0x196)]?a73_0x56e797[_0x58cb56(0x19a)](_0x58cb56(0x19d)+_0x4f5b34[_0x58cb56(0x1a7)][_0x58cb56(0x196)][_0x58cb56(0x19f)]+')'):a73_0x56e797[_0x58cb56(0x189)]('(none)');console['log'](_0x58cb56(0x17b)+_0xaa81+'\x20\x20'+a73_0x56e797[_0x58cb56(0x189)]('('+_0x4f5b34[_0x58cb56(0x1a7)][_0x58cb56(0x1b8)]+')'));}}console['log'](),console[_0x58cb56(0x1b9)](a73_0x56e797[_0x58cb56(0x19b)](_0x58cb56(0x187))),console[_0x58cb56(0x1b9)](a73_0x56e797[_0x58cb56(0x189)]('\x20\x20─'[_0x58cb56(0x192)](0x1e))),console['log'](_0x58cb56(0x1d7)+getApiDomain()),console[_0x58cb56(0x1b9)](_0x58cb56(0x1b1)+getUserDomain()),console['log'](_0x58cb56(0x191)+getRuntimeDomain()),console[_0x58cb56(0x1b9)](),console['log'](a73_0x56e797[_0x58cb56(0x19b)](_0x58cb56(0x1bb))),console[_0x58cb56(0x1b9)](a73_0x56e797[_0x58cb56(0x189)](_0x58cb56(0x1d3)[_0x58cb56(0x192)](0x1e)));if(_0x4feee0){const _0xe6433c=await getIsSessionValid();console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0xe6433c?a73_0x56e797['green'](_0x58cb56(0x1a3)):a73_0x56e797['red'](_0x58cb56(0x193))));}else console[_0x58cb56(0x1b9)](_0x58cb56(0x1c1)+a73_0x56e797[_0x58cb56(0x1ac)](_0x58cb56(0x1d6)));return console[_0x58cb56(0x1b9)](),{'ok':!![]};}export const doctorDefinition={'service':a73_0x2546b3(0x1cc),'command':a73_0x2546b3(0x1c3),'description':a73_0x2546b3(0x190),'risk':a73_0x2546b3(0x1a1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a74_0x39d661=a74_0x188a;function a74_0xb4ac(){const _0x4e2ed4=['\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','appCode','source','pageSize','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','✓\x20Valid','\x20\x20Config\x20JSON','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','green','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','852606ZmfLnq','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','1604584YoyzTG','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','slice','(not\x20set)','repeat','(not\x20found)','cookie','format','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','6574woWcaj','\x20\x20\x20\x20accessKey:\x20\x20','(none)','platform','verbose','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20doctor','✗\x20Invalid\x20JSON','doctor','16QNUuep','length','env','✓\x20Valid\x20JSON','unknown','value','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1701300PpiPUc','log','\x20(default)','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','(default)','\x20\x20API\x20Endpoints','(set,\x20length=','read','appcode','⚠\x20Empty\x20(treated\x20as\x20{})','empty','18RaLKFi','\x20\x20Merged\x20Config','\x20\x20Apps','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','gray','riskLevel','\x20←\x20current','explicitAppName','1660lOJxPN','(set\x20via\x20file,\x20length=','\x20\x20─','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','currentApp','red','status','Project','yellow','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','missing','message','apiDir','Global','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','accessKey','keys','defaultApp','bold','\x20\x20Config\x20Files','7691230lAiqEy','3251724xhPvsn','(no\x20file)','check','4386eswBoV'];a74_0xb4ac=function(){return _0x4e2ed4;};return a74_0xb4ac();}(function(_0x14518b,_0x3612ed){const _0x5d2ce3=a74_0x188a,_0x1c1858=_0x14518b();while(!![]){try{const _0x52f77b=parseInt(_0x5d2ce3(0xc3))/0x1*(parseInt(_0x5d2ce3(0xba))/0x2)+-parseInt(_0x5d2ce3(0xad))/0x3+-parseInt(_0x5d2ce3(0xca))/0x4+parseInt(_0x5d2ce3(0xdd))/0x5*(parseInt(_0x5d2ce3(0xa0))/0x6)+-parseInt(_0x5d2ce3(0x9d))/0x7+parseInt(_0x5d2ce3(0xb0))/0x8*(parseInt(_0x5d2ce3(0xd5))/0x9)+parseInt(_0x5d2ce3(0x9c))/0xa;if(_0x52f77b===_0x3612ed)break;else _0x1c1858['push'](_0x1c1858['shift']());}catch(_0x14eba2){_0x1c1858['push'](_0x1c1858['shift']());}}}(a74_0xb4ac,0x472a6));import a74_0x200d79 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x56e7e5){const _0x4553fc=a74_0x188a,_0x3eebf3=GIT_COMMIT!==_0x4553fc(0xc7)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4553fc(0xb3)](0x0,0xa)+')':VERSION,_0x2c8abf=buildConfigFromFlags({}),_0x3be4a6=getCookie();console[_0x4553fc(0xcb)](),console['log'](a74_0x200d79[_0x4553fc(0x9a)](CLI_BIN_NAME+_0x4553fc(0xc0))),console['log'](a74_0x200d79[_0x4553fc(0xd9)]('─'[_0x4553fc(0xb5)](0x32))),console['log']('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x3eebf3),console[_0x4553fc(0xcb)](_0x4553fc(0x95)+process['version']),console[_0x4553fc(0xcb)](_0x4553fc(0xaf)+process[_0x4553fc(0xbd)]+'\x20'+process['arch']),console[_0x4553fc(0xcb)](),console[_0x4553fc(0xcb)](a74_0x200d79[_0x4553fc(0x9a)](_0x4553fc(0x9b))),console[_0x4553fc(0xcb)](a74_0x200d79[_0x4553fc(0xd9)]('\x20\x20─'['repeat'](0x1e)));const _0x1d933c=getGlobalConfigPath(),_0x459c08=getProjectConfigPath();console[_0x4553fc(0xcb)](_0x4553fc(0xb1)+(_0x1d933c||a74_0x200d79[_0x4553fc(0xd9)](_0x4553fc(0xb6)))),console[_0x4553fc(0xcb)](_0x4553fc(0xbf)+(_0x459c08||a74_0x200d79[_0x4553fc(0xd9)](_0x4553fc(0xb6)))),console[_0x4553fc(0xcb)](),console['log'](a74_0x200d79['bold'](_0x4553fc(0xa9))),console[_0x4553fc(0xcb)](a74_0x200d79['gray'](_0x4553fc(0xdf)[_0x4553fc(0xb5)](0x1e)));const _0x2bc803=(_0x10f305,_0x5df776)=>{const _0x14781d=_0x4553fc;if(!_0x5df776){console[_0x14781d(0xcb)]('\x20\x20'+_0x10f305[_0x14781d(0xa2)](0x11)+'\x20'+a74_0x200d79[_0x14781d(0xd9)](_0x14781d(0x9e)));return;}const _0x504195=inspectCliConfigJsonFile(_0x5df776);if(_0x504195[_0x14781d(0xe3)]==='ok')console[_0x14781d(0xcb)]('\x20\x20'+_0x10f305['padEnd'](0x11)+'\x20'+a74_0x200d79[_0x14781d(0xab)](_0x14781d(0xc6)));else{if(_0x504195['status']===_0x14781d(0xd4))console[_0x14781d(0xcb)]('\x20\x20'+_0x10f305[_0x14781d(0xa2)](0x11)+'\x20'+a74_0x200d79[_0x14781d(0xe5)](_0x14781d(0xd3)));else _0x504195[_0x14781d(0xe3)]===_0x14781d(0xe8)?console[_0x14781d(0xcb)]('\x20\x20'+_0x10f305['padEnd'](0x11)+'\x20'+a74_0x200d79[_0x14781d(0xd9)]('(missing)')):(console[_0x14781d(0xcb)]('\x20\x20'+_0x10f305[_0x14781d(0xa2)](0x11)+'\x20'+a74_0x200d79[_0x14781d(0xe2)](_0x14781d(0xc1))),console['log']('\x20\x20'+''[_0x14781d(0xa2)](0x11)+'\x20'+a74_0x200d79['red'](_0x504195[_0x14781d(0xe9)])));}};_0x2bc803(_0x4553fc(0x94),_0x1d933c),_0x2bc803(_0x4553fc(0xe4),_0x459c08),console[_0x4553fc(0xcb)](),console[_0x4553fc(0xcb)](a74_0x200d79['bold'](_0x4553fc(0xd6))),console[_0x4553fc(0xcb)](a74_0x200d79[_0x4553fc(0xd9)](_0x4553fc(0xdf)[_0x4553fc(0xb5)](0x1e))),console[_0x4553fc(0xcb)](_0x4553fc(0xb9)+(_0x2c8abf[_0x4553fc(0xa3)]||a74_0x200d79['red'](_0x4553fc(0xb4)))),console[_0x4553fc(0xcb)](_0x4553fc(0xc9)+_0x2c8abf[_0x4553fc(0xc5)]),console['log'](_0x4553fc(0xa6)+_0x2c8abf['locale']),console['log'](_0x4553fc(0xa1)+_0x2c8abf[_0x4553fc(0xea)]),console[_0x4553fc(0xcb)](_0x4553fc(0xae)+(_0x2c8abf[_0x4553fc(0x99)]||a74_0x200d79[_0x4553fc(0xd9)](_0x4553fc(0xbc)))),console[_0x4553fc(0xcb)](_0x4553fc(0xe0)+(_0x2c8abf[_0x4553fc(0xe1)]||a74_0x200d79[_0x4553fc(0xd9)]('(none)'))),console['log']('\x20\x20explicitAppName:\x20'+(_0x2c8abf[_0x4553fc(0xdc)]||a74_0x200d79[_0x4553fc(0xd9)]('(none)'))),console[_0x4553fc(0xcb)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2c8abf[_0x4553fc(0xb8)]||a74_0x200d79[_0x4553fc(0xd9)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x4553fc(0xb8)]+')'))),console['log'](_0x4553fc(0xd8)+(_0x2c8abf[_0x4553fc(0xa5)]??a74_0x200d79[_0x4553fc(0xd9)](_0x4553fc(0xce)))),console[_0x4553fc(0xcb)](_0x4553fc(0xac)+_0x2c8abf[_0x4553fc(0xda)]),console[_0x4553fc(0xcb)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2c8abf[_0x4553fc(0xbe)]),console[_0x4553fc(0xcb)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2c8abf[_0x4553fc(0xb7)]?a74_0x200d79[_0x4553fc(0xab)](_0x4553fc(0xd0)+_0x2c8abf[_0x4553fc(0xb7)][_0x4553fc(0xc4)]+')'):_0x3be4a6?a74_0x200d79[_0x4553fc(0xab)](_0x4553fc(0xde)+_0x3be4a6['length']+')'):a74_0x200d79['gray']('(none)')));const _0xac3bf4=Object[_0x4553fc(0x98)](_0x2c8abf['apps']);if(_0xac3bf4['length']>0x0){console[_0x4553fc(0xcb)](),console[_0x4553fc(0xcb)](a74_0x200d79['bold'](_0x4553fc(0xd7))),console[_0x4553fc(0xcb)](a74_0x200d79['gray']('\x20\x20─'['repeat'](0x1e)));for(const _0x413826 of _0xac3bf4){const _0x2ba7a0=_0x2c8abf['apps'][_0x413826],_0x47c7cb=_0x413826===_0x2c8abf[_0x4553fc(0x99)],_0x377ac6=_0x413826===_0x2c8abf[_0x4553fc(0xe1)],_0x27a9aa=_0x377ac6?a74_0x200d79[_0x4553fc(0xab)](_0x4553fc(0xdb)):'',_0x4bbdff=_0x47c7cb?_0x4553fc(0xcc):'';console['log']('\x20\x20'+_0x413826+_0x4bbdff+_0x27a9aa),console[_0x4553fc(0xcb)](_0x4553fc(0xe7)+_0x2ba7a0[_0x4553fc(0xd2)]);const _0x84b768=buildAppDoctorFields(_0x2ba7a0,{'env':_0x2c8abf[_0x4553fc(0xc5)],'apiDir':_0x2c8abf['raw']['apiDir']||DEFAULT_CONFIG_VALUES[_0x4553fc(0xea)],'cookie':_0x2c8abf[_0x4553fc(0xb7)]||_0x3be4a6||undefined,'accessKey':_0x2c8abf['accessKey']});console[_0x4553fc(0xcb)](_0x4553fc(0xaa)+_0x84b768[_0x4553fc(0xc5)][_0x4553fc(0xc8)]+'\x20\x20'+a74_0x200d79[_0x4553fc(0xd9)]('('+_0x84b768[_0x4553fc(0xc5)][_0x4553fc(0xa4)]+')')),console[_0x4553fc(0xcb)](_0x4553fc(0xa7)+_0x84b768[_0x4553fc(0xea)][_0x4553fc(0xc8)]+'\x20\x20'+a74_0x200d79[_0x4553fc(0xd9)]('('+_0x84b768[_0x4553fc(0xea)][_0x4553fc(0xa4)]+')'));const _0x35be81=_0x84b768[_0x4553fc(0xb7)][_0x4553fc(0xc8)]?a74_0x200d79[_0x4553fc(0xab)](_0x4553fc(0xd0)+_0x84b768[_0x4553fc(0xb7)][_0x4553fc(0xc8)][_0x4553fc(0xc4)]+')'):a74_0x200d79[_0x4553fc(0xd9)](_0x4553fc(0xbc));console[_0x4553fc(0xcb)](_0x4553fc(0xe6)+_0x35be81+'\x20\x20'+a74_0x200d79[_0x4553fc(0xd9)]('('+_0x84b768[_0x4553fc(0xb7)][_0x4553fc(0xa4)]+')'));const _0x3748e2=_0x84b768[_0x4553fc(0x97)][_0x4553fc(0xc8)]?a74_0x200d79[_0x4553fc(0xab)](_0x4553fc(0xd0)+_0x84b768[_0x4553fc(0x97)][_0x4553fc(0xc8)][_0x4553fc(0xc4)]+')'):a74_0x200d79[_0x4553fc(0xd9)](_0x4553fc(0xbc));console['log'](_0x4553fc(0xbb)+_0x3748e2+'\x20\x20'+a74_0x200d79['gray']('('+_0x84b768['accessKey'][_0x4553fc(0xa4)]+')'));}}console[_0x4553fc(0xcb)](),console['log'](a74_0x200d79[_0x4553fc(0x9a)](_0x4553fc(0xcf))),console[_0x4553fc(0xcb)](a74_0x200d79['gray']('\x20\x20─'[_0x4553fc(0xb5)](0x1e))),console[_0x4553fc(0xcb)](_0x4553fc(0x96)+getApiDomain()),console[_0x4553fc(0xcb)](_0x4553fc(0xb2)+getUserDomain()),console[_0x4553fc(0xcb)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x4553fc(0xcb)](),console[_0x4553fc(0xcb)](a74_0x200d79['bold']('\x20\x20Auth')),console['log'](a74_0x200d79['gray'](_0x4553fc(0xdf)[_0x4553fc(0xb5)](0x1e)));if(_0x3be4a6){const _0x1631ef=await getIsSessionValid();console[_0x4553fc(0xcb)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1631ef?a74_0x200d79[_0x4553fc(0xab)](_0x4553fc(0xa8)):a74_0x200d79['red']('✗\x20Expired')));}else console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a74_0x200d79[_0x4553fc(0xe2)]('✗\x20Not\x20logged\x20in'));return console[_0x4553fc(0xcb)](),{'ok':!![]};}function a74_0x188a(_0x5dd38c,_0x3386d7){_0x5dd38c=_0x5dd38c-0x94;const _0xb4aca1=a74_0xb4ac();let _0x188a6d=_0xb4aca1[_0x5dd38c];return _0x188a6d;}export const doctorDefinition={'service':a74_0x39d661(0xc2),'command':a74_0x39d661(0x9f),'description':a74_0x39d661(0xcd),'risk':a74_0x39d661(0xd1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a75_0x327edc=a75_0xf89e;(function(_0x1bf73e,_0x10656d){const _0x275cba=a75_0xf89e,_0x1bb291=_0x1bf73e();while(!![]){try{const _0x1cead1=parseInt(_0x275cba(0x1dc))/0x1*(parseInt(_0x275cba(0x1ef))/0x2)+-parseInt(_0x275cba(0x1d4))/0x3+-parseInt(_0x275cba(0x1f9))/0x4+-parseInt(_0x275cba(0x1dd))/0x5+-parseInt(_0x275cba(0x1fb))/0x6+parseInt(_0x275cba(0x1d6))/0x7*(-parseInt(_0x275cba(0x1eb))/0x8)+parseInt(_0x275cba(0x1f8))/0x9*(parseInt(_0x275cba(0x1ed))/0xa);if(_0x1cead1===_0x10656d)break;else _0x1bb291['push'](_0x1bb291['shift']());}catch(_0x24645e){_0x1bb291['push'](_0x1bb291['shift']());}}}(a75_0x5f36,0x4f16f));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';function a75_0x5f36(){const _0x5665b3=['boolean','149174ruLyDL','log','appCode','yes','write','run','valid','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','20139183AKPJca','2258904zPcdbt','bool','814590YHIpLD','\x0a✓\x20Successfully\x20initialized\x20','production','1497144HCNPEK','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','261177oHtUPg','env','map','defaultApp','appcode','global','1HvSstp','3011145bZmHFk','Target\x20environment','\x20\x20Config:\x20','\x20\x20Apps:\x20','nonInteractive','custom','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','join','App\x20code\x20to\x20initialize\x20with','string','检测到旧配置文件,正在自动升级...\x0a','init','project','str','40LhmaFH','\x20\x20Default:\x20','10zittzI'];a75_0x5f36=function(){return _0x5665b3;};return a75_0x5f36();}import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a75_0xf89e(_0x2a053a,_0x46c7a9){_0x2a053a=_0x2a053a-0x1d2;const _0x5f3664=a75_0x5f36();let _0xf89eb1=_0x5f3664[_0x2a053a];return _0xf89eb1;}function syntheticApp(_0x3255f8){return{'appCode':_0x3255f8,'appName':_0x3255f8};}function writeInitConfig(_0x4f2ff2,_0x4451df,_0x32b755){const _0x13ffd2=a75_0xf89e,_0x42d4b7=resolveWriteConfigPath(_0x4f2ff2),_0x2bfdc3=buildCanonicalProjectConfig({},{'appCodes':_0x4451df[_0x13ffd2(0x1d8)](_0x5e515e=>_0x5e515e[_0x13ffd2(0x1f1)]),'env':_0x32b755,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x42d4b7,_0x2bfdc3);const _0xf42dfe=_0x4f2ff2===_0x13ffd2(0x1db)?_0x13ffd2(0x1db):_0x13ffd2(0x1e9);console['log'](_0x13ffd2(0x1d2)+_0xf42dfe+'\x20config'),console[_0x13ffd2(0x1f0)](_0x13ffd2(0x1e0)+_0x4451df[_0x13ffd2(0x1d8)](_0x450126=>_0x450126[_0x13ffd2(0x1f1)])[_0x13ffd2(0x1e4)](',\x20')),console[_0x13ffd2(0x1f0)](_0x13ffd2(0x1ec)+_0x2bfdc3[_0x13ffd2(0x1d9)]),console[_0x13ffd2(0x1f0)]('\x20\x20Env:\x20'+_0x2bfdc3[_0x13ffd2(0x1d7)]),console[_0x13ffd2(0x1f0)](_0x13ffd2(0x1df)+_0x42d4b7);}async function runSmartInit(_0x3931e4){const _0x2b12ef=a75_0xf89e,_0x21be50=process['cwd'](),_0x5534eb=_0x3931e4[_0x2b12ef(0x1fa)](_0x2b12ef(0x1db))?'global':'project',_0x9d1956=_0x3931e4[_0x2b12ef(0x1ea)](_0x2b12ef(0x1d7))||_0x2b12ef(0x1d3),_0x551d09=_0x3931e4[_0x2b12ef(0x1ea)](_0x2b12ef(0x1da))||undefined,_0x488c98=_0x3931e4[_0x2b12ef(0x1fa)](_0x2b12ef(0x1e9));if(_0x488c98){const {initConfig:_0x352ce1}=await import('../../commands/project/init.js');return _0x352ce1({'appcode':_0x551d09,'env':_0x9d1956,'autoYes':_0x3931e4[_0x2b12ef(0x1fa)](_0x2b12ef(0x1f2))});}if(_0x5534eb===_0x2b12ef(0x1e9)){const _0x302270=existsSync(resolve(_0x21be50,NEW_CONFIG_NAME)),_0x299fff=LEGACY_CONFIG_NAMES['some'](_0xe83621=>existsSync(resolve(_0x21be50,_0xe83621)));if(_0x299fff&&!_0x302270)return console['log'](_0x2b12ef(0x1e7)),upgradeApp(_0x3931e4['nonInteractive'],{'yes':_0x3931e4[_0x2b12ef(0x1fa)](_0x2b12ef(0x1f2))});if(_0x302270)throw CliErrors['validation'](_0x2b12ef(0x1f6),'Use\x20`'+CLI_BIN_NAME+_0x2b12ef(0x1f7));}if(_0x551d09){const _0xd6f61=validateAppcode(_0x551d09);if(!_0xd6f61[_0x2b12ef(0x1f5)])throw CliErrors['validation'](_0xd6f61['message']);writeInitConfig(_0x5534eb,[syntheticApp(_0x551d09)],_0x9d1956);return;}if(_0x3931e4[_0x2b12ef(0x1e1)])throw CliErrors['flagMissing']('appcode','Usage:\x20'+CLI_BIN_NAME+_0x2b12ef(0x1e3));const _0x6a354d=getCookie(),_0x8da4ce=await selectMultipleApps(_0x6a354d),_0x36d56b=_0x8da4ce===_0x2b12ef(0x1e2)?[syntheticApp(await promptCustomAppcode())]:_0x8da4ce;writeInitConfig(_0x5534eb,_0x36d56b,_0x9d1956);}const initFlags=[{'name':a75_0x327edc(0x1db),'type':a75_0x327edc(0x1ee),'description':'Write\x20to\x20global\x20config\x20instead\x20of\x20project','default':![]},{'name':a75_0x327edc(0x1d7),'type':'string','description':a75_0x327edc(0x1de),'default':'production','enum':[...RABETBASE_ENV_VALUES]},{'name':a75_0x327edc(0x1da),'type':a75_0x327edc(0x1e6),'description':a75_0x327edc(0x1e5)},{'name':a75_0x327edc(0x1e9),'type':a75_0x327edc(0x1ee),'description':'Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','default':![]},{'name':a75_0x327edc(0x1f2),'type':'boolean','description':'Auto-confirm\x20prompts','default':![]}];export const initDefinitions=[{'service':a75_0x327edc(0x1e8),'command':a75_0x327edc(0x1f4),'description':a75_0x327edc(0x1d5),'risk':a75_0x327edc(0x1f3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x345c9b){return await runSmartInit(_0x345c9b),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a76_0x5d2d(){const _0x13e97b=['1055380hIFFCM','353239MwImcU','952505SDpLaA','90wTTHPK','937824KawjXP','367012UfFbgg','1350vfURsA','570552bdlCjB','5838DdXgsW'];a76_0x5d2d=function(){return _0x13e97b;};return a76_0x5d2d();}function a76_0xbb1c(_0x51401d,_0x4980ef){_0x51401d=_0x51401d-0x11d;const _0x5d2de3=a76_0x5d2d();let _0xbb1c4b=_0x5d2de3[_0x51401d];return _0xbb1c4b;}(function(_0x5a350e,_0x739eaa){const _0x1fedc0=a76_0xbb1c,_0x3f7384=_0x5a350e();while(!![]){try{const _0x2a2f2b=-parseInt(_0x1fedc0(0x125))/0x1+-parseInt(_0x1fedc0(0x120))/0x2+-parseInt(_0x1fedc0(0x122))/0x3+-parseInt(_0x1fedc0(0x124))/0x4+-parseInt(_0x1fedc0(0x11d))/0x5+-parseInt(_0x1fedc0(0x121))/0x6*(-parseInt(_0x1fedc0(0x123))/0x7)+-parseInt(_0x1fedc0(0x11f))/0x8*(-parseInt(_0x1fedc0(0x11e))/0x9);if(_0x2a2f2b===_0x739eaa)break;else _0x3f7384['push'](_0x3f7384['shift']());}catch(_0x425bff){_0x3f7384['push'](_0x3f7384['shift']());}}}(a76_0x5d2d,0x2b9df));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a77_0x51ed(){const _0xb8a3f=['utf8','9259446UWQBNH','otel://','13011jtLcTV','str','filter','description-file','inline','2EmhsaE','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','file','title','message','3936210KyKWPC','520bfRLOC','3107480JIrygx','report','Issue\x20description\x20file\x20is\x20empty:\x20','cwd','Platform\x20issue\x20reported','204337KfRyKI','apiError','88FtaRYT','descriptionSource','File\x20not\x20found:\x20','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','713311VEJkLT','issue.title','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','Failed\x20to\x20report\x20platform\x20issue:\x20','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','POST','description','One-line\x20issue\x20summary','280uLFARx','compress','1592406mMdCcd','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','Issue\x20description\x20cannot\x20be\x20empty.','flagMissing','write','length','descriptionFile:\x20','validation','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','string','descriptionFilePath','join','trim'];a77_0x51ed=function(){return _0xb8a3f;};return a77_0x51ed();}const a77_0x528748=a77_0x3616;(function(_0x4afae2,_0x3f1bad){const _0x2e4bab=a77_0x3616,_0x2a2f99=_0x4afae2();while(!![]){try{const _0x45e775=-parseInt(_0x2e4bab(0x1ae))/0x1*(-parseInt(_0x2e4bab(0x19c))/0x2)+parseInt(_0x2e4bab(0x197))/0x3*(-parseInt(_0x2e4bab(0x1a2))/0x4)+parseInt(_0x2e4bab(0x1a1))/0x5+parseInt(_0x2e4bab(0x195))/0x6+parseInt(_0x2e4bab(0x1a8))/0x7*(parseInt(_0x2e4bab(0x1b6))/0x8)+-parseInt(_0x2e4bab(0x1b8))/0x9+parseInt(_0x2e4bab(0x1a3))/0xa*(-parseInt(_0x2e4bab(0x1aa))/0xb);if(_0x45e775===_0x3f1bad)break;else _0x2a2f99['push'](_0x2a2f99['shift']());}catch(_0x55dea3){_0x2a2f99['push'](_0x2a2f99['shift']());}}}(a77_0x51ed,0xccc5f));function a77_0x3616(_0x303348,_0x1fbaa9){_0x303348=_0x303348-0x18e;const _0x51ed74=a77_0x51ed();let _0x361674=_0x51ed74[_0x303348];return _0x361674;}import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a77_0x528748(0x19a);export const issueReport={'service':'issue','command':a77_0x528748(0x1a4),'description':a77_0x528748(0x1b9),'risk':a77_0x528748(0x1bc),'requiresAuth':![],'requiresAppCode':![],'defaultOutputFormat':a77_0x528748(0x1b7),'flags':[{'name':a77_0x528748(0x19f),'type':a77_0x528748(0x190),'required':!![],'description':a77_0x528748(0x1b5)},{'name':a77_0x528748(0x1b4),'type':a77_0x528748(0x190),'description':a77_0x528748(0x18f)},{'name':DESCRIPTION_FILE_FLAG,'type':a77_0x528748(0x190),'description':'Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description'}],async 'validate'(_0x381c19){const _0x4515ca=a77_0x528748,_0x2b615d=_0x381c19[_0x4515ca(0x198)]('title')[_0x4515ca(0x193)](),_0x5422c6=_0x381c19[_0x4515ca(0x198)]('description')[_0x4515ca(0x193)](),_0x109749=_0x381c19[_0x4515ca(0x198)](DESCRIPTION_FILE_FLAG)[_0x4515ca(0x193)]();if(!_0x2b615d)throw CliErrors[_0x4515ca(0x1bb)](_0x4515ca(0x19f),'Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0x3270ee=_0x5422c6[_0x4515ca(0x1bd)]>0x0,_0xa78857=_0x109749[_0x4515ca(0x1bd)]>0x0;if(_0x3270ee===_0xa78857)throw CliErrors[_0x4515ca(0x18e)](_0x4515ca(0x19d),'Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0xa78857){const _0x1145fd=resolve(process[_0x4515ca(0x1a6)](),_0x109749);if(!existsSync(_0x1145fd))throw CliErrors[_0x4515ca(0x18e)](_0x4515ca(0x1ac)+_0x1145fd);}},async 'dryRun'(_0x193772){const _0x36ce7c=a77_0x528748,_0x4d02d9=await prepareIssueReport(_0x193772);return{'method':_0x36ce7c(0x1b3),'url':_0x36ce7c(0x196)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x4d02d9['title'],'issue.description':_0x4d02d9['description']}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','descriptionSource:\x20'+_0x4d02d9[_0x36ce7c(0x1ab)],_0x4d02d9['descriptionFilePath']?_0x36ce7c(0x1be)+_0x4d02d9[_0x36ce7c(0x191)]:null][_0x36ce7c(0x199)](Boolean)[_0x36ce7c(0x192)]('\x0a')};},async 'execute'(_0x2accb4){const _0x5d1673=a77_0x528748,_0xc0ee2a=await prepareIssueReport(_0x2accb4);try{await sendPlatformIssueCollectLog({'title':_0xc0ee2a[_0x5d1673(0x19f)],'description':_0xc0ee2a[_0x5d1673(0x1b4)]});}catch(_0x577b0f){throw CliErrors[_0x5d1673(0x1a9)](_0x5d1673(0x1b1)+(_0x577b0f instanceof Error?_0x577b0f[_0x5d1673(0x1a0)]:String(_0x577b0f)),_0x5d1673(0x1ad));}return{'ok':!![],'message':_0x5d1673(0x1a7),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x5d1673(0x1af),'issue.description'],'issue':{'title':_0xc0ee2a[_0x5d1673(0x19f)],'descriptionLength':_0xc0ee2a[_0x5d1673(0x1b4)][_0x5d1673(0x1bd)],'descriptionSource':_0xc0ee2a[_0x5d1673(0x1ab)],..._0xc0ee2a['descriptionFilePath']?{'descriptionFile':_0xc0ee2a[_0x5d1673(0x191)]}:{}}}};}};async function prepareIssueReport(_0x18ceba){const _0x51404e=a77_0x528748,_0x456729=_0x18ceba[_0x51404e(0x198)](_0x51404e(0x19f))['trim'](),_0x2af09b=_0x18ceba['str'](_0x51404e(0x1b4)),_0x46889e=_0x18ceba[_0x51404e(0x198)](DESCRIPTION_FILE_FLAG)[_0x51404e(0x193)]();if(!_0x46889e){const _0xc47dbe=_0x2af09b;if(!_0xc47dbe[_0x51404e(0x193)]())throw CliErrors['validation'](_0x51404e(0x1ba),_0x51404e(0x1b0));return{'title':_0x456729,'description':_0xc47dbe,'descriptionSource':_0x51404e(0x19b)};}const _0x3712f1=resolve(process[_0x51404e(0x1a6)](),_0x46889e),_0xdd1016=await readFile(_0x3712f1,_0x51404e(0x194));if(!_0xdd1016[_0x51404e(0x193)]())throw CliErrors['validation'](_0x51404e(0x1a5)+_0x3712f1,_0x51404e(0x1b2));return{'title':_0x456729,'description':_0xdd1016,'descriptionSource':_0x51404e(0x19e),'descriptionFilePath':_0x3712f1};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0x46e160=a78_0x40e6;(function(_0x4de53c,_0x367b42){const _0x5d5f94=a78_0x40e6,_0x550348=_0x4de53c();while(!![]){try{const _0x281535=-parseInt(_0x5d5f94(0x9f))/0x1+parseInt(_0x5d5f94(0xb1))/0x2*(-parseInt(_0x5d5f94(0xb8))/0x3)+-parseInt(_0x5d5f94(0x9e))/0x4*(-parseInt(_0x5d5f94(0xb4))/0x5)+parseInt(_0x5d5f94(0xab))/0x6+-parseInt(_0x5d5f94(0xa6))/0x7+-parseInt(_0x5d5f94(0xb6))/0x8+parseInt(_0x5d5f94(0xa0))/0x9;if(_0x281535===_0x367b42)break;else _0x550348['push'](_0x550348['shift']());}catch(_0x17d05e){_0x550348['push'](_0x550348['shift']());}}}(a78_0x14e2,0x4e0b2));function a78_0x40e6(_0xeea17c,_0x268e78){_0xeea17c=_0xeea17c-0x9a;const _0x14e27a=a78_0x14e2();let _0x40e6a0=_0x14e27a[_0xeea17c];return _0x40e6a0;}import{logger}from'../../utils/logger.js';function printLogs(_0x5e97c3){const _0x491a87=a78_0x40e6;if(_0x5e97c3[_0x491a87(0xad)]===0x0){console[_0x491a87(0xa5)](_0x491a87(0xae));return;}console[_0x491a87(0xa5)](_0x491a87(0xaa)),_0x5e97c3[_0x491a87(0xb5)]((_0x27866b,_0x16e1a9)=>{const _0x527961=_0x491a87,_0x38bb6d=new Date(_0x27866b[_0x527961(0xa2)])[_0x527961(0xa7)](_0x527961(0xb3)),_0x2ceb70=_0x27866b[_0x527961(0xa8)]==='success'?'√':_0x27866b[_0x527961(0xa8)]==='error'?'×':_0x27866b[_0x527961(0xa8)]==='warn'?'!':'i';console['log'](_0x16e1a9+0x1+'.\x20'+_0x2ceb70+'\x20['+_0x27866b[_0x527961(0xb7)]+']\x20'+_0x27866b['message']),console['log'](_0x527961(0x9b)+_0x38bb6d),_0x27866b[_0x527961(0x9d)]&&console[_0x527961(0xa5)]('\x20\x20\x20Duration:\x20'+_0x27866b[_0x527961(0x9d)]+'ms'),_0x27866b[_0x527961(0xb0)]&&Object['keys'](_0x27866b['details'])[_0x527961(0xad)]>0x0&&console['log'](_0x527961(0xac)+JSON[_0x527961(0xa1)](_0x27866b[_0x527961(0xb0)],null,0x2)),console[_0x527961(0xa5)]('');});}export const logsDefinitions=[{'service':a78_0x46e160(0x9a),'command':a78_0x46e160(0xaf),'description':a78_0x46e160(0x9c),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1eb39b){const _0x3020cc=a78_0x46e160;return printLogs(logger[_0x3020cc(0xb2)]()),{'ok':!![]};}},{'service':a78_0x46e160(0x9a),'command':'clear','description':a78_0x46e160(0xa9),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x756fb1){const _0x3ee4f5=a78_0x46e160;return logger[_0x3ee4f5(0xa3)](),console[_0x3ee4f5(0xa5)](_0x3ee4f5(0xa4)),{'ok':!![]};}}];function a78_0x14e2(){const _0x332ab9=['en-US','985PdtHzy','forEach','5003768yftKTA','command','102fejvyq','logs','\x20\x20\x20Time:\x20','View\x20command\x20history\x20logs','duration','292KgylCZ','231256sEOaTU','13302243lxbHWL','stringify','timestamp','clearLogs','*\x20Logs\x20cleared','log','3610173ZmkvGI','toLocaleString','level','Clear\x20command\x20history\x20logs','*\x20Lovrabet\x20CLI\x20logs:\x0a','1801572lcDaon','\x20\x20\x20Details:\x20','length','*\x20No\x20logs\x20found','show','details','5914JAmHtS','readLogs'];a78_0x14e2=function(){return _0x332ab9;};return a78_0x14e2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x348f31,_0x213352){const _0x50c543=a79_0x2785,_0x250994=_0x348f31();while(!![]){try{const _0x2696ba=parseInt(_0x50c543(0x144))/0x1*(parseInt(_0x50c543(0x140))/0x2)+parseInt(_0x50c543(0x146))/0x3*(-parseInt(_0x50c543(0x13e))/0x4)+-parseInt(_0x50c543(0x148))/0x5+parseInt(_0x50c543(0x145))/0x6+parseInt(_0x50c543(0x142))/0x7*(-parseInt(_0x50c543(0x141))/0x8)+-parseInt(_0x50c543(0x13f))/0x9*(parseInt(_0x50c543(0x143))/0xa)+parseInt(_0x50c543(0x147))/0xb;if(_0x2696ba===_0x213352)break;else _0x250994['push'](_0x250994['shift']());}catch(_0x42888a){_0x250994['push'](_0x250994['shift']());}}}(a79_0x4b22,0xdd5d2));function a79_0x4b22(){const _0x533092=['11347pFQWQt','610730WOSEAr','1606dpJFMR','9130464vLeWCI','30gKyZFB','19736728GnxOFy','7994080IRGeso','200308wJYRCA','45MiaGJz','578KFDndE','2312SSFHpT'];a79_0x4b22=function(){return _0x533092;};return a79_0x4b22();}function a79_0x2785(_0x25ddee,_0x428a27){_0x25ddee=_0x25ddee-0x13e;const _0x4b2298=a79_0x4b22();let _0x27853f=_0x4b2298[_0x25ddee];return _0x27853f;}import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';export const menuDefinitions=[menuSync,menuUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x46e829,_0x189ef0){const _0x4e5afd=a80_0x4b87,_0x2da76b=_0x46e829();while(!![]){try{const _0x53b9a8=-parseInt(_0x4e5afd(0x1c0))/0x1*(-parseInt(_0x4e5afd(0x1c9))/0x2)+-parseInt(_0x4e5afd(0x1b4))/0x3*(parseInt(_0x4e5afd(0x1ba))/0x4)+parseInt(_0x4e5afd(0x1c7))/0x5+-parseInt(_0x4e5afd(0x1b8))/0x6*(-parseInt(_0x4e5afd(0x1c3))/0x7)+parseInt(_0x4e5afd(0x1bc))/0x8*(-parseInt(_0x4e5afd(0x1cd))/0x9)+-parseInt(_0x4e5afd(0x1b2))/0xa+parseInt(_0x4e5afd(0x1bb))/0xb*(parseInt(_0x4e5afd(0x1c1))/0xc);if(_0x53b9a8===_0x189ef0)break;else _0x2da76b['push'](_0x2da76b['shift']());}catch(_0x2bd571){_0x2da76b['push'](_0x2da76b['shift']());}}}(a80_0x14ad,0x2638d));function strWidth(_0x5b540d){let _0x464954=0x0;for(const _0xd553cb of _0x5b540d){_0x464954+=/[\u4e00-\u9fa5]/['test'](_0xd553cb)?0x2:0x1;}return _0x464954;}function padRight(_0x408c17,_0x5847c7){const _0x39d840=strWidth(_0x408c17);return _0x408c17+'\x20'['repeat'](Math['max'](0x0,_0x5847c7-_0x39d840));}function a80_0x14ad(){const _0x3c9246=['\x20\x20\x20\x20•\x20','join','1388178zyuVks','Local','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','940440PQrKmO','label','18057ExKZaW','(unchanged)','\x20\x20\x20\x20JS:\x20\x20','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','18IOgxGt','max','4bMwNEy','6974UDbUtH','16mulxbI','Platform','push','length','14887EGGMoE','5964hlgtXi','Menu\x20Name','364847PDbbFp','\x20\x20\x20\x20CSS:\x20','map','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','96040rlulUG','repeat','10PumjEd','local'];a80_0x14ad=function(){return _0x3c9246;};return a80_0x14ad();}export function renderCompareTable(_0x4ab871,_0x329f23={}){const _0x2e19d1=a80_0x4b87;if(_0x4ab871[_0x2e19d1(0x1bf)]===0x0)return'';const _0x29d6fc=_0x329f23['showOnline']??!![],_0x31bb42=Math[_0x2e19d1(0x1b9)](0x1e,..._0x4ab871[_0x2e19d1(0x1c5)](_0x125702=>strWidth(_0x125702[_0x2e19d1(0x1b3)]))),_0x1728d7=0x4,_0x56d4a4=[],_0x691460='\x20\x20'+padRight(_0x2e19d1(0x1c2),_0x31bb42),_0x582c43=padRight(_0x2e19d1(0x1ce),_0x1728d7),_0x20e7c0=_0x29d6fc?'\x20\x20'+padRight(_0x2e19d1(0x1bd),_0x1728d7):'';_0x56d4a4['push'](_0x691460+'\x20\x20'+_0x582c43+(_0x29d6fc?_0x20e7c0:'')),_0x56d4a4[_0x2e19d1(0x1be)]('\x20\x20'+'─'[_0x2e19d1(0x1c8)](_0x31bb42)+'\x20\x20'+'─'[_0x2e19d1(0x1c8)](_0x1728d7)+(_0x29d6fc?'\x20\x20'+'─'[_0x2e19d1(0x1c8)](_0x1728d7):''));for(const _0x169730 of _0x4ab871){const _0x3ffec8=padRight(_0x169730[_0x2e19d1(0x1b3)],_0x31bb42),_0x59bd2f=_0x169730[_0x2e19d1(0x1ca)]?'✓':'✗',_0x23d48f=padRight(_0x59bd2f,_0x1728d7);let _0x40f08b='\x20\x20'+_0x3ffec8+'\x20\x20'+_0x23d48f;if(_0x29d6fc){const _0x44aa54=_0x169730['online']?'✓':'✗';_0x40f08b+='\x20\x20'+padRight(_0x44aa54,_0x1728d7);}_0x56d4a4[_0x2e19d1(0x1be)](_0x40f08b);}return _0x56d4a4['join']('\x0a');}function a80_0x4b87(_0x4bf116,_0xade653){_0x4bf116=_0x4bf116-0x1b1;const _0x14adea=a80_0x14ad();let _0x4b8790=_0x14adea[_0x4bf116];return _0x4b8790;}export function renderSyncSummary(_0x3241fa,_0x485b0e){const _0x107866=a80_0x4b87;if(_0x3241fa['length']===0x0)return _0x485b0e?_0x107866(0x1b1):'\x20\x20No\x20pages\x20to\x20sync.';const _0x5bf4c8=['\x20\x20'+_0x3241fa['length']+_0x107866(0x1b7)];for(const _0x3685b8 of _0x3241fa){_0x5bf4c8[_0x107866(0x1be)](_0x107866(0x1cb)+_0x3685b8[_0x107866(0x1b3)]+'\x20('+_0x3685b8['path']+')');}return _0x5bf4c8[_0x107866(0x1cc)]('\x0a');}export function renderUpdateSummary(_0x20ca55,_0xb16a71){const _0x2aa04d=a80_0x4b87;if(_0x20ca55[_0x2aa04d(0x1bf)]===0x0)return'\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.';const _0x133f3d=['\x20\x20'+_0x20ca55['length']+_0x2aa04d(0x1c6),_0x2aa04d(0x1b6)+(_0xb16a71[0x0]??_0x2aa04d(0x1b5)),_0x2aa04d(0x1c4)+(_0xb16a71[0x1]??_0x2aa04d(0x1b5)),'','\x20\x20Affected\x20menus:\x20'+_0x20ca55[_0x2aa04d(0x1cc)](',\x20')];return _0x133f3d[_0x2aa04d(0x1cc)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a81_0x26aa(_0x20e194,_0x3cf3f8){_0x20e194=_0x20e194-0x86;var _0x111807=a81_0x1118();var _0x26aa54=_0x111807[_0x20e194];return _0x26aa54;}(function(_0x3be86b,_0x5186d0){var _0x46f5ef=a81_0x26aa,_0x4bb62e=_0x3be86b();while(!![]){try{var _0x13af4d=parseInt(_0x46f5ef(0x8f))/0x1*(-parseInt(_0x46f5ef(0x8b))/0x2)+parseInt(_0x46f5ef(0x87))/0x3*(-parseInt(_0x46f5ef(0x86))/0x4)+-parseInt(_0x46f5ef(0x8c))/0x5*(parseInt(_0x46f5ef(0x8e))/0x6)+-parseInt(_0x46f5ef(0x91))/0x7*(parseInt(_0x46f5ef(0x8d))/0x8)+parseInt(_0x46f5ef(0x89))/0x9*(parseInt(_0x46f5ef(0x90))/0xa)+-parseInt(_0x46f5ef(0x88))/0xb+parseInt(_0x46f5ef(0x8a))/0xc;if(_0x13af4d===_0x5186d0)break;else _0x4bb62e['push'](_0x4bb62e['shift']());}catch(_0x2036a9){_0x4bb62e['push'](_0x4bb62e['shift']());}}}(a81_0x1118,0xa5238));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';function a81_0x1118(){var _0x19da77=['12651518FxGoxS','9wEvncV','42039588JCpiWk','2AQiECg','10UnAOpX','2717824xcLrUj','2064810nfrSEP','606579yTbwMT','130430poVAaQ','7bKrhAl','220876KPKBVc','3ijHKis'];a81_0x1118=function(){return _0x19da77;};return a81_0x1118();}export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x322ee2,_0x5d8271){const _0x58a0b2=a82_0x1d2e,_0x376ba6=_0x322ee2();while(!![]){try{const _0x207ee3=-parseInt(_0x58a0b2(0x1a9))/0x1+-parseInt(_0x58a0b2(0x1ac))/0x2*(-parseInt(_0x58a0b2(0x1a3))/0x3)+parseInt(_0x58a0b2(0x1b2))/0x4+parseInt(_0x58a0b2(0x1c5))/0x5*(-parseInt(_0x58a0b2(0x1a4))/0x6)+-parseInt(_0x58a0b2(0x19c))/0x7+-parseInt(_0x58a0b2(0x1bb))/0x8+parseInt(_0x58a0b2(0x1c0))/0x9;if(_0x207ee3===_0x5d8271)break;else _0x376ba6['push'](_0x376ba6['shift']());}catch(_0x571546){_0x376ba6['push'](_0x376ba6['shift']());}}}(a82_0x4bc4,0x4fbd5));import a82_0x23c8e4 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a82_0x3693e9 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function a82_0x1d2e(_0x4cd643,_0x324881){_0x4cd643=_0x4cd643-0x19b;const _0x4bc425=a82_0x4bc4();let _0x1d2e28=_0x4bc425[_0x4cd643];return _0x1d2e28;}function onCancel(_0x7e9287){return _0x7e9287['catch'](_0x268128=>{const _0x53de1b=a82_0x1d2e;if(_0x268128?.[_0x53de1b(0x1ba)]==='ExitPromptError')throw CliErrors[_0x53de1b(0x1b6)]('Cancelled.');throw _0x268128;});}export function startSpinner(_0x5f1451){const _0x52b287=a82_0x1d2e;return a82_0x3693e9({'text':_0x5f1451,'color':_0x52b287(0x1b3)})[_0x52b287(0x1bc)]();}function a82_0x4bc4(){const _0x45cbff=['trim','5AdXOcX','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','4164776GPvqGa','path','JS\x20URL\x20check\x20failed','includes','has','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','filter','36705GapSXM','629910eaeQkY','test','\x20\x20JS\x20URL:','map','error','483260qqbqUl','green','No\x20menus\x20selected.','28DgDDPI','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','length','\x20\x20Checking\x20CSS\x20URL\x20reachability...','red','succeed','663040yDheAG','cyan','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','No\x20local\x20pages\x20found.','cancelled','fail','JS\x20URL\x20checked','CSS\x20URL\x20check\x20failed','name','1732816meUpSL','start','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20\x20Checking\x20JS\x20URL\x20reachability...','label','12504402usFvxC','isTTY','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','Cancelled.'];a82_0x4bc4=function(){return _0x45cbff;};return a82_0x4bc4();}export function stopSpinner(_0x19af71,_0x3c1127,_0x1e5df9){const _0x4e04e2=a82_0x1d2e;_0x1e5df9?_0x19af71[_0x4e04e2(0x1b1)](_0x3c1127):_0x19af71[_0x4e04e2(0x1b7)](_0x3c1127);}export async function askConfirm(_0x5b6bde){return onCancel(confirm({'message':_0x5b6bde,'theme':{'prefix':''}}));}export async function askJsUrl(_0x4c94a2){const _0x33aae8=a82_0x1d2e;while(!![]){const _0x505a10=await onCancel(input({'message':_0x33aae8(0x1a6),'default':_0x4c94a2,'theme':{'prefix':''}}));if(_0x505a10[_0x33aae8(0x1c4)]()==='')throw CliErrors[_0x33aae8(0x1b6)](_0x33aae8(0x1c3));if(!/^https:\/\/.+\.js(\?.*)?$/['test'](_0x505a10[_0x33aae8(0x1c4)]())){console[_0x33aae8(0x1a8)](a82_0x23c8e4['red'](_0x33aae8(0x1bd)));continue;}const _0xaa5dbb=startSpinner(_0x33aae8(0x1be));try{const _0x493afe=await isUrlReachable(_0x505a10[_0x33aae8(0x1c4)]());stopSpinner(_0xaa5dbb,_0x33aae8(0x1b8),_0x493afe);if(!_0x493afe){console[_0x33aae8(0x1a8)](a82_0x23c8e4[_0x33aae8(0x1b0)](_0x33aae8(0x1ad)));continue;}return _0x505a10['trim']();}catch(_0x2873f6){stopSpinner(_0xaa5dbb,_0x33aae8(0x19e),![]);throw _0x2873f6;}}}export async function askCssUrl(_0x55d9ff){const _0x306231=a82_0x1d2e;while(!![]){const _0x80bcd2=await onCancel(input({'message':'\x20\x20CSS\x20URL:','default':_0x55d9ff,'theme':{'prefix':''}}));if(_0x80bcd2[_0x306231(0x1c4)]()==='')throw CliErrors[_0x306231(0x1b6)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/[_0x306231(0x1a5)](_0x80bcd2['trim']())){console[_0x306231(0x1a8)](a82_0x23c8e4[_0x306231(0x1b0)](_0x306231(0x1b4)));continue;}const _0x1b30a4=startSpinner(_0x306231(0x1af));try{const _0x3df717=await isUrlReachable(_0x80bcd2[_0x306231(0x1c4)]());stopSpinner(_0x1b30a4,'CSS\x20URL\x20checked',_0x3df717);if(!_0x3df717){console[_0x306231(0x1a8)](a82_0x23c8e4[_0x306231(0x1b0)](_0x306231(0x19b)));continue;}return _0x80bcd2[_0x306231(0x1c4)]();}catch(_0x400b5b){stopSpinner(_0x1b30a4,_0x306231(0x1b9),![]);throw _0x400b5b;}}}export async function selectPages(_0x391111,_0x15a6b4,_0x56c391){const _0xedca17=a82_0x1d2e,_0x55ceaa=_0x391111[_0xedca17(0x1a7)](_0x9aa401=>({'name':_0x9aa401['label']+'\x20\x20'+(_0x15a6b4[_0xedca17(0x1a0)](_0x9aa401[_0xedca17(0x19d)])?a82_0x23c8e4['gray']('[already\x20on\x20platform]'):a82_0x23c8e4[_0xedca17(0x1aa)]('[new]')),'value':_0x9aa401[_0xedca17(0x1bf)],'checked':_0x56c391?_0x56c391[_0xedca17(0x19f)](_0x9aa401[_0xedca17(0x1bf)]):!_0x15a6b4[_0xedca17(0x1a0)](_0x9aa401['path'])}));if(_0x55ceaa[_0xedca17(0x1ae)]===0x0)throw new Error(_0xedca17(0x1b5));const _0x25b543=await onCancel(checkbox({'message':'\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','choices':_0x55ceaa,'loop':![],'theme':{'prefix':''}}));if(_0x25b543[_0xedca17(0x1ae)]===0x0)throw new Error(_0xedca17(0x1ab));return _0x391111[_0xedca17(0x1a2)](_0x1a246e=>_0x25b543[_0xedca17(0x19f)](_0x1a246e['label']));}export function isInteractive(){const _0x2f3109=a82_0x1d2e;return process['stdin'][_0x2f3109(0x1c1)]===!![];}export function requireInteractive(){const _0x3b824c=a82_0x1d2e;if(!isInteractive())throw new Error(_0x3b824c(0x1a1)+_0x3b824c(0x1c2));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a83_0x5ed3(){const _0x509604=['2701032oSvRfS','1051368UuBxkw','path','split','2032266wmDZRV','filter','push','match','trim','replaceAll','1195500FrDRjL','concat','18IjpUoy','utf-8','1321871kpQLmw','isDirectory','replace','4968555AVvwuY','endsWith','14415976ydclBD','.tsx','src/pages','slice','forEach','7OkrPnX'];a83_0x5ed3=function(){return _0x509604;};return a83_0x5ed3();}const a83_0x206af8=a83_0x39e6;(function(_0x482934,_0x54d7d0){const _0x2e8371=a83_0x39e6,_0x5385da=_0x482934();while(!![]){try{const _0x5be053=parseInt(_0x2e8371(0xd7))/0x1+parseInt(_0x2e8371(0xe3))/0x2+parseInt(_0x2e8371(0xe6))/0x3+parseInt(_0x2e8371(0xe2))/0x4+parseInt(_0x2e8371(0xda))/0x5+parseInt(_0x2e8371(0xd3))/0x6*(parseInt(_0x2e8371(0xe1))/0x7)+-parseInt(_0x2e8371(0xdc))/0x8*(parseInt(_0x2e8371(0xd5))/0x9);if(_0x5be053===_0x54d7d0)break;else _0x5385da['push'](_0x5385da['shift']());}catch(_0x4805b2){_0x5385da['push'](_0x5385da['shift']());}}}(a83_0x5ed3,0xc0ad2));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process['cwd'](),a83_0x206af8(0xde));export function extractTitleFromComment(_0x559a5e){const _0x5b7585=a83_0x206af8;try{const _0x3ce66c=readFileSync(_0x559a5e,_0x5b7585(0xd6)),_0x1c888f=_0x3ce66c[_0x5b7585(0xe9)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x1c888f&&_0x1c888f[0x1]){const _0x532fc8=_0x1c888f[0x1],_0x194e91=_0x532fc8[_0x5b7585(0xe9)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x194e91&&_0x194e91[0x1])return _0x194e91[0x1][_0x5b7585(0xd1)]();}let _0x50650e=null;const _0x280aad=_0x3ce66c['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x280aad&&_0x280aad[0x1]&&(_0x50650e=_0x280aad[0x1]);if(!_0x50650e){const _0x478fb6=_0x3ce66c[_0x5b7585(0xe9)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x478fb6&&_0x478fb6[0x1]&&(_0x50650e=_0x478fb6[0x1]);}if(_0x50650e){const _0x3738f2=new RegExp('\x5cb'+_0x50650e+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0xd3c84b=_0x3ce66c[_0x5b7585(0xe9)](_0x3738f2);if(_0xd3c84b&&_0xd3c84b[0x1])return _0xd3c84b[0x1];return _0x50650e;}return null;}catch(_0x17f4c3){return null;}}function a83_0x39e6(_0x224fd4,_0x1b4283){_0x224fd4=_0x224fd4-0xd1;const _0x5ed347=a83_0x5ed3();let _0x39e65d=_0x5ed347[_0x224fd4];return _0x39e65d;}export function getLocalPages(_0x53e89c=pagesDir,_0x13afc2=pagesDir){const _0x5e9012=a83_0x206af8;let _0x1dfc44=[];const _0x3e0e6f=readdirSync(_0x53e89c);return _0x3e0e6f[_0x5e9012(0xe0)](_0x1a2852=>{const _0x373cf0=_0x5e9012,_0x5d46c1=join(_0x53e89c,_0x1a2852),_0x543ecd=statSync(_0x5d46c1);if(_0x543ecd&&_0x543ecd[_0x373cf0(0xd8)]())_0x1dfc44=_0x1dfc44[_0x373cf0(0xd4)](getLocalPages(_0x5d46c1,_0x13afc2));else{if(_0x1a2852['endsWith'](_0x373cf0(0xdd))){let _0x397487=relative(_0x13afc2,_0x5d46c1);_0x397487[_0x373cf0(0xdb)]('index.tsx')?_0x397487=_0x397487['replace'](/index\.tsx$/,''):_0x397487=_0x397487[_0x373cf0(0xd9)](/\.tsx$/,'');_0x397487[_0x373cf0(0xdb)](sep)&&(_0x397487=_0x397487[_0x373cf0(0xdf)](0x0,-0x1));const _0x1bf335=_0x397487[_0x373cf0(0xe5)](sep)['join']('/'),_0x56c477=extractTitleFromComment(_0x5d46c1),_0x3ed4eb=_0x56c477||_0x1bf335;_0x1dfc44[_0x373cf0(0xe8)]({'path':_0x1bf335[_0x373cf0(0xd2)]('$',':'),'label':_0x3ed4eb});}}}),_0x1dfc44[_0x5e9012(0xe7)](_0x673ddd=>_0x673ddd[_0x5e9012(0xe4)]!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a84_0x5405(_0x508bc0,_0x26299f){_0x508bc0=_0x508bc0-0xa7;const _0x540841=a84_0x5408();let _0x5405c4=_0x540841[_0x508bc0];return _0x5405c4;}function a84_0x5408(){const _0x35c471=['resources','669PobkzD','errors','filter','11DMcUZx','9360mISbQG','1718892rPFRFe','486225HwDXGN','map','fulfilled','rejected','8114nGRebg','No\x20local\x20pages\x20matched\x20labels:\x20','44zRqPJN','allSettled','path','push','join','6583540slnqNc','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','find','1260030lUGEOu','JS\x20URL\x20is\x20unreachable','trim','label','status','length','5nAShwL','CSS\x20URL\x20is\x20unreachable','has','2408koSuFA'];a84_0x5408=function(){return _0x35c471;};return a84_0x5408();}(function(_0x10e675,_0x337b66){const _0x59900d=a84_0x5405,_0x503181=_0x10e675();while(!![]){try{const _0x584405=parseInt(_0x59900d(0xba))/0x1*(-parseInt(_0x59900d(0xb8))/0x2)+parseInt(_0x59900d(0xae))/0x3*(parseInt(_0x59900d(0xac))/0x4)+parseInt(_0x59900d(0xa9))/0x5*(-parseInt(_0x59900d(0xc2))/0x6)+-parseInt(_0x59900d(0xb3))/0x7+-parseInt(_0x59900d(0xb2))/0x8+parseInt(_0x59900d(0xb4))/0x9+parseInt(_0x59900d(0xbf))/0xa*(parseInt(_0x59900d(0xb1))/0xb);if(_0x584405===_0x337b66)break;else _0x503181['push'](_0x503181['shift']());}catch(_0x5d9f97){_0x503181['push'](_0x503181['shift']());}}}(a84_0x5408,0x339ba));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x109876){const _0x11275f=a84_0x5405,_0x3e6424=[];return!isValidJsHttpsUrl(_0x109876)&&_0x3e6424['push'](_0x11275f(0xc0)),{'ok':_0x3e6424['length']===0x0,'errors':_0x3e6424};}export function validateCssUrl(_0x1b1d11){const _0x5cf302=a84_0x5405,_0x33788e=[];return!isValidCssHttpsUrl(_0x1b1d11)&&_0x33788e[_0x5cf302(0xbd)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x33788e['length']===0x0,'errors':_0x33788e};}export async function validateJsUrlReachable(_0x52930a){const _0x249428=a84_0x5405,_0x25fb97=validateJsUrl(_0x52930a);if(!_0x25fb97['ok'])return _0x25fb97;const _0x44dfdc=await isUrlReachable(_0x52930a);if(!_0x44dfdc)_0x25fb97[_0x249428(0xaf)][_0x249428(0xbd)](_0x249428(0xc3));return{'ok':_0x25fb97['errors'][_0x249428(0xa8)]===0x0,'errors':_0x25fb97[_0x249428(0xaf)]};}export async function validateCssUrlReachable(_0x3d6cff){const _0x517c96=a84_0x5405,_0x3e40c3=validateCssUrl(_0x3d6cff);if(!_0x3e40c3['ok'])return _0x3e40c3;const _0x531e2f=await isUrlReachable(_0x3d6cff);if(!_0x531e2f)_0x3e40c3[_0x517c96(0xaf)][_0x517c96(0xbd)](_0x517c96(0xaa));return{'ok':_0x3e40c3[_0x517c96(0xaf)][_0x517c96(0xa8)]===0x0,'errors':_0x3e40c3[_0x517c96(0xaf)]};}export function buildCompareRows(_0x397cf6,_0x539a90){const _0x4b3df2=a84_0x5405;return _0x397cf6['map'](_0x53926d=>({'label':_0x53926d[_0x4b3df2(0xc5)],'path':_0x53926d['path'],'local':!![],'online':_0x539a90[_0x4b3df2(0xab)](_0x53926d['path'])}));}export function filterNewPages(_0x304994,_0x45afb6,_0x1b5e52){const _0x4db443=a84_0x5405;if(_0x1b5e52&&_0x1b5e52[_0x4db443(0xa8)]>0x0){const _0xe40433=new Set(_0x1b5e52[_0x4db443(0xb5)](_0x29d01a=>_0x29d01a[_0x4db443(0xc4)]())),_0x465686=_0x304994[_0x4db443(0xb0)](_0x38ad00=>_0xe40433['has'](_0x38ad00[_0x4db443(0xc5)]));if(_0x465686[_0x4db443(0xa8)]===0x0)throw new Error(_0x4db443(0xb9)+[..._0xe40433][_0x4db443(0xbe)](',\x20'));return _0x465686;}return _0x304994[_0x4db443(0xb0)](_0x322e36=>!_0x45afb6[_0x4db443(0xab)](_0x322e36[_0x4db443(0xbc)]));}export function filterPagesByLabels(_0x17c677,_0x3f25c6){const _0x3b88dc=a84_0x5405,_0x4fc153=[],_0x1e2ec4=[];for(const _0x24b035 of _0x3f25c6){const _0x34ee00=_0x24b035['trim'](),_0x8bb12b=_0x17c677[_0x3b88dc(0xc1)](_0x540e6c=>_0x540e6c[_0x3b88dc(0xc5)]===_0x34ee00);if(_0x8bb12b)_0x4fc153['push'](_0x8bb12b);else _0x1e2ec4[_0x3b88dc(0xbd)](_0x24b035);}return{'matched':_0x4fc153,'unmatched':_0x1e2ec4};}export async function doCreateMenus(_0x55eb35,_0x307cf3,_0x3e4963,_0xb38c62){const _0x1aa56b=a84_0x5405,_0xeb31e8=await createMenus(_0x55eb35,_0x307cf3,_0x3e4963,_0xb38c62);return{'created':_0xeb31e8['length'],'failed':0x0,'labels':_0x3e4963['map'](_0x44da81=>_0x44da81[_0x1aa56b(0xc5)]),'menus':_0xeb31e8};}export function filterMenusWithResources(_0x51ac89){const _0x453e15=a84_0x5405;return _0x51ac89[_0x453e15(0xb0)](_0x551136=>_0x551136['resources'][_0x453e15(0xa8)]>0x0);}export async function doUpdateCdnUrls(_0x2fb106,_0x388824,_0x16153c,_0x46c7a0){const _0xba625b=a84_0x5405,_0x2ab64a=_0x16153c[_0xba625b(0xb0)](_0x31698b=>_0x31698b[_0xba625b(0xad)][_0xba625b(0xa8)]>0x0),_0x49171a=await Promise[_0xba625b(0xbb)](_0x2ab64a['map'](_0x3318c5=>updateMenuCdnUrl(_0x2fb106,_0x388824,{'id':_0x3318c5['id'],'label':_0x3318c5['label'],'path':_0x3318c5['path'],'resources':_0x46c7a0}))),_0x4b4b0d=_0x49171a[_0xba625b(0xb0)](_0x1076b0=>_0x1076b0[_0xba625b(0xa7)]===_0xba625b(0xb6))[_0xba625b(0xb5)](_0x37ce48=>_0x37ce48['value']),_0x3b2677=_0x49171a[_0xba625b(0xb0)](_0xa6f2e9=>_0xa6f2e9[_0xba625b(0xa7)]===_0xba625b(0xb7))[_0xba625b(0xa8)];return{'updated':_0x4b4b0d[_0xba625b(0xa8)],'failed':_0x3b2677,'menus':_0x4b4b0d};}export async function fetchMenuData(_0x4cbcda,_0x6b18e9){const _0x11aae8=a84_0x5405,_0x4a694b=getLocalPages(),_0x3b5115=await getOnlineMenuList(_0x4cbcda,_0x6b18e9),_0x314e41=new Set(_0x3b5115[_0x11aae8(0xb5)](_0x504d68=>_0x504d68[_0x11aae8(0xbc)]));return{'localPages':_0x4a694b,'onlineMenuList':_0x3b5115,'onlinePaths':_0x314e41};}export async function fetchOnlineMenuList(_0x419e66,_0xafa476){return getOnlineMenuList(_0x419e66,_0xafa476);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2642f4,_0x65038a){const _0x555d90=a85_0x3a12,_0x2db745=_0x2642f4();while(!![]){try{const _0x14d902=parseInt(_0x555d90(0x208))/0x1*(parseInt(_0x555d90(0x1e6))/0x2)+-parseInt(_0x555d90(0x1f9))/0x3+parseInt(_0x555d90(0x1f1))/0x4*(-parseInt(_0x555d90(0x1ff))/0x5)+parseInt(_0x555d90(0x1ec))/0x6+parseInt(_0x555d90(0x20c))/0x7+parseInt(_0x555d90(0x206))/0x8*(-parseInt(_0x555d90(0x1e8))/0x9)+-parseInt(_0x555d90(0x1fb))/0xa*(-parseInt(_0x555d90(0x20a))/0xb);if(_0x14d902===_0x65038a)break;else _0x2db745['push'](_0x2db745['shift']());}catch(_0xbe0a71){_0x2db745['push'](_0x2db745['shift']());}}}(a85_0x135f,0xcf998));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';function a85_0x3a12(_0x363b11,_0x4d1784){_0x363b11=_0x363b11-0x1e3;const _0x135fa0=a85_0x135f();let _0x3a12d9=_0x135fa0[_0x363b11];return _0x3a12d9;}import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x3719cb,_0x2311de){const _0x2abb02=a85_0x3a12,_0x1febea=getEnv();logger[_0x2abb02(0x203)](_0x2abb02(0x1f4),isProduction(_0x1febea)?_0x2abb02(0x1f3)+_0x3719cb+')':_0x2abb02(0x200)+_0x3719cb+')');const _0x16b8d0=await platformFetch(getApiDomain()+_0x2abb02(0x1f5)+_0x3719cb,{'cookie':_0x2311de,'label':_0x2abb02(0x1ef)});if(!_0x16b8d0)return logger['info']('get-online-menu-list',_0x2abb02(0x1fe)),[];return logger['info'](_0x2abb02(0x1f4),_0x2abb02(0x204)+_0x16b8d0[_0x2abb02(0x211)]+_0x2abb02(0x202)),_0x16b8d0[_0x2abb02(0x1e7)](flattenMenuItem)[_0x2abb02(0x1fd)]();}function flattenMenuItem(_0x11801c){const _0x44b231=a85_0x3a12;let _0x52eca8=[];try{if(_0x11801c[_0x44b231(0x201)]?.['resources']){const _0xabe5d2=JSON['parse'](_0x11801c[_0x44b231(0x201)][_0x44b231(0x1ea)]);if(Array[_0x44b231(0x1ee)](_0xabe5d2))_0x52eca8=_0xabe5d2;}}catch{}const _0x9afa40=[{'id':_0x11801c['id'],'path':_0x11801c[_0x44b231(0x205)],'label':_0x11801c[_0x44b231(0x1eb)],'resources':_0x52eca8}];if(_0x11801c[_0x44b231(0x1f2)]&&_0x11801c['children'][_0x44b231(0x211)]>0x0)for(const _0x3336e7 of _0x11801c['children']){_0x9afa40[_0x44b231(0x207)](...flattenMenuItem(_0x3336e7));}return _0x9afa40;}export async function createMenu(_0xc12981,_0x5d1bd5,_0x467cac){const _0x4fcf00=a85_0x3a12;logger[_0x4fcf00(0x203)](_0x4fcf00(0x209),_0x4fcf00(0x1e3)+_0x467cac[_0x4fcf00(0x1eb)]+'\x20('+_0x467cac['path']+')');const _0x803fd7={'appCode':_0xc12981,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x4fcf00(0x20b),'resources':_0x467cac['resources']?JSON[_0x4fcf00(0x20e)](_0x467cac[_0x4fcf00(0x1ea)]):undefined},..._0x467cac},_0x27d17a=await platformFetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x4fcf00(0x1e4),'body':_0x803fd7,'cookie':_0x5d1bd5,'label':_0x4fcf00(0x1f8)+_0x467cac[_0x4fcf00(0x1eb)]+'\x22'});return logger[_0x4fcf00(0x203)](_0x4fcf00(0x209),_0x4fcf00(0x20f)+_0x467cac[_0x4fcf00(0x1eb)]),_0x27d17a;}async function createSingleMenu(_0x41b80a,_0x194d2e,_0x4ace01,_0x201463){const _0x116fcb=a85_0x3a12,_0x3297ec={'appCode':_0x41b80a,'type':_0x116fcb(0x1e9),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x201463?JSON['stringify'](_0x201463):undefined},'label':_0x4ace01[_0x116fcb(0x1eb)],'path':_0x4ace01['path']},_0x1828cf=await platformFetch(getApiDomain()+_0x116fcb(0x1e5),{'method':_0x116fcb(0x1e4),'body':_0x3297ec,'cookie':_0x194d2e,'label':_0x116fcb(0x1f8)+_0x4ace01[_0x116fcb(0x1eb)]+'\x22'});return logger['info'](_0x116fcb(0x209),'Menu\x20created\x20successfully:\x20'+_0x4ace01['label']),_0x1828cf;}export async function createMenus(_0x54c566,_0x29c235,_0x411bf3,_0x21e5ac){const _0x44e7a6=a85_0x3a12;logger[_0x44e7a6(0x203)](_0x44e7a6(0x1fc),_0x44e7a6(0x1f7)+_0x411bf3[_0x44e7a6(0x211)]);const _0x412e1c=await Promise[_0x44e7a6(0x210)](_0x411bf3['map'](_0x3d4b0f=>createSingleMenu(_0x54c566,_0x29c235,_0x3d4b0f,_0x21e5ac)));return logger[_0x44e7a6(0x203)](_0x44e7a6(0x1fc),_0x44e7a6(0x20d)+_0x411bf3[_0x44e7a6(0x211)]),_0x412e1c;}export async function updateMenuCdnUrl(_0x2887aa,_0x1a458d,_0x1a7a26){const _0x70727=a85_0x3a12;logger[_0x70727(0x203)](_0x70727(0x1fa),'Updating\x20menu\x20asset\x20links:\x20'+_0x1a7a26[_0x70727(0x1eb)]+'\x20('+_0x1a7a26['path']+')');const _0x520923={'id':_0x1a7a26['id'],'appCode':_0x2887aa,'extend':{'loadScriptMode':_0x70727(0x20b),'resources':_0x1a7a26[_0x70727(0x1ea)]?JSON[_0x70727(0x20e)](_0x1a7a26[_0x70727(0x1ea)]):undefined}},_0x406ed6=await platformFetch(getApiDomain()+_0x70727(0x1f6),{'method':_0x70727(0x1e4),'body':_0x520923,'cookie':_0x1a458d,'label':_0x70727(0x1f0)+_0x1a7a26['label']+'\x22'});return logger[_0x70727(0x203)](_0x70727(0x1fa),_0x70727(0x1ed)+_0x1a7a26['label'],undefined),_0x406ed6;}function a85_0x135f(){const _0x38e047=['290EoDDsz','create-menus','flat','Server\x20returned\x20empty\x20menu\x20list','628545BJLmKY','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','extend','\x20online\x20menus\x20successfully','info','Fetched\x20','path','3617864eiDJtN','push','106KsaiFP','create-menu','1010746OyEDTU','import','1624980gwGHnI','Batch\x20menu\x20creation\x20completed,\x20total\x20','stringify','Menu\x20created\x20successfully:\x20','all','length','Creating\x20menu:\x20','POST','/smartapi/menu/create','3884POWfZG','map','18RxDDIU','procode','resources','label','8309556vnvwVl','Menu\x20assets\x20synced:\x20','isArray','Fetch\x20menu\x20list','Update\x20menu\x20assets\x20\x22','48OubrfI','children','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','get-online-menu-list','/smartapi/menu/find?appCode=','/smartapi/menu/update','Start\x20batch\x20menu\x20creation,\x20total\x20','Create\x20menu\x20\x22','3672930uxYvVp','update-menu-cdn-url'];a85_0x135f=function(){return _0x38e047;};return a85_0x135f();}
|