@lovrabet/rabetbase-cli 2.2.4 → 2.2.5-beta.1
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/app-config/delete.js +1 -0
- package/lib/commands/app-config/get.js +1 -0
- package/lib/commands/app-config/index.js +1 -0
- package/lib/commands/app-config/list.js +1 -0
- package/lib/commands/app-config/set.js +1 -0
- package/lib/commands/app-config/shared.js +1 -0
- 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/business-group-update.js +1 -0
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.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/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.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/relation-audit.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/commands/workspace/index.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/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.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/update-notice.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(_0x56ce0b,_0xa0703e){const _0x45dcdf=a80_0x58c0,_0x1b7424=_0x56ce0b();while(!![]){try{const _0x55d49f=parseInt(_0x45dcdf(0xbf))/0x1*(parseInt(_0x45dcdf(0xc6))/0x2)+parseInt(_0x45dcdf(0xcd))/0x3*(parseInt(_0x45dcdf(0xc0))/0x4)+parseInt(_0x45dcdf(0xcc))/0x5+parseInt(_0x45dcdf(0xc7))/0x6*(-parseInt(_0x45dcdf(0xbe))/0x7)+-parseInt(_0x45dcdf(0xc5))/0x8*(-parseInt(_0x45dcdf(0xd4))/0x9)+-parseInt(_0x45dcdf(0xdd))/0xa*(-parseInt(_0x45dcdf(0xc3))/0xb)+-parseInt(_0x45dcdf(0xc8))/0xc;if(_0x55d49f===_0xa0703e)break;else _0x1b7424['push'](_0x1b7424['shift']());}catch(_0x2fac09){_0x1b7424['push'](_0x1b7424['shift']());}}}(a80_0x2806,0xdbb24));import{getAppBaseUrl}from'../../constant/domain.js';function a80_0x58c0(_0x1799f6,_0x221493){_0x1799f6=_0x1799f6-0xbe;const _0x2806ac=a80_0x2806();let _0x58c071=_0x2806ac[_0x1799f6];return _0x58c071;}function a80_0x2806(){const _0x460e47=['includes','privatekey','/data/er?dbId=','connectionstring','trim','dbpassword','27ZLhZzj','map','password','toLowerCase','number','secret','test','[redacted]','isFinite','7900URiLaI','length','247247UkdBbr','417zhyPQD','1327524gtqUTu','passwd','jdbcurl','19096eTOXSk','accesskey','2209496xaHVXA','4586pszclP','30rhdXMw','38054244vRnpcu','authorization','credential','keys','3798025cNwKiQ','3iqqyFj'];a80_0x2806=function(){return _0x460e47;};return a80_0x2806();}function shouldRedactKey(_0x227a4f){const _0x55bb6a=a80_0x58c0,_0x1022eb=_0x227a4f[_0x55bb6a(0xd7)]();if(_0x1022eb===_0x55bb6a(0xd6)||_0x1022eb===_0x55bb6a(0xc1)||_0x1022eb===_0x55bb6a(0xd3))return!![];if(_0x1022eb['includes'](_0x55bb6a(0xd9))||_0x1022eb['includes']('token')||_0x1022eb[_0x55bb6a(0xce)](_0x55bb6a(0xca)))return!![];if(_0x1022eb[_0x55bb6a(0xce)](_0x55bb6a(0xcf))||_0x1022eb['includes'](_0x55bb6a(0xc4)))return!![];if(_0x1022eb===_0x55bb6a(0xc9)||_0x1022eb===_0x55bb6a(0xd1)||_0x1022eb===_0x55bb6a(0xc2))return!![];return![];}export function sanitizeDbLinkForOutput(_0x154e06){const _0x200074=a80_0x58c0,_0x130063={..._0x154e06};for(const _0x59eb73 of Object[_0x200074(0xcb)](_0x130063)){if(!shouldRedactKey(_0x59eb73))continue;const _0x1e6f16=_0x130063[_0x59eb73];_0x1e6f16!=null&&String(_0x1e6f16)[_0x200074(0xde)]>0x0&&(_0x130063[_0x59eb73]=_0x200074(0xdb));}return _0x130063;}export function sanitizeDbLinkList(_0x27ac77){const _0x42af34=a80_0x58c0;return _0x27ac77[_0x42af34(0xd5)](_0x587a1=>sanitizeDbLinkForOutput(_0x587a1));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x40acb6){const _0x568b52=a80_0x58c0,_0xfcd94a=_0x40acb6['trim']();if(!_0xfcd94a)return![];return DB_URL_PATTERN[_0x568b52(0xda)](_0xfcd94a);}export function buildDbPageLinks(_0x293ba7,_0x313491){const _0xdb0691=a80_0x58c0,_0x742fbb=_0x293ba7?.[_0xdb0691(0xd2)]();if(!_0x742fbb)return undefined;const _0x4e9a40=typeof _0x313491===_0xdb0691(0xd8)?String(_0x313491):String(_0x313491??'')[_0xdb0691(0xd2)]();if(!_0x4e9a40)return undefined;const _0x1f3535=Number(_0x4e9a40);if(!Number[_0xdb0691(0xdc)](_0x1f3535)||_0x1f3535<=0x0)return undefined;const _0xef33cf=getAppBaseUrl(_0x742fbb),_0x2be6bc=encodeURIComponent(String(_0x1f3535));return{'databasePage':_0xef33cf+'/data/database','erPage':_0xef33cf+_0xdb0691(0xd0)+_0x2be6bc};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0x31e7bf=a81_0x33dc;function a81_0x33dc(_0x3ebd0f,_0x372fb){_0x3ebd0f=_0x3ebd0f-0xc3;const _0x369088=a81_0x3690();let _0x33dc58=_0x369088[_0x3ebd0f];return _0x33dc58;}(function(_0x7a9d07,_0x3ed39f){const _0x5804d3=a81_0x33dc,_0xaaa218=_0x7a9d07();while(!![]){try{const _0x3a1263=parseInt(_0x5804d3(0xcd))/0x1*(-parseInt(_0x5804d3(0xce))/0x2)+-parseInt(_0x5804d3(0xc5))/0x3+-parseInt(_0x5804d3(0xd1))/0x4+parseInt(_0x5804d3(0xca))/0x5*(-parseInt(_0x5804d3(0xc7))/0x6)+-parseInt(_0x5804d3(0xc3))/0x7*(-parseInt(_0x5804d3(0xc9))/0x8)+-parseInt(_0x5804d3(0xcf))/0x9*(parseInt(_0x5804d3(0xd3))/0xa)+-parseInt(_0x5804d3(0xcb))/0xb*(-parseInt(_0x5804d3(0xd0))/0xc);if(_0x3a1263===_0x3ed39f)break;else _0xaaa218['push'](_0xaaa218['shift']());}catch(_0x2e6c6d){_0xaaa218['push'](_0xaaa218['shift']());}}}(a81_0x3690,0xdaed1));function a81_0x3690(){const _0xfa23c8=['num','8835810HfKztJ','7idvCoq','length','4041360veUtdT','\x20table(s)\x20on\x20db\x20link\x20','8090508wUpRTx','tables','11410376KZSkYh','5jbCODv','31416143jNONgv','read','135389HqcJBB','14UXzkEH','9RNOwjF','24PgnDFr','6859040CiNpXf'];a81_0x3690=function(){return _0xfa23c8;};return a81_0x3690();}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':a81_0x31e7bf(0xc8),'description':'List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','risk':a81_0x31e7bf(0xcc),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xfaf317){const _0x443d81=a81_0x31e7bf,_0x3d393e=_0xfaf317[_0x443d81(0xd2)]('id'),_0x4a8eca=await getDbAllTableList(_0xfaf317['appCode'],_0x3d393e);return{'ok':!![],'data':{'dbLinkId':_0x3d393e,'total':_0x4a8eca[_0x443d81(0xc4)],'tables':_0x4a8eca},'message':_0x4a8eca[_0x443d81(0xc4)]+_0x443d81(0xc6)+_0x3d393e};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x1b3133=a82_0x22a2;function a82_0x22a2(_0x5621e5,_0x244468){_0x5621e5=_0x5621e5-0x175;const _0x14039a=a82_0x1403();let _0x22a2eb=_0x14039a[_0x5621e5];return _0x22a2eb;}(function(_0x43828f,_0x4ef209){const _0x10a783=a82_0x22a2,_0x55c762=_0x43828f();while(!![]){try{const _0x3308df=-parseInt(_0x10a783(0x18d))/0x1*(-parseInt(_0x10a783(0x181))/0x2)+-parseInt(_0x10a783(0x17f))/0x3*(parseInt(_0x10a783(0x186))/0x4)+-parseInt(_0x10a783(0x18c))/0x5+parseInt(_0x10a783(0x183))/0x6*(-parseInt(_0x10a783(0x188))/0x7)+parseInt(_0x10a783(0x180))/0x8*(parseInt(_0x10a783(0x17a))/0x9)+parseInt(_0x10a783(0x177))/0xa*(-parseInt(_0x10a783(0x17d))/0xb)+parseInt(_0x10a783(0x189))/0xc;if(_0x3308df===_0x4ef209)break;else _0x55c762['push'](_0x55c762['shift']());}catch(_0x42440e){_0x55c762['push'](_0x55c762['shift']());}}}(a82_0x1403,0x192a1));import{testDbLinkConnect}from'../../core/api-client.js';function a82_0x1403(){const _0x2e8c62=['test','msg','297ELAHhQ','\x20(see\x20data.result)','80583lSRGJh','136NIIaVZ','98WqfnzH','success','6cExJLC','Connection\x20OK\x20for\x20db\x20link\x20','Connection\x20check\x20finished\x20for\x20db\x20link\x20','20llEXeI','error','239792wOlbhm','3819360Mhrdpc','code','read','788055JnLgyH','1933cRysGh','length','message','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','data','9830eaiJDg','num','keys','22653CkjlVE'];a82_0x1403=function(){return _0x2e8c62;};return a82_0x1403();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x12a56c){const _0x304a94=a82_0x22a2;if(_0x12a56c===!![]||_0x12a56c===![])return{'success':_0x12a56c};if(_0x12a56c===null||_0x12a56c===undefined)return{'type':typeof _0x12a56c};if(typeof _0x12a56c!=='object')return{'type':typeof _0x12a56c};const _0x3cbeba=_0x12a56c,_0x569cbd=[_0x304a94(0x182),_0x304a94(0x18f),_0x304a94(0x18a),_0x304a94(0x187),_0x304a94(0x17c),_0x304a94(0x176)],_0x5d2356={};for(const _0x3a7f27 of _0x569cbd){if(_0x3a7f27 in _0x3cbeba)_0x5d2356[_0x3a7f27]=_0x3cbeba[_0x3a7f27];}return Object['keys'](_0x5d2356)[_0x304a94(0x18e)]===0x0&&(_0x5d2356[_0x304a94(0x179)]=Object['keys'](_0x3cbeba)['slice'](0x0,0x14)),_0x5d2356;}export const dbTest={'service':'db','command':a82_0x1b3133(0x17b),'description':a82_0x1b3133(0x175),'risk':a82_0x1b3133(0x18b),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x552d57){const _0x5c3352=a82_0x1b3133,_0x508dad=_0x552d57[_0x5c3352(0x178)]('id'),_0x372785=await testDbLinkConnect(_0x508dad),_0x8a945a=_0x372785===!![]||typeof _0x372785==='object'&&_0x372785!==null&&_0x372785[_0x5c3352(0x182)]===!![],_0x4e83d1=summarizeTestConnectResult(_0x372785);return{'ok':!![],'data':{'id':_0x508dad,'connected':Boolean(_0x8a945a),'result':_0x4e83d1},'message':_0x8a945a?_0x5c3352(0x184)+_0x508dad:_0x5c3352(0x185)+_0x508dad+_0x5c3352(0x17e)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a83_0x1c63(_0x17ceb6,_0x407613){_0x17ceb6=_0x17ceb6-0x15d;const _0x455f5a=a83_0x455f();let _0x1c639f=_0x455f5a[_0x17ceb6];return _0x1c639f;}const a83_0x1e33c5=a83_0x1c63;(function(_0x40ac65,_0x3b3977){const _0x2dd5e6=a83_0x1c63,_0x16fa09=_0x40ac65();while(!![]){try{const _0x33493f=parseInt(_0x2dd5e6(0x163))/0x1+parseInt(_0x2dd5e6(0x17e))/0x2*(parseInt(_0x2dd5e6(0x15f))/0x3)+parseInt(_0x2dd5e6(0x16d))/0x4*(-parseInt(_0x2dd5e6(0x179))/0x5)+-parseInt(_0x2dd5e6(0x16f))/0x6+parseInt(_0x2dd5e6(0x169))/0x7*(parseInt(_0x2dd5e6(0x176))/0x8)+-parseInt(_0x2dd5e6(0x15e))/0x9+parseInt(_0x2dd5e6(0x164))/0xa;if(_0x33493f===_0x3b3977)break;else _0x16fa09['push'](_0x16fa09['shift']());}catch(_0x135ed0){_0x16fa09['push'](_0x16fa09['shift']());}}}(a83_0x455f,0x4855e));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';function a83_0x455f(){const _0x301fe1=['validation','dbdesc','305428sVZtrF','3249140GdYCwS','New\x20username','New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API','dbDesc','string','200459Zipkbb','dburl','POST','username','73356rgkYvi','New\x20description','3336582rOHZfS','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','dbParam','New\x20connection\x20parameter\x20string','str','Updated\x20db\x20link\x20','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','40jdzYMK','dbUrl','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','30SWPwxh','New\x20host:port','dbparam','trim','write','42AnoDWG','num','dbname','dbName','password','New\x20database\x20name','1127619XaLYqZ','44883GFcpUz','update'];a83_0x455f=function(){return _0x301fe1;};return a83_0x455f();}import{CliErrors}from'../../errors.js';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':a83_0x1e33c5(0x160),'description':a83_0x1e33c5(0x170),'risk':a83_0x1e33c5(0x17d),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a83_0x1e33c5(0x180),'type':'string','description':a83_0x1e33c5(0x15d)},{'name':a83_0x1e33c5(0x16a),'type':a83_0x1e33c5(0x168),'description':a83_0x1e33c5(0x17a)},{'name':a83_0x1e33c5(0x16c),'type':a83_0x1e33c5(0x168),'description':a83_0x1e33c5(0x165)},{'name':a83_0x1e33c5(0x182),'type':a83_0x1e33c5(0x168),'description':a83_0x1e33c5(0x166)},{'name':'dbparam','type':'string','description':a83_0x1e33c5(0x172)},{'name':a83_0x1e33c5(0x162),'type':a83_0x1e33c5(0x168),'description':a83_0x1e33c5(0x16e)}],async 'validate'(_0x287637){const _0x3addc1=a83_0x1e33c5,_0x523a79=_0x287637[_0x3addc1(0x173)](_0x3addc1(0x16a));if(_0x523a79&&!validateDbUrl(_0x523a79[_0x3addc1(0x17c)]()))throw CliErrors[_0x3addc1(0x161)](_0x3addc1(0x178)+_0x523a79+'\x22');},async 'dryRun'(_0x5b1956){const _0x4eedde=a83_0x1e33c5,_0x42d2c1=_0x5b1956[_0x4eedde(0x17f)]('id'),_0x3f7664=await getDbLinkInfo(_0x42d2c1),_0x13eb6e={..._0x3f7664},_0x4a5203=_0x5b1956[_0x4eedde(0x173)](_0x4eedde(0x180));if(_0x4a5203)_0x13eb6e[_0x4eedde(0x181)]=_0x4a5203;const _0x18b237=_0x5b1956['str']('dburl');if(_0x18b237)_0x13eb6e[_0x4eedde(0x177)]=_0x18b237[_0x4eedde(0x17c)]();const _0x28de8a=_0x5b1956[_0x4eedde(0x173)](_0x4eedde(0x16c));if(_0x28de8a)_0x13eb6e[_0x4eedde(0x16c)]=_0x28de8a;const _0x3475f0=_0x5b1956[_0x4eedde(0x173)](_0x4eedde(0x182));if(_0x3475f0)_0x13eb6e[_0x4eedde(0x182)]=_0x3475f0;const _0xa10bc9=_0x5b1956['str'](_0x4eedde(0x17b));if(_0xa10bc9)_0x13eb6e[_0x4eedde(0x171)]=_0xa10bc9;const _0x336ead=_0x5b1956[_0x4eedde(0x173)](_0x4eedde(0x162));if(_0x336ead)_0x13eb6e[_0x4eedde(0x167)]=_0x336ead;const _0x351128=sanitizeDbLinkForOutput(_0x13eb6e);return{'method':_0x4eedde(0x16b),'url':'/smartapi/dblink/update','body':_0x351128,'description':_0x4eedde(0x175)};},async 'execute'(_0x383ccb){const _0x4bb853=a83_0x1e33c5,_0x4faedd=_0x383ccb[_0x4bb853(0x17f)]('id'),_0x47d538=await getDbLinkInfo(_0x4faedd),_0x481b08={..._0x47d538},_0x42dad8=_0x383ccb[_0x4bb853(0x173)](_0x4bb853(0x180));if(_0x42dad8)_0x481b08[_0x4bb853(0x181)]=_0x42dad8;const _0x4056e9=_0x383ccb[_0x4bb853(0x173)](_0x4bb853(0x16a));if(_0x4056e9)_0x481b08[_0x4bb853(0x177)]=_0x4056e9[_0x4bb853(0x17c)]();const _0x4672db=_0x383ccb[_0x4bb853(0x173)](_0x4bb853(0x16c));if(_0x4672db)_0x481b08[_0x4bb853(0x16c)]=_0x4672db;const _0x24df2c=_0x383ccb[_0x4bb853(0x173)]('password');if(_0x24df2c)_0x481b08[_0x4bb853(0x182)]=_0x24df2c;const _0xc4ca49=_0x383ccb[_0x4bb853(0x173)](_0x4bb853(0x17b));if(_0xc4ca49)_0x481b08[_0x4bb853(0x171)]=_0xc4ca49;const _0x12fe51=_0x383ccb[_0x4bb853(0x173)](_0x4bb853(0x162));if(_0x12fe51)_0x481b08[_0x4bb853(0x167)]=_0x12fe51;const {id:_0x334848,entity:_0x53ee18}=normalizeEntityWithIdResponse(await updateDbLink(_0x481b08));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x53ee18),'message':_0x4bb853(0x174)+(_0x334848??_0x4faedd)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a77_0xa98fad=a77_0x4abb;function a77_0x5c62(){const _0x303ce1=['✓\x20Valid','cookie','(set,\x20length=','\x20\x20─','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','accessKey','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','format','apps','✗\x20Expired','42BnTmrK','20623174LrYPLX','appCode','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','env','(none)','raw','1023192NuMJCz','check','read','619776FFOpIt','69741SmLlgb','message','green','value','log','platform','\x20doctor','locale','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','doctor','keys','\x20\x20Apps','496907wkXSbA','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','source','padEnd','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','status','Global','✗\x20Not\x20logged\x20in','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','explicitAppName','missing','\x20\x20API\x20Endpoints','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','139856NkKJZU','pageSize','80EqWgqg','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','appcode','12TwCLnb','length','verbose','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','Project','unknown','842390gLBsXx','\x20\x20Auth','(not\x20found)','(no\x20file)','red','(set\x20via\x20file,\x20length=','yellow','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','gray','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','repeat','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','apiDir','36uEzUmu','bold','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a77_0x5c62=function(){return _0x303ce1;};return a77_0x5c62();}(function(_0x4617a3,_0x35362f){const _0x1c9638=a77_0x4abb,_0x1ef55d=_0x4617a3();while(!![]){try{const _0x7d2a57=parseInt(_0x1c9638(0x110))/0x1+-parseInt(_0x1c9638(0x120))/0x2*(-parseInt(_0x1c9638(0xe6))/0x3)+parseInt(_0x1c9638(0x125))/0x4*(parseInt(_0x1c9638(0xd8))/0x5)+parseInt(_0x1c9638(0xf6))/0x6*(parseInt(_0x1c9638(0x103))/0x7)+-parseInt(_0x1c9638(0xff))/0x8+-parseInt(_0x1c9638(0x102))/0x9*(-parseInt(_0x1c9638(0x122))/0xa)+-parseInt(_0x1c9638(0xf7))/0xb;if(_0x7d2a57===_0x35362f)break;else _0x1ef55d['push'](_0x1ef55d['shift']());}catch(_0x18c29b){_0x1ef55d['push'](_0x1ef55d['shift']());}}}(a77_0x5c62,0x70285));function a77_0x4abb(_0x1a23af,_0x2c3c62){_0x1a23af=_0x1a23af-0xd3;const _0x5c62e5=a77_0x5c62();let _0x4abbbd=_0x5c62e5[_0x1a23af];return _0x4abbbd;}import a77_0x4a1c70 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(_0x1cf8ac){const _0x257683=a77_0x4abb,_0x31e450=GIT_COMMIT!==_0x257683(0xd7)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION,_0x4b326b=buildConfigFromFlags({}),_0x5bac84=getCookie();console[_0x257683(0x107)](),console[_0x257683(0x107)](a77_0x4a1c70[_0x257683(0xe7)](CLI_BIN_NAME+_0x257683(0x109))),console[_0x257683(0x107)](a77_0x4a1c70[_0x257683(0xe0)]('─'[_0x257683(0xe3)](0x32))),console['log']('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x31e450),console['log'](_0x257683(0x10b)+process['version']),console['log'](_0x257683(0xd4)+process[_0x257683(0x108)]+'\x20'+process[_0x257683(0x10c)]),console[_0x257683(0x107)](),console[_0x257683(0x107)](a77_0x4a1c70[_0x257683(0xe7)](_0x257683(0xd5))),console['log'](a77_0x4a1c70[_0x257683(0xe0)](_0x257683(0xec)['repeat'](0x1e)));const _0xf8b943=getGlobalConfigPath(),_0x1f685a=getProjectConfigPath();console['log'](_0x257683(0xf9)+(_0xf8b943||a77_0x4a1c70[_0x257683(0xe0)](_0x257683(0xda)))),console[_0x257683(0x107)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1f685a||a77_0x4a1c70[_0x257683(0xe0)]('(not\x20found)'))),console[_0x257683(0x107)](),console[_0x257683(0x107)](a77_0x4a1c70[_0x257683(0xe7)]('\x20\x20Config\x20JSON')),console[_0x257683(0x107)](a77_0x4a1c70['gray'](_0x257683(0xec)[_0x257683(0xe3)](0x1e)));const _0x10590=(_0x301c24,_0x5d3f37)=>{const _0x3268b1=_0x257683;if(!_0x5d3f37){console['log']('\x20\x20'+_0x301c24[_0x3268b1(0x114)](0x11)+'\x20'+a77_0x4a1c70[_0x3268b1(0xe0)](_0x3268b1(0xdb)));return;}const _0x403678=inspectCliConfigJsonFile(_0x5d3f37);if(_0x403678['status']==='ok')console[_0x3268b1(0x107)]('\x20\x20'+_0x301c24[_0x3268b1(0x114)](0x11)+'\x20'+a77_0x4a1c70[_0x3268b1(0x105)]('✓\x20Valid\x20JSON'));else{if(_0x403678[_0x3268b1(0x117)]==='empty')console['log']('\x20\x20'+_0x301c24[_0x3268b1(0x114)](0x11)+'\x20'+a77_0x4a1c70[_0x3268b1(0xde)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x403678[_0x3268b1(0x117)]===_0x3268b1(0x11d)?console['log']('\x20\x20'+_0x301c24[_0x3268b1(0x114)](0x11)+'\x20'+a77_0x4a1c70[_0x3268b1(0xe0)]('(missing)')):(console[_0x3268b1(0x107)]('\x20\x20'+_0x301c24[_0x3268b1(0x114)](0x11)+'\x20'+a77_0x4a1c70[_0x3268b1(0xdc)]('✗\x20Invalid\x20JSON')),console[_0x3268b1(0x107)]('\x20\x20'+''[_0x3268b1(0x114)](0x11)+'\x20'+a77_0x4a1c70[_0x3268b1(0xdc)](_0x403678[_0x3268b1(0x104)])));}};_0x10590(_0x257683(0x118),_0xf8b943),_0x10590(_0x257683(0xd6),_0x1f685a),console[_0x257683(0x107)](),console['log'](a77_0x4a1c70[_0x257683(0xe7)](_0x257683(0x116))),console[_0x257683(0x107)](a77_0x4a1c70[_0x257683(0xe0)](_0x257683(0xec)[_0x257683(0xe3)](0x1e))),console['log'](_0x257683(0xdf)+(_0x4b326b[_0x257683(0xf8)]||a77_0x4a1c70[_0x257683(0xdc)]('(not\x20set)'))),console[_0x257683(0x107)](_0x257683(0xe4)+_0x4b326b[_0x257683(0xfc)]),console[_0x257683(0x107)](_0x257683(0xe8)+_0x4b326b[_0x257683(0x10a)]),console[_0x257683(0x107)](_0x257683(0x112)+_0x4b326b[_0x257683(0xe5)]),console[_0x257683(0x107)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x4b326b['defaultApp']||a77_0x4a1c70[_0x257683(0xe0)](_0x257683(0xfd)))),console[_0x257683(0x107)](_0x257683(0xe1)+(_0x4b326b[_0x257683(0xef)]||a77_0x4a1c70[_0x257683(0xe0)](_0x257683(0xfd)))),console[_0x257683(0x107)]('\x20\x20explicitAppName:\x20'+(_0x4b326b[_0x257683(0x11c)]||a77_0x4a1c70[_0x257683(0xe0)](_0x257683(0xfd)))),console[_0x257683(0x107)](_0x257683(0xee)+(_0x4b326b['format']||a77_0x4a1c70[_0x257683(0xe0)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x257683(0xf3)]+')'))),console[_0x257683(0x107)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4b326b[_0x257683(0x121)]??a77_0x4a1c70[_0x257683(0xe0)]('(default)'))),console[_0x257683(0x107)](_0x257683(0xf1)+_0x4b326b['riskLevel']),console[_0x257683(0x107)](_0x257683(0x115)+_0x4b326b[_0x257683(0xd3)]),console[_0x257683(0x107)](_0x257683(0x11a)+(_0x4b326b['cookie']?a77_0x4a1c70['green'](_0x257683(0xeb)+_0x4b326b['cookie'][_0x257683(0x126)]+')'):_0x5bac84?a77_0x4a1c70[_0x257683(0x105)](_0x257683(0xdd)+_0x5bac84[_0x257683(0x126)]+')'):a77_0x4a1c70[_0x257683(0xe0)](_0x257683(0xfd))));const _0x81420d=Object[_0x257683(0x10e)](_0x4b326b[_0x257683(0xf4)]);if(_0x81420d['length']>0x0){console[_0x257683(0x107)](),console[_0x257683(0x107)](a77_0x4a1c70[_0x257683(0xe7)](_0x257683(0x10f))),console[_0x257683(0x107)](a77_0x4a1c70[_0x257683(0xe0)](_0x257683(0xec)[_0x257683(0xe3)](0x1e)));for(const _0x4bfb98 of _0x81420d){const _0x532d62=_0x4b326b['apps'][_0x4bfb98],_0x1a050b=_0x4bfb98===_0x4b326b['defaultApp'],_0x4245f9=_0x4bfb98===_0x4b326b[_0x257683(0xef)],_0x5233ac=_0x4245f9?a77_0x4a1c70[_0x257683(0x105)](_0x257683(0xfa)):'',_0x44a8d0=_0x1a050b?'\x20(default)':'';console[_0x257683(0x107)]('\x20\x20'+_0x4bfb98+_0x44a8d0+_0x5233ac),console[_0x257683(0x107)](_0x257683(0x111)+_0x532d62[_0x257683(0x124)]);const _0x92cf8c=buildAppDoctorFields(_0x532d62,{'env':_0x4b326b['env'],'apiDir':_0x4b326b[_0x257683(0xfe)][_0x257683(0xe5)]||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x4b326b[_0x257683(0xea)]||_0x5bac84||undefined,'accessKey':_0x4b326b[_0x257683(0xf0)]});console[_0x257683(0x107)](_0x257683(0xed)+_0x92cf8c['env']['value']+'\x20\x20'+a77_0x4a1c70[_0x257683(0xe0)]('('+_0x92cf8c[_0x257683(0xfc)]['source']+')')),console[_0x257683(0x107)](_0x257683(0x123)+_0x92cf8c[_0x257683(0xe5)][_0x257683(0x106)]+'\x20\x20'+a77_0x4a1c70[_0x257683(0xe0)]('('+_0x92cf8c['apiDir']['source']+')'));const _0x539dd4=_0x92cf8c[_0x257683(0xea)][_0x257683(0x106)]?a77_0x4a1c70[_0x257683(0x105)]('(set,\x20length='+_0x92cf8c['cookie'][_0x257683(0x106)][_0x257683(0x126)]+')'):a77_0x4a1c70[_0x257683(0xe0)]('(none)');console[_0x257683(0x107)](_0x257683(0xf2)+_0x539dd4+'\x20\x20'+a77_0x4a1c70[_0x257683(0xe0)]('('+_0x92cf8c[_0x257683(0xea)][_0x257683(0x113)]+')'));const _0x3a82be=_0x92cf8c[_0x257683(0xf0)]['value']?a77_0x4a1c70[_0x257683(0x105)](_0x257683(0xeb)+_0x92cf8c[_0x257683(0xf0)][_0x257683(0x106)][_0x257683(0x126)]+')'):a77_0x4a1c70[_0x257683(0xe0)](_0x257683(0xfd));console[_0x257683(0x107)]('\x20\x20\x20\x20accessKey:\x20\x20'+_0x3a82be+'\x20\x20'+a77_0x4a1c70['gray']('('+_0x92cf8c[_0x257683(0xf0)]['source']+')'));}}console[_0x257683(0x107)](),console[_0x257683(0x107)](a77_0x4a1c70[_0x257683(0xe7)](_0x257683(0x11e))),console[_0x257683(0x107)](a77_0x4a1c70[_0x257683(0xe0)](_0x257683(0xec)[_0x257683(0xe3)](0x1e))),console['log'](_0x257683(0x11f)+getApiDomain()),console[_0x257683(0x107)](_0x257683(0xe2)+getUserDomain()),console[_0x257683(0x107)](_0x257683(0x11b)+getRuntimeDomain()),console['log'](),console[_0x257683(0x107)](a77_0x4a1c70[_0x257683(0xe7)](_0x257683(0xd9))),console[_0x257683(0x107)](a77_0x4a1c70['gray'](_0x257683(0xec)[_0x257683(0xe3)](0x1e)));if(_0x5bac84){const _0x1d6d07=await getIsSessionValid();console[_0x257683(0x107)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1d6d07?a77_0x4a1c70['green'](_0x257683(0xe9)):a77_0x4a1c70[_0x257683(0xdc)](_0x257683(0xf5))));}else console[_0x257683(0x107)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a77_0x4a1c70[_0x257683(0xdc)](_0x257683(0x119)));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a77_0xa98fad(0x10d),'command':a77_0xa98fad(0x100),'description':a77_0xa98fad(0xfb),'risk':a77_0xa98fad(0x101),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a84_0x4d4b27=a84_0x4ecf;(function(_0x3554c3,_0x4b2173){const _0x104b54=a84_0x4ecf,_0x598465=_0x3554c3();while(!![]){try{const _0xab986f=-parseInt(_0x104b54(0xb4))/0x1*(parseInt(_0x104b54(0xc6))/0x2)+parseInt(_0x104b54(0xb7))/0x3*(-parseInt(_0x104b54(0xcf))/0x4)+-parseInt(_0x104b54(0xa2))/0x5*(-parseInt(_0x104b54(0xd2))/0x6)+-parseInt(_0x104b54(0xc2))/0x7+-parseInt(_0x104b54(0xce))/0x8+parseInt(_0x104b54(0xa3))/0x9*(-parseInt(_0x104b54(0x9f))/0xa)+parseInt(_0x104b54(0xa9))/0xb;if(_0xab986f===_0x4b2173)break;else _0x598465['push'](_0x598465['shift']());}catch(_0x438c9e){_0x598465['push'](_0x598465['shift']());}}}(a84_0x3f81,0xf2f2d));import a84_0x2f943d 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';function a84_0x3f81(){const _0x3f9e11=['message','keys','repeat','Project','(set\x20via\x20file,\x20length=','bold','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','red','read','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Expired','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Global','\x20\x20─','status','platform','verbose','apps','log','(default)','length','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Apps','✗\x20Not\x20logged\x20in','(not\x20found)','410MReIDR','version','currentApp','8605ZXRHPC','2259qxEhrH','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','defaultApp','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','37394544nuvxyt','slice','check','format','yellow','source','gray','\x20\x20Auth','padEnd','\x20\x20explicitAppName:\x20','env','44791UBCyEJ','green','cookie','1654509cRJRkq','doctor','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','accessKey','(missing)','appCode','(none)','✓\x20Valid','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','riskLevel','3027136uAqlCg','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','apiDir','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','78mclIYn','raw','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','\x20(default)','missing','\x20\x20\x20\x20accessKey:\x20\x20','explicitAppName','12643920ylNbHu','4hUFwyX','✗\x20Invalid\x20JSON','value','6684qLuQQb','\x20doctor','arch','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(set,\x20length=','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'];a84_0x3f81=function(){return _0x3f9e11;};return a84_0x3f81();}async function execute(_0x165e6e){const _0x2a0f4f=a84_0x4ecf,_0x142135=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x2a0f4f(0xaa)](0x0,0xa)+')':VERSION,_0x28b801=buildConfigFromFlags({}),_0x427a73=getCookie();console['log'](),console[_0x2a0f4f(0x95)](a84_0x2f943d[_0x2a0f4f(0x88)](CLI_BIN_NAME+_0x2a0f4f(0xd3))),console[_0x2a0f4f(0x95)](a84_0x2f943d['gray']('─'[_0x2a0f4f(0xdb)](0x32))),console[_0x2a0f4f(0x95)](_0x2a0f4f(0xd6)+_0x142135),console['log']('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x2a0f4f(0xa0)]),console[_0x2a0f4f(0x95)](_0x2a0f4f(0xd8)+process[_0x2a0f4f(0x92)]+'\x20'+process[_0x2a0f4f(0xd4)]),console['log'](),console[_0x2a0f4f(0x95)](a84_0x2f943d[_0x2a0f4f(0x88)]('\x20\x20Config\x20Files')),console[_0x2a0f4f(0x95)](a84_0x2f943d[_0x2a0f4f(0xaf)](_0x2a0f4f(0x90)[_0x2a0f4f(0xdb)](0x1e)));const _0x1a08fb=getGlobalConfigPath(),_0xe794bc=getProjectConfigPath();console['log']('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1a08fb||a84_0x2f943d['gray'](_0x2a0f4f(0x9e)))),console[_0x2a0f4f(0x95)](_0x2a0f4f(0x99)+(_0xe794bc||a84_0x2f943d['gray'](_0x2a0f4f(0x9e)))),console[_0x2a0f4f(0x95)](),console[_0x2a0f4f(0x95)](a84_0x2f943d[_0x2a0f4f(0x88)](_0x2a0f4f(0xa6))),console[_0x2a0f4f(0x95)](a84_0x2f943d[_0x2a0f4f(0xaf)](_0x2a0f4f(0x90)['repeat'](0x1e)));const _0x4f9894=(_0x11ed46,_0x57a584)=>{const _0x315e8d=_0x2a0f4f;if(!_0x57a584){console[_0x315e8d(0x95)]('\x20\x20'+_0x11ed46[_0x315e8d(0xb1)](0x11)+'\x20'+a84_0x2f943d[_0x315e8d(0xaf)]('(no\x20file)'));return;}const _0x2c17b8=inspectCliConfigJsonFile(_0x57a584);if(_0x2c17b8[_0x315e8d(0x91)]==='ok')console[_0x315e8d(0x95)]('\x20\x20'+_0x11ed46[_0x315e8d(0xb1)](0x11)+'\x20'+a84_0x2f943d[_0x315e8d(0xb5)]('✓\x20Valid\x20JSON'));else{if(_0x2c17b8['status']==='empty')console[_0x315e8d(0x95)]('\x20\x20'+_0x11ed46[_0x315e8d(0xb1)](0x11)+'\x20'+a84_0x2f943d[_0x315e8d(0xad)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x2c17b8[_0x315e8d(0x91)]===_0x315e8d(0xcb)?console[_0x315e8d(0x95)]('\x20\x20'+_0x11ed46[_0x315e8d(0xb1)](0x11)+'\x20'+a84_0x2f943d['gray'](_0x315e8d(0xbb))):(console['log']('\x20\x20'+_0x11ed46['padEnd'](0x11)+'\x20'+a84_0x2f943d['red'](_0x315e8d(0xd0))),console[_0x315e8d(0x95)]('\x20\x20'+''[_0x315e8d(0xb1)](0x11)+'\x20'+a84_0x2f943d['red'](_0x2c17b8[_0x315e8d(0xd9)])));}};_0x4f9894(_0x2a0f4f(0x8f),_0x1a08fb),_0x4f9894(_0x2a0f4f(0xdc),_0xe794bc),console['log'](),console[_0x2a0f4f(0x95)](a84_0x2f943d[_0x2a0f4f(0x88)]('\x20\x20Merged\x20Config')),console[_0x2a0f4f(0x95)](a84_0x2f943d[_0x2a0f4f(0xaf)](_0x2a0f4f(0x90)[_0x2a0f4f(0xdb)](0x1e))),console[_0x2a0f4f(0x95)](_0x2a0f4f(0x9b)+(_0x28b801[_0x2a0f4f(0xbc)]||a84_0x2f943d[_0x2a0f4f(0x8a)]('(not\x20set)'))),console['log'](_0x2a0f4f(0x9a)+_0x28b801[_0x2a0f4f(0xb3)]),console['log'](_0x2a0f4f(0x8c)+_0x28b801['locale']),console[_0x2a0f4f(0x95)](_0x2a0f4f(0x89)+_0x28b801[_0x2a0f4f(0xc4)]),console[_0x2a0f4f(0x95)](_0x2a0f4f(0xb9)+(_0x28b801['defaultApp']||a84_0x2f943d['gray'](_0x2a0f4f(0xbd)))),console[_0x2a0f4f(0x95)](_0x2a0f4f(0xa5)+(_0x28b801[_0x2a0f4f(0xa1)]||a84_0x2f943d[_0x2a0f4f(0xaf)](_0x2a0f4f(0xbd)))),console[_0x2a0f4f(0x95)](_0x2a0f4f(0xb2)+(_0x28b801[_0x2a0f4f(0xcd)]||a84_0x2f943d[_0x2a0f4f(0xaf)](_0x2a0f4f(0xbd)))),console[_0x2a0f4f(0x95)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x28b801['format']||a84_0x2f943d[_0x2a0f4f(0xaf)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x2a0f4f(0xac)]+')'))),console[_0x2a0f4f(0x95)](_0x2a0f4f(0x98)+(_0x28b801['pageSize']??a84_0x2f943d[_0x2a0f4f(0xaf)](_0x2a0f4f(0x96)))),console[_0x2a0f4f(0x95)](_0x2a0f4f(0xc8)+_0x28b801[_0x2a0f4f(0xc1)]),console[_0x2a0f4f(0x95)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x28b801[_0x2a0f4f(0x93)]),console[_0x2a0f4f(0x95)](_0x2a0f4f(0xd5)+(_0x28b801[_0x2a0f4f(0xb6)]?a84_0x2f943d[_0x2a0f4f(0xb5)](_0x2a0f4f(0xd7)+_0x28b801[_0x2a0f4f(0xb6)][_0x2a0f4f(0x97)]+')'):_0x427a73?a84_0x2f943d[_0x2a0f4f(0xb5)](_0x2a0f4f(0x87)+_0x427a73[_0x2a0f4f(0x97)]+')'):a84_0x2f943d[_0x2a0f4f(0xaf)](_0x2a0f4f(0xbd))));const _0x5ceab2=Object[_0x2a0f4f(0xda)](_0x28b801[_0x2a0f4f(0x94)]);if(_0x5ceab2[_0x2a0f4f(0x97)]>0x0){console[_0x2a0f4f(0x95)](),console['log'](a84_0x2f943d[_0x2a0f4f(0x88)](_0x2a0f4f(0x9c))),console[_0x2a0f4f(0x95)](a84_0x2f943d[_0x2a0f4f(0xaf)](_0x2a0f4f(0x90)[_0x2a0f4f(0xdb)](0x1e)));for(const _0x31d320 of _0x5ceab2){const _0xbc774d=_0x28b801[_0x2a0f4f(0x94)][_0x31d320],_0x49fbce=_0x31d320===_0x28b801[_0x2a0f4f(0xa7)],_0x5136e7=_0x31d320===_0x28b801['currentApp'],_0x47e7db=_0x5136e7?a84_0x2f943d[_0x2a0f4f(0xb5)]('\x20←\x20current'):'',_0x419a7c=_0x49fbce?_0x2a0f4f(0xca):'';console['log']('\x20\x20'+_0x31d320+_0x419a7c+_0x47e7db),console['log'](_0x2a0f4f(0xc9)+_0xbc774d['appcode']);const _0x4e5e2d=buildAppDoctorFields(_0xbc774d,{'env':_0x28b801[_0x2a0f4f(0xb3)],'apiDir':_0x28b801[_0x2a0f4f(0xc7)][_0x2a0f4f(0xc4)]||DEFAULT_CONFIG_VALUES[_0x2a0f4f(0xc4)],'cookie':_0x28b801['cookie']||_0x427a73||undefined,'accessKey':_0x28b801[_0x2a0f4f(0xba)]});console[_0x2a0f4f(0x95)](_0x2a0f4f(0xc3)+_0x4e5e2d[_0x2a0f4f(0xb3)][_0x2a0f4f(0xd1)]+'\x20\x20'+a84_0x2f943d[_0x2a0f4f(0xaf)]('('+_0x4e5e2d[_0x2a0f4f(0xb3)][_0x2a0f4f(0xae)]+')')),console[_0x2a0f4f(0x95)](_0x2a0f4f(0xc5)+_0x4e5e2d['apiDir'][_0x2a0f4f(0xd1)]+'\x20\x20'+a84_0x2f943d['gray']('('+_0x4e5e2d[_0x2a0f4f(0xc4)]['source']+')'));const _0xedd7d5=_0x4e5e2d['cookie'][_0x2a0f4f(0xd1)]?a84_0x2f943d[_0x2a0f4f(0xb5)](_0x2a0f4f(0xd7)+_0x4e5e2d[_0x2a0f4f(0xb6)][_0x2a0f4f(0xd1)]['length']+')'):a84_0x2f943d[_0x2a0f4f(0xaf)](_0x2a0f4f(0xbd));console[_0x2a0f4f(0x95)](_0x2a0f4f(0xa8)+_0xedd7d5+'\x20\x20'+a84_0x2f943d['gray']('('+_0x4e5e2d[_0x2a0f4f(0xb6)][_0x2a0f4f(0xae)]+')'));const _0x302fe2=_0x4e5e2d[_0x2a0f4f(0xba)][_0x2a0f4f(0xd1)]?a84_0x2f943d[_0x2a0f4f(0xb5)](_0x2a0f4f(0xd7)+_0x4e5e2d['accessKey'][_0x2a0f4f(0xd1)]['length']+')'):a84_0x2f943d[_0x2a0f4f(0xaf)]('(none)');console[_0x2a0f4f(0x95)](_0x2a0f4f(0xcc)+_0x302fe2+'\x20\x20'+a84_0x2f943d[_0x2a0f4f(0xaf)]('('+_0x4e5e2d['accessKey'][_0x2a0f4f(0xae)]+')'));}}console[_0x2a0f4f(0x95)](),console['log'](a84_0x2f943d[_0x2a0f4f(0x88)]('\x20\x20API\x20Endpoints')),console[_0x2a0f4f(0x95)](a84_0x2f943d[_0x2a0f4f(0xaf)]('\x20\x20─'[_0x2a0f4f(0xdb)](0x1e))),console['log'](_0x2a0f4f(0xc0)+getApiDomain()),console[_0x2a0f4f(0x95)](_0x2a0f4f(0xa4)+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x2a0f4f(0x95)](),console[_0x2a0f4f(0x95)](a84_0x2f943d[_0x2a0f4f(0x88)](_0x2a0f4f(0xb0))),console[_0x2a0f4f(0x95)](a84_0x2f943d['gray'](_0x2a0f4f(0x90)[_0x2a0f4f(0xdb)](0x1e)));if(_0x427a73){const _0x1015e=await getIsSessionValid();console[_0x2a0f4f(0x95)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1015e?a84_0x2f943d['green'](_0x2a0f4f(0xbe)):a84_0x2f943d[_0x2a0f4f(0x8a)](_0x2a0f4f(0x8d))));}else console['log'](_0x2a0f4f(0x8e)+a84_0x2f943d[_0x2a0f4f(0x8a)](_0x2a0f4f(0x9d)));return console['log'](),{'ok':!![]};}function a84_0x4ecf(_0x20efd8,_0x4290ae){_0x20efd8=_0x20efd8-0x87;const _0x3f8149=a84_0x3f81();let _0x4ecf11=_0x3f8149[_0x20efd8];return _0x4ecf11;}export const doctorDefinition={'service':a84_0x4d4b27(0xb8),'command':a84_0x4d4b27(0xab),'description':a84_0x4d4b27(0xbf),'risk':a84_0x4d4b27(0x8b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a85_0x61a80=a85_0x8ef1;(function(_0x36c8e8,_0xdf7891){const _0x5743fe=a85_0x8ef1,_0x2d3790=_0x36c8e8();while(!![]){try{const _0x24f971=parseInt(_0x5743fe(0x77))/0x1+-parseInt(_0x5743fe(0x90))/0x2*(parseInt(_0x5743fe(0x82))/0x3)+-parseInt(_0x5743fe(0x8b))/0x4*(parseInt(_0x5743fe(0x78))/0x5)+-parseInt(_0x5743fe(0xa3))/0x6*(-parseInt(_0x5743fe(0x8c))/0x7)+parseInt(_0x5743fe(0x93))/0x8*(parseInt(_0x5743fe(0xa1))/0x9)+-parseInt(_0x5743fe(0x7c))/0xa+-parseInt(_0x5743fe(0x95))/0xb*(-parseInt(_0x5743fe(0x8a))/0xc);if(_0x24f971===_0xdf7891)break;else _0x2d3790['push'](_0x2d3790['shift']());}catch(_0x49a6a0){_0x2d3790['push'](_0x2d3790['shift']());}}}(a85_0x5555,0xb995f));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';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 a85_0x8ef1(_0x110e60,_0x918306){_0x110e60=_0x110e60-0x75;const _0x5555ee=a85_0x5555();let _0x8ef1a7=_0x5555ee[_0x110e60];return _0x8ef1a7;}function syntheticApp(_0x3b0d44){return{'appCode':_0x3b0d44,'appName':_0x3b0d44};}function writeInitConfig(_0x2888d4,_0x201ac8,_0x4b593d){const _0x5a7840=a85_0x8ef1,_0x36abe1=resolveWriteConfigPath(_0x2888d4),_0x44748f=buildCanonicalProjectConfig({},{'appCodes':_0x201ac8['map'](_0x57cb9f=>_0x57cb9f['appCode']),'env':_0x4b593d,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x36abe1,_0x44748f);const _0x25b663=_0x2888d4===_0x5a7840(0xa0)?_0x5a7840(0xa0):_0x5a7840(0x87);console['log'](_0x5a7840(0x76)+_0x25b663+'\x20config'),console['log'](_0x5a7840(0x9d)+_0x201ac8[_0x5a7840(0x7a)](_0x2b36cf=>_0x2b36cf[_0x5a7840(0x98)])[_0x5a7840(0x86)](',\x20')),console[_0x5a7840(0x7f)](_0x5a7840(0x8f)+_0x44748f[_0x5a7840(0x8e)]),console[_0x5a7840(0x7f)](_0x5a7840(0x88)+_0x44748f[_0x5a7840(0x7b)]),console[_0x5a7840(0x7f)](_0x5a7840(0x91)+_0x36abe1);}async function runSmartInit(_0x3aeefa){const _0x216c47=a85_0x8ef1,_0x29e651=process['cwd'](),_0x1ded54=_0x3aeefa[_0x216c47(0x97)](_0x216c47(0xa0))?_0x216c47(0xa0):'project',_0x4ef11=_0x3aeefa[_0x216c47(0x96)](_0x216c47(0x7b))||'production',_0x2669ab=_0x3aeefa[_0x216c47(0x96)](_0x216c47(0x80))||undefined,_0x4c57f4=_0x3aeefa['bool'](_0x216c47(0x87));if(_0x4c57f4){const {initConfig:_0x3838c0}=await import(_0x216c47(0x85));return _0x3838c0({'appcode':_0x2669ab,'env':_0x4ef11,'autoYes':_0x3aeefa['bool']('yes')});}if(_0x1ded54===_0x216c47(0x87)){const _0x3a2710=existsSync(resolve(_0x29e651,NEW_CONFIG_NAME)),_0x44d99b=LEGACY_CONFIG_NAMES['some'](_0x5358da=>existsSync(resolve(_0x29e651,_0x5358da)));if(_0x44d99b&&!_0x3a2710)return console[_0x216c47(0x7f)](_0x216c47(0x9e)),upgradeApp(_0x3aeefa['nonInteractive'],{'yes':_0x3aeefa[_0x216c47(0x97)](_0x216c47(0xa4))});if(_0x3a2710)throw CliErrors['validation'](_0x216c47(0x84),_0x216c47(0x83)+CLI_BIN_NAME+_0x216c47(0x7d));}if(_0x2669ab){const _0x2d9eb1=validateAppcode(_0x2669ab);if(!_0x2d9eb1['valid'])throw CliErrors[_0x216c47(0x9b)](_0x2d9eb1[_0x216c47(0x8d)]);writeInitConfig(_0x1ded54,[syntheticApp(_0x2669ab)],_0x4ef11);return;}if(_0x3aeefa[_0x216c47(0x9f)])throw CliErrors[_0x216c47(0x94)](_0x216c47(0x80),'Usage:\x20'+CLI_BIN_NAME+_0x216c47(0x92));const _0x3861c9=getCookie(),_0x4d2fad=await selectMultipleApps(_0x3861c9),_0x23ef8a=_0x4d2fad===_0x216c47(0x99)?[syntheticApp(await promptCustomAppcode())]:_0x4d2fad;writeInitConfig(_0x1ded54,_0x23ef8a,_0x4ef11);}const initFlags=[{'name':a85_0x61a80(0xa0),'type':'boolean','description':'Write\x20to\x20global\x20config\x20instead\x20of\x20project','default':![]},{'name':a85_0x61a80(0x7b),'type':a85_0x61a80(0x81),'description':a85_0x61a80(0xa2),'default':'production','enum':[...RABETBASE_ENV_VALUES]},{'name':a85_0x61a80(0x80),'type':a85_0x61a80(0x81),'description':a85_0x61a80(0x75)},{'name':'project','type':a85_0x61a80(0x7e),'description':'Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','default':![]},{'name':'yes','type':a85_0x61a80(0x7e),'description':'Auto-confirm\x20prompts','default':![]}];function a85_0x5555(){const _0x47e200=['string','12gLvqsb','Use\x20`','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','../../commands/project/init.js','join','project','\x20\x20Env:\x20','init','7875564yMPnQj','2721188vyDeoh','21MXMcSx','message','defaultApp','\x20\x20Default:\x20','262322uRpnBd','\x20\x20Config:\x20','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','16gmiFty','flagMissing','11xAmrNv','str','bool','appCode','custom','write','validation','run','\x20\x20Apps:\x20','检测到旧配置文件,正在自动升级...\x0a','nonInteractive','global','6373179JCKzmm','Target\x20environment','900462FjwwTy','yes','App\x20code\x20to\x20initialize\x20with','\x0a✓\x20Successfully\x20initialized\x20','783279gtwaPC','5yGsKGc','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','map','env','13409690XEAooS','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','boolean','log','appcode'];a85_0x5555=function(){return _0x47e200;};return a85_0x5555();}export const initDefinitions=[{'service':a85_0x61a80(0x89),'command':a85_0x61a80(0x9c),'description':a85_0x61a80(0x79),'risk':a85_0x61a80(0x9a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x52be0c){return await runSmartInit(_0x52be0c),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1a0d3d,_0xa73152){const _0x3d718d=a86_0x4ad3,_0xd5f60c=_0x1a0d3d();while(!![]){try{const _0x482224=-parseInt(_0x3d718d(0x70))/0x1*(-parseInt(_0x3d718d(0x76))/0x2)+parseInt(_0x3d718d(0x6f))/0x3+parseInt(_0x3d718d(0x73))/0x4+-parseInt(_0x3d718d(0x71))/0x5*(parseInt(_0x3d718d(0x75))/0x6)+parseInt(_0x3d718d(0x6c))/0x7+parseInt(_0x3d718d(0x6e))/0x8*(parseInt(_0x3d718d(0x6d))/0x9)+-parseInt(_0x3d718d(0x74))/0xa*(parseInt(_0x3d718d(0x72))/0xb);if(_0x482224===_0xa73152)break;else _0xd5f60c['push'](_0xd5f60c['shift']());}catch(_0x16715f){_0xd5f60c['push'](_0xd5f60c['shift']());}}}(a86_0x2bbe,0x830c6));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];function a86_0x4ad3(_0xaeef19,_0x2eef49){_0xaeef19=_0xaeef19-0x6c;const _0x2bbe30=a86_0x2bbe();let _0x4ad332=_0x2bbe30[_0xaeef19];return _0x4ad332;}function a86_0x2bbe(){const _0x4a67ae=['2749292vwqniN','3735Mnhzeu','9368XGFhuB','1128456ufJtkb','2kivptQ','10pFiaIa','18435967lVNijO','443760WPHcmL','10TnHnGs','394104tiuykw','978326WJdqGD'];a86_0x2bbe=function(){return _0x4a67ae;};return a86_0x2bbe();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0x4631bc=a87_0x47f1;(function(_0x39857c,_0xbbfb75){const _0x351db3=a87_0x47f1,_0x40bc6b=_0x39857c();while(!![]){try{const _0x17da6a=parseInt(_0x351db3(0xac))/0x1+-parseInt(_0x351db3(0xa4))/0x2*(-parseInt(_0x351db3(0xbc))/0x3)+parseInt(_0x351db3(0xb7))/0x4*(parseInt(_0x351db3(0xbd))/0x5)+-parseInt(_0x351db3(0xab))/0x6+parseInt(_0x351db3(0xc0))/0x7+-parseInt(_0x351db3(0xa3))/0x8+-parseInt(_0x351db3(0xb3))/0x9*(-parseInt(_0x351db3(0xb0))/0xa);if(_0x17da6a===_0xbbfb75)break;else _0x40bc6b['push'](_0x40bc6b['shift']());}catch(_0x5ea1b7){_0x40bc6b['push'](_0x40bc6b['shift']());}}}(a87_0x8694,0x692e9));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a87_0x4631bc(0xa2);const NUDGE_SUPPRESSED_CODES=new Set([a87_0x4631bc(0xa6),a87_0x4631bc(0xae),a87_0x4631bc(0xc1),'not_in_project',a87_0x4631bc(0xb1),a87_0x4631bc(0xa9),a87_0x4631bc(0xaf),a87_0x4631bc(0xb2)]),defaultWriter=_0x46be7e=>{const _0x1f9304=a87_0x4631bc;process[_0x1f9304(0xaa)][_0x1f9304(0xbb)](_0x46be7e);};export function shouldNudgeForError(_0x4cbc44,_0x1558e2){const _0x132011=a87_0x4631bc;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x1558e2[_0x132011(0xa8)]==='issue'&&_0x1558e2[_0x132011(0xa1)]===_0x132011(0xbf))return![];if(_0x4cbc44 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x132011(0xa0)](_0x4cbc44[_0x132011(0xa5)]);return!![];}function a87_0x8694(){const _0xcf2071=['message','replace','255876hbGGQO','length','\x20\x20Set\x20','\x20issue\x20report\x20\x5c','write','203979fpTFoX','30QpIcZs','trim','report','4176571CzGvHJ','config_missing','has','command','RABETBASE_DISABLE_ISSUE_NUDGE','6616416stzjfM','4CxNZkA','code','cancelled','slice','service','flag_missing','stderr','4101432UoqanT','729143UnrWzz','=1\x20to\x20silence\x20this\x20hint.','auth_required','validation_error','890xpdRdc','unknown_command','network_error','9693ycxrbT','\x20\x20\x20\x20--title\x20\x22'];a87_0x8694=function(){return _0xcf2071;};return a87_0x8694();}function a87_0x47f1(_0x6e7f9,_0x26fdd6){_0x6e7f9=_0x6e7f9-0xa0;const _0x8694ce=a87_0x8694();let _0x47f188=_0x8694ce[_0x6e7f9];return _0x47f188;}export function printIssueReportNudgeForError(_0x4a441f,_0x30ea4a,_0x3b2f47=defaultWriter){if(!shouldNudgeForError(_0x4a441f,_0x30ea4a))return;const _0x77663=buildSuggestedTitle(_0x4a441f,_0x30ea4a);_0x3b2f47(formatNudge(_0x77663));}function buildSuggestedTitle(_0x2f3add,_0x4fe452){const _0x239b93=a87_0x4631bc,_0x1a838b=_0x2f3add instanceof Error?_0x2f3add[_0x239b93(0xb5)]:String(_0x2f3add),_0x127100=_0x1a838b[_0x239b93(0xb6)](/[\r\n]+/g,'\x20')[_0x239b93(0xb6)](/\s+/g,'\x20')[_0x239b93(0xbe)]()[_0x239b93(0xa7)](0x0,0x78)[_0x239b93(0xb6)](/"/g,'\x5c\x22'),_0x3da592=CLI_BIN_NAME+'\x20'+_0x4fe452['service']+'\x20'+_0x4fe452[_0x239b93(0xa1)];return _0x127100[_0x239b93(0xb8)]>0x0?_0x3da592+':\x20'+_0x127100:_0x3da592;}function formatNudge(_0x328c0e){const _0x3714c8=a87_0x4631bc;return['','Hit\x20a\x20'+CLI_BIN_NAME+'\x20bug?\x20Help\x20us\x20fix\x20it:','\x20\x20'+CLI_BIN_NAME+_0x3714c8(0xba),_0x3714c8(0xb4)+_0x328c0e+'\x22\x20\x5c','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)',_0x3714c8(0xb9)+NUDGE_OPT_OUT_ENV+_0x3714c8(0xad),'']['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0xeb74a0=a88_0x1d33;(function(_0x7db727,_0x4fd9ef){const _0xee95e3=a88_0x1d33,_0x44c704=_0x7db727();while(!![]){try{const _0x170be0=parseInt(_0xee95e3(0x1b1))/0x1+parseInt(_0xee95e3(0x1c4))/0x2+parseInt(_0xee95e3(0x1c1))/0x3*(-parseInt(_0xee95e3(0x1d7))/0x4)+parseInt(_0xee95e3(0x1a5))/0x5+parseInt(_0xee95e3(0x1d6))/0x6+-parseInt(_0xee95e3(0x1d2))/0x7*(-parseInt(_0xee95e3(0x1ca))/0x8)+-parseInt(_0xee95e3(0x1b5))/0x9*(parseInt(_0xee95e3(0x1d0))/0xa);if(_0x170be0===_0x4fd9ef)break;else _0x44c704['push'](_0x44c704['shift']());}catch(_0x203181){_0x44c704['push'](_0x44c704['shift']());}}}(a88_0x3db1,0xe76ef));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';function a88_0x1d33(_0x363f8e,_0x39e456){_0x363f8e=_0x363f8e-0x19c;const _0x3db133=a88_0x3db1();let _0x1d33db=_0x3db133[_0x363f8e];return _0x1d33db;}const DESCRIPTION_FILE_FLAG=a88_0xeb74a0(0x1b3);export const issueReport={'service':a88_0xeb74a0(0x1a8),'command':a88_0xeb74a0(0x1aa),'description':a88_0xeb74a0(0x1b2),'risk':a88_0xeb74a0(0x1c7),'requiresAuth':![],'requiresAppCode':![],'defaultOutputFormat':a88_0xeb74a0(0x19d),'flags':[{'name':a88_0xeb74a0(0x1cd),'type':'string','required':!![],'description':'One-line\x20issue\x20summary'},{'name':a88_0xeb74a0(0x1bc),'type':a88_0xeb74a0(0x1d3),'description':'Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)'},{'name':DESCRIPTION_FILE_FLAG,'type':a88_0xeb74a0(0x1d3),'description':a88_0xeb74a0(0x1d9)}],async 'validate'(_0x126800){const _0x112258=a88_0xeb74a0,_0x581b69=_0x126800[_0x112258(0x1a7)]('title')[_0x112258(0x1c2)](),_0x501ce4=_0x126800[_0x112258(0x1a7)]('description')[_0x112258(0x1c2)](),_0x29e3e0=_0x126800['str'](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x581b69)throw CliErrors[_0x112258(0x1c0)]('title',_0x112258(0x1a6));const _0x49fa16=_0x501ce4[_0x112258(0x19f)]>0x0,_0x5d1edf=_0x29e3e0['length']>0x0;if(_0x49fa16===_0x5d1edf)throw CliErrors[_0x112258(0x1ae)]('Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.',_0x112258(0x1a1));if(_0x5d1edf){const _0x425210=resolve(process[_0x112258(0x19c)](),_0x29e3e0);if(!existsSync(_0x425210))throw CliErrors['validation'](_0x112258(0x1ac)+_0x425210);}},async 'dryRun'(_0x1b5736){const _0x585c4c=a88_0xeb74a0,_0x2e63ee=await prepareIssueReport(_0x1b5736);return{'method':_0x585c4c(0x1cf),'url':'otel://'+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x2e63ee[_0x585c4c(0x1cd)],'issue.description':_0x2e63ee[_0x585c4c(0x1bc)],'issue.description_original_bytes':_0x2e63ee[_0x585c4c(0x1c5)][_0x585c4c(0x1b4)],'issue.description_truncated':_0x2e63ee[_0x585c4c(0x1c5)][_0x585c4c(0x1b8)],'issue.description_redactions':_0x2e63ee[_0x585c4c(0x1c5)][_0x585c4c(0x1a9)],'issue.description_redaction_kinds':_0x2e63ee[_0x585c4c(0x1c5)]['redactionKinds']['join'](',')}},'description':[_0x585c4c(0x1b0),'descriptionSource:\x20'+_0x2e63ee[_0x585c4c(0x1c6)],_0x2e63ee['descriptionFilePath']?_0x585c4c(0x1ad)+_0x2e63ee[_0x585c4c(0x1d5)]:null,_0x2e63ee[_0x585c4c(0x1c5)]['truncated']?_0x585c4c(0x1ce)+_0x2e63ee[_0x585c4c(0x1c5)]['originalBytes']+_0x585c4c(0x1a2):null,_0x2e63ee[_0x585c4c(0x1c5)][_0x585c4c(0x1a9)]>0x0?'redactions:\x20'+_0x2e63ee[_0x585c4c(0x1c5)][_0x585c4c(0x1a9)]+'\x20('+_0x2e63ee[_0x585c4c(0x1c5)][_0x585c4c(0x1bd)][_0x585c4c(0x1d8)](',\x20')+')':null][_0x585c4c(0x1a4)](Boolean)[_0x585c4c(0x1d8)]('\x0a')};},async 'execute'(_0x1ccb82){const _0x11b4a1=a88_0xeb74a0,_0x35a525=await prepareIssueReport(_0x1ccb82);try{await sendPlatformIssueCollectLog({'title':_0x35a525['title'],'description':_0x35a525['description'],'sanitize':{'originalBytes':_0x35a525['sanitize'][_0x11b4a1(0x1b4)],'truncated':_0x35a525['sanitize'][_0x11b4a1(0x1b8)],'redactionCount':_0x35a525[_0x11b4a1(0x1c5)][_0x11b4a1(0x1a9)],'redactionKinds':_0x35a525[_0x11b4a1(0x1c5)][_0x11b4a1(0x1bd)]}});}catch(_0x3f7273){throw CliErrors[_0x11b4a1(0x1a0)](_0x11b4a1(0x19e)+(_0x3f7273 instanceof Error?_0x3f7273[_0x11b4a1(0x1bf)]:String(_0x3f7273)),_0x11b4a1(0x1b9));}return{'ok':!![],'message':buildResultMessage(_0x35a525[_0x11b4a1(0x1c5)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x11b4a1(0x1bb),_0x11b4a1(0x1c3),_0x11b4a1(0x1af),_0x11b4a1(0x1b7),_0x11b4a1(0x1d1),'issue.description_redaction_kinds'],'issue':{'title':_0x35a525[_0x11b4a1(0x1cd)],'descriptionLength':_0x35a525[_0x11b4a1(0x1bc)][_0x11b4a1(0x19f)],'descriptionSource':_0x35a525[_0x11b4a1(0x1c6)],..._0x35a525['descriptionFilePath']?{'descriptionFile':_0x35a525[_0x11b4a1(0x1d5)]}:{},'sanitize':{'originalBytes':_0x35a525['sanitize'][_0x11b4a1(0x1b4)],'truncated':_0x35a525[_0x11b4a1(0x1c5)]['truncated'],'redactions':_0x35a525[_0x11b4a1(0x1c5)][_0x11b4a1(0x1a9)],'redactionKinds':_0x35a525[_0x11b4a1(0x1c5)][_0x11b4a1(0x1bd)]}}}};}};function buildResultMessage(_0x3827ae){const _0x76f4ba=a88_0xeb74a0,_0x159833=[];return _0x3827ae[_0x76f4ba(0x1b8)]&&_0x159833[_0x76f4ba(0x1b6)](_0x76f4ba(0x1da)+_0x3827ae[_0x76f4ba(0x1b4)]+_0x76f4ba(0x1a2)),_0x3827ae[_0x76f4ba(0x1a9)]>0x0&&_0x159833['push'](_0x76f4ba(0x1ab)+_0x3827ae['redactionCount']+_0x76f4ba(0x1a3)+_0x3827ae[_0x76f4ba(0x1bd)][_0x76f4ba(0x1d8)](',\x20')),_0x159833[_0x76f4ba(0x19f)]===0x0?_0x76f4ba(0x1c8):_0x76f4ba(0x1d4)+_0x159833[_0x76f4ba(0x1d8)](';\x20')+')';}function a88_0x3db1(){const _0x3a4c8e=['Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','message','flagMissing','3973773VqnnlM','trim','issue.description','2582506ajHRRL','sanitize','descriptionSource','write','Platform\x20issue\x20reported','file','136JMIVJU','Issue\x20description\x20file\x20is\x20empty:\x20','inline','title','truncated:\x20original\x20','POST','2580BVnaet','issue.description_redactions','159586GdAnTl','string','Platform\x20issue\x20reported\x20(','descriptionFilePath','8129172rFhWqP','4NtELMo','join','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','truncated\x20from\x20','cwd','compress','Failed\x20to\x20report\x20platform\x20issue:\x20','length','apiError','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','\x20bytes','\x20secret(s):\x20','filter','2650660eUvDGP','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','str','issue','redactionCount','report','redacted\x20','File\x20not\x20found:\x20','descriptionFile:\x20','validation','issue.description_original_bytes','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','1817371ZELZvx','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','description-file','originalBytes','108441syOnum','push','issue.description_truncated','truncated','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','utf8','issue.title','description','redactionKinds'];a88_0x3db1=function(){return _0x3a4c8e;};return a88_0x3db1();}async function prepareIssueReport(_0x972c1f){const _0x3b2db6=a88_0xeb74a0,_0x2d661b=_0x972c1f[_0x3b2db6(0x1a7)](_0x3b2db6(0x1cd))[_0x3b2db6(0x1c2)](),_0x413f21=_0x972c1f[_0x3b2db6(0x1a7)](_0x3b2db6(0x1bc)),_0x7612fa=_0x972c1f[_0x3b2db6(0x1a7)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x7612fa){const _0x55e0b8=_0x413f21;if(!_0x55e0b8['trim']())throw CliErrors['validation']('Issue\x20description\x20cannot\x20be\x20empty.','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.');const _0x251578=sanitizeIssueDescription(_0x55e0b8);return{'title':_0x2d661b,'description':_0x251578['description'],'descriptionSource':_0x3b2db6(0x1cc),'sanitize':_0x251578};}const _0x3ac229=resolve(process['cwd'](),_0x7612fa),_0x3943eb=await readFile(_0x3ac229,_0x3b2db6(0x1ba));if(!_0x3943eb[_0x3b2db6(0x1c2)]())throw CliErrors[_0x3b2db6(0x1ae)](_0x3b2db6(0x1cb)+_0x3ac229,_0x3b2db6(0x1be));const _0x45c5cb=sanitizeIssueDescription(_0x3943eb);return{'title':_0x2d661b,'description':_0x45c5cb['description'],'descriptionSource':_0x3b2db6(0x1c9),'descriptionFilePath':_0x3ac229,'sanitize':_0x45c5cb};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a89_0x101d(){const _0x157c55=['224BAbujT','private-key','authorization','kind','286345tdYtVr','bearer-jwt','string','pattern','push','3965706JZwyHv','114630VyVrVH','byteLength','10gxbMnh','48238553PszqDN','replace','password','REDACTED:authorization','1036233gmIMtZ','subarray','313812eFlfIM','184TtepFj','REDACTED:cookie','REDACTED:password','toString','max','cookie','includes','350242XQEXtU','REDACTED:private-key','REDACTED:access-key','REDACTED:bearer-jwt','80jMZiZl','utf8'];a89_0x101d=function(){return _0x157c55;};return a89_0x101d();}const a89_0x4ffd6c=a89_0x398d;(function(_0x47ed26,_0x1ef3c2){const _0xa08bbd=a89_0x398d,_0x4f1938=_0x47ed26();while(!![]){try{const _0x59e91f=-parseInt(_0xa08bbd(0x111))/0x1+parseInt(_0xa08bbd(0xfa))/0x2+-parseInt(_0xa08bbd(0x109))/0x3+parseInt(_0xa08bbd(0xfe))/0x4*(-parseInt(_0xa08bbd(0x104))/0x5)+parseInt(_0xa08bbd(0x10a))/0x6*(parseInt(_0xa08bbd(0x100))/0x7)+-parseInt(_0xa08bbd(0x114))/0x8*(parseInt(_0xa08bbd(0x113))/0x9)+-parseInt(_0xa08bbd(0x10c))/0xa*(-parseInt(_0xa08bbd(0x10d))/0xb);if(_0x59e91f===_0x1ef3c2)break;else _0x4f1938['push'](_0x4f1938['shift']());}catch(_0x249ae2){_0x4f1938['push'](_0x4f1938['shift']());}}}(a89_0x101d,0xd3815));function a89_0x398d(_0x4dbeed,_0x34e9f7){_0x4dbeed=_0x4dbeed-0xf7;const _0x101d60=a89_0x101d();let _0x398d2f=_0x101d60[_0x4dbeed];return _0x398d2f;}export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE='\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]',REDACTION_RULES=[{'kind':a89_0x4ffd6c(0xf8),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a89_0x4ffd6c(0x115)},{'kind':a89_0x4ffd6c(0x102),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a89_0x4ffd6c(0x110)},{'kind':a89_0x4ffd6c(0x101),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a89_0x4ffd6c(0xfb)},{'kind':'access-key','pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a89_0x4ffd6c(0xfc)},{'kind':a89_0x4ffd6c(0x10f),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a89_0x4ffd6c(0x116)},{'kind':a89_0x4ffd6c(0x105),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a89_0x4ffd6c(0xfd)}];export function sanitizeIssueDescription(_0x33bbee){const _0x49072c=a89_0x4ffd6c,_0x27f663=Buffer['byteLength'](_0x33bbee,_0x49072c(0xff)),_0x4e703f=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x425edb=_0x33bbee,_0x251f84=0x0;const _0x3fef89=[];if(!_0x4e703f)for(const _0x4a40f3 of REDACTION_RULES){let _0x54496c=0x0;_0x425edb=_0x425edb[_0x49072c(0x10e)](_0x4a40f3[_0x49072c(0x107)],(_0x274a45,_0x124ea1)=>{const _0x45e768=_0x49072c;_0x54496c+=0x1;const _0x3e06d7=typeof _0x124ea1===_0x45e768(0x106)?_0x124ea1:'';return _0x3e06d7+'['+_0x4a40f3['label']+']';}),_0x54496c>0x0&&(_0x251f84+=_0x54496c,!_0x3fef89[_0x49072c(0xf9)](_0x4a40f3[_0x49072c(0x103)])&&_0x3fef89[_0x49072c(0x108)](_0x4a40f3[_0x49072c(0x103)]));}let _0x16367f=![];if(Buffer[_0x49072c(0x10b)](_0x425edb,_0x49072c(0xff))>ISSUE_DESCRIPTION_MAX_BYTES){_0x16367f=!![];const _0xbc75c3=Buffer[_0x49072c(0x10b)](TRUNCATION_NOTICE,_0x49072c(0xff)),_0x50ebbe=Math[_0x49072c(0xf7)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0xbc75c3);_0x425edb=sliceUtf8Bytes(_0x425edb,_0x50ebbe)+TRUNCATION_NOTICE;}return{'description':_0x425edb,'originalBytes':_0x27f663,'truncated':_0x16367f,'redactionCount':_0x251f84,'redactionKinds':_0x3fef89};}function sliceUtf8Bytes(_0x2444a7,_0x5cff16){const _0x59c008=a89_0x4ffd6c;if(_0x5cff16<=0x0)return'';const _0xbe8ba7=Buffer['from'](_0x2444a7,'utf8');if(_0xbe8ba7[_0x59c008(0x10b)]<=_0x5cff16)return _0x2444a7;let _0x3983d7=_0x5cff16;while(_0x3983d7>0x0){const _0x4d4150=_0xbe8ba7[_0x3983d7];if(_0x4d4150===undefined||(_0x4d4150&0xc0)!==0x80)break;_0x3983d7-=0x1;}return _0xbe8ba7[_0x59c008(0x112)](0x0,_0x3983d7)[_0x59c008(0x117)]('utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a90_0x130787=a90_0xa5d2;(function(_0x3c3656,_0x24baa5){const _0x476a68=a90_0xa5d2,_0x1bb951=_0x3c3656();while(!![]){try{const _0x9ad893=-parseInt(_0x476a68(0x184))/0x1+parseInt(_0x476a68(0x171))/0x2+-parseInt(_0x476a68(0x16c))/0x3*(parseInt(_0x476a68(0x185))/0x4)+parseInt(_0x476a68(0x182))/0x5+parseInt(_0x476a68(0x16b))/0x6*(parseInt(_0x476a68(0x188))/0x7)+parseInt(_0x476a68(0x17c))/0x8*(-parseInt(_0x476a68(0x17d))/0x9)+parseInt(_0x476a68(0x172))/0xa;if(_0x9ad893===_0x24baa5)break;else _0x1bb951['push'](_0x1bb951['shift']());}catch(_0x42185b){_0x1bb951['push'](_0x1bb951['shift']());}}}(a90_0xf8d5,0x4ef06));import{logger}from'../../utils/logger.js';function a90_0xa5d2(_0x131610,_0x41875f){_0x131610=_0x131610-0x16a;const _0xf8d5b7=a90_0xf8d5();let _0xa5d2af=_0xf8d5b7[_0x131610];return _0xa5d2af;}function printLogs(_0x66391e){const _0x52ced3=a90_0xa5d2;if(_0x66391e[_0x52ced3(0x189)]===0x0){console[_0x52ced3(0x177)](_0x52ced3(0x176));return;}console[_0x52ced3(0x177)](_0x52ced3(0x180)),_0x66391e['forEach']((_0xf071bc,_0x4cf655)=>{const _0x510d98=_0x52ced3,_0x111711=new Date(_0xf071bc[_0x510d98(0x17a)])[_0x510d98(0x178)](_0x510d98(0x16d)),_0x58b495=_0xf071bc['level']==='success'?'√':_0xf071bc['level']===_0x510d98(0x17f)?'×':_0xf071bc[_0x510d98(0x181)]==='warn'?'!':'i';console[_0x510d98(0x177)](_0x4cf655+0x1+'.\x20'+_0x58b495+'\x20['+_0xf071bc[_0x510d98(0x17e)]+']\x20'+_0xf071bc[_0x510d98(0x18b)]),console[_0x510d98(0x177)](_0x510d98(0x186)+_0x111711),_0xf071bc[_0x510d98(0x175)]&&console[_0x510d98(0x177)](_0x510d98(0x170)+_0xf071bc[_0x510d98(0x175)]+'ms'),_0xf071bc[_0x510d98(0x187)]&&Object[_0x510d98(0x16f)](_0xf071bc[_0x510d98(0x187)])['length']>0x0&&console[_0x510d98(0x177)](_0x510d98(0x183)+JSON[_0x510d98(0x18c)](_0xf071bc['details'],null,0x2)),console[_0x510d98(0x177)]('');});}export const logsDefinitions=[{'service':a90_0x130787(0x173),'command':'show','description':a90_0x130787(0x16a),'risk':a90_0x130787(0x18a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2b986d){const _0x1d0397=a90_0x130787;return printLogs(logger[_0x1d0397(0x179)]()),{'ok':!![]};}},{'service':'logs','command':a90_0x130787(0x16e),'description':a90_0x130787(0x174),'risk':a90_0x130787(0x17b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x51d2ad){const _0x4dd89c=a90_0x130787;return logger['clearLogs'](),console[_0x4dd89c(0x177)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];function a90_0xf8d5(){const _0x18fac3=['*\x20Lovrabet\x20CLI\x20logs:\x0a','level','1249970ZsFnpi','\x20\x20\x20Details:\x20','165806SldrbO','996924lebUim','\x20\x20\x20Time:\x20','details','608846UXOoxA','length','read','message','stringify','View\x20command\x20history\x20logs','42IBQYLA','6bupOyI','en-US','clear','keys','\x20\x20\x20Duration:\x20','517668UvnsyC','758850PeZaxu','logs','Clear\x20command\x20history\x20logs','duration','*\x20No\x20logs\x20found','log','toLocaleString','readLogs','timestamp','write','8eWfYHt','1853613OUATWD','command','error'];a90_0xf8d5=function(){return _0x18fac3;};return a90_0xf8d5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x54f7ad,_0x25ecf5){const _0xcc80e6=a91_0x2ded,_0x1a6fd9=_0x54f7ad();while(!![]){try{const _0x4a182a=-parseInt(_0xcc80e6(0x7b))/0x1*(-parseInt(_0xcc80e6(0x7d))/0x2)+parseInt(_0xcc80e6(0x7c))/0x3+parseInt(_0xcc80e6(0x7f))/0x4+parseInt(_0xcc80e6(0x78))/0x5+parseInt(_0xcc80e6(0x7a))/0x6+parseInt(_0xcc80e6(0x79))/0x7+-parseInt(_0xcc80e6(0x7e))/0x8;if(_0x4a182a===_0x25ecf5)break;else _0x1a6fd9['push'](_0x1a6fd9['shift']());}catch(_0x51e55b){_0x1a6fd9['push'](_0x1a6fd9['shift']());}}}(a91_0x4564,0xeeb2c));import{menuList}from'../../commands/menu/list.js';function a91_0x2ded(_0x3ce19c,_0x491af3){_0x3ce19c=_0x3ce19c-0x78;const _0x45640d=a91_0x4564();let _0x2ded4e=_0x45640d[_0x3ce19c];return _0x2ded4e;}import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';export const menuDefinitions=[menuList,menuSync,menuUpdate];function a91_0x4564(){const _0x5de903=['50802008MIZOcX','7504664kbmjsp','762805cJKIEe','10783605ZbVMdF','1810110LRPXtr','1773295wTesQD','5051211xQaoAb','2XgzzpW'];a91_0x4564=function(){return _0x5de903;};return a91_0x4564();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a92_0x5a1006=a92_0xa1bd;function a92_0xa1bd(_0x1795b0,_0x4af131){_0x1795b0=_0x1795b0-0x153;const _0x543720=a92_0x5437();let _0xa1bd67=_0x543720[_0x1795b0];return _0xa1bd67;}(function(_0x4bebfb,_0x1d71b9){const _0x19fbd6=a92_0xa1bd,_0xa65d7d=_0x4bebfb();while(!![]){try{const _0x1516d5=-parseInt(_0x19fbd6(0x154))/0x1+parseInt(_0x19fbd6(0x175))/0x2+parseInt(_0x19fbd6(0x176))/0x3*(parseInt(_0x19fbd6(0x15b))/0x4)+-parseInt(_0x19fbd6(0x161))/0x5*(-parseInt(_0x19fbd6(0x157))/0x6)+parseInt(_0x19fbd6(0x15e))/0x7+-parseInt(_0x19fbd6(0x170))/0x8*(-parseInt(_0x19fbd6(0x168))/0x9)+-parseInt(_0x19fbd6(0x16e))/0xa*(parseInt(_0x19fbd6(0x16b))/0xb);if(_0x1516d5===_0x1d71b9)break;else _0xa65d7d['push'](_0xa65d7d['shift']());}catch(_0x4eddfc){_0xa65d7d['push'](_0xa65d7d['shift']());}}}(a92_0x5437,0xe72c9));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a92_0x5437(){const _0x4b2313=['/smartapi/menu/find?appCode=','length','10368379WyAmVx','map','Return\x20extend\x20field\x20for\x20troubleshooting\x20resource\x20parsing','3826595wcgzFT','No\x20menus\x20found.','cookie','push','\x20menu(s)','verbose','resources','90iHZHby','depth','sort','374209CdcKRR','string','path','980IxHgIr','number','316336DwiNjF','Fetch\x20menu\x20list','isFinite','List\x20online\x20menu\x20facts\x20for\x20the\x20current\x20app','isArray','3503056Dfnolh','834RhHlVm','parse','type','index','visible','779357LOivYt','boolean','extend','6IeLyCt','read','children','item','9592kLwCVr'];a92_0x5437=function(){return _0x4b2313;};return a92_0x5437();}import{getApiDomain}from'../../constant/domain.js';import{platformFetch}from'../../core/api-client.js';export const menuList={'service':'menu','command':'list','description':a92_0x5a1006(0x173),'risk':a92_0x5a1006(0x158),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a92_0x5a1006(0x166),'type':a92_0x5a1006(0x155),'description':a92_0x5a1006(0x160)}],async 'execute'(_0xd382f8){const _0x490991=a92_0x5a1006,_0x1d32f6=_0xd382f8['bool'](_0x490991(0x166)),_0x2d092e=await platformFetch(getApiDomain()+_0x490991(0x15c)+_0xd382f8['appCode'],{'cookie':_0xd382f8[_0x490991(0x163)],'label':_0x490991(0x171)}),_0x4fec35=flattenMenuItems(Array[_0x490991(0x174)](_0x2d092e)?_0x2d092e:[],{'verbose':_0x1d32f6,'parentId':null,'depth':0x0});return{'ok':!![],'data':{'total':_0x4fec35[_0x490991(0x15d)],'menus':_0x4fec35},'message':_0x4fec35[_0x490991(0x15d)]===0x0?_0x490991(0x162):'Found\x20'+_0x4fec35[_0x490991(0x15d)]+_0x490991(0x165)};}};function flattenMenuItems(_0x4a5bb9,_0x598d17){const _0x1ba50d=a92_0x5a1006,_0x49793a=sortMenuItems(_0x4a5bb9),_0xf0ea5e=[];for(const _0xc37bd4 of _0x49793a){_0xf0ea5e[_0x1ba50d(0x164)](toMenuListItem(_0xc37bd4,_0x598d17)),Array['isArray'](_0xc37bd4[_0x1ba50d(0x159)])&&_0xc37bd4[_0x1ba50d(0x159)]['length']>0x0&&_0xf0ea5e[_0x1ba50d(0x164)](...flattenMenuItems(_0xc37bd4['children'],{'verbose':_0x598d17[_0x1ba50d(0x166)],'parentId':_0xc37bd4['id'],'depth':_0x598d17[_0x1ba50d(0x169)]+0x1}));}return _0xf0ea5e;}function sortMenuItems(_0x4b0e4a){const _0x21eaf5=a92_0x5a1006;return _0x4b0e4a['map']((_0x4d04da,_0x5624a1)=>({'item':_0x4d04da,'index':_0x5624a1}))['sort']((_0x568bd4,_0x38b2a2)=>{const _0x54b7a8=a92_0xa1bd,_0x38cd18=normalizeSort(_0x568bd4[_0x54b7a8(0x15a)][_0x54b7a8(0x16a)]),_0x25b71b=normalizeSort(_0x38b2a2[_0x54b7a8(0x15a)][_0x54b7a8(0x16a)]);if(_0x38cd18!==_0x25b71b)return _0x38cd18-_0x25b71b;return _0x568bd4[_0x54b7a8(0x179)]-_0x38b2a2[_0x54b7a8(0x179)];})[_0x21eaf5(0x15f)](({item:_0x3e1b57})=>_0x3e1b57);}function toMenuListItem(_0x2c64d7,_0x56419c){const _0x4184eb=a92_0x5a1006,_0x1bcbc0={'id':_0x2c64d7['id'],'parentId':_0x56419c['parentId'],'depth':_0x56419c[_0x4184eb(0x169)],'label':normalizeString(_0x2c64d7['label']),'path':normalizeString(_0x2c64d7[_0x4184eb(0x16d)]),'type':normalizeString(_0x2c64d7[_0x4184eb(0x178)]),'visible':typeof _0x2c64d7['visible']===_0x4184eb(0x155)?_0x2c64d7[_0x4184eb(0x153)]:null,'sort':typeof _0x2c64d7['sort']==='number'&&Number[_0x4184eb(0x172)](_0x2c64d7[_0x4184eb(0x16a)])?_0x2c64d7[_0x4184eb(0x16a)]:null,'resources':normalizeResources(_0x2c64d7[_0x4184eb(0x156)]?.[_0x4184eb(0x167)])};return _0x56419c[_0x4184eb(0x166)]&&(_0x1bcbc0[_0x4184eb(0x156)]=_0x2c64d7[_0x4184eb(0x156)]??null),_0x1bcbc0;}function normalizeSort(_0x349137){const _0x28675f=a92_0x5a1006;return typeof _0x349137===_0x28675f(0x16f)&&Number[_0x28675f(0x172)](_0x349137)?_0x349137:Number['POSITIVE_INFINITY'];}function normalizeString(_0x3870b4){const _0x345f1e=a92_0x5a1006;return typeof _0x3870b4===_0x345f1e(0x16c)?_0x3870b4:'';}function normalizeResources(_0x229031){const _0x33bd99=a92_0x5a1006;if(Array[_0x33bd99(0x174)](_0x229031))return _0x229031[_0x33bd99(0x15f)](String);if(typeof _0x229031!=='string')return[];try{const _0x28b081=JSON[_0x33bd99(0x177)](_0x229031);return Array[_0x33bd99(0x174)](_0x28b081)?_0x28b081[_0x33bd99(0x15f)](String):[];}catch{return[];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x54c7f6,_0x29d5e1){const _0x472bac=a93_0x9a4d,_0x559721=_0x54c7f6();while(!![]){try{const _0x2b210b=-parseInt(_0x472bac(0x1f3))/0x1+parseInt(_0x472bac(0x201))/0x2*(parseInt(_0x472bac(0x1f2))/0x3)+-parseInt(_0x472bac(0x204))/0x4+-parseInt(_0x472bac(0x1f7))/0x5+parseInt(_0x472bac(0x1ea))/0x6*(-parseInt(_0x472bac(0x200))/0x7)+parseInt(_0x472bac(0x1f0))/0x8*(-parseInt(_0x472bac(0x203))/0x9)+parseInt(_0x472bac(0x1e9))/0xa*(parseInt(_0x472bac(0x1fc))/0xb);if(_0x2b210b===_0x29d5e1)break;else _0x559721['push'](_0x559721['shift']());}catch(_0x2b7f96){_0x559721['push'](_0x559721['shift']());}}}(a93_0xa538,0x53b1c));function strWidth(_0x3b7337){const _0x11c0f2=a93_0x9a4d;let _0x2ab28e=0x0;for(const _0x4b2c97 of _0x3b7337){_0x2ab28e+=/[\u4e00-\u9fa5]/[_0x11c0f2(0x1f9)](_0x4b2c97)?0x2:0x1;}return _0x2ab28e;}function padRight(_0x3083de,_0x1d63be){const _0x1a6a4b=a93_0x9a4d,_0x404c31=strWidth(_0x3083de);return _0x3083de+'\x20'[_0x1a6a4b(0x1e8)](Math['max'](0x0,_0x1d63be-_0x404c31));}export function renderCompareTable(_0x1f9b98,_0x1a6cd4={}){const _0x584c06=a93_0x9a4d;if(_0x1f9b98[_0x584c06(0x1f5)]===0x0)return'';const _0x1720d6=_0x1a6cd4[_0x584c06(0x1ee)]??!![],_0xff2e69=Math[_0x584c06(0x1ef)](0x1e,..._0x1f9b98[_0x584c06(0x1fa)](_0x394f49=>strWidth(_0x394f49['label']))),_0x2c712c=0x4,_0x197c5a=[],_0x477588='\x20\x20'+padRight(_0x584c06(0x1ed),_0xff2e69),_0x4daa6a=padRight('Local',_0x2c712c),_0x5e1eda=_0x1720d6?'\x20\x20'+padRight(_0x584c06(0x1f8),_0x2c712c):'';_0x197c5a[_0x584c06(0x1eb)](_0x477588+'\x20\x20'+_0x4daa6a+(_0x1720d6?_0x5e1eda:'')),_0x197c5a[_0x584c06(0x1eb)]('\x20\x20'+'─'['repeat'](_0xff2e69)+'\x20\x20'+'─'[_0x584c06(0x1e8)](_0x2c712c)+(_0x1720d6?'\x20\x20'+'─'[_0x584c06(0x1e8)](_0x2c712c):''));for(const _0x130cb7 of _0x1f9b98){const _0x4ece32=padRight(_0x130cb7[_0x584c06(0x206)],_0xff2e69),_0x1a681a=_0x130cb7[_0x584c06(0x1f4)]?'✓':'✗',_0x315ea9=padRight(_0x1a681a,_0x2c712c);let _0x20774c='\x20\x20'+_0x4ece32+'\x20\x20'+_0x315ea9;if(_0x1720d6){const _0x17a8d0=_0x130cb7[_0x584c06(0x1ff)]?'✓':'✗';_0x20774c+='\x20\x20'+padRight(_0x17a8d0,_0x2c712c);}_0x197c5a[_0x584c06(0x1eb)](_0x20774c);}return _0x197c5a[_0x584c06(0x205)]('\x0a');}export function renderSyncSummary(_0x59a7f1,_0x1c643d){const _0x2f61b7=a93_0x9a4d;if(_0x59a7f1['length']===0x0)return _0x1c643d?_0x2f61b7(0x1ec):_0x2f61b7(0x1fe);const _0xb7a60f=['\x20\x20'+_0x59a7f1['length']+'\x20page(s)\x20will\x20be\x20created\x20on\x20platform:'];for(const _0x3bd722 of _0x59a7f1){_0xb7a60f[_0x2f61b7(0x1eb)]('\x20\x20\x20\x20•\x20'+_0x3bd722[_0x2f61b7(0x206)]+'\x20('+_0x3bd722['path']+')');}return _0xb7a60f[_0x2f61b7(0x205)]('\x0a');}function a93_0xa538(){const _0x3b9bf4=['\x20\x20\x20\x20CSS:\x20','\x20\x20No\x20pages\x20to\x20sync.','online','152026VyweYk','963572ptyOMO','\x20\x20\x20\x20JS:\x20\x20','243KYZPkR','1491556RlpCmj','join','label','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','repeat','10yVRIJy','78mPlsNM','push','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','Menu\x20Name','showOnline','max','78664QBbvGH','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','3qAFjwk','139729ODHqcK','local','length','\x20\x20Affected\x20menus:\x20','2932020HXhlGI','Platform','test','map','(unchanged)','16586603gPIKRh'];a93_0xa538=function(){return _0x3b9bf4;};return a93_0xa538();}function a93_0x9a4d(_0x100e20,_0x22ccac){_0x100e20=_0x100e20-0x1e7;const _0xa538fa=a93_0xa538();let _0x9a4d55=_0xa538fa[_0x100e20];return _0x9a4d55;}export function renderUpdateSummary(_0x58cf5e,_0x202447){const _0x52aeec=a93_0x9a4d;if(_0x58cf5e[_0x52aeec(0x1f5)]===0x0)return _0x52aeec(0x1f1);const _0x5b78f2=['\x20\x20'+_0x58cf5e[_0x52aeec(0x1f5)]+_0x52aeec(0x1e7),_0x52aeec(0x202)+(_0x202447[0x0]??_0x52aeec(0x1fb)),_0x52aeec(0x1fd)+(_0x202447[0x1]??_0x52aeec(0x1fb)),'',_0x52aeec(0x1f6)+_0x58cf5e[_0x52aeec(0x205)](',\x20')];return _0x5b78f2[_0x52aeec(0x205)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a94_0x288d(){var _0x1249c9=['662859msXYjm','711324dMpelj','10YsElNj','92361xvwIky','1532136qXENMq','812388JFSzhr','914637MmirzM','1135239cilNVa','4uSWQVf'];a94_0x288d=function(){return _0x1249c9;};return a94_0x288d();}(function(_0x2a67a5,_0x267a4e){var _0x126ac8=a94_0x5acc,_0x242442=_0x2a67a5();while(!![]){try{var _0x208af0=-parseInt(_0x126ac8(0xef))/0x1*(-parseInt(_0x126ac8(0xeb))/0x2)+-parseInt(_0x126ac8(0xe9))/0x3+parseInt(_0x126ac8(0xed))/0x4+-parseInt(_0x126ac8(0xee))/0x5*(parseInt(_0x126ac8(0xe8))/0x6)+parseInt(_0x126ac8(0xea))/0x7+parseInt(_0x126ac8(0xf0))/0x8+parseInt(_0x126ac8(0xec))/0x9;if(_0x208af0===_0x267a4e)break;else _0x242442['push'](_0x242442['shift']());}catch(_0x16f8ab){_0x242442['push'](_0x242442['shift']());}}}(a94_0x288d,0x344cf));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';function a94_0x5acc(_0x270be5,_0x4a0f08){_0x270be5=_0x270be5-0xe8;var _0x288d15=a94_0x288d();var _0x5acc0c=_0x288d15[_0x270be5];return _0x5acc0c;}export*from'../../../commands/menu/shared/local-pages.js';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 a95_0x4ae3(_0x5a946b,_0xb5285c){_0x5a946b=_0x5a946b-0x9f;const _0x30818b=a95_0x3081();let _0x4ae384=_0x30818b[_0x5a946b];return _0x4ae384;}(function(_0x2f34c4,_0x13d682){const _0x2ea870=a95_0x4ae3,_0x25c9c4=_0x2f34c4();while(!![]){try{const _0x30b920=parseInt(_0x2ea870(0xb3))/0x1+-parseInt(_0x2ea870(0xb7))/0x2*(-parseInt(_0x2ea870(0xaf))/0x3)+-parseInt(_0x2ea870(0xa2))/0x4+-parseInt(_0x2ea870(0xc5))/0x5+-parseInt(_0x2ea870(0xa9))/0x6+-parseInt(_0x2ea870(0xc3))/0x7+-parseInt(_0x2ea870(0xa7))/0x8*(-parseInt(_0x2ea870(0xba))/0x9);if(_0x30b920===_0x13d682)break;else _0x25c9c4['push'](_0x25c9c4['shift']());}catch(_0x2ecb3d){_0x25c9c4['push'](_0x25c9c4['shift']());}}}(a95_0x3081,0xab2ce));function a95_0x3081(){const _0x306c62=['catch','CSS\x20URL\x20checked','8ZLHgqg','error','6764718nNQApT','length','\x20\x20CSS\x20URL:','ExitPromptError','isTTY','test','66bzKQUD','trim','CSS\x20URL\x20check\x20failed','cancelled','430619SqhtNm','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','No\x20local\x20pages\x20found.','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','75670BnWEsI','has','\x20\x20JS\x20URL:','14341707VpUwnx','\x20\x20Checking\x20JS\x20URL\x20reachability...','\x20\x20Checking\x20CSS\x20URL\x20reachability...','green','cyan','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','gray','red','No\x20menus\x20selected.','1696156FlqxMn','stdin','954735izXSZQ','fail','[already\x20on\x20platform]','label','JS\x20URL\x20check\x20failed','Cancelled.','map','2378680nJcbMa','path','[new]'];a95_0x3081=function(){return _0x306c62;};return a95_0x3081();}import a95_0x5eb956 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a95_0x567398 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x2a51d7){const _0x5f5cf6=a95_0x4ae3;return _0x2a51d7[_0x5f5cf6(0xa5)](_0x4e2019=>{const _0x1607c6=_0x5f5cf6;if(_0x4e2019?.['name']===_0x1607c6(0xac))throw CliErrors[_0x1607c6(0xb2)]('Cancelled.');throw _0x4e2019;});}export function startSpinner(_0x4d7b49){const _0x540773=a95_0x4ae3;return a95_0x567398({'text':_0x4d7b49,'color':_0x540773(0xbe)})['start']();}export function stopSpinner(_0xf76613,_0xc0244,_0x3e05b8){const _0x2c703c=a95_0x4ae3;_0x3e05b8?_0xf76613['succeed'](_0xc0244):_0xf76613[_0x2c703c(0xc6)](_0xc0244);}export async function askConfirm(_0x50df03){return onCancel(confirm({'message':_0x50df03,'theme':{'prefix':''}}));}export async function askJsUrl(_0x432e9a){const _0x56b03d=a95_0x4ae3;while(!![]){const _0x1c0403=await onCancel(input({'message':_0x56b03d(0xb9),'default':_0x432e9a,'theme':{'prefix':''}}));if(_0x1c0403[_0x56b03d(0xb0)]()==='')throw CliErrors[_0x56b03d(0xb2)](_0x56b03d(0xa0));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x56b03d(0xae)](_0x1c0403['trim']())){console['error'](a95_0x5eb956[_0x56b03d(0xc1)]('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x197f89=startSpinner(_0x56b03d(0xbb));try{const _0x16cc47=await isUrlReachable(_0x1c0403['trim']());stopSpinner(_0x197f89,'JS\x20URL\x20checked',_0x16cc47);if(!_0x16cc47){console['error'](a95_0x5eb956['red']('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x1c0403[_0x56b03d(0xb0)]();}catch(_0x4ba4d0){stopSpinner(_0x197f89,_0x56b03d(0x9f),![]);throw _0x4ba4d0;}}}export async function askCssUrl(_0x53d2e0){const _0x18b314=a95_0x4ae3;while(!![]){const _0xf1a130=await onCancel(input({'message':_0x18b314(0xab),'default':_0x53d2e0,'theme':{'prefix':''}}));if(_0xf1a130['trim']()==='')throw CliErrors['cancelled'](_0x18b314(0xa0));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x18b314(0xae)](_0xf1a130[_0x18b314(0xb0)]())){console[_0x18b314(0xa8)](a95_0x5eb956['red'](_0x18b314(0xb4)));continue;}const _0x14090c=startSpinner(_0x18b314(0xbc));try{const _0x36dd09=await isUrlReachable(_0xf1a130['trim']());stopSpinner(_0x14090c,_0x18b314(0xa6),_0x36dd09);if(!_0x36dd09){console[_0x18b314(0xa8)](a95_0x5eb956[_0x18b314(0xc1)]('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0xf1a130[_0x18b314(0xb0)]();}catch(_0x233ea6){stopSpinner(_0x14090c,_0x18b314(0xb1),![]);throw _0x233ea6;}}}export async function selectPages(_0x277476,_0x25a1a2,_0x1efa80){const _0x582812=a95_0x4ae3,_0x2a83ec=_0x277476[_0x582812(0xa1)](_0x43dc0d=>({'name':_0x43dc0d[_0x582812(0xc8)]+'\x20\x20'+(_0x25a1a2['has'](_0x43dc0d[_0x582812(0xa3)])?a95_0x5eb956[_0x582812(0xc0)](_0x582812(0xc7)):a95_0x5eb956[_0x582812(0xbd)](_0x582812(0xa4))),'value':_0x43dc0d[_0x582812(0xc8)],'checked':_0x1efa80?_0x1efa80['includes'](_0x43dc0d[_0x582812(0xc8)]):!_0x25a1a2[_0x582812(0xb8)](_0x43dc0d[_0x582812(0xa3)])}));if(_0x2a83ec[_0x582812(0xaa)]===0x0)throw new Error(_0x582812(0xb5));const _0x488ae1=await onCancel(checkbox({'message':_0x582812(0xbf),'choices':_0x2a83ec,'loop':![],'theme':{'prefix':''}}));if(_0x488ae1[_0x582812(0xaa)]===0x0)throw new Error(_0x582812(0xc2));return _0x277476['filter'](_0x44ddc3=>_0x488ae1['includes'](_0x44ddc3['label']));}export function isInteractive(){const _0x411f41=a95_0x4ae3;return process[_0x411f41(0xc4)][_0x411f41(0xad)]===!![];}export function requireInteractive(){const _0x5adbc4=a95_0x4ae3;if(!isInteractive())throw new Error(_0x5adbc4(0xb6)+'Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.');}
|