@lovrabet/rabetbase-cli 2.1.5 → 2.1.6
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 -0
- package/lib/commands/data/getOne.js +1 -0
- package/lib/commands/data/index.js +1 -0
- package/lib/commands/data/shared.js +1 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.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/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/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 -0
- 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 +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x560ce7=a56_0x5b35;function a56_0x5b35(_0x13ced4,_0x3c7878){_0x13ced4=_0x13ced4-0xa2;const _0x37cb45=a56_0x37cb();let _0x5b356d=_0x37cb45[_0x13ced4];return _0x5b356d;}function a56_0x37cb(){const _0x3e7ada=['14584lSXSoa','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','77puksdQ','19196tktXKP','Started\x20analysis\x20for\x20db\x20link\x20','51801tUdQFv','num','351xDfbhG','filter','str','1163067vpELQZ','588460WCADSx','map','725598PeshrO','split','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','analyze-start','2650102tZHJwE','tables','write','460JVarXd','6bVrZLK','trim'];a56_0x37cb=function(){return _0x3e7ada;};return a56_0x37cb();}(function(_0x34c84d,_0x312199){const _0x2f9778=a56_0x5b35,_0x2f8c88=_0x34c84d();while(!![]){try{const _0x1fe05d=parseInt(_0x2f9778(0xad))/0x1*(parseInt(_0x2f9778(0xa6))/0x2)+-parseInt(_0x2f9778(0xb2))/0x3+-parseInt(_0x2f9778(0xab))/0x4*(-parseInt(_0x2f9778(0xa5))/0x5)+parseInt(_0x2f9778(0xb5))/0x6+-parseInt(_0x2f9778(0xa2))/0x7+-parseInt(_0x2f9778(0xa8))/0x8*(parseInt(_0x2f9778(0xaf))/0x9)+-parseInt(_0x2f9778(0xb3))/0xa*(-parseInt(_0x2f9778(0xaa))/0xb);if(_0x1fe05d===_0x312199)break;else _0x2f8c88['push'](_0x2f8c88['shift']());}catch(_0x3891ed){_0x2f8c88['push'](_0x2f8c88['shift']());}}}(a56_0x37cb,0x4762a));import{startDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeStart={'service':'db','command':a56_0x560ce7(0xb8),'description':a56_0x560ce7(0xb7),'risk':a56_0x560ce7(0xa4),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a56_0x560ce7(0xa3),'type':'string','description':a56_0x560ce7(0xa9)}],async 'execute'(_0x592ad9){const _0x2489c3=a56_0x560ce7,_0x4a20bd=_0x592ad9[_0x2489c3(0xae)]('id'),_0x42b1f6=_0x592ad9[_0x2489c3(0xb1)](_0x2489c3(0xa3)),_0x52c11a=_0x42b1f6?_0x42b1f6[_0x2489c3(0xb6)](',')[_0x2489c3(0xb4)](_0x56eccc=>_0x56eccc[_0x2489c3(0xa7)]())[_0x2489c3(0xb0)](Boolean):undefined,_0x1a4380=await startDbAnalysis(_0x4a20bd,_0x52c11a);return{'ok':!![],'data':{'dbLinkId':_0x4a20bd,'planId':_0x1a4380,'tableNames':_0x52c11a??[]},'message':_0x2489c3(0xac)+_0x4a20bd};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a57_0x3f21(_0x552b99,_0xa9dadb){_0x552b99=_0x552b99-0x7b;const _0x1750e6=a57_0x1750();let _0x3f219d=_0x1750e6[_0x552b99];return _0x3f219d;}const a57_0x58e55f=a57_0x3f21;(function(_0x18769a,_0x365659){const _0x367916=a57_0x3f21,_0x3d150d=_0x18769a();while(!![]){try{const _0x1d21e0=-parseInt(_0x367916(0x86))/0x1*(parseInt(_0x367916(0x84))/0x2)+parseInt(_0x367916(0x89))/0x3+parseInt(_0x367916(0x81))/0x4+parseInt(_0x367916(0x88))/0x5*(parseInt(_0x367916(0x85))/0x6)+-parseInt(_0x367916(0x7d))/0x7+parseInt(_0x367916(0x7f))/0x8+parseInt(_0x367916(0x7c))/0x9*(parseInt(_0x367916(0x82))/0xa);if(_0x1d21e0===_0x365659)break;else _0x3d150d['push'](_0x3d150d['shift']());}catch(_0x238589){_0x3d150d['push'](_0x3d150d['shift']());}}}(a57_0x1750,0x9613f));import{getDbAnalysisStatus}from'../../core/api-client.js';function a57_0x1750(){const _0x3dd000=['445185LPgMmc','num','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','string','63GWGYNp','2960594LpZISa','str','3612592xZObAD','Analysis\x20status\x20for\x20','184628cEMGtU','613780LXAgsK','plan','4pMLaMB','30WKMwth','56813QNvdXL','read','75515fIhwsl'];a57_0x1750=function(){return _0x3dd000;};return a57_0x1750();}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeStatus={'service':'db','command':'analyze-status','description':a57_0x58e55f(0x8b),'risk':a57_0x58e55f(0x87),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'plan','type':a57_0x58e55f(0x7b),'required':!![],'description':'Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)'}],async 'execute'(_0x9012a8){const _0x381e38=a57_0x58e55f,_0x448441=_0x9012a8[_0x381e38(0x8a)]('id'),_0x23f94c=_0x9012a8[_0x381e38(0x7e)](_0x381e38(0x83)),_0x53479c=await getDbAnalysisStatus(_0x23f94c);return{'ok':!![],'data':{'dbLinkId':_0x448441,'planId':_0x23f94c,'status':_0x53479c},'message':_0x381e38(0x80)+_0x23f94c};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a58_0x135f2b=a58_0x1745;(function(_0xafd31,_0x5590e8){const _0x456374=a58_0x1745,_0x294db0=_0xafd31();while(!![]){try{const _0x322737=parseInt(_0x456374(0x1a5))/0x1*(parseInt(_0x456374(0x1ab))/0x2)+parseInt(_0x456374(0x1c2))/0x3*(parseInt(_0x456374(0x1be))/0x4)+-parseInt(_0x456374(0x1b7))/0x5+parseInt(_0x456374(0x1aa))/0x6+parseInt(_0x456374(0x1c1))/0x7*(-parseInt(_0x456374(0x1b4))/0x8)+parseInt(_0x456374(0x1c8))/0x9*(-parseInt(_0x456374(0x19f))/0xa)+-parseInt(_0x456374(0x1a6))/0xb*(-parseInt(_0x456374(0x1b6))/0xc);if(_0x322737===_0x5590e8)break;else _0x294db0['push'](_0x294db0['shift']());}catch(_0x2454e1){_0x294db0['push'](_0x294db0['shift']());}}}(a58_0x10d1,0xebfe6));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a58_0x10d1(){const _0x5a70fc=['Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','string','1596408dxgwBM','509666oMsgyl','username','Human-readable\x20description','validation','password','dbdesc','str','dbtype','Create\x20dblink','3890936wLJVAQ','appCode','1870548zIQaEL','5138555lTlxdn','8.0','write','Host\x20and\x20port:\x20host:port','Database\x20username','autostart','POST','3320dgSnYS','[redacted]','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','7mZUrGg','5550MEMxYx','Created\x20db\x20link\x20','message','dburl','boolean','\x20and\x20started\x20analysis','11376hiDaaq','Extra\x20JDBC-style\x20connection\x20parameters\x20string','No\x20follow-up\x20analysis','dbname','bool','9190aoldnq','After\x20create,\x20start\x20schema\x20analysis\x20(same\x20as\x20workbench\x20flow)','create','dbversion','dbparam','trim','6qYPHOA','22odiFlm','Database\x20password'];a58_0x10d1=function(){return _0x5a70fc;};return a58_0x10d1();}import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';function a58_0x1745(_0x300169,_0x2a90a6){_0x300169=_0x300169-0x19d;const _0x10d17c=a58_0x10d1();let _0x174576=_0x10d17c[_0x300169];return _0x174576;}import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a58_0x135f2b(0x1a1),'description':'Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','risk':a58_0x135f2b(0x1b9),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a58_0x135f2b(0x19d),'type':'string','required':!![],'description':a58_0x135f2b(0x1c0)},DB_TYPE_FLAG,{'name':a58_0x135f2b(0x1a2),'type':a58_0x135f2b(0x1a9),'description':a58_0x135f2b(0x1a8),'default':a58_0x135f2b(0x1b8)},{'name':a58_0x135f2b(0x1c5),'type':a58_0x135f2b(0x1a9),'required':!![],'description':a58_0x135f2b(0x1ba)},{'name':a58_0x135f2b(0x1ac),'type':a58_0x135f2b(0x1a9),'required':!![],'description':a58_0x135f2b(0x1bb)},{'name':a58_0x135f2b(0x1af),'type':a58_0x135f2b(0x1a9),'required':!![],'description':a58_0x135f2b(0x1a7)},{'name':'dbparam','type':'string','description':a58_0x135f2b(0x1c9)},{'name':'dbdesc','type':'string','description':a58_0x135f2b(0x1ad)},{'name':a58_0x135f2b(0x1bc),'type':a58_0x135f2b(0x1c6),'description':a58_0x135f2b(0x1a0),'default':![]}],async 'validate'(_0x1dc68f){const _0x5665c9=a58_0x135f2b,_0x2c1f2c=_0x1dc68f[_0x5665c9(0x1b1)]('dburl')[_0x5665c9(0x1a4)]();if(!validateDbUrl(_0x2c1f2c))throw CliErrors[_0x5665c9(0x1ae)]('Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22'+_0x2c1f2c+'\x22','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.');},async 'dryRun'(_0x58e40f){const _0x4e0c0e=a58_0x135f2b,_0x14b1e7={'appCode':_0x58e40f[_0x4e0c0e(0x1b5)],'dbName':_0x58e40f[_0x4e0c0e(0x1b1)]('dbname'),'dbType':_0x58e40f[_0x4e0c0e(0x1b1)](_0x4e0c0e(0x1b2)),'dbVersion':_0x58e40f[_0x4e0c0e(0x1b1)]('dbversion')||'8.0','dbUrl':_0x58e40f['str']('dburl')[_0x4e0c0e(0x1a4)](),'username':_0x58e40f['str'](_0x4e0c0e(0x1ac)),'password':_0x4e0c0e(0x1bf),..._0x58e40f[_0x4e0c0e(0x1b1)](_0x4e0c0e(0x1a3))?{'dbParam':_0x58e40f[_0x4e0c0e(0x1b1)]('dbparam')}:{},..._0x58e40f[_0x4e0c0e(0x1b1)](_0x4e0c0e(0x1b0))?{'dbDesc':_0x58e40f[_0x4e0c0e(0x1b1)](_0x4e0c0e(0x1b0))}:{}};return{'method':_0x4e0c0e(0x1bd),'url':'/smartapi/dblink/create','body':_0x14b1e7,'description':[_0x4e0c0e(0x1b3),_0x58e40f['bool'](_0x4e0c0e(0x1bc))?'Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id':_0x4e0c0e(0x1ca)]['join']('\x0a')};},async 'execute'(_0xbe5378){const _0x499b34=a58_0x135f2b,_0x37cfe0={'appCode':_0xbe5378[_0x499b34(0x1b5)],'dbName':_0xbe5378[_0x499b34(0x1b1)]('dbname'),'dbType':_0xbe5378[_0x499b34(0x1b1)]('dbtype'),'dbVersion':_0xbe5378['str'](_0x499b34(0x1a2))||_0x499b34(0x1b8),'dbUrl':_0xbe5378['str']('dburl')[_0x499b34(0x1a4)](),'username':_0xbe5378[_0x499b34(0x1b1)]('username'),'password':_0xbe5378[_0x499b34(0x1b1)]('password'),..._0xbe5378[_0x499b34(0x1b1)](_0x499b34(0x1a3))?{'dbParam':_0xbe5378[_0x499b34(0x1b1)](_0x499b34(0x1a3))}:{},..._0xbe5378['str'](_0x499b34(0x1b0))?{'dbDesc':_0xbe5378['str'](_0x499b34(0x1b0))}:{}},{id:_0x4d2d48,entity:_0x215bb5}=normalizeEntityWithIdResponse(await createDbLink(_0x37cfe0));if(!_0x4d2d48)return{'ok':![],'message':'Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','data':sanitizeDbLinkForOutput(_0x215bb5)};let _0xa0712e,_0x5347b5;if(_0xbe5378['bool']('autostart'))try{_0xa0712e=await startDbAnalysis(_0x4d2d48);}catch(_0x1d5e9c){_0x5347b5=_0x1d5e9c instanceof Error?_0x1d5e9c[_0x499b34(0x1c4)]:String(_0x1d5e9c);}const _0x1413f4={'connection':sanitizeDbLinkForOutput(_0x215bb5),..._0xa0712e?{'analysisPlanId':_0xa0712e}:{},..._0x5347b5?{'analysisStartWarning':_0x5347b5}:{}};let _0x5e7eb6;return _0xbe5378[_0x499b34(0x19e)](_0x499b34(0x1bc))?_0x5347b5?_0x5e7eb6=_0x499b34(0x1c3)+_0x4d2d48+';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning':_0x5e7eb6=_0x499b34(0x1c3)+_0x4d2d48+_0x499b34(0x1c7):_0x5e7eb6=_0x499b34(0x1c3)+_0x4d2d48,{'ok':!![],'data':_0x1413f4,'message':_0x5e7eb6};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x15dde6=a59_0x1b75;(function(_0x16337a,_0x21a6a8){const _0x524672=a59_0x1b75,_0x13426f=_0x16337a();while(!![]){try{const _0x1a555b=-parseInt(_0x524672(0x1f6))/0x1+-parseInt(_0x524672(0x1fc))/0x2+parseInt(_0x524672(0x1f7))/0x3+-parseInt(_0x524672(0x1fa))/0x4+parseInt(_0x524672(0x1fb))/0x5*(parseInt(_0x524672(0x1fd))/0x6)+-parseInt(_0x524672(0x1f5))/0x7+parseInt(_0x524672(0x1f8))/0x8;if(_0x1a555b===_0x21a6a8)break;else _0x13426f['push'](_0x13426f['shift']());}catch(_0x4c2419){_0x13426f['push'](_0x13426f['shift']());}}}(a59_0x2b8d,0x2a918));import{deleteDbLink}from'../../core/api-client.js';function a59_0x2b8d(){const _0x110a2b=['high-risk-write','2253251SIplaa','247010tbOulg','477921WBZUlY','6249512PeHseF','Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently','1098772RyOhRR','670ICqZqt','131572YEvheW','6414wBDGss'];a59_0x2b8d=function(){return _0x110a2b;};return a59_0x2b8d();}function a59_0x1b75(_0x440482,_0x55562a){_0x440482=_0x440482-0x1f4;const _0x2b8d20=a59_0x2b8d();let _0x1b75c2=_0x2b8d20[_0x440482];return _0x1b75c2;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDelete={'service':'db','command':'delete','description':a59_0x15dde6(0x1f9),'risk':a59_0x15dde6(0x1f4),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2c6585){const _0x5534d9=_0x2c6585['num']('id');return await deleteDbLink(_0x5534d9),{'ok':!![],'data':{'id':_0x5534d9,'deleted':!![]},'message':'Deleted\x20db\x20link\x20'+_0x5534d9};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a60_0x468b4d=a60_0x3970;function a60_0x7908(){const _0x4a62fa=['5mkGUQG','432WYdcwc','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','108741tFpfwS','272520WfuXqE','detail','162134QyzGiM','43641ZSQcqP','1128618DMJXtb','888755cXgjLb','dbName','db\x20link\x20','770788byhgib'];a60_0x7908=function(){return _0x4a62fa;};return a60_0x7908();}(function(_0x1be11b,_0x2a9db8){const _0x49b328=a60_0x3970,_0xd842da=_0x1be11b();while(!![]){try{const _0x1f1e23=parseInt(_0x49b328(0xdc))/0x1+-parseInt(_0x49b328(0xdf))/0x2+parseInt(_0x49b328(0xdd))/0x3+parseInt(_0x49b328(0xd8))/0x4*(parseInt(_0x49b328(0xd9))/0x5)+parseInt(_0x49b328(0xd4))/0x6+-parseInt(_0x49b328(0xd5))/0x7+-parseInt(_0x49b328(0xda))/0x8*(parseInt(_0x49b328(0xe0))/0x9);if(_0x1f1e23===_0x2a9db8)break;else _0xd842da['push'](_0xd842da['shift']());}catch(_0x52e0b1){_0xd842da['push'](_0xd842da['shift']());}}}(a60_0x7908,0x1afa7));import{getDbLinkInfo}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a60_0x3970(_0x3dcb96,_0x550c62){_0x3dcb96=_0x3dcb96-0xd4;const _0x7908af=a60_0x7908();let _0x397045=_0x7908af[_0x3dcb96];return _0x397045;}import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':a60_0x468b4d(0xde),'description':a60_0x468b4d(0xdb),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x547940){const _0x3bc69a=a60_0x468b4d,_0x20a2ff=_0x547940['num']('id'),_0x7122da=await getDbLinkInfo(_0x20a2ff);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x7122da),'message':_0x3bc69a(0xd7)+_0x20a2ff+':\x20'+_0x7122da[_0x3bc69a(0xd6)]};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0x1e5452=a61_0x5941;(function(_0x21defc,_0x516c1e){const _0x2f7acf=a61_0x5941,_0x35ca1b=_0x21defc();while(!![]){try{const _0xce98b4=-parseInt(_0x2f7acf(0x1bc))/0x1+parseInt(_0x2f7acf(0x1a4))/0x2+parseInt(_0x2f7acf(0x1ab))/0x3*(-parseInt(_0x2f7acf(0x1b0))/0x4)+parseInt(_0x2f7acf(0x1b6))/0x5*(-parseInt(_0x2f7acf(0x1a6))/0x6)+parseInt(_0x2f7acf(0x1a9))/0x7*(-parseInt(_0x2f7acf(0x1bb))/0x8)+parseInt(_0x2f7acf(0x1b2))/0x9*(parseInt(_0x2f7acf(0x1aa))/0xa)+parseInt(_0x2f7acf(0x1b4))/0xb;if(_0xce98b4===_0x516c1e)break;else _0x35ca1b['push'](_0x35ca1b['shift']());}catch(_0x1157ca){_0x35ca1b['push'](_0x35ca1b['shift']());}}}(a61_0x5d93,0xbff9c));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a61_0x5941(_0x346bca,_0x348974){_0x346bca=_0x346bca-0x1a3;const _0x5d9373=a61_0x5d93();let _0x5941db=_0x5d9373[_0x346bca];return _0x5941db;}function a61_0x5d93(){const _0x50a7d8=['appCode','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','8zcuyRY','686737qKrKZg','Page\x20size','914454EPbJlM','page','8184888mSTkPb','\x20(db\x20link\x20','diff','4289159ZsgYcO','5066140rDxJJL','4297278DQlPFv','read','Paged\x20diff\x20between\x20live\x20database\x20schema\x20and\x20last\x20analyzed\x20snapshot\x20(new\x20/\x20deleted\x20/\x20modified\x20tables)','num','pagesize','4uFPEpy','Page\x20index\x20(1-based)','18XnXHlB','table','37531175CgGYgC','number','5nMBfhV','string','\x20row(s),\x20total\x20'];a61_0x5d93=function(){return _0x50a7d8;};return a61_0x5d93();}export const dbDiff={'service':'db','command':a61_0x1e5452(0x1a8),'description':a61_0x1e5452(0x1ad),'risk':a61_0x1e5452(0x1ac),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a61_0x1e5452(0x1b3),'type':a61_0x1e5452(0x1b7),'description':a61_0x1e5452(0x1ba)},{'name':a61_0x1e5452(0x1a5),'type':a61_0x1e5452(0x1b5),'description':a61_0x1e5452(0x1b1),'default':0x1},{'name':a61_0x1e5452(0x1af),'type':a61_0x1e5452(0x1b5),'description':a61_0x1e5452(0x1a3),'default':0x14}],async 'execute'(_0x1e4dd5){const _0x3dfc80=a61_0x1e5452,_0x5a5159=_0x1e4dd5[_0x3dfc80(0x1ae)]('id'),_0x2d62d4=_0x1e4dd5[_0x3dfc80(0x1ae)]('page',0x1)||0x1,_0x3644a2=_0x1e4dd5[_0x3dfc80(0x1ae)](_0x3dfc80(0x1af),0x14)||0x14,_0x1e581a=_0x1e4dd5['str'](_0x3dfc80(0x1b3))||undefined,{totalCount:_0x3d4b9a,tableList:_0x3697de}=await getDbTableDiff(_0x1e4dd5[_0x3dfc80(0x1b9)],_0x5a5159,{'pageIndex':_0x2d62d4,'pageSize':_0x3644a2,'tableName':_0x1e581a});return{'ok':!![],'data':{'dbLinkId':_0x5a5159,'page':_0x2d62d4,'pageSize':_0x3644a2,'totalCount':_0x3d4b9a,'tableList':_0x3697de},'message':_0x3697de['length']+_0x3dfc80(0x1b8)+_0x3d4b9a+_0x3dfc80(0x1a7)+_0x5a5159+')'};}};
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x29dac1,_0xd8f751){const _0x10020f=a62_0x3355,_0x5efc3b=_0x29dac1();while(!![]){try{const _0xa1da3c=parseInt(_0x10020f(0x1cc))/0x1+parseInt(_0x10020f(0x1ca))/0x2*(-parseInt(_0x10020f(0x1c7))/0x3)+parseInt(_0x10020f(0x1c4))/0x4+-parseInt(_0x10020f(0x1c6))/0x5*(parseInt(_0x10020f(0x1c3))/0x6)+-parseInt(_0x10020f(0x1c9))/0x7*(parseInt(_0x10020f(0x1c5))/0x8)+-parseInt(_0x10020f(0x1cb))/0x9+parseInt(_0x10020f(0x1c2))/0xa*(parseInt(_0x10020f(0x1c8))/0xb);if(_0xa1da3c===_0xd8f751)break;else _0x5efc3b['push'](_0x5efc3b['shift']());}catch(_0x291137){_0x5efc3b['push'](_0x5efc3b['shift']());}}}(a62_0x316f,0xb0ccd));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';function a62_0x3355(_0x3252b4,_0x23a6fa){_0x3252b4=_0x3252b4-0x1c2;const _0x316fed=a62_0x316f();let _0x335504=_0x316fed[_0x3252b4];return _0x335504;}import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';function a62_0x316f(){const _0x365ccd=['2YIsucr','1864440kZPouu','1443986enGVbP','559390ttgjrK','198CzLvcn','3527140UOUEio','1200VczYEs','74945brLncW','1040922jPRRiQ','77xQXiJw','44072UgIelk'];a62_0x316f=function(){return _0x365ccd;};return a62_0x316f();}import{dbDiff}from'../../commands/db/diff.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff];
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x2beaad=a63_0x394d;(function(_0x33ded3,_0x565483){const _0x2c51d7=a63_0x394d,_0x4e768b=_0x33ded3();while(!![]){try{const _0x395b8c=parseInt(_0x2c51d7(0xc5))/0x1+-parseInt(_0x2c51d7(0xc4))/0x2*(-parseInt(_0x2c51d7(0xd1))/0x3)+-parseInt(_0x2c51d7(0xc3))/0x4*(parseInt(_0x2c51d7(0xd7))/0x5)+parseInt(_0x2c51d7(0xc7))/0x6+parseInt(_0x2c51d7(0xc9))/0x7+parseInt(_0x2c51d7(0xd9))/0x8+parseInt(_0x2c51d7(0xd8))/0x9*(-parseInt(_0x2c51d7(0xd0))/0xa);if(_0x395b8c===_0x565483)break;else _0x4e768b['push'](_0x4e768b['shift']());}catch(_0x4770dd){_0x4e768b['push'](_0x4e768b['shift']());}}}(a63_0x1881,0x1e8f0));import{listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a63_0x2beaad(0xce),'description':a63_0x2beaad(0xd4),'risk':a63_0x2beaad(0xcb),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'page','type':a63_0x2beaad(0xcd),'description':a63_0x2beaad(0xd2),'default':0x1},{'name':a63_0x2beaad(0xd3),'type':a63_0x2beaad(0xcd),'description':'Page\x20size','default':0x64}],async 'execute'(_0x427fba){const _0x307a42=a63_0x2beaad,_0x5181af=_0x427fba[_0x307a42(0xd6)](_0x307a42(0xc6),0x1)||0x1,_0x6359c2=_0x427fba['num'](_0x307a42(0xd3),0x64)||0x64,{items:_0x40b99f,paging:_0x326dc2}=await listDbLinks(_0x427fba[_0x307a42(0xcf)],{'currentPage':_0x5181af,'pageSize':_0x6359c2}),_0x17f4da=sanitizeDbLinkList(_0x40b99f),_0x2df84d=_0x326dc2?_0x326dc2:{'currentPage':_0x5181af,'pageSize':_0x6359c2,'rowsOnPage':_0x17f4da[_0x307a42(0xc8)],'totalCount':null,'note':_0x307a42(0xd5)};return{'ok':!![],'data':{'connections':_0x17f4da,'paging':_0x2df84d},'message':_0x307a42(0xca)+_0x17f4da[_0x307a42(0xc8)]+_0x307a42(0xcc)};}};function a63_0x394d(_0x2f6b1b,_0x4a4ee4){_0x2f6b1b=_0x2f6b1b-0xc3;const _0x18817b=a63_0x1881();let _0x394d7a=_0x18817b[_0x2f6b1b];return _0x394d7a;}function a63_0x1881(){const _0x1899ca=['appCode','270VmAfRK','3VcyzOe','Page\x20index\x20(1-based)','pagesize','List\x20database\x20connections\x20(dblinks)\x20for\x20the\x20current\x20app\x20with\x20analysis\x20status\x20—\x20for\x20AI\x20to\x20pick\x20ids\x20before\x20db\x20detail\x20/\x20analyze\x20/\x20tables','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','num','929455jykCFb','161775zlViSu','1920704oEIKIW','4LGoRHG','372542PePyme','148869OmAfhT','page','889446IKvaOR','length','510405BIrkqY','Found\x20','read','\x20database\x20connection(s)','number','list'];a63_0x1881=function(){return _0x1899ca;};return a63_0x1881();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2c865a,_0x2e876d){const _0x1eb1b8=a64_0x2e3f,_0x1f024=_0x2c865a();while(!![]){try{const _0x56a44e=parseInt(_0x1eb1b8(0x1b7))/0x1*(parseInt(_0x1eb1b8(0x1bb))/0x2)+-parseInt(_0x1eb1b8(0x1ba))/0x3+parseInt(_0x1eb1b8(0x1b8))/0x4*(parseInt(_0x1eb1b8(0x1b1))/0x5)+parseInt(_0x1eb1b8(0x1be))/0x6*(-parseInt(_0x1eb1b8(0x1c3))/0x7)+parseInt(_0x1eb1b8(0x1b5))/0x8*(parseInt(_0x1eb1b8(0x1b3))/0x9)+parseInt(_0x1eb1b8(0x1ae))/0xa*(-parseInt(_0x1eb1b8(0x1bc))/0xb)+parseInt(_0x1eb1b8(0x1c2))/0xc*(parseInt(_0x1eb1b8(0x1b9))/0xd);if(_0x56a44e===_0x2e876d)break;else _0x1f024['push'](_0x1f024['shift']());}catch(_0x52fb95){_0x1f024['push'](_0x1f024['shift']());}}}(a64_0x1537,0xab627));function shouldRedactKey(_0x552ade){const _0x437277=a64_0x2e3f,_0x26b56e=_0x552ade['toLowerCase']();if(_0x26b56e===_0x437277(0x1b6)||_0x26b56e==='passwd'||_0x26b56e==='dbpassword')return!![];if(_0x26b56e[_0x437277(0x1c7)](_0x437277(0x1af))||_0x26b56e[_0x437277(0x1c7)](_0x437277(0x1c6))||_0x26b56e[_0x437277(0x1c7)](_0x437277(0x1c5)))return!![];if(_0x26b56e[_0x437277(0x1c7)](_0x437277(0x1bf))||_0x26b56e['includes'](_0x437277(0x1bd)))return!![];if(_0x26b56e===_0x437277(0x1b2)||_0x26b56e===_0x437277(0x1ad)||_0x26b56e==='jdbcurl')return!![];return![];}export function sanitizeDbLinkForOutput(_0x54bf29){const _0x16b1ff=a64_0x2e3f,_0x53bdee={..._0x54bf29};for(const _0x1b3dd3 of Object[_0x16b1ff(0x1c0)](_0x53bdee)){if(!shouldRedactKey(_0x1b3dd3))continue;const _0x167949=_0x53bdee[_0x1b3dd3];_0x167949!=null&&String(_0x167949)[_0x16b1ff(0x1c8)]>0x0&&(_0x53bdee[_0x1b3dd3]=_0x16b1ff(0x1c1));}return _0x53bdee;}export function sanitizeDbLinkList(_0x29026a){const _0xb0ed13=a64_0x2e3f;return _0x29026a[_0xb0ed13(0x1b0)](_0x481125=>sanitizeDbLinkForOutput(_0x481125));}function a64_0x2e3f(_0x239dce,_0xd8faac){_0x239dce=_0x239dce-0x1ad;const _0x1537b7=a64_0x1537();let _0x2e3f4a=_0x1537b7[_0x239dce];return _0x2e3f4a;}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;function a64_0x1537(){const _0x58db86=['secret','map','285BWYOMO','authorization','9Ureceg','trim','9451208kzQBbL','password','714341rplTVP','74884AKElyg','3665194kwHxHN','1660827xmgsPM','2udlVdz','11mdiEtM','accesskey','5990826JcnCQZ','privatekey','keys','[redacted]','12GJjVxW','7FtPSpW','test','credential','token','includes','length','connectionstring','9907060hcBSsV'];a64_0x1537=function(){return _0x58db86;};return a64_0x1537();}export function validateDbUrl(_0x322c0a){const _0x11fa84=a64_0x2e3f,_0x2288ee=_0x322c0a[_0x11fa84(0x1b4)]();if(!_0x2288ee)return![];return DB_URL_PATTERN[_0x11fa84(0x1c4)](_0x2288ee);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a65_0x39cfdf=a65_0x2392;function a65_0x2392(_0x576461,_0x41730e){_0x576461=_0x576461-0x1be;const _0x28279b=a65_0x2827();let _0x23925b=_0x28279b[_0x576461];return _0x23925b;}(function(_0x4bb5d1,_0x35f315){const _0x8ee245=a65_0x2392,_0x334ec0=_0x4bb5d1();while(!![]){try{const _0x2e4395=-parseInt(_0x8ee245(0x1c3))/0x1+-parseInt(_0x8ee245(0x1c6))/0x2*(parseInt(_0x8ee245(0x1bf))/0x3)+-parseInt(_0x8ee245(0x1c1))/0x4*(-parseInt(_0x8ee245(0x1be))/0x5)+-parseInt(_0x8ee245(0x1c4))/0x6*(parseInt(_0x8ee245(0x1cb))/0x7)+-parseInt(_0x8ee245(0x1c8))/0x8+parseInt(_0x8ee245(0x1c7))/0x9+-parseInt(_0x8ee245(0x1c5))/0xa*(-parseInt(_0x8ee245(0x1cc))/0xb);if(_0x2e4395===_0x35f315)break;else _0x334ec0['push'](_0x334ec0['shift']());}catch(_0x474161){_0x334ec0['push'](_0x334ec0['shift']());}}}(a65_0x2827,0x8e83d));import{getDbAllTableList}from'../../core/api-client.js';function a65_0x2827(){const _0x37b572=['length','7awYWYO','11jRSGgn','appCode','5FcFntl','9eyggGp','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','223684ceSNHq','\x20table(s)\x20on\x20db\x20link\x20','1143144GDLZVs','1151814VMfDGL','25095370cbENdR','247518kCjVKN','861201yuxzzy','2968128TiITDU','tables'];a65_0x2827=function(){return _0x37b572;};return a65_0x2827();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':a65_0x39cfdf(0x1c9),'description':a65_0x39cfdf(0x1c0),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x32adf3){const _0x2e9233=a65_0x39cfdf,_0x320ae3=_0x32adf3['num']('id'),_0x1cf747=await getDbAllTableList(_0x32adf3[_0x2e9233(0x1cd)],_0x320ae3);return{'ok':!![],'data':{'dbLinkId':_0x320ae3,'total':_0x1cf747['length'],'tables':_0x1cf747},'message':_0x1cf747[_0x2e9233(0x1ca)]+_0x2e9233(0x1c2)+_0x320ae3};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x42155a=a66_0xfbdc;function a66_0xfbdc(_0x5f1b8c,_0xac35c3){_0x5f1b8c=_0x5f1b8c-0x1c5;const _0x34e7b3=a66_0x34e7();let _0xfbdcd7=_0x34e7b3[_0x5f1b8c];return _0xfbdcd7;}(function(_0x21d6be,_0x2b362c){const _0x5b37e3=a66_0xfbdc,_0x417db6=_0x21d6be();while(!![]){try{const _0x22cd47=parseInt(_0x5b37e3(0x1ce))/0x1+parseInt(_0x5b37e3(0x1d1))/0x2*(parseInt(_0x5b37e3(0x1c7))/0x3)+parseInt(_0x5b37e3(0x1cb))/0x4*(parseInt(_0x5b37e3(0x1d5))/0x5)+parseInt(_0x5b37e3(0x1d4))/0x6+-parseInt(_0x5b37e3(0x1cc))/0x7+parseInt(_0x5b37e3(0x1d6))/0x8+-parseInt(_0x5b37e3(0x1d0))/0x9;if(_0x22cd47===_0x2b362c)break;else _0x417db6['push'](_0x417db6['shift']());}catch(_0x71951a){_0x417db6['push'](_0x417db6['shift']());}}}(a66_0x34e7,0x4a0d0));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a66_0x34e7(){const _0x56fb65=['365108zkbDHu','object','8820567tXzddJ','2vkZMPp','Connection\x20OK\x20for\x20db\x20link\x20','slice','2069748dsDSHs','15myGQND','2008768rryygK','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','test','num','Connection\x20check\x20finished\x20for\x20db\x20link\x20','message','length','1463097JLfuAk','success','msg','read','228708MbuNXr','2359119WdlkMo','keys'];a66_0x34e7=function(){return _0x56fb65;};return a66_0x34e7();}function summarizeTestConnectResult(_0x1b7851){const _0x5470f6=a66_0xfbdc;if(_0x1b7851===!![]||_0x1b7851===![])return{'success':_0x1b7851};if(_0x1b7851===null||_0x1b7851===undefined)return{'type':typeof _0x1b7851};if(typeof _0x1b7851!==_0x5470f6(0x1cf))return{'type':typeof _0x1b7851};const _0x33f6a3=_0x1b7851,_0x39d0ef=[_0x5470f6(0x1c8),_0x5470f6(0x1c5),'code','error',_0x5470f6(0x1c9),'data'],_0x27bcfa={};for(const _0x3bcadc of _0x39d0ef){if(_0x3bcadc in _0x33f6a3)_0x27bcfa[_0x3bcadc]=_0x33f6a3[_0x3bcadc];}return Object[_0x5470f6(0x1cd)](_0x27bcfa)[_0x5470f6(0x1c6)]===0x0&&(_0x27bcfa[_0x5470f6(0x1cd)]=Object[_0x5470f6(0x1cd)](_0x33f6a3)[_0x5470f6(0x1d3)](0x0,0x14)),_0x27bcfa;}export const dbTest={'service':'db','command':a66_0x42155a(0x1d8),'description':a66_0x42155a(0x1d7),'risk':a66_0x42155a(0x1ca),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x23b5b8){const _0x4d573e=a66_0x42155a,_0x5b4123=_0x23b5b8[_0x4d573e(0x1d9)]('id'),_0x1fa8e9=await testDbLinkConnect(_0x5b4123),_0x10a9f0=_0x1fa8e9===!![]||typeof _0x1fa8e9===_0x4d573e(0x1cf)&&_0x1fa8e9!==null&&_0x1fa8e9['success']===!![],_0x5bffc2=summarizeTestConnectResult(_0x1fa8e9);return{'ok':!![],'data':{'id':_0x5b4123,'connected':Boolean(_0x10a9f0),'result':_0x5bffc2},'message':_0x10a9f0?_0x4d573e(0x1d2)+_0x5b4123:_0x4d573e(0x1da)+_0x5b4123+'\x20(see\x20data.result)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a67_0x16b963=a67_0x55a9;(function(_0x467137,_0x51dc8e){const _0x47908f=a67_0x55a9,_0x571e5f=_0x467137();while(!![]){try{const _0x35e36b=-parseInt(_0x47908f(0xa9))/0x1*(parseInt(_0x47908f(0xb2))/0x2)+parseInt(_0x47908f(0xae))/0x3*(-parseInt(_0x47908f(0xb4))/0x4)+parseInt(_0x47908f(0xad))/0x5+parseInt(_0x47908f(0xa5))/0x6+-parseInt(_0x47908f(0xaa))/0x7*(parseInt(_0x47908f(0xb5))/0x8)+parseInt(_0x47908f(0xbd))/0x9+-parseInt(_0x47908f(0xba))/0xa;if(_0x35e36b===_0x51dc8e)break;else _0x571e5f['push'](_0x571e5f['shift']());}catch(_0x5bc55d){_0x571e5f['push'](_0x571e5f['shift']());}}}(a67_0x362b,0x98082));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';function a67_0x362b(){const _0x505c79=['New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API','dbParam','dbDesc','dbdesc','280920EhFQTg','trim','password','10132326flRkmp','New\x20description','dbName','string','str','username','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','New\x20database\x20name','New\x20host:port','2885604qwKSeG','dburl','POST','num','9103OixMLb','63DGEQyp','dbUrl','dbparam','2797960jxPNFi','46791JjixwO','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','update','validation','26qVucwd','Updated\x20db\x20link\x20','84kNkGXg','950800vthQwT'];a67_0x362b=function(){return _0x505c79;};return a67_0x362b();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a67_0x55a9(_0x14d3ec,_0x42a2f6){_0x14d3ec=_0x14d3ec-0xa0;const _0x362b5e=a67_0x362b();let _0x55a9fe=_0x362b5e[_0x14d3ec];return _0x55a9fe;}import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbUpdate={'service':'db','command':a67_0x16b963(0xb0),'description':a67_0x16b963(0xa2),'risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a67_0x16b963(0xc0),'description':a67_0x16b963(0xa3)},{'name':'dburl','type':'string','description':a67_0x16b963(0xa4)},{'name':a67_0x16b963(0xa1),'type':a67_0x16b963(0xc0),'description':'New\x20username'},{'name':a67_0x16b963(0xbc),'type':a67_0x16b963(0xc0),'description':a67_0x16b963(0xb6)},{'name':'dbparam','type':a67_0x16b963(0xc0),'description':'New\x20connection\x20parameter\x20string'},{'name':'dbdesc','type':'string','description':a67_0x16b963(0xbe)}],async 'validate'(_0x63c8a4){const _0x38eaf4=a67_0x16b963,_0x247c84=_0x63c8a4[_0x38eaf4(0xa0)](_0x38eaf4(0xa6));if(_0x247c84&&!validateDbUrl(_0x247c84[_0x38eaf4(0xbb)]()))throw CliErrors[_0x38eaf4(0xb1)]('Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22'+_0x247c84+'\x22');},async 'dryRun'(_0x17d12d){const _0x5bc12b=a67_0x16b963,_0x162e60=_0x17d12d['num']('id'),_0x38d643=await getDbLinkInfo(_0x162e60),_0x29b506={..._0x38d643},_0x5b0471=_0x17d12d['str']('dbname');if(_0x5b0471)_0x29b506['dbName']=_0x5b0471;const _0xc65ef2=_0x17d12d['str'](_0x5bc12b(0xa6));if(_0xc65ef2)_0x29b506['dbUrl']=_0xc65ef2[_0x5bc12b(0xbb)]();const _0x549bff=_0x17d12d[_0x5bc12b(0xa0)](_0x5bc12b(0xa1));if(_0x549bff)_0x29b506[_0x5bc12b(0xa1)]=_0x549bff;const _0x9a3661=_0x17d12d[_0x5bc12b(0xa0)]('password');if(_0x9a3661)_0x29b506['password']=_0x9a3661;const _0x87d2c7=_0x17d12d[_0x5bc12b(0xa0)](_0x5bc12b(0xac));if(_0x87d2c7)_0x29b506[_0x5bc12b(0xb7)]=_0x87d2c7;const _0x466fa7=_0x17d12d[_0x5bc12b(0xa0)]('dbdesc');if(_0x466fa7)_0x29b506[_0x5bc12b(0xb8)]=_0x466fa7;const _0x56d374=sanitizeDbLinkForOutput(_0x29b506);return{'method':_0x5bc12b(0xa7),'url':'/smartapi/dblink/update','body':_0x56d374,'description':_0x5bc12b(0xaf)};},async 'execute'(_0xf77d80){const _0x1e282e=a67_0x16b963,_0x57c968=_0xf77d80[_0x1e282e(0xa8)]('id'),_0x16e04a=await getDbLinkInfo(_0x57c968),_0x5e0d0f={..._0x16e04a},_0x39d90f=_0xf77d80['str']('dbname');if(_0x39d90f)_0x5e0d0f[_0x1e282e(0xbf)]=_0x39d90f;const _0x9fa69e=_0xf77d80[_0x1e282e(0xa0)](_0x1e282e(0xa6));if(_0x9fa69e)_0x5e0d0f[_0x1e282e(0xab)]=_0x9fa69e['trim']();const _0xc2e151=_0xf77d80['str'](_0x1e282e(0xa1));if(_0xc2e151)_0x5e0d0f[_0x1e282e(0xa1)]=_0xc2e151;const _0x5bedb0=_0xf77d80[_0x1e282e(0xa0)](_0x1e282e(0xbc));if(_0x5bedb0)_0x5e0d0f['password']=_0x5bedb0;const _0x3067d3=_0xf77d80[_0x1e282e(0xa0)](_0x1e282e(0xac));if(_0x3067d3)_0x5e0d0f[_0x1e282e(0xb7)]=_0x3067d3;const _0x336a74=_0xf77d80[_0x1e282e(0xa0)](_0x1e282e(0xb9));if(_0x336a74)_0x5e0d0f[_0x1e282e(0xb8)]=_0x336a74;const {id:_0x3ce3fc,entity:_0x3b9579}=normalizeEntityWithIdResponse(await updateDbLink(_0x5e0d0f));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x3b9579),'message':_0x1e282e(0xb3)+(_0x3ce3fc??_0x57c968)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a64_0x52dc65=a64_0x58c8;(function(_0x279795,_0x3f034d){const _0x1a12de=a64_0x58c8,_0xe4e5c4=_0x279795();while(!![]){try{const _0x3cc736=parseInt(_0x1a12de(0xbd))/0x1*(parseInt(_0x1a12de(0xc7))/0x2)+parseInt(_0x1a12de(0x95))/0x3*(-parseInt(_0x1a12de(0xcd))/0x4)+-parseInt(_0x1a12de(0xd2))/0x5+parseInt(_0x1a12de(0x9d))/0x6+-parseInt(_0x1a12de(0xa3))/0x7+parseInt(_0x1a12de(0x93))/0x8*(-parseInt(_0x1a12de(0xbc))/0x9)+parseInt(_0x1a12de(0xca))/0xa*(parseInt(_0x1a12de(0x96))/0xb);if(_0x3cc736===_0x3f034d)break;else _0xe4e5c4['push'](_0xe4e5c4['shift']());}catch(_0x5f4e0a){_0xe4e5c4['push'](_0xe4e5c4['shift']());}}}(a64_0x2714,0x23d1c));import a64_0x2fd7a9 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';function a64_0x2714(){const _0x5b278e=['empty','(set,\x20length=','336966NRbBCx','accessKey','repeat','log','verbose','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','673603YVuBOu','platform','(missing)','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','gray','currentApp','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','bold','✗\x20Expired','cookie','(default)','padEnd','\x20\x20Apps','✓\x20Valid\x20JSON','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','\x20\x20Auth','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','Global','value','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','missing','read','676359jzanqZ','1Mxaxjq','locale','riskLevel','version','Project','explicitAppName','red','\x20\x20explicitAppName:\x20','raw','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','531044NLkahd','source','apps','40NwPwbc','⚠\x20Empty\x20(treated\x20as\x20{})','apiDir','4ZHsEPF','\x20\x20Merged\x20Config','✓\x20Valid','appcode','\x20\x20API\x20Endpoints','688725QoAqDc','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','check','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid\x20JSON','\x20\x20Config\x20Files','keys','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','defaultApp','green','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20─','slice','(not\x20set)','env','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','appCode','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','✗\x20Not\x20logged\x20in','(not\x20found)','status','length','8mvHgGt','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','2874wtyBty','371569wTYdWt','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)'];a64_0x2714=function(){return _0x5b278e;};return a64_0x2714();}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(_0x12a39f){const _0x52177d=a64_0x58c8,_0x4923e8=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x52177d(0x89)](0x0,0xa)+')':VERSION,_0x403f87=buildConfigFromFlags({}),_0x504c14=getCookie();console[_0x52177d(0xa0)](),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xab)](CLI_BIN_NAME+'\x20doctor')),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xa7)]('─'[_0x52177d(0x9f)](0x32))),console[_0x52177d(0xa0)](_0x52177d(0x94)+_0x4923e8),console[_0x52177d(0xa0)](_0x52177d(0xb5)+process[_0x52177d(0xc0)]),console[_0x52177d(0xa0)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x52177d(0xa4)]+'\x20'+process['arch']),console[_0x52177d(0xa0)](),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xab)](_0x52177d(0xd8))),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x88)[_0x52177d(0x9f)](0x1e)));const _0x2bc342=getGlobalConfigPath(),_0x52b9a0=getProjectConfigPath();console['log'](_0x52177d(0x99)+(_0x2bc342||a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x90)))),console['log'](_0x52177d(0xa2)+(_0x52b9a0||a64_0x2fd7a9[_0x52177d(0xa7)]('(not\x20found)'))),console[_0x52177d(0xa0)](),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xab)]('\x20\x20Config\x20JSON')),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x88)[_0x52177d(0x9f)](0x1e)));const _0x2903d6=(_0x22e25f,_0x53f6ee)=>{const _0x2afd34=_0x52177d;if(!_0x53f6ee){console['log']('\x20\x20'+_0x22e25f['padEnd'](0x11)+'\x20'+a64_0x2fd7a9[_0x2afd34(0xa7)]('(no\x20file)'));return;}const _0x58e3fe=inspectCliConfigJsonFile(_0x53f6ee);if(_0x58e3fe[_0x2afd34(0x91)]==='ok')console[_0x2afd34(0xa0)]('\x20\x20'+_0x22e25f[_0x2afd34(0xaf)](0x11)+'\x20'+a64_0x2fd7a9[_0x2afd34(0x86)](_0x2afd34(0xb1)));else{if(_0x58e3fe[_0x2afd34(0x91)]===_0x2afd34(0x9b))console['log']('\x20\x20'+_0x22e25f['padEnd'](0x11)+'\x20'+a64_0x2fd7a9['yellow'](_0x2afd34(0xcb)));else _0x58e3fe[_0x2afd34(0x91)]===_0x2afd34(0xba)?console[_0x2afd34(0xa0)]('\x20\x20'+_0x22e25f[_0x2afd34(0xaf)](0x11)+'\x20'+a64_0x2fd7a9[_0x2afd34(0xa7)](_0x2afd34(0xa5))):(console['log']('\x20\x20'+_0x22e25f[_0x2afd34(0xaf)](0x11)+'\x20'+a64_0x2fd7a9[_0x2afd34(0xc3)](_0x2afd34(0xd7))),console[_0x2afd34(0xa0)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a64_0x2fd7a9['red'](_0x58e3fe['message'])));}};_0x2903d6(_0x52177d(0xb7),_0x2bc342),_0x2903d6(_0x52177d(0xc1),_0x52b9a0),console[_0x52177d(0xa0)](),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xab)](_0x52177d(0xce))),console['log'](a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x88)['repeat'](0x1e))),console[_0x52177d(0xa0)](_0x52177d(0xd5)+(_0x403f87[_0x52177d(0x8d)]||a64_0x2fd7a9['red'](_0x52177d(0x8a)))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x403f87[_0x52177d(0x8b)]),console[_0x52177d(0xa0)](_0x52177d(0xc6)+_0x403f87[_0x52177d(0xbe)]),console[_0x52177d(0xa0)](_0x52177d(0xa9)+_0x403f87[_0x52177d(0xcc)]),console[_0x52177d(0xa0)](_0x52177d(0xda)+(_0x403f87[_0x52177d(0x85)]||a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x9a)))),console[_0x52177d(0xa0)](_0x52177d(0x8e)+(_0x403f87[_0x52177d(0xa8)]||a64_0x2fd7a9[_0x52177d(0xa7)]('(none)'))),console[_0x52177d(0xa0)](_0x52177d(0xc4)+(_0x403f87[_0x52177d(0xc2)]||a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x9a)))),console[_0x52177d(0xa0)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x403f87[_0x52177d(0xb6)]||a64_0x2fd7a9[_0x52177d(0xa7)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x52177d(0xb6)]+')'))),console['log'](_0x52177d(0xb9)+(_0x403f87['pageSize']??a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0xae)))),console['log'](_0x52177d(0xd6)+_0x403f87[_0x52177d(0xbf)]),console[_0x52177d(0xa0)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x403f87[_0x52177d(0xa1)]),console['log'](_0x52177d(0xb2)+(_0x403f87[_0x52177d(0xad)]?a64_0x2fd7a9[_0x52177d(0x86)](_0x52177d(0x9c)+_0x403f87[_0x52177d(0xad)][_0x52177d(0x92)]+')'):_0x504c14?a64_0x2fd7a9[_0x52177d(0x86)]('(set\x20via\x20file,\x20length='+_0x504c14[_0x52177d(0x92)]+')'):a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x9a))));const _0x41db51=Object[_0x52177d(0xd9)](_0x403f87[_0x52177d(0xc9)]);if(_0x41db51['length']>0x0){console[_0x52177d(0xa0)](),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xab)](_0x52177d(0xb0))),console['log'](a64_0x2fd7a9[_0x52177d(0xa7)]('\x20\x20─'[_0x52177d(0x9f)](0x1e)));for(const _0x1cc8da of _0x41db51){const _0x4aab6d=_0x403f87[_0x52177d(0xc9)][_0x1cc8da],_0x4b6fde=_0x1cc8da===_0x403f87[_0x52177d(0x85)],_0x3921b7=_0x1cc8da===_0x403f87['currentApp'],_0xab730d=_0x3921b7?a64_0x2fd7a9[_0x52177d(0x86)]('\x20←\x20current'):'',_0x5eedf1=_0x4b6fde?'\x20(default)':'';console[_0x52177d(0xa0)]('\x20\x20'+_0x1cc8da+_0x5eedf1+_0xab730d),console[_0x52177d(0xa0)](_0x52177d(0xa6)+_0x4aab6d[_0x52177d(0xd0)]);const _0x12d89a=buildAppDoctorFields(_0x4aab6d,{'env':_0x403f87[_0x52177d(0x8b)],'apiDir':_0x403f87[_0x52177d(0xc5)]['apiDir']||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x403f87[_0x52177d(0xad)]||_0x504c14||undefined,'accessKey':_0x403f87[_0x52177d(0x9e)]});console[_0x52177d(0xa0)](_0x52177d(0x8c)+_0x12d89a[_0x52177d(0x8b)][_0x52177d(0xb8)]+'\x20\x20'+a64_0x2fd7a9[_0x52177d(0xa7)]('('+_0x12d89a[_0x52177d(0x8b)][_0x52177d(0xc8)]+')')),console[_0x52177d(0xa0)](_0x52177d(0x97)+_0x12d89a['apiDir']['value']+'\x20\x20'+a64_0x2fd7a9['gray']('('+_0x12d89a[_0x52177d(0xcc)]['source']+')'));const _0x53bee6=_0x12d89a[_0x52177d(0xad)][_0x52177d(0xb8)]?a64_0x2fd7a9[_0x52177d(0x86)](_0x52177d(0x9c)+_0x12d89a[_0x52177d(0xad)]['value'][_0x52177d(0x92)]+')'):a64_0x2fd7a9[_0x52177d(0xa7)]('(none)');console[_0x52177d(0xa0)](_0x52177d(0xb3)+_0x53bee6+'\x20\x20'+a64_0x2fd7a9[_0x52177d(0xa7)]('('+_0x12d89a['cookie']['source']+')'));const _0x431fda=_0x12d89a[_0x52177d(0x9e)]['value']?a64_0x2fd7a9['green'](_0x52177d(0x9c)+_0x12d89a[_0x52177d(0x9e)][_0x52177d(0xb8)]['length']+')'):a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x9a));console[_0x52177d(0xa0)]('\x20\x20\x20\x20accessKey:\x20\x20'+_0x431fda+'\x20\x20'+a64_0x2fd7a9[_0x52177d(0xa7)]('('+_0x12d89a['accessKey'][_0x52177d(0xc8)]+')'));}}console[_0x52177d(0xa0)](),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xab)](_0x52177d(0xd1))),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x88)['repeat'](0x1e))),console[_0x52177d(0xa0)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x52177d(0xa0)](_0x52177d(0x87)+getUserDomain()),console[_0x52177d(0xa0)](_0x52177d(0x98)+getRuntimeDomain()),console[_0x52177d(0xa0)](),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xab)](_0x52177d(0xb4))),console['log'](a64_0x2fd7a9['gray']('\x20\x20─'['repeat'](0x1e)));if(_0x504c14){const _0x215d3d=await getIsSessionValid();console[_0x52177d(0xa0)](_0x52177d(0xd3)+(_0x215d3d?a64_0x2fd7a9[_0x52177d(0x86)](_0x52177d(0xcf)):a64_0x2fd7a9[_0x52177d(0xc3)](_0x52177d(0xac))));}else console[_0x52177d(0xa0)](_0x52177d(0xd3)+a64_0x2fd7a9[_0x52177d(0xc3)](_0x52177d(0x8f)));return console[_0x52177d(0xa0)](),{'ok':!![]};}function a64_0x58c8(_0x349678,_0x5f2d73){_0x349678=_0x349678-0x85;const _0x27143f=a64_0x2714();let _0x58c81d=_0x27143f[_0x349678];return _0x58c81d;}export const doctorDefinition={'service':'doctor','command':a64_0x52dc65(0xd4),'description':a64_0x52dc65(0xaa),'risk':a64_0x52dc65(0xbb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
function a68_0x3376(){const _0x2de189=['length','(default:\x20','riskLevel','(no\x20file)','read','\x20\x20Config\x20JSON','\x20\x20Config\x20Files','platform','⚠\x20Empty\x20(treated\x20as\x20{})','unknown','pageSize','Global','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','empty','1462580puaEBL','(set,\x20length=','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','check','yellow','appcode','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','\x20\x20─','value','✓\x20Valid\x20JSON','bold','currentApp','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','apps','\x20←\x20current','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','log','(none)','raw','1221997bUyNZE','(not\x20found)','2856183TMAFvI','repeat','env','apiDir','\x20\x20\x20\x20accessKey:\x20\x20','3956924CatcZB','\x20\x20explicitAppName:\x20','gray','locale','Project','appCode','red','green','✗\x20Not\x20logged\x20in','source','✗\x20Expired','slice','256kOcLak','(not\x20set)','4229FFIfRz','arch','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','18RBiZrn','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','70gFcOlr','\x20\x20Merged\x20Config','873279StvLvQ','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','verbose','defaultApp','✗\x20Invalid\x20JSON','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','✓\x20Valid','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','accessKey','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Apps','cookie','11271aHXixw','\x20\x20runtimeDomain:\x20\x20\x20','24xJJLOW'];a68_0x3376=function(){return _0x2de189;};return a68_0x3376();}const a68_0x171a24=a68_0x175f;(function(_0x87a45c,_0x9fad8c){const _0x530853=a68_0x175f,_0x34f850=_0x87a45c();while(!![]){try{const _0x5167e5=-parseInt(_0x530853(0x1d8))/0x1*(parseInt(_0x530853(0x1d6))/0x2)+-parseInt(_0x530853(0x1ed))/0x3+parseInt(_0x530853(0x1ca))/0x4+-parseInt(_0x530853(0x1aa))/0x5*(parseInt(_0x530853(0x1db))/0x6)+-parseInt(_0x530853(0x1c3))/0x7*(-parseInt(_0x530853(0x1ef))/0x8)+-parseInt(_0x530853(0x1df))/0x9*(-parseInt(_0x530853(0x1dd))/0xa)+-parseInt(_0x530853(0x1c5))/0xb;if(_0x5167e5===_0x9fad8c)break;else _0x34f850['push'](_0x34f850['shift']());}catch(_0x2cda07){_0x34f850['push'](_0x34f850['shift']());}}}(a68_0x3376,0x7c7c3));function a68_0x175f(_0x52f2c9,_0x29c620){_0x52f2c9=_0x52f2c9-0x1a6;const _0x3376ba=a68_0x3376();let _0x175fdf=_0x3376ba[_0x52f2c9];return _0x175fdf;}import a68_0x48905c 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(_0x5dba0a){const _0x45bfe5=a68_0x175f,_0x5d543b=GIT_COMMIT!==_0x45bfe5(0x1f9)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x45bfe5(0x1d5)](0x0,0xa)+')':VERSION,_0x166a7a=buildConfigFromFlags({}),_0x191d0b=getCookie();console[_0x45bfe5(0x1c0)](),console[_0x45bfe5(0x1c0)](a68_0x48905c['bold'](CLI_BIN_NAME+'\x20doctor')),console[_0x45bfe5(0x1c0)](a68_0x48905c['gray']('─'[_0x45bfe5(0x1c6)](0x32))),console[_0x45bfe5(0x1c0)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x5d543b),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1b8)+process['version']),console[_0x45bfe5(0x1c0)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x45bfe5(0x1f7)]+'\x20'+process[_0x45bfe5(0x1d9)]),console['log'](),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1b6)](_0x45bfe5(0x1f6))),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1cc)](_0x45bfe5(0x1b3)[_0x45bfe5(0x1c6)](0x1e)));const _0x5f0a92=getGlobalConfigPath(),_0x1c975b=getProjectConfigPath();console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1b1)+(_0x5f0a92||a68_0x48905c[_0x45bfe5(0x1cc)]('(not\x20found)'))),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1b9)+(_0x1c975b||a68_0x48905c['gray'](_0x45bfe5(0x1c4)))),console['log'](),console[_0x45bfe5(0x1c0)](a68_0x48905c['bold'](_0x45bfe5(0x1f5))),console[_0x45bfe5(0x1c0)](a68_0x48905c['gray'](_0x45bfe5(0x1b3)['repeat'](0x1e)));const _0x5a8a23=(_0x164177,_0x1e7a26)=>{const _0x38508a=_0x45bfe5;if(!_0x1e7a26){console['log']('\x20\x20'+_0x164177[_0x38508a(0x1bf)](0x11)+'\x20'+a68_0x48905c['gray'](_0x38508a(0x1f3)));return;}const _0x59597a=inspectCliConfigJsonFile(_0x1e7a26);if(_0x59597a[_0x38508a(0x1b2)]==='ok')console[_0x38508a(0x1c0)]('\x20\x20'+_0x164177[_0x38508a(0x1bf)](0x11)+'\x20'+a68_0x48905c[_0x38508a(0x1d1)](_0x38508a(0x1b5)));else{if(_0x59597a['status']===_0x38508a(0x1a9))console[_0x38508a(0x1c0)]('\x20\x20'+_0x164177['padEnd'](0x11)+'\x20'+a68_0x48905c[_0x38508a(0x1af)](_0x38508a(0x1f8)));else _0x59597a[_0x38508a(0x1b2)]==='missing'?console[_0x38508a(0x1c0)]('\x20\x20'+_0x164177['padEnd'](0x11)+'\x20'+a68_0x48905c[_0x38508a(0x1cc)](_0x38508a(0x1ad))):(console[_0x38508a(0x1c0)]('\x20\x20'+_0x164177[_0x38508a(0x1bf)](0x11)+'\x20'+a68_0x48905c['red'](_0x38508a(0x1e3))),console[_0x38508a(0x1c0)]('\x20\x20'+''[_0x38508a(0x1bf)](0x11)+'\x20'+a68_0x48905c[_0x38508a(0x1d0)](_0x59597a['message'])));}};_0x5a8a23(_0x45bfe5(0x1a7),_0x5f0a92),_0x5a8a23(_0x45bfe5(0x1ce),_0x1c975b),console[_0x45bfe5(0x1c0)](),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1b6)](_0x45bfe5(0x1de))),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1cc)](_0x45bfe5(0x1b3)['repeat'](0x1e))),console['log'](_0x45bfe5(0x1ac)+(_0x166a7a[_0x45bfe5(0x1cf)]||a68_0x48905c[_0x45bfe5(0x1d0)](_0x45bfe5(0x1d7)))),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1ea)+_0x166a7a[_0x45bfe5(0x1c7)]),console[_0x45bfe5(0x1c0)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x166a7a[_0x45bfe5(0x1cd)]),console['log']('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x166a7a[_0x45bfe5(0x1c8)]),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1e0)+(_0x166a7a[_0x45bfe5(0x1e2)]||a68_0x48905c[_0x45bfe5(0x1cc)](_0x45bfe5(0x1c1)))),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1bd)+(_0x166a7a[_0x45bfe5(0x1b7)]||a68_0x48905c['gray']('(none)'))),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1cb)+(_0x166a7a['explicitAppName']||a68_0x48905c[_0x45bfe5(0x1cc)](_0x45bfe5(0x1c1)))),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1da)+(_0x166a7a['format']||a68_0x48905c[_0x45bfe5(0x1cc)](_0x45bfe5(0x1f1)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1a8)+(_0x166a7a[_0x45bfe5(0x1a6)]??a68_0x48905c[_0x45bfe5(0x1cc)]('(default)'))),console['log']('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x166a7a[_0x45bfe5(0x1f2)]),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1be)+_0x166a7a[_0x45bfe5(0x1e1)]),console[_0x45bfe5(0x1c0)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x166a7a[_0x45bfe5(0x1ec)]?a68_0x48905c[_0x45bfe5(0x1d1)](_0x45bfe5(0x1ab)+_0x166a7a[_0x45bfe5(0x1ec)]['length']+')'):_0x191d0b?a68_0x48905c[_0x45bfe5(0x1d1)]('(set\x20via\x20file,\x20length='+_0x191d0b['length']+')'):a68_0x48905c[_0x45bfe5(0x1cc)](_0x45bfe5(0x1c1))));const _0x373686=Object['keys'](_0x166a7a[_0x45bfe5(0x1ba)]);if(_0x373686[_0x45bfe5(0x1f0)]>0x0){console[_0x45bfe5(0x1c0)](),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1b6)](_0x45bfe5(0x1eb))),console[_0x45bfe5(0x1c0)](a68_0x48905c['gray']('\x20\x20─'[_0x45bfe5(0x1c6)](0x1e)));for(const _0x4cca9e of _0x373686){const _0x561072=_0x166a7a[_0x45bfe5(0x1ba)][_0x4cca9e],_0x1dae7d=_0x4cca9e===_0x166a7a[_0x45bfe5(0x1e2)],_0x5cc08f=_0x4cca9e===_0x166a7a[_0x45bfe5(0x1b7)],_0x46f979=_0x5cc08f?a68_0x48905c[_0x45bfe5(0x1d1)](_0x45bfe5(0x1bb)):'',_0x27958d=_0x1dae7d?'\x20(default)':'';console['log']('\x20\x20'+_0x4cca9e+_0x27958d+_0x46f979),console['log'](_0x45bfe5(0x1e4)+_0x561072[_0x45bfe5(0x1b0)]);const _0x345e75=buildAppDoctorFields(_0x561072,{'env':_0x166a7a['env'],'apiDir':_0x166a7a[_0x45bfe5(0x1c2)][_0x45bfe5(0x1c8)]||DEFAULT_CONFIG_VALUES[_0x45bfe5(0x1c8)],'cookie':_0x166a7a[_0x45bfe5(0x1ec)]||_0x191d0b||undefined,'accessKey':_0x166a7a['accessKey']});console['log']('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x345e75[_0x45bfe5(0x1c7)]['value']+'\x20\x20'+a68_0x48905c[_0x45bfe5(0x1cc)]('('+_0x345e75['env']['source']+')')),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1e8)+_0x345e75[_0x45bfe5(0x1c8)][_0x45bfe5(0x1b4)]+'\x20\x20'+a68_0x48905c[_0x45bfe5(0x1cc)]('('+_0x345e75['apiDir'][_0x45bfe5(0x1d3)]+')'));const _0x457578=_0x345e75[_0x45bfe5(0x1ec)][_0x45bfe5(0x1b4)]?a68_0x48905c['green'](_0x45bfe5(0x1ab)+_0x345e75[_0x45bfe5(0x1ec)][_0x45bfe5(0x1b4)][_0x45bfe5(0x1f0)]+')'):a68_0x48905c['gray'](_0x45bfe5(0x1c1));console['log']('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x457578+'\x20\x20'+a68_0x48905c['gray']('('+_0x345e75[_0x45bfe5(0x1ec)][_0x45bfe5(0x1d3)]+')'));const _0x246a6e=_0x345e75[_0x45bfe5(0x1e9)][_0x45bfe5(0x1b4)]?a68_0x48905c[_0x45bfe5(0x1d1)]('(set,\x20length='+_0x345e75[_0x45bfe5(0x1e9)][_0x45bfe5(0x1b4)][_0x45bfe5(0x1f0)]+')'):a68_0x48905c[_0x45bfe5(0x1cc)](_0x45bfe5(0x1c1));console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1c9)+_0x246a6e+'\x20\x20'+a68_0x48905c[_0x45bfe5(0x1cc)]('('+_0x345e75[_0x45bfe5(0x1e9)][_0x45bfe5(0x1d3)]+')'));}}console[_0x45bfe5(0x1c0)](),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1b6)]('\x20\x20API\x20Endpoints')),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1cc)]('\x20\x20─'['repeat'](0x1e))),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1bc)+getApiDomain()),console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1e7)+getUserDomain()),console['log'](_0x45bfe5(0x1ee)+getRuntimeDomain()),console[_0x45bfe5(0x1c0)](),console[_0x45bfe5(0x1c0)](a68_0x48905c['bold']('\x20\x20Auth')),console[_0x45bfe5(0x1c0)](a68_0x48905c[_0x45bfe5(0x1cc)]('\x20\x20─'[_0x45bfe5(0x1c6)](0x1e)));if(_0x191d0b){const _0x111685=await getIsSessionValid();console[_0x45bfe5(0x1c0)](_0x45bfe5(0x1e6)+(_0x111685?a68_0x48905c[_0x45bfe5(0x1d1)](_0x45bfe5(0x1e5)):a68_0x48905c[_0x45bfe5(0x1d0)](_0x45bfe5(0x1d4))));}else console['log'](_0x45bfe5(0x1e6)+a68_0x48905c['red'](_0x45bfe5(0x1d2)));return console[_0x45bfe5(0x1c0)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a68_0x171a24(0x1ae),'description':a68_0x171a24(0x1dc),'risk':a68_0x171a24(0x1f4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x1f397c=a69_0x1ff5;(function(_0x1aee54,_0x4722a0){const _0x20215d=a69_0x1ff5,_0x407b3d=_0x1aee54();while(!![]){try{const _0x4e544b=parseInt(_0x20215d(0x1cb))/0x1*(-parseInt(_0x20215d(0x1d2))/0x2)+parseInt(_0x20215d(0x1b3))/0x3+parseInt(_0x20215d(0x1ba))/0x4*(parseInt(_0x20215d(0x1cf))/0x5)+-parseInt(_0x20215d(0x1d4))/0x6+-parseInt(_0x20215d(0x1da))/0x7+-parseInt(_0x20215d(0x1c7))/0x8*(parseInt(_0x20215d(0x1be))/0x9)+parseInt(_0x20215d(0x1d3))/0xa*(parseInt(_0x20215d(0x1d6))/0xb);if(_0x4e544b===_0x4722a0)break;else _0x407b3d['push'](_0x407b3d['shift']());}catch(_0x2e6529){_0x407b3d['push'](_0x407b3d['shift']());}}}(a69_0x9da8,0x3918a));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 syntheticApp(_0x110572){return{'appCode':_0x110572,'appName':_0x110572};}function writeInitConfig(_0x5af880,_0x29d0a3,_0x45c719){const _0x576968=a69_0x1ff5,_0x1f3114=resolveWriteConfigPath(_0x5af880),_0xfe97ba=buildCanonicalProjectConfig({},{'appCodes':_0x29d0a3['map'](_0x31ec30=>_0x31ec30[_0x576968(0x1bd)]),'env':_0x45c719,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x576968(0x1db)]()}});writeConfigFile(_0x1f3114,_0xfe97ba);const _0x548bd2=_0x5af880==='global'?_0x576968(0x1c3):_0x576968(0x1c0);console[_0x576968(0x1aa)](_0x576968(0x1c9)+_0x548bd2+'\x20config'),console[_0x576968(0x1aa)](_0x576968(0x1af)+_0x29d0a3[_0x576968(0x1d9)](_0x305003=>_0x305003[_0x576968(0x1bd)])[_0x576968(0x1ae)](',\x20')),console[_0x576968(0x1aa)](_0x576968(0x1d8)+_0xfe97ba['defaultApp']),console[_0x576968(0x1aa)](_0x576968(0x1b4)+_0xfe97ba[_0x576968(0x1ab)]),console[_0x576968(0x1aa)]('\x20\x20Config:\x20'+_0x1f3114);}async function runSmartInit(_0x5e61ba){const _0x158f91=a69_0x1ff5,_0x4f0c0a=process[_0x158f91(0x1cd)](),_0x2c8425=_0x5e61ba[_0x158f91(0x1bc)](_0x158f91(0x1c3))?_0x158f91(0x1c3):'project',_0x23b27b=_0x5e61ba[_0x158f91(0x1c6)](_0x158f91(0x1ab))||'production',_0x113c83=_0x5e61ba[_0x158f91(0x1c6)](_0x158f91(0x1dc))||undefined,_0x1f38c6=_0x5e61ba[_0x158f91(0x1bc)]('project');if(_0x1f38c6){const {initConfig:_0x33269a}=await import(_0x158f91(0x1ac));return _0x33269a({'appcode':_0x113c83,'env':_0x23b27b,'autoYes':_0x5e61ba[_0x158f91(0x1bc)](_0x158f91(0x1bf))});}if(_0x2c8425===_0x158f91(0x1c0)){const _0x3a866f=existsSync(resolve(_0x4f0c0a,NEW_CONFIG_NAME)),_0x4eb072=LEGACY_CONFIG_NAMES[_0x158f91(0x1ce)](_0xf3187c=>existsSync(resolve(_0x4f0c0a,_0xf3187c)));if(_0x4eb072&&!_0x3a866f)return console[_0x158f91(0x1aa)](_0x158f91(0x1b0)),upgradeApp(_0x5e61ba[_0x158f91(0x1d0)],{'yes':_0x5e61ba['bool']('yes')});if(_0x3a866f)throw CliErrors[_0x158f91(0x1ca)](_0x158f91(0x1c1),_0x158f91(0x1ad)+CLI_BIN_NAME+'\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.');}if(_0x113c83){const _0x50674a=validateAppcode(_0x113c83);if(!_0x50674a[_0x158f91(0x1bb)])throw CliErrors['validation'](_0x50674a[_0x158f91(0x1b5)]);writeInitConfig(_0x2c8425,[syntheticApp(_0x113c83)],_0x23b27b);return;}if(_0x5e61ba[_0x158f91(0x1d0)])throw CliErrors['flagMissing'](_0x158f91(0x1dc),_0x158f91(0x1d5)+CLI_BIN_NAME+_0x158f91(0x1b8));const _0x514fcd=getCookie(),_0x49d1b3=await selectMultipleApps(_0x514fcd),_0x244afc=_0x49d1b3===_0x158f91(0x1d1)?[syntheticApp(await promptCustomAppcode())]:_0x49d1b3;writeInitConfig(_0x2c8425,_0x244afc,_0x23b27b);}const initFlags=[{'name':'global','type':a69_0x1f397c(0x1d7),'description':a69_0x1f397c(0x1b1),'default':![]},{'name':a69_0x1f397c(0x1ab),'type':a69_0x1f397c(0x1c4),'description':a69_0x1f397c(0x1b9),'default':a69_0x1f397c(0x1cc),'enum':[...RABETBASE_ENV_VALUES]},{'name':a69_0x1f397c(0x1dc),'type':a69_0x1f397c(0x1c4),'description':a69_0x1f397c(0x1c5)},{'name':'project','type':'boolean','description':a69_0x1f397c(0x1c2),'default':![]},{'name':'yes','type':a69_0x1f397c(0x1d7),'description':a69_0x1f397c(0x1b7),'default':![]}];function a69_0x1ff5(_0x4d8aca,_0x386ab8){_0x4d8aca=_0x4d8aca-0x1aa;const _0x9da88c=a69_0x9da8();let _0x1ff57d=_0x9da88c[_0x4d8aca];return _0x1ff57d;}export const initDefinitions=[{'service':a69_0x1f397c(0x1c8),'command':a69_0x1f397c(0x1dd),'description':a69_0x1f397c(0x1b2),'risk':a69_0x1f397c(0x1b6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0xa51851){return await runSmartInit(_0xa51851),{'ok':!![]};}}];function a69_0x9da8(){const _0x2e5e2c=['string','App\x20code\x20to\x20initialize\x20with','str','9776pRHctb','init','\x0a✓\x20Successfully\x20initialized\x20','validation','23048RsnXHa','production','cwd','some','365055WdUNQQ','nonInteractive','custom','18EJZkhR','12983220WKGFba','2265780fGmlkA','Usage:\x20','11IsPtiB','boolean','\x20\x20Default:\x20','map','2049908GqbtNz','toLocaleString','appcode','run','log','env','../../commands/project/init.js','Use\x20`','join','\x20\x20Apps:\x20','检测到旧配置文件,正在自动升级...\x0a','Write\x20to\x20global\x20config\x20instead\x20of\x20project','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','384366lUaQoM','\x20\x20Env:\x20','message','write','Auto-confirm\x20prompts','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','Target\x20environment','8okbZEc','valid','bool','appCode','3393bMwtNW','yes','project','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','global'];a69_0x9da8=function(){return _0x2e5e2c;};return a69_0x9da8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x1d8fba=a70_0x3829;(function(_0x41d2b3,_0x45328a){const _0xc4bd13=a70_0x3829,_0x21f18e=_0x41d2b3();while(!![]){try{const _0x407da6=-parseInt(_0xc4bd13(0x139))/0x1*(parseInt(_0xc4bd13(0x130))/0x2)+parseInt(_0xc4bd13(0x141))/0x3+-parseInt(_0xc4bd13(0x12d))/0x4+parseInt(_0xc4bd13(0x133))/0x5+-parseInt(_0xc4bd13(0x13f))/0x6+parseInt(_0xc4bd13(0x13d))/0x7+-parseInt(_0xc4bd13(0x147))/0x8*(-parseInt(_0xc4bd13(0x137))/0x9);if(_0x407da6===_0x45328a)break;else _0x21f18e['push'](_0x21f18e['shift']());}catch(_0x591d8f){_0x21f18e['push'](_0x21f18e['shift']());}}}(a70_0x1997,0x76651));import{logger}from'../../utils/logger.js';function printLogs(_0x22d3f4){const _0x157cc3=a70_0x3829;if(_0x22d3f4[_0x157cc3(0x146)]===0x0){console[_0x157cc3(0x12e)](_0x157cc3(0x14c));return;}console[_0x157cc3(0x12e)](_0x157cc3(0x14a)),_0x22d3f4['forEach']((_0x295832,_0x1f456c)=>{const _0x74eb94=_0x157cc3,_0x3fd4af=new Date(_0x295832[_0x74eb94(0x13a)])['toLocaleString'](_0x74eb94(0x13c)),_0x4eb034=_0x295832['level']===_0x74eb94(0x145)?'√':_0x295832[_0x74eb94(0x144)]===_0x74eb94(0x140)?'×':_0x295832[_0x74eb94(0x144)]==='warn'?'!':'i';console['log'](_0x1f456c+0x1+'.\x20'+_0x4eb034+'\x20['+_0x295832[_0x74eb94(0x148)]+']\x20'+_0x295832[_0x74eb94(0x138)]),console[_0x74eb94(0x12e)](_0x74eb94(0x143)+_0x3fd4af),_0x295832[_0x74eb94(0x149)]&&console[_0x74eb94(0x12e)](_0x74eb94(0x13b)+_0x295832['duration']+'ms'),_0x295832['details']&&Object['keys'](_0x295832[_0x74eb94(0x134)])['length']>0x0&&console[_0x74eb94(0x12e)](_0x74eb94(0x12f)+JSON[_0x74eb94(0x142)](_0x295832['details'],null,0x2)),console[_0x74eb94(0x12e)]('');});}export const logsDefinitions=[{'service':'logs','command':a70_0x1d8fba(0x136),'description':'View\x20command\x20history\x20logs','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1b01c2){const _0x7c44d8=a70_0x1d8fba;return printLogs(logger[_0x7c44d8(0x131)]()),{'ok':!![]};}},{'service':'logs','command':a70_0x1d8fba(0x135),'description':'Clear\x20command\x20history\x20logs','risk':a70_0x1d8fba(0x132),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x99408d){const _0x30f58e=a70_0x1d8fba;return logger[_0x30f58e(0x14b)](),console[_0x30f58e(0x12e)](_0x30f58e(0x13e)),{'ok':!![]};}}];function a70_0x3829(_0x447cf7,_0x2b22c3){_0x447cf7=_0x447cf7-0x12d;const _0x1997b7=a70_0x1997();let _0x382946=_0x1997b7[_0x447cf7];return _0x382946;}function a70_0x1997(){const _0x3d8fef=['1078068StJryp','stringify','\x20\x20\x20Time:\x20','level','success','length','808lRGvGL','command','duration','*\x20Lovrabet\x20CLI\x20logs:\x0a','clearLogs','*\x20No\x20logs\x20found','724928DzoAdz','log','\x20\x20\x20Details:\x20','104OrIzbY','readLogs','write','4252175nUBNqj','details','clear','show','13329JaMvpq','message','7327rdNJoj','timestamp','\x20\x20\x20Duration:\x20','en-US','938539eauOmO','*\x20Logs\x20cleared','2677608wZffdw','error'];a70_0x1997=function(){return _0x3d8fef;};return a70_0x1997();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a65e1,_0x333acd){const _0xdb6dd5=a71_0x51fe,_0x334077=_0x2a65e1();while(!![]){try{const _0x2730ed=-parseInt(_0xdb6dd5(0x162))/0x1*(parseInt(_0xdb6dd5(0x165))/0x2)+parseInt(_0xdb6dd5(0x163))/0x3*(-parseInt(_0xdb6dd5(0x16c))/0x4)+parseInt(_0xdb6dd5(0x168))/0x5+parseInt(_0xdb6dd5(0x169))/0x6*(parseInt(_0xdb6dd5(0x164))/0x7)+parseInt(_0xdb6dd5(0x16b))/0x8*(-parseInt(_0xdb6dd5(0x16a))/0x9)+-parseInt(_0xdb6dd5(0x166))/0xa*(parseInt(_0xdb6dd5(0x167))/0xb)+parseInt(_0xdb6dd5(0x16d))/0xc;if(_0x2730ed===_0x333acd)break;else _0x334077['push'](_0x334077['shift']());}catch(_0x2f74e9){_0x334077['push'](_0x334077['shift']());}}}(a71_0x36f2,0xd6273));function a71_0x51fe(_0x519097,_0x5c36a9){_0x519097=_0x519097-0x162;const _0x36f208=a71_0x36f2();let _0x51fe4a=_0x36f208[_0x519097];return _0x51fe4a;}import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';function a71_0x36f2(){const _0x4f043d=['14mXtRvb','745270OaAbQD','13402430cpcAtJ','11pfoIll','3332000wbkAlx','4307994OakYgE','9KviBWn','11675744kVvvyC','4JShCgr','37262640icZero','4JxNizh','120588xINaeF'];a71_0x36f2=function(){return _0x4f043d;};return a71_0x36f2();}export const menuDefinitions=[menuSync,menuUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xfc90be,_0x42204d){const _0x35e75f=a72_0x2b21,_0x457cf3=_0xfc90be();while(!![]){try{const _0x4c7417=-parseInt(_0x35e75f(0xd8))/0x1+parseInt(_0x35e75f(0xe4))/0x2+-parseInt(_0x35e75f(0xe5))/0x3+parseInt(_0x35e75f(0xd9))/0x4*(parseInt(_0x35e75f(0xde))/0x5)+-parseInt(_0x35e75f(0xe0))/0x6+parseInt(_0x35e75f(0xdf))/0x7*(parseInt(_0x35e75f(0xdb))/0x8)+parseInt(_0x35e75f(0xe1))/0x9;if(_0x4c7417===_0x42204d)break;else _0x457cf3['push'](_0x457cf3['shift']());}catch(_0x35003f){_0x457cf3['push'](_0x457cf3['shift']());}}}(a72_0x5efa,0xafb23));function strWidth(_0x2ee206){const _0x558db0=a72_0x2b21;let _0x850303=0x0;for(const _0x3a9faf of _0x2ee206){_0x850303+=/[\u4e00-\u9fa5]/[_0x558db0(0xd1)](_0x3a9faf)?0x2:0x1;}return _0x850303;}function padRight(_0x31ba6f,_0x28c537){const _0xb2a585=a72_0x2b21,_0x29ff48=strWidth(_0x31ba6f);return _0x31ba6f+'\x20'[_0xb2a585(0xe3)](Math['max'](0x0,_0x28c537-_0x29ff48));}function a72_0x2b21(_0x36f818,_0x39620a){_0x36f818=_0x36f818-0xcf;const _0x5efaff=a72_0x5efa();let _0x2b21ab=_0x5efaff[_0x36f818];return _0x2b21ab;}export function renderCompareTable(_0x4767ea,_0x2be282={}){const _0x4e3f58=a72_0x2b21;if(_0x4767ea[_0x4e3f58(0xe6)]===0x0)return'';const _0x2a76ff=_0x2be282['showOnline']??!![],_0x2e8d29=Math['max'](0x1e,..._0x4767ea['map'](_0x3541b8=>strWidth(_0x3541b8[_0x4e3f58(0xd0)]))),_0x756ec5=0x4,_0x355e25=[],_0x32aa5e='\x20\x20'+padRight(_0x4e3f58(0xd3),_0x2e8d29),_0x2bb0bd=padRight(_0x4e3f58(0xcf),_0x756ec5),_0x431de0=_0x2a76ff?'\x20\x20'+padRight(_0x4e3f58(0xd7),_0x756ec5):'';_0x355e25[_0x4e3f58(0xdd)](_0x32aa5e+'\x20\x20'+_0x2bb0bd+(_0x2a76ff?_0x431de0:'')),_0x355e25[_0x4e3f58(0xdd)]('\x20\x20'+'─'[_0x4e3f58(0xe3)](_0x2e8d29)+'\x20\x20'+'─'[_0x4e3f58(0xe3)](_0x756ec5)+(_0x2a76ff?'\x20\x20'+'─'[_0x4e3f58(0xe3)](_0x756ec5):''));for(const _0x4df8af of _0x4767ea){const _0x4e5178=padRight(_0x4df8af[_0x4e3f58(0xd0)],_0x2e8d29),_0x3ef4c3=_0x4df8af[_0x4e3f58(0xe8)]?'✓':'✗',_0x3b32e3=padRight(_0x3ef4c3,_0x756ec5);let _0x38b90e='\x20\x20'+_0x4e5178+'\x20\x20'+_0x3b32e3;if(_0x2a76ff){const _0x31b373=_0x4df8af[_0x4e3f58(0xda)]?'✓':'✗';_0x38b90e+='\x20\x20'+padRight(_0x31b373,_0x756ec5);}_0x355e25[_0x4e3f58(0xdd)](_0x38b90e);}return _0x355e25[_0x4e3f58(0xd6)]('\x0a');}export function renderSyncSummary(_0x24faef,_0x148f89){const _0x26bab6=a72_0x2b21;if(_0x24faef[_0x26bab6(0xe6)]===0x0)return _0x148f89?_0x26bab6(0xd4):_0x26bab6(0xe7);const _0x2cf710=['\x20\x20'+_0x24faef[_0x26bab6(0xe6)]+'\x20page(s)\x20will\x20be\x20created\x20on\x20platform:'];for(const _0x4cb964 of _0x24faef){_0x2cf710['push'](_0x26bab6(0xdc)+_0x4cb964[_0x26bab6(0xd0)]+'\x20('+_0x4cb964['path']+')');}return _0x2cf710[_0x26bab6(0xd6)]('\x0a');}export function renderUpdateSummary(_0x1c0a9e,_0x1ef609){const _0x5a07ab=a72_0x2b21;if(_0x1c0a9e['length']===0x0)return _0x5a07ab(0xe2);const _0x1b6d3a=['\x20\x20'+_0x1c0a9e[_0x5a07ab(0xe6)]+_0x5a07ab(0xd5),'\x20\x20\x20\x20JS:\x20\x20'+(_0x1ef609[0x0]??'(unchanged)'),'\x20\x20\x20\x20CSS:\x20'+(_0x1ef609[0x1]??'(unchanged)'),'',_0x5a07ab(0xd2)+_0x1c0a9e[_0x5a07ab(0xd6)](',\x20')];return _0x1b6d3a[_0x5a07ab(0xd6)]('\x0a');}function a72_0x5efa(){const _0x403630=['push','6698455neVCLW','5189506DyvvUN','6163026llOPqS','3418515OnRcGU','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','repeat','1498306eBafak','1473255VeMvyC','length','\x20\x20No\x20pages\x20to\x20sync.','local','Local','label','test','\x20\x20Affected\x20menus:\x20','Menu\x20Name','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','join','Platform','972130FucUQo','4wJcwpX','online','8MdFMBj','\x20\x20\x20\x20•\x20'];a72_0x5efa=function(){return _0x403630;};return a72_0x5efa();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x31b6f1,_0x3c90be){var _0x323ee8=a73_0x5d90,_0x45cf49=_0x31b6f1();while(!![]){try{var _0x2659a4=-parseInt(_0x323ee8(0x150))/0x1+parseInt(_0x323ee8(0x151))/0x2*(-parseInt(_0x323ee8(0x148))/0x3)+parseInt(_0x323ee8(0x14c))/0x4*(-parseInt(_0x323ee8(0x152))/0x5)+parseInt(_0x323ee8(0x14b))/0x6+-parseInt(_0x323ee8(0x153))/0x7*(parseInt(_0x323ee8(0x14d))/0x8)+-parseInt(_0x323ee8(0x14f))/0x9*(parseInt(_0x323ee8(0x14e))/0xa)+-parseInt(_0x323ee8(0x149))/0xb*(-parseInt(_0x323ee8(0x14a))/0xc);if(_0x2659a4===_0x3c90be)break;else _0x45cf49['push'](_0x45cf49['shift']());}catch(_0x4d3e38){_0x45cf49['push'](_0x45cf49['shift']());}}}(a73_0x40f7,0xc2db4));function a73_0x40f7(){var _0xef8e10=['1424143mtIkye','3VaPhow','11IfdcsW','58588668xzmWFX','2929086JrPOHH','528twAlvg','16HybDzV','6070fSjyGV','17361vhSBcJ','697744zfcpdz','2184786XMGamH','45625TeyZvX'];a73_0x40f7=function(){return _0xef8e10;};return a73_0x40f7();}function a73_0x5d90(_0x537ee9,_0x362172){_0x537ee9=_0x537ee9-0x148;var _0x40f7c7=a73_0x40f7();var _0x5d90ba=_0x40f7c7[_0x537ee9];return _0x5d90ba;}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';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(_0x266cfd,_0x4cfa9f){const _0x3135a0=a74_0x5c79,_0x18ecc4=_0x266cfd();while(!![]){try{const _0x5b08b3=parseInt(_0x3135a0(0x10a))/0x1+-parseInt(_0x3135a0(0xfa))/0x2*(-parseInt(_0x3135a0(0x105))/0x3)+parseInt(_0x3135a0(0x108))/0x4+parseInt(_0x3135a0(0x100))/0x5+parseInt(_0x3135a0(0xf8))/0x6+-parseInt(_0x3135a0(0x118))/0x7+-parseInt(_0x3135a0(0x111))/0x8*(parseInt(_0x3135a0(0x104))/0x9);if(_0x5b08b3===_0x4cfa9f)break;else _0x18ecc4['push'](_0x18ecc4['shift']());}catch(_0x42bde2){_0x18ecc4['push'](_0x18ecc4['shift']());}}}(a74_0x3eee,0x28a91));import a74_0x2ceef1 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a74_0x886356 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x504db4){const _0x3cbfb4=a74_0x5c79;return _0x504db4[_0x3cbfb4(0x109)](_0xfafd6f=>{const _0x2e7af0=_0x3cbfb4;if(_0xfafd6f?.[_0x2e7af0(0x10c)]==='ExitPromptError')throw CliErrors[_0x2e7af0(0xfc)](_0x2e7af0(0xf1));throw _0xfafd6f;});}export function startSpinner(_0x364e58){const _0xf64ef7=a74_0x5c79;return a74_0x886356({'text':_0x364e58,'color':_0xf64ef7(0x10d)})[_0xf64ef7(0x101)]();}function a74_0x5c79(_0x4b5788,_0x125b8e){_0x4b5788=_0x4b5788-0xef;const _0x3eee8a=a74_0x3eee();let _0x5c796c=_0x3eee8a[_0x4b5788];return _0x5c796c;}export function stopSpinner(_0x28b667,_0x2ac6a0,_0x3eb2c2){const _0x5756b6=a74_0x5c79;_0x3eb2c2?_0x28b667[_0x5756b6(0x10e)](_0x2ac6a0):_0x28b667[_0x5756b6(0xf0)](_0x2ac6a0);}export async function askConfirm(_0xa43186){return onCancel(confirm({'message':_0xa43186,'theme':{'prefix':''}}));}function a74_0x3eee(){const _0x30b408=['gray','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','18ncPbPC','384645nyVhNo','JS\x20URL\x20checked','test','132360KZZpGS','catch','27024aeXihH','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','name','cyan','succeed','CSS\x20URL\x20checked','No\x20menus\x20selected.','1664360ElFKnb','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','length','isTTY','includes','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','filter','576303lAaxux','\x20\x20Checking\x20JS\x20URL\x20reachability...','has','label','red','stdin','fail','Cancelled.','No\x20local\x20pages\x20found.','map','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','\x20\x20CSS\x20URL:','[already\x20on\x20platform]','\x20\x20Checking\x20CSS\x20URL\x20reachability...','1668378VjFpBm','green','2CNkQcP','error','cancelled','path','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','trim','992860mzdTzX','start'];a74_0x3eee=function(){return _0x30b408;};return a74_0x3eee();}export async function askJsUrl(_0x3ff095){const _0x73adab=a74_0x5c79;while(!![]){const _0x5d10c5=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x3ff095,'theme':{'prefix':''}}));if(_0x5d10c5['trim']()==='')throw CliErrors[_0x73adab(0xfc)](_0x73adab(0xf1));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x73adab(0x107)](_0x5d10c5['trim']())){console[_0x73adab(0xfb)](a74_0x2ceef1[_0x73adab(0x11c)](_0x73adab(0x103)));continue;}const _0x223de6=startSpinner(_0x73adab(0x119));try{const _0x4b7504=await isUrlReachable(_0x5d10c5[_0x73adab(0xff)]());stopSpinner(_0x223de6,_0x73adab(0x106),_0x4b7504);if(!_0x4b7504){console[_0x73adab(0xfb)](a74_0x2ceef1[_0x73adab(0x11c)](_0x73adab(0x116)));continue;}return _0x5d10c5['trim']();}catch(_0x3a7790){stopSpinner(_0x223de6,'JS\x20URL\x20check\x20failed',![]);throw _0x3a7790;}}}export async function askCssUrl(_0x5d1cf7){const _0x321c65=a74_0x5c79;while(!![]){const _0x5e281b=await onCancel(input({'message':_0x321c65(0xf5),'default':_0x5d1cf7,'theme':{'prefix':''}}));if(_0x5e281b['trim']()==='')throw CliErrors[_0x321c65(0xfc)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/['test'](_0x5e281b['trim']())){console[_0x321c65(0xfb)](a74_0x2ceef1[_0x321c65(0x11c)](_0x321c65(0x10b)));continue;}const _0x5780bd=startSpinner(_0x321c65(0xf7));try{const _0x17bee6=await isUrlReachable(_0x5e281b[_0x321c65(0xff)]());stopSpinner(_0x5780bd,_0x321c65(0x10f),_0x17bee6);if(!_0x17bee6){console[_0x321c65(0xfb)](a74_0x2ceef1[_0x321c65(0x11c)](_0x321c65(0xfe)));continue;}return _0x5e281b['trim']();}catch(_0x54efb6){stopSpinner(_0x5780bd,'CSS\x20URL\x20check\x20failed',![]);throw _0x54efb6;}}}export async function selectPages(_0x167c0f,_0x522719,_0x49284b){const _0x41f94b=a74_0x5c79,_0xe841b5=_0x167c0f[_0x41f94b(0xf3)](_0x58d0ff=>({'name':_0x58d0ff[_0x41f94b(0x11b)]+'\x20\x20'+(_0x522719[_0x41f94b(0x11a)](_0x58d0ff[_0x41f94b(0xfd)])?a74_0x2ceef1[_0x41f94b(0x102)](_0x41f94b(0xf6)):a74_0x2ceef1[_0x41f94b(0xf9)]('[new]')),'value':_0x58d0ff['label'],'checked':_0x49284b?_0x49284b[_0x41f94b(0x115)](_0x58d0ff[_0x41f94b(0x11b)]):!_0x522719[_0x41f94b(0x11a)](_0x58d0ff[_0x41f94b(0xfd)])}));if(_0xe841b5[_0x41f94b(0x113)]===0x0)throw new Error(_0x41f94b(0xf2));const _0x5e661f=await onCancel(checkbox({'message':_0x41f94b(0x112),'choices':_0xe841b5,'loop':![],'theme':{'prefix':''}}));if(_0x5e661f[_0x41f94b(0x113)]===0x0)throw new Error(_0x41f94b(0x110));return _0x167c0f[_0x41f94b(0x117)](_0x6f0520=>_0x5e661f['includes'](_0x6f0520[_0x41f94b(0x11b)]));}export function isInteractive(){const _0xe19f3e=a74_0x5c79;return process[_0xe19f3e(0xef)][_0xe19f3e(0x114)]===!![];}export function requireInteractive(){const _0x54ffea=a74_0x5c79;if(!isInteractive())throw new Error(_0x54ffea(0xf4)+'Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.');}
|