@lovrabet/rabetbase-cli 2.0.12 → 2.1.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- 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/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/doc.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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote.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/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/new.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/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 -0
- package/lib/commands/db/analyze-start.js +1 -0
- package/lib/commands/db/analyze-status.js +1 -0
- package/lib/commands/db/create.js +1 -0
- package/lib/commands/db/delete.js +1 -0
- package/lib/commands/db/detail.js +1 -0
- package/lib/commands/db/diff.js +1 -0
- package/lib/commands/db/index.js +1 -0
- package/lib/commands/db/list.js +1 -0
- package/lib/commands/db/shared.js +1 -0
- package/lib/commands/db/tables.js +1 -0
- package/lib/commands/db/test.js +1 -0
- package/lib/commands/db/update.js +1 -0
- 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/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/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 -0
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -0
- package/lib/commands/sql/validate.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/paths.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/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.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/config.js +1 -1
- package/lib/utils/copy-directory.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/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 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x3bb7e1,_0x4b8055){const _0x3d73f2=a57_0x1fe7,_0x1dec7f=_0x3bb7e1();while(!![]){try{const _0x2db616=-parseInt(_0x3d73f2(0x1d0))/0x1*(-parseInt(_0x3d73f2(0x1d6))/0x2)+-parseInt(_0x3d73f2(0x1d7))/0x3*(parseInt(_0x3d73f2(0x1d4))/0x4)+-parseInt(_0x3d73f2(0x1d1))/0x5*(parseInt(_0x3d73f2(0x1cf))/0x6)+-parseInt(_0x3d73f2(0x1ce))/0x7*(-parseInt(_0x3d73f2(0x1cd))/0x8)+parseInt(_0x3d73f2(0x1d2))/0x9*(-parseInt(_0x3d73f2(0x1cc))/0xa)+-parseInt(_0x3d73f2(0x1cb))/0xb+parseInt(_0x3d73f2(0x1d3))/0xc*(parseInt(_0x3d73f2(0x1d5))/0xd);if(_0x2db616===_0x4b8055)break;else _0x1dec7f['push'](_0x1dec7f['shift']());}catch(_0x32f042){_0x1dec7f['push'](_0x1dec7f['shift']());}}}(a57_0x457d,0xdc151));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';function a57_0x1fe7(_0x377f04,_0x5d39b3){_0x377f04=_0x377f04-0x1cb;const _0x457d5f=a57_0x457d();let _0x1fe732=_0x457d5f[_0x377f04];return _0x1fe732;}import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff];function a57_0x457d(){const _0x5e0974=['16933hLnLjJ','10VtETew','45nxKxCe','269316QlqglB','104836hOYzUQ','2015jAMSln','116jUNqgJ','66EibcBN','11804430MUPuzY','3120050lTDpiQ','10952lxXxPx','2387DdQWJn','2449194Puuzff'];a57_0x457d=function(){return _0x5e0974;};return a57_0x457d();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a58_0x940d16=a58_0x1e71;(function(_0x2f2e9b,_0x416435){const _0x193e30=a58_0x1e71,_0x365bf5=_0x2f2e9b();while(!![]){try{const _0x418ad8=parseInt(_0x193e30(0x1cb))/0x1*(-parseInt(_0x193e30(0x1cf))/0x2)+-parseInt(_0x193e30(0x1cc))/0x3+-parseInt(_0x193e30(0x1cd))/0x4+parseInt(_0x193e30(0x1ce))/0x5*(-parseInt(_0x193e30(0x1df))/0x6)+-parseInt(_0x193e30(0x1dc))/0x7*(parseInt(_0x193e30(0x1c7))/0x8)+parseInt(_0x193e30(0x1d3))/0x9*(parseInt(_0x193e30(0x1ca))/0xa)+-parseInt(_0x193e30(0x1d4))/0xb*(-parseInt(_0x193e30(0x1db))/0xc);if(_0x418ad8===_0x416435)break;else _0x365bf5['push'](_0x365bf5['shift']());}catch(_0x99bfaf){_0x365bf5['push'](_0x365bf5['shift']());}}}(a58_0x3246,0x93ae2));import{listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a58_0x3246(){const _0x408d04=['4700972ouGypW','5YZLTfw','46rxxRne','length','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','appCode','272583tSklLE','124795DdJntS','number','list','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','num','read','Page\x20index\x20(1-based)','3972cmwmNa','252rljMSo','Found\x20','\x20database\x20connection(s)','2549982dbLWes','Page\x20size','pagesize','229016tnPPbY','compress','page','350fsjTLM','39662TRkuRI','2001912QNkDvb'];a58_0x3246=function(){return _0x408d04;};return a58_0x3246();}import{sanitizeDbLinkList}from'../../commands/db/shared.js';function a58_0x1e71(_0x4f745f,_0x3ddaf2){_0x4f745f=_0x4f745f-0x1c7;const _0x3246cc=a58_0x3246();let _0x1e711f=_0x3246cc[_0x4f745f];return _0x1e711f;}export const dbList={'service':'db','command':a58_0x940d16(0x1d6),'description':a58_0x940d16(0x1d7),'risk':a58_0x940d16(0x1d9),'defaultOutputFormat':a58_0x940d16(0x1c8),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a58_0x940d16(0x1c9),'type':a58_0x940d16(0x1d5),'description':a58_0x940d16(0x1da),'default':0x1},{'name':a58_0x940d16(0x1e1),'type':a58_0x940d16(0x1d5),'description':a58_0x940d16(0x1e0),'default':0x64}],async 'execute'(_0x3fd8ed){const _0xebc30=a58_0x940d16,_0x2c60f4=_0x3fd8ed[_0xebc30(0x1d8)](_0xebc30(0x1c9),0x1)||0x1,_0xdd9679=_0x3fd8ed[_0xebc30(0x1d8)](_0xebc30(0x1e1),0x64)||0x64,{items:_0x61196f,paging:_0x1bab7e}=await listDbLinks(_0x3fd8ed[_0xebc30(0x1d2)],{'currentPage':_0x2c60f4,'pageSize':_0xdd9679}),_0x52f447=sanitizeDbLinkList(_0x61196f),_0x475001=_0x1bab7e?_0x1bab7e:{'currentPage':_0x2c60f4,'pageSize':_0xdd9679,'rowsOnPage':_0x52f447[_0xebc30(0x1d0)],'totalCount':null,'note':_0xebc30(0x1d1)};return{'ok':!![],'data':{'connections':_0x52f447,'paging':_0x475001},'message':_0xebc30(0x1dd)+_0x52f447[_0xebc30(0x1d0)]+_0xebc30(0x1de)};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x35c812,_0x305e00){const _0x5c0ad0=a59_0x358f,_0x1f6f10=_0x35c812();while(!![]){try{const _0xd6b31d=-parseInt(_0x5c0ad0(0x138))/0x1+-parseInt(_0x5c0ad0(0x12c))/0x2*(parseInt(_0x5c0ad0(0x13b))/0x3)+-parseInt(_0x5c0ad0(0x132))/0x4*(parseInt(_0x5c0ad0(0x140))/0x5)+-parseInt(_0x5c0ad0(0x12e))/0x6+parseInt(_0x5c0ad0(0x12f))/0x7*(-parseInt(_0x5c0ad0(0x13c))/0x8)+-parseInt(_0x5c0ad0(0x133))/0x9*(-parseInt(_0x5c0ad0(0x134))/0xa)+parseInt(_0x5c0ad0(0x136))/0xb;if(_0xd6b31d===_0x305e00)break;else _0x1f6f10['push'](_0x1f6f10['shift']());}catch(_0x4dde36){_0x1f6f10['push'](_0x1f6f10['shift']());}}}(a59_0x284a,0xca3f8));function shouldRedactKey(_0x1f99ce){const _0x5cb664=a59_0x358f,_0x2e58a6=_0x1f99ce[_0x5cb664(0x13d)]();if(_0x2e58a6===_0x5cb664(0x12b)||_0x2e58a6==='passwd'||_0x2e58a6==='dbpassword')return!![];if(_0x2e58a6[_0x5cb664(0x137)]('secret')||_0x2e58a6[_0x5cb664(0x137)](_0x5cb664(0x12d))||_0x2e58a6['includes']('credential'))return!![];if(_0x2e58a6[_0x5cb664(0x137)](_0x5cb664(0x13f))||_0x2e58a6['includes'](_0x5cb664(0x13e)))return!![];if(_0x2e58a6===_0x5cb664(0x13a)||_0x2e58a6===_0x5cb664(0x12a)||_0x2e58a6===_0x5cb664(0x139))return!![];return![];}function a59_0x358f(_0xa53595,_0x3eba3f){_0xa53595=_0xa53595-0x129;const _0x284a91=a59_0x284a();let _0x358f46=_0x284a91[_0xa53595];return _0x358f46;}export function sanitizeDbLinkForOutput(_0x4b82ad){const _0x5c0f83=a59_0x358f,_0x4c4a9f={..._0x4b82ad};for(const _0x22a318 of Object[_0x5c0f83(0x129)](_0x4c4a9f)){if(!shouldRedactKey(_0x22a318))continue;const _0x1f3944=_0x4c4a9f[_0x22a318];_0x1f3944!=null&&String(_0x1f3944)[_0x5c0f83(0x135)]>0x0&&(_0x4c4a9f[_0x22a318]=_0x5c0f83(0x131));}return _0x4c4a9f;}function a59_0x284a(){const _0x72d019=['trim','[redacted]','127652alGSon','11222973CCmknO','10LKSQWC','length','50187951OoearO','includes','1572702FdTGls','jdbcurl','authorization','89949EEmgMG','135384HYqkHL','toLowerCase','accesskey','privatekey','130Vaorle','keys','connectionstring','password','86zWcbyl','token','1542708VsGZwW','427uSmKkw'];a59_0x284a=function(){return _0x72d019;};return a59_0x284a();}export function sanitizeDbLinkList(_0xc3d40f){return _0xc3d40f['map'](_0x5e70e1=>sanitizeDbLinkForOutput(_0x5e70e1));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x2ee69b){const _0x3b8205=a59_0x358f,_0x283da4=_0x2ee69b[_0x3b8205(0x130)]();if(!_0x283da4)return![];return DB_URL_PATTERN['test'](_0x283da4);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a60_0x51c5(_0x440cbd,_0x487b76){_0x440cbd=_0x440cbd-0x184;const _0x32102a=a60_0x3210();let _0x51c536=_0x32102a[_0x440cbd];return _0x51c536;}const a60_0x74e9b7=a60_0x51c5;(function(_0x421b05,_0x226194){const _0x3f46f3=a60_0x51c5,_0x5b625b=_0x421b05();while(!![]){try{const _0xee8ef5=parseInt(_0x3f46f3(0x194))/0x1+parseInt(_0x3f46f3(0x18d))/0x2*(parseInt(_0x3f46f3(0x184))/0x3)+-parseInt(_0x3f46f3(0x188))/0x4*(-parseInt(_0x3f46f3(0x192))/0x5)+-parseInt(_0x3f46f3(0x185))/0x6+parseInt(_0x3f46f3(0x191))/0x7*(parseInt(_0x3f46f3(0x18b))/0x8)+-parseInt(_0x3f46f3(0x18e))/0x9*(-parseInt(_0x3f46f3(0x190))/0xa)+-parseInt(_0x3f46f3(0x18f))/0xb;if(_0xee8ef5===_0x226194)break;else _0x5b625b['push'](_0x5b625b['shift']());}catch(_0x2aa513){_0x5b625b['push'](_0x5b625b['shift']());}}}(a60_0x3210,0x44739));import{getDbAllTableList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a60_0x3210(){const _0x453ac4=['1528974hSfjLR','12533114GoLdjK','10hpUynH','147JtboGZ','103985zeGQwe','compress','363248FYvFmQ','length','522cbvsCF','677784xxlTLq','\x20table(s)\x20on\x20db\x20link\x20','num','8FBYzaR','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','read','211032oEhKGR','appCode','4644TzToLA'];a60_0x3210=function(){return _0x453ac4;};return a60_0x3210();}export const dbTables={'service':'db','command':'tables','description':a60_0x74e9b7(0x189),'risk':a60_0x74e9b7(0x18a),'defaultOutputFormat':a60_0x74e9b7(0x193),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3a703a){const _0x223d4e=a60_0x74e9b7,_0x345b8c=_0x3a703a[_0x223d4e(0x187)]('id'),_0x55ce8b=await getDbAllTableList(_0x3a703a[_0x223d4e(0x18c)],_0x345b8c);return{'ok':!![],'data':{'dbLinkId':_0x345b8c,'total':_0x55ce8b[_0x223d4e(0x195)],'tables':_0x55ce8b},'message':_0x55ce8b[_0x223d4e(0x195)]+_0x223d4e(0x186)+_0x345b8c};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a61_0x88012d=a61_0x1105;function a61_0x1105(_0x355766,_0x2cb7da){_0x355766=_0x355766-0x12b;const _0x3a77bb=a61_0x3a77();let _0x1105bf=_0x3a77bb[_0x355766];return _0x1105bf;}(function(_0x12a785,_0x1874bf){const _0x4ec333=a61_0x1105,_0x34f36d=_0x12a785();while(!![]){try{const _0x129178=parseInt(_0x4ec333(0x13c))/0x1*(-parseInt(_0x4ec333(0x12d))/0x2)+-parseInt(_0x4ec333(0x136))/0x3+parseInt(_0x4ec333(0x134))/0x4+parseInt(_0x4ec333(0x132))/0x5+-parseInt(_0x4ec333(0x133))/0x6+-parseInt(_0x4ec333(0x12e))/0x7+parseInt(_0x4ec333(0x140))/0x8;if(_0x129178===_0x1874bf)break;else _0x34f36d['push'](_0x34f36d['shift']());}catch(_0x12bb4f){_0x34f36d['push'](_0x34f36d['shift']());}}}(a61_0x3a77,0x41182));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x1aee00){const _0x183145=a61_0x1105;if(_0x1aee00===!![]||_0x1aee00===![])return{'success':_0x1aee00};if(_0x1aee00===null||_0x1aee00===undefined)return{'type':typeof _0x1aee00};if(typeof _0x1aee00!==_0x183145(0x137))return{'type':typeof _0x1aee00};const _0x14128e=_0x1aee00,_0x415bb0=[_0x183145(0x13e),_0x183145(0x143),_0x183145(0x13a),_0x183145(0x12f),_0x183145(0x131),_0x183145(0x142)],_0x578568={};for(const _0x55fc41 of _0x415bb0){if(_0x55fc41 in _0x14128e)_0x578568[_0x55fc41]=_0x14128e[_0x55fc41];}return Object['keys'](_0x578568)[_0x183145(0x138)]===0x0&&(_0x578568[_0x183145(0x141)]=Object['keys'](_0x14128e)[_0x183145(0x139)](0x0,0x14)),_0x578568;}export const dbTest={'service':'db','command':a61_0x88012d(0x12b),'description':a61_0x88012d(0x13d),'risk':a61_0x88012d(0x12c),'defaultOutputFormat':a61_0x88012d(0x13f),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x520d46){const _0x2ca368=a61_0x88012d,_0x8ec15f=_0x520d46[_0x2ca368(0x135)]('id'),_0x555c2f=await testDbLinkConnect(_0x8ec15f),_0x157176=_0x555c2f===!![]||typeof _0x555c2f===_0x2ca368(0x137)&&_0x555c2f!==null&&_0x555c2f[_0x2ca368(0x13e)]===!![],_0x198bce=summarizeTestConnectResult(_0x555c2f);return{'ok':!![],'data':{'id':_0x8ec15f,'connected':Boolean(_0x157176),'result':_0x198bce},'message':_0x157176?_0x2ca368(0x130)+_0x8ec15f:_0x2ca368(0x13b)+_0x8ec15f+'\x20(see\x20data.result)'};}};function a61_0x3a77(){const _0x5a3f02=['Connection\x20check\x20finished\x20for\x20db\x20link\x20','1051ScJkMI','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','success','compress','8559464yYcRAz','keys','data','message','test','read','192LQEtjc','2717001mtUVBh','error','Connection\x20OK\x20for\x20db\x20link\x20','msg','1005880GmkwQj','198828bRofTH','139272eqHamK','num','1551372dNshuM','object','length','slice','code'];a61_0x3a77=function(){return _0x5a3f02;};return a61_0x3a77();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a62_0x145147=a62_0x5bb1;(function(_0x5271d1,_0x11474b){const _0x71b170=a62_0x5bb1,_0x397c5a=_0x5271d1();while(!![]){try{const _0x3bb21e=parseInt(_0x71b170(0x136))/0x1+parseInt(_0x71b170(0x135))/0x2*(parseInt(_0x71b170(0x151))/0x3)+-parseInt(_0x71b170(0x14c))/0x4*(-parseInt(_0x71b170(0x152))/0x5)+-parseInt(_0x71b170(0x145))/0x6+-parseInt(_0x71b170(0x14a))/0x7+-parseInt(_0x71b170(0x131))/0x8+-parseInt(_0x71b170(0x134))/0x9*(-parseInt(_0x71b170(0x132))/0xa);if(_0x3bb21e===_0x11474b)break;else _0x397c5a['push'](_0x397c5a['shift']());}catch(_0x6aaad5){_0x397c5a['push'](_0x397c5a['shift']());}}}(a62_0x3fe9,0xae9d3));function a62_0x3fe9(){const _0x24013f=['string','trim','Updated\x20db\x20link\x20','dbDesc','1947870oVeQNH','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','dbdesc','/smartapi/dblink/update','POST','3550939XJvibS','dbparam','5586088AWhIcP','dbParam','New\x20database\x20name','New\x20connection\x20parameter\x20string','validation','3PyNbGM','5wNeMMl','dburl','5518672sIxEgs','946570NhpHBN','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','9BPuPYL','762022HDnZLk','364785KxnwyG','dbName','dbUrl','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','dbname','password','update','write','username','num','str'];a62_0x3fe9=function(){return _0x24013f;};return a62_0x3fe9();}import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';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';function a62_0x5bb1(_0x705a13,_0x399fbf){_0x705a13=_0x705a13-0x130;const _0x3fe997=a62_0x3fe9();let _0x5bb1be=_0x3fe997[_0x705a13];return _0x5bb1be;}export const dbUpdate={'service':'db','command':a62_0x145147(0x13c),'description':a62_0x145147(0x133),'risk':a62_0x145147(0x13d),'defaultOutputFormat':'compress','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a62_0x145147(0x13a),'type':'string','description':a62_0x145147(0x14e)},{'name':a62_0x145147(0x130),'type':a62_0x145147(0x141),'description':'New\x20host:port'},{'name':a62_0x145147(0x13e),'type':a62_0x145147(0x141),'description':'New\x20username'},{'name':a62_0x145147(0x13b),'type':a62_0x145147(0x141),'description':'New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API'},{'name':a62_0x145147(0x14b),'type':a62_0x145147(0x141),'description':a62_0x145147(0x14f)},{'name':'dbdesc','type':a62_0x145147(0x141),'description':'New\x20description'}],async 'validate'(_0x3293aa){const _0x4d0b01=a62_0x145147,_0x3faa4d=_0x3293aa[_0x4d0b01(0x140)]('dburl');if(_0x3faa4d&&!validateDbUrl(_0x3faa4d[_0x4d0b01(0x142)]()))throw CliErrors[_0x4d0b01(0x150)](_0x4d0b01(0x139)+_0x3faa4d+'\x22');},async 'dryRun'(_0x148c9d){const _0x2d4bd9=a62_0x145147,_0x1caeac=_0x148c9d[_0x2d4bd9(0x13f)]('id'),_0x10367c=await getDbLinkInfo(_0x1caeac),_0x19f32a={..._0x10367c},_0x48a77d=_0x148c9d['str'](_0x2d4bd9(0x13a));if(_0x48a77d)_0x19f32a['dbName']=_0x48a77d;const _0x40c9dc=_0x148c9d['str']('dburl');if(_0x40c9dc)_0x19f32a[_0x2d4bd9(0x138)]=_0x40c9dc[_0x2d4bd9(0x142)]();const _0x241427=_0x148c9d[_0x2d4bd9(0x140)](_0x2d4bd9(0x13e));if(_0x241427)_0x19f32a[_0x2d4bd9(0x13e)]=_0x241427;const _0x56b48f=_0x148c9d['str'](_0x2d4bd9(0x13b));if(_0x56b48f)_0x19f32a['password']=_0x56b48f;const _0x1e4f10=_0x148c9d['str']('dbparam');if(_0x1e4f10)_0x19f32a[_0x2d4bd9(0x14d)]=_0x1e4f10;const _0x1c7f67=_0x148c9d[_0x2d4bd9(0x140)](_0x2d4bd9(0x147));if(_0x1c7f67)_0x19f32a[_0x2d4bd9(0x144)]=_0x1c7f67;const _0x42ef2c=sanitizeDbLinkForOutput(_0x19f32a);return{'method':_0x2d4bd9(0x149),'url':_0x2d4bd9(0x148),'body':_0x42ef2c,'description':_0x2d4bd9(0x146)};},async 'execute'(_0x13ce3d){const _0x1450cd=a62_0x145147,_0xac1c33=_0x13ce3d[_0x1450cd(0x13f)]('id'),_0x32994a=await getDbLinkInfo(_0xac1c33),_0x14c534={..._0x32994a},_0x3b4aa7=_0x13ce3d['str'](_0x1450cd(0x13a));if(_0x3b4aa7)_0x14c534[_0x1450cd(0x137)]=_0x3b4aa7;const _0x8a0935=_0x13ce3d[_0x1450cd(0x140)](_0x1450cd(0x130));if(_0x8a0935)_0x14c534[_0x1450cd(0x138)]=_0x8a0935['trim']();const _0x9f6ea7=_0x13ce3d[_0x1450cd(0x140)](_0x1450cd(0x13e));if(_0x9f6ea7)_0x14c534[_0x1450cd(0x13e)]=_0x9f6ea7;const _0x5dada4=_0x13ce3d['str']('password');if(_0x5dada4)_0x14c534[_0x1450cd(0x13b)]=_0x5dada4;const _0x3b27f2=_0x13ce3d[_0x1450cd(0x140)](_0x1450cd(0x14b));if(_0x3b27f2)_0x14c534[_0x1450cd(0x14d)]=_0x3b27f2;const _0x503788=_0x13ce3d[_0x1450cd(0x140)](_0x1450cd(0x147));if(_0x503788)_0x14c534[_0x1450cd(0x144)]=_0x503788;const _0xdf0dd3=await updateDbLink(_0x14c534);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0xdf0dd3),'message':_0x1450cd(0x143)+_0xac1c33};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x1df38f=a63_0x24f1;(function(_0x25bdc2,_0x1bc09d){const _0x349b22=a63_0x24f1,_0x34f44c=_0x25bdc2();while(!![]){try{const _0x2b6025=-parseInt(_0x349b22(0x15f))/0x1*(parseInt(_0x349b22(0x13c))/0x2)+parseInt(_0x349b22(0x13b))/0x3+parseInt(_0x349b22(0x14e))/0x4+-parseInt(_0x349b22(0x15b))/0x5*(-parseInt(_0x349b22(0x15d))/0x6)+-parseInt(_0x349b22(0x144))/0x7+-parseInt(_0x349b22(0x13f))/0x8*(parseInt(_0x349b22(0x11b))/0x9)+-parseInt(_0x349b22(0x14d))/0xa*(-parseInt(_0x349b22(0x151))/0xb);if(_0x2b6025===_0x1bc09d)break;else _0x34f44c['push'](_0x34f44c['shift']());}catch(_0x16a8fd){_0x34f44c['push'](_0x34f44c['shift']());}}}(a63_0x3677,0xba6dc));import a63_0x183ff3 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';function a63_0x3677(){const _0x51c96e=['yellow','\x20doctor','platform','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','slice','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','format','appCode','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','⚠\x20Empty\x20(treated\x20as\x20{})','(set\x20via\x20file,\x20length=','✗\x20Not\x20logged\x20in','(no\x20file)','bold','\x20\x20\x20\x20cookie:\x20\x20\x20','status','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','log','(missing)','version','3174885alpuOR','759928gvqLXq','env','(not\x20set)','12027944nBRlnS','\x20\x20explicitAppName:\x20','padEnd','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','8396696ybflUw','\x20\x20Merged\x20Config','\x20(default)','\x20\x20─','(default)','arch','read','explicitAppName','Project','3310VQdsXN','892960IdOCgS','repeat','apps','115819vXiazy','\x20←\x20current','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20appcode:\x20\x20','red','defaultApp','appcode','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Auth','gray','75ccXAhJ','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','87942NiSyIX','\x20\x20Config\x20JSON','4SfqMBy','length','message','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','(not\x20found)','\x20\x20API\x20Endpoints','doctor','cookie','9ggahxj','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','green','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','Global','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(inherit)'];a63_0x3677=function(){return _0x51c96e;};return a63_0x3677();}import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';function a63_0x24f1(_0x466dd0,_0x23c221){_0x466dd0=_0x466dd0-0x115;const _0x3677b5=a63_0x3677();let _0x24f15e=_0x3677b5[_0x466dd0];return _0x24f15e;}import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';async function execute(_0x33f819){const _0x587ed5=a63_0x24f1,_0x709403=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x587ed5(0x129)](0x0,0xa)+')':VERSION,_0x421250=buildConfigFromFlags({}),_0x1481c9=getCookie();console['log'](),console[_0x587ed5(0x138)](a63_0x183ff3['bold'](CLI_BIN_NAME+_0x587ed5(0x126))),console[_0x587ed5(0x138)](a63_0x183ff3['gray']('─'[_0x587ed5(0x14f)](0x32))),console[_0x587ed5(0x138)](_0x587ed5(0x137)+_0x709403),console[_0x587ed5(0x138)](_0x587ed5(0x158)+process[_0x587ed5(0x13a)]),console[_0x587ed5(0x138)](_0x587ed5(0x12d)+process[_0x587ed5(0x127)]+'\x20'+process[_0x587ed5(0x149)]),console['log'](),console[_0x587ed5(0x138)](a63_0x183ff3[_0x587ed5(0x134)](_0x587ed5(0x116))),console['log'](a63_0x183ff3[_0x587ed5(0x15a)](_0x587ed5(0x147)['repeat'](0x1e)));const _0x569c68=getGlobalConfigPath(),_0x5dd606=getProjectConfigPath();console[_0x587ed5(0x138)](_0x587ed5(0x15c)+(_0x569c68||a63_0x183ff3[_0x587ed5(0x15a)](_0x587ed5(0x117)))),console[_0x587ed5(0x138)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5dd606||a63_0x183ff3[_0x587ed5(0x15a)]('(not\x20found)'))),console['log'](),console[_0x587ed5(0x138)](a63_0x183ff3[_0x587ed5(0x134)](_0x587ed5(0x15e))),console['log'](a63_0x183ff3['gray'](_0x587ed5(0x147)[_0x587ed5(0x14f)](0x1e)));const _0x37b65f=(_0x5a5386,_0x26935e)=>{const _0x26fa5a=_0x587ed5;if(!_0x26935e){console[_0x26fa5a(0x138)]('\x20\x20'+_0x5a5386['padEnd'](0x11)+'\x20'+a63_0x183ff3[_0x26fa5a(0x15a)](_0x26fa5a(0x133)));return;}const _0x2c4134=inspectCliConfigJsonFile(_0x26935e);if(_0x2c4134[_0x26fa5a(0x136)]==='ok')console[_0x26fa5a(0x138)]('\x20\x20'+_0x5a5386['padEnd'](0x11)+'\x20'+a63_0x183ff3['green'](_0x26fa5a(0x11f)));else{if(_0x2c4134[_0x26fa5a(0x136)]==='empty')console[_0x26fa5a(0x138)]('\x20\x20'+_0x5a5386[_0x26fa5a(0x141)](0x11)+'\x20'+a63_0x183ff3[_0x26fa5a(0x125)](_0x26fa5a(0x130)));else _0x2c4134['status']===_0x26fa5a(0x122)?console[_0x26fa5a(0x138)]('\x20\x20'+_0x5a5386[_0x26fa5a(0x141)](0x11)+'\x20'+a63_0x183ff3[_0x26fa5a(0x15a)](_0x26fa5a(0x139))):(console[_0x26fa5a(0x138)]('\x20\x20'+_0x5a5386[_0x26fa5a(0x141)](0x11)+'\x20'+a63_0x183ff3['red']('✗\x20Invalid\x20JSON')),console[_0x26fa5a(0x138)]('\x20\x20'+''[_0x26fa5a(0x141)](0x11)+'\x20'+a63_0x183ff3[_0x26fa5a(0x155)](_0x2c4134[_0x26fa5a(0x161)])));}};_0x37b65f(_0x587ed5(0x120),_0x569c68),_0x37b65f(_0x587ed5(0x14c),_0x5dd606),console[_0x587ed5(0x138)](),console['log'](a63_0x183ff3[_0x587ed5(0x134)](_0x587ed5(0x145))),console[_0x587ed5(0x138)](a63_0x183ff3[_0x587ed5(0x15a)](_0x587ed5(0x147)[_0x587ed5(0x14f)](0x1e))),console[_0x587ed5(0x138)](_0x587ed5(0x123)+(_0x421250[_0x587ed5(0x12c)]||a63_0x183ff3['red'](_0x587ed5(0x13e)))),console[_0x587ed5(0x138)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x421250[_0x587ed5(0x13d)]),console[_0x587ed5(0x138)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x421250['locale']),console[_0x587ed5(0x138)](_0x587ed5(0x153)+_0x421250['apiDir']),console['log'](_0x587ed5(0x12a)+(_0x421250[_0x587ed5(0x156)]||a63_0x183ff3[_0x587ed5(0x15a)](_0x587ed5(0x12f)))),console[_0x587ed5(0x138)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x421250['currentApp']||a63_0x183ff3[_0x587ed5(0x15a)](_0x587ed5(0x12f)))),console[_0x587ed5(0x138)](_0x587ed5(0x140)+(_0x421250[_0x587ed5(0x14b)]||a63_0x183ff3[_0x587ed5(0x15a)]('(none)'))),console[_0x587ed5(0x138)](_0x587ed5(0x11c)+(_0x421250[_0x587ed5(0x12b)]||a63_0x183ff3[_0x587ed5(0x15a)]('(default:\x20pretty)'))),console[_0x587ed5(0x138)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x421250['pageSize']??a63_0x183ff3[_0x587ed5(0x15a)](_0x587ed5(0x148)))),console[_0x587ed5(0x138)](_0x587ed5(0x162)+_0x421250['riskLevel']),console[_0x587ed5(0x138)](_0x587ed5(0x143)+_0x421250['verbose']),console['log'](_0x587ed5(0x121)+(_0x421250['cookie']?a63_0x183ff3[_0x587ed5(0x11d)]('(set,\x20length='+_0x421250[_0x587ed5(0x11a)][_0x587ed5(0x160)]+')'):_0x1481c9?a63_0x183ff3[_0x587ed5(0x11d)](_0x587ed5(0x131)+_0x1481c9[_0x587ed5(0x160)]+')'):a63_0x183ff3['gray'](_0x587ed5(0x12f))));const _0x6a62d9=Object['keys'](_0x421250['apps']);if(_0x6a62d9[_0x587ed5(0x160)]>0x0){console['log'](),console[_0x587ed5(0x138)](a63_0x183ff3['bold']('\x20\x20Apps')),console[_0x587ed5(0x138)](a63_0x183ff3[_0x587ed5(0x15a)]('\x20\x20─'[_0x587ed5(0x14f)](0x1e)));for(const _0x304c19 of _0x6a62d9){const _0x5baeac=_0x421250[_0x587ed5(0x150)][_0x304c19],_0x58cd63=_0x304c19===_0x421250['defaultApp'],_0x50f58a=_0x304c19===_0x421250['currentApp'],_0x2e03e7=_0x50f58a?a63_0x183ff3['green'](_0x587ed5(0x152)):'',_0xa9d2ce=_0x58cd63?_0x587ed5(0x146):'';console[_0x587ed5(0x138)]('\x20\x20'+_0x304c19+_0xa9d2ce+_0x2e03e7),console[_0x587ed5(0x138)](_0x587ed5(0x154)+_0x5baeac[_0x587ed5(0x157)]),console['log'](_0x587ed5(0x115)+(_0x5baeac[_0x587ed5(0x13d)]||a63_0x183ff3[_0x587ed5(0x15a)](_0x587ed5(0x124)))),console[_0x587ed5(0x138)]('\x20\x20\x20\x20apiDir:\x20\x20\x20'+(_0x5baeac['apiDir']||a63_0x183ff3['gray']('(inherit)'))),console[_0x587ed5(0x138)](_0x587ed5(0x135)+(_0x5baeac[_0x587ed5(0x11a)]?a63_0x183ff3['green']('(set)'):a63_0x183ff3[_0x587ed5(0x15a)](_0x587ed5(0x124))));}}console[_0x587ed5(0x138)](),console[_0x587ed5(0x138)](a63_0x183ff3['bold'](_0x587ed5(0x118))),console[_0x587ed5(0x138)](a63_0x183ff3[_0x587ed5(0x15a)](_0x587ed5(0x147)[_0x587ed5(0x14f)](0x1e))),console[_0x587ed5(0x138)](_0x587ed5(0x11e)+getApiDomain()),console[_0x587ed5(0x138)](_0x587ed5(0x128)+getUserDomain()),console[_0x587ed5(0x138)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x587ed5(0x138)](),console['log'](a63_0x183ff3[_0x587ed5(0x134)](_0x587ed5(0x159))),console[_0x587ed5(0x138)](a63_0x183ff3[_0x587ed5(0x15a)](_0x587ed5(0x147)[_0x587ed5(0x14f)](0x1e)));if(_0x1481c9){const _0x468846=await getIsSessionValid();console[_0x587ed5(0x138)](_0x587ed5(0x12e)+(_0x468846?a63_0x183ff3[_0x587ed5(0x11d)]('✓\x20Valid'):a63_0x183ff3[_0x587ed5(0x155)]('✗\x20Expired')));}else console[_0x587ed5(0x138)](_0x587ed5(0x12e)+a63_0x183ff3[_0x587ed5(0x155)](_0x587ed5(0x132)));return console[_0x587ed5(0x138)](),{'ok':!![]};}export const doctorDefinition={'service':a63_0x1df38f(0x119),'command':'check','description':a63_0x1df38f(0x142),'risk':a63_0x1df38f(0x14a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a64_0x2a3ae4=a64_0x3298;function a64_0x3298(_0x4ca944,_0x21ab3f){_0x4ca944=_0x4ca944-0x13e;const _0x310410=a64_0x3104();let _0x32983e=_0x310410[_0x4ca944];return _0x32983e;}(function(_0x17f036,_0x132fda){const _0x2ac127=a64_0x3298,_0xd467cd=_0x17f036();while(!![]){try{const _0x4089df=-parseInt(_0x2ac127(0x148))/0x1+parseInt(_0x2ac127(0x16a))/0x2*(parseInt(_0x2ac127(0x157))/0x3)+parseInt(_0x2ac127(0x15e))/0x4+parseInt(_0x2ac127(0x163))/0x5*(parseInt(_0x2ac127(0x153))/0x6)+-parseInt(_0x2ac127(0x15f))/0x7+-parseInt(_0x2ac127(0x169))/0x8*(-parseInt(_0x2ac127(0x14f))/0x9)+parseInt(_0x2ac127(0x151))/0xa*(parseInt(_0x2ac127(0x154))/0xb);if(_0x4089df===_0x132fda)break;else _0xd467cd['push'](_0xd467cd['shift']());}catch(_0x1e6b3b){_0xd467cd['push'](_0xd467cd['shift']());}}}(a64_0x3104,0xa7a45));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a64_0x3104(){const _0x5e36ea=['run','cwd','apps','\x20\x20Default:\x20','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','message','774821BJvOfz','nonInteractive','appcode','\x20\x20Config:\x20','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','production','\x20\x20Apps:\x20','3483siICIL','project','138040EihQog','\x20\x20AppCode:\x20','6nNJSEY','110ItDVWj','map','global','339aloyAy','appCode','validation','log','Use\x20`','Target\x20environment','daily','3392724ZQhAMV','255626htKdxz','Usage:\x20','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','valid','373295NbpvqI','defaultApp','env','boolean','Auto-confirm\x20prompts','\x20\x20Env:\x20','5656dPquGR','2894irGjaM','检测到旧配置文件,正在自动升级...\x0a','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','length','str','../../commands/project/init.js','Write\x20to\x20global\x20config\x20instead\x20of\x20project','toLocaleString','bool','App\x20code\x20to\x20initialize\x20with','join','yes'];a64_0x3104=function(){return _0x5e36ea;};return a64_0x3104();}import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.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';function syntheticApp(_0x52b3ab){return{'appCode':_0x52b3ab,'appName':_0x52b3ab};}function writeInitConfig(_0x2662bd,_0x2163e4,_0xb8e1fe){const _0x83f979=a64_0x3298,_0x3639f4=resolveWriteConfigPath(_0x2662bd),_0x2d773c={'version':getCliVersion(),'createdAt':new Date()[_0x83f979(0x171)](),'env':_0xb8e1fe};if(_0x2163e4[_0x83f979(0x16d)]===0x1)_0x2d773c['appcode']=_0x2163e4[0x0][_0x83f979(0x158)];else{_0x2d773c[_0x83f979(0x143)]={};for(const _0x36e4b1 of _0x2163e4){_0x2d773c[_0x83f979(0x143)][_0x36e4b1[_0x83f979(0x158)]]={'appcode':_0x36e4b1[_0x83f979(0x158)],'env':_0xb8e1fe};}_0x2d773c[_0x83f979(0x164)]=_0x2163e4[0x0][_0x83f979(0x158)];}writeConfigFile(_0x3639f4,_0x2d773c);const _0x2c40c7=_0x2662bd==='global'?_0x83f979(0x156):_0x83f979(0x150);console[_0x83f979(0x15a)]('\x0a✓\x20Successfully\x20initialized\x20'+_0x2c40c7+'\x20config'),_0x2163e4[_0x83f979(0x16d)]===0x1?console[_0x83f979(0x15a)](_0x83f979(0x152)+_0x2163e4[0x0][_0x83f979(0x158)]):(console[_0x83f979(0x15a)](_0x83f979(0x14e)+_0x2163e4[_0x83f979(0x155)](_0x1e6e5e=>_0x1e6e5e[_0x83f979(0x158)])[_0x83f979(0x13f)](',\x20')),console['log'](_0x83f979(0x144)+_0x2d773c[_0x83f979(0x164)])),console[_0x83f979(0x15a)](_0x83f979(0x168)+_0x2d773c['env']),console[_0x83f979(0x15a)](_0x83f979(0x14b)+_0x3639f4);}async function runSmartInit(_0x2d7992){const _0x1600bd=a64_0x3298,_0x4c0333=process[_0x1600bd(0x142)](),_0x562861=_0x2d7992[_0x1600bd(0x172)](_0x1600bd(0x156))?_0x1600bd(0x156):_0x1600bd(0x150),_0x4c7769=_0x2d7992['str'](_0x1600bd(0x165))||_0x1600bd(0x14d),_0x3709b4=_0x2d7992[_0x1600bd(0x16e)](_0x1600bd(0x14a))||undefined,_0x137d11=_0x2d7992[_0x1600bd(0x172)](_0x1600bd(0x150));if(_0x137d11){const {initConfig:_0x44d504}=await import(_0x1600bd(0x16f));return _0x44d504({'appcode':_0x3709b4,'env':_0x4c7769,'autoYes':_0x2d7992['bool'](_0x1600bd(0x140))});}if(_0x562861==='project'){const _0x27152a=existsSync(resolve(_0x4c0333,NEW_CONFIG_NAME)),_0x981013=LEGACY_CONFIG_NAMES['some'](_0x4a3cb0=>existsSync(resolve(_0x4c0333,_0x4a3cb0)));if(_0x981013&&!_0x27152a)return console['log'](_0x1600bd(0x16b)),upgradeApp(_0x2d7992['nonInteractive'],{'yes':_0x2d7992[_0x1600bd(0x172)](_0x1600bd(0x140))});if(_0x27152a)throw CliErrors[_0x1600bd(0x159)](_0x1600bd(0x16c),_0x1600bd(0x15b)+CLI_BIN_NAME+_0x1600bd(0x146));}if(_0x3709b4){const _0x58fdfe=validateAppcode(_0x3709b4);if(!_0x58fdfe[_0x1600bd(0x162)])throw CliErrors[_0x1600bd(0x159)](_0x58fdfe[_0x1600bd(0x147)]);writeInitConfig(_0x562861,[syntheticApp(_0x3709b4)],_0x4c7769);return;}if(_0x2d7992[_0x1600bd(0x149)])throw CliErrors['flagMissing']('appcode',_0x1600bd(0x160)+CLI_BIN_NAME+_0x1600bd(0x161));const _0x20d0fc=getCookie(),_0x59c4ea=await selectMultipleApps(_0x20d0fc),_0x3c3c82=_0x59c4ea==='custom'?[syntheticApp(await promptCustomAppcode())]:_0x59c4ea;writeInitConfig(_0x562861,_0x3c3c82,_0x4c7769);}const initFlags=[{'name':a64_0x2a3ae4(0x156),'type':a64_0x2a3ae4(0x166),'description':a64_0x2a3ae4(0x170),'default':![]},{'name':a64_0x2a3ae4(0x165),'type':'string','description':a64_0x2a3ae4(0x15c),'default':a64_0x2a3ae4(0x14d),'enum':[a64_0x2a3ae4(0x14d),a64_0x2a3ae4(0x15d)]},{'name':a64_0x2a3ae4(0x14a),'type':'string','description':a64_0x2a3ae4(0x13e)},{'name':a64_0x2a3ae4(0x150),'type':a64_0x2a3ae4(0x166),'description':a64_0x2a3ae4(0x145),'default':![]},{'name':'yes','type':a64_0x2a3ae4(0x166),'description':a64_0x2a3ae4(0x167),'default':![]}];export const initDefinitions=[{'service':'init','command':a64_0x2a3ae4(0x141),'description':a64_0x2a3ae4(0x14c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x3df4eb){return await runSmartInit(_0x3df4eb),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a65_0x2587cc=a65_0x5f35;function a65_0x5f35(_0x4274f1,_0x333877){_0x4274f1=_0x4274f1-0x84;const _0x46b7fe=a65_0x46b7();let _0x5f358a=_0x46b7fe[_0x4274f1];return _0x5f358a;}(function(_0x497371,_0x129e7b){const _0x64eed9=a65_0x5f35,_0x4eadb3=_0x497371();while(!![]){try{const _0xb46b2f=-parseInt(_0x64eed9(0x96))/0x1+parseInt(_0x64eed9(0x94))/0x2*(-parseInt(_0x64eed9(0x9c))/0x3)+-parseInt(_0x64eed9(0x8e))/0x4+parseInt(_0x64eed9(0xa1))/0x5+parseInt(_0x64eed9(0x89))/0x6+-parseInt(_0x64eed9(0x95))/0x7+parseInt(_0x64eed9(0xa2))/0x8;if(_0xb46b2f===_0x129e7b)break;else _0x4eadb3['push'](_0x4eadb3['shift']());}catch(_0x35d35d){_0x4eadb3['push'](_0x4eadb3['shift']());}}}(a65_0x46b7,0x2dcde));import{logger}from'../../utils/logger.js';function printLogs(_0x255fc9){const _0x1f6191=a65_0x5f35;if(_0x255fc9[_0x1f6191(0xa0)]===0x0){console[_0x1f6191(0x92)](_0x1f6191(0x8a));return;}console['log'](_0x1f6191(0x90)),_0x255fc9[_0x1f6191(0x93)]((_0x338cf2,_0x215525)=>{const _0x522eed=_0x1f6191,_0x55d745=new Date(_0x338cf2[_0x522eed(0x9b)])[_0x522eed(0x88)](_0x522eed(0x8c)),_0x2751c0=_0x338cf2[_0x522eed(0x9e)]==='success'?'√':_0x338cf2[_0x522eed(0x9e)]===_0x522eed(0x8d)?'×':_0x338cf2[_0x522eed(0x9e)]===_0x522eed(0x86)?'!':'i';console[_0x522eed(0x92)](_0x215525+0x1+'.\x20'+_0x2751c0+'\x20['+_0x338cf2[_0x522eed(0x87)]+']\x20'+_0x338cf2[_0x522eed(0xa3)]),console[_0x522eed(0x92)]('\x20\x20\x20Time:\x20'+_0x55d745),_0x338cf2['duration']&&console['log'](_0x522eed(0x99)+_0x338cf2[_0x522eed(0x9f)]+'ms'),_0x338cf2[_0x522eed(0x85)]&&Object['keys'](_0x338cf2[_0x522eed(0x85)])['length']>0x0&&console[_0x522eed(0x92)](_0x522eed(0x8b)+JSON[_0x522eed(0x9a)](_0x338cf2[_0x522eed(0x85)],null,0x2)),console[_0x522eed(0x92)]('');});}export const logsDefinitions=[{'service':a65_0x2587cc(0x97),'command':'show','description':'View\x20command\x20history\x20logs','risk':a65_0x2587cc(0x84),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4a0303){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':a65_0x2587cc(0x97),'command':a65_0x2587cc(0x9d),'description':a65_0x2587cc(0x98),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x24b2ee){const _0x33ab4e=a65_0x2587cc;return logger[_0x33ab4e(0x91)](),console['log'](_0x33ab4e(0x8f)),{'ok':!![]};}}];function a65_0x46b7(){const _0x341261=['3XIvFrL','clear','level','duration','length','1638085atmzBr','6995024YlBpCC','message','read','details','warn','command','toLocaleString','1260408BLnjTi','*\x20No\x20logs\x20found','\x20\x20\x20Details:\x20','en-US','error','1024128JxAdhA','*\x20Logs\x20cleared','*\x20Lovrabet\x20CLI\x20logs:\x0a','clearLogs','log','forEach','749176PJqvTA','2056719uVQZJL','300012VSpcQv','logs','Clear\x20command\x20history\x20logs','\x20\x20\x20Duration:\x20','stringify','timestamp'];a65_0x46b7=function(){return _0x341261;};return a65_0x46b7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a66_0x5d10(_0x1e47c6,_0x17762b){_0x1e47c6=_0x1e47c6-0xff;const _0x52f1fd=a66_0x52f1();let _0x5d102f=_0x52f1fd[_0x1e47c6];return _0x5d102f;}(function(_0x387f81,_0x2cb313){const _0x523dfa=a66_0x5d10,_0x4abc60=_0x387f81();while(!![]){try{const _0x9a96bc=parseInt(_0x523dfa(0xff))/0x1+parseInt(_0x523dfa(0x102))/0x2+-parseInt(_0x523dfa(0x100))/0x3+parseInt(_0x523dfa(0x107))/0x4+parseInt(_0x523dfa(0x103))/0x5+parseInt(_0x523dfa(0x104))/0x6*(parseInt(_0x523dfa(0x101))/0x7)+-parseInt(_0x523dfa(0x106))/0x8*(parseInt(_0x523dfa(0x105))/0x9);if(_0x9a96bc===_0x2cb313)break;else _0x4abc60['push'](_0x4abc60['shift']());}catch(_0x1f39b1){_0x4abc60['push'](_0x4abc60['shift']());}}}(a66_0x52f1,0x2b98c));import{menuSync}from'../../commands/menu/sync.js';function a66_0x52f1(){const _0x3e1512=['1340269NfLOIG','705196pGQMDb','282095kWyDxc','6ApxhyS','452340pGyUgn','56wOSxsY','322240PTYwEi','102789uQtGCQ','760323HCxPBN'];a66_0x52f1=function(){return _0x3e1512;};return a66_0x52f1();}import{menuUpdate}from'../../commands/menu/update.js';export const menuDefinitions=[menuSync,menuUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x322ddd,_0x483a68){const _0x15acb5=a67_0x1427,_0x15b6c7=_0x322ddd();while(!![]){try{const _0x3ccd0f=parseInt(_0x15acb5(0x1d1))/0x1*(parseInt(_0x15acb5(0x1c7))/0x2)+parseInt(_0x15acb5(0x1c8))/0x3*(-parseInt(_0x15acb5(0x1cb))/0x4)+parseInt(_0x15acb5(0x1db))/0x5+-parseInt(_0x15acb5(0x1dd))/0x6+-parseInt(_0x15acb5(0x1c5))/0x7+-parseInt(_0x15acb5(0x1cd))/0x8*(-parseInt(_0x15acb5(0x1da))/0x9)+-parseInt(_0x15acb5(0x1d5))/0xa*(-parseInt(_0x15acb5(0x1dc))/0xb);if(_0x3ccd0f===_0x483a68)break;else _0x15b6c7['push'](_0x15b6c7['shift']());}catch(_0x1951a9){_0x15b6c7['push'](_0x15b6c7['shift']());}}}(a67_0x57ad,0x46eba));function a67_0x57ad(){const _0x578b9a=['\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','Menu\x20Name','1584244LcVMRq','path','74848KwnkbQ','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','online','length','2OQOPbl','max','\x20\x20\x20\x20•\x20','(unchanged)','10pjpwcX','\x20\x20\x20\x20CSS:\x20','repeat','push','test','252aXjWYF','1254035xoVVMn','12034088Ztebpr','2577978nbvako','showOnline','Local','local','\x20\x20No\x20pages\x20to\x20sync.','3450545qtFIFs','join','2366yZVKsi','3NqcWfj'];a67_0x57ad=function(){return _0x578b9a;};return a67_0x57ad();}function strWidth(_0x366b42){const _0x1801ff=a67_0x1427;let _0x1dd21d=0x0;for(const _0x18de79 of _0x366b42){_0x1dd21d+=/[\u4e00-\u9fa5]/[_0x1801ff(0x1d9)](_0x18de79)?0x2:0x1;}return _0x1dd21d;}function padRight(_0x1bb39e,_0x3bc3d4){const _0x53da6c=a67_0x1427,_0xb0ae3d=strWidth(_0x1bb39e);return _0x1bb39e+'\x20'[_0x53da6c(0x1d7)](Math[_0x53da6c(0x1d2)](0x0,_0x3bc3d4-_0xb0ae3d));}export function renderCompareTable(_0x34b8f4,_0x4d7eaf={}){const _0x60f8a9=a67_0x1427;if(_0x34b8f4[_0x60f8a9(0x1d0)]===0x0)return'';const _0x39240b=_0x4d7eaf[_0x60f8a9(0x1de)]??!![],_0x202d3c=Math[_0x60f8a9(0x1d2)](0x1e,..._0x34b8f4['map'](_0x2993df=>strWidth(_0x2993df['label']))),_0x1f6d3f=0x4,_0x33f2e0=[],_0x2ff6d8='\x20\x20'+padRight(_0x60f8a9(0x1ca),_0x202d3c),_0x10fbc1=padRight(_0x60f8a9(0x1c2),_0x1f6d3f),_0x1b7aa6=_0x39240b?'\x20\x20'+padRight('Platform',_0x1f6d3f):'';_0x33f2e0[_0x60f8a9(0x1d8)](_0x2ff6d8+'\x20\x20'+_0x10fbc1+(_0x39240b?_0x1b7aa6:'')),_0x33f2e0[_0x60f8a9(0x1d8)]('\x20\x20'+'─'[_0x60f8a9(0x1d7)](_0x202d3c)+'\x20\x20'+'─'[_0x60f8a9(0x1d7)](_0x1f6d3f)+(_0x39240b?'\x20\x20'+'─'['repeat'](_0x1f6d3f):''));for(const _0x15e531 of _0x34b8f4){const _0xad87ba=padRight(_0x15e531['label'],_0x202d3c),_0x500816=_0x15e531[_0x60f8a9(0x1c3)]?'✓':'✗',_0x2fb4be=padRight(_0x500816,_0x1f6d3f);let _0x91cf9e='\x20\x20'+_0xad87ba+'\x20\x20'+_0x2fb4be;if(_0x39240b){const _0x2c9ba0=_0x15e531[_0x60f8a9(0x1cf)]?'✓':'✗';_0x91cf9e+='\x20\x20'+padRight(_0x2c9ba0,_0x1f6d3f);}_0x33f2e0[_0x60f8a9(0x1d8)](_0x91cf9e);}return _0x33f2e0[_0x60f8a9(0x1c6)]('\x0a');}function a67_0x1427(_0x1c824e,_0x3e2243){_0x1c824e=_0x1c824e-0x1c2;const _0x57ad78=a67_0x57ad();let _0x1427fa=_0x57ad78[_0x1c824e];return _0x1427fa;}export function renderSyncSummary(_0x53abe7,_0x40611a){const _0x3dac30=a67_0x1427;if(_0x53abe7['length']===0x0)return _0x40611a?'\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.':_0x3dac30(0x1c4);const _0x53b282=['\x20\x20'+_0x53abe7[_0x3dac30(0x1d0)]+'\x20page(s)\x20will\x20be\x20created\x20on\x20platform:'];for(const _0x13196c of _0x53abe7){_0x53b282[_0x3dac30(0x1d8)](_0x3dac30(0x1d3)+_0x13196c['label']+'\x20('+_0x13196c[_0x3dac30(0x1cc)]+')');}return _0x53b282[_0x3dac30(0x1c6)]('\x0a');}export function renderUpdateSummary(_0x17e9f3,_0x4bda17){const _0xf8a80f=a67_0x1427;if(_0x17e9f3[_0xf8a80f(0x1d0)]===0x0)return _0xf8a80f(0x1c9);const _0x19e9da=['\x20\x20'+_0x17e9f3[_0xf8a80f(0x1d0)]+_0xf8a80f(0x1ce),'\x20\x20\x20\x20JS:\x20\x20'+(_0x4bda17[0x0]??_0xf8a80f(0x1d4)),_0xf8a80f(0x1d6)+(_0x4bda17[0x1]??_0xf8a80f(0x1d4)),'','\x20\x20Affected\x20menus:\x20'+_0x17e9f3[_0xf8a80f(0x1c6)](',\x20')];return _0x19e9da['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x388b89,_0x1dfeb6){var _0x34de5a=a68_0x4566,_0x24355b=_0x388b89();while(!![]){try{var _0x235b46=-parseInt(_0x34de5a(0x1e2))/0x1*(-parseInt(_0x34de5a(0x1e9))/0x2)+parseInt(_0x34de5a(0x1e5))/0x3+-parseInt(_0x34de5a(0x1eb))/0x4*(parseInt(_0x34de5a(0x1e6))/0x5)+parseInt(_0x34de5a(0x1ea))/0x6*(-parseInt(_0x34de5a(0x1e8))/0x7)+-parseInt(_0x34de5a(0x1e7))/0x8+-parseInt(_0x34de5a(0x1ec))/0x9*(-parseInt(_0x34de5a(0x1e3))/0xa)+-parseInt(_0x34de5a(0x1e4))/0xb*(-parseInt(_0x34de5a(0x1ed))/0xc);if(_0x235b46===_0x1dfeb6)break;else _0x24355b['push'](_0x24355b['shift']());}catch(_0x188446){_0x24355b['push'](_0x24355b['shift']());}}}(a68_0x3d58,0x83f92));function a68_0x3d58(){var _0x4a98c4=['4EUcnDV','63iByDlD','12mCpYVd','4OMAIsx','827490fgqMzG','13870747sgNhzN','975351PtxRGc','4903505ERjcBZ','4254608qpBDES','5096SdZxzH','229252CHfJLD','4704ZTPUSg'];a68_0x3d58=function(){return _0x4a98c4;};return a68_0x3d58();}function a68_0x4566(_0x341a5f,_0x160385){_0x341a5f=_0x341a5f-0x1e2;var _0x3d584c=a68_0x3d58();var _0x4566e7=_0x3d584c[_0x341a5f];return _0x4566e7;}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(_0x1b8537,_0x55a60f){const _0x505c8b=a69_0x21b4,_0x2ffa8b=_0x1b8537();while(!![]){try{const _0x29570e=-parseInt(_0x505c8b(0x188))/0x1*(-parseInt(_0x505c8b(0x180))/0x2)+-parseInt(_0x505c8b(0x17b))/0x3+parseInt(_0x505c8b(0x177))/0x4*(parseInt(_0x505c8b(0x178))/0x5)+-parseInt(_0x505c8b(0x175))/0x6+parseInt(_0x505c8b(0x167))/0x7+-parseInt(_0x505c8b(0x169))/0x8*(-parseInt(_0x505c8b(0x185))/0x9)+parseInt(_0x505c8b(0x17f))/0xa;if(_0x29570e===_0x55a60f)break;else _0x2ffa8b['push'](_0x2ffa8b['shift']());}catch(_0x2bbe3e){_0x2ffa8b['push'](_0x2ffa8b['shift']());}}}(a69_0x1582,0xa57a9));import a69_0x2b799b from'chalk';function a69_0x1582(){const _0x3d36fd=['ExitPromptError','2116056ZqbYdL','has','includes','fail','7272320EhibDi','10NJfCGt','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','test','path','green','282213ePiJmg','\x20\x20Checking\x20JS\x20URL\x20reachability...','stdin','134149axqYsJ','error','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','cancelled','isTTY','\x20\x20Checking\x20CSS\x20URL\x20reachability...','filter','5871656vazIgw','[already\x20on\x20platform]','40UjbbMO','start','CSS\x20URL\x20checked','label','length','CSS\x20URL\x20check\x20failed','succeed','trim','\x20\x20CSS\x20URL:','map','red','Cancelled.','6935028BVbaDt','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','581684MYDylS','5tzhSBR','name'];a69_0x1582=function(){return _0x3d36fd;};return a69_0x1582();}import{checkbox,input,confirm}from'@inquirer/prompts';import a69_0x47f76a from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x530bc9){return _0x530bc9['catch'](_0x267dad=>{const _0x349587=a69_0x21b4;if(_0x267dad?.[_0x349587(0x179)]===_0x349587(0x17a))throw CliErrors[_0x349587(0x163)](_0x349587(0x174));throw _0x267dad;});}export function startSpinner(_0x5debd8){const _0x403d9f=a69_0x21b4;return a69_0x47f76a({'text':_0x5debd8,'color':'cyan'})[_0x403d9f(0x16a)]();}export function stopSpinner(_0x5a750a,_0x300751,_0x526a50){const _0x554b45=a69_0x21b4;_0x526a50?_0x5a750a[_0x554b45(0x16f)](_0x300751):_0x5a750a[_0x554b45(0x17e)](_0x300751);}export async function askConfirm(_0x5ae6f3){return onCancel(confirm({'message':_0x5ae6f3,'theme':{'prefix':''}}));}export async function askJsUrl(_0x4565f0){const _0x4a2ff3=a69_0x21b4;while(!![]){const _0x3ade48=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x4565f0,'theme':{'prefix':''}}));if(_0x3ade48[_0x4a2ff3(0x170)]()==='')throw CliErrors[_0x4a2ff3(0x163)]('Cancelled.');if(!/^https:\/\/.+\.js(\?.*)?$/[_0x4a2ff3(0x182)](_0x3ade48['trim']())){console[_0x4a2ff3(0x189)](a69_0x2b799b[_0x4a2ff3(0x173)](_0x4a2ff3(0x181)));continue;}const _0x25566b=startSpinner(_0x4a2ff3(0x186));try{const _0x57253f=await isUrlReachable(_0x3ade48['trim']());stopSpinner(_0x25566b,'JS\x20URL\x20checked',_0x57253f);if(!_0x57253f){console[_0x4a2ff3(0x189)](a69_0x2b799b[_0x4a2ff3(0x173)](_0x4a2ff3(0x162)));continue;}return _0x3ade48[_0x4a2ff3(0x170)]();}catch(_0x37b091){stopSpinner(_0x25566b,'JS\x20URL\x20check\x20failed',![]);throw _0x37b091;}}}export async function askCssUrl(_0x35d393){const _0x103e09=a69_0x21b4;while(!![]){const _0x54b9cf=await onCancel(input({'message':_0x103e09(0x171),'default':_0x35d393,'theme':{'prefix':''}}));if(_0x54b9cf[_0x103e09(0x170)]()==='')throw CliErrors[_0x103e09(0x163)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/[_0x103e09(0x182)](_0x54b9cf[_0x103e09(0x170)]())){console[_0x103e09(0x189)](a69_0x2b799b['red']('\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'));continue;}const _0x1c31c1=startSpinner(_0x103e09(0x165));try{const _0x11bde3=await isUrlReachable(_0x54b9cf[_0x103e09(0x170)]());stopSpinner(_0x1c31c1,_0x103e09(0x16b),_0x11bde3);if(!_0x11bde3){console[_0x103e09(0x189)](a69_0x2b799b[_0x103e09(0x173)]('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x54b9cf[_0x103e09(0x170)]();}catch(_0x5b5a7f){stopSpinner(_0x1c31c1,_0x103e09(0x16e),![]);throw _0x5b5a7f;}}}export async function selectPages(_0x472bf4,_0x4ffd3c,_0x2042a6){const _0x4ff10a=a69_0x21b4,_0x5601e8=_0x472bf4[_0x4ff10a(0x172)](_0x212e61=>({'name':_0x212e61['label']+'\x20\x20'+(_0x4ffd3c[_0x4ff10a(0x17c)](_0x212e61[_0x4ff10a(0x183)])?a69_0x2b799b['gray'](_0x4ff10a(0x168)):a69_0x2b799b[_0x4ff10a(0x184)]('[new]')),'value':_0x212e61[_0x4ff10a(0x16c)],'checked':_0x2042a6?_0x2042a6[_0x4ff10a(0x17d)](_0x212e61['label']):!_0x4ffd3c[_0x4ff10a(0x17c)](_0x212e61['path'])}));if(_0x5601e8['length']===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x22edc6=await onCancel(checkbox({'message':_0x4ff10a(0x176),'choices':_0x5601e8,'loop':![],'theme':{'prefix':''}}));if(_0x22edc6[_0x4ff10a(0x16d)]===0x0)throw new Error('No\x20menus\x20selected.');return _0x472bf4[_0x4ff10a(0x166)](_0x165469=>_0x22edc6['includes'](_0x165469[_0x4ff10a(0x16c)]));}export function isInteractive(){const _0x4859ad=a69_0x21b4;return process[_0x4859ad(0x187)][_0x4859ad(0x164)]===!![];}function a69_0x21b4(_0x3018e5,_0x1664b7){_0x3018e5=_0x3018e5-0x162;const _0x1582eb=a69_0x1582();let _0x21b481=_0x1582eb[_0x3018e5];return _0x21b481;}export function requireInteractive(){if(!isInteractive())throw new Error('This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20'+'Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x40700b=a70_0x71d8;(function(_0x445914,_0x23de08){const _0x30e3c6=a70_0x71d8,_0x786b3a=_0x445914();while(!![]){try{const _0x140e64=parseInt(_0x30e3c6(0x102))/0x1*(parseInt(_0x30e3c6(0xf6))/0x2)+-parseInt(_0x30e3c6(0x105))/0x3*(parseInt(_0x30e3c6(0x108))/0x4)+-parseInt(_0x30e3c6(0x104))/0x5+parseInt(_0x30e3c6(0x103))/0x6+-parseInt(_0x30e3c6(0x107))/0x7+parseInt(_0x30e3c6(0xf4))/0x8*(-parseInt(_0x30e3c6(0x106))/0x9)+parseInt(_0x30e3c6(0x100))/0xa*(parseInt(_0x30e3c6(0xf8))/0xb);if(_0x140e64===_0x23de08)break;else _0x786b3a['push'](_0x786b3a['shift']());}catch(_0x39dafd){_0x786b3a['push'](_0x786b3a['shift']());}}}(a70_0x1576,0xd9204));import{readdirSync,statSync,readFileSync}from'fs';function a70_0x71d8(_0x113402,_0x28d91a){_0x113402=_0x113402-0xef;const _0x157680=a70_0x1576();let _0x71d82a=_0x157680[_0x113402];return _0x71d82a;}import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a70_0x40700b(0xf3)](),'src/pages');function a70_0x1576(){const _0x224a1a=['30cCrGmb','concat','34ZcPeUo','2004774wTqIds','2651615oWZruF','6SntlGU','555138ObeKER','932407NLnqBQ','134288uzSdLe','trim','utf-8','match','slice','forEach','cwd','152cVqTvI','replace','48058ojQxQa','endsWith','6016483pqaNNo','replaceAll','path','isDirectory','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','split','.tsx','filter'];a70_0x1576=function(){return _0x224a1a;};return a70_0x1576();}export function extractTitleFromComment(_0x41758c){const _0x3ef397=a70_0x40700b;try{const _0x1fbed2=readFileSync(_0x41758c,_0x3ef397(0xef)),_0x26ce75=_0x1fbed2[_0x3ef397(0xf0)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x26ce75&&_0x26ce75[0x1]){const _0x52a21a=_0x26ce75[0x1],_0xf34588=_0x52a21a[_0x3ef397(0xf0)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0xf34588&&_0xf34588[0x1])return _0xf34588[0x1][_0x3ef397(0x109)]();}let _0x46e839=null;const _0xd254ca=_0x1fbed2[_0x3ef397(0xf0)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0xd254ca&&_0xd254ca[0x1]&&(_0x46e839=_0xd254ca[0x1]);if(!_0x46e839){const _0xc3a632=_0x1fbed2[_0x3ef397(0xf0)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0xc3a632&&_0xc3a632[0x1]&&(_0x46e839=_0xc3a632[0x1]);}if(_0x46e839){const _0x152f23=new RegExp('\x5cb'+_0x46e839+_0x3ef397(0xfc)),_0x43af18=_0x1fbed2[_0x3ef397(0xf0)](_0x152f23);if(_0x43af18&&_0x43af18[0x1])return _0x43af18[0x1];return _0x46e839;}return null;}catch(_0x2419fd){return null;}}export function getLocalPages(_0x1bccdd=pagesDir,_0x5c1364=pagesDir){const _0x2a7e89=a70_0x40700b;let _0x526f85=[];const _0x8c7979=readdirSync(_0x1bccdd);return _0x8c7979[_0x2a7e89(0xf2)](_0x4b2027=>{const _0x1cd21f=_0x2a7e89,_0x484597=join(_0x1bccdd,_0x4b2027),_0x40428b=statSync(_0x484597);if(_0x40428b&&_0x40428b[_0x1cd21f(0xfb)]())_0x526f85=_0x526f85[_0x1cd21f(0x101)](getLocalPages(_0x484597,_0x5c1364));else{if(_0x4b2027[_0x1cd21f(0xf7)](_0x1cd21f(0xfe))){let _0x43f3ee=relative(_0x5c1364,_0x484597);_0x43f3ee['endsWith']('index.tsx')?_0x43f3ee=_0x43f3ee[_0x1cd21f(0xf5)](/index\.tsx$/,''):_0x43f3ee=_0x43f3ee['replace'](/\.tsx$/,'');_0x43f3ee[_0x1cd21f(0xf7)](sep)&&(_0x43f3ee=_0x43f3ee[_0x1cd21f(0xf1)](0x0,-0x1));const _0x4071a3=_0x43f3ee[_0x1cd21f(0xfd)](sep)['join']('/'),_0x525a4e=extractTitleFromComment(_0x484597),_0x28caff=_0x525a4e||_0x4071a3;_0x526f85['push']({'path':_0x4071a3[_0x1cd21f(0xf9)]('$',':'),'label':_0x28caff});}}}),_0x526f85[_0x2a7e89(0xff)](_0x142c91=>_0x142c91[_0x2a7e89(0xfa)]!=='');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xce0164,_0xb39cfc){const _0x4c5c94=a71_0xd31b,_0x4d4b00=_0xce0164();while(!![]){try{const _0x553fca=parseInt(_0x4c5c94(0x184))/0x1+parseInt(_0x4c5c94(0x194))/0x2+parseInt(_0x4c5c94(0x186))/0x3+parseInt(_0x4c5c94(0x18c))/0x4*(parseInt(_0x4c5c94(0x181))/0x5)+-parseInt(_0x4c5c94(0x18e))/0x6+parseInt(_0x4c5c94(0x18a))/0x7*(-parseInt(_0x4c5c94(0x17d))/0x8)+-parseInt(_0x4c5c94(0x18f))/0x9;if(_0x553fca===_0xb39cfc)break;else _0x4d4b00['push'](_0x4d4b00['shift']());}catch(_0x5b567a){_0x4d4b00['push'](_0x4d4b00['shift']());}}}(a71_0x5326,0xc3868));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x59cb20){const _0x2a5339=a71_0xd31b,_0x296f75=[];return!isValidJsHttpsUrl(_0x59cb20)&&_0x296f75['push'](_0x2a5339(0x192)),{'ok':_0x296f75[_0x2a5339(0x182)]===0x0,'errors':_0x296f75};}export function validateCssUrl(_0x40006d){const _0x2828a3=a71_0xd31b,_0x4951eb=[];return!isValidCssHttpsUrl(_0x40006d)&&_0x4951eb[_0x2828a3(0x193)](_0x2828a3(0x190)),{'ok':_0x4951eb['length']===0x0,'errors':_0x4951eb};}export async function validateJsUrlReachable(_0x12833a){const _0x479db2=a71_0xd31b,_0x386c61=validateJsUrl(_0x12833a);if(!_0x386c61['ok'])return _0x386c61;const _0x4f5f86=await isUrlReachable(_0x12833a);if(!_0x4f5f86)_0x386c61['errors'][_0x479db2(0x193)](_0x479db2(0x18d));return{'ok':_0x386c61[_0x479db2(0x191)]['length']===0x0,'errors':_0x386c61[_0x479db2(0x191)]};}export async function validateCssUrlReachable(_0x413415){const _0x53279e=a71_0xd31b,_0x7b781e=validateCssUrl(_0x413415);if(!_0x7b781e['ok'])return _0x7b781e;const _0x3bdb70=await isUrlReachable(_0x413415);if(!_0x3bdb70)_0x7b781e[_0x53279e(0x191)][_0x53279e(0x193)](_0x53279e(0x197));return{'ok':_0x7b781e[_0x53279e(0x191)][_0x53279e(0x182)]===0x0,'errors':_0x7b781e[_0x53279e(0x191)]};}export function buildCompareRows(_0x3da3d8,_0x55b5c7){const _0x54e11e=a71_0xd31b;return _0x3da3d8[_0x54e11e(0x198)](_0x3fe87a=>({'label':_0x3fe87a[_0x54e11e(0x187)],'path':_0x3fe87a[_0x54e11e(0x195)],'local':!![],'online':_0x55b5c7['has'](_0x3fe87a[_0x54e11e(0x195)])}));}export function filterNewPages(_0x533fc8,_0x454b0d,_0x20b615){const _0x4c4ac1=a71_0xd31b;if(_0x20b615&&_0x20b615[_0x4c4ac1(0x182)]>0x0){const _0x364806=new Set(_0x20b615[_0x4c4ac1(0x198)](_0x3e5d40=>_0x3e5d40[_0x4c4ac1(0x188)]())),_0x3293bb=_0x533fc8['filter'](_0x398fd3=>_0x364806[_0x4c4ac1(0x17f)](_0x398fd3[_0x4c4ac1(0x187)]));if(_0x3293bb[_0x4c4ac1(0x182)]===0x0)throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x364806][_0x4c4ac1(0x185)](',\x20'));return _0x3293bb;}return _0x533fc8['filter'](_0x4ab298=>!_0x454b0d[_0x4c4ac1(0x17f)](_0x4ab298[_0x4c4ac1(0x195)]));}export function filterPagesByLabels(_0x50c4c2,_0x3744e9){const _0x1edba4=a71_0xd31b,_0x19a203=[],_0x2f0001=[];for(const _0x31ea3c of _0x3744e9){const _0x1504ad=_0x31ea3c[_0x1edba4(0x188)](),_0x4cd8e7=_0x50c4c2[_0x1edba4(0x180)](_0x20f313=>_0x20f313[_0x1edba4(0x187)]===_0x1504ad);if(_0x4cd8e7)_0x19a203['push'](_0x4cd8e7);else _0x2f0001[_0x1edba4(0x193)](_0x31ea3c);}return{'matched':_0x19a203,'unmatched':_0x2f0001};}export async function doCreateMenus(_0x55a1ed,_0x3f08a5,_0x388eb0,_0x1a8b75){const _0x4e0a92=a71_0xd31b;return await createMenus(_0x55a1ed,_0x3f08a5,_0x388eb0,_0x1a8b75),{'created':_0x388eb0[_0x4e0a92(0x182)],'failed':0x0,'labels':_0x388eb0[_0x4e0a92(0x198)](_0x430c4f=>_0x430c4f['label'])};}function a71_0xd31b(_0x5502d1,_0x636077){_0x5502d1=_0x5502d1-0x17d;const _0x532679=a71_0x5326();let _0xd31bf0=_0x532679[_0x5502d1];return _0xd31bf0;}export function filterMenusWithResources(_0x3e5610){const _0xad07f=a71_0xd31b;return _0x3e5610[_0xad07f(0x17e)](_0x40f616=>_0x40f616['resources'][_0xad07f(0x182)]>0x0);}export async function doUpdateCdnUrls(_0x87e556,_0xc8b11e,_0x1b9d4f,_0x35624f){const _0x4c7166=a71_0xd31b,_0x190a24=_0x1b9d4f[_0x4c7166(0x17e)](_0x5c265c=>_0x5c265c[_0x4c7166(0x18b)][_0x4c7166(0x182)]>0x0),_0x5dd4e9=await Promise[_0x4c7166(0x183)](_0x190a24[_0x4c7166(0x198)](_0x32530e=>updateMenuCdnUrl(_0x87e556,_0xc8b11e,{'id':_0x32530e['id'],'label':_0x32530e['label'],'path':_0x32530e['path'],'resources':_0x35624f}))),_0x442192=_0x5dd4e9[_0x4c7166(0x17e)](_0x97c6=>_0x97c6[_0x4c7166(0x196)]===_0x4c7166(0x189))[_0x4c7166(0x182)];return{'updated':_0x190a24[_0x4c7166(0x182)]-_0x442192,'failed':_0x442192};}export async function fetchMenuData(_0x5b2eaa,_0x25c627){const _0x1a2d86=a71_0xd31b,_0x120088=getLocalPages(),_0xc2128=await getOnlineMenuList(_0x5b2eaa,_0x25c627),_0x1372fa=new Set(_0xc2128['map'](_0x256a8e=>_0x256a8e[_0x1a2d86(0x195)]));return{'localPages':_0x120088,'onlineMenuList':_0xc2128,'onlinePaths':_0x1372fa};}export async function fetchOnlineMenuList(_0x4a05a6,_0x78c79f){return getOnlineMenuList(_0x4a05a6,_0x78c79f);}function a71_0x5326(){const _0x2e4bef=['trim','rejected','28679CbmBvb','resources','2934520IiWVHK','JS\x20URL\x20is\x20unreachable','5875590qafWgw','6143535MqbFAN','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','errors','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','push','326828FiHmro','path','status','CSS\x20URL\x20is\x20unreachable','map','496QKEIbg','filter','has','find','10qcSpzn','length','allSettled','30854pTQpil','join','3165714bIkqqk','label'];a71_0x5326=function(){return _0x2e4bef;};return a71_0x5326();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a72_0x3220(){const _0x2046e7=['Fetch\x20menu\x20list','get-online-menu-list','8325660tbYJoM','5075310nCSpiN','1944187azrVZv','Update\x20menu\x20assets\x20\x22','push','POST','map','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','8412048sFrnle','Menu\x20assets\x20synced:\x20','96PDIYuN','Menu\x20created\x20successfully:\x20','Creating\x20menu:\x20','label','parse','236823TMXpMe','flat','create-menus','all','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','/smartapi/menu/find?appCode=','info','Fetched\x20','50645KaHZDl','/smartapi/menu/create','path','resources','\x20online\x20menus\x20successfully','import','Batch\x20menu\x20creation\x20completed,\x20total\x20','create-menu','7908wbrGsG','236gpmQkg','extend','8aDyMSN','isArray','update-menu-cdn-url','Updating\x20menu\x20asset\x20links:\x20','length','children','Create\x20menu\x20\x22'];a72_0x3220=function(){return _0x2046e7;};return a72_0x3220();}(function(_0x154dac,_0x2fdb83){const _0x11c582=a72_0xc85c,_0x4f6ead=_0x154dac();while(!![]){try{const _0x195d71=-parseInt(_0x11c582(0x209))/0x1+-parseInt(_0x11c582(0x204))/0x2*(-parseInt(_0x11c582(0x1ee))/0x3)+parseInt(_0x11c582(0x1ef))/0x4*(-parseInt(_0x11c582(0x211))/0x5)+parseInt(_0x11c582(0x1fb))/0x6+parseInt(_0x11c582(0x1fc))/0x7*(parseInt(_0x11c582(0x1f1))/0x8)+parseInt(_0x11c582(0x202))/0x9+-parseInt(_0x11c582(0x1fa))/0xa;if(_0x195d71===_0x2fdb83)break;else _0x4f6ead['push'](_0x4f6ead['shift']());}catch(_0x417c0c){_0x4f6ead['push'](_0x4f6ead['shift']());}}}(a72_0x3220,0x7e6c2));import{getApiDomain}from'../../../constant/domain.js';import{getEnv,isProduction}from'../../../constant/env.js';function a72_0xc85c(_0x58640b,_0xfb72bb){_0x58640b=_0x58640b-0x1ec;const _0x322039=a72_0x3220();let _0xc85cc8=_0x322039[_0x58640b];return _0xc85cc8;}import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x195770,_0x3cb30a){const _0x5a0d3e=a72_0xc85c,_0x3c15bb=getEnv();logger[_0x5a0d3e(0x20f)](_0x5a0d3e(0x1f9),isProduction(_0x3c15bb)?_0x5a0d3e(0x201)+_0x195770+')':_0x5a0d3e(0x20d)+_0x195770+')');const _0x119cf5=await platformFetch(getApiDomain()+_0x5a0d3e(0x20e)+_0x195770,{'cookie':_0x3cb30a,'label':_0x5a0d3e(0x1f8)});if(!_0x119cf5)return logger[_0x5a0d3e(0x20f)](_0x5a0d3e(0x1f9),'Server\x20returned\x20empty\x20menu\x20list'),[];return logger[_0x5a0d3e(0x20f)](_0x5a0d3e(0x1f9),_0x5a0d3e(0x210)+_0x119cf5[_0x5a0d3e(0x1f5)]+_0x5a0d3e(0x215)),_0x119cf5[_0x5a0d3e(0x200)](flattenMenuItem)[_0x5a0d3e(0x20a)]();}function flattenMenuItem(_0x7c440d){const _0x4f2ad7=a72_0xc85c;let _0x1edea7=[];try{if(_0x7c440d[_0x4f2ad7(0x1f0)]?.['resources']){const _0x5658c9=JSON[_0x4f2ad7(0x208)](_0x7c440d[_0x4f2ad7(0x1f0)][_0x4f2ad7(0x214)]);if(Array[_0x4f2ad7(0x1f2)](_0x5658c9))_0x1edea7=_0x5658c9;}}catch{}const _0x236f27=[{'id':_0x7c440d['id'],'path':_0x7c440d['path'],'label':_0x7c440d[_0x4f2ad7(0x207)],'resources':_0x1edea7}];if(_0x7c440d[_0x4f2ad7(0x1f6)]&&_0x7c440d[_0x4f2ad7(0x1f6)][_0x4f2ad7(0x1f5)]>0x0)for(const _0x54f4ff of _0x7c440d[_0x4f2ad7(0x1f6)]){_0x236f27[_0x4f2ad7(0x1fe)](...flattenMenuItem(_0x54f4ff));}return _0x236f27;}export async function createMenu(_0x4ec5ed,_0xc46d84,_0x3f9b1b){const _0x324bc4=a72_0xc85c;logger['info'](_0x324bc4(0x1ed),_0x324bc4(0x206)+_0x3f9b1b['label']+'\x20('+_0x3f9b1b[_0x324bc4(0x213)]+')');const _0x5f55de={'appCode':_0x4ec5ed,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x324bc4(0x216),'resources':_0x3f9b1b[_0x324bc4(0x214)]?JSON['stringify'](_0x3f9b1b[_0x324bc4(0x214)]):undefined},..._0x3f9b1b};await platformFetch(getApiDomain()+_0x324bc4(0x212),{'method':_0x324bc4(0x1ff),'body':_0x5f55de,'cookie':_0xc46d84,'label':_0x324bc4(0x1f7)+_0x3f9b1b['label']+'\x22'}),logger[_0x324bc4(0x20f)](_0x324bc4(0x1ed),_0x324bc4(0x205)+_0x3f9b1b[_0x324bc4(0x207)]);}async function createSingleMenu(_0x3d307b,_0x2889e7,_0x58d3fd,_0x30517c){const _0x291ef4=a72_0xc85c,_0x9f2289={'appCode':_0x3d307b,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x291ef4(0x216),'resources':_0x30517c?JSON['stringify'](_0x30517c):undefined},'label':_0x58d3fd[_0x291ef4(0x207)],'path':_0x58d3fd[_0x291ef4(0x213)]};await platformFetch(getApiDomain()+_0x291ef4(0x212),{'method':_0x291ef4(0x1ff),'body':_0x9f2289,'cookie':_0x2889e7,'label':_0x291ef4(0x1f7)+_0x58d3fd[_0x291ef4(0x207)]+'\x22'}),logger[_0x291ef4(0x20f)]('create-menu',_0x291ef4(0x205)+_0x58d3fd[_0x291ef4(0x207)]);}export async function createMenus(_0x2598d2,_0x56782e,_0xc40a9c,_0x2f055f){const _0x133ad2=a72_0xc85c;logger[_0x133ad2(0x20f)](_0x133ad2(0x20b),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0xc40a9c[_0x133ad2(0x1f5)]),await Promise[_0x133ad2(0x20c)](_0xc40a9c[_0x133ad2(0x200)](_0x28922d=>createSingleMenu(_0x2598d2,_0x56782e,_0x28922d,_0x2f055f))),logger[_0x133ad2(0x20f)](_0x133ad2(0x20b),_0x133ad2(0x1ec)+_0xc40a9c[_0x133ad2(0x1f5)]);}export async function updateMenuCdnUrl(_0x748c5e,_0x5f4980,_0x648ffb){const _0x28bdd9=a72_0xc85c;logger[_0x28bdd9(0x20f)](_0x28bdd9(0x1f3),_0x28bdd9(0x1f4)+_0x648ffb[_0x28bdd9(0x207)]+'\x20('+_0x648ffb[_0x28bdd9(0x213)]+')');const _0x3a82f0={'id':_0x648ffb['id'],'appCode':_0x748c5e,'extend':{'loadScriptMode':'import','resources':_0x648ffb[_0x28bdd9(0x214)]?JSON['stringify'](_0x648ffb['resources']):undefined}};await platformFetch(getApiDomain()+'/smartapi/menu/update',{'method':_0x28bdd9(0x1ff),'body':_0x3a82f0,'cookie':_0x5f4980,'label':_0x28bdd9(0x1fd)+_0x648ffb[_0x28bdd9(0x207)]+'\x22'}),logger[_0x28bdd9(0x20f)]('update-menu-cdn-url',_0x28bdd9(0x203)+_0x648ffb['label'],undefined);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x59a3ef,_0x358144){const _0x30028e=a73_0x5e13,_0x58db6b=_0x59a3ef();while(!![]){try{const _0x249b55=-parseInt(_0x30028e(0xef))/0x1+-parseInt(_0x30028e(0xe5))/0x2*(-parseInt(_0x30028e(0x107))/0x3)+parseInt(_0x30028e(0xfb))/0x4*(parseInt(_0x30028e(0xe4))/0x5)+-parseInt(_0x30028e(0xea))/0x6*(-parseInt(_0x30028e(0xff))/0x7)+parseInt(_0x30028e(0x103))/0x8*(parseInt(_0x30028e(0x102))/0x9)+-parseInt(_0x30028e(0x10b))/0xa+parseInt(_0x30028e(0x105))/0xb*(-parseInt(_0x30028e(0xf8))/0xc);if(_0x249b55===_0x358144)break;else _0x58db6b['push'](_0x58db6b['shift']());}catch(_0x3031a8){_0x58db6b['push'](_0x58db6b['shift']());}}}(a73_0x4fa9,0x601c8));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';function a73_0x4fa9(){const _0x14485f=['data','label','trim','readableEnded','map','cssUrl','5165LYLArr','42oHUalC','join','Menu\x20sync\x20completed','object','selectedLabels','6rLPvjT','Start\x20non-interactive\x20menu\x20sync','string','No\x20local\x20pages\x20matched\x20labels:\x20','startsWith','137291dWZqcL','split','has','pages','\x0a\x20\x20Available\x20local\x20pages:\x20','JS\x20URL\x20is\x20unreachable:\x20','push','stdin','isArray','36USufIS','concat','parse','1468hXnGzJ','setLogPath','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','menu-sync','592319vhltrS','toString','isTTY','1094787VcSyzK','48MFxzcH','path','3116047ReJEGq','length','28467mmsCMz','info','filter','jsUrl','120610kvdNlp'];a73_0x4fa9=function(){return _0x14485f;};return a73_0x4fa9();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x164af5){const _0x4e3faf=a73_0x5e13,_0x3d0260=[];return _0x164af5[_0x4e3faf(0x10a)]&&!isValidJsHttpsUrl(_0x164af5[_0x4e3faf(0x10a)])&&_0x3d0260[_0x4e3faf(0xf5)]({'field':_0x4e3faf(0x10a),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x164af5[_0x4e3faf(0xe3)]&&!isValidCssHttpsUrl(_0x164af5[_0x4e3faf(0xe3)])&&_0x3d0260[_0x4e3faf(0xf5)]({'field':_0x4e3faf(0xe3),'message':_0x4e3faf(0xfd)}),_0x3d0260;}function a73_0x5e13(_0x136e1c,_0xc00433){_0x136e1c=_0x136e1c-0xdf;const _0x4fa994=a73_0x4fa9();let _0x5e13da=_0x4fa994[_0x136e1c];return _0x5e13da;}export async function runMenuSyncCore(_0x2e84cb,_0xe36e75,_0x3502e3=[],_0x30eda3){const _0x5e15ec=a73_0x5e13,_0x4de60f=parseParamsFlag(_0x30eda3),_0x2a985d=_0x3502e3[_0x5e15ec(0x106)]>0x0?_0x3502e3:_0x4de60f[_0x5e15ec(0xe9)],_0x55520c=_0x4de60f[_0x5e15ec(0x10a)],_0x379bd2=_0x4de60f[_0x5e15ec(0xe3)],_0x3f90cd=[];if(_0x55520c)_0x3f90cd['push'](_0x55520c);if(_0x379bd2)_0x3f90cd[_0x5e15ec(0xf5)](_0x379bd2);const _0x488038=validateParams(_0x4de60f);if(_0x488038[_0x5e15ec(0x106)]>0x0){const _0x4417a5=_0x488038['map'](_0x5054b5=>'--params.'+_0x5054b5['field']+':\x20'+_0x5054b5['message'])['join'](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x4417a5);}logger[_0x5e15ec(0xfc)](process['cwd']()),logger[_0x5e15ec(0x108)](_0x5e15ec(0xfe),_0x5e15ec(0xeb),{'appCode':_0x2e84cb,'selectedCount':_0x2a985d?.[_0x5e15ec(0x106)],'jsUrl':_0x55520c,'cssUrl':_0x379bd2});if(_0x55520c){const _0x3b5bff=await isUrlReachable(_0x55520c);if(!_0x3b5bff)throw new Error(_0x5e15ec(0xf4)+_0x55520c);}if(_0x379bd2){const _0x2ba425=await isUrlReachable(_0x379bd2);if(!_0x2ba425)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x379bd2);}const _0x22c3ad=getLocalPages();if(_0x22c3ad[_0x5e15ec(0x106)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x20ce9a=await getOnlineMenuList(_0x2e84cb,_0xe36e75),_0x5ea8ea=new Set(_0x20ce9a['map'](_0x3e34f1=>_0x3e34f1[_0x5e15ec(0x104)]));let _0x215aee;if(_0x2a985d&&_0x2a985d[_0x5e15ec(0x106)]>0x0){const _0x2ced4a=new Set(_0x2a985d[_0x5e15ec(0xe2)](_0xaed4af=>_0xaed4af[_0x5e15ec(0xe0)]()));_0x215aee=_0x22c3ad[_0x5e15ec(0x109)](_0x1d2817=>_0x2ced4a[_0x5e15ec(0xf1)](_0x1d2817[_0x5e15ec(0xdf)]));if(_0x215aee[_0x5e15ec(0x106)]===0x0){const _0x1edb3a=_0x22c3ad[_0x5e15ec(0xe2)](_0x3e4a91=>_0x3e4a91[_0x5e15ec(0xdf)])[_0x5e15ec(0xe6)](',\x20');throw new Error(_0x5e15ec(0xed)+[..._0x2ced4a]['join'](',\x20')+_0x5e15ec(0xf3)+_0x1edb3a);}}else _0x215aee=_0x22c3ad[_0x5e15ec(0x109)](_0x187168=>!_0x5ea8ea[_0x5e15ec(0xf1)](_0x187168[_0x5e15ec(0x104)]));if(_0x215aee[_0x5e15ec(0x106)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x2e84cb,_0xe36e75,_0x215aee,_0x3f90cd[_0x5e15ec(0x106)]>0x0?_0x3f90cd:undefined),logger['info'](_0x5e15ec(0xfe),_0x5e15ec(0xe7),{'count':_0x215aee[_0x5e15ec(0x106)],'resources':_0x3f90cd}),{'created':_0x215aee[_0x5e15ec(0x106)],'skipped':![],'targetPages':_0x215aee};}export async function readPageLabelsFromStdin(){const _0x2235af=a73_0x5e13;if(!process[_0x2235af(0xf6)][_0x2235af(0x101)]&&!process[_0x2235af(0xf6)][_0x2235af(0xe1)])return new Promise(_0x24b092=>{const _0x37a4f1=_0x2235af,_0x163164=[];process[_0x37a4f1(0xf6)]['on'](_0x37a4f1(0x10c),_0x597fff=>_0x163164['push'](_0x597fff)),process['stdin']['on']('end',()=>{const _0x27b0d2=_0x37a4f1,_0x33c100=Buffer[_0x27b0d2(0xf9)](_0x163164)[_0x27b0d2(0x100)]('utf8'),_0x3f8b7c=_0x33c100[_0x27b0d2(0xf0)]('\x0a')['map'](_0x315f42=>_0x315f42[_0x27b0d2(0xe0)]())['filter'](_0x224cfe=>_0x224cfe[_0x27b0d2(0x106)]>0x0&&!_0x224cfe[_0x27b0d2(0xee)]('#'));_0x24b092(_0x3f8b7c);}),setTimeout(()=>_0x24b092([]),0x1f4);});return[];}function parseParamsFlag(_0x3db736){const _0x57a96f=a73_0x5e13;if(!_0x3db736||typeof _0x3db736!==_0x57a96f(0xec))return{};try{const _0xf98f92=JSON[_0x57a96f(0xfa)](_0x3db736);if(typeof _0xf98f92!==_0x57a96f(0xe8)||_0xf98f92===null||Array[_0x57a96f(0xf7)](_0xf98f92))return{};return{'selectedLabels':Array[_0x57a96f(0xf7)](_0xf98f92[_0x57a96f(0xf2)])?_0xf98f92[_0x57a96f(0xf2)][_0x57a96f(0xe2)](String):undefined,'jsUrl':typeof _0xf98f92[_0x57a96f(0x10a)]===_0x57a96f(0xec)?_0xf98f92[_0x57a96f(0x10a)][_0x57a96f(0xe0)]():undefined,'cssUrl':typeof _0xf98f92[_0x57a96f(0xe3)]==='string'?_0xf98f92[_0x57a96f(0xe3)]['trim']():undefined};}catch{return{};}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ffd6b,_0x2adc84){const _0x9716f3=a75_0xe23f,_0x588ba2=_0x4ffd6b();while(!![]){try{const _0x248c76=-parseInt(_0x9716f3(0x100))/0x1*(-parseInt(_0x9716f3(0xf8))/0x2)+parseInt(_0x9716f3(0x10a))/0x3*(parseInt(_0x9716f3(0xf5))/0x4)+parseInt(_0x9716f3(0x116))/0x5*(-parseInt(_0x9716f3(0xfb))/0x6)+parseInt(_0x9716f3(0x111))/0x7*(parseInt(_0x9716f3(0x103))/0x8)+-parseInt(_0x9716f3(0xfc))/0x9+-parseInt(_0x9716f3(0xfe))/0xa+parseInt(_0x9716f3(0x105))/0xb*(parseInt(_0x9716f3(0x110))/0xc);if(_0x248c76===_0x2adc84)break;else _0x588ba2['push'](_0x588ba2['shift']());}catch(_0x1a807b){_0x588ba2['push'](_0x588ba2['shift']());}}}(a75_0x1ff6,0x559f4));function a75_0xe23f(_0x55f8f2,_0x150322){_0x55f8f2=_0x55f8f2-0xf1;const _0x1ff607=a75_0x1ff6();let _0xe23fff=_0x1ff607[_0x55f8f2];return _0xe23fff;}import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a75_0x1ff6(){const _0x49700b=['1165620XYfSeN','3043170BSjIEB','status','5758650zHrDCg','allSettled','7753BapUPM','setLogPath','isArray','1555552wzPzfG','string','7755qoHtOL','jsUrl','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Start\x20non-interactive\x20menu\x20update','rejected','3kusFoT','path','join','CSS\x20URL\x20is\x20unreachable:\x20','length','push','18432NuhFzV','7rCwGTN','filter','menu-update','field','JS\x20URL\x20is\x20unreachable:\x20','5NsEHTo','message','label','resources','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Menu\x20update\x20completed','Invalid\x20--params:\x20','map','447488SbkXaw','trim','info','18axLPNk','cssUrl','parse'];a75_0x1ff6=function(){return _0x49700b;};return a75_0x1ff6();}function validateParams(_0x209d6e){const _0x1c4896=a75_0xe23f,_0x418282=[];return _0x209d6e['jsUrl']&&!isValidJsHttpsUrl(_0x209d6e[_0x1c4896(0x106)])&&_0x418282[_0x1c4896(0x10f)]({'field':'jsUrl','message':_0x1c4896(0x107)}),_0x209d6e[_0x1c4896(0xf9)]&&!isValidCssHttpsUrl(_0x209d6e['cssUrl'])&&_0x418282['push']({'field':_0x1c4896(0xf9),'message':_0x1c4896(0xf1)}),_0x418282;}export async function runMenuUpdateCore(_0x5cb9d5,_0x5efb24,_0x2bd33c){const _0x5f43a2=a75_0xe23f,_0x42ea6b=parseUpdateParamsFlag(_0x2bd33c),_0x4df279=[];if(_0x42ea6b[_0x5f43a2(0x106)])_0x4df279[_0x5f43a2(0x10f)](_0x42ea6b[_0x5f43a2(0x106)]);if(_0x42ea6b[_0x5f43a2(0xf9)])_0x4df279[_0x5f43a2(0x10f)](_0x42ea6b[_0x5f43a2(0xf9)]);const _0x290202=validateParams(_0x42ea6b);if(_0x290202['length']>0x0){const _0x31e3d8=_0x290202[_0x5f43a2(0xf4)](_0x3e2077=>'--params.'+_0x3e2077[_0x5f43a2(0x114)]+':\x20'+_0x3e2077[_0x5f43a2(0x117)])[_0x5f43a2(0x10c)](';\x20');throw new Error(_0x5f43a2(0xf3)+_0x31e3d8);}logger[_0x5f43a2(0x101)](process['cwd']()),logger[_0x5f43a2(0xf7)](_0x5f43a2(0x113),_0x5f43a2(0x108),{'appCode':_0x5cb9d5,'jsUrl':_0x42ea6b[_0x5f43a2(0x106)],'cssUrl':_0x42ea6b['cssUrl']});if(_0x42ea6b[_0x5f43a2(0x106)]){const _0x122f1b=await isUrlReachable(_0x42ea6b[_0x5f43a2(0x106)]);if(!_0x122f1b)throw new Error(_0x5f43a2(0x115)+_0x42ea6b[_0x5f43a2(0x106)]);}if(_0x42ea6b[_0x5f43a2(0xf9)]){const _0x3a1f74=await isUrlReachable(_0x42ea6b[_0x5f43a2(0xf9)]);if(!_0x3a1f74)throw new Error(_0x5f43a2(0x10d)+_0x42ea6b[_0x5f43a2(0xf9)]);}const _0x329f99=await getOnlineMenuList(_0x5cb9d5,_0x5efb24),_0x1f2550=_0x329f99[_0x5f43a2(0x112)](_0x55c106=>_0x55c106[_0x5f43a2(0x119)][_0x5f43a2(0x10e)]>0x0);if(_0x1f2550[_0x5f43a2(0x10e)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x68d495=await Promise[_0x5f43a2(0xff)](_0x1f2550['map'](_0x500980=>updateMenuCdnUrl(_0x5cb9d5,_0x5efb24,{'id':_0x500980['id'],'label':_0x500980[_0x5f43a2(0x118)],'path':_0x500980[_0x5f43a2(0x10b)],'resources':_0x4df279}))),_0x58570c=_0x68d495[_0x5f43a2(0x112)](_0x20efe6=>_0x20efe6[_0x5f43a2(0xfd)]===_0x5f43a2(0x109))[_0x5f43a2(0x10e)];return logger[_0x5f43a2(0xf7)](_0x5f43a2(0x113),_0x5f43a2(0xf2),{'count':_0x1f2550[_0x5f43a2(0x10e)],'resources':_0x4df279}),{'updated':_0x1f2550[_0x5f43a2(0x10e)]-_0x58570c,'failed':_0x58570c,'skipped':![]};}function parseUpdateParamsFlag(_0x2bdf3e){const _0xaa56bb=a75_0xe23f;if(!_0x2bdf3e||typeof _0x2bdf3e!==_0xaa56bb(0x104))return{};try{const _0x34e822=JSON[_0xaa56bb(0xfa)](_0x2bdf3e);if(typeof _0x34e822!=='object'||_0x34e822===null||Array[_0xaa56bb(0x102)](_0x34e822))return{};return{'jsUrl':typeof _0x34e822[_0xaa56bb(0x106)]===_0xaa56bb(0x104)?_0x34e822[_0xaa56bb(0x106)]['trim']():undefined,'cssUrl':typeof _0x34e822[_0xaa56bb(0xf9)]===_0xaa56bb(0x104)?_0x34e822['cssUrl'][_0xaa56bb(0xf6)]():undefined};}catch{return{};}}
|